Trigraphs are evaluated both before and after line splicing
- Dominant language
- C++
- Stars
- 29
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
Just discovered that the Wave Driver (not sure about other setups) preprocesses the following code in a way that doesn't conform to the standard:
```
???/
?=define X 2
X
```
Is evaluated as `2`, while the standard (at least from what I know, would love a source on this) says trigraphs aren't supposed to be evaluated after line splicing happens. Therefore, I believe the correct way to process the above snippet should be to convert `??/` to `\`, see there are no more trigraphs to convert, splice the first two lines into `??=define X 2`, and then not to convert the `??=` trigraph to a `#` because we've already spliced lines. Expected output is as follows:
```
??=define X 2
X
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.