We no longer need the extra error handling logic for octal parsing so simplify
it as requested by Greg King.
Signed-off-by: Alan Cox <etchedpixels@gmail.com>
case '6':
case '7':
/* Octal constant */
- HadError = 0;
Count = 1;
C = HexVal (CurC);
while (IsODigit (NextC) && Count++ < 3) {
- if ((C << 3) >= 256) {
- if (!HadError) {
- Error ("Octal character constant out of range");
- HadError = 1;
- }
- } else {
- C = (C << 3) | HexVal (NextC);
- }
+ C = (C << 3) | HexVal (NextC);
NextChar ();
}
+ if (C >= 256)
+ Error ("Octal character constant out of range");
break;
default:
Error ("Illegal character constant");