This is the mail archive of the gcc@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: coercion warnings for NULL in C front end


"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


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