Fix macro preprocessing for #include. Arguments enclosed in "" or <> must not

be preprocessed. See ISO/IEC 9899 1990 (E) section 6.8.2.
This commit is contained in:
Kugel Fuhr
2024-09-01 13:16:35 +02:00
parent b688cfa0c0
commit b4aef6eac4
3 changed files with 34 additions and 4 deletions

10
test/val/bug2458.c Normal file
View File

@@ -0,0 +1,10 @@
#define str(arg) #arg
#include str(bug2458.h) /* Ok, macro replacement */
#define string foo
#include <string.h> /* Ok, no macro replacement */
int main()
{
return 0;
}

1
test/val/bug2458.h Normal file
View File

@@ -0,0 +1 @@