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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-02 
11:26:37 UTC ---
Well, "broken" seems in any case an exaggeration to me. In this case triggers
as expected, for example:

  char* p = (char*)"txt";

because it looks like a pure const_cast, from the C++ point of view. If it
doesn't and we proceed checking whether it's a static_cast, reinterpret_cast,
etc, we have this kind of comment (before build_static_cast_1):

/* Perform a static_cast from EXPR to TYPE.  When C_CAST_P is true,
   this static_cast is being attempted as one of the possible casts
   allowed by a C-style cast.  (In that case, accessibility of base
   classes is not considered, and it is OK to cast away
   constness.) ...

thus, the behavior seems *definitely* intended. Maybe Jason can help finishing
the triage of this.

Reply via email to