From 8d454b843c3a249abe828a9615209c6a9d8390ba Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 11 Nov 2018 19:28:40 +0100 Subject: [PATCH] tests: fix syncline tests These tests are skipped with GCC: "\"".c:1:5: error: function declaration isn't a prototype [-Werror=strict-prototypes] int main() { return 0; } ^~~~ * tests/synclines.at: Stop writing C++ in C. * tests/local.at: Formatting changes. --- tests/local.at | 8 ++++---- tests/synclines.at | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/local.at b/tests/local.at index 0b37007f..460e08b6 100644 --- a/tests/local.at +++ b/tests/local.at @@ -940,11 +940,11 @@ m4_define([AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR], [[#include #include -void foo() +void foo () { try { - throw std::runtime_error("foo"); + throw std::runtime_error ("foo"); } catch (...) { @@ -953,11 +953,11 @@ void foo() } } -int main() +int main () { try { - foo(); + foo (); } catch (...) { diff --git a/tests/synclines.at b/tests/synclines.at index 392cd853..c0b16c7e 100644 --- a/tests/synclines.at +++ b/tests/synclines.at @@ -396,7 +396,7 @@ AT_BISON_OPTION_PUSHDEFS([%skeleton "$1"]) # properly to the linker, and is unable to save a file named this way. # Don't try with such compilers. AT_DATA([\"\\\"\".c], -[[int main() { return 0; } +[[int main (void) { return 0; } ]]) AT_CHECK([AT_CXX_IF([$CXX $CXXFLAGS], [$CC $CFLAGS]) $CPPFLAGS \"\\\"\".c -o \"\\\"\" ||