r179723 - [tests] Only include stdint.h if we are in freestanding mode.

Daniel Dunbar daniel at zuster.org
Wed Apr 17 14:11:07 PDT 2013


Author: ddunbar
Date: Wed Apr 17 16:11:07 2013
New Revision: 179723

URL: http://llvm.org/viewvc/llvm-project?rev=179723&view=rev
Log:
[tests] Only include stdint.h if we are in freestanding mode.

 - We shouldn't even try to include stdint.h in hosted mode, as the dependency
   on even parsing a platforms stdint.h might fail for some targets.

Modified:
    cfe/trunk/test/Headers/c11.c

Modified: cfe/trunk/test/Headers/c11.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/c11.c?rev=179723&r1=179722&r2=179723&view=diff
==============================================================================
--- cfe/trunk/test/Headers/c11.c (original)
+++ cfe/trunk/test/Headers/c11.c Wed Apr 17 16:11:07 2013
@@ -21,12 +21,12 @@ _Static_assert(__alignof(c) == 4, "");
 
 #define __STDC_WANT_LIB_EXT1__ 1
 #include <stddef.h>
-#include <stdint.h>
 rsize_t x = 0;
 
 // If we are freestanding, then also check RSIZE_MAX (in a hosted implementation
 // we will use the host stdint.h, which may not yet have C11 support).
 #ifndef __STDC_HOSTED__
+#include <stdint.h>
 rsize_t x2 = RSIZE_MAX;
 #endif
 





More information about the cfe-commits mailing list