Stricter requirements for function main signature

Ramon Bertran Monfort rbertran@ac.upc.edu
Mon Apr 7 18:37:00 GMT 2008


Hello,

I guess that this is the correct place to ask the following question.

I've built a crosstoolchain for building Cell binaries on a x86 platform.  
The gcc version I used is gcc 4.3.0 . When I compile spu binaries with the 
corresponding main function signature...

main(unsigned long long spe, unsigned long long argp, unsigned long long 
envp)

... I get an error telling me that the main signature is not correct (the 
first parameters must be and integer, etc...). 

spumain.cpp:56: error: first argument of 'int main(long long unsigned int, 
long long unsigned int, long long unsigned int)' should be 'int'
spumain.cpp:56: error: second argument of 'int main(long long unsigned int, 
long long unsigned int, long long unsigned int)' should be 'char **'
spumain.cpp:56: error: third argument of 'int main(long long unsigned int, 
long long unsigned int, long long unsigned int)' should probably be 'char 
**'

I've seen in http://www.gnu.org/software/gcc/gcc-4.3/porting_to.html that 
C++ from version 4.3.0 has stricter requirements for function main 
signature. How is supposed to work this on a Cell platform? 

Thanks in advance,
Salut!



More information about the Gcc-help mailing list