diff options
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 04702ee1c00..abda6e4f729 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -352,6 +352,12 @@ builtin_valid_in_constant_expr_p (const_tree decl) case BUILT_IN_FUNCTION: case BUILT_IN_LINE: + /* The following built-ins are valid in constant expressions + when their arguments are. */ + case BUILT_IN_ADD_OVERFLOW_P: + case BUILT_IN_SUB_OVERFLOW_P: + case BUILT_IN_MUL_OVERFLOW_P: + /* These have constant results even if their operands are non-constant. */ case BUILT_IN_CONSTANT_P: |