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

gcc regards struct foo and const struct foo as __builtin_types_compatible_p #3291

Closed
llvmbot opened this issue Oct 19, 2008 · 2 comments
Closed
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 19, 2008

Bugzilla Link 2919
Resolution FIXED
Resolved on Mar 12, 2010 00:57
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor
CC @efriedma-quic

Extended Description

gcc accepts the following code which clang rejects:

int a0[__builtin_types_compatible_p(struct foo,
const struct foo) ? 1 : -1];

Reported as problem compiling Dovecot.

@efriedma-quic
Copy link
Collaborator

From the gcc docs for __builtin_types_compatible_p:

"This built-in function ignores top level qualifiers (e.g., const, volatile). For example, int is equivalent to const int."

@llvmbot
Copy link
Collaborator Author

llvmbot commented Oct 24, 2008

@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 clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

2 participants