[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2016-02-03 Thread katzfiller5 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

Che Amaya  changed:

   What|Removed |Added

 CC||katzfiller5 at gmail dot com

--- Comment #15 from Che Amaya  ---
Timely post ! For my two cents , if others wants to merge PDF or PNG files , my
friend came across a tool here http://www.altomerge.com/;
>http://www.AltoMerge.com.

[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2014-05-06 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 CC||hs at xmission dot com

--- Comment #14 from Jonathan Wakely redi at gcc dot gnu.org ---
*** Bug 61087 has been marked as a duplicate of this bug. ***


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2013-10-25 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

--- Comment #13 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org ---
Author: paolo
Date: Fri Oct 25 10:54:56 2013
New Revision: 204057

URL: http://gcc.gnu.org/viewcvs?rev=204057root=gccview=rev
Log:
2013-10-25  Paolo Carlini  paolo.carl...@oracle.com

PR c++/54812
* g++.dg/cpp0x/defaulted47.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/defaulted47.C
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2013-10-23 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |4.9.0

--- Comment #12 from Paolo Carlini paolo.carlini at oracle dot com ---
Thus this is fixed in r203985.


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2013-07-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

--- Comment #9 from Jonathan Wakely redi at gcc dot gnu.org ---
*** Bug 56429 has been marked as a duplicate of this bug. ***


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2013-07-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

--- Comment #10 from Jonathan Wakely redi at gcc dot gnu.org ---
(In reply to Paolo Carlini from comment #3)
 Of course it should be fixed, it *must* be fixed, actually! And it's really
 annoying that this bug affecting private defaulted destructors (which, I
 bet, aren't that common for most programs not using SFINAE tricks!?!)

The bug affects protected destructors too, and they're commonly used for base
classes to prevent deletion via pointer-to-base.  This bug means you can't make
them trivial by defining them as defaulted.

The problem isn't confined to delete expressions as the example from PR56429
shows:

class A
{
A() = default;
};
struct B : A { };

B b;


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2013-07-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

--- Comment #11 from Paolo Carlini paolo.carlini at oracle dot com ---
Jason call if we want this to be a P2. Well, maybe some wrong code bugs I
recently bumped to P2 should be P1 ;)


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2013-06-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 CC||redi at gcc dot gnu.org

--- Comment #8 from Jonathan Wakely redi at gcc dot gnu.org ---
*** Bug 57595 has been marked as a duplicate of this bug. ***


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2013-05-30 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

--- Comment #7 from Jason Merrill jason at gcc dot gnu.org ---
Various places in the compiler need to be updated to not assume that trivial
implies callable.


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2012-10-06 Thread daniel.kruegler at googlemail dot com

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

--- Comment #6 from Daniel Krügler daniel.kruegler at googlemail dot com 
2012-10-06 08:11:48 UTC ---
(In reply to comment #5)
I double-checked whether this might be related to

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1507

from a different perspective, but I'm pretty sure it isn't. 12.4 p11 seems very
clear that the destructor would be called implicitly here and that access
checking happens.


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2012-10-05 Thread paolo.carlini at oracle dot com


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



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2012-10-05

 Ever Confirmed|0   |1



--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2012-10-05 
20:53:35 UTC ---

Uhm, this is not trivial to fix. The difference between P1 and P3 is that for

the former from build_delete we call build_dtor_call which eventually also

calls the required perform_or_defer_access_check, whereas for the latter the

function just notices that TYPE_HAS_TRIVIAL_DESTRUCTOR and early returns (via

build_op_delete_call). Arguably, a TYPE_HAS_TRIVIAL_DESTRUCTOR true for a

destructor which actually is private and can't be called sounds a bit strange

but for sure the choice makes sense wrt the rest of the front-end and the

standard... I'll double check soon a few things.



Anyway, here, I only wanted to ask you if this is a show-stopper for your work,

because I don't know how much time it will take.


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2012-10-05 Thread daniel.kruegler at googlemail dot com

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

--- Comment #2 from Daniel Krügler daniel.kruegler at googlemail dot com 
2012-10-05 21:00:31 UTC ---
(In reply to comment #1)
 Anyway, here, I only wanted to ask you if this is a show-stopper for your 
 work,
 because I don't know how much time it will take.

While I think that this should be fixed, it will only prevent that I would
directly convert is_constructible to use the combined 

::delete ::new ((void*) nullptr) T(args) 

expression. Our current implementation is not sensitive to this problem,
because we use is_destructible within. I noticed that there are still a bunches
of opportunities to simplify is_constructible (and friends) because a lot of
previous compiler defects have been fixed. So, really no need to hurry!


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2012-10-05 Thread paolo.carlini at oracle dot com


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



--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com 2012-10-05 
21:08:04 UTC ---

Of course it should be fixed, it *must* be fixed, actually! And it's really

annoying that this bug affecting private defaulted destructors (which, I bet,

aren't that common for most programs not using SFINAE tricks!?!) is preventing

us from deploying right now the very elegant ::delete ::new pattern which

otherwise finally works pretty well. What can I add? Do your best, and thanks

again!


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2012-10-05 Thread paolo.carlini at oracle dot com


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



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC||jason at gcc dot gnu.org



--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com 2012-10-05 
21:10:25 UTC ---

Let's ask Jason right now, if he can see a smart way to do access control on

defaulted destructors...


[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2012-10-05 Thread paolo.carlini at oracle dot com


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



--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com 2012-10-05 
23:25:47 UTC ---

By the way, this compiles:



struct P3 {

private:

  ~P3() = default;

};



P3 p3;



thus there is little hope that we get an error for #22 ..