X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Ftests%2Fstructflexarray.c;h=fb991337cb89d23bf8ab39223e0f1c0878addd74;hb=472200eaab05102c86a904918921c8437c3e1274;hp=b2162c1aba6a7d18d587967a3ee3344c16934432;hpb=56d25eb07cb0ebfbbf92a29d6579dce89214c887;p=fw%2Fsdcc diff --git a/support/regression/tests/structflexarray.c b/support/regression/tests/structflexarray.c index b2162c1a..fb991337 100644 --- a/support/regression/tests/structflexarray.c +++ b/support/regression/tests/structflexarray.c @@ -2,7 +2,7 @@ */ #include -#if __GNUC__ > 2 +#if !defined __GNUC__ || __GNUC__ > 2 /* flexible array members not supported by gcc < 3 */ struct str1 { @@ -17,8 +17,8 @@ struct str1 s12 = { 4, {5, 6, 7} }; /* different size */ static void testFlexibleArray1(void) { -#if __GNUC__ > 2 -/* flexible array members not supported by gcc < 3 */ +#if !defined __GNUC__ || __GNUC__ > 2 + /* flexible array members not supported by gcc < 3 */ /* test sizeof */ ASSERT(sizeof(s11) == 1); /* test allocation size */ @@ -31,7 +31,7 @@ testFlexibleArray1(void) /* test initialisation with string */ -#if __GNUC__ > 2 +#if !defined __GNUC__ || __GNUC__ > 2 /* flexible array members not supported by gcc < 3 */ struct str2 { @@ -46,8 +46,8 @@ struct str2 s22 = { 2, "sdcc is great" }; /* different size */ static void testFlexibleArray2(void) { -#if __GNUC__ > 2 -/* flexible array members not supported by gcc < 3 */ +#if !defined __GNUC__ || __GNUC__ > 2 + /* flexible array members not supported by gcc < 3 */ /* test sizeof */ ASSERT(sizeof(s21) == 2); /* test allocation size */