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, 28 Jun 2001, Richard Henderson wrote:

> 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.

Oops, I didn't know that. Thanks for the explanation. Why, then, does gcc
(and other projects) unconditionally use old-style parameter declarations?
Isn't this bound to cause compatibility problems?

> Modify the definition of SWAP to take an unsigned int instead
> of nls_uint32.

Ok, I'll do that.

Bye

Roman



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