Issue 97836
Summary C: any non-white space character may be a preprocessor token
Labels new issue
Assignees
Reporter gustedt
    The C standard states in 6.4 p1

> preprocessing-token:
>                                   ...
>                                   each non-white-space character that cannot be one of the above

That is, during preprocessing all characters have to be accepted, regardless if they are valid or not in later compilation phases. But clang in all versions that I tested does not accept the following code

```{.C}
#define stringify(...) #__VA_ARGS__
char A[] = stringify(¬);
```

Here the offending not sign does not survive preprocessing, but is integrated into a string literal, which is fine.

Gcc happily accepts this and produces a string with this character.

Thanks
Jens

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to