This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Patch for PR c/4319


> I don't completely understand why I didn't see this earlier but
> gcc.dg/typespec-1.c now fails in over a 100 places on hppa64-hp-hpux11.00.
> I first observed this in a build last night, but 3.2 doesn't warn or
> generate an error for the following as well, even with -pedantic:
> 
>   char short *x23;
> 
> Looking at c-decl.c, I see that explicit_char is 1 for this case, so
> the change that you made doesn't generate an error for "char short".

On further investigation, it appears that grokdeclarator has been
miscompiled.  For some reason, when specbits is set, it appears to
be treated as a "long" (i.e., ldd/std are used to load and store the
value).  However, when it is tested, it seems to be treated as an
int (i.e., ldw/stw are used).  This mixup causes the type checks
to fail.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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