public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94984] New: rejects requires clause in array declaration
@ 2020-05-07 12:45 nathan at gcc dot gnu.org
2020-05-07 12:47 ` [Bug c++/94984] " nathan at gcc dot gnu.org
2020-05-07 19:31 ` nathan at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-05-07 12:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94984
Bug ID: 94984
Summary: rejects requires clause in array declaration
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nathan at gcc dot gnu.org
Target Milestone: ---
Daveed tells us we reject this (clang & edg accept). gcc-9 and 10 reject it
(so not a regression)
template<int N>
char (*f(int i))[N] requires(sizeof(i) < 100) {}
dav.ii:2:21: error: expected initializer before 'requires'
2 | char (*f(int i))[N] requires(sizeof(i) < 100) {}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/94984] rejects requires clause in array declaration
2020-05-07 12:45 [Bug c++/94984] New: rejects requires clause in array declaration nathan at gcc dot gnu.org
@ 2020-05-07 12:47 ` nathan at gcc dot gnu.org
2020-05-07 19:31 ` nathan at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-05-07 12:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94984
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2020-05-07
Status|UNCONFIRMED |NEW
--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
silly write only comments:
Daveed tried the following, which we accept
template<int N>
char (*f(int i) requires(sizeof(i) < 100))[N] {}
(note how the trailing-requires-clause was moved to within the declarator) and
sure enough GCC accepts that.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/94984] rejects requires clause in array declaration
2020-05-07 12:45 [Bug c++/94984] New: rejects requires clause in array declaration nathan at gcc dot gnu.org
2020-05-07 12:47 ` [Bug c++/94984] " nathan at gcc dot gnu.org
@ 2020-05-07 19:31 ` nathan at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-05-07 19:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94984
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|nathan at gcc dot gnu.org |unassigned at gcc dot gnu.org
--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
I didn;t mean to grab this.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-07 19:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 12:45 [Bug c++/94984] New: rejects requires clause in array declaration nathan at gcc dot gnu.org
2020-05-07 12:47 ` [Bug c++/94984] " nathan at gcc dot gnu.org
2020-05-07 19:31 ` nathan 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).