Skip to content

Commit a8e14d5

Browse files
committed
Crangler: silence lexer build warnings
Some versions of compilers (combined with particular flex variants) will result in compiler warnings that we already silence for various others lexers.
1 parent cc8321e commit a8e14d5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/crangler/scanner.l

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ PreprocessorDirective {PreprocessorStart}[^\r\n]*
5454
static int isatty(int) { return 0; }
5555
#endif
5656

57+
#if defined _MSC_VER
58+
// signed/unsigned mismatch
59+
#pragma warning(disable:4365)
60+
// macro re-definition: flex conditonally defines INT32_MAX et al. and thus
61+
// they are set before library headers get to define them
62+
#pragma warning(disable:4005)
63+
#endif
64+
65+
#include <util/pragma_wsign_compare.def>
66+
#include <util/pragma_wnull_conversion.def>
5767
#include <util/pragma_wdeprecated_register.def>
5868

5969
#include <set>

0 commit comments

Comments
 (0)