]> git.saurik.com Git - bison.git/commitdiff
tests: GCC 4.5 compliance.
authorAkim Demaille <demaille@gostai.com>
Wed, 12 Aug 2009 14:18:12 +0000 (16:18 +0200)
committerAkim Demaille <demaille@gostai.com>
Wed, 12 Aug 2009 14:30:52 +0000 (16:30 +0200)
* tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
messages about #error.

ChangeLog
tests/synclines.at

index 7f3e157ff9e2dffb00701bbb0be3fff0ce24744c..052ac7c87490e168ec5979faf179676668b938b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-12  Akim Demaille  <demaille@gostai.com>
+
+       tests: GCC 4.5 compliance.
+       * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
+       messages about #error.
+
 2009-08-12  Akim Demaille  <demaille@gostai.com>
 
        build: fix the generation of the documentation.
index 8653b460e5b0d8895904b5ab749dc63db9f6d170..56efdac66b39d9806c8c9eeb392868c3de604092 100644 (file)
@@ -34,7 +34,18 @@ m4_define([AT_SYNCLINES_COMPILE],
 # =>
 #   input.y:4: #error "4"
 #
-AT_CHECK([[sed -e 's/^\([^:]*:[^:.]*\)[.:][^:]*:\(.*\)$/\1:\2/' -e 's/^\([^:]*:[^:]*:\)[^@%:@]*\( @%:@error\)/\1\2/' stderr]], 0, [stdout])
+# It may also issue more context information:
+#
+#   input.y: In function 'yyparse':
+#   input.y:8: #error "8"
+# =>
+#   input.y:4: #error "8"
+#
+AT_CHECK([[sed -e 's/^\([^:]*:[^:.]*\)[.:][^:]*:\(.*\)$/\1:\2/'      \
+               -e 's/^\([^:]*:[^:]*:\)[^@%:@]*\( @%:@error\)/\1\2/'  \
+               -e "/^[^:]*: In function '[^\']*':$/d"                \
+            stderr]],
+         0, [stdout])
 ])
 
 # AT_TEST_SYNCLINE(TITLE, INPUT, ERROR-MSG)