public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65406] Wrong namespace in error message for missing "typename" in lambda parameter type list
[not found] <bug-65406-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-13 7:13 ` pinskia at gcc dot gnu.org
2024-04-14 0:24 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-13 7:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65406
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Severity|minor |enhancement
Keywords| |diagnostic
Last reconfirmed| |2021-08-13
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
We do get:
<source>:22:26: error: 'not_here::Bar::type' is not a type
22 | [](/*typename*/ Bar::type){};
| ^~~~
Note C++20 we accept the code as typename is not required here any more.
clang produces:
<source>:22:21: error: missing 'typename' prior to dependent type name
'Bar::type'
[](/*typename*/ Bar::type){};
^~~~~~~~~
typename
Confirmed.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/65406] Wrong namespace in error message for missing "typename" in lambda parameter type list
[not found] <bug-65406-4@http.gcc.gnu.org/bugzilla/>
2021-08-13 7:13 ` [Bug c++/65406] Wrong namespace in error message for missing "typename" in lambda parameter type list pinskia at gcc dot gnu.org
@ 2024-04-14 0:24 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-14 0:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65406
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2021-08-13 00:00:00 |2024-4-13
Keywords| |c++-lambda
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Outside of a template argument we do get the :
```
<source>:21:3: error: need 'typename' before 'here::Foo<T>::Bar::type' because
'here::Foo<T>::Bar' is a dependent scope
21 | Bar::type t;
| ^~~
```
But a method definition of a local class gives a bad diagnostic too:
```
<source>: In member function 'void here::Foo<T>::bad_error()':
<source>:22:7: error: invalid use of qualified-name 'not_here::Buzz<T>::type'
22 | f(Bar::type){};
| ^~~
```
That is for:
```
struct f{
f(Bar::type){};
};
```
inside here::Foo<T>::bad_error .
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-14 0:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-65406-4@http.gcc.gnu.org/bugzilla/>
2021-08-13 7:13 ` [Bug c++/65406] Wrong namespace in error message for missing "typename" in lambda parameter type list pinskia at gcc dot gnu.org
2024-04-14 0:24 ` 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).