From fbdb6bafe2be0f4e12b85dcb92641bb55078bf72 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 23 Mar 2016 17:51:56 +0000 Subject: re PR c++/69884 (warning: ignoring attributes on template argument) PR c++/69884 * c.opt (Wignored-attributes): New option. * pt.c (canonicalize_type_argument): Use OPT_Wignored_attributes. * doc/invoke.texi: Document -Wignored-attributes. * g++.dg/warn/Wignored-attributes-1.C: New test. * g++.dg/warn/Wignored-attributes-2.C: New test. From-SVN: r234433 --- gcc/doc/invoke.texi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/doc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 99ac11b..9e54bb7 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -267,7 +267,7 @@ Objective-C and Objective-C++ Dialects}. -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol -Wformat-security -Wformat-signedness -Wformat-y2k -Wframe-address @gol -Wframe-larger-than=@var{len} -Wno-free-nonheap-object -Wjump-misses-init @gol --Wignored-qualifiers -Wincompatible-pointer-types @gol +-Wignored-qualifiers -Wignored-attributes -Wincompatible-pointer-types @gol -Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol -Winit-self -Winline -Wno-int-conversion @gol -Wno-int-to-pointer-cast -Winvalid-memory-model -Wno-invalid-offsetof @gol @@ -3886,6 +3886,14 @@ even without this option. This warning is also enabled by @option{-Wextra}. +@item -Wignored-attributes @r{(C and C++ only)} +@opindex Wignored-attributes +@opindex Wno-ignored-attributes +Warn when an attribute is ignored. This is different from the +@option{-Wattributes} option in that it warns whenever the compiler decides +to drop an attribute, not that the attribute is either unknown, used in a +wrong place, etc. This warning is enabled by default. + @item -Wmain @opindex Wmain @opindex Wno-main -- cgit v1.1