public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/80516] No error for bad type-specifier-seq in template parameter
[not found] <bug-80516-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-29 9:18 ` redi at gcc dot gnu.org
2020-04-29 9:22 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2020-04-29 9:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80516
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |robert at ocallahan dot org
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 94844 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/80516] No error for bad type-specifier-seq in template parameter
[not found] <bug-80516-4@http.gcc.gnu.org/bugzilla/>
2020-04-29 9:18 ` [Bug c++/80516] No error for bad type-specifier-seq in template parameter redi at gcc dot gnu.org
@ 2020-04-29 9:22 ` redi at gcc dot gnu.org
2020-04-30 7:09 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2020-04-29 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80516
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The warning has changed slightly since GCC 9:
80516.cc:6:3: warning: ‘signed’ specified with ‘u’ {aka ‘unsigned int’}
[-Wpedantic]
6 | S<signed u> s;
| ^~~~~~
This is emitted by grokdeclarator in gcc/cp/decl.c:
else if (!explicit_int && !defaulted_int
&& !explicit_char && !explicit_intN)
{
if (typedef_decl)
{
pedwarn (loc, OPT_Wpedantic, "%qs specified with %qT",
key, type);
ok = !flag_pedantic_errors;
}
else if (declspecs->decltype_p)
error_at (loc, "%qs specified with %<decltype%>", key);
else
error_at (loc, "%qs specified with %<typeof%>", key);
}
Maybe we can change it to an error by default, but allow it with -fpermissive.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/80516] No error for bad type-specifier-seq in template parameter
[not found] <bug-80516-4@http.gcc.gnu.org/bugzilla/>
2020-04-29 9:18 ` [Bug c++/80516] No error for bad type-specifier-seq in template parameter redi at gcc dot gnu.org
2020-04-29 9:22 ` redi at gcc dot gnu.org
@ 2020-04-30 7:09 ` pinskia at gcc dot gnu.org
2020-04-30 7:13 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-04-30 7:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80516
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #3)
> The warning has changed slightly since GCC 9:
>
> 80516.cc:6:3: warning: ‘signed’ specified with ‘u’ {aka ‘unsigned int’}
> [-Wpedantic]
> 6 | S<signed u> s;
> | ^~~~~~
That was because of PR 84701.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/80516] No error for bad type-specifier-seq in template parameter
[not found] <bug-80516-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-04-30 7:09 ` pinskia at gcc dot gnu.org
@ 2020-04-30 7:13 ` pinskia at gcc dot gnu.org
2023-08-22 20:42 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-04-30 7:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80516
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This extension has been in G++ since G++ was checked into a repo.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/80516] No error for bad type-specifier-seq in template parameter
[not found] <bug-80516-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-04-30 7:13 ` pinskia at gcc dot gnu.org
@ 2023-08-22 20:42 ` pinskia at gcc dot gnu.org
2023-08-22 20:42 ` pinskia at gcc dot gnu.org
2023-08-23 8:12 ` [Bug c++/80516] long, unsigned used with typedef names extension should either be removed or documented redi at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-22 20:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80516
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The error message with -pedantic is now:
<source>:7:3: error: 'signed' specified with typedef-name 'using u = unsigned
int' [-Wpedantic]
7 | S<signed u> s;
| ^~~~~~
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/80516] No error for bad type-specifier-seq in template parameter
[not found] <bug-80516-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2023-08-22 20:42 ` pinskia at gcc dot gnu.org
@ 2023-08-22 20:42 ` pinskia at gcc dot gnu.org
2023-08-23 8:12 ` [Bug c++/80516] long, unsigned used with typedef names extension should either be removed or documented redi at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-22 20:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80516
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrew.bell.ia at gmail dot com
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 111103 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/80516] long, unsigned used with typedef names extension should either be removed or documented
[not found] <bug-80516-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2023-08-22 20:42 ` pinskia at gcc dot gnu.org
@ 2023-08-23 8:12 ` redi at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-08-23 8:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80516
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2017-04-25 00:00:00 |2023-8-23
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #3)
> Maybe we can change it to an error by default, but allow it with
> -fpermissive.
I still think this is the right approach.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-08-23 8:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-80516-4@http.gcc.gnu.org/bugzilla/>
2020-04-29 9:18 ` [Bug c++/80516] No error for bad type-specifier-seq in template parameter redi at gcc dot gnu.org
2020-04-29 9:22 ` redi at gcc dot gnu.org
2020-04-30 7:09 ` pinskia at gcc dot gnu.org
2020-04-30 7:13 ` pinskia at gcc dot gnu.org
2023-08-22 20:42 ` pinskia at gcc dot gnu.org
2023-08-22 20:42 ` pinskia at gcc dot gnu.org
2023-08-23 8:12 ` [Bug c++/80516] long, unsigned used with typedef names extension should either be removed or documented redi 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).