[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2023-02-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 --- Comment #12 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:9944ca17c0766623bce260684edc614def7ea761 commit r13-6133-g9944ca17c0766623bce260684edc614def7ea761 Author: Jason Merrill Date: Fr

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 --- Comment #11 from Jonathan Wakely --- (In reply to Tadeus Prastowo from comment #7) > The code in question, which is simplified below to match the real use-case, > does not involve template specialization, and so, the quoted passage does > not

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread tadeus.prastowo at unitn dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 --- Comment #10 from Tadeus Prastowo --- Okay, I see it now. Thank you very much, Jakub, for your clear explanation.

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 --- Comment #9 from Jakub Jelinek --- That is the C++11 wording, e.g. the C++17 wording is: "a hypothetical instantiation of a template immediately following its definition would be ill-formed due to a construct that does not depend on a template

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 Jakub Jelinek changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread tadeus.prastowo at unitn dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 Tadeus Prastowo changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 --- Comment #5 from Jakub Jelinek --- This needs to be verified by our C++ language lawyers, but if: "If no valid specialization can be generated for a template definition, and that template is not instantiated, the template definition is ill-for

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread tadeus.prastowo at unitn dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 --- Comment #4 from Tadeus Prastowo --- My use-case is to use the instantiation of `struct X' to fire the static assert.

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 --- Comment #3 from Jakub Jelinek --- This might actually be invalid testcase with no diagnostics required though. Certainly no instantiations of X can be accepted.

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 --- Comment #2 from Jakub Jelinek --- It is the instantiation_dependent_r hunk in pt.c that breaks this: @@ -25361,7 +25486,10 @@ return NULL_TREE; case TEMPLATE_PARM_INDEX: - return *tp; + if (dependent_type_p (TREE_TYPE (

[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

2019-03-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741 Jakub Jelinek changed: What|Removed |Added Priority|P3 |P1 Status|UNCONFIRMED