public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/93503] [9/10/11/12 Regression] Duplicated warning on pure virtual template [not found] <bug-93503-4@http.gcc.gnu.org/bugzilla/> @ 2022-01-07 1:36 ` pinskia at gcc dot gnu.org 2022-01-07 1:44 ` pinskia at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-01-07 1:36 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93503 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |12.0, 4.4.6 Target Milestone|--- |9.5 Known to work| |4.1.2 Summary|Duplicated warning on pure |[9/10/11/12 Regression] |virtual implicit template |Duplicated warning on pure |in C++2a |virtual template --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Even without concepts we have a duplicated error message: struct S { template<int> virtual int foo(int) = 0; }; We once warn for the virtual and then again for the = 0 part. GCC 4.1.2 just to produce just: <source>:3: error: invalid use of 'virtual' in template declaration of 'virtual int S::foo(int)' While GCC 4.4 and above produce: <source>:3: error: templates may not be 'virtual' <source>:3: error: templates may not be 'virtual' So this is a regression even for the C++98 case. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/93503] [9/10/11/12 Regression] Duplicated warning on pure virtual template [not found] <bug-93503-4@http.gcc.gnu.org/bugzilla/> 2022-01-07 1:36 ` [Bug c++/93503] [9/10/11/12 Regression] Duplicated warning on pure virtual template pinskia at gcc dot gnu.org @ 2022-01-07 1:44 ` pinskia at gcc dot gnu.org 2022-01-21 13:43 ` [Bug c++/93503] [9/10/11/12 Regression] Duplicated error " rguenth at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-01-07 1:44 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93503 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For the reduced testcase this is what clang produces: <source>:3:5: error: 'virtual' cannot be specified on member function templates virtual int foo(int) = 0; ^~~~~~~~ <source>:3:17: error: illegal initializer (only variables can be initialized) virtual int foo(int) = 0; ^ MSVC: <source>(3): error C2898: 'int S::foo(int)': member function templates cannot be virtual <source>(3): error C2187: syntax error: 'constant' was unexpected here <source>(3): note: This diagnostic occurred in the compiler generated function 'int S::foo(int)' ICC: <source>(3): error: "virtual" is not allowed in a function template declaration virtual int foo(int) = 0; ^ <source>(3): error: expected a ";" virtual int foo(int) = 0; ^ Clang's error message is incorrect even because it says only variables can be initialized which is not true as virtual functions can be initilized to 0 so it can be considered a pure virtual. Maybe GCC's second error message could be changed to talk about pure virtual and such. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/93503] [9/10/11/12 Regression] Duplicated error on pure virtual template [not found] <bug-93503-4@http.gcc.gnu.org/bugzilla/> 2022-01-07 1:36 ` [Bug c++/93503] [9/10/11/12 Regression] Duplicated warning on pure virtual template pinskia at gcc dot gnu.org 2022-01-07 1:44 ` pinskia at gcc dot gnu.org @ 2022-01-21 13:43 ` rguenth at gcc dot gnu.org 2022-05-27 9:41 ` [Bug c++/93503] [10/11/12/13 " rguenth at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu.org @ 2022-01-21 13:43 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93503 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unknown |11.2.1 Priority|P3 |P2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/93503] [10/11/12/13 Regression] Duplicated error on pure virtual template [not found] <bug-93503-4@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2022-01-21 13:43 ` [Bug c++/93503] [9/10/11/12 Regression] Duplicated error " rguenth at gcc dot gnu.org @ 2022-05-27 9:41 ` rguenth at gcc dot gnu.org 2022-06-28 10:39 ` jakub at gcc dot gnu.org 2023-07-07 10:36 ` [Bug c++/93503] [11/12/13/14 " rguenth at gcc dot gnu.org 5 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu.org @ 2022-05-27 9:41 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93503 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|9.5 |10.4 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC 9 branch is being closed ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/93503] [10/11/12/13 Regression] Duplicated error on pure virtual template [not found] <bug-93503-4@http.gcc.gnu.org/bugzilla/> ` (3 preceding siblings ...) 2022-05-27 9:41 ` [Bug c++/93503] [10/11/12/13 " rguenth at gcc dot gnu.org @ 2022-06-28 10:39 ` jakub at gcc dot gnu.org 2023-07-07 10:36 ` [Bug c++/93503] [11/12/13/14 " rguenth at gcc dot gnu.org 5 siblings, 0 replies; 6+ messages in thread From: jakub at gcc dot gnu.org @ 2022-06-28 10:39 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93503 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|10.4 |10.5 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- GCC 10.4 is being released, retargeting bugs to GCC 10.5. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/93503] [11/12/13/14 Regression] Duplicated error on pure virtual template [not found] <bug-93503-4@http.gcc.gnu.org/bugzilla/> ` (4 preceding siblings ...) 2022-06-28 10:39 ` jakub at gcc dot gnu.org @ 2023-07-07 10:36 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu.org @ 2023-07-07 10:36 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93503 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|10.5 |11.5 --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC 10 branch is being closed. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-07 10:36 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-93503-4@http.gcc.gnu.org/bugzilla/> 2022-01-07 1:36 ` [Bug c++/93503] [9/10/11/12 Regression] Duplicated warning on pure virtual template pinskia at gcc dot gnu.org 2022-01-07 1:44 ` pinskia at gcc dot gnu.org 2022-01-21 13:43 ` [Bug c++/93503] [9/10/11/12 Regression] Duplicated error " rguenth at gcc dot gnu.org 2022-05-27 9:41 ` [Bug c++/93503] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:39 ` jakub at gcc dot gnu.org 2023-07-07 10:36 ` [Bug c++/93503] [11/12/13/14 " rguenth at gcc dot gnu.org
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).