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

John Baldwin
2016-11-30T16:23:34Z

On Wednesday, November 30, 2016 11:38:47 AM Pedro Alves wrote:
> On 11/24/2016 07:15 PM, John Baldwin wrote:
> > On Thursday, November 24, 2016 06:50:30 PM Pedro Alves wrote:
> >> On 11/24/2016 05:45 PM, John Baldwin wrote:
> >>
> >>> Ok. At the moment we don't have a clang-specific warning set, but if we
> >>> add one we can add this to that.
> >>
> >> We likely don't need one. Our infrustruture checks whether a
> >> warning works before enabling it. See gdb/warning.m4.
> >
> > Hmmm. The only odd case I can think of is -Wunused-function. Right now
> > clang triggers warnings when VEC() is used, so ideally -Wunused-function
>
> Yeah, I still believe that's a clang bug, and clang developers
> seem to agree:
>
> https://llvm.org/bugs/show_bug.cgi?id=22712

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.

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

--
John Baldwin