This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/5310] Weird warnings about using (int)NULL
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2007 00:49:33 -0000
- Subject: [Bug c++/5310] Weird warnings about using (int)NULL
- References: <bug-5310-2018@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from manu at gcc dot gnu dot org 2007-05-23 01:49 -------
(In reply to comment #3)
> (3) since __null is of type int, the cast to int was a no-op, and
> since the C++ front-end currently does not have a high level
> representation of the program (e.g. lowering is done as part of
> parsing), it does not have ways to make the difference.
>
Where is lowering performed? It actually seems that the cast (long)__null is
performed somewhere (where?) while parsing, while (int)__null is just accepted
as __null. I tried to follow up the code with just long i = (long) __null; but
the C++ front-end is impossible to debug for me. It just jumps again and again
to the same places. Is there any trick to debug this kind of thing?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5310