This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug.cpp
- To: "'egcs-bugs at cygnus dot com'" <egcs-bugs at cygnus dot com>
- Subject: bug.cpp
- From: "Dzbek, Rafal" <DzbekR at Exchange dot AtlantaGA dot NCR dot com>
- Date: Fri, 4 Sep 1998 10:34:16 -0400
//MINGW32
//egcs-2.91.57
//gcc bug.cpp -lstdc++
#include <iostream>
template <char const NAME[]>
class S
{
public:
S() {cout << endl << NAME; }
};
#define GOTCHA
#ifdef GOTCHA
extern char const CS[]="Hello template!";
main()
{
S<CS> SS;
return 0;
}
#else //this version works
extern char const CS[];//DIFF
main()
{
S<CS> SS;
return 0;
}
char const CS[]="gotcha";//DIFF
#endif