[PATCH] D34158: For standards compatibility, preinclude <stdc-predef.h> if the file is available

Fedor Sergeev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 31 10:13:45 PDT 2017


fedor.sergeev added inline comments.


================
Comment at: test/Driver/stdc-predef.c:15
+  /* In this test, the file stdc-predef.h is missing from the installation */
+#if _STDC_PREDEF_H
+  #error "stdc-predef.h should not be included"
----------------
I would rather see a real check on include file inclusion (say, checking -H output) than a check for a macro.
Exact macro guard name is not a public interface at all. You might be lucky with current stdc-predef.h on Linux, but on other platforms it could be named differently.


Repository:
  rL LLVM

https://reviews.llvm.org/D34158





More information about the cfe-commits mailing list