public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100459] New: [10/11 regression] constexpr decltype(auto) variable declaration bogus cv qual error
@ 2021-05-06 17:15 wjwray at gmail dot com
2021-05-06 17:37 ` [Bug c++/100459] " mpolacek at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: wjwray at gmail dot com @ 2021-05-06 17:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100459
Bug ID: 100459
Summary: [10/11 regression] constexpr decltype(auto) variable
declaration bogus cv qual error
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: wjwray at gmail dot com
Target Milestone: ---
GCC11 rejects:
constexpr decltype(auto) i = 0;
GCC>10 error: decltype(auto) cannot be cv-qualified
GCC<=10 accepts (Clang & MSVC too) https://godbolt.org/z/q75nMKvs8
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/100459] [10/11 regression] constexpr decltype(auto) variable declaration bogus cv qual error
2021-05-06 17:15 [Bug c++/100459] New: [10/11 regression] constexpr decltype(auto) variable declaration bogus cv qual error wjwray at gmail dot com
@ 2021-05-06 17:37 ` mpolacek at gcc dot gnu.org
2021-05-07 7:13 ` [Bug c++/100459] [10/11/12 " rguenth at gcc dot gnu.org
2021-06-30 19:16 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-05-06 17:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100459
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think that's a desirable change, implemented in r11-2202:
commit e7f0873a9c4ebccd078fc5330866efe0cd4c1309
Author: Marek Polacek <polacek@redhat.com>
Date: Wed Jul 8 19:45:34 2020 -0400
c++: Diagnose cv-qualified decltype(auto) [PR79815]
"If the placeholder is the decltype(auto) type-specifier, T shall be the
placeholder alone." but we weren't detecting "const decltype(auto)".
I've just expanded the existing diagnostic detecting "decltype(auto) &"
and similar.
gcc/cp/ChangeLog:
PR c++/79815
* decl.c (grokdeclarator): Detect cv-qual decltype(auto).
* pt.c (do_auto_deduction): Likewise.
gcc/testsuite/ChangeLog:
PR c++/79815
* g++.dg/cpp1y/auto-fn59.C: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/100459] [10/11/12 regression] constexpr decltype(auto) variable declaration bogus cv qual error
2021-05-06 17:15 [Bug c++/100459] New: [10/11 regression] constexpr decltype(auto) variable declaration bogus cv qual error wjwray at gmail dot com
2021-05-06 17:37 ` [Bug c++/100459] " mpolacek at gcc dot gnu.org
@ 2021-05-07 7:13 ` rguenth at gcc dot gnu.org
2021-06-30 19:16 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-07 7:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100459
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11 regression] |[10/11/12 regression]
|constexpr decltype(auto) |constexpr decltype(auto)
|variable declaration bogus |variable declaration bogus
|cv qual error |cv qual error
Target Milestone|--- |10.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/100459] [10/11/12 regression] constexpr decltype(auto) variable declaration bogus cv qual error
2021-05-06 17:15 [Bug c++/100459] New: [10/11 regression] constexpr decltype(auto) variable declaration bogus cv qual error wjwray at gmail dot com
2021-05-06 17:37 ` [Bug c++/100459] " mpolacek at gcc dot gnu.org
2021-05-07 7:13 ` [Bug c++/100459] [10/11/12 " rguenth at gcc dot gnu.org
@ 2021-06-30 19:16 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-06-30 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100459
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Closing as invalid.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-30 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 17:15 [Bug c++/100459] New: [10/11 regression] constexpr decltype(auto) variable declaration bogus cv qual error wjwray at gmail dot com
2021-05-06 17:37 ` [Bug c++/100459] " mpolacek at gcc dot gnu.org
2021-05-07 7:13 ` [Bug c++/100459] [10/11/12 " rguenth at gcc dot gnu.org
2021-06-30 19:16 ` mpolacek 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).