blob: 7c2b0045b8e6eec2c063ae5fdbbd204eda4cca8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/*
bug-1699804.c
*/
#include <testfwk.h>
static __code const char Str_global[] = "Hello1";
char s1, s2;
void
testFoo (void)
{
static __code const char str_local[] = "Hello2";
static char str1[sizeof (Str_global)];
static char str2[sizeof (str_local)]; // causes error 20: Undefined identifier 'str_local'
s1 = sizeof (Str_global);
s2 = sizeof (str_local); // no error and proper result when line causing error (above) is removed
ASSERT (s1 == 7);
ASSERT (s2 == 7);
}
|