]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
contrib/filter-clang-warnings.py: Ignore a C++ compat warning in libiberty
authorMartin Jambor <mjambor@suse.cz>
Mon, 9 Mar 2026 13:01:00 +0000 (14:01 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Mon, 9 Mar 2026 13:05:27 +0000 (14:05 +0100)
When building GCC master with Clang, we were getting (and not
filtering out) warning:

/home/worker/buildworker/tiber-gcc-clang/build/libiberty/regex.c:3978:24: warning: implicit conversion from 'int' to enumeration type 'reg_errcode_t' is invalid in C++ [-Wimplicit-int-enum-cast]

The flag is a C++ compatibility warning and libiberty is a C library, so
I think we can ignore the warning.

contrib/ChangeLog:

2026-03-09  Martin Jambor  <mjambor@suse.cz>

* filter-clang-warnings.py (skip_warning): Also ingore
-Wimplicit-int-enum-cast in libiberty.

contrib/filter-clang-warnings.py

index b964ab6f1f4ad2443eb579dbeb8681d3a6347ec1..8eec366b4bc753274bedc2cdf9a74c0f76af0f2e 100755 (executable)
@@ -75,6 +75,7 @@ def skip_warning(filename, message):
             # except perhaps for this one, see
             # https://github.com/Rust-GCC/gccrs/issues/4441
             'rust/ast/rust-fmt.h': ['-Wreturn-type-c-linkage'],
+            'libiberty/': ["-Wimplicit-int-enum-cast"],
             'libiberty/sha1.c': ['-Wc23-extensions'],
             'libtool': ['']
     }