[PATCH] D50276: [clang] Fix broken include_next in float.h

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 3 15:41:05 PDT 2018

ldionne created this revision.
ldionne added a reviewer: jfb.
Herald added subscribers: cfe-commits, dexonsmith.

The code defines __FLOAT_H and then includes the next <float.h>, which is
guarded on __FLOAT_H so it gets skipped entirely. This commit uses the header
guard __CLANG_FLOAT_H, like other headers (such as limits.h) do.

  rCXX libc++



Index: clang/lib/Headers/float.h
--- clang/lib/Headers/float.h
+++ clang/lib/Headers/float.h
@@ -21,8 +21,8 @@
-#ifndef __FLOAT_H
-#define __FLOAT_H
+#ifndef __CLANG_FLOAT_H
+#define __CLANG_FLOAT_H
 /* If we're on MinGW, fall back to the system's float.h, which might have
  * additional definitions provided for Windows.
@@ -157,4 +157,4 @@
 #  define FLT16_TRUE_MIN    __FLT16_TRUE_MIN__
 #endif /* __STDC_WANT_IEC_60559_TYPES_EXT__ */
-#endif /* __FLOAT_H */
+#endif /* __CLANG_FLOAT_H */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50276.159109.patch
Type: text/x-patch
Size: 653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180803/890157aa/attachment-0001.bin>

More information about the cfe-commits mailing list