aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 45d741532..6f8caff98 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -826,6 +826,14 @@ void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
}
e->Procedure.optimization_mode = cast(ProcedureOptimizationMode)ac.optimization_mode;
+ if (ac.no_red_zone) {
+ if (!is_arch_wasm()) {
+ e->Procedure.no_red_zone = true;
+ } else {
+ error(e->token, "@(no_red_zone) is not supported on this target architecture");
+ }
+ }
+
if (ac.objc_name.len || ac.objc_is_class_method || ac.objc_type) {
if (ac.objc_name.len == 0 && ac.objc_is_class_method) {
error(e->token, "@(objc_name) is required with @(objc_is_class_method)");