This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi,today I wanted to simply close this Bug as fixed, but then I noticed that Richard Smith in the audit trail argued, correctly in my opinion, that we should accept things like:
constexpr const char* x() { return __func__; }in C++11 mode too, because the "as if" local variable specification of __func__ in the Standard doesn't matter for the purpose of constexpr, because otherwise in C++11 no constexpr function would be valid: the Standard does *not* say that __func__ is only predefined if it is used.
That said, I think a quick way to accept __func__, __FUNCTION__, and __PRETTY_FUNCTION__ is checking whether DECL_ARTIFICIAL (decl) is true on the decl. Tested x86_64-linux.
Thanks, Paolo. ///////////////////
Attachment:
CL_55425
Description: Text document
Attachment:
patch_55425
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |