Hi,

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.

I'm committing this as "obvious" (sort of assuming the rules are a bit
more liberal in the contrib subdirectory).  Please let me know if you
disagree (either about the interpretation of the policy or the patch).

Thanks,

Martin



contrib/ChangeLog:

2026-03-09  Martin Jambor  <[email protected]>

        * filter-clang-warnings.py (skip_warning): Also ingore
        -Wimplicit-int-enum-cast in libiberty.
---
 contrib/filter-clang-warnings.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/filter-clang-warnings.py b/contrib/filter-clang-warnings.py
index b964ab6f1f4..8eec366b4bc 100755
--- a/contrib/filter-clang-warnings.py
+++ b/contrib/filter-clang-warnings.py
@@ -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': ['']
     }
-- 
2.52.0

Reply via email to