This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: coercion warnings for NULL in C front end
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 07 Jul 2006 02:45:32 +0200
- Subject: Re: coercion warnings for NULL in C front end
- References: <6c33472e0607061454u3f3b3c07rc885c7c3c3245299@mail.gmail.com>
"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:
[...]
| int main()
| {
| int i = NULL; // { dg-warning "" } converting NULL to non-pointer type
In many C implementations, NULL is defined as
#define NULL ((void *) 0)
which renders the above initialization ill-formed -- not just a warning.
-- Gaby