public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Richard Biener <rguenther@suse.de>
Cc: Marek Polacek <polacek@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] Add save_expr langhook (PR c/68513)
Date: Sat, 28 Nov 2015 16:19:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.10.1511281600370.8818@digraph.polyomino.org.uk> (raw)
In-Reply-To: <43651703-7ABE-491D-8D5B-863E921EA365@suse.de>

On Sat, 28 Nov 2015, Richard Biener wrote:

> Different approach: after the FE folds (unexpectedly?), scan the result 
> for SAVE_EXPRs and if found, drop the folding.

Or, if conversions are going to fold from language-independent code (which 
is the underlying problem here - a conversion without folding would be 
preferred once the fallout from that can be resolved), make the front end 
fold with c_fully_fold before doing the conversion, and wrap the result of 
the conversion in a C_MAYBE_CONST_EXPR with c_wrap_maybe_const in the same 
way as done in other places that fold early (if either c_fully_fold 
indicates it can't occur in a constant expression, or the result of 
folding / conversion is not an INTEGER_CST).

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2015-11-28 16:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 19:02 Marek Polacek
2015-11-27 19:36 ` Marek Polacek
2015-11-27 23:56 ` Joseph Myers
2015-11-30 12:58   ` Marek Polacek
2015-11-28  8:38 ` Richard Biener
2015-11-28 16:19   ` Joseph Myers [this message]
2015-11-30 15:41     ` Marek Polacek
2015-11-30 15:51   ` Marek Polacek
2015-11-30 16:00     ` Richard Biener
2015-11-30 16:06       ` Richard Biener

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.DEB.2.10.1511281600370.8818@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=polacek@redhat.com \
    --cc=rguenther@suse.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).