2017-10-21 23:40:19 +00:00
|
|
|
/* Deviance Test 4.6.8.1: Ensure improper dropping of initializer braces */
|
|
|
|
/* is detected */
|
|
|
|
|
2022-10-17 22:50:42 +00:00
|
|
|
int printf(const char *, ...);
|
|
|
|
|
2017-10-21 23:40:19 +00:00
|
|
|
static int i1 [3] = 1, 2, 3; /* can't drop outer braces for arrays */
|
|
|
|
float f1 [2] = 3.1, 2.3; /* and structures */
|
|
|
|
|
|
|
|
struct S1 { char ch; float f; };
|
|
|
|
static struct S1 s1 = 'a', 3.3;
|
|
|
|
struct S1 s2 = 'b', 4.4;
|
|
|
|
|
|
|
|
struct S2 { comp c1 [3]; long L1 [2]; char ch; };
|
|
|
|
|
2022-10-17 22:50:42 +00:00
|
|
|
int main (void)
|
2017-10-21 23:40:19 +00:00
|
|
|
{
|
|
|
|
unsigned int ui1 [4] = 2, 3; /* can't drop outer braces for arrays */
|
|
|
|
struct S1 s3 = 'a', 3.3; /* and structures */
|
|
|
|
|
|
|
|
printf ("Failed Deviance Test 4.6.8.1\n");
|
|
|
|
}
|