[Bug c++/57599] result of dynamic_castcv T is just T

2013-06-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

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

--- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com ---
Fixed for 4.9.0.


[Bug c++/57599] result of dynamic_castcv T is just T

2013-06-14 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599

--- Comment #7 from Andrey Belevantsev abel at gcc dot gnu.org ---
(In reply to Paolo Carlini from comment #6)
 Fixed for 4.9.0.

Do you plan to backport this to 4.7 and 4.8?


[Bug c++/57599] result of dynamic_castcv T is just T

2013-06-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599

--- Comment #8 from Paolo Carlini paolo.carlini at oracle dot com ---
No, because isn't a regression. If you care a lot about that, just ask on the
mailing list.


[Bug c++/57599] result of dynamic_castcv T is just T

2013-06-13 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599

Daniel Krügler daniel.kruegler at googlemail dot com changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #4 from Daniel Krügler daniel.kruegler at googlemail dot com ---
I created a test case for all type conversion operators:

struct A {};
struct B : public A {};

templateclass, class
struct is_same { static constexpr bool value = false; };

templateclass T
struct is_sameT, T { static constexpr bool value = true; };

templateclass T
T val();

static_assert(is_samedecltype(static_castconst A*(valB*())), const
A*::value, Ouch);
static_assert(is_samedecltype(static_castconst A(valB())), const
A::value, Ouch);

static_assert(is_samedecltype(const_castconst A*(valA*())), const
A*::value, Ouch);
static_assert(is_samedecltype(const_castconst A(valA())), const
A::value, Ouch);

static_assert(is_samedecltype(reinterpret_castconst A*(valB*())), const
A*::value, Ouch);
static_assert(is_samedecltype(reinterpret_castconst A(valB())), const
A::value, Ouch);

static_assert(is_samedecltype(dynamic_castconst A*(valB*())), const
A*::value, Ouch); // Error!
static_assert(is_samedecltype(dynamic_castconst A(valB())), const
A::value, Ouch); // Error!

In agreement with that bug report I see failures for the last two even for gcc
4.9.0 20130609 (experimental)

[Bug c++/57599] result of dynamic_castcv T is just T

2013-06-13 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599

--- Comment #5 from Andrey Belevantsev abel at gcc dot gnu.org ---
(In reply to Daniel Krügler from comment #4)
 I created a test case for all type conversion operators:

Paolo has already submitted a patch with the expanded test case at
http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00760.html/

[Bug c++/57599] result of dynamic_castcv T is just T

2013-06-12 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2013-06-12
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
 Ever confirmed|0   |1

--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com ---
On it.