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

BDE Library built with GCC cannot be used with Clang #301

Open
roe85 opened this issue Oct 21, 2024 · 0 comments
Open

BDE Library built with GCC cannot be used with Clang #301

roe85 opened this issue Oct 21, 2024 · 0 comments

Comments

@roe85
Copy link

roe85 commented Oct 21, 2024

GCC and Clang are supposedly binary compatible.

However, it seems that the BDE library introduces compiler-dependent types in its public interface, which breaks this compatibility.

Specifically, when building the BDE library with GCC and attempting to consume it using Clang, the following linker error occurs: undefined reference to 'BloombergLP::bsls::Review::updateCount(BloombergLP::bsls::Atomic_TypeTraits<BloombergLP::bsls::AtomicOperations_ALL_ALL_ClangIntrinsics>::Int*)'

The issue is mainly due to one line in bdlt_datetime.h because it uses BSLS_REVIEW_INVOKE in the header. Other usages can be turned off with BSLS_REVIEW_LEVEL_NONE.

Is there (still) a reason why there is a Clang specific BloombergLP::bsls::AtomicOperations_ALL_ALL_ClangIntrinsics traits class?
The structure of the ifdef-ery in bsls_atomicoperations.h looks like Clang also should work with the GCC intrinsics, but the path is not reachable with current Clang versions.

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

1 participant