Fix test cases that used a non-brace-enclosed expression to initialize the first element of a union.

This is not permitted under standard C, and the previous commit caused this non-standard construct to stop working.
This commit is contained in:
Stephen Heumann 2016-10-14 20:21:43 -05:00
parent 05a0ce738a
commit 9558a88571
3 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ main ()
unsigned long ul1 = { 42959796 };
struct S struct1 = { 3, 3.3 };
union U union1 = 5;
union U union1 = { 5 };
enum E enum1 = c;
int i2 [2] = { 160, 140 }; /* define local arrays */

View File

@ -5,7 +5,7 @@ union U1 { int i;
float f; };
union U1 u1 = { 3 };
static union U1 u2 = 5;
static union U1 u2 = { 5 };
main ()
{

View File

@ -66,7 +66,7 @@ main ()
unsigned long ul1 = 0x11001100;
struct S s = { 5.5, 6.6 };
union U u = 4.5;
union U u = { 4.5 };
void (*funcPtr) (void);