[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
build: work around GCC warnings on Flex code
From: |
Akim Demaille |
Subject: |
build: work around GCC warnings on Flex code |
Date: |
Fri, 7 Sep 2018 06:49:50 +0200 |
Found on the CI.
commit 1dac131ec45ffa1e382319a94640c65bd10f6aa5
Author: Akim Demaille <address@hidden>
Date: Thu Sep 6 21:24:16 2018 +0200
build: work around GCC warnings on Flex code
See ef98967ada3c1cd48c177d7349e65a709bb49b97.
* src/flex-scanner.h: Disable -Wnull-dereference for GCC 6+.
diff --git a/src/flex-scanner.h b/src/flex-scanner.h
index e09a1c04..ac3b7338 100644
--- a/src/flex-scanner.h
+++ b/src/flex-scanner.h
@@ -45,7 +45,7 @@ int FLEX_PREFIX (lex_destroy) (void);
#define last_string FLEX_PREFIX (last_string)
// Pacify warnings in yy_init_buffer (observed with Flex 2.6.4 and GCC
-// 7.3.0).
+// 6.4.0 and 7.3.0).
//
// ./src/scan-skel.c: In function 'skel_restart':
// ./src/scan-skel.c:2035:20: error: potential null pointer dereference
[-Werror=null-dereference]
@@ -54,7 +54,7 @@ int FLEX_PREFIX (lex_destroy) (void);
// ./src/scan-skel.c:2031:19: error: potential null pointer dereference
[-Werror=null-dereference]
// b->yy_input_file = file;
// ~~~~~~~~~~~~~~~~~^~~~~~
-#if defined __GNUC__ && 7 <= __GNUC__
+#if defined __GNUC__ && 6 <= __GNUC__
# pragma GCC diagnostic ignored "-Wnull-dereference"
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- build: work around GCC warnings on Flex code,
Akim Demaille <=