2017-10-21 23:40:19 +00:00
|
|
|
/* Conformance Test 2.5.0.5: Test characters comprising identifiers for */
|
|
|
|
/* unions */
|
|
|
|
main ()
|
|
|
|
{
|
|
|
|
union _____________________________________________9 {
|
|
|
|
|
|
|
|
int ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
|
|
|
|
_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZ\
|
|
|
|
abcdefghijklmnopqrstuvwxyz_____________01234567899876543210\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210;
|
|
|
|
|
|
|
|
long ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
|
|
|
|
_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZ\
|
|
|
|
abcdefghijklmnopqrstuvwxyz_____________01234567899876543210\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
0123456789987654321; } abcDEF, ABCdef;
|
|
|
|
|
|
|
|
union _____________________________________________9 s;
|
|
|
|
|
|
|
|
/* Assign and check 1st union field for each variable. */
|
|
|
|
abcDEF.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________01234567899876543210 = 26;
|
|
|
|
|
|
|
|
ABCdef.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________01234567899876543210 = 25;
|
|
|
|
|
|
|
|
s.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________01234567899876543210 = -5;
|
|
|
|
|
|
|
|
if (abcDEF.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________01234567899876543210 == \
|
|
|
|
ABCdef.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________01234567899876543210)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
if (abcDEF.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________01234567899876543210 == \
|
|
|
|
s.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________01234567899876543210)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
/* Assign and check 2nd union field for each variable. */
|
|
|
|
abcDEF.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321 = 2147483647;
|
|
|
|
|
|
|
|
ABCdef.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321 = 2147483646;
|
|
|
|
|
|
|
|
s.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321 = -2147483647;
|
|
|
|
|
|
|
|
if (abcDEF.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321 == \
|
|
|
|
ABCdef.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
if (abcDEF.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321 == \
|
|
|
|
s.\
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\
|
|
|
|
01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs\
|
|
|
|
tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\
|
|
|
|
Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
printf ("Passed Conformance Test 2.5.0.5\n");
|
|
|
|
return;
|
|
|
|
|
|
|
|
Fail:
|
|
|
|
printf ("Failed Conformance Test 2.5.0.5\n");
|
|
|
|
}
|