GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
risc-v

RISC-V: Error out early for unsupported builtins.

RISC-V compiler now flags unsupported builtins earlier in the compilation process.

This patch improves error reporting for unsupported RISC-V builtins. Previously, errors only occurred during the expansion of a builtin, and some unsupported builtins could be optimized away before triggering a message. The change introduces an earlier check for unsupported calls, ensuring that users are notified of issues sooner and preventing potential confusion during compilation checks.

In Details

The RISC-V front-end now incorporates checks from expand_builtin into check_builtin_call. This ensures that unsupported builtins are flagged earlier in the compilation pipeline, even if they might otherwise be optimized away before full expansion. While the exact expression context isn't always available at the check_builtin_call stage, the function name is sufficient to detect unsupported intrinsic usage.

For Context
RISC-V
An open-standard instruction set architecture (ISA) based on Reduced Instruction Set Computing principles. It is designed to be simple, modular, and extensible.
builtin
A function or intrinsic provided by the compiler that is not part of the standard language but offers specialized functionality, often for performance or hardware access. Examples include SIMD intrinsics.
compiler pipeline
The sequence of stages a compiler goes through to transform source code into executable code. This typically includes preprocessing, lexing, parsing, semantic analysis, optimization, and code generation.
intrinsic
A function or operation that is recognized and handled directly by the compiler, often mapping to a specific machine instruction or a sequence of instructions. It provides a way to access hardware features from high-level code.
Filed Under: risc-vcompilererror handlingbuiltins