From 472200eaab05102c86a904918921c8437c3e1274 Mon Sep 17 00:00:00 2001 From: borutr Date: Sun, 18 Jun 2006 19:33:25 +0000 Subject: [PATCH] - corrected test for __GNUC__ git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4239 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- support/regression/tests/structflexarray.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 */ -- 2.30.2