This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
RE: c/6861: Conflicting type name allowed
- From: "Steve Cornett" <stevec at bullseye dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 29 May 2002 22:26:01 -0000
- Subject: RE: c/6861: Conflicting type name allowed
- Reply-to: "Steve Cornett" <stevec at bullseye dot com>
The following reply was made to PR c/6861; it has been noted by GNATS.
From: "Steve Cornett" <stevec@bullseye.com>
To: "Andrew Pinski" <pinskia@physics.uc.edu>
Cc: <gcc-gnats@gcc.gnu.org>
Subject: RE: c/6861: Conflicting type name allowed
Date: Wed, 29 May 2002 15:16:55 -0700
Andrew,
Thanks for your reply, however I disagree with your finding.
A warning is too weak, and very much too weak if -pedantic is required to
get the warning. This syntax is not just a little bit off, it is completely
invalid. Is the type of "a" unsigned char, unsigned short or (signed)
short? Any of these seems plausible to me. The bug is not that you cannot
get a warning, but rather that a meaningless, erroneous syntax produces no
error message.
Thanks,
Steve
-----Original Message-----
From: Andrew Pinski [mailto:pinskia@physics.uc.edu]
Sent: Wednesday, May 29, 2002 3:00 PM
To: stevec@bullseye.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/6861: Conflicting type name allowed
you can use `gcc -Wall -pedantic -c testil.c', which warns about it.
testil.c:2: warning: long, short, signed or unsigned used invalidly for
`a'
collect2: ld returned 1 exit status
On Wednesday, May 29, 2002, at 05:54 , stevec@bullseye.com wrote:
> typedef unsigned char T;
> T short a;
>> How-To-Repeat:
> gcc -c bug.c