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

Allow avxintrin.h to be used by C compiler #22850

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jkl1337
Copy link

@jkl1337 jkl1337 commented Nov 5, 2024

An internal union defined to implement 256-bit AVX support added in PR #22430 is missing union keywords at declarations so causes errors when used with the C compiler.

Add the union keyword to the declarations of the m256_data union in avxintrin.h. Also adds __ prefix to make type __m256_data to avoid further polluting global namespace.

An internal union defined to implement 256-bit AVX support added in
PR emscripten-core#22430 is missing `union` keywords at
declarations so causes errors when used with the C compiler.

Add the `union` keyword to the declarations of the `m256_data` union in
avxintrin.h. Also adds `__` prefix to make type `__m256_data` to
avoid further polluting global namespace.
Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.. but I wonder why this wasn't covered by our test_standalone_system_headers test in the test_other.py

@sbc100
Copy link
Collaborator

sbc100 commented Nov 5, 2024

lgtm.. but I wonder why this wasn't covered by our test_standalone_system_headers test in the test_other.py

It looks like the compat directory is currently excluded .. I guess we should be more precise there.

sbc100 added a commit to sbc100/emscripten that referenced this pull request Nov 5, 2024
@sbc100
Copy link
Collaborator

sbc100 commented Nov 5, 2024

I just uploaded #22854. Once that land you should be able to remove the exceptions for these headers from test_standalone_system_headers as part of this change.

sbc100 added a commit that referenced this pull request Nov 5, 2024
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

Successfully merging this pull request may close these issues.

2 participants