[llvm-bugs] [Bug 37815] New: Flexible array type with explicitly defined destructor.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 15 08:13:42 PDT 2018


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

            Bug ID: 37815
           Summary: Flexible array type with explicitly defined
                    destructor.
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zahira.ammarguellat at intel.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

test.cpp:

struct A {
  ~A() {  }
};
struct C {
 int c1;
 A a[];
};

bash-4.2$ clang -c test.cpp
test.cpp:6:5: error: flexible array member 'a' of type 'A []' with non-trivial
      destruction
  A a[];
    ^
1 error generated.
bash-4.2$


GCC allows this.

-- 
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/20180615/12a41638/attachment.html>


More information about the llvm-bugs mailing list