public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106729] New: Missing diagnostic for violation of 9.2.8.5
@ 2022-08-24 6:22 whh8b at obs dot cr
2022-08-24 11:52 ` [Bug c++/106729] " redi at gcc dot gnu.org
2022-08-24 12:45 ` whh8b at obs dot cr
0 siblings, 2 replies; 3+ messages in thread
From: whh8b at obs dot cr @ 2022-08-24 6:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106729
Bug ID: 106729
Summary: Missing diagnostic for violation of 9.2.8.5
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: whh8b at obs dot cr
Target Milestone: ---
According to 9.2.8.5 of the C++ standard, the following code should produce a
diagnostic:
void testing() {
return;
}
inline void testing();
int main() {
return 0;
}
I can confirm that clang++ v 14.0.0 produces the proper diagnostic.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/106729] Missing diagnostic for violation of 9.2.8.5
2022-08-24 6:22 [Bug c++/106729] New: Missing diagnostic for violation of 9.2.8.5 whh8b at obs dot cr
@ 2022-08-24 11:52 ` redi at gcc dot gnu.org
2022-08-24 12:45 ` whh8b at obs dot cr
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-08-24 11:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106729
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Will Hawkins from comment #0)
> According to 9.2.8.5 of the C++ standard,
The subclause numbers change with each revision of the standard, so although
"the C++ standard" is currently unambigously C++20, it's more helpful to state
which revision you're referring to, or use the stable tags. In C++20 9.2.8/5 is
[dcl.inline]/5, which says:
"If a definition of a function or variable is reachable at the point of its
first declaration as inline, the program is ill-formed."
This rule first appeared in C++11, added by <https://wg21.link/cwg317>, and we
already have a bug for that: PR 66995
*** This bug has been marked as a duplicate of bug 66995 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/106729] Missing diagnostic for violation of 9.2.8.5
2022-08-24 6:22 [Bug c++/106729] New: Missing diagnostic for violation of 9.2.8.5 whh8b at obs dot cr
2022-08-24 11:52 ` [Bug c++/106729] " redi at gcc dot gnu.org
@ 2022-08-24 12:45 ` whh8b at obs dot cr
1 sibling, 0 replies; 3+ messages in thread
From: whh8b at obs dot cr @ 2022-08-24 12:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106729
--- Comment #2 from Will Hawkins <whh8b at obs dot cr> ---
Thanks for the feedback, Jonathan. Sorry for the duplicate.
Will
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-24 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 6:22 [Bug c++/106729] New: Missing diagnostic for violation of 9.2.8.5 whh8b at obs dot cr
2022-08-24 11:52 ` [Bug c++/106729] " redi at gcc dot gnu.org
2022-08-24 12:45 ` whh8b at obs dot cr
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).