When compiling GCC Rust FE, clang gives the following warning:
/home/worker/buildworker/tiber-gcc-clang/build/gcc/rust/ast/rust-fmt.h:403:15: warning: 'collect_pieces' has C-linkage specified, but returns incomplete type 'FFIVec<Piece>' which could be incompatible with C [-Wreturn-type-c-linkage]
/home/worker/buildworker/tiber-gcc-clang/build/gcc/rust/ast/rust-fmt.h:406:15: warning: 'clone_pieces' has C-linkage specified, but returns incomplete type 'FFIVec<Piece>' which could be incompatible with C [-Wreturn-type-c-linkage]
I have raised this with GCC Rust folk on their Zulip chat and we
agreed the warning should be filtered out, at least fornow. It is
tracked as https://github.com/Rust-GCC/gccrs/issues/4441 so it is not
forgotten but even there it seems that the outcome may be we'd just
ignore the warning forever, as far as I can tell.
contrib/ChangeLog:
2026-02-24 Martin Jambor <mjambor@suse.cz>
* filter-clang-warnings.py (skip_warning): Skip warning
-Wreturn-type-c-linkage in rust/ast/rust-fmt.h. Fix indentation of
the entry for libiberty/sha1.c.
'm2/gm2-compiler-boot': ['-Wunused-'],
# Rust peopel promised to clean these warnings too
'rust/': ['-Wunused-private-field'],
- 'libiberty/sha1.c': ['-Wc23-extensions'],
+ # except perhaps for this one, see
+ # https://github.com/Rust-GCC/gccrs/issues/4441
+ 'rust/ast/rust-fmt.h': ['-Wreturn-type-c-linkage'],
+ 'libiberty/sha1.c': ['-Wc23-extensions'],
'libtool': ['']
}