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: 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 allowing
+ in constant-expressions. We may want to add other builtins
later. */
+ 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.


--Matt


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