]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/fteqcc-bugs.qc
add some failcases... get rid of -Oassignments
[xonotic/xonotic-data.pk3dir.git] / qcsrc / fteqcc-bugs.qc
diff --git a/qcsrc/fteqcc-bugs.qc b/qcsrc/fteqcc-bugs.qc
new file mode 100644 (file)
index 0000000..e426e93
--- /dev/null
@@ -0,0 +1,23 @@
+void error(...) = #1;
+
+void Oassignments(float foo) // pass 1
+{
+       float bar;
+       bar = 2;
+       bar = (foo ? 0 : (foo & 1));
+       if(bar == 2)
+               error("FTEQCC SUCKS");
+}
+
+void Oreturn_only(float foo) // pass 0
+{
+       if(foo)
+       {
+               return;
+       }
+}
+
+void Oreturn_only_trap(void)
+{
+       error("FTEQCC SUCKS");
+}