Currently, the CurFPFeatures state is set to command line settings before semantic analysis of the nested member functions and initialization expressions, that's not correct. This patch fixes that.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Parse/ParseDeclCXX.cpp | ||
---|---|---|
3419–3420 | I remember worrying about this issue when I wrote the initial patch but I can't remember what my thinking was in putting this in. Nobody remarked about its presence or absence as far as I have found. Now that I read over the #pragma float_control in the C standard it seems clear that it should apply to these expressions. And why would the command line options take effect but not the pragma, doesn't make sense. | |
clang/test/CodeGen/fp-floatcontrol-stack.cpp | ||
241 | this is the test case from the bug report |
Comment Actions
The description of the problem, and hte patch and tests seem to make sense, so I think this should be ok. Please give some of the others a little bit of time before committing to speak their final bit, but LGTM .
I remember worrying about this issue when I wrote the initial patch but I can't remember what my thinking was in putting this in. Nobody remarked about its presence or absence as far as I have found. Now that I read over the #pragma float_control in the C standard it seems clear that it should apply to these expressions. And why would the command line options take effect but not the pragma, doesn't make sense.