[llvm-bugs] [Bug 36757] New: incorrect diagnostic illegal initializer type with _Atomic static initialization
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 15 10:37:58 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=36757
Bug ID: 36757
Summary: incorrect diagnostic illegal initializer type with
_Atomic static initialization
Product: clang
Version: 6.0
Hardware: PC
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: mib.bugzilla at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
This is similar to https://bugs.llvm.org/show_bug.cgi?id=28440, but slightly
different. It is cut down from OpenAL. We are compiling this application using
gcc7 headers.
Here is the reduced test case,
typedef _Atomic struct { _Bool __val; } atomic_flag;
static atomic_flag LoadedHrtfLock = { 0 };
/usr/bin/clang -c test.c
test.c:3:37: error: illegal initializer type 'atomic_flag' (aka '_Atomic(struct
(anonymous struct at test.c:1:17))')
static atomic_flag LoadedHrtfLock = { 0 } ;
^
1 error generated.
$ /usr/bin/clang -v
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
--Melanie Blower, I work for Intel on the Intel c++ compiler
--
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/20180315/5f69ea69/attachment.html>
More information about the llvm-bugs
mailing list