Skip to content

Commit c11ebcf

Browse files
committed
Merge branch 'jc/c99-fam' into next
Require C99 style flexible array member support from all platforms. * jc/c99-fam: FLEX_ARRAY: require platforms to support the C99 syntax
2 parents 4f9b5a9 + 4d75f2a commit c11ebcf

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

git-compat-util.h

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -38,37 +38,8 @@ struct strbuf;
3838
DISABLE_WARNING(-Wsign-compare)
3939
#endif
4040

41-
#ifndef FLEX_ARRAY
42-
/*
43-
* See if our compiler is known to support flexible array members.
44-
*/
45-
46-
/*
47-
* Check vendor specific quirks first, before checking the
48-
* __STDC_VERSION__, as vendor compilers can lie and we need to be
49-
* able to work them around. Note that by not defining FLEX_ARRAY
50-
* here, we can fall back to use the "safer but a bit wasteful" one
51-
* later.
52-
*/
53-
#if defined(__SUNPRO_C) && (__SUNPRO_C <= 0x580)
54-
#elif defined(__GNUC__)
55-
# if (__GNUC__ >= 3)
56-
# define FLEX_ARRAY /* empty */
57-
# else
58-
# define FLEX_ARRAY 0 /* older GNU extension */
59-
# endif
60-
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
61-
# define FLEX_ARRAY /* empty */
62-
#endif
63-
64-
/*
65-
* Otherwise, default to safer but a bit wasteful traditional style
66-
*/
67-
#ifndef FLEX_ARRAY
68-
# define FLEX_ARRAY 1
69-
#endif
70-
#endif
71-
41+
#undef FLEX_ARRAY
42+
#define FLEX_ARRAY /* empty - weather balloon to require C99 FAM */
7243

7344
/*
7445
* BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.

0 commit comments

Comments
 (0)