public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102300] New: Qualified name in class template
@ 2021-09-13 3:07 huangqinjin at gmail dot com
2021-09-13 3:18 ` [Bug c++/102300] [11/12 Regression] Qualified name of same template in class template is rejected pinskia at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: huangqinjin at gmail dot com @ 2021-09-13 3:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Bug ID: 102300
Summary: Qualified name in class template
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: huangqinjin at gmail dot com
Target Milestone: ---
template<typename T>
struct holder
{
template<typename F> struct fn {};
struct t1 : fn<T> {}; // pass
struct t2 : holder<T >::fn<T> {}; // fail
struct t3 : holder<T >::template fn<T> {}; // fail
struct t4 : holder<T*>::template fn<T> {}; // pass
};
The code compiles with GCC 10 but not GCC 11.
Output of x86-64 gcc 11.1 (Compiler #2)
<source>:7:35: error: expected class-name before '{' token
7 | struct t2 : holder<T >::fn<T> {}; // fail
| ^
<source>:8:44: error: expected class-name before '{' token
8 | struct t3 : holder<T >::template fn<T> {}; // fail
|
https://godbolt.org/z/qMav3YrYK
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [11/12 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
@ 2021-09-13 3:18 ` pinskia at gcc dot gnu.org
2021-09-13 15:51 ` [Bug c++/102300] [10/11/12 " ppalka at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-13 3:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Target Milestone|--- |11.3
Summary|Qualified name in class |[11/12 Regression]
|template |Qualified name of same
| |template in class template
| |is rejected
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [10/11/12 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
2021-09-13 3:18 ` [Bug c++/102300] [11/12 Regression] Qualified name of same template in class template is rejected pinskia at gcc dot gnu.org
@ 2021-09-13 15:51 ` ppalka at gcc dot gnu.org
2022-01-17 13:31 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-09-13 15:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Known to fail| |11.1.0, 11.2.0, 12.0
CC| |jason at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
Summary|[11/12 Regression] |[10/11/12 Regression]
|Qualified name of same |Qualified name of same
|template in class template |template in class template
|is rejected |is rejected
Target Milestone|11.3 |10.4
Status|UNCONFIRMED |NEW
Known to work| |10.3.0
Last reconfirmed| |2021-09-13
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r11-8035 (which was also backported to the 10 branch as r10-9851)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [10/11/12 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
2021-09-13 3:18 ` [Bug c++/102300] [11/12 Regression] Qualified name of same template in class template is rejected pinskia at gcc dot gnu.org
2021-09-13 15:51 ` [Bug c++/102300] [10/11/12 " ppalka at gcc dot gnu.org
@ 2022-01-17 13:31 ` rguenth at gcc dot gnu.org
2022-01-18 23:25 ` jason at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17 13:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
If 10.3.0 worked this makes it P1.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [10/11/12 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
` (2 preceding siblings ...)
2022-01-17 13:31 ` rguenth at gcc dot gnu.org
@ 2022-01-18 23:25 ` jason at gcc dot gnu.org
2022-01-20 3:42 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2022-01-18 23:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [10/11/12 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
` (3 preceding siblings ...)
2022-01-18 23:25 ` jason at gcc dot gnu.org
@ 2022-01-20 3:42 ` cvs-commit at gcc dot gnu.org
2022-01-20 4:19 ` [Bug c++/102300] [10/11 " jason at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-20 3:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:30f2c22def7392119f1ffaca30ef998b3b43f336
commit r12-6754-g30f2c22def7392119f1ffaca30ef998b3b43f336
Author: Jason Merrill <jason@redhat.com>
Date: Tue Jan 18 18:28:22 2022 -0500
c++: template-id with current inst qualifier [PR102300]
The patch for PR41723 properly changed one place to look into the current
instantiation; now we need to fix this place as well.
PR c++/102300
gcc/cp/ChangeLog:
* parser.cc (cp_parser_template_name): Use dependent_scope_p.
gcc/testsuite/ChangeLog:
* g++.dg/parse/no-typename1.C: Remove expected error.
* g++.dg/template/nested7.C: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [10/11 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
` (4 preceding siblings ...)
2022-01-20 3:42 ` cvs-commit at gcc dot gnu.org
@ 2022-01-20 4:19 ` jason at gcc dot gnu.org
2022-04-13 15:06 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2022-01-20 4:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11/12 Regression] |[10/11 Regression]
|Qualified name of same |Qualified name of same
|template in class template |template in class template
|is rejected |is rejected
Known to fail|12.0 |
Known to work| |12.0
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 12 so far.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [10/11 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
` (5 preceding siblings ...)
2022-01-20 4:19 ` [Bug c++/102300] [10/11 " jason at gcc dot gnu.org
@ 2022-04-13 15:06 ` jakub at gcc dot gnu.org
2022-05-12 22:24 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-04-13 15:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, this is only a P1 regression for 10.4, not for 11.3, because 11.1 and
11.2 had the bug too, while 10.3 didn't.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [10/11 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
` (6 preceding siblings ...)
2022-04-13 15:06 ` jakub at gcc dot gnu.org
@ 2022-05-12 22:24 ` cvs-commit at gcc dot gnu.org
2022-05-12 22:25 ` [Bug c++/102300] [11 " jason at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-12 22:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:c2e39b9e1568484192c3a4c2b4425b06e701a3fe
commit r10-10730-gc2e39b9e1568484192c3a4c2b4425b06e701a3fe
Author: Jason Merrill <jason@redhat.com>
Date: Thu May 12 17:08:52 2022 -0400
Revert "c++: friend with redundant qualification [PR41723]"
PR c++/102300
PR c++/41723
The patch for PR41723 caused PR102300 on trunk; let's just back it out on
the 10 branch.
This reverts commit e41d610696b81e72d1d06db176b281424e32fc23.
gcc/testsuite/ChangeLog:
* g++.dg/template/nested7.C: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [11 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
` (7 preceding siblings ...)
2022-05-12 22:24 ` cvs-commit at gcc dot gnu.org
@ 2022-05-12 22:25 ` jason at gcc dot gnu.org
2022-05-13 12:08 ` cvs-commit at gcc dot gnu.org
2022-05-13 12:11 ` jason at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2022-05-12 22:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11 Regression] |[11 Regression] Qualified
|Qualified name of same |name of same template in
|template in class template |class template is rejected
|is rejected |
Target Milestone|10.4 |11.4
Priority|P1 |P2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [11 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
` (8 preceding siblings ...)
2022-05-12 22:25 ` [Bug c++/102300] [11 " jason at gcc dot gnu.org
@ 2022-05-13 12:08 ` cvs-commit at gcc dot gnu.org
2022-05-13 12:11 ` jason at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-13 12:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:8d2f59c8e26960df81e054c7afd2ef63171bae05
commit r11-9991-g8d2f59c8e26960df81e054c7afd2ef63171bae05
Author: Jason Merrill <jason@redhat.com>
Date: Tue Jan 18 18:28:22 2022 -0500
c++: template-id with current inst qualifier [PR102300]
The patch for PR41723 properly changed one place to look into the current
instantiation; now we need to fix this place as well.
The fix for GCC 12 depends on r12-3643, so this commit also incorporates
some of those changes.
PR c++/102300
gcc/cp/ChangeLog:
* parser.c (cp_parser_template_name): Use dependent_scope_p.
gcc/testsuite/ChangeLog:
* g++.dg/parse/no-typename1.C: Remove expected error.
* g++.dg/template/nested7.C: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/102300] [11 Regression] Qualified name of same template in class template is rejected
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
` (9 preceding siblings ...)
2022-05-13 12:08 ` cvs-commit at gcc dot gnu.org
@ 2022-05-13 12:11 ` jason at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2022-05-13 12:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102300
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11.4.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-05-13 12:11 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
2021-09-13 3:18 ` [Bug c++/102300] [11/12 Regression] Qualified name of same template in class template is rejected pinskia at gcc dot gnu.org
2021-09-13 15:51 ` [Bug c++/102300] [10/11/12 " ppalka at gcc dot gnu.org
2022-01-17 13:31 ` rguenth at gcc dot gnu.org
2022-01-18 23:25 ` jason at gcc dot gnu.org
2022-01-20 3:42 ` cvs-commit at gcc dot gnu.org
2022-01-20 4:19 ` [Bug c++/102300] [10/11 " jason at gcc dot gnu.org
2022-04-13 15:06 ` jakub at gcc dot gnu.org
2022-05-12 22:24 ` cvs-commit at gcc dot gnu.org
2022-05-12 22:25 ` [Bug c++/102300] [11 " jason at gcc dot gnu.org
2022-05-13 12:08 ` cvs-commit at gcc dot gnu.org
2022-05-13 12:11 ` jason 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).