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

Blower, Melanie via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 31 14:18:44 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.
> Thanks Fedor.  I am uploading a new patch with an updated version of this test case. Please see comments in the new patch.

Repository:
  rL LLVM

https://reviews.llvm.org/D34158





More information about the cfe-commits mailing list