public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
@ 2021-12-06 22:32 enolan at alumni dot cmu.edu
2021-12-06 22:42 ` [Bug c++/103593] [11/12 Regression] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: enolan at alumni dot cmu.edu @ 2021-12-06 22:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103593
Bug ID: 103593
Summary: Naming the constructor of a template class without
using the injected-class-name causes parse error with
C++20
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: enolan at alumni dot cmu.edu
Target Milestone: ---
This seems to be a GCC 11/12 regression.
https://godbolt.org/z/vTPs9reTW
Flags: -std=c++20
Code:
```
template <typename T>
class Foo {
public:
Foo<T>();
};
```
Result:
```
<source>:4:10: error: expected unqualified-id before ')' token
4 | Foo<T>();
| ^
```
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/103593] [11/12 Regression] Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
@ 2021-12-06 22:42 ` pinskia at gcc dot gnu.org
2021-12-07 9:44 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-06 22:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103593
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |10.3.0
Summary|Naming the constructor of a |[11/12 Regression] Naming
|template class without |the constructor of a
|using the |template class without
|injected-class-name causes |using the
|parse error with C++20 |injected-class-name causes
| |parse error with C++20
Target Milestone|--- |11.3
Known to fail| |11.1.0, 11.2.0, 12.0
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Could there be a defect report in this area?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/103593] [11/12 Regression] Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
2021-12-06 22:42 ` [Bug c++/103593] [11/12 Regression] " pinskia at gcc dot gnu.org
@ 2021-12-07 9:44 ` rguenth at gcc dot gnu.org
2021-12-07 13:54 ` ppalka at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-12-07 9:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103593
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/103593] [11/12 Regression] Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
2021-12-06 22:42 ` [Bug c++/103593] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-12-07 9:44 ` rguenth at gcc dot gnu.org
@ 2021-12-07 13:54 ` ppalka at gcc dot gnu.org
2021-12-07 14:08 ` ppalka at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-12-07 13:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103593
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
CC| |mpolacek at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-12-07
Keywords|needs-bisection |
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r11-532.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/103593] [11/12 Regression] Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
` (2 preceding siblings ...)
2021-12-07 13:54 ` ppalka at gcc dot gnu.org
@ 2021-12-07 14:08 ` ppalka at gcc dot gnu.org
2021-12-07 14:20 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-12-07 14:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103593
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
So I suppose CWG2237 means we're correct to reject this testcase in C++20 mode.
See also http://eel.is/c++draft/diff.cpp17.class#2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/103593] [11/12 Regression] Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
` (3 preceding siblings ...)
2021-12-07 14:08 ` ppalka at gcc dot gnu.org
@ 2021-12-07 14:20 ` mpolacek at gcc dot gnu.org
2022-04-28 10:16 ` pinskia at gcc dot gnu.org
2022-10-16 15:42 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-12-07 14:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103593
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Yup, just the diagnostic is really bad because I still haven't fixed bug 97202
:(
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/103593] [11/12 Regression] Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
` (4 preceding siblings ...)
2021-12-07 14:20 ` mpolacek at gcc dot gnu.org
@ 2022-04-28 10:16 ` pinskia at gcc dot gnu.org
2022-10-16 15:42 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-04-28 10:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103593
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |whisperity at gmail dot com
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 105419 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/103593] [11/12 Regression] Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
` (5 preceding siblings ...)
2022-04-28 10:16 ` pinskia at gcc dot gnu.org
@ 2022-10-16 15:42 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-16 15:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103593
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ky4ct at arrl dot net
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 107278 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-10-16 15:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
2021-12-06 22:42 ` [Bug c++/103593] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-12-07 9:44 ` rguenth at gcc dot gnu.org
2021-12-07 13:54 ` ppalka at gcc dot gnu.org
2021-12-07 14:08 ` ppalka at gcc dot gnu.org
2021-12-07 14:20 ` mpolacek at gcc dot gnu.org
2022-04-28 10:16 ` pinskia at gcc dot gnu.org
2022-10-16 15:42 ` pinskia 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).