Print this page
cpp: enable as many warnings as practical

Split Close
Expand all
Collapse all
          --- old/cpp/cpp.c
          +++ new/cpp/cpp.c
↓ open down ↓ 241 lines elided ↑ open up ↑
 242  242  
 243  243  static  void            sayline(char *);
 244  244  static  void            dump(void);
 245  245  static  char            *refill(char *);
 246  246  static  char            *cotoken(char *);
 247  247  char            *skipbl(char *);
 248  248  static  char            *unfill(char *);
 249  249  static  char            *doincl(char *);
 250  250  static  int             equfrm(char *, char *, char *);
 251  251  static  char            *dodef(char *);
 252      -static  char            *control(char *);
      252 +void                    control(char *);
 253  253  static  struct symtab   *stsym(char *);
 254  254  static  struct symtab   *ppsym(char *);
 255  255  void            pperror(char *fmt, ...);
 256  256  void            yyerror(char *fmt, ...);
 257  257  static  void            ppwarn(char *fmt, ...);
 258  258  struct symtab   *lookup(char *, int);
 259  259  static  struct symtab   *slookup(char *, char *, int);
 260  260  static  char            *subst(char *, struct symtab *);
 261  261  static  char            *trmdir(char *);
 262  262  static  char            *copy(char *);
↓ open down ↓ 638 lines elided ↑ open up ↑
 901  901                  }
 902  902          } else {
 903  903                  np->value=psav-1;
 904  904          }
 905  905          --flslvl; inp=pin; savch=psav; return(p);
 906  906  }
 907  907  
 908  908  #define fasscan() ptrtab=fastab+COFF
 909  909  #define sloscan() ptrtab=slotab+COFF
 910  910  
 911      -static char *
      911 +void
 912  912  control(p) register char *p; {/* find and handle preprocessor control lines */
 913  913          register struct symtab *np;
 914  914  for (;;) {
 915  915          fasscan(); p=cotoken(p); if (*inp=='\n') ++inp; dump();
 916  916          sloscan(); p=skipbl(p);
 917  917          *--inp=SALT; outp=inp; ++flslvl; np=slookup(inp,p,0); --flslvl;
 918  918          if (np==defloc) {/* define */
 919  919                  if (flslvl==0) {p=dodef(p); continue;}
 920  920          } else if (np==incloc) {/* include */
 921  921                  if (flslvl==0) {p=doincl(p); continue;}
↓ open down ↓ 677 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX