Skip to content

Conversation

@jkl1337
Copy link
Contributor

@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.

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
@sbc100
Copy link
Collaborator

sbc100 commented Dec 16, 2024

Can you remove these headers from the exception list in test_standalone_system_headers?

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.

Also remove headers from test exception list as C++ only.
@sbc100 sbc100 merged commit d0b04b9 into emscripten-core:main Dec 16, 2024
26 of 28 checks passed
hedwigz pushed a commit to hedwigz/emscripten that referenced this pull request Dec 18, 2024
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.
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