[LLVMbugs] [Bug 11328] No implicit copy constructor is created for a volatile struct in a non-voatile struct

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 7 11:10:17 PST 2011


Eli Friedman <sharparrow1 at yahoo.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |sharparrow1 at yahoo.com
         Resolution|                            |INVALID

--- Comment #1 from Eli Friedman <sharparrow1 at yahoo.com> 2011-11-07 13:10:17 CST ---
clang is behaving correctly; there is no usable copy-assignment operator for

Note that if you add a member like "struct Bar { Bar& operator=(const Bar&); }
bar;" to Test, gcc gives an error like the following:

<stdin>: In member function ‘Test& Test::operator=(const Test&)’:
<stdin>:4: error: passing ‘volatile Test::Foo’ as ‘this’ argument of
‘Test::Foo& Test::Foo::operator=(const Test::Foo&)’ discards qualifiers
<stdin>: In function ‘int main()’:
<stdin>:35: note: synthesized method ‘Test& Test::operator=(const Test&)’ first
required here

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list