c++.stlsoft - dmc 8.40.2n introduces a problem with stlsoft rectarr.cpp
- Mario (108/108) Mar 31 2004 Hi,
- Matthew (21/43) Apr 11 2004 Mario
- Scott Michel (22/30) Apr 12 2004 I wasn't really able to parse the bug here, but if it's something along
Hi, the update from dmc 8.38.9n to 8.40.2n introduced a problem with the stlsoft example form ddj rectarr.cpp. Just in case I have added th file ... In both cases it's the same stlsoft lib which comes with the 8.38 CD version. Only the compiler was updated. D:\mario\src\cc\palooza\speed4>dmc -DSTRINGTOK_STLSOFT -o+speed -Id:\mario\dm\st lsoft -odmc_rectarr.exe rectarr.cpp link rectarr,dmc_rectarr.exe,,user32+kernel32/noi; Digital Mars C/C++ Compiler Version 8.38.9n Copyright (C) Digital Mars 2000-2003. All Rights Reserved. Written by Walter Bright www.digitalmars.com C:\mario\src\cc\palooza\speed4>dmc -DSTRINGTOK_STLSOFT -o+speed -Ic:\mario\dm\stlsoft -odmc_rectarr.exe rectarr.cpp c:\mario\dm\stlsoft\stlsoft_iterator.h(675) : Error: function expected Internal error: template 1902 --- errorlevel 1 Digital Mars C/C++ Compiler Version 8.40.2n Copyright (C) Digital Mars 2000-2004. All Rights Reserved. Written by Walter Bright www.digitalmars.com Thanks in advance -- Mario begin 0644 rectarr.cpp M+RH +R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\-"B`J($9I;&4Z M"0ER96-T87)R+F-P<`T*("H-"B`J(%!U<G!O<V4Z"0E497-T('!R;V=R86T M9F]R(%)E8W1A;F=U;&%R(&%R<F%Y<PT*("H-"B`J($-R96%T960)"3$V=& M>6YE<VES+F-O;2YA=2]S;V9T=V%R90T*("H-"B`J("\O+R\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M"G1Y<&5D968)<W1L<V]F=%]N<U]Q=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-E6S-=(#T M,3L *RMI,2D-" D)"0D)>PT*"0D)"0D)<V]U<F-E6S5=(#T )V$G("L *&DQ M,"D /#P M,&8I.PT*"0D)"0D)"7-O=7)C95LV72`]("=A)R`K(" H:3( )B`P>&8P*2`\ M8V-E<W, :&5R92`N+BX-" D)"0D)"0EA<G)A>2YA=%]U;F-H96-K960H:3`L M960 )B!I;F1E>&5D(&%C8V5S<R!H97)E+ T*"0D)"0D)"71O=&%L("L](&%R M7V9M="`B(&EN("5D(')E<&5A=',[7'1;)60L("5D+"`E9%TZ("5D7&XB+`T* M"0D)7U]35$Q33T947T-/35!)3$527TQ!0D5,7U-44DE.1RP-" D)"6-O=6YT M97(N9V5T7VUI;&QI<V5C;VYD<R I+`T*"0D)251%4D%424].4RP-" D)"40P J+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+PT* ` end
Mar 31 2004
Mario I'm pretty sure this is a flaw with DMC++'s handling of static initialiser objects (aka Schwarz Counter's). I've mentioned it before to Walter, and there was a workaround built into various headers - look for s_performance_counter_class_constructor in winstl_performance_counter.h - but it looks like 8.40 makes the problem even worse, as the workaround no longer works at all. If I can isolate it down sufficiently, I'll post a sample bug on the C++ newsgroup, and hopefully a fix can go in 8.41. For the moment, the answer is simply to comment out both definitions of s_performance_counter_class_constructor in winstl_performance_counter.h. (There's also a similar use of initialisers in winstl_high_performance_counter.h.) Cheers Matthew "Mario" <Mario_member pathlink.com> wrote in message news:c4e9kp$1acb$1 digitaldaemon.com...Hi, the update from dmc 8.38.9n to 8.40.2n introduced a problem with thestlsoftexample form ddj rectarr.cpp. Just in case I have added th file ... In both cases it's the same stlsoft lib which comes with the 8.38 CDversion.Only the compiler was updated.D:\mario\src\cc\palooza\speed4>dmc -DSTRINGTOK_STLSOFT -o+speed -Id:\mario\d m\stlsoft -odmc_rectarr.exe rectarr.cpp link rectarr,dmc_rectarr.exe,,user32+kernel32/noi; Digital Mars C/C++ Compiler Version 8.38.9n Copyright (C) Digital Mars 2000-2003. All Rights Reserved. Written by Walter Bright www.digitalmars.com C:\mario\src\cc\palooza\speed4>dmc -DSTRINGTOK_STLSOFT -o+speed -Ic:\mario\dm\stlsoft -odmc_rectarr.exe rectarr.cpp c:\mario\dm\stlsoft\stlsoft_iterator.h(675) : Error: function expected Internal error: template 1902 --- errorlevel 1 Digital Mars C/C++ Compiler Version 8.40.2n Copyright (C) Digital Mars 2000-2004. All Rights Reserved. Written by Walter Bright www.digitalmars.com Thanks in advance -- Mario
Apr 11 2004
In c++ Matthew <matthew stlsoft.org> wrote:Mario I'm pretty sure this is a flaw with DMC++'s handling of static initialiser objects (aka Schwarz Counter's). I've mentioned it before to Walter, and there was a workaround built into various headers - look for s_performance_counter_class_constructor in winstl_performance_counter.h - but it looks like 8.40 makes the problem even worse, as the workaround no longer works at all.I wasn't really able to parse the bug here, but if it's something along the lines of "static objects don't get constructed", e.g.: ---- myfile.cxx ---- #include <iostream> struct wombat { wombat(int c_arg) { std::cout << "wombat ctor, carg = " << c_arg << std::endl; } ~wombat() { }; }; static wombat private_marsupial_thingy(1); ---- end of file ---- In the 8.38 compiler, "wombat ctor, carg = 1" wasn't printed b/c static objects' ctors didn't get called. The workaround is to use anonymous namespaces, e.g.: namespace { wombat private_marsupial_thingy(1); }; or upgrade to 8.39. -scooter
Apr 12 2004