Our baseline is gcc 8.4.
#include "MurmurHash2.h"
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
//-----------------------------------------------------------------------------
// Platform-specific functions and macros
{%- endmacro -%}
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "all-units.h"
#include "conf-parser.h"
# define _alloc_(...) __attribute__((__alloc_size__(__VA_ARGS__)))
#endif
-#if __GNUC__ >= 7 || (defined(__clang__) && __clang_major__ >= 10)
-# define _fallthrough_ __attribute__((__fallthrough__))
-#else
+#if defined(__clang__) && __clang_major__ < 10
# define _fallthrough_
+#else
+# define _fallthrough_ __attribute__((__fallthrough__))
#endif
#define XSTRINGIFY(x) #x
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "homed-conf.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include <sys/socket.h>
#include "conf-parser.h"
# include <endian.h> /* attempt to define endianness */
#endif
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
/*
* My best guess at if you are big-endian or little-endian. This may
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "logind.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "bareudp.h"
#include "batadv.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "networkd-address-label.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <netinet/icmp6.h>
#include <stddef.h>
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "nspawn-settings.h"
print("""\
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \\"-Wimplicit-fallthrough\\"")
-#endif
%}""")
print("""\
struct {}_name {{ const char* name; int id; }};
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "resolved-conf.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "timesyncd-conf.h"
awk '
BEGIN {
print "%{\n\
-#if __GNUC__ >= 7\n\
_Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\
-#endif\n\
%}"
print "struct key_name { const char* name; unsigned short id; };"
print "%null-strings"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "ethtool-util.h"
print("""\
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \\"-Wimplicit-fallthrough\\"")
-#endif
%}""")
print(f"""\
struct {name}_name {{ const char* name; int id; }};