[Patch] Add OPT_Wattributes to ignored attributes on template args

Ryan Mansfield rmansfield@qnx.com
Tue Sep 29 20:46:00 GMT 2015


Hi,

In canonicalize_type_argument attributes are being discarded with a 
warning. Should it be added to OPT_Wattributes?

2015-09-29  Ryan Mansfield  <rmansfield@qnx.com>

         * pt.c (canonicalize_type_argument): Use OPT_Wattributes in 
warning.


Index: cp/pt.c
===================================================================
--- cp/pt.c	(revision 228265)
+++ cp/pt.c	(working copy)
@@ -6888,7 +6888,7 @@
    tree canon = strip_typedefs (arg, &removed_attributes);
    if (removed_attributes
        && (complain & tf_warning))
-    warning (0, "ignoring attributes on template argument %qT", arg);
+    warning (OPT_Wattributes, "ignoring attributes on template argument 
%qT", arg);
    return canon;
  }

Regards,

Ryan Mansfield



More information about the Gcc-patches mailing list