https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95227
Bug ID: 95227 Summary: vec_extract doesn't mark input as used in C++ mode Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: e...@coeus-group.com Target Milestone: --- Pretty straightforward. With -maltivec -Wunused-but-set-parameter, this works in C but emits a diagnostic in C++: #include <altivec.h> int f(vector int b) { return vec_extract(b, 0); } FWIW, the same problem happens if b is a local variable not a parameter, though of course it will emit an unused-but-set-variable diagnostic instead.