This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix bug 5089
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 31 Dec 2001 09:33:03 -0800
- Subject: Re: [C++ PATCH] Fix bug 5089
--On Saturday, December 29, 2001 12:14:29 PM +0000 Nathan Sidwell
<nathan@codesourcery.com> wrote:
> Hi,
> this fixes 5089, a change request. -Wold-style-cast would warn about
> all oldstyle casts. I & the submitter think it shouldn't warn about
> casts to void.
> 1) Those have a completely unambiguous meaning
> 2) IMO, (void)foo is clearer than static_cast<void> (foo)
> 3) as the submitter pointed out, assert macros make liberal use of
> void casts, and thus renderers the warning rather useless.
I agree.
> built & tested on i686-pc-linux-gnu, ok?
Yes, thanks.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com