From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Chicares To: egcs Subject: Bug report Date: Mon, 14 Sep 1998 21:16:00 -0000 Message-id: <35FDD910.E38738FC@ibm.net> X-SW-Source: 1998-09/msg00471.html List-Id: // result of g++ -v // Reading specs from C:\MINGW32\LIB\GCC-LIB\i386-mingw32\egcs-2.90.27\specs // gcc version egcs-2.90.27 980315 (egcs-1.0.2 release) // Expression template uses recursion, specialization // Instantiations evaluated completely at compile time template class Factorial { public: enum {value = (N>12)? -1 ? N * Factorial::value}; }; // specialization for 1, ends recursive evaluation class Factorial<0> { public: enum {value = 1}; }; # include int main () { Factorial< 6> x6; cout << 6 << "! = " << x6.value << endl; } // Windows 95 OSR2, using MingW32 // Result of compiling as // g++ bug01.cpp /* bug01.cpp:10: parse error before `}' bug01.cpp:15: parse error before `;' In file included from C:\\MINGW32\\LIB\\GCC-LIB\\i386-mingw32\\egcs-2.90.27\\../ ../../../include/g++/iostream.h:31, from C:\\MINGW32\\LIB\\GCC-LIB\\i386-mingw32\\egcs-2.90.27\\../ ../../../include/g++/iostream:6, from bug01.cpp:18: C:\\MINGW32\\LIB\\GCC-LIB\\i386-mingw32\\egcs-2.90.27\\../../../../include/g++/s treambuf.h:211: parse error before `;' [Then the operating system says:] CC1PLUS caused an invalid page fault in module CC1PLUS.EXE at 0157:00436927. Registers: EAX=00000000 CS=0157 EIP=00436927 EFLGS=00010206 EBX=00579510 SS=015f ESP=026cf354 EBP=026cf3a4 ECX=00000000 DS=015f ESI=005c768c FS=4a87 EDX=026cf2a0 ES=015f EDI=00000000 GS=0000 Bytes at CS:EIP: 0f b6 50 08 81 fa 9c 00 00 00 0f 87 6b 13 00 00 Stack dump: 00579510 005c768c 00000003 bffc1470 bff79d96 bff7411f 00000010 005c7650 026cf394 004750f6 005b51d4 026cf3a8 00000010 00000005 005bd460 005c7650 */