This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for PR c/4319
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Cc: gcc-patches at gcc dot gnu dot org, jsm28 at cam dot ac dot uk
- Date: Mon, 23 Sep 2002 14:52:58 -0400 (EDT)
- Subject: 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)