public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109420] New: [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X'
@ 2023-04-05 13:53 ppalka at gcc dot gnu.org
2023-04-05 13:54 ` [Bug c++/109420] " ppalka at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-04-05 13:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109420
Bug ID: 109420
Summary: [13 Regression] lookup of 'struct T::X' at
instantiation time does not ignore non-type bindings
of 'X'
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppalka at gcc dot gnu.org
Target Milestone: ---
struct A {
struct X { };
int X;
};
template<class T>
void f() {
struct T::X x;
}
template void f<A>();
<stdin>: In instantiation of ‘void f() [with T = A]’:
<stdin>:11:20: required from here
<stdin>:8:15: error: ‘typename A::X’ names ‘int A::X’, which is not a type
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109420] [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X'
2023-04-05 13:53 [Bug c++/109420] New: [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' ppalka at gcc dot gnu.org
@ 2023-04-05 13:54 ` ppalka at gcc dot gnu.org
2023-04-05 13:58 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-04-05 13:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109420
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Known to fail| |13.0
Target Milestone|--- |13.0
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2023-04-05
Known to work| |12.2.0
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r13-6098-g46711ff8e60d64
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109420] [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X'
2023-04-05 13:53 [Bug c++/109420] New: [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' ppalka at gcc dot gnu.org
2023-04-05 13:54 ` [Bug c++/109420] " ppalka at gcc dot gnu.org
@ 2023-04-05 13:58 ` jakub at gcc dot gnu.org
2023-04-12 15:34 ` [Bug c++/109420] [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' since r13-6098-g46711ff8e60d64 ppalka at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-04-05 13:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109420
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Priority|P3 |P1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109420] [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' since r13-6098-g46711ff8e60d64
2023-04-05 13:53 [Bug c++/109420] New: [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' ppalka at gcc dot gnu.org
2023-04-05 13:54 ` [Bug c++/109420] " ppalka at gcc dot gnu.org
2023-04-05 13:58 ` jakub at gcc dot gnu.org
@ 2023-04-12 15:34 ` ppalka at gcc dot gnu.org
2023-04-13 20:02 ` cvs-commit at gcc dot gnu.org
2023-04-13 20:04 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-04-12 15:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109420
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
FWIW a candidate fix has been posted at
https://gcc.gnu.org/pipermail/gcc-patches/2023-April/615250.html and will
hopefully get reviewed/pushed later this week
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109420] [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' since r13-6098-g46711ff8e60d64
2023-04-05 13:53 [Bug c++/109420] New: [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' ppalka at gcc dot gnu.org
` (2 preceding siblings ...)
2023-04-12 15:34 ` [Bug c++/109420] [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' since r13-6098-g46711ff8e60d64 ppalka at gcc dot gnu.org
@ 2023-04-13 20:02 ` cvs-commit at gcc dot gnu.org
2023-04-13 20:04 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-13 20:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109420
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:50dc52e853ff267ad1f4c98571c262017b0536f8
commit r13-7173-g50dc52e853ff267ad1f4c98571c262017b0536f8
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu Apr 13 16:02:21 2023 -0400
c++: 'typename T::X' vs 'struct T::X' lookup [PR109420]
r13-6098-g46711ff8e60d64 made make_typename_type no longer ignore
non-types during the lookup, unless the TYPENAME_TYPE in question was
followed by the :: scope resolution operator. But there is another
exception to this rule: we need to ignore non-types during the lookup
also if the TYPENAME_TYPE was named with a tag other than 'typename',
such as 'struct' or 'enum', since in that case we're dealing with an
elaborated-type-specifier and so [basic.lookup.elab] applies. This
patch implements this additional exception.
PR c++/109420
gcc/cp/ChangeLog:
* decl.cc (make_typename_type): Also ignore non-types during the
lookup if tag_type corresponds to an elaborated-type-specifier.
* pt.cc (tsubst) <case TYPENAME_TYPE>: Pass class_type or
enum_type as tag_type to make_typename_type accordingly instead
of always passing typename_type.
gcc/testsuite/ChangeLog:
* g++.dg/template/typename27.C: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109420] [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' since r13-6098-g46711ff8e60d64
2023-04-05 13:53 [Bug c++/109420] New: [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' ppalka at gcc dot gnu.org
` (3 preceding siblings ...)
2023-04-13 20:02 ` cvs-commit at gcc dot gnu.org
@ 2023-04-13 20:04 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-04-13 20:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109420
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-13 20:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 13:53 [Bug c++/109420] New: [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' ppalka at gcc dot gnu.org
2023-04-05 13:54 ` [Bug c++/109420] " ppalka at gcc dot gnu.org
2023-04-05 13:58 ` jakub at gcc dot gnu.org
2023-04-12 15:34 ` [Bug c++/109420] [13 Regression] lookup of 'struct T::X' at instantiation time does not ignore non-type bindings of 'X' since r13-6098-g46711ff8e60d64 ppalka at gcc dot gnu.org
2023-04-13 20:02 ` cvs-commit at gcc dot gnu.org
2023-04-13 20:04 ` ppalka 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).