[LLVMbugs] [Bug 10324] New: -fms-extensions doesn't set __STDC__
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jul 10 14:20:47 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10324
Summary: -fms-extensions doesn't set __STDC__
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: tim.nieradzik at gmx.de
CC: llvmbugs at cs.uiuc.edu
GCC sets __STDC__ even when compiling with -fms-extensions. As __STDC__ is
required by some system headers, it should be set in Clang as well. For
instance, this program miscompiles:
#include <stdio.h>
int main(void) {
printf("Hello World.\n");
return 0;
}
/usr/include/sys/cdefs.h:32:3: error: #error "You need a ISO C conforming
compiler to use the glibc headers"
>From cdefs.h:
/* The GNU libc does not support any K&R compilers or the traditional mode
of ISO C compilers anymore. Check for some of the combinations not
anymore supported. */
#if defined __GNUC__ && !defined __STDC__
# error "You need a ISO C conforming compiler to use the glibc headers"
#endif
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list