This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 51312


Hi,

On 08/08/2014 11:18 PM, Jason Merrill wrote:
On 08/08/2014 04:52 PM, Paolo Carlini wrote:
+      else if (!TREE_CONSTANT (init))
+    {
+      if (complain & tf_warning_or_error)
+ pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing,
+             "narrowing conversion of %qE from %qT to %qT inside { }",
+             init, ftype, type);
+      ok = true;
+    }

We should only set ok to true if (complain & tf_warning_or_error); in SFINAE context we need to be strict.
Ok (that seems a latent buglet...). By the way, since I wondered briefly about SFINAE wrt the existing documentation, does what we do in the *non* constant case really matter for SFINAE?

Anyway, Ok if testing passes with that change?

Thanks,
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]