[Bug c++/36872] __has_nothrow_copy(T) false for T with a throwing vararg ctor

2008-07-21 Thread paolo at gcc dot gnu dot org


--- Comment #5 from paolo at gcc dot gnu dot org  2008-07-21 16:19 ---
Subject: Bug 36872

Author: paolo
Date: Mon Jul 21 16:18:38 2008
New Revision: 138034

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=138034
Log:
/cp
2008-07-21  Paolo Carlini  [EMAIL PROTECTED]

PR c++/36871
PR c++/36872
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
copy constructors and copy assignment operators proper.

/testsuite
2008-07-21  Paolo Carlini  [EMAIL PROTECTED]

PR c++/36871
PR c++/36872
* g++.dg/ext/has_nothrow_copy.C: Rename to...
* g++.dg/ext/has_nothrow_copy-1.C: ... this.
* g++.dg/ext/has_nothrow_copy-2.C: New.
* g++.dg/ext/has_nothrow_copy-3.C: Likewise.
* g++.dg/ext/has_nothrow_copy-4.C: Likewise.
* g++.dg/ext/has_nothrow_copy-5.C: Likewise.
* g++.dg/ext/has_nothrow_copy-6.C: Likewise.
* g++.dg/ext/has_nothrow_copy-7.C: Likewise.

Added:
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C
  - copied unchanged from r138024,
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy.C
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy-3.C
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy-4.C
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy-5.C
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy-6.C
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C
Removed:
trunk/gcc/testsuite/g++.dg/ext/has_nothrow_copy.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36872



[Bug c++/36872] __has_nothrow_copy(T) false for T with a throwing vararg ctor

2008-07-21 Thread paolo dot carlini at oracle dot com


--- Comment #6 from paolo dot carlini at oracle dot com  2008-07-21 16:21 
---
Fixed for 4.4.0.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36872



[Bug c++/36872] __has_nothrow_copy(T) false for T with a throwing vararg ctor

2008-07-19 Thread paolo dot carlini at oracle dot com


--- Comment #3 from paolo dot carlini at oracle dot com  2008-07-19 12:04 
---
Martin, I'm attaching a draft combined patch (vs current tree, fixes 36870,
36871, 37872) which I mean to submit after the one for 36870 alone (already
posted).

In the meanwhile, if you want, you can apply it to your 4.3 tree, only rebuild
the C++ compiler and experiment with nasty corner cases ;)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36872



[Bug c++/36872] __has_nothrow_copy(T) false for T with a throwing vararg ctor

2008-07-19 Thread paolo dot carlini at oracle dot com


--- Comment #4 from paolo dot carlini at oracle dot com  2008-07-19 12:04 
---
Created an attachment (id=15930)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15930action=view)
Draft


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36872



[Bug c++/36872] __has_nothrow_copy(T) false for T with a throwing vararg ctor

2008-07-18 Thread sebor at roguewave dot com


--- Comment #1 from sebor at roguewave dot com  2008-07-19 00:53 ---
Or any other throwing ctor, for that matter:

$ cat u.cpp  g++ u.cpp -std=c++0x  ./a.out 
#include cassert

struct S {
S (const S) throw ();
S (int) throw (int);
};


int main ()
{
assert (__has_nothrow_copy (S));
}

a.out: u.cpp:11: int main(): Assertion `__has_nothrow_copy (S)' failed.
Aborted


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36872



[Bug c++/36872] __has_nothrow_copy(T) false for T with a throwing vararg ctor

2008-07-18 Thread paolo dot carlini at oracle dot com


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |paolo dot carlini at oracle
   |dot org |dot com
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-07-19 00:56:50
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36872



[Bug c++/36872] __has_nothrow_copy(T) false for T with a throwing vararg ctor

2008-07-18 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2008-07-19 00:57 
---
Martin, Ok. I know where the problem is for __has_nothrow_copy and assign.
Thanks.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36872