diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-06-17 21:49:49 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-06-17 21:49:49 +0200 |
commit | ce20977799be679bf8769522e94b72d32b781fde (patch) | |
tree | 73341ee471d2e43e911a83a87fc47007b162bf4b | |
parent | bf54f1234fed3a9968d2ff0425c1a5470d93367b (diff) | |
download | gcc-ce20977799be679bf8769522e94b72d32b781fde.zip gcc-ce20977799be679bf8769522e94b72d32b781fde.tar.gz gcc-ce20977799be679bf8769522e94b72d32b781fde.tar.bz2 |
tree.c (builtin_valid_in_constant_expr_p): Test for DECL_BUILT_IN_CLASS equal to BUILT_IN_NORMAL instead of just DECL_BUILT_IN.
* tree.c (builtin_valid_in_constant_expr_p): Test for
DECL_BUILT_IN_CLASS equal to BUILT_IN_NORMAL instead of just
DECL_BUILT_IN.
(bot_manip): Likewise.
* call.c (magic_varargs_p): Likewise.
From-SVN: r237563
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 | ||||
-rw-r--r-- | gcc/cp/tree.c | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e15b176..166ec2d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2016-06-17 Jakub Jelinek <jakub@redhat.com> + + * tree.c (builtin_valid_in_constant_expr_p): Test for + DECL_BUILT_IN_CLASS equal to BUILT_IN_NORMAL instead of just + DECL_BUILT_IN. + (bot_manip): Likewise. + * call.c (magic_varargs_p): Likewise. + 2016-06-17 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (grokfndecl): Change pair of errors to error + inform. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 475b380..b739fa0 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -7140,7 +7140,7 @@ magic_varargs_p (tree fn) if (flag_cilkplus && is_cilkplus_reduce_builtin (fn) != BUILT_IN_NONE) return 2; - if (DECL_BUILT_IN (fn)) + if (DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL) switch (DECL_FUNCTION_CODE (fn)) { case BUILT_IN_CLASSIFY_TYPE: diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 9ab964d..6010f63 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -341,7 +341,8 @@ cp_stabilize_reference (tree ref) bool builtin_valid_in_constant_expr_p (const_tree decl) { - if (!(TREE_CODE (decl) == FUNCTION_DECL && DECL_BUILT_IN (decl))) + if (!(TREE_CODE (decl) == FUNCTION_DECL + && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL)) /* Not a built-in. */ return false; switch (DECL_FUNCTION_CODE (decl)) @@ -2536,7 +2537,7 @@ bot_manip (tree* tp, int* walk_subtrees, void* data) /* builtin_LINE and builtin_FILE get the location where the default argument is expanded, not where the call was written. */ tree callee = get_callee_fndecl (*tp); - if (callee && DECL_BUILT_IN (callee)) + if (callee && DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL) switch (DECL_FUNCTION_CODE (callee)) { case BUILT_IN_FILE: |