-
Bug
-
Resolution: Unresolved
-
Medium
-
Code Generation Tools
-
CODEGEN-4244
-
Here's a cutdown from the above test that causes armcl to generate an error:
#include <climits>
struct S07 {
char m = 0;
template <class T> constexpr S07(int s, const T a[]) {
char max = CHAR_MIN;
int i = 0;
do
while (++i<s);
m = max;
}
};
int main()
{ constexpr char a07[10] = "hello2027"; constexpr S07 s07(9, a07); constexpr char g07 = s07.m; }The definition of 's07' calls the S07 constructor with the constexpr 'a07', but the compiler flags this as an error:
"p1.c", line 20: error: expression must have a constant value