* support/regression/tests/structflexarray.c: flexible array members
[fw/sdcc] / support / regression / tests / structflexarray.c
index fb991337cb89d23bf8ab39223e0f1c0878addd74..2cfdd9d9ad8a64716116eb1c64ebfe4388f0957b 100644 (file)
@@ -2,7 +2,7 @@
  */
 #include <testfwk.h>
 
-#if !defined __GNUC__ || __GNUC__ > 2
+#if !defined __GNUC__ || __GNUC__ >= 3
 /* flexible array members not supported by gcc < 3 */
 struct str1
 {
@@ -17,7 +17,7 @@ struct str1 s12 = { 4, {5, 6, 7} }; /* different size */
 static void
 testFlexibleArray1(void)
 {
-#if !defined __GNUC__ || __GNUC__ > 2
+#if !defined __GNUC__ || __GNUC__ >= 3
   /* flexible array members not supported by gcc < 3 */
   /* test sizeof */
   ASSERT(sizeof(s11) == 1);
@@ -31,7 +31,7 @@ testFlexibleArray1(void)
 
 /* test initialisation with string */
 
-#if !defined __GNUC__ || __GNUC__ > 2
+#if !defined __GNUC__ || __GNUC__ >= 3
 /* flexible array members not supported by gcc < 3 */
 struct str2
 {
@@ -46,7 +46,7 @@ struct str2 s22 = { 2, "sdcc is great" }; /* different size */
 static void
 testFlexibleArray2(void)
 {
-#if !defined __GNUC__ || __GNUC__ > 2
+#if !defined __GNUC__ || __GNUC__ >= 3
   /* flexible array members not supported by gcc < 3 */
   /* test sizeof */
   ASSERT(sizeof(s21) == 2);