diff options
author | Martin Sebor <msebor@redhat.com> | 2015-09-03 16:23:11 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2015-09-03 10:23:11 -0600 |
commit | 1807ffc1a51df83a3ad26ad1b56ef0bbe8a7e494 (patch) | |
tree | b48648309af44524f8927ac7e65ea6eb947a7d9e /gcc/cp/cp-tree.h | |
parent | 97875f4a942078f65739718c129b0b6289c4b43b (diff) | |
download | gcc-1807ffc1a51df83a3ad26ad1b56ef0bbe8a7e494.zip gcc-1807ffc1a51df83a3ad26ad1b56ef0bbe8a7e494.tar.gz gcc-1807ffc1a51df83a3ad26ad1b56ef0bbe8a7e494.tar.bz2 |
re PR c/66516 (missing diagnostic on taking the address of a builtin function)
gcc/ChangeLog
2015-09-03 Martin Sebor <msebor@redhat.com>
PR c/66516
* doc/extend.texi (Other Builtins): Document when the address
of a built-in function can be taken.
gcc/c-family/ChangeLog
2015-09-03 Martin Sebor <msebor@redhat.com>
PR c/66516
* c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
functions.
* c-common.c (reject_gcc_builtin): Define.
gcc/c/ChangeLog
2015-09-03 Martin Sebor <msebor@redhat.com>
PR c/66516
* c/c-typeck.c (convert_arguments, parser_build_unary_op)
(build_conditional_expr, c_cast_expr, convert_for_assignment)
(build_binary_op, _objc_common_truthvalue_conversion): Call
reject_gcc_builtin.
(c_decl_implicit): Define.
gcc/cp/ChangeLog
2015-09-03 Martin Sebor <msebor@redhat.com>
PR c/66516
* cp/cp-tree.h (mark_rvalue_use, decay_conversion): Add new
argument(s).
* cp/expr.c (mark_rvalue_use): Use new argument.
* cp/call.c (build_addr_func): Call decay_conversion with new
argument.
* cp/pt.c (convert_template_argument): Call reject_gcc_builtin.
* cp/typeck.c (decay_conversion): Use new argument.
(c_decl_implicit): Define.
gcc/testsuite/ChangeLog
2015-09-03 Martin Sebor <msebor@redhat.com>
PR c/66516
* g++.dg/addr_builtin-1.C: New test.
* gcc.dg/addr_builtin-1.c: New test.
From-SVN: r227458
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 4dee60c..784a616 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -5787,7 +5787,9 @@ extern tree create_try_catch_expr (tree, tree); /* in expr.c */ extern tree cplus_expand_constant (tree); -extern tree mark_rvalue_use (tree); +extern tree mark_rvalue_use (tree, + location_t = UNKNOWN_LOCATION, + bool = true); extern tree mark_lvalue_use (tree); extern tree mark_type_use (tree); extern void mark_exp_read (tree); @@ -6461,7 +6463,9 @@ extern tree cxx_alignas_expr (tree); extern tree cxx_sizeof_nowarn (tree); extern tree is_bitfield_expr_with_lowered_type (const_tree); extern tree unlowered_expr_type (const_tree); -extern tree decay_conversion (tree, tsubst_flags_t); +extern tree decay_conversion (tree, + tsubst_flags_t, + bool = true); extern tree build_class_member_access_expr (tree, tree, tree, bool, tsubst_flags_t); extern tree finish_class_member_access_expr (tree, tree, bool, |