https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115325
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Robin Dapp <[email protected]>: https://gcc.gnu.org/g:c139a4c91829373e77dedf8bb62f9e4361fc56ab commit r16-5980-gc139a4c91829373e77dedf8bb62f9e4361fc56ab Author: Robin Dapp <[email protected]> Date: Fri Dec 5 10:55:18 2025 +0100 RISC-V: Pragma target [PR115325]. This implements #pragma GCC target () for riscv. All the functionality was already there so we only need to wrap existing functions. PR target/115325 gcc/ChangeLog: * config/riscv/riscv-c.cc (riscv_pragma_target_parse): New function. (riscv_register_pragmas): Register riscv_pragma_target_parse. * config/riscv/riscv-protos.h (riscv_process_target_attr_for_pragma): Declare. (riscv_reset_previous_fndecl): Ditto. * config/riscv/riscv-target-attr.cc (riscv_process_target_attr_for_pragma): New function. * config/riscv/riscv.cc (riscv_reset_previous_fndecl): Reset. (riscv_option_save): New function. (riscv_option_print): Ditto. (riscv_get_interrupt_type): Adjust docs. (TARGET_OPTION_SAVE): Implement. (TARGET_OPTION_PRINT): Ditto. * doc/extend.texi: Document that riscv can do target pragams. gcc/testsuite/ChangeLog: * gcc.target/riscv/pragma-target-1.c: New test. * gcc.target/riscv/pragma-target-2.c: New test.
