]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - doc/gmqcc.1
manpage: -Ovector-components
[xonotic/gmqcc.git] / doc / gmqcc.1
index b621004b7bf76e4d85bdb226f9685fa66b4fe7cd..bb260222588cc8a91a8f6fe5afe17957c4489ec2 100644 (file)
@@ -258,6 +258,18 @@ You won't need this.
 Warn on an unknown attribute. The warning will inlclude only the first
 token inside the enclosing attribute-brackets. This may change when
 the actual attribute syntax is better defined.
+.TP
+.B -Wreserved-names
+Warn when using reserved names such as 'nil'.
+.TP
+.B -Wuninitialized-constant
+Warn about global constants (using the 'const' keyword) with no
+assigned value.
+.TP
+.B -Wuninitialized-global
+Warn about global variables with no initializing value. This is off by
+default, and is added mostly to help find null-values which are
+supposed to be replaced by the untyped 'nil' constant.
 .SH COMPILE FLAGS
 .TP
 .B -fdarkplaces-string-table-bug
@@ -365,6 +377,44 @@ instruction on the string before using it.
 Enable utf8 characters. This allows utf-8 encoded character constants,
 and escape sequence codepoints in the valid utf-8 range. Effectively
 enabling escape sequences like '\\{x2211}'.
+.TP
+.B -fbail-on-werror
+When a warning is treated as an error, and this option is set (which
+it is by default), it is like any other error and will cause
+compilation to stop. When disabling this flag by using
+\-fno-bail-on-werror, compilation will continue until the end, but no
+output is generated. Instead the first such error message's context is
+shown.
+.TP
+.B -floop-labels
+Allow loops to be labeled, and allow 'break' and 'continue' to take an
+optional label to decide which loop to actually jump out of or
+continue.
+.sp
+.in +4
+.nf
+for :outer (i = 0; i < n; ++i) {
+    while (inner) {
+        ...;
+        if (something)
+            continue outer;
+    }
+}
+.fi
+.in
+.TP
+.B -funtyped-nil
+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.
+.TP
+.B -fpermissive
+Various effects, usually to weaken some conditions.
+.RS
+.IP "with -funtyped-nil"
+Allow local variables named 'nil'. (This will not allow declaring a
+global of that name.)
 .SH OPTIMIZATIONS
 .TP
 .B -Opeephole
@@ -440,6 +490,15 @@ instruction is added for several reasons. (For example the qcvm's
 disassemble switch uses it to know when the function ends.). This
 optimization replaces that last RETURN with DONE rather than adding
 the DONE additionally.
+.TP
+.B -Ovector-components
+Because traditional QC code doesn't allow you to access individual
+vector components of a computed vector without storing it in a local
+first, sometimes people multiply it by a constant like '0 1 0' to get,
+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.
 .SH CONFIG
 The configuration file is similar to regular .ini files. Comments
 start with hashtags or semicolons, sections are written in square