]> git.saurik.com Git - bison.git/commitdiff
tests: be robust to platforms that support UTF-8 even with LC_ALL=C
authorAkim Demaille <akim@lrde.epita.fr>
Tue, 10 Feb 2015 10:12:56 +0000 (11:12 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Tue, 10 Feb 2015 13:56:30 +0000 (14:56 +0100)
Because musl supports UTF-8 with LC_ALL=C, gcc produces:

  input.y: In function ‘yyparse’:

instead of:

  input.y: In function 'yyparse':

Reported by Ferdinand Thiessen.
http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00001.html

* tests/synclines.at (AT_SYNCLINES_COMPILE): Skip syncline tests when
we can't trust error messages issued about a function body.

THANKS
tests/synclines.at

diff --git a/THANKS b/THANKS
index 26bea0a76f05a9b0ca80c4e16df5ffac557b5eb1..32fc67f157a7928c7a698f8858a2814847be3ec1 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -48,6 +48,7 @@ Enrico Scholz             enrico.scholz@informatik.tu-chemnitz.de
 Eric Blake                ebb9@byu.net
 Evgeny Stambulchik        fnevgeny@plasma-gate.weizmann.ac.il
 Fabrice Bauzac            noon@cote-dazur.com
+Ferdinand Thiessen        ferdinand@fthiessen.de
 Florian Krohm             florian@edamail.fishkill.ibm.com
 Frank Heckenbach          frank@g-n-u.de
 Frans Englich             frans.englich@telia.com
index 00c2fc1d40e56ccf20731111501e2bd79877258f..b73ddcb46f1f1d224e88c49e0b96c4cc88142315 100644 (file)
@@ -136,12 +136,14 @@ EOF
 m4_define([AT_SYNCLINES_COMPILE],
 [# Check if we can trust location translation.
 AT_DATA([syncline.c],
-[[#error "1"
-int i; /* avoids -pedantic warning about an empty translation unit. */
+[[static void foo(void)
+{
+#error "3"
+}
 ]])
 
 _AT_SYNCLINES_COMPILE([syncline.c])
-AT_CHECK([[test "`cat stdout`" = 'syncline.c:1: @%:@error "1"' || exit 77]])
+AT_CHECK([[test "`cat stdout`" = 'syncline.c:3: @%:@error "3"' || exit 77]])
 
 # Then work for real.
 _AT_SYNCLINES_COMPILE([$1])