diff options
author | Martin Sebor <msebor@redhat.com> | 2018-02-27 22:28:21 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2018-02-27 15:28:21 -0700 |
commit | d4cfd486ebe3fadb7a67c53c24843770a1d8ba72 (patch) | |
tree | 62d47ef8a95d209046feec191ee55fbe477706c7 /gcc/print-tree.c | |
parent | 1c89478aef3ef9576f40013c3969179b3189ee95 (diff) | |
download | gcc-d4cfd486ebe3fadb7a67c53c24843770a1d8ba72.zip gcc-d4cfd486ebe3fadb7a67c53c24843770a1d8ba72.tar.gz gcc-d4cfd486ebe3fadb7a67c53c24843770a1d8ba72.tar.bz2 |
PR c++/83871 - wrong code for attribute const and pure on distinct template specializations
PR c++/83871 - wrong code for attribute const and pure on distinct template specializations
PR c++/83503 - [8 Regression] bogus -Wattributes for const and pure on function template specialization
gcc/ChangeLog:
PR c++/83871
* gcc/doc/invoke.texi (-Wmissing-attributes): New option.
* gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
gcc/c-family/ChangeLog:
PR c++/83871
* c.opt (-Wmissing-attributes): New option.
gcc/cp/ChangeLog:
PR c++/83871
PR c++/83503
* cp-tree.h (warn_spec_missing_attributes): New function.
((check_explicit_specialization): Add an argument. Call the above
function.
* decl.c (duplicate_decls): Avoid applying primary function template's
attributes to its explicit specializations.
cp/pt.c (warn_spec_missing_attributes): Define.
gcc/testsuite/ChangeLog:
PR c++/83871
PR c++/83503
* g++.dg/Wmissing-attributes.C: New test.
* g++.dg/ext/attr-const-pure.C: New test.
* g++.dg/ext/attr-const.C: New test.
* g++.dg/ext/attr-deprecated-2.C: New test.
* g++.dg/ext/attr-malloc-2.C: New test.
* g++.dg/ext/attr-malloc.C: New test.
* g++.dg/ext/attr-noinline-2.C: New test.
* g++.dg/ext/attr-noinline.C: New test.
* g++.dg/ext/attr-nonnull.C: New test.
* g++.dg/ext/attr-noreturn-2.C: New test.
* g++.dg/ext/attr-noreturn.C: New test.
* g++.dg/ext/attr-nothrow-2.C: New test.
* g++.dg/ext/attr-nothrow.C: New test.
* g++.dg/ext/attr-optimize.C: New test.
* g++.dg/ext/attr-pure.C: New test.
* g++.dg/ext/attr-returns-nonnull.C: New test.
* g++.dg/ext/attr-warning.C: New test.
From-SVN: r258045
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r-- | gcc/print-tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c index cba8bac..caf5f26 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -377,6 +377,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent, fputs (" function-specific-opt", file); if (code == FUNCTION_DECL && DECL_DECLARED_INLINE_P (node)) fputs (" autoinline", file); + if (code == FUNCTION_DECL && DECL_UNINLINABLE (node)) + fputs (" uninlinable", file); if (code == FUNCTION_DECL && DECL_BUILT_IN (node)) fputs (" built-in", file); if (code == FUNCTION_DECL && DECL_STATIC_CHAIN (node)) |