[PATCH] D44810: [PDB] Make LLD PDBs look a little more like Microsoft PDBs

Adrian McCarthy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 22 16:00:42 PDT 2018


amccarth added inline comments.


================
Comment at: llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp:54
+  // eliminate superfluous differences.
+  constexpr double C = 1.0815136685898448773;
+  return -1 + (uint32_t)std::floor(
----------------
This is (mildly) terrifying given how common it has been for compilers to get rounding of floating point literals wrong.

http://www.exploringbinary.com/visual-c-plus-plus-strtod-still-broken/
http://www.exploringbinary.com/real-c-rounding-is-perfect-gcc-now-converts-correctly/
http://www.exploringbinary.com/gays-strtod-returns-zero-for-inputs-just-above-2-1075/
http://www.exploringbinary.com/how-gcc-converts-decimal-literals-to-floating-point/
etc.


https://reviews.llvm.org/D44810





More information about the llvm-commits mailing list