[llvm-bugs] [Bug 48704] New: Default to C11 standard and missing __STDC_NO_THREADS__ ( windows)

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 10 10:29:25 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48704

            Bug ID: 48704
           Summary: Default to C11 standard and missing
                    __STDC_NO_THREADS__ ( windows)
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: patrick.pelissier at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Since the switch to default to C11, compliant program fails to build **by
default** (without forcing another mode) on windows:

  #if defined(__STDC_VERSION__) && \
      (__STDC_VERSION__ >= 201102L) && \
      !defined(__STDC_NO_THREADS__)
  #  include <threads.h>
  #endif

[ build with only "clang.exe -c test.c"  ]

It is probably the same for other predefined macros.

This may be a library issue, but is it ok to default to C11 if there is known
library issue for such support?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210110/a06bca27/attachment.html>


More information about the llvm-bugs mailing list