This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Fix mismatched struct vs class tags.


On 11/30/2016 04:23 PM, John Baldwin wrote:

> Oh certainly.  My only point is that to get a -Werror clang build working
> I'd need a way to exclude -Wunused-function from WARNFLAGS for clang.  That's
> the part I wasn't sure how to handle.  I still need to see about adding
> -Wno-foo for some other clang-only warnings to trim other bits of noise from
> clang's build.

Yeah, I think we'd need to add some "is this clang?" check somehow.

> One other clangism is that clang warns about compiling a .c file in C++.
> It wants an explicit '-x c++' to force the language mode.  However, simply
> adding this to CXX_FLAGS doesn't work as it is included in both compiling
> and linking (and for the link it causes clang to try to parse all the object
> files as C++ source leading to bizarre errors).

Do you get the same when building GCC?  If not, how is this handled
over there?  Does clang have a way to suppress that warning?
Some -Wno-stop-complaining-about-c-file-in-cxx switch, perhaps?

> I assume a massive .c -> .cc
> (or .cxx, etc.) rename is not in the roadmap (it would presumably be very
> disruptive to pending patchsets)?

We briefly last discussed that here:

  https://sourceware.org/ml/gdb-patches/2016-09/msg00309.html

The quick consensus was "no".

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]