This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Living with native compiler bugs


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]