This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55425] constexpr does not work in many situations (both built-in and user supplied literals)
- From: "richard-gccbugzilla at metafoo dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 01 Jul 2013 06:13:54 +0000
- Subject: [Bug c++/55425] constexpr does not work in many situations (both built-in and user supplied literals)
- Auto-submitted: auto-generated
- References: <bug-55425-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55425
Richard Smith <richard-gccbugzilla at metafoo dot co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |richard-gccbugzilla@metafoo
| |.co.uk
--- Comment #6 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
(In reply to Jonathan Wakely from comment #1)
> The standard says __func__ is a function-local variable, defined as if by
>
> constexpr const char* x() {
> static const char __func__[] = "function-name ";
> return __func__;
> }
>
> Clearly this is not a valid constexpr function.
> Changing this would be an extension.
I disagree with this. The standard doesn't say __func__ is only predefined if
it is used, so if this argument held then all constexpr functions would be
invalid.