X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=doc%2Fgmqcc.1;h=6ede944f1ffb68be44140899140e0ae7ba1e8439;hp=60257dc444b9645fe100f213d000f2ca3412437e;hb=1dce501b7058000e19421af246ec14fd98aceab9;hpb=b9fb29d740cb7e3711035fb37c604be61dd779bb diff --git a/doc/gmqcc.1 b/doc/gmqcc.1 index 60257dc..6ede944 100644 --- a/doc/gmqcc.1 +++ b/doc/gmqcc.1 @@ -506,6 +506,18 @@ Example: 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