[Bug c++/106729] Missing diagnostic for violation of 9.2.8.5
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 24 11:52:52 GMT 2022
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 ***
More information about the Gcc-bugs
mailing list