aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2/94_generic.c
diff options
context:
space:
mode:
authorMatthias Gatto <uso.cosmo.ray@gmail.com>2017-07-25 17:57:47 +0200
committerMatthias Gatto <uso.cosmo.ray@gmail.com>2017-07-25 18:56:41 +0200
commit23064b17343b7222feae120c037cf43d196068da (patch)
tree11d33ee9c349c10762565e327cd10969fa20411a /tests/tests2/94_generic.c
parenta4cd2805f95e1369254762478883e91050f2cba1 (diff)
downloadtinycc-23064b17343b7222feae120c037cf43d196068da.tar.gz
tinycc-23064b17343b7222feae120c037cf43d196068da.tar.bz2
check that _Generic match 'signed long int' as 'long'
Diffstat (limited to 'tests/tests2/94_generic.c')
-rw-r--r--tests/tests2/94_generic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/tests2/94_generic.c b/tests/tests2/94_generic.c
index 4f989f0..d7fb5fc 100644
--- a/tests/tests2/94_generic.c
+++ b/tests/tests2/94_generic.c
@@ -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;
}