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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to