CompilerWarnings task does not catch C++ warnings
CompilerWarnings task does not catch C++ warnings
The CompilerWarnings task on Cirrus CI does not catch warnings in C++ code. It tries to make warnings fatal by passing COPT='-Werror', but that does not apply to C++ compilations. I suggest that we just add COPT to CXXFLAGS as well. I think passing -Werror is just about the only reasonable use of COPT nowadays, so making that more robust seems useful. I don't think there is a need for a separate make variable for C++ here.
Re: CompilerWarnings task does not catch C++ warnings
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut writes: > The CompilerWarnings task on Cirrus CI does not catch warnings in C++ > code. It tries to make warnings fatal by passing COPT='-Werror', but > that does not apply to C++ compilations. > I suggest that we just add COPT to CXXFLAGS as well. I think passing > -Werror is just about the only reasonable use of COPT nowadays, so > making that more robust seems useful. I don't think there is a need for > a separate make variable for C++ here. +1, but what about the meson side of things? regards, tom lane
Re: CompilerWarnings task does not catch C++ warnings
От:
Peter Eisentraut <peter@eisentraut.org>
Дата:
On 18.06.24 16:08, Tom Lane wrote:
> Peter Eisentraut writes:
>> The CompilerWarnings task on Cirrus CI does not catch warnings in C++
>> code. It tries to make warnings fatal by passing COPT='-Werror', but
>> that does not apply to C++ compilations.
>> I suggest that we just add COPT to CXXFLAGS as well. I think passing
>> -Werror is just about the only reasonable use of COPT nowadays, so
>> making that more robust seems useful. I don't think there is a need for
>> a separate make variable for C++ here.
>
> +1, but what about the meson side of things?
If you use meson {setup|configure} --werror, that would affect both C
and C++ compilers.
Re: CompilerWarnings task does not catch C++ warnings
От:
Andres Freund <andres@anarazel.de>
Дата:
Hi, On 2024-06-18 09:27:02 +0200, Peter Eisentraut wrote: > The CompilerWarnings task on Cirrus CI does not catch warnings in C++ code. > It tries to make warnings fatal by passing COPT='-Werror', but that does not > apply to C++ compilations. > > I suggest that we just add COPT to CXXFLAGS as well. I think passing > -Werror is just about the only reasonable use of COPT nowadays, so making > that more robust seems useful. I don't think there is a need for a separate > make variable for C++ here. +1 Greetings, Andres Freund