diff --git a/Ghidra/Framework/SoftwareModeling/src/main/antlr/ghidra/sleigh/grammar/SleighCompiler.g b/Ghidra/Framework/SoftwareModeling/src/main/antlr/ghidra/sleigh/grammar/SleighCompiler.g index f10c5e833c..8d05e777d0 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/antlr/ghidra/sleigh/grammar/SleighCompiler.g +++ b/Ghidra/Framework/SoftwareModeling/src/main/antlr/ghidra/sleigh/grammar/SleighCompiler.g @@ -1246,7 +1246,17 @@ funcall returns [VectorSTL value] @init { $Return::noReturn = true; } - : e=expr_apply { $value = (VectorSTL) e; } + : e=expr_apply { + if (e instanceof VectorSTL) + $value = (VectorSTL) e; + else { + Location loc = null; + if (e instanceof ExprTree) { + loc = ((ExprTree)e).location; + } + reportError(loc,"Functional operator requires a return value"); + } + } ; build_stmt returns [VectorSTL ops]