[LLVMbugs] [Bug 18035] [-cxx-abi microsoft] Arguments with dtors must be constructed right-to-left due to callee destruction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 5 11:15:33 PST 2013


Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Reid Kleckner <rnk at google.com> ---
Fixed in r196402.

Sebastian Redl pointed out that I need to fix C++11 list construction:

$ cat t.cpp
extern "C" int printf(const char *, ...);
struct A { A(int, int) {} };
int f(int i) {
  printf("%d\n", i);
  return i;
int main() {
  A a{f(1), f(2)};

This now prints 2, 1 with clang.  MSVC 2013 CTP actually has the same behavior,
so they are non-compliant.  I think for the moment we have to be bugwards
compatible.  If they change, we can key our behavior off of -fmsc-version.

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/20131205/1aea06ff/attachment.html>

More information about the llvm-bugs mailing list