]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - doc/gmqcc.1
Generate PDF documentation from man pages for windows releases.
[xonotic/gmqcc.git] / doc / gmqcc.1
index 6ede944f1ffb68be44140899140e0ae7ba1e8439..dbdae03868b3197e95779447480c0dd1f7b33f58 100644 (file)
@@ -320,6 +320,17 @@ marked as such.
 Warn about possible mistakes caused by missing or wrong parenthesis,
 like an assignment in an 'if' condition when there's no additional set
 of parens around the assignment.
 Warn about possible mistakes caused by missing or wrong parenthesis,
 like an assignment in an 'if' condition when there's no additional set
 of parens around the assignment.
+.It Fl W Ns Cm unsafe-types
+When passing variadic parameters via
+.Li ...(N)
+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
+warning will print a warning when the definition occurs. The
+definition is ignored for both cases.
 .El
 .Sh COMPILE FLAGS
 .Bl -tag -width Ds
 .El
 .Sh COMPILE FLAGS
 .Bl -tag -width Ds
@@ -518,6 +529,12 @@ float fun() {
     return = bar();
     return; // returns value of bar
 }
     return = bar();
     return; // returns value of bar
 }
+.Ed
+.It Fl f Ns Cm unsafe-varargs
+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.
 .El
 .Sh OPTIMIZATIONS
 .Bl -tag -width Ds
 .El
 .Sh OPTIMIZATIONS
 .Bl -tag -width Ds
@@ -562,7 +579,7 @@ string being added.
 .Pp
 For example the following code will only generate 1 string:
 .Bd -literal -offset indent
 .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
 print("you!\\n"); // trailing substring of "Hello you!\\n"
 .Ed
 .Pp
@@ -594,6 +611,10 @@ in this case, the y component of a vector. This optimization will turn
 such a multiplication into a direct component access. If the factor is
 anything other than 1, a float-multiplication will be added, which is
 still faster than a vector multiplication.
 such a multiplication into a direct component access. If the factor is
 anything other than 1, a float-multiplication will be added, which is
 still faster than a vector multiplication.
+.It Fl O Ns Cm const-fold-dce
+For constant expressions that result in dead code (such as a branch whos
+condition can be evaluated at compile-time), this will eliminate the branch
+and else body (if present) to produce more optimal code.
 .El
 .Sh CONFIG
 The configuration file is similar to regular .ini files. Comments
 .El
 .Sh CONFIG
 The configuration file is similar to regular .ini files. Comments