Re: [LIP] Function pointers not implemented on PPC ?

Shridhar Daithankar <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
On Tuesday 06 January 2004 16:31, Kapil Sethi wrote:
> Hi,
>
> I have written a small code using pointers to function which compiles and
> runs on RHL 7.2 on P IV
> However when I compile the same using gcc cross compiler for PPC the
> program does not compile. Please help / suggest
>
> <code>
> void test()
> {
>     printf ("Hello Kapil\n");
> }
>

Shouldn't that be void test(void) for standards sake?

> void main()
> {
>     void (* myfunc)();
>     myfunc=&test;

make that myfunc=test;

 HTH

 Shridhar



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.