[Bug c++/85827] false positive for -Wunused-but-set-variable because of constexpr-if

2019-08-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/85827] false positive for -Wunused-but-set-variable because of constexpr-if

2019-08-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 --- Comment #5 from Marek Polacek --- Author: mpolacek Date: Fri Aug 16 20:40:36 2019 New Revision: 274587 URL: https://gcc.gnu.org/viewcvs?rev=274587&root=gcc&view=rev Log: PR c++/85827 g++.dg/cpp1z/constexpr-if29.C: New test. Added: trunk

[Bug c++/85827] false positive for -Wunused-but-set-variable because of constexpr-if

2019-08-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug c++/85827] false positive for -Wunused-but-set-variable because of constexpr-if

2018-05-18 Thread kretz at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 --- Comment #3 from Matthias Kretz --- But macros are different. They remove the code before the C++ parser sees it (at least as-if). One great improvement of constexpr-if over macros is that all the other branches are parsed and their syntax che

[Bug c++/85827] false positive for -Wunused-but-set-variable because of constexpr-if

2018-05-18 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 --- Comment #2 from Marc Glisse --- I think that's going to be hard. The same issue always existed with macros. The whole point of "if constexpr" is not to look at the other branches, as they may not even compile. Sure, some minimal "safe" attemp

[Bug c++/85827] false positive for -Wunused-but-set-variable because of constexpr-if

2018-05-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 Jonathan Wakely changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIR

[Bug c++/85827] false positive for -Wunused-but-set-variable because of constexpr-if

2018-05-18 Thread kretz at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 --- Comment #1 from Matthias Kretz --- Same issue for -Wunused-variable