This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66639] declare __func__ , __FUNCTION__ & __PRETTY_FUNCTION__ as constexpr
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 24 Jun 2015 13:29:46 +0000
- Subject: [Bug c++/66639] declare __func__ , __FUNCTION__ & __PRETTY_FUNCTION__ as constexpr
- Auto-submitted: auto-generated
- References: <bug-66639-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66639
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|5.1.1 |6.0
Summary|Feature request C++: mark |declare __func__ ,
|__func__ , __FUNCTION__ & |__FUNCTION__ &
|__PRETTY_FUNCTION__ as |__PRETTY_FUNCTION__ as
|constexpr |constexpr
--- Comment #4 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Simon Gleissner from comment #3)
> > If at all, this could only be provided as compiler extension.
>
> Good point. Yes, i think this would be a adequate solution.
>
> > (assuming making it constexpr doesn't break anything)
>
> ... which IMHO could only be tested safely with an optional compiler switch.
Due to past negative experiences, compiler extensions are only accepted under
very careful consideration and if they do not conflict with an existing (or
future) standard. Extensions accepted under an optional compiler switch are
even more rare: They add another very rarely tested point of failure and
increment the complexity of the compiler for very little benefit. The best
option is: create a tentative implementation, test it (by compiling and testing
GCC, libstdc++, boost, QT, Clang and other large C++ code bases) and propose
its standardization.