[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2014-01-03 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 --- Comment #12 from Marc Glisse --- Author: glisse Date: Fri Jan 3 21:12:48 2014 New Revision: 206325 URL: http://gcc.gnu.org/viewcvs?rev=206325&root=gcc&view=rev Log: 2014-01-03 Marc Glisse PR c++/58950 gcc/cp/ * cvt.c (convert_to_

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2014-01-03 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 --- Comment #11 from Marc Glisse --- (In reply to Jason Merrill from comment #10) > (In reply to Marc Glisse from comment #7) > > The __builtin_shuffle part of the patch seems fine. > > Yes, that looks right. That fixes the bug, yes? It fixes t

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2014-01-02 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #10

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-30 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 --- Comment #9 from Eric Botcazou --- > What I meant was, there are many places in the front-end that do: > > if (TREE_SIDE_EFFECTS (op0)) op0 = save_expr (op0); > > and I'd like to replace it with > > op0 = maybe_save_expr (op0); > > that wou

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-30 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 --- Comment #8 from Marc Glisse --- (In reply to Eric Botcazou from comment #5) > > For __builtin_shuffle, the issue is that we now call save_expr, which always > > sets TREE_SIDE_EFFECTS to 1. I don't know if it would make sense to > > introduce

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-30 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 --- Comment #7 from Marc Glisse --- Created attachment 31342 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31342&action=edit patch The __builtin_shuffle part of the patch seems fine. For (i+i), I first tried not setting TREE_NOWARNING on t

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-26 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 --- Comment #6 from Marc Glisse --- For: void f(){ int i = 2; (i+i); } we always set TREE_NOWARNING in finish_parenthesized_expr. The comment next to it says this is to avoid warning in c_common_truthvalue_conversion. If that's the only reas

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 Eric Botcazou changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org --- Comment

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-25 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 --- Comment #4 from Marc Glisse --- (In reply to Manuel López-Ibáñez from comment #3) > You could decorate __builtin_shuffle with attribute "warn_unused_result". It > is not the same, but it probably more precise. It would also warn for: > __built

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-25 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comment

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-25 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 --- Comment #2 from Marc Glisse --- For __builtin_shuffle, the issue is that we now call save_expr, which always sets TREE_SIDE_EFFECTS to 1. I don't know if it would make sense to introduce a maybe_save_expr that is equivalent to save_expr but do

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 Richard Biener changed: What|Removed |Added Priority|P3 |P1 Status|UNCONFIRMED

[Bug c++/58950] [4.9 Regression] Missing "statement has no effect"

2013-11-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58950 Richard Biener changed: What|Removed |Added Target Milestone|--- |4.9.0