Skip to content

BUG: make a variable volatile to work around clang compiler bug - #18030

Merged
seberg merged 3 commits into
numpy:masterfrom
r-devulap:clang-bug-workaround
Dec 19, 2020
Merged

seberg merged 3 commits into
numpy:masterfrom
r-devulap:clang-bug-workaround

Conversation

@r-devulap

Copy link
Copy Markdown
Member

Fixes #18005

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Dec 19, 2020
@seberg seberg modified the milestones: 1.20.0 release, 1.19.5 release Dec 19, 2020
@seberg

seberg commented Dec 19, 2020

Copy link
Copy Markdown
Member

Thanks @r-devulap this sounds like a simple and good change to me. Should be backported to both 1.19.x and 1.20.x I guess.

@tomgoddard I trust this fixes the issue, but if it is easy for you to check, that would be appreciated!

@seberg
seberg merged commit dc3fe03 into numpy:master Dec 19, 2020
charris pushed a commit to charris/numpy that referenced this pull request Dec 19, 2020
…y#18030)

* BUG: make a variable volatile to work around clang compiler bug

* Adding comments for relevance

* TST: Adding test to check for no overflow warnings in log

Fixes numpy#18005
charris pushed a commit to charris/numpy that referenced this pull request Dec 19, 2020
…y#18030)

* BUG: make a variable volatile to work around clang compiler bug

* Adding comments for relevance

* TST: Adding test to check for no overflow warnings in log

Fixes numpy#18005
@charris charris added component: build and removed 09 - Backport-Candidate PRs tagged should be backported labels Dec 19, 2020
@charris charris removed this from the 1.19.5 release milestone Dec 19, 2020
@tomgoddard

tomgoddard commented Dec 20, 2020 via email

Copy link
Copy Markdown

@charris

charris commented Dec 20, 2020

Copy link
Copy Markdown
Member

@tomgoddard The fix was included in that build.

@seberg

seberg commented Dec 20, 2020

Copy link
Copy Markdown
Member

Relatively speaking, not too many people are affected by this or would notice it, I think.

  1. You need to use float32 (which is not the default)
  2. You need a reasonably recent/high end CPU
  3. You need to use clang, which probably reduces it to mostly Mac OS
  4. It is just a warning, many may miss it or just not care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BLD: Do not use clang default to ignore floating point exceptions

4 participants