Re: Stricter requirements for function main signature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well,
first of all, thanks for answering.

> 
> Why don't you just define main() correctly?  argv should be 'char **', 
> and envp should probably be 'char **'.  How can you possibly have an 
> envp that's a long long unsigned int?
> 

If a follow the SDK3.0 programming guide, it tells me that the spe main 
function has three parameters: the spe id, and two pointers to application 
specific data. The last two are optional.

I can try to change the signature to the 'correctly' one ... but doing this 
will break the spe run-time probably. (I've to experiment with this).  
Anyway, sometimes I use three parameters witch is not allowed with the 
'correct' strict signature.

I know that there are workarounds for solving this issues, but I'm 
wondering if there is any gcc flag to relax this strict condition. It would 
be easy to port applications to gcc 4.3.0 such as the Cell application 
which changing the code is not as straightforward as the example shown in 
http://www.gnu.org/software/gcc/gcc-4.3/porting_to.html .

> Also, what are the compiler options you're using?

I guess that does not matter. I'm using just 'spu-g++ -O2' for testing.

> 
> Andrew.

Salut!

-- 
-------------------------------------------------------------------------------
Ramon Bertran Monfort                 Departament d'Arquitectura de Computadors
Telefon (+34) 93 4054033/54055             Universitat Politecnica de Catalunya
Fax (+34) 93 4017055                        Despatx C6-103/C6-221-9 Campus Nord
e-mail rbertran@xxxxxxxxxx                C. Jordi Girona 1-3 - 08034 Barcelona
-------------------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux