[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948 --- Comment #7 from Jakub Jelinek --- Author: jakub Date: Mon Jan 9 16:24:19 2017 New Revision: 244228 URL: https://gcc.gnu.org/viewcvs?rev=244228&root=gcc&view=rev Log: PR c++/78948 * g++.dg/cpp1z/constexpr-if10.C: Fix PR numbe

[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-07 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948 --- Comment #5 from Jason Merrill --- Author: jason Date: Sun Jan 8 06:36:10 2017 New Revision: 244206 URL: https://gcc.gnu.org/viewcvs?rev=244206&root=gcc&view=rev Log: PR c++/78948 - instantiation from discarded statement * pa

[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948 --- Comment #3 from Jakub Jelinek --- Related questions: Are uses of deleted functions ok in discarded stmts? Should we warn about uses of deprecated functions/vars in discarded stmts? Shall we ever set DECL_ODR_USED on odr-used decls in discarde

[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948 --- Comment #2 from Jakub Jelinek --- During parsing, we call mark_used on the function to call, which in turn does instantiate_decl -> add_pending_template. So, shall we avoid calling mark_used from parser->in_discarded_stmt (we'd need to propag

[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948 Martin Sebor changed: What|Removed |Added Keywords||rejects-valid Status|UNCONFIR