diff options
author | Marek Polacek <polacek@redhat.com> | 2019-06-19 21:27:45 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2019-06-19 21:27:45 +0000 |
commit | 1bf32c1141e230743f9248f7f7bf8aab91823df5 (patch) | |
tree | cf0c040fd768f2b12fa1f83eb56a3b2f9c9153ee /gcc/attribs.h | |
parent | 4b4a26731e96522a76a6f9fc6a253d41a29238ef (diff) |
PR c++/60364 - noreturn after first decl not diagnosed.
* attribs.c (get_attribute_namespace): No longer static.
(decl_attributes): Avoid shadowing. Preserve the C++11 form for C++11
attributes.
(attr_noreturn_exclusions): Make it extern.
* attribs.h (get_attribute_namespace): Declare.
* tree-inline.c (function_attribute_inlinable_p): Use
get_attribute_name.
* c-attribs.c (handle_noreturn_attribute): No longer static.
* c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
Declare.
* c-format.c (check_function_format): Use get_attribute_name.
* decl.c (duplicate_decls): Give an error when a function is
declared [[noreturn]] after its first declaration.
* parser.c (cp_parser_std_attribute): Don't treat C++11 noreturn
attribute as equivalent to GNU's.
* tree.c (std_attribute_table): Add noreturn.
* g++.dg/warn/noreturn-8.C: New test.
* g++.dg/warn/noreturn-9.C: New test.
* g++.dg/warn/noreturn-10.C: New test.
* g++.dg/warn/noreturn-11.C: New test.
From-SVN: r272486
Diffstat (limited to 'gcc/attribs.h')
-rw-r--r-- | gcc/attribs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/attribs.h b/gcc/attribs.h index 83ecbbbeec9..23a7321e04a 100644 --- a/gcc/attribs.h +++ b/gcc/attribs.h @@ -35,6 +35,7 @@ extern tree decl_attributes (tree *, tree, int, tree = NULL_TREE); extern bool cxx11_attribute_p (const_tree); extern tree get_attribute_name (const_tree); +extern tree get_attribute_namespace (const_tree); extern void apply_tm_attr (tree, tree); extern tree make_attribute (const char *, const char *, tree); |