check that _Generic match 'signed long int' as 'long'
This commit is contained in:
parent
a4cd2805f9
commit
23064b1734
2 changed files with 4 additions and 0 deletions
|
@ -27,6 +27,7 @@ typedef int int_type1;
|
|||
int main()
|
||||
{
|
||||
int i = 0;
|
||||
signed long int l = 2;
|
||||
struct b titi;
|
||||
const int * const ptr;
|
||||
const char *ti;
|
||||
|
@ -57,5 +58,7 @@ int main()
|
|||
printf("%d\n", i);
|
||||
printf("%s\n", _Generic(i + 2L, long: "long", int: "int",
|
||||
long long: "long long"));
|
||||
i = _Generic(l, long: 1, int: 2);
|
||||
printf("%d\n", i);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -10,3 +10,4 @@
|
|||
3
|
||||
4
|
||||
long
|
||||
1
|
Loading…
Reference in a new issue