scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0020-storage.c (848B)


      1 /*
      2 PATTERN:
      3 0020-storage.c:36: warning: 'par' defined but not used
      4 0020-storage.c:42: error: incorrect storage class for file-scope declaration
      5 0020-storage.c:45: error: bad storage class in function parameter
      6 0020-storage.c:46: error: invalid storage class for function 'func4'
      7 0020-storage.c:47: error: invalid type specification
      8 0020-storage.c:53: error: conflicting types for 'd'
      9 .
     10 */
     11 
     12 int a;
     13 static char b;
     14 extern int c;
     15 typedef unsigned e;
     16 
     17 int
     18 func1(void)
     19 {
     20         auto h;
     21         static char i;
     22         register long j;
     23         extern int k;
     24         static unsigned long a;
     25         return h+i+j+k+a;
     26 }
     27 
     28 int
     29 func2(register int par)
     30 {
     31         int par;
     32 
     33 	return par;
     34 }
     35 
     36 static int
     37 func3(register int par)
     38 {
     39 	return par;
     40 }
     41 
     42 register short d;
     43 
     44 register int
     45 func4(static int par)
     46 {
     47         static register f;
     48 
     49 	return f+par;
     50 }
     51 
     52 short d;
     53 char d;