[hackers] [scc] Add basic test for sizeof || Roberto E. Vargas Caballero
commit 15a08e3fab9ec6ed44b7be3195947399219d7a39
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Oct 6 15:26:57 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Oct 7 16:20:04 2015 +0200
Add basic test for sizeof
diff --git a/cc1/tests/test037.c b/cc1/tests/test037.c
new file mode 100644
index 0000000..c50ca3d
--- /dev/null
+++ b/cc1/tests/test037.c
_AT_@ -0,0 +1,36 @@
+
+/*
+name: TEST037
+description: Basic sizeof test
+comments: This test is based in z80 sizes
+output:
+test037.c:29: warning: conditional expression is constant
+test037.c:31: warning: conditional expression is constant
+test037.c:33: warning: conditional expression is constant
+F1 I E
+G2 F1 main
+{
+\
+ j L3 #I0
+ r #I1
+L3
+ j L4 #I0
+ r #I2
+L4
+ j L5 #I0
+ r #I3
+L5
+ r #I0
+}
+*/
+
+int main()
+{
+ if(sizeof(0) != 2)
+ return 1;
+ if(sizeof(char) != 1)
+ return 2;
+ if(sizeof(int) != 2)
+ return 3;
+ return 0;
+}
Received on Wed Oct 07 2015 - 17:44:47 CEST
This archive was generated by hypermail 2.3.0
: Wed Oct 07 2015 - 17:48:16 CEST