[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-17 Thread bangerth at dealii dot org
--- Additional Comments From bangerth at dealii dot org 2004-12-17 16:34 --- Nathan, if this isn't a regression but a patch has been applied to the 3.4 branch, then you should also apply it to mainline. Otherwise you have just created a regression (3.4.4 will work as expected, but 4.0.

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-17 Thread cvs-commit at gcc dot gnu dot org
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-17 16:19 --- Subject: Bug 18975 CVSROOT:/cvs/gcc Module name:gcc Branch: gcc-3_4-branch Changes by: [EMAIL PROTECTED] 2004-12-17 16:19:24 Modified files: gcc/cp : Change

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-17 Thread nathan at gcc dot gnu dot org
--- Additional Comments From nathan at gcc dot gnu dot org 2004-12-17 16:10 --- Fix for 3.4 branch 2004-12-17 Nathan Sidwell <[EMAIL PROTECTED]> PR c++/18975 * method.c (do_build_copy_constructor): Refactor. Don't const qualify a mutable field. (do_buil

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-17 Thread nathan at gcc dot gnu dot org
--- Additional Comments From nathan at gcc dot gnu dot org 2004-12-17 13:44 --- I now think the code is ok, and both compilers are incorrect to reject any of the versions. The versions that do not contain user defined XYZ (const XYZ& src) XYZ& operator= (const XYZ& src) functions a

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-17 Thread giovannibajo at libero dot it
--- Additional Comments From giovannibajo at libero dot it 2004-12-17 13:19 --- Wolfgang, I suggest you to bring this up in comp.std.c++, to get some official answer about this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18975

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-15 Thread nathan at gcc dot gnu dot org
--- Additional Comments From nathan at gcc dot gnu dot org 2004-12-15 14:44 --- I am dubious about my own analysis of this. Wolfgang sent me more detailed comparison between g++ and comeau Hi Nathan, I try to explain what I meant with my last comment. I have three variations of my code

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-14 Thread nathan at gcc dot gnu dot org
--- Additional Comments From nathan at gcc dot gnu dot org 2004-12-14 16:55 --- (In reply to comment #4) I can't tell what's being said here. IIUC, you're saying that Comeau (which uses the edg frontend) also rejects the code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18975

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-14 Thread wolfgang dot roehrl at de dot gi-de dot com
--- Additional Comments From wolfgang dot roehrl at de dot gi-de dot com 2004-12-14 14:19 --- Subject: Antwort: Copying objects with mutable non-static data members Hi all, I'm responding to Comments From nathan at gcc dot gnu dot org 2004-12-14 13:57 (bug 18975): I just tried

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-14 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-14 13:25 --- XYZ (PTR& p) : ptr(p) {} That will always call the constructor for ptr so this is invalid. -- What|Removed |Added ---

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-13 Thread nathan at gcc dot gnu dot org
--- Additional Comments From nathan at gcc dot gnu dot org 2004-12-14 13:57 --- The code is invalid and the compiler correct. The following line of reasoning is incorrect - The implicitly defined copy constructor should use the copy constructor of PTR (12.8/8). Since the member ptr of

[Bug c++/18975] Copying objects with mutable non-static data members

2004-12-13 Thread giovannibajo at libero dot it
--- Additional Comments From giovannibajo at libero dot it 2004-12-14 13:41 --- No, this is a subtler issue. I need to think about it. Nathan may want to express an opinion on this issue too. -- What|Removed |Added ---