[PATCH] D98211: Solve PR49479, File scope fp pragma should propagate to functions nested in struct, and initialization expressions

Melanie Blower via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 8 12:15:19 PST 2021


mibintc added inline comments.


================
Comment at: clang/lib/Parse/ParseDeclCXX.cpp:3419
     // delayed attributes.
 
     SourceLocation SavedPrevTokLocation = PrevTokLocation;
----------------
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.


================
Comment at: clang/test/CodeGen/fp-floatcontrol-stack.cpp:241
+
+#pragma clang fp reassociate(on)
+struct MyComplex {
----------------
this is the test case from the bug report


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98211/new/

https://reviews.llvm.org/D98211



More information about the cfe-commits mailing list