public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [C++ PATCH] tiny code cleanup
@ 2018-01-02 14:50 Nathan Sidwell
  0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2018-01-02 14:50 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

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

[-- Attachment #2: lval.diff --]
[-- Type: text/x-patch, Size: 664 bytes --]

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-02 14:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-02 14:50 [C++ PATCH] tiny code cleanup Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).