This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79398] misleading error static constexpr member function called in a constant expression before its definition is complete
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Aug 2017 01:10:39 +0000
- Subject: [Bug c++/79398] misleading error static constexpr member function called in a constant expression before its definition is complete
- Auto-submitted: auto-generated
- References: <bug-79398-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79398
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-29
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #0)
> The error below is a bit confusing: the definition of B::bar() is complete
> when it's called.
>
> I think I understand that the reason for the error below is actually that
> the function is called before the definition of the class of which it's a
> member is complete. The error should make that clear, although it seems
> that accepting it (e.g., as an extension) would make static constexpr member
> functions quite a bit more useful.
Confirmed. If accepting it as an extension, sounds like material for
-fpermissive.