[LLVMbugs] [Bug 20782] dllexport instantiates all member functions of all member variables of a class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 28 13:13:07 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20782

Hans Wennborg <hans at chromium.org> changed:

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

--- Comment #5 from Hans Wennborg <hans at chromium.org> ---
(In reply to comment #4)
> Sorry, I read the example too fast; BlobData::operator= should not be
> deleted, but defining it should result in a hard error.

It sounds like we don't have a bug here. I also just tried this with VS 14 CTP,
and that errors in the same way that we do.

> What horrible things
> is MSVC doing to make this work? Maybe they try to define it within some
> kind of global error trap. *shudder*

In VS2012 and 2013, they synthesize the copy assignment operators, disregarding
the constness of BlobDataItem::a_.

In fact, they seem to do that in general. In VS2012 and 2013, this is an error:

  enum E { one, two };
  struct S {
    const E x;
  };
  void f(S& s, S& t) {
    s = t;
  }

But this compiles:

  struct S {
    const enum { one, two } x;
  };
  void f(S& s, S& t) {
    s = t;
  }

-- 
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/20140828/6007275f/attachment.html>


More information about the llvm-bugs mailing list