This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: stab info for const fields
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Oct 2002 19:21:38 +0000 (GMT)
- Subject: Re: Patch: stab info for const fields
On Wed, 30 Oct 2002, Mark Mitchell wrote:
> > the C FE sets the READONLY bit on the FIELD_DECL node, not
> > on its type.
>
> Yes, and that's what's wrong. :-)
>
> The right fix is to change that behavior in the C front end the same
> way that I changed the C++ front end a couple of years ago.
I suspect there are also some bugs in handling of "restrict" caused by the
current broken system, where when these qualifiers on the DECL are
converted back to a type only READONLY and VOLATILE are checked for. It
would be good to try to spot these while fixing this, and add testcases
for them.
--
Joseph S. Myers
jsm28@cam.ac.uk