]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - doc/gmqcc.1
Fix QuakeWorld compilation by treating assignment to constants as a warning when...
[xonotic/gmqcc.git] / doc / gmqcc.1
index 9220e242eca811432d11e41b7f36fe8b2c956643..185092e4c8c910a0bc13b4f01fdfa75cc32217b2 100644 (file)
@@ -326,6 +326,16 @@ When passing variadic parameters via
 it can happen that incompatible types are passed to functions. This
 enables several warnings when static typechecking cannot guarantee
 consistent behavior.
+.It Fl W Ns Cm breakdef
+When compiling original id1 QC there is a definition for `break`
+which conflicts with the 'break' keyword in GMQCC. Enabling this
+will print a warning when the definition occurs. The definition is
+ignored for both cases.
+.It Fl W Ns Cm const-overwrite
+When compiling original QuakeWorld QC there are instances where
+code overwrites constants. This is considered an error, however
+for QuakeWorld to compile it needs to be treated as a warning
+instead, as such this warning only works when -std=qcc.
 .El
 .Sh COMPILE FLAGS
 .Bl -tag -width Ds
@@ -530,6 +540,15 @@ When passing on varargs to a different functions, this turns some
 static error cases into warnings. Like when the caller's varargs are
 restricted to a different type than the callee's parameter. Or a list
 of unrestricted varargs is passed into restricted varargs.
+.It Fl f Ns Cm typeless-stores
+Always use STORE_F, LOAD_F, STOREP_F when accessing scalar variables.
+This is somewhat incorrect assembly instruction use, but in all engines
+they do exactly the same. This makes disassembly output harder to read,
+breaks decompilers, but causes the output file to be better compressible.
+.It Fl f Ns Cm sort-operands
+In commutative instructions, always put the lower-numbered operand first.
+This shaves off 1 byte of entropy from all these instructions, reducing
+compressed size of the output file.
 .El
 .Sh OPTIMIZATIONS
 .Bl -tag -width Ds
@@ -574,7 +593,7 @@ string being added.
 .Pp
 For example the following code will only generate 1 string:
 .Bd -literal -offset indent
-print("Hell you!\\n");
+print("Hello you!\\n");
 print("you!\\n"); // trailing substring of "Hello you!\\n"
 .Ed
 .Pp