Only allow function invocation outside ST expressions when command line option is activated.
--- a/stage1_2/iec_bison.yy Thu May 26 17:59:01 2016 +0100
+++ b/stage1_2/iec_bison.yy Thu May 26 18:30:17 2016 +0100
@@ -7905,7 +7905,15 @@
| subprogram_control_statement
| selection_statement
| iteration_statement
-| function_invocation /* TODO: this must be conditional on command line parameter! */
+| function_invocation
+ { /* This is a non-standard extension (calling a function outside an ST expression!) */
+ /* Only allow this if command line option has been selected... */
+ $$ = $1;
+ if (!runtime_options.allow_void_datatype) {
+ print_err_msg(locf(@1), locl(@1), "Function invocation in ST code is not allowed outside an expression. To allow this non-standard syntax, activate the apropriate command line option.");
+ yynerrs++;
+ }
+ }
;