Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange bug in preprocessor #722

Closed
mcatkins opened this issue Oct 2, 2023 · 2 comments
Closed

Strange bug in preprocessor #722

mcatkins opened this issue Oct 2, 2023 · 2 comments

Comments

@mcatkins
Copy link

mcatkins commented Oct 2, 2023

With the Morello clang:

$ clang -E -P -
#ifndef AA
AA: A
#endif

#ifdef U1
#endif

#ifdef U2
#endif

xxx

outputs:

AA: A xxx

But with clang 14.0.0 from Ubuntu, it outputs:

AA: A
xxx

Note two lines, verses one.

Martin

@jrtc27
Copy link
Member

jrtc27 commented Oct 2, 2023

You’ve hit the case that was fixed in llvm/llvm-project@c6b0b16 upstream, it seems. Not a bug in CHERI LLVM, and won’t be a bug in Morello LLVM once updated to 14.

@jrtc27 jrtc27 closed this as completed Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants