* support/regression/tests/structflexarray.c: flexible array members
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 18 Jun 2006 18:48:25 +0000 (18:48 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 18 Jun 2006 18:48:25 +0000 (18:48 +0000)
  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
support/regression/tests/structflexarray.c

index 7db19ff33d7b8908576a867ad298004e1b72646e..426fe8bb9fa8755541c2f24908e6e85b2e66b727 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-18 Borut Razem <borut.razem AT siol.net>
+
+       * support/regression/tests/structflexarray.c: flexible array members
+         not supported by gcc < 3
+
 2006-06-18 Raphael Neider <rneider AT web.de>
 
        * src/SDCCsymt.c (initCSupport): change return type of divschar to
index 0c3bea241b8f484296cb7eab1fb9219783d8e7a7..b2162c1aba6a7d18d587967a3ee3344c16934432 100644 (file)
@@ -2,6 +2,8 @@
  */
 #include <testfwk.h>
 
+#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
 }