Article View: comp.unix.programmer
Article #3703Re: problem with gcc and semctl(2)
From: Jorge Gautier
Date: Tue, 15 Oct 1991 09:41
Date: Tue, 15 Oct 1991 09:41
18 lines
1628 bytes
1628 bytes
OK, I figured it out by looking at the last item of the info for
GCC:Incompatibilities:
* On the Sparc, GNU CC uses an incompatible calling convention for
structures. It passes them by including their contents in the
argument list, whereas the standard compiler passes them
effectively by reference.
This really ought to be fixed, but such calling conventions are
not yet supported in GNU CC, so it isn't straightforward to fix
it.
The convention for structure returning is also incompatible, and
`-fpcc-struct-return' does not help.
So the fix is to pass the union by reference, as:
if (semctl(id, 0, SETVAL, &semctl_arg) < 0)
Technical Details
Message-ID:
<JGAUTIER.91Oct15104141@vangogh.ads.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!decwrl!ads.com!saturn!jgautierReferences:
<JGAUTIER.91Oct15095509@vangogh.ads.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,22407d957bfa9556 X-Google-Attributes: gid11318c,public X-Google-Thread: f8c9b,22407d957bfa9556 X-Google-Attributes: gidf8c9b,public X-Google-Thread: fc89c,22407d957bfa9556 X-Google-Attributes: gidfc89c,public X-Google-ArrivalTime: 1991-10-15 17:16:41 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!decwrl!ads.com!saturn!jgautier From: jgautier@vangogh.ads.com (Jorge Gautier) Newsgroups: comp.unix.programmer,comp.unix.questions,gnu.gcc.help Subject: Re: problem with gcc and semctl(2) Message-ID: <JGAUTIER.91Oct15104141@vangogh.ads.com> Date: 15 Oct 91 09:41:41 GMT References: <JGAUTIER.91Oct15095509@vangogh.ads.com> Sender: usenet@ads.com (USENET News) Organization: Advanced Decision Systems, Mountain View, CA 94043, +1 (415) 960-7300 Lines: 18 In-Reply-To: jgautier@vangogh.ads.com's message of 15 Oct 91 09:55:09 Nntp-Posting-Host: vangogh.ads.com