Skip to content

fix: address sse2neon/streflop macro redefinition warning#2999

Open
bruno-dasilva wants to merge 2 commits into
beyond-all-reason:masterfrom
bruno-dasilva:bruno/fix-arm-warnings
Open

fix: address sse2neon/streflop macro redefinition warning#2999
bruno-dasilva wants to merge 2 commits into
beyond-all-reason:masterfrom
bruno-dasilva:bruno/fix-arm-warnings

Conversation

@bruno-dasilva

Copy link
Copy Markdown
Collaborator

A separate PR for this arm-setup-specific warning. My understanding is that streflop adds some macros into fenv.h and then sse2neon ALSO creates macros by the same name, causing a warning. The most straightforward way to fix this is we force sse2neon to be truly encapsulated by undef'ing the macros it defines, so the streflop ones still take precedence but without emitting a warning.

@bruno-dasilva bruno-dasilva force-pushed the bruno/fix-arm-warnings branch from 85fcd22 to cc24814 Compare June 2, 2026 19:06
Comment thread rts/System/simd_compat.h
#undef FE_TONEAREST
#undef FE_DOWNWARD
#undef FE_UPWARD
#undef FE_TOWARDZERO

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the warnings emitted were quite spammy:

/build/src/rts/lib/streflop/FPUSettings.h:105:2: warning: #warning STREFLOP: FE_XXX flags were already
  defined and will be redefined! Check you do not use the system libm. [-Wcpp]
    105 | #warning STREFLOP: FE_XXX flags were already defined and will be redefined! Check you do not use
  the system libm.
        |  ^~~~~~~

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

would be good to send a fix (or at least a ticket) upstream to libsse2neon

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

created an issue to seek guidance from the devs xref DLTcollab/sse2neon#767

@bruno-dasilva bruno-dasilva marked this pull request as ready for review June 2, 2026 19:10
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