From 23877290b4d4be6faf657c0b4fb9dd1f05ea7d10 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Mon, 3 Apr 2023 20:49:28 +0300 Subject: [PATCH] Allow multi-byte character literals Removed the optional length check when parsing character literals (e.g. `'IHDR'`), making `cppp` able to process header files that make use of this commonly-used extension. --- clexer.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/clexer.c b/clexer.c index 856b320..75adc87 100644 --- a/clexer.c +++ b/clexer.c @@ -228,11 +228,6 @@ char const *examinechar(struct clexer *cl, char const *input) } else { ++cl->charquote; } - if (cl->charquote > 2) { /* optional */ - error(errBadCharLiteral); - cl->state |= F_EndOfLine; - return input; - } } else if (cl->state & F_InString) { if (*in == '\\') readwhack(cl, in);