This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libstdc++]: Avoid -Wcast-qual warnings in src/c++98/compatibility.cc


On Wed, Aug 14, 2013 at 10:29 AM, Jakub Jelinek <jakub@redhat.com> wrote:

>> >2013-08-07  Uros Bizjak  <ubizjak@gmail.com>
>> >
>> >     * src/c++98/compatibility.cc (_ZTIe): Use const_cast to avoid warning.
>> >     (_ZTIPe): Ditto.
>> >     (ZTIPKe): Ditto.
>> >
>> >The patch was bootstrapped on alpha-linux-gnu, regression test is still running.
>> >
>> >OK for mainline if regtest shows no problems? Also for 4.8?
>> I think you want in any case Jakub to have a look.
>
> Changing all those (void *) casts into (const void *) in the _ZTIe,
> _ZTIPe and _ZTIPKe initializers seems to also work.  I'm not really a C++
> guy, so I'll leave whether (const void *) or const_cast should be used
> to libstdc++ maintainers.  I'm just surprised you haven't changed
> all the spots, just some of them, and
> (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2] and similar
> and (void *) 1L etc. were left untouched.

These didn't emit warnings for my target (alpha), so also not being a
C++ person, I left them as they were.

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]