[cfe-dev] RFC: __atomic_* support for gcc 4.7 compatibility

Richard Smith richard at metafoo.co.uk
Tue Apr 10 12:29:28 PDT 2012

On Tue, Apr 10, 2012 at 12:22 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> 5) Clang provides an __atomic_init builtin, which gcc does not provide,
> and which crashes during CodeGen.

I should clarify: this builtin works fine on scalar types, but crashes in
cases like this:

  struct T { char v[4]; };
  _Atomic(T) a;
  void f() { __atomic_init(&a, T()); }

If this builtin is useful (in particular for C11, since neither libstdc++
nor libc++ need it), I'll take a look at fixing it instead of removing it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120410/e96c3035/attachment.html>

More information about the cfe-dev mailing list