bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tests: fix syncline tests


From: Akim Demaille
Subject: tests: fix syncline tests
Date: Mon, 12 Nov 2018 07:35:46 +0100

commit 8d454b843c3a249abe828a9615209c6a9d8390ba
Author: Akim Demaille <address@hidden>
Date:   Sun Nov 11 19:28:40 2018 +0100

    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.

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 <iostream>
 #include <stdexcept>
 
-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 
\"\\\"\" ||




reply via email to

[Prev in Thread] Current Thread [Next in Thread]