From: Ramon Bertran Monfort <rbertran@ac.upc.edu>
To: Andrew Haley <aph@redhat.com>
Cc: Ramon Bertran Monfort <rbertran@ac.upc.edu>, gcc-help@gcc.gnu.org
Subject: Re: Stricter requirements for function main signature
Date: Tue, 08 Apr 2008 13:17:00 -0000 [thread overview]
Message-ID: <20080408102154.GA31292@rbertran-workstation> (raw)
In-Reply-To: <47FB2DD7.9090009@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1701 bytes --]
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@ac.upc.edu C. Jordi Girona 1-3 - 08034 Barcelona
-------------------------------------------------------------------------------
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-04-08 10:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 18:37 Ramon Bertran Monfort
2008-04-08 10:22 ` Andrew Haley
2008-04-08 13:17 ` Ramon Bertran Monfort [this message]
2008-04-08 14:56 ` Andrew Haley
2008-04-08 18:08 ` Ramon Bertran Monfort
2008-04-08 16:34 ` Jim Wilson
2008-04-08 18:33 ` Ramon Bertran Monfort
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080408102154.GA31292@rbertran-workstation \
--to=rbertran@ac.upc.edu \
--cc=aph@redhat.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).