mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
tests: beware of additional warnings from GCC 5
* tests/synclines.at (AT_SYNCLINES_COMPILE): Avoid warnings about unused functions.
This commit is contained in:
@@ -81,7 +81,9 @@ m4_define([_AT_SYNCLINES_COMPILE],
|
||||
#
|
||||
# "input.yy", line 80.21: 1540-0218 (S) The call does not match any parameter list for "operator<<".
|
||||
# "/usr/vacpp/include/iosfwd", line 32.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
|
||||
|
||||
#
|
||||
# Newer GCCs go further and if the function is declared static, complain
|
||||
# that it's not used.
|
||||
AT_CHECK([[$PERL -p -0777 - stderr <<\EOF
|
||||
# 1. Remove useless lines.
|
||||
|
||||
@@ -136,14 +138,15 @@ EOF
|
||||
m4_define([AT_SYNCLINES_COMPILE],
|
||||
[# Check if we can trust location translation.
|
||||
AT_DATA([syncline.c],
|
||||
[[static void foo(void)
|
||||
[[void foo (void);
|
||||
void foo (void)
|
||||
{
|
||||
#error "3"
|
||||
#error "4"
|
||||
}
|
||||
]])
|
||||
|
||||
_AT_SYNCLINES_COMPILE([syncline.c])
|
||||
AT_CHECK([[test "`cat stdout`" = 'syncline.c:3: @%:@error "3"' || exit 77]])
|
||||
AT_CHECK([[test "`cat stdout`" = 'syncline.c:4: @%:@error "4"' || exit 77]])
|
||||
|
||||
# Then work for real.
|
||||
_AT_SYNCLINES_COMPILE([$1])
|
||||
|
||||
Reference in New Issue
Block a user