changeset 868:c55337499f96

remove warnings and error from test
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 01 Apr 2014 02:42:22 +0900
parents 33d00c6b2a7e
children 11add9567972
files Makefile Makefile.i64 test/const.c test/inline.c test/obsf.c test/obsf2.c test/putenemy.c test/regargs.c test/simp.c test/strinit.c
diffstat 10 files changed, 32 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Apr 01 01:57:36 2014 +0900
+++ b/Makefile	Tue Apr 01 02:42:22 2014 +0900
@@ -163,7 +163,8 @@
 #	-./$(MC) -Itest/ $(TARGET).c
 
 check: mc $(MC) $(TARGET).c
-	-$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB)
+	-$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -Wno-literal-conversion -Wno-implicit-function-declaration -Wno-implicit-int \
+               -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-return-type -Wno-bitfield-constant-conversion -Wno-tautological-compare -Wno-shift-overflow
 	-./b.out > $(TARGET).gcc.out
 	-./$(MC) $(MCFLAG)  $(TARGET).c
 	-$(CC) $(TARGET).s $(MLIB)
@@ -171,7 +172,8 @@
 	-diff $(TARGET).gcc.out $(TARGET).$(MC).out
 
 check-inline: mc $(MC) $(TARGET).c
-	-$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB)
+	-$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -Wno-literal-conversion -Wno-implicit-function-declaration -Wno-implicit-int \
+               -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-return-type -Wno-bitfield-constant-conversion -Wno-tautological-compare -Wno-shift-overflow
 	-./b.out > $(TARGET).gcc.out
 	-./$(MC) $(MCFLAG)  -DINLINE=inline $(TARGET).c
 	-$(CC) $(TARGET).s $(MLIB)
--- a/Makefile.i64	Tue Apr 01 01:57:36 2014 +0900
+++ b/Makefile.i64	Tue Apr 01 02:42:22 2014 +0900
@@ -163,33 +163,35 @@
 #	-./$(MC) -Itest/ $(TARGET).c
 
 check: mc $(MC) $(TARGET).c
-	-$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB)
+	-$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -Wno-literal-conversion -Wno-implicit-function-declaration -Wno-implicit-int \
+               -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-return-type -Wno-bitfield-constant-conversion -Wno-tautological-compare -Wno-shift-overflow
 	-./b.out > $(TARGET).gcc.out
-	-./$(MC) $(MCFLAG) $(TARGET).c
+	-./$(MC) $(MCFLAG)  $(TARGET).c
 	-$(CC) $(TARGET).s $(MLIB)
 	-./a.out > $(TARGET).$(MC).out
 	-diff $(TARGET).gcc.out $(TARGET).$(MC).out
 
 check-inline: mc $(MC) $(TARGET).c
-	-$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB)
+	-$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -Wno-literal-conversion -Wno-implicit-function-declaration -Wno-implicit-int \
+               -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-return-type -Wno-bitfield-constant-conversion -Wno-tautological-compare -Wno-shift-overflow
 	-./b.out > $(TARGET).gcc.out
-	-./$(MC) $(MCFLAG) -DINLINE=inline $(TARGET).c
+	-./$(MC) $(MCFLAG)  -DINLINE=inline $(TARGET).c
 	-$(CC) $(TARGET).s $(MLIB)
 	-./a.out > $(TARGET).$(MC).out
 	-diff $(TARGET).gcc.out $(TARGET).$(MC).out
 
 check-code: mc $(MC)
-	-./$(MC) $(MCFLAG) $(TARGET).c
+	-./$(MC) $(MCFLAG)  $(TARGET).c
 	-$(CC) $(TARGET).s $(MLIB)
 	-./a.out > $(TARGET).$(MC).out
 	-diff  $(TARGET).code-out $(TARGET).$(MC).out
 check-code-inline: mc $(MC)
-	-./$(MC) $(MCFLAG) -DINLINE=inline $(TARGET).c
+	-./$(MC) $(MCFLAG)  -DINLINE=inline $(TARGET).c
 	-$(CC) $(TARGET).s $(MLIB)
 	-./a.out > $(TARGET).$(MC).out
 	-diff  $(TARGET).code-out $(TARGET).$(MC).out
 check-code-make: mc $(MC)
-	-./$(MC) $(MCFLAG) $(TARGET).c
+	-./$(MC) $(MCFLAG)  $(TARGET).c
 	-$(CC) $(TARGET).s $(MLIB)
 	-./a.out > $(TARGET).code-out
 
--- a/test/const.c	Tue Apr 01 01:57:36 2014 +0900
+++ b/test/const.c	Tue Apr 01 02:42:22 2014 +0900
@@ -10,8 +10,8 @@
 
 i = 1; printf("#0010:2:\t%x\n",i);
 i = -1; printf("#0011:3:\t%x\n",i);
-   if (i==1) printf("#0012:i==1\n",i);
-   if (i==-1) printf("#0013:i==-1\n",i);
+   if (i==1) printf("#0012:i==1\n");
+   if (i==-1) printf("#0013:i==-1\n");
 
 i = 0x555<<0; printf("#0015:4:\t%x\n",i);
 i = 0x555<<1; printf("#0016:5:\t%x\n",i);
--- a/test/inline.c	Tue Apr 01 01:57:36 2014 +0900
+++ b/test/inline.c	Tue Apr 01 02:42:22 2014 +0900
@@ -7,9 +7,9 @@
 static inline const int f(int k);
 
 
-extern int printf(char *,...);
+extern int printf(const char *,...);
 inline int
-main0()
+main0(int ac, char **av)
 {
     volatile const int i = 3;
     volatile const int j = 3;
@@ -30,7 +30,7 @@
 }
 
 inline int
-main3()
+main3(int ac, char **av)
 {
     const int i = 3;
     const int j = 3;
@@ -50,7 +50,7 @@
 }
 
 int
-main1()
+main1(int ac, char **av)
 {
     volatile const int i = 3;
     volatile const int j = 3;
@@ -70,7 +70,7 @@
 }
 
 int
-main2()
+main2(int ac, char **av)
 {
     const int j = 3;
     const int i = 3;
@@ -92,7 +92,7 @@
 }
 
 
-extern int printf(char *,...);
+extern int printf(const char *,...);
 
 static inline const int f(const int k)
 {
--- a/test/obsf.c	Tue Apr 01 01:57:36 2014 +0900
+++ b/test/obsf.c	Tue Apr 01 02:42:22 2014 +0900
@@ -1,8 +1,9 @@
 #include <stdio.h>
 
-main(t,_,a)
-char *a;
+main(t,_a,aa)
+char **_a; char **aa;
 {
+long _ = (long)_a; char *a = (char *)aa;
 // printf("#0005:%d %d %d\n",t,_,a);
 return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
 main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
--- a/test/obsf2.c	Tue Apr 01 01:57:36 2014 +0900
+++ b/test/obsf2.c	Tue Apr 01 02:42:22 2014 +0900
@@ -75,7 +75,8 @@
 printf("#0074:d2: p->x %02x p->y %02x\n",p->x,p->y);
 } extern void srand(int); 
 int
-main(int i,int j,int k){
+main(int i,char **jj,char **kk){
+  int j = (int) jj; int k = (int)kk;
   s R,S;
   int count;
   i=0,
--- a/test/putenemy.c	Tue Apr 01 01:57:36 2014 +0900
+++ b/test/putenemy.c	Tue Apr 01 02:42:22 2014 +0900
@@ -3,7 +3,7 @@
 // for rand
 #include <stdlib.h>
 
-extern int printf(char *,...);
+extern int printf(const char *,...);
 #define SANKAKU 100000
 #ifndef M_PI
 #define M_PI 3.1415962
--- a/test/regargs.c	Tue Apr 01 01:57:36 2014 +0900
+++ b/test/regargs.c	Tue Apr 01 02:42:22 2014 +0900
@@ -30,14 +30,14 @@
 static int test_register()
 {
     register int a=122,b=22,c=34,d=44,e=5,f;
-    printf("#0032: %d %d %d %d %d\n",a,b,c,d,e,f);
+    printf("#0032: %d %d %d %d %d\n",a,b,c,d,e);
 
     f = gcd(a,b);
     e = gcd(c,d);
     f = gcd(a,f);
     e = gcd(a,e);
-    printf("#0038: %d %d %d %d %d\n",a,b,c,d,e,f);
-    
+    printf("#0038: %d %d %d %d %d\n",a,b,c,d,e);
+    return 0;    
 }
 
 static char *float_one_lib[] = {
--- a/test/simp.c	Tue Apr 01 01:57:36 2014 +0900
+++ b/test/simp.c	Tue Apr 01 02:42:22 2014 +0900
@@ -1,5 +1,5 @@
 // #include "stdio.h"
-extern int printf(char *const,...);
+extern int printf(const char *,...);
 
 // #define UNDECL
 
--- a/test/strinit.c	Tue Apr 01 01:57:36 2014 +0900
+++ b/test/strinit.c	Tue Apr 01 02:42:22 2014 +0900
@@ -224,7 +224,7 @@
 
 INLINE int main8() {
      f((struct arg){.fuga = 3,.aho=5});
-     printf("#0226:%d\n",((struct arg){.aho=120, .hage=55}).aho);
+     printf("#0226:%d\n",((struct arg){.aho=120, .hage=55}).aho); return 0;
 }
 
 int