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]

[C++ PATCH] tiny code cleanup


In working on c++/83160 I came across this use-once set-to-constant 'variable'. It made me go looking for a non-existent change to it, so I'm eliding it.

nathan
--
Nathan Sidwell
2018-01-02  Nathan Sidwell  <nathan@acm.org>

	* constexpr.c (cxx_bind_parameters_in_call): Remove unneeded local
	lval var.

Index: constexpr.c
===================================================================
--- constexpr.c	(revision 256070)
+++ constexpr.c	(working copy)
@@ -1291,8 +1291,7 @@ cxx_bind_parameters_in_call (const const
 	  x = ctx->object;
 	  x = build_address (x);
 	}
-      bool lval = false;
-      arg = cxx_eval_constant_expression (ctx, x, lval,
+      arg = cxx_eval_constant_expression (ctx, x, /*lval=*/false,
 					  non_constant_p, overflow_p);
       /* Don't VERIFY_CONSTANT here.  */
       if (*non_constant_p && ctx->quiet)

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