aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index d7e9c7b..57fc5c1 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -346,10 +346,16 @@ builtin_valid_in_constant_expr_p (const_tree decl)
return false;
switch (DECL_FUNCTION_CODE (decl))
{
- case BUILT_IN_CONSTANT_P:
- case BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE:
+ /* These always have constant results like the corresponding
+ macros/symbol. */
+ case BUILT_IN_FILE:
+ case BUILT_IN_FUNCTION:
+ case BUILT_IN_LINE:
+
/* These have constant results even if their operands are
non-constant. */
+ case BUILT_IN_CONSTANT_P:
+ case BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE:
return true;
default:
return false;