This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
"redefinition" of template default argument causes error on egcs 1.1b (no error on 2.8.1)
- To: egcs-bugs at cygnus dot com
- Subject: "redefinition" of template default argument causes error on egcs 1.1b (no error on 2.8.1)
- From: Corey Kosak <kosak at cs dot cmu dot edu>
- Date: Tue, 08 Sep 1998 15:38:34 -0400
% cat test.cc && g++ -v && g++ test.cc && echo ok && g++ -DBUG test.cc
template<typename T=int> struct cow; //forward declaration
#ifdef BUG
template<typename T=int> struct cow { T data; };
#else
template<typename T> struct cow { T data; };
#endif
int main()
{
cow<> x;
}
Reading specs from /afs/cs.cmu.edu/project/cmcl-kosak/various-gcc/egcs-1.1b/i386_linux2/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
ok
test.cc:4: redefinition of default argument for `class T'
test.cc:1: original definition appeared here