[Top][All Lists]

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

Re: testsuite failure: multiple languages

From: Ralf Wildenhues
Subject: Re: testsuite failure: multiple languages
Date: Fri, 10 Apr 2009 08:41:48 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

* Ralf Wildenhues wrote on Mon, Mar 30, 2009 at 08:28:45PM CEST:
> * Eric Blake wrote on Mon, Mar 30, 2009 at 07:37:26PM CEST:
> > 'make -C tests maintainer-check-c++' fails the 'Multiple languages' test,
> > since you can't use C++ to compile a C-only program.  Generally, autoconf
> > tries to allow the use of a C++ compiler in place of a C compiler (that
> > is, most of autoconf tries to target the intersection of the two
> > languages, rather than sticking with strict C), hence the
> > 'maintainer-check-c++' target.  But we need a way to skip this particular
> > test when CC is not a C compiler, and I don't have a good idea for it.
> Untested:
> In a separate script compiled and run before the main part
> of the test, have something like this (without any CXX stuff in there)?

Tested now.  OK?


    Skip `Multiple languages' test if CC is a C++ compiler.
    * tests/ (Multiple languages): Before starting the
    test proper, build and run a configure script that tests the
    C compiler only, and skips the test if this is found to be a
    C++ compiler.
    Report by Eric Blake.

diff --git a/tests/ b/tests/
index 6289960..6ca4ef4 100644
--- a/tests/
+++ b/tests/
@@ -203,6 +203,22 @@ 
 AT_SETUP([Multiple languages])
+# This test should be skipped if the C compiler is a C++ compiler.
+    #ifdef __cplusplus
+    choke me
+    #endif
+  ]])], [], AS_EXIT([77]))

reply via email to

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