]> git.saurik.com Git - bison.git/commitdiff
tests: fix failures with G++ 4.8 in Flex scanner
authorAkim Demaille <akim@lrde.epita.fr>
Tue, 19 Feb 2013 16:42:33 +0000 (17:42 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Tue, 19 Feb 2013 16:42:33 +0000 (17:42 +0100)
* configure.ac (WARN_NO_NULL_CONVERSION_CXXFLAGS): Rename as...
(FLEX_SCANNER_CXXFLAGS): this.
Pass -Wno-zero-as-null-pointer-constant to G++ if it supports it.
* examples/calc++/local.mk: Adjust.

configure.ac
examples/calc++/local.mk

index 8f96e546f1179bd56d02db537b22fe130d233ed2..e6ef8baf91a3877b0e255816fc3a76f2a42d9228 100644 (file)
@@ -143,7 +143,9 @@ if test "$enable_gcc_warnings" = yes; then
     gl_WARN_ADD([$i], [WARN_CXXFLAGS_TEST])
   done
   # Clang++ 3.2+ reject C code generated by Flex.
-  gl_WARN_ADD([-Wno-null-conversion], [WARN_NO_NULL_CONVERSION_CXXFLAGS])
+  gl_WARN_ADD([-Wno-null-conversion], [FLEX_SCANNER_CXXFLAGS])
+  # So does G++ 4.8 in std=c++11 mode.
+  gl_WARN_ADD([-Wno-zero-as-null-pointer-constant], [FLEX_SCANNER_CXXFLAGS])
   CXXFLAGS=$save_CXXFLAGS
   AC_LANG_POP([C++])
 fi
index 6eb31f8919e9049ac0bee7e7f6b426e18d388376..b260001a0a7d4adabaf7da361dffb608416db535 100644 (file)
@@ -44,32 +44,31 @@ CLEANFILES +=                                   \
 # Avoid using BUILT_SOURCES which is too global.
 $(examples_calc___calc___OBJECTS): $(calc_sources_generated)
 
-calc_sources_extracted =                       \
-  examples/calc++/calc++-driver.cc             \
-  examples/calc++/calc++-driver.hh             \
-  examples/calc++/calc++-scanner.ll            \
+calc_sources_extracted =                        \
+  examples/calc++/calc++-driver.cc              \
+  examples/calc++/calc++-driver.hh              \
+  examples/calc++/calc++-scanner.ll             \
   examples/calc++/calc++.cc
-calc_extracted =                               \
-  $(calc_sources_extracted)                    \
+calc_extracted =                                \
+  $(calc_sources_extracted)                     \
   examples/calc++/calc++-parser.yy
 extracted += $(calc_extracted)
-calc_sources_generated =                       \
-  examples/calc++/calc++-parser.cc             \
-  examples/calc++/calc++-parser.hh             \
-  examples/calc++/location.hh                  \
-  examples/calc++/position.hh                  \
+calc_sources_generated =                        \
+  examples/calc++/calc++-parser.cc              \
+  examples/calc++/calc++-parser.hh              \
+  examples/calc++/location.hh                   \
+  examples/calc++/position.hh                   \
   examples/calc++/stack.hh
-calc_sources =                                 \
-  $(calc_sources_extracted)                    \
+calc_sources =                                  \
+  $(calc_sources_extracted)                     \
   $(calc_sources_generated)
 
 if BISON_CXX_WORKS
 check_PROGRAMS += examples/calc++/calc++
-nodist_examples_calc___calc___SOURCES =                \
+nodist_examples_calc___calc___SOURCES =         \
   $(calc_sources)
 
 examples_calc___calc___CPPFLAGS = -I$(top_builddir)/examples/calc++
-examples_calc___calc___CXXFLAGS =                      \
-  $(AM_CXXFLAGS) $(WARN_NO_NULL_CONVERSION_CXXFLAGS)
+examples_calc___calc___CXXFLAGS = $(AM_CXXFLAGS) $(FLEX_SCANNER_CXXFLAGS)
 dist_TESTS += examples/calc++/calc++.test
 endif