Skip to content

Commit 1323dec

Browse files
committed
arcv: apex: Register pragma handler after macro expansion.
Use "c_register_pragma_with_expansion()" instead of "c_register_pragma()" to ensure that "arcv_apex_pragma_intrinsic" is invoked with arguments that have been macro-expanded. This allows users to define APEX intrinsic names or parameters using macros in pragma directives, ensuring the handler processes the expanded values rather than raw macro identifiers. Signed-off-by: Luis Silva <[email protected]>
1 parent c932863 commit 1323dec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/config/riscv/riscv-c.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,5 +577,5 @@ riscv_register_pragmas (void)
577577
targetm.resolve_overloaded_builtin = riscv_resolve_overloaded_builtin;
578578
targetm.check_builtin_call = riscv_check_builtin_call;
579579
c_register_pragma ("riscv", "intrinsic", riscv_pragma_intrinsic);
580-
c_register_pragma (0, "intrinsic", arcv_apex_pragma_intrinsic);
580+
c_register_pragma_with_expansion (0, "intrinsic", arcv_apex_pragma_intrinsic);
581581
}

0 commit comments

Comments
 (0)