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: [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


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