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: [trunk][patch] Factor check for names starting in __builtin_ or __sync_


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


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