Print this page
cpp: don't exit with an error count, or we'll overflow to 0 and 'succeed'

Split Close
Expand all
Collapse all
          --- old/cpp/cpp.c
          +++ new/cpp/cpp.c
↓ open down ↓ 1059 lines elided ↑ open up ↑
1060 1060  /* VARARGS1 */
1061 1061  void
1062 1062  pperror(char *fmt, ...)
1063 1063  {
1064 1064          va_list args;
1065 1065  
1066 1066          va_start(args, fmt);
1067 1067          verror(fmt, args);
1068 1068          va_end(args);
1069 1069  
1070      -        ++exfail;
     1070 +        exfail = 1;
1071 1071  }
1072 1072  
1073 1073  /* VARARGS1 */
1074 1074  void
1075 1075  yyerror(char *fmt, ...)
1076 1076  {
1077 1077          va_list args;
1078 1078  
1079 1079          va_start(args, fmt);
1080 1080          verror(fmt, args);
1081 1081          va_end(args);
1082 1082  }
1083 1083  
1084 1084  /* VARARGS1 */
1085 1085  static void
1086 1086  ppwarn(char *fmt, ...)
1087 1087  {
1088 1088          va_list args;
1089 1089          int fail = exfail;
1090      -        exfail = -1;
1091 1090  
1092 1091          va_start(args, fmt);
1093 1092          verror(fmt, args);
1094 1093          va_end(args);
1095 1094  
1096 1095          exfail = fail;
1097 1096  }
1098 1097  
1099 1098  struct symtab *
1100 1099  lookup(namep, enterf)
↓ open down ↓ 472 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX