Commit b2ca2504 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/67625 (some constexpr expressions rejected as enumerator value)

2017-10-10  Jakub Jelinek  <jakub@redhat.com>

	PR c++/67625
	* g++.dg/cpp0x/pr67625.C: New test.

From-SVN: r253617
parent c9a0dec5
2017-10-10 Jakub Jelinek <jakub@redhat.com>
PR c++/67625
* g++.dg/cpp0x/pr67625.C: New test.
PR middle-end/70887
* g++.dg/cpp0x/pr70887.C: New test.
......
// PR c++/67625
// { dg-do compile { target c++11 } }
constexpr unsigned short
bswap16 (unsigned short x)
{
return __builtin_bswap16 (x);
}
constexpr int a = bswap16 (1);
enum { b = a };
enum { c = __builtin_bswap16 (1) };
enum { d = bswap16 (1) };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment