Fixed processing '\\' followed with a newline and line number output (-E) with it.

This commit is contained in:
acqn
2022-11-02 14:09:15 +08:00
parent ad7c5a6617
commit 8fb2576626
4 changed files with 49 additions and 10 deletions

19
test/val/bug1891.c Normal file
View File

@@ -0,0 +1,19 @@
/* bug #1891 - backslash/newline sequence in string constants is treated wrong */
#include <stdio.h>
#include <string.h>
const char* a = "hello \
world";
const char* b = \
"hello world";
int main(void)
{
if (strcmp(a, b) != 0) {
printf("a:\n%s\n", a);
printf("b:\n%s\n", b);
return 1;
}
return 0;
}