[llvm-bugs] [Bug 43301] New: ARC/C++/C conflict with structs with unions

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 12 16:35:02 PDT 2019


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

            Bug ID: 43301
           Summary: ARC/C++/C conflict with structs with unions
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: compnerd at compnerd.org
                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

Consider the following:

```
// RUN: %clang_cc1 -std=c++11 -fblocks -fobjc-runtime=ios-7.0 -fobjc-arc -x
objective-c++ %s -fsyntax-only
struct {
  union {
    void (^g)(void);
  };
} s;
```

This results in:

error: call to implicitly-deleted default constructor of 'struct (anonymous
struct at %s:1:1)'

Wrapping the structure in `extern "C"` is also insufficient to enable the stack
allocation of this type.  This type was reduced from `glob_t` in `glob.h`.

-- 
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/20190912/a4a5a063/attachment.html>


More information about the llvm-bugs mailing list