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 63265


Hi,

On 11/11/2014 02:19 PM, Jason Merrill wrote:
On 11/11/2014 08:04 AM, Paolo Carlini wrote:
-    tree cond = RECUR (TREE_OPERAND (t, 0));
+    tree cond
+      = maybe_constant_value (fold_non_dependent_expr_sfinae
+                  (RECUR (TREE_OPERAND (t, 0)), tf_none));

I like this approach, but if the result of maybe_constant_value doesn't turn out to be an INTEGER_CST, we want to end up with the result of RECUR rather than the result of fold_non_dependent_expr, as the latter might not be suitable for subsequent tsubsting.
I see. Something like the below, then?

Thanks,
Paolo.

/////////////////

Attachment: patch_63265_3
Description: Text document


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