This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Pure and const attributes for builtins
- From: Roger Sayle <roger at eyesopen dot com>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 Nov 2001 15:43:28 -0700 (MST)
- Subject: Re: [PATCH] Pure and const attributes for builtins
Hi Joseph,
> > I think that a far cleaner solution is to have a single hash-table for
> > identifiers (c.f. the work integrating the preprocessor's symbol table),
> > and re-use the code that compares types that already in c-decl.c and
> > cp/decl.c that is used by the existing builtin implementation. I really
> > can't see any point in duplicating this code, that is already efficiently
> > reused by the existing builtin system.
>
> The right place would be comptypes - all this should be working
> exclusively on types, not decls (cf Mark Mitchell's fixes to ensure that
> const and volatile in variable types are properly included in the type,
> not just the decl).
That's exactly right. In fact that's precisely the routine that compares
the types for my patches in the C++ front-end. Clever n'est pas?
Roger
--