bug-gnulib
[Top][All Lists]
Advanced

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

Re: no-c++


From: Sam Steingold
Subject: Re: no-c++
Date: Mon, 10 Aug 2009 09:46:12 -0400

On Mon, Aug 10, 2009 at 6:28 AM, Simon Josefsson<address@hidden> wrote:
> Bruno Haible <address@hidden> writes:
>
>> Should the 'regex' module (and possibly other modules which require C
>> syntax) depend on the 'no-c++' module? We can open a poll on it.
>
> I don't understand the rationale for the no-c++ module, let alone making
> any other modules depend on it.
>
> What is the issue with compiling C code with a C compiler and C++ code
> with a C++ compiler?  That seems to be me the proper solution.

Some packages are compilable with both C (production) and C++ (extra
compilation time type checking and run-time verification for
debugging).
when such a package uses code from gnulib, it wants to compile it with
the compiler ($(CC)) it uses for the rest of the package, i.e., when
compiling with CC=C, it compiles the imported gnulib code with C, ahen
compiling with CC=C++, it compiles the imported gnulib code with with
C++.
when the imported gnulib code cannot be compiled with C++ (e.g.,
regexp), this causes problems.

> Compiling C code with a C++ compiler seems like a good recipe for
> problems, and I don't think it is something gnulib should force on users
> unless there is a compelling use-case.

the "forcing" goes the other way around.
the user of gnulib forces C++ on gnulib code, and gnulib should use
no-cxx (when necessary) to cope with it.



-- 
Sam Steingold <http://sds.podval.org>




reply via email to

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