Re: [LIP] Function pointers not implemented on PPC ?
Binand Sethumadhavan <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jan 06, 2004 at 04:31:58PM +0530, Kapil Sethi wrote:
> 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");
> }
>
> void main()
main() has to return int. Returning void from main() makes your code
non-conformant, thus all bets are off.
> {
> void (* myfunc)();
> myfunc=&test;
> (*myfunc)();
> }
Where are your compiler error messages? Use proper prototypes for myfunc()
and try to compile. Then post the error messages here. This list lacks
clairvoyant people :-(
Binand
--
Linux - It is now safe to power ON your computer.
-------------------------------------------------------
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