This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Living with native compiler bugs
- To: Roman Lechtchinsky <rl at cs dot tu-berlin dot de>
- Subject: Re: Living with native compiler bugs
- From: Richard Henderson <rth at redhat dot com>
- Date: Thu, 28 Jun 2001 10:09:07 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <Pine.SOL.4.10.10106281650370.5037-100000@sossusvlei>
On Thu, Jun 28, 2001 at 05:08:47PM +0200, Roman Lechtchinsky wrote:
> Cray CC accepts something like
>
> void f (T);
>
> void f (x)
> T x;
> {...}
>
> only if T is a 64-bit type (e.g. int or a pointer). It always accepts
>
> void f (T x)
> {...}
This is not a bug. Without a prototype, X is promoted to int,
which is 64 bits on your platform, which conflicts with a K&R
definition with a type smaller than int. You'll see the same
behaviour from gcc -pedantic.
Modify the definition of SWAP to take an unsigned int instead
of nls_uint32.
r~