CompilerWarnings task does not catch C++ warnings

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-06-18T07:27:02Z
Lists: pgsql-hackers

Attachments

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.

Commits

  1. Apply COPT to CXXFLAGS as well