================================================= Combined gSTLFilt.pl / Proxy c++.cpp Revision Log ================================================= ==== 2005 ==== 6/29 (gSTLFilt.pl v2.47a) Fixed problem with $def_iter_policy being set to "L" not working right (thanks, Dave Abrahams, for pointing this one out.) Also added more comments and improved $COPTS handling for gfilt (the Unix shell script driver) 2/16 A bit more cleanup to the gfilt script. It now works on freeBSD (added line-continuation to the long list of cases in the case statement... thank you Simon Barner for pointing that one out). Also removed a spurious case from the case list. 2/11 The 'gfilt' script (for *nix distributions) was accidentally packaged into the .tar-format distribution with Windows-style (CRLF) line terminators, causing some shell interpreters grief. This has been corrected. ==== 2004 ==== 12/17 Modified the *nix shell script driver "gfilt". It had been missing support for several new options that had been added to the Perl script. Also added some more comments to gfilt so it would contain at least some rudimentary documentation. 11/26 (gSTLFilt.pl v2.47) Added the ability to strip trailing "null"-style boost arguments from template argument lists. By default, the arguments boost::tuples::null_type and mpl_::na are removed. The following notes all relate to this feature. Any number of additional fully-qualified type names may be added by specifying the -nullarg:xxx option once for each type name (with xxx being the name to be deleted). if xxx is 'clear', the null argument list is emptied; subsequent -nullarg specifications appearing on the command line will work, but not the defaults as listed above (unless they're re-specified using the -nullarg option later on the command line.) The default list of automatically-deleted typenames may be configured by editing the @nullargs variable in the user-configurable section of the Perl script. 11/25 (gSTLFilt.pl v2.46) Corrected filtering bug related to std::vector. Introduced the "null"-style argument stripping feature, but decided to change the way it works a bit. See the description for the v2.47 release above. 08/29 (gSTLFilt.pl v2.45) Patched a bug that caused in internal error. You don't want to know the details...and you especially wouldn't want to know the fix ;-) 08/10 (gSTLFilt.pl v2.44) Corrected a bug that broke the "with clause" substitution routine when an array dimension value in square brackets appeared within the substituted types. 2/21 (gSTLFilt.pl v2.43a) Augmented list of recognized source file extensions within the Perl script for consistency with recent c++.cpp corrections. 1/16 (gSTLFilt.pl v2.43) Corrected a bug where template instantiation backtrace re-ordering would fail to emit the backtrace at all in certain cases when the backtrace appeared at the very end of the error stream. 1/15 (c++.cpp v3.43a) Added ".cc" as a recognized C++ source file extension, and ".o" as a recognized object file extension, to the Proxy compiler. Thanks to Stefan Naewe for pointing out these omissions. ==== 2003 ==== 12/24 Fixed inconsistencies between code, comments and documentaion with respect to some default values of the Proxy-gcc.INI configuration parameters. 12/23 (gSTLFilt.pl v2.42, c++.cpp v3.43) Corrected a /meta:D mode parsing bug that caused internal errors if the sequence ">> " appeared in a message in the context of closing delimiters for nested template parameter lists. Corrected another /meta:D bug involving appearances of the sequence "()" in various contexts. Corrected a premature closing of the NativeLog.txt file in the event of an internal parsing error, causing errors on all subsequent attempts to write to the file. The Proxy c++.exe now accepts the /lognative option to force creation of the Perl script debugging log file NativeLog.txt. Formerly, the only way to specify creation of the log file when using the Proxy c++ was to configure the option LOG_NATIVE_MSGS in Proxy-gcc.INI. 12/17 (gSTLFilt.pl v2.41a [really!], updated Proxy-gcc.INI): Oops, the v2.41a Perl script didn't make it into the distributions from 12/04 as it was supposed to. Sorry about that. Several corrections to the comments in Proxy-gcc.INI: 1. The line of the [common] section of Proxy-gcc.INI that began with: ;native_cl=c++2.exe incorrectly used the name "native_cl" for the option. It should have begun with: ;native_gcc=c++2.exe The remaining commentary on that line was also incorrect and has now been fixed and clarified. 2. Correction: In the comment at the end of the DEBUG_DIR line, the debug log file name created automatically is gcc-dblog.txt, *not* cl-log.txt. 12/04 (gSTLFilt.pl v2.41a) Fixed wrapping error in /break:D mode when the text ">", "<", ">>" or "<<" appeared in a message. 11/24 (gSTLFilt.pl v2.41) Corrected a problem where "within this context" lines were getting separated from the lines they referred to. 11/19 (gSTLFilt.pl v2.40) Made sure that lines are never wrapped in the middle of pathnames, even if that means an output line length may exceed the /width setting (figuring it is more important for editors to be able to automatically locate the point of the error than it is to unconditionally honor the /width value). 11/14 (gSTLFilt.pl v2.39e) In messages referring to object files, gcc's mangled-names-from-hell are sometimes followed on the same line by long typenames that really need wrapping. Those long typenames are now processed instead of being "thrown out with the bath water" ;-) 11/12 (gSTLFilt.pl v2.39d) Patched an obscure condition that drew a "Use of uninitialized value in multiplication (*)..." error during -break:D mode wrapping. 11/11 (gSTLFilt.pl v2.39c) Corrected Dave-mode reordering bug where multi-line primary error messages were being split up, with the instantiation backtrace ending up in the middle. Corrected possible problem recognizing "const pointers" (as opposed to pointers-to-const) in certain constructs. 08/08 (gSTLFilt.pl v2.39a) Tuned some of the comments at the top of the script. 07/29 (gSTLFilt.pl v2.39) Added two user-configurable variables to the Perl script (no command- line access to these): $keep_stdns: if 1, does NOT strip the standard namespace qualifiers "std::", "__gnu_cxx", "_STL" or "_STLD" from names. Note that the usual behavior is to strip them, and all the STL library error filtering counts on that having been done. This option, when set to 1, is useful only to retain all information in conjunction with long typename wrapping (-break:D). $show_internal_err: 1 to display information about internal errors in the long typename wrapping (-break:D) mechanism, 0 to suppress them. Please leave this at 1 and follow the instructions re. emailing the log file if an error occurs. If you need to set it to 0 due to a persistent error, please set it back to 1 after a fix has been provided. Thanks! 06/06 (gSTLFilt.pl v2.38) Corrected Plain-mode wrapping logic to fix another off-by-1 error that had been emitting spurious blank lines. 06/05 (c++.CPP v3.42a) Wildcards (such as *.cpp) now work on the Proxy c++ command line (just needed to be linked with SETARGV.OBJ). 05/31 (gSTLFilt.pl v2.37) /iter:L now forces $newiter to 'iterator', so the word 'iterator' is never shortened in /iter:L mode. 05/29 (gSTLFilt.pl v2.36) Several /break:D mode bugs fixed: - '(' character with spaces around it was not being recognized as in- creasing the nesting level, causing an internal error later on the line when the matching ')' was encountered - '>=' and '<=' operators were not excluded from '>' and '<' detection - indentation was off by a space during /closewrap processing Dropped the $space_close_brackets option; it now always puts spaces between consecutive '>' characters (unless they're the >> operator, with any luck.) This was necessary to keep the /break:D wrapping logic from getting out of control. Improved detection of object/library filenames in messages (suffixes of .a, .o, .obj) so as to disable /break:D wrapping for those messages. The main problem was that certain mangled-names-from-hell were wreaking havoc with the wrapping algorithm. 05/15 (gSTLFilt.pl v2.35, C++.CPP v3.42) Added new /meta option as a convenience to auto-configure the auto-wrapping options. See the entry from 2/21 below for details on the /break, /cbreak and /closewrap options related to this: /meta:x Configure for metaprogramming [Y] or not [N] as follows: /meta:y (or just /meta) forces /break:D, and forces /cbreak and /closewrap options according to values specified in the $meta_y_cbreak and $meta_y_closewrap variable initiali- zations, respectively. /meta:n forces /break:P (/cbreak and /closewrap don't apply.) If no /meta option is present, the default values for /break, /cbreak and /closewrap are determined by the INI file (if using a Proxy compiler) or by the settings of $break_algorithm, $comma_wrap and $close_wrap in the user-configurable area of the Perl script. In either case, if the output width hasn't yet been set to a non-zero value, it is set to 80 (choosing a wrapping flavor makes no sense with wrapping disabled.) This may be overridden by a subsequent /width option. Note also that /meta may not be specified in the INI files, because it is intended as a command-line "override" mechanism. The individual settings of /break, /cbreak and /closewrap, however, may be (and apply only when the /meta option is not used.) A new Perl script user-configurable variable, $space_after_commas, forces a space after any comma appearing in messages. Default value is 0 (don't). The default output width is now 80 universally, including when the Proxy c++ is used. Formerly, the default was 80 in the Perl script but 0 when using the Proxy c++ ... this was inconsistent with the default /break:D mode setting. 04/22 (gSTLFilt.pl v2.34) Shortened the primary regex ($t) a tad more. 04/11 STLTask (.EXE and sources) have been updated with a fix to the wxWindows library that keeps the tray icon from disappearing as a result of the taskbar re-initializing itself (such as after a Windows Explorer crash). Many thanks to Graeme Prentice for solving this long-standing problem. 04/08 (gSTLFilt.pl v2.33) Fixed a bug in STLTask that prevented it from recognizing the NATIVE_GCC configuration parameter in Proxy-GCC.INI (it was expecting "NATIVE_CL") Adjusted handling of the phrase 'iterator' to avoid shortening it unless one of the standard iterator types is involved, and added some comments to the user-configurable section to show how to disable all iterator filtering. 03/22 (gSTLFilt.pl v2.32) Fixed bug preventing "with clause" processing from handling more than one "with clause" per error message in certain cases. Fixed bug that caused an internal error in some cases when the "->" operator appeared in a message. Rather than just bailing out when an internal error occurs, the script now emits the unfiltered messages and resumes processing with the next line of input. Then at the END of the run, it requests that you send me the NativeLog.txt log file automatically created. 03/21 (C++.CPP v3.41) Fixed some messages that used the term "Proxy CL" instead of "Proxy c++" 03/19 (C++.CPP v3.40) The Proxy c++ now accepts quotation marks around pathnames in Proxy-gcc.INI, and detects faulty quotation. 03/18 Added simultaneous multi-platform support to STLTask via a new config- uration file, STLTask.INI, to be placed into the same directory as Proxy-gcc.INI. The new version of STLTask is backwards-compatible with the old Proxy-gcc.INI, so the new features don't show up unless you actually tailor and install STLTask.INI into the Windows directory. For more details, see the latest version of README-STLTask.txt in the package. 03/13 (c++.cpp v3.30) Proxy c++ command-line processing revamped considerably, to allow the C++ filename to be anywhere on the line (the previous logic, a hold-over from the MSVC Proxy CL, assumed the source file name is at or near the end of the command line and failed to launch Perl at all otherwise.) Main benefit: The Proxy c++ is now compatible with Dev-C++ !! Cleaned up QUICKSTART.txt a bit. 03/07 (c++.cpp v3.21) The name of the Proxy-gcc.INI option to configure the native compiler name is supposed to be "native_gcc", NOT "native_cl" as shown in the file as distributed. A big "Thank you!" goes to bdsoft BBS poster "rost" for catching this. I've also scoured the documentation for related gaffes, and caught a few places where the term "Proxy CL" is used in the gcc context. I've changed them to read "Proxy compiler". [Note: the functionality of the c++.exe executable as distributed has not changed; differences are at the source code level only...well, and in the version number it prints out, but that's it.] The Unix shell script, gfilt, now appends the value of environment variable $GFILTOPTS, if it exists, to the internal variable $DOPTS as the documentation says it does. I've documented, within some of the doc files, which sections apply to just Windows and which apply to both Windows and Unix. 03/03 (gSTLFilt.pl v2.31) Enhanced the /break:d mode algorithm to break before open quotes (`) if they have no matching close quote on the same line. Corrected a bug that caused breaks in the middle of words/names in certain cases when the line length was exactly equal to the width setting. Added support for re-ordering of #include file backtraces in /hdr:LD1 and /hdr:LD2 modes (previously only template instantiation backtraces were being re-ordered.) Overhauled the algorithm behind Standard Lib pathname-shortening (the /path:x command line option) considerably, for consistency and correct handling of std header names lacking extensions. 02/21 (gSTLFilt.pl v2.30) Added new line-wrapping logic designed specifically to aid readability of super-long typenames typical of template metaprogramming applications. (If you have Boost installed, the sample source file metatest.cpp illustrates these features.) New command-line options (these apply only when output width is non-zero): -break:x Break algorithm: D[ave Abrahams] (default) or P[lain] The "Dave" option wraps long complex typenames in a way that makes it easier to see parameter lists at various nesting depths. -cbreak:x Comma break: B = break before commas (default), A = break after. Just a matter of personal taste; Dave prefers before, so that's the default. -closewrap:x Wrap before unmatched close "paren" (paired delim): Y (default), don't wrap: N New script-only user-configurable variables: $space_close_brackets = 1; # 1 to force spaces between consecutive >'s $wrap_own_msgs = 0; # wrap STL Decryptor's status messages # to same output width as errors (1) or # don't (0) $smush_amps_and_stars = 0; # insert (0) or don't insert (1) space # between typename and * or & Updated the gfilt shell script (for Unix) to support the new gSTLFilt.pl command-line options, and also corrected several issues in that script reported by George Katsirelos: 1) Detection of gcc3 no longer improperly sends gcc version information to stdout 2) The exit status of the entire script now properly represents the status of the gcc compilation (so that gfilt may be used from an- other script with proper conditional behavior) 3) the PAGER variable may be set to blank to prevent use of any paginator (c++.cpp v3.20) New Proxy-gcc.INI option in [proxy.gcc] section: gcc2=true or false if true, suppresses the -fmessage-length=0 gcc command-line option. If false, supplies the option. If you switch between gcc2 and gcc3, I recommend setting gcc2 to true, then manually supply the -fmessage-length=0 option to gcc3 when necessary (e.g. via batch files that are either gcc2-specific or gcc3-specific). 02/05 (gSTLFilt.pl v2.21) Optimized the primary regex, $t, to avoid "regex too long" blowups under some older versions of Perl. This should also result in substantially faster execution under all Perl implementations. 01/18 (gSTLFilt.pl v2.20, C++.CPP v3.10) Thanks to careful detective work and some new defensive coding above and beyond the call of duty by Thomas Becker, the package is now compatible with ActivePerl 5.8. ==== 2002 ==== 12/24 (gSTLFilt.pl v2.14) Corrected an off-by-1 error in handling of the /width:nn option, to allow nn to be the actual number of available columns. Made a few other adjustments to the line break algorithm. 12/19 (gSTLFilt.pl v2.13) Found more /cand:L and /hdr:L issues and cleaned them up. 12/18 (gSTLFilt.pl v2.12) Corrected "with" clause processing for certain errors generated while using "long" candidate and/or header policies, esp. with the hash- based containers. Added /with:x option to Perl script (and Proxy c++): If set to L or N, suppresses "with" clause substitutions, so you can see the original template parameter identifier names. If set to S or Y (the default), normal (to STLFilt) "with" clause substitution is performed. Thanks to Dave Abrahams for suggesting this option. 12/17 (gSTLFilt.pl v2.11) Added /hdr:LD and /hdr:LD2 header policy variations, suggested by Dave Abrahams: /hdr:LD[1] (long, Dave Abrahams form 1. LD and LD1 are identical): actual error msg moves to front of instantiation backtrace /hdr:LD2 (long, Dave Abrahams form 2): as above, with trigger line duplicated before the backtrace Added user-configurable Perl option, $reformat_linenumbers. If set to 1, line numbers are transformed to an MSVC-like format. This may confuse some error-locating IDEs. Defaults to 0, retaining gcc's format. 10/20 (STLTask.cpp v2.6g) Fixed several bugs in STLTask: infinite dialog-box looping upon detection of corrupt configuration in certain cases, removed clipboard-related functionality (it was only tuned for the MSVC IDE), improved several status messages. 9/3 (gSTLFilt.pl v2.02, updated gfilt Unix shell script) The gfilt shell script (for Unix only) now distinguishes Decryptor options from compiler options, and dispatches each to the appropriate program. Minor tweaking of set iterator processing. 8/27 (gSTLFilt.pl v2.01) Fixed bug that emitted a spurious ":" toward end of Decryption output Corrected default initialization of the $banner variable, and associated comments. $banner is set to 'Y' now so the sign-on message is displayed by default. When invoked indirectly via the Proxy c++, the Proxy c++ includes the /banner:N option to the script to turn the sign-on message off (because the proxy c++ itself has by then already displayed a sufficient sign-on banner). (C++.CPP v3.01) Now forces "/banner:N" option to suppress gSTLFilt.pl's sign-on banner. QUICKSTART.txt: Corrected example of "trivial command line usage" to include the standard error redirection clause "2>&1" (necessary with gcc so that the diagnostics, emitted on the standard *error* stream, are fed properly to Perl for Decryption). 8/25 (gSTLFilt.pl v2.00) Support for gcc 3.1 added. Same script now filters both 2.95.x and 3.x. (C++.CPP v3.0) Initial release of gcc-specific Proxy compiler, c++.exe, for Windows distribution only (source code included as c++.cpp) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4/11 (gSTLFilt.pl v.99) Removed unnecessary regex substitutions still present after porting from previous versions of the Decryptor. 3/12 (gSTLFilt.pl v.98) Added a new variation of the header policy option: /hdr:nn, where nn is a number, sets an internal variable named $headers_to_show so that nn messages are passed thorough from each cluster of standard header messages, and the rest are suppressed. You may change the default value of $headers_to_show by setting the value of $def_hdrs_to_show in the user-configurable section of gSTLFilt.pl, and the new value will apply any time you use /hdr:M. Note: Since the /hdr:M option automatically sets $headers_to_show to the value of $def_hdrs_to_show, do not use /hdr:M and /hdr:nn simultaneously. Whenever headers or candidates are suppressed, the filter ends its session by reminding the user to use /hdr:L and/or /cand:L (as appropriate) to get more detail if needed. [If you get sick of seeing the reminders, just set the user-configurable variable "$advise_re_policy_opts" to 0.] The Windows batch script gfilt.bat, and unix driver script gfilt, now look in the environment for a variable named GFILTOPTS. If it is present, its value overrides the setting of OPTIONS built in to the script. This allows the user to try different filtering options without having to edit the script each time or manually enter the entire command pipeline sequence. Updated README.txt to properly describe behavior of /hdr:x and /cand:x. 3/11 (gSTLFilt.pl v.97) Corrected another bug where multisets were being incorrectly translated to sets. Now strips the {} from {anonymous} so that "anonymous" is recognized as a type name. Added some documentation to the Bugs/Limitations section of README.txt to explain my "generic" iterator approach to set/multiset iterators and map/ multimap iterators. 3/10 (gSTLFilt.pl v.96) Corrected several filtering bugs w/respect to map/multimap iterators, where these iterators were incorrectly transformed into *set* iterators and/or their const-ness was attributed incorrectly. 2/26 (gSTLFilt.pl .95) Output line wrapping has been cleaned up a bit, so that all messages (with the exception of command-line parameter errors) are consistently wrapped to the desired column. Many miscellaneous Perl coding errors were corrected [next time, I've got to remember to run perl -W *before* releasing a script! ;-) ] 2/23 (gSTLFilt.pl .94) Added /lognative option (already had it in other version, somehow it was inadvertently omitted from the g++ version until now). When specified, this option causes the unfiltered g++ output to be written to a file with the named NativeLog.txt (name is hardwired, but of course may be changed in the Perl script). This assists in debugging the decryptor; if you need submit examples of errors that are not correctly filtered, using this option and capturing the output of the filter at the same time guarantees that the raw and filtered messages are in sync. 2/22 (gSTLFilt.pl .93) Added recognition of basic_string template instantiations in multithreaded configurations (first template param to __default_alloc_template true). Thanks to Marcin Kasperski for first reporting this problem. 2/20 (gSTLFilt.pl .92) Added /banner:x command line option to control ID banner. By default, it displays. To turn off the banner, use /banner:n 2/17 (gSTLFilt.pl .91) Major revision to the Perl script. Now includes the ability to suppress consecutive messages originating from within the STL standard headers. The script option /hdr:x, where x=S,M or L, controls header message suppression: L: pass all messages through M: pass only first of a consecutive batch, and announces how many were suppressed S: suppress all, and announce how many were suppressed The /cand:x option works similarly for "candidate" lines (except that it is totally silent in 'S' mode, instead of reporting # of candidates suppressed). Fixed up many small issues regarding pathname processing and detection of standard header messages under Unix (used to only look for *back*-slashes. Oops.) 2/16 (gSTLFilt.pl 0.90) Initial beta release.