commit 978a8ca13e0a40616ed5525663653d82efaa8eb4
parent b2122b83b0deeea1bc0fe5d80650d2280c4cced8
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 24 Oct 2022 17:46:24 +0200
cc1: Don't emit UB warnings in EOF
EOF is not a character in the file itself.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/cmd/cc/cc1/lex.c b/src/cmd/cc/cc1/lex.c
@@ -194,6 +194,8 @@ repeat:
case '\n':
newline();
break;
+ case EOF:
+ break;
default:
if (!isprint(c) && !ispunct(c) && !isspace(c))
warn("invalid input character. The shame of UB is yours");