From 6053dcae59bee5d78ef0e541add9568673cfd025 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 29 May 2018 09:28:49 +0200 Subject: [PATCH] tests: adjust syncline tests to GCC 7 GCC 7 also underlines the error. syncline.c:4:2: error: #error "4" #error "4" ^~~~~ * tests/synclines.at (_AT_SYNCLINES_COMPILE): Remove tildas from GCC 7. --- tests/synclines.at | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/synclines.at b/tests/synclines.at index 985083b2..362fc73d 100644 --- a/tests/synclines.at +++ b/tests/synclines.at @@ -84,6 +84,12 @@ m4_define([_AT_SYNCLINES_COMPILE], # # Newer GCCs go further and if the function is declared static, complain # that it's not used. +# +# GCC 7 also underlines the error. +# +# syncline.c:4:2: error: #error "4" +# #error "4" +# ^~~~~ AT_CHECK([[$PERL -p -0777 - stderr <<\EOF # 1. Remove useless lines. @@ -93,8 +99,8 @@ AT_CHECK([[$PERL -p -0777 - stderr <<\EOF s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm; # Function context. s/^[^:]*: In function '[^']+':\n//gm; - # Caret error. - s/^ *#error.*\n *\^\n//gm; + # Caret error (with possible '~' to underline). + s/^ *#error.*\n *\^~*\n//gm; # Number of errors. s/^1 error generated\.\n//gm;