8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-__func__.C
Paolo Carlini 0162cb3bb7 re PR c++/55425 (constexpr does not work in many situations (both built-in and user supplied literals))
/cp
2014-11-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55425
	* constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
	and __PRETTY_FUNCTION__.

/testsuite
2014-11-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55425
	* g++.dg/cpp0x/constexpr-__func__.C

From-SVN: r217788
2014-11-19 17:40:42 +00:00

7 lines
211 B
C

// PR c++/55425
// { dg-do compile { target c++11 } }
constexpr const char* x() { return __func__; }
constexpr const char* y() { return __FUNCTION__; }
constexpr const char* z() { return __PRETTY_FUNCTION__; }