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

Reply via email to