This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Living with native compiler bugs
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: Living with native compiler bugs
- From: Roman Lechtchinsky <rl at cs dot tu-berlin dot de>
- Date: Thu, 28 Jun 2001 21:04:52 +0200 (MEST)
- cc: gcc at gcc dot gnu dot org
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