]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - doc/gmqcc.1
added the --add-info compile switch: it adds a global const string named version...
[xonotic/gmqcc.git] / doc / gmqcc.1
index 05b5cbc020e66242687caf53b9ffd84db93a8645..2a38e2a9de7f644215365a99480b3431748a72b0 100644 (file)
@@ -344,6 +344,7 @@ __TIME__
 .fi
 .in
 Note that fteqcc also defines __NULL__ which is not implemented yet.
+(See -funtyped-nil about gmqcc's alternative to __NULL__).
 .TP
 .B -frelaxed-switch
 Allow switch cases to use non constant variables.
@@ -446,6 +447,19 @@ Adds a global named 'nil' which is of no type and can be assigned to
 anything. No typechecking will be performed on assignments. Assigning
 to it is forbidden, using it in any other kind of expression is also
 not allowed.
+.sp
+Note that this is different from fteqcc's __NULL__: In fteqcc,
+__NULL__ maps to the integer written as '0i'. It's can be assigned to
+function pointers and integers, but it'll error about invalid
+instructions when assigning it to floats without enabling the FTE
+instruction set. There's also a bug which allows it to be assigned to
+vectors, for which the source will be the global at offset 0, meaning
+the vector's y and z components will contain the OFS_RETURN x and y
+components.
+.sp
+In that gmqcc the nil global is an actual global filled with zeroes,
+and can be assigned to anything including fields, vectors or function
+pointers, and they end up becoming zeroed.
 .TP
 .B -fpermissive
 Various effects, usually to weaken some conditions.