check that _Generic match 'signed long int' as 'long'

master
Matthias Gatto 2017-07-25 17:57:47 +02:00
parent a4cd2805f9
commit 23064b1734
2 changed files with 4 additions and 0 deletions

View File

@ -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;
}

View File

@ -10,3 +10,4 @@
3
4
long
1