This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/5089: -Wold-style-cast warns about cast to void
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: nathan at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 29 Dec 2001 15:06:01 -0000
- Subject: Re: c++/5089: -Wold-style-cast warns about cast to void
- Reply-to: Nathan Sidwell <nathan at codesourcery dot com>
The following reply was made to PR c++/5089; it has been noted by GNATS.
From: Nathan Sidwell <nathan@codesourcery.com>
To: jturner <jturner@mail.alum.rpi.edu>
Cc: gcc-prs <gcc-prs@gcc.gnu.org>, llib <llib@computer.org>,
nathan <nathan@gcc.gnu.org>, gcc-bugs <gcc-bugs@gcc.gnu.org>,
nobody <nobody@gcc.gnu.org>, gcc-gnats <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/5089: -Wold-style-cast warns about cast to void
Date: Sat, 29 Dec 2001 15:04:14 +0000
Jeffrey Turner wrote:
>
> I don't see this as a problem. It is what the warning says.
> You should use the ever dangerous <reinterpret_cast> instead.
reinterpret_cast<void>(whatever)
is invalid.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org