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++-delayed-folding] Introduce convert_to_pointer_nofold


On 10/27/2015 01:50 PM, Marek Polacek wrote:
On Sun, Oct 25, 2015 at 04:49:08AM -1000, Jason Merrill wrote:
On 10/19/2015 05:33 AM, Marek Polacek wrote:
+	    if (fold_p)
+	      expr = fold_build1_loc (loc, NOP_EXPR, totype, expr);
+	    else
+	      expr = build1_loc (loc, NOP_EXPR, totype, expr);

Rather than duplicate code like this everywhere, maybe we should introduce a
maybe_fold_build1_loc macro that takes fold_p as an argument.

Good point.  Like the following?

Looks good.

Jason


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