This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: template instantiation problem
- From: "Giovanni Bajo" <rasky at develer dot com>
- To: "Immanuel Litzroth" <immanuell at enfocus dot be>
- Cc: <gcc-bugs at gcc dot gnu dot org>
- Date: Thu, 23 Jun 2005 15:05:06 +0200
- Subject: Re: template instantiation problem
- References: <POWERSERVERN9VlrIXt00000283@office.enfocus.be>
Immanuel Litzroth <immanuell@enfocus.be> wrote:
> The problem seems to be that recent gcc's dont compile the second do_call
> because they interpret 0 as being of type int.
Bad, bad GCC, how can it believe that the literal "0" is of type int! ;)
Jokes aside, previous GCC versions were buggy in this regard, and they were
allowing a conversion of "0" to pointer type. This is not allowed by the
ISO/ANSI C++ standard and has been fixed in later versions. Your code is
ill-formed. If you are not convinced, please bring this issue to a C++
discussion area, like comp.std.c++ or comp.lang.c++.moderated, thanks.
--
Giovanni Bajo