* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-object2.C
blobbd146adb702264885ba965fc2a7002ebf485bf9f
1 // { dg-do compile { target c++11 } }
3 constexpr int verysquare(int x) { return x * x; }
5 const double mass = 9.8;
6 constexpr double energy = mass * verysquare(56.6); // { dg-error "mass" }
8 int arr[(int)mass];             // { dg-error "" }
10 float array[verysquare(9)];         // OK -- not C99 VLA
12 extern const int medium;
13 const int high = verysquare(medium); // OK -- dynamic initialization
15 enum { Max = verysquare(7) };      // OK