This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: change in templates in gcc-4
- From: "Giovanni Bajo" <rasky at develer dot com>
- To: "Davy Durham" <pubaddr2 at davyandbeth dot com>
- Cc: <gcc-bugs at gcc dot gnu dot org>
- Date: Sat, 18 Jun 2005 20:44:26 +0200
- Subject: Re: change in templates in gcc-4
- References: <42B469DB.2000503@davyandbeth.com>
Davy Durham <pubaddr2@davyandbeth.com> wrote:
> Hey, question.. Just wondering if gcc is supposed to behave this way
now.
> For example, I have a template: [...]
>
> In gcc-3, there was no error until you tried to call f.method2(), but in
> gcc-4 it gives the error when foo<bar> is instantiated whether the
> method is called or not. I used this feature intentionally in gcc-3,
> but I wanted to know if it's an ANSI thing one way or another. And if
> it's not ANSI compliant now, then I guess it needs to be fixed in gcc.
The behaviour of GCC 4 is compliant to the ANSI standard in this regard, so
you will have to fix your code.
For the next time, remember to provide a fully compilable testcase (for copy
& paste), and to clarify what the standard says through other means
(newsgroups as comp.lang.c++.moderated and comp.std.c++, tests with the
Comeau online compiler, etc.) so to report issues which are more likely real
GCC bugs.
Thanks anyway for taking the time of reporting this issue!
--
Giovanni Bajo