mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 07:30:54 +00:00
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:
parent
05a0ce738a
commit
9558a88571
@ -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 */
|
||||
|
@ -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 ()
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user