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

Misbehaving preprocessor directive! #4828

Open
inferno-umar opened this issue Dec 23, 2024 · 3 comments
Open

Misbehaving preprocessor directive! #4828

inferno-umar opened this issue Dec 23, 2024 · 3 comments
Assignees
Labels

Comments

@inferno-umar
Copy link

inferno-umar commented Dec 23, 2024

The preprocessor directive here is misbehaving in the absence of CXXABI_HEADER i.e. it stills compiles the underlying code in the absence of abi namespace, resulting in compile time error of missing abi namespace.

If this line is replaced with #if __has_include(<cxxabi.h>) the program compiles successfully!

How to reproduce
Compile a program using Poco-1.14.0 with Poco/Types.h header but make sure cxxabi.h is not in your include path!

@inferno-umar
Copy link
Author

Also if this directive is needed it could be surrounded with #if __has_include(<cxxabi.h>) <-- this guard to mitigate the issue!

This might be a better approach...

@matejk
Copy link
Contributor

matejk commented Dec 23, 2024

@inferno-umar , which OS, compiler and compiler version do you use?

@inferno-umar
Copy link
Author

inferno-umar commented Dec 23, 2024

Windows-11 (build 22631.4602) on Virtualbox & Visual Studio's LLVM(clang-cl) v17.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants