bug-gnulib
[Top][All Lists]
Advanced

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

Re: no-c++


From: Simon Josefsson
Subject: Re: no-c++
Date: Mon, 10 Aug 2009 21:34:42 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

>> Is there a wide class of projects or operating systems that recommends
>> or suggests use of CC=c++ that I've missed?  I'm trying to understand
>> the origins of the CC=c++ notion.  Learning that may help me understand
>> the bigger picture.
>
> For example, when a project is considering switching from C to C++, or
> even just evaluating the difficulty of it, it is a common first step
> to make it compilable by either compiler.  It is common enough that
> even GCC supports a -Wc++-compat warning to tell you if you've strayed
> from the common subset.

Yes -- and my module "manywarnings" enables it, so I've seen the issues
it report on valid C code.  For the majority of my projects, I have had
to make an exception to disable it because it didn't work out well (it
created warnings I wouldn't want to fix).

> I'm very undecided, but I think I'm on Sam's side.  gt_NO_CXX is not
> even emitting a message to stdout, and even if it was saying
>
>   checking if ${CC} is a C++ compiler... yes/no
>
> it wouldn't look out-of-place in a configure script's output.

Right, that is not my main concern -- my main concerns are that

  1) We start to patch gnulib code so that it becomes valid C++ and I'm
  concerned that this makes the code more difficult to read and maintain
  and (less so) less efficient.  This already seems to happen to some
  extent though.

  OR

  2) That gnulib modules starts to depend on a module that causes
  problems for maintainers that don't care about it.

I'd prefer the approach where maintainers that want to support
C-compiled-as-C++ needs to import an extra gnulib module manually.  This
seems aligned with the approach that maintainers who want to support
pre-C89 compilers needs to import extra gnulib modules manually.

But I may be missing something...

/Simon




reply via email to

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