commit 8d908c4c320555aaef7fccc0e5c9399940dfe842
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Wed May 11 12:20:47 2016 +0200
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Wed May 11 12:20:47 2016 +0200
[cc1] Increase the portability of digits()
This is a bit (totally) pedantic, but we were using the strchr approach
in readint, so it was a bit stupid don't being pedantic in digits() to.
diff --git a/cc1/lex.c b/cc1/lex.c
index bcd707a..72342b7 100644
--- a/cc1/lex.c
+++ b/cc1/lex.c
@@ -354,7 +354,7 @@ digits(unsigned base)
for (p = input->p; c = *p; ++p) {
switch (base) {
case 8:
- if (c > '7' || c < '0')
+ if (!strchr("01234567", c))
goto end;
break;
case 10: