]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - doc/gmqcc.1
Merge branch 'master' into cooking
[xonotic/gmqcc.git] / doc / gmqcc.1
index 56728d17588c4f432180f7bd1769faa784d160ec..6ede944f1ffb68be44140899140e0ae7ba1e8439 100644 (file)
@@ -497,6 +497,27 @@ void vafunc(string...count) {
 Most Quake VMs, including the one from FTEQW or up till recently
 Darkplaces, do not cope well with vector instructions with overlapping
 input and output. This option will avoid producing such code.
+.It Fl f Ns Cm expressions-for-builtins
+Usually builtin-numbers are just immediate constants. With this flag
+expressions can be used, as long as they are compile-time constant.
+.Pp
+Example:
+.Bd -literal -offset indent
+void printA() = #1; // the usual way
+void printB() = #2-1; // with a constant expression
+.Ed
+.It Fl f Ns Cm return-assignments
+Enabiling this option will allow assigning values or expressions to the
+return keyword as if it were a local variable of the same type as the
+function's signature's return type.
+.Pp
+Example:
+.Bd -literal -offset indent
+float bar() { return 1024; }
+float fun() {
+    return = bar();
+    return; // returns value of bar
+}
 .El
 .Sh OPTIMIZATIONS
 .Bl -tag -width Ds