This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trunk][patch] Factor check for names starting in __builtin_ or __sync_
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Rafael Espindola <espindola at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>
- Date: Wed, 8 Apr 2009 16:16:18 +0000 (UTC)
- Subject: Re: [trunk][patch] Factor check for names starting in __builtin_ or __sync_
- References: <38a0d8450904020305o22d68f8bq2cbbc033bc3ebf8e@mail.gmail.com>
On Thu, 2 Apr 2009, Rafael Espindola wrote:
> This is just a small code refactoring from the lto branch. It just adds
> the function is_builtin_name to centralize the checks for names starting
> with __sync_ or __builtin_.
>
> OK for trunk if bootstraps and all tests are OK?
>
> 2009-04-02 Rafael Avila de Espindola <espindola@google.com>
>
> * builtins.c (is_builtin_name): New.
> (called_as_built_in): Use is_builtin_name.
> * tree.h (is_builtin_name): New.
> * varasm.c (incorporeal_function_p): Use is_builtin_name.
There are other checks for __builtin_ in the compiler that could probably
use this function (they may only check for __builtin_ at present, but it
would be appropriate for them to handle __sync_ the same way). At least,
in c-common.c and c-typeck.c.
--
Joseph S. Myers
joseph@codesourcery.com