public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Rainer Orth <ro@cebitec.uni-bielefeld.de>,
	gcc-patches@gcc.gnu.org,     jason@redhat.com
Subject: Re: [PATCH] Fix -Wunused-var-35.C (was Re: [PATCH][C++] Improve compile-time by ordering expensive checks last)
Date: Thu, 25 Apr 2019 12:16:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.20.1904251355090.27537@zhemvz.fhfr.qr> (raw)
In-Reply-To: <20190425114839.GK21066@tucnak>

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

On Thu, 25 Apr 2019, Jakub Jelinek wrote:

> On Thu, Apr 25, 2019 at 01:39:02PM +0200, Richard Biener wrote:
> > > Regtested on x86_64-linux and i686-linux, ok for trunk?
> > 
> > The patch would be obvious but I wonder how the above can change 
> > anything...  (but I can reproduce with even only that change)
> 
> Haven't stepped through it in a debugger, but I bet it is the
> fold_non_dependent_expr call in null_ptr_cst_p which is done for C++98 only.
> That will mark it as TREE_USED in the end most likely and the
> earlier fix for the PR44648 issues, r249083, was also about not trying to
> fold the stuff early.

Ah, OK, that makes "sense" (well, it doesn't really make sense for
a function called null_ptr_cst_p to behave this way...)

Richard.

> > > 2019-04-25  Jakub Jelinek  <jakub@redhat.com>
> > > 
> > > 	PR c++/44648
> > > 	* g++.dg/warn/Wunused-var-35.C: Remove xfail.
> > > 
> > > --- gcc/testsuite/g++.dg/warn/Wunused-var-35.C.jj	2019-02-04 09:44:31.365413407 +0100
> > > +++ gcc/testsuite/g++.dg/warn/Wunused-var-35.C	2019-04-25 13:24:49.717065815 +0200
> > > @@ -11,9 +11,8 @@ int main()
> > >    else
> > >      return 1;
> > >  
> > > -  if (const bool b2 = 1) // { dg-warning "\\\[-Wunused-variable\\\]" "bug" { xfail c++98_only } }
> > > +  if (const bool b2 = 1) // { dg-warning "\\\[-Wunused-variable\\\]" }
> > >      return 0;
> > >    else
> > >      return 1;
> > >  }
> > > -
> 
> 	Jakub
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany;
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah; HRB 21284 (AG NÌrnberg)

  reply	other threads:[~2019-04-25 11:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 12:34 [PATCH][C++] Improve compile-time by ordering expensive checks last Richard Biener
2019-04-17 15:35 ` Richard Biener
2019-04-19  5:32   ` Jason Merrill
2019-04-25 11:27   ` Rainer Orth
2019-04-25 11:36     ` [PATCH] Fix -Wunused-var-35.C (was Re: [PATCH][C++] Improve compile-time by ordering expensive checks last) Jakub Jelinek
2019-04-25 11:48       ` Richard Biener
2019-04-25 11:55         ` Jakub Jelinek
2019-04-25 12:16           ` Richard Biener [this message]
2019-04-25 21:14       ` Jason Merrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.20.1904251355090.27537@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=ro@cebitec.uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).