This is the mail archive of the
mailing list for the GCC project.
Re: PATCH c++/19628
On Jan 29, 2005, at 2:15 AM, Eric Botcazou wrote:
+ /* Test whether DECL is a builtin that may appear in a
+ constant-expression. */
+ bool builtin_is_constant_p (tree decl)
+ /* At present BUILT_IN_CONSTANT_P is the only builtin we're
+ in constant-expressions. We may want to add other builtins
+ return TREE_CODE (decl) == FUNCTION_DECL
+ && DECL_IS_BUILTIN (decl)
+ && DECL_FUNCTION_CODE (decl) == BUILT_IN_CONSTANT_P;
DECL_FUNCTION_CODE is overloaded, so the test
DECL_FUNCTION_CODE (decl) == BUILT_IN_CONSTANT_P
can be true for another builtin (typically coming from the MD file).
Thanks. I'll post a revised patch in a day or two after I've tested it.