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: unassignedclangb...@nondot.org
Reporter: mib.bugzi...@gmail.com
CC: dgre...@apple.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs