This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++ feature request: cast from void * warning
- To: egcs at cygnus dot com
- Subject: C++ feature request: cast from void * warning
- From: Tom Covney <tom4 at nym dot alias dot net>
- Date: 4 Jun 1998 04:20:23 -0000
Is this the right address for feature requests? If so, I'd like to
make a relatively simple feature request for a flag called something
like -Wcast-from-void-pointer / -Wno-cast-from-void-pointer that can
turn on and off the following warning:
warning: ANSI C++ forbids implicit conversion from `void *' in assignment
The warning should obviously be on by default, as implicit casts from
(void *) are incorrect C++ and a bad idea (given features like
multiple inheritence). However, it would occasionally be nice to
import C code into C++ without, for instance, the need to sanitize
every single call to malloc. Right now, doing so requires turning off
the -Werror flag, which may result in other more serious warnings
going unnoticed.
This warning might also be useful as an option to the C compiler, for
people attempting to write "clean C". (Of course, it should be off by
default even with -Wall specified.)
Please CC me on any responses as I am not currently subscribed to the
list. Thanks.