Skip to content

BUG: Use _Alignof to compute alignment.#23008

Closed
hawkinsp wants to merge 1 commit intonumpy:mainfrom
hawkinsp:alignof
Closed

BUG: Use _Alignof to compute alignment.#23008
hawkinsp wants to merge 1 commit intonumpy:mainfrom
hawkinsp:alignof

Conversation

@hawkinsp
Copy link
Copy Markdown
Contributor

It is undefined behavior to have a type declaration inside offsetof, see:
llvm/llvm-project@e327b52

This code will fail to compile under upcoming versions of clang.

If we have a C11-compliant compiler, use _Alignof instead.

It is undefined behavior to have a type declaration inside offsetof,
see:
llvm/llvm-project@e327b52
This code will fail to compile under upcoming versions of clang.

If we have a C11-compliant compiler, use `_Alignof` instead.
@hawkinsp
Copy link
Copy Markdown
Contributor Author

I think the check failures are unrelated.

This PR might be a candidate for backporting, also.

@hawkinsp
Copy link
Copy Markdown
Contributor Author

Closing in favor of #23016

@hawkinsp hawkinsp closed this Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant