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

__has_cpp_attribute is defined for non-C++ targets #23809

Closed
AaronBallman opened this issue May 6, 2015 · 3 comments
Closed

__has_cpp_attribute is defined for non-C++ targets #23809

AaronBallman opened this issue May 6, 2015 · 3 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@AaronBallman
Copy link
Collaborator

Bugzilla Link 23435
Resolution FIXED
Resolved on May 11, 2015 09:10
Version trunk
OS Windows NT

Extended Description

__has_cpp_attribute is defined for C programs, but cannot parse scoped attributes. It seems like this predefined macro should not be defined for non-C++ targets, or it should support scoped attributes (and resolve to false always) when in C mode. My preference is for the builtin to not be defined when compiling for C as that would match the documented portability suggestions.

@AaronBallman
Copy link
Collaborator Author

assigned to @AaronBallman

@AaronBallman
Copy link
Collaborator Author

__has_cpp_attribute is defined for C programs, but cannot parse scoped
attributes. It seems like this predefined macro should not be defined for
non-C++ targets, or it should support scoped attributes (and resolve to
false always) when in C mode. My preference is for the builtin to not be
defined when compiling for C as that would match the documented portability
suggestions.

I spoke with Richard about this, and he agrees that not having it defined for C is a reasonable direction.

@AaronBallman
Copy link
Collaborator Author

Fixed in r236996

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 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 clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

1 participant