[cfe-dev] [PATCH] -Wconversion-null
James K. Lowden
jklowden at schemamania.org
Wed Mar 14 21:15:05 PDT 2012
On Tue, 13 Mar 2012 23:04:35 +0100
Lubos Lunak <l.lunak at suse.cz> wrote:
> the attached patch adds option -Wconversion-null . It is pretty much
> the same like http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35669 .
Am I missing the point entirely? If I do this:
#undef NULL
#define NULL 0
The code you presented is valid C++ and the proposed warnings are all
misplaced. If NULL is defined as
(void*)0;
or somesuch, warnings should occur anyway on architectures that have
bigger pointers than ints.
--jkl
More information about the cfe-dev
mailing list