From 56d25eb07cb0ebfbbf92a29d6579dce89214c887 Mon Sep 17 00:00:00 2001 From: borutr Date: Sun, 18 Jun 2006 18:48:25 +0000 Subject: [PATCH] * support/regression/tests/structflexarray.c: flexible array members not supported by gcc < 3 * lib/variables.mk, lib/fetch.mk, sdcc-build-bootstrap.sh: use common ORIG tree with VPATH functionality git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4238 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ support/regression/tests/structflexarray.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7db19ff3..426fe8bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-06-18 Borut Razem + + * support/regression/tests/structflexarray.c: flexible array members + not supported by gcc < 3 + 2006-06-18 Raphael Neider * src/SDCCsymt.c (initCSupport): change return type of divschar to diff --git a/support/regression/tests/structflexarray.c b/support/regression/tests/structflexarray.c index 0c3bea24..b2162c1a 100644 --- a/support/regression/tests/structflexarray.c +++ b/support/regression/tests/structflexarray.c @@ -2,6 +2,8 @@ */ #include +#if __GNUC__ > 2 +/* flexible array members not supported by gcc < 3 */ struct str1 { char c; @@ -10,21 +12,27 @@ struct str1 struct str1 s11 = { 1, {2, 3} }; struct str1 s12 = { 4, {5, 6, 7} }; /* different size */ +#endif static void testFlexibleArray1(void) { +#if __GNUC__ > 2 +/* flexible array members not supported by gcc < 3 */ /* test sizeof */ ASSERT(sizeof(s11) == 1); /* test allocation size */ #if ! defined(PORT_HOST) ASSERT((char *) &s12 - (char *) &s11 == 1 + 4); #endif +#endif } /* test initialisation with string */ +#if __GNUC__ > 2 +/* flexible array members not supported by gcc < 3 */ struct str2 { short s; @@ -33,14 +41,18 @@ struct str2 struct str2 s21 = { 1, "sdcc" }; struct str2 s22 = { 2, "sdcc is great" }; /* different size */ +#endif static void testFlexibleArray2(void) { +#if __GNUC__ > 2 +/* flexible array members not supported by gcc < 3 */ /* test sizeof */ ASSERT(sizeof(s21) == 2); /* test allocation size */ #if ! defined(PORT_HOST) ASSERT((char *) &s22 - (char *) &s21 == 2 + 5); #endif +#endif } -- 2.47.2