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

The preprocessor doesn't inhibit expansion when concatenating with an empty token #13139

Closed
llvmbot opened this issue May 8, 2012 · 3 comments
Labels
bugzilla Issues migrated from bugzilla c++11

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented May 8, 2012

Bugzilla Link 12767
Resolution FIXED
Resolved on May 24, 2013 20:36
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @akyrtzi,@lattner,@DougGregor,@hvdijk

Extended Description

The preprocessor doesn't inhibit expansion when concatenating with an empty token.
Here an example:

#define EMPTY()
#define DEFER(id) id EMPTY()

#define A(p, ...) p ## VA_ARGS // should inhibit expansion of ...

#define B(p, ...) p VA_ARGS

#define TEST() 123

A(, DEFER(TEST)()) // should be TEST (), but clang expands to 123
B(, DEFER(TEST)()) // should be 123

@hvdijk
Copy link
Contributor

hvdijk commented Apr 3, 2013

*** Bug llvm/llvm-bugzilla-archive#15661 has been marked as a duplicate of this bug. ***

@akyrtzi
Copy link
Contributor

akyrtzi commented May 25, 2013

Fixed in r182699.

@hvdijk
Copy link
Contributor

hvdijk commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#15661

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++11
Projects
None yet
Development

No branches or pull requests

3 participants