- DEF0041: When
-DSYM=VAL is specified with VAL a hex integer constant, rather than a decimal constant, sunifdef would fail to resolve SYM in expressions unless the --constant eval was specified, which should be unnecessary. The anomaly ocurred because eval_symbol() anticipated constant values only as decimal constants and, upon encountering a hex-prefix "0x" or "OX" would attempt to parse the token as an expression, invoking eval_table() and ultimately eval_unary(). The latter function would resolve a hex constant, but only if --constant eval is in effect, since the function is assumed to operate on source text rather than on the definiens of -DSYM=VAL. The fix consists in recognising hex constants as such in eval_symbol(). - DEF0042: When
-DSYM=VAL is specified with VAL a soluble expression containing at least one integer constant operand, sunifdef would fail to resolve SYM in expressions unless --constant eval was specified. The reason is the same as in bug DEF0041. The fix consists in recording the origin of the text upon which eval_unary() is called - source text or else the definiens of a --defined symbol - and always resolving integer contstants in the latter case. - DEF0043: sunifdef did not distinguish octal numerals as integer constants and evaluated them as decimal numerals.
- DEF0044: sunifdef did not recognise the suffixes u/U, l/L as belonging to integer constants. These suffixes are now recognised; however, sunifdef still evaluates all integer constants as ints and performs signed integer arithmetic upon them. This is an unfixed bug.
- DEF0045: sunifdef did not detect integer overflow in evaluating constants. Now detects overflow whenever the value of a constant will exceed
INT_MAX and leaves the constant unresolved with a warning to that effect. - DEF0046: The
--help message contained an occurrence of '--constants' that ought to have been '--constant'.
- DEF0040: Defective filename matching could lead to a file being mistaken for a directory when building the input file tree, if a directory name was an initial substring of a filename at the same level.
- DEF0036: Failed to detect unexpected end of file within an unmatched
if when missing newline at end of file. - DEF0037: Summary counts of files reached and files abandoned would be short by 1 if a parse error was encountered without the
--keepgoing option in force. - DEF0038: The extension-matching code supporting the
--filter option was broken, allowing --filter EXT to match any file whose extension ended in EXT, even if not identical with EXT. - DEF0039: The current if-depth and if-line number were irrelevantly reported on progress messages.
- TST0004: The test framework is ported from shell script to perl for portability to Windows.
- FEA0017: Now can cope with multi-line C-comments embedded within directives.
- RET0003: The
--obfusc option is withdrawn because the contexts formerly classified as obfuscated are now handled in normal parsing. - DEF0030:
-DSYM=VAL or -USYM=VAL arguments when reported by the --verbose option do not include the =VAL part. - DEF0031: The
--constant policy should apply to constants only in truth-functional contexts but was applied in all contexts. In arithmetic contexts constants should always be treated as integers. (Falsely recorded as fixed DEF0010). - DEF0032: With the
--file option the "Building input tree" diagnostic was emitted even without --verbose and could not be suppressed. - DEF0032: The
--line option was not documented either in the man page or in the --help output. - DEF0033: Return codes expressed all severities 1 level greater than the true level.
- DEF0034: A false verdict of differently redefined symbol would be returned when the definiens of the symbol was not itself a symbol.
- DEF0035: Use of the
--line option did not set the SUMMARY_CHANGED_LINES flag in output. - DOC0003: The man page is rationalised so that short and long variants of options are listed together rather in seperate groups.
- FEA0009: Unbalanced parentheses in expressions now provoke parse errors rather than merely causing the expression to be unresolved.
- FEA0010: Every output message now has a reason code.
- FEA0011: sunifdef is now agnostic between Unix and Windows line-ends.
- FEA0012: New
--recurse option enables recursion into input directories. - FEA0013: Progress messages are a new category of messages with a severity lower than informational messages.
- FEA0014: New
--filter option enables input files to be filtered by file extension. - FEA0015: New
--keepgoing option makes sunifdef continue processing subsequent input files after errors. - FEA0016: Hex and octal constants are now recognised in preprocessor directives.
- RET0002: The --gag 0xXXXX variant of --gag option is withdrawn.
- DEF0024: Usage gave
-gw as default instead of -gi - DEF0025: The
--symbols option could produce spurious warnings of contradictions. - DEF0026: The length of formatted output messages was unsafely assumed not to exceed 2K. Their length is now limited only by available heap.
- DEF0027: A symbol for which
--undef SYM was specified was evaluated as an insoluble expression. This was at odds with the C Standard, which stipulates the preprocessor will evaluate an undefined symbol as 0. The behaviour now agrees with the Standard. - DEF0028: The state of the chew module was not fully reinitialised at entry to each input files, causing any newline-within-quotation error to be spuriously repeated for subsequent input files.
- DEF0029: An unarranted simplification was applied to any compound truth functional expression containing more than 1 operator where the order of evaluation was determined by prercedence rather than by parentheses.
- REW0003: The inefficiently recursive formatting of output messaages is reworked.
- REW0004: Source files
diagnostic.* to report.* to reflect broader function - REW0005: The range of message reason codes is widened from 6 to 7 bits to accomodate additional diagnostics.
- TST0003: The test framework is extended to cover recursive processing of large source trees.
- DOC0002: An extensive
EXAMPLES section has been added to the man page.
- DEF0022: Fixed warnings for 64-bit build and unused function results.
- DEF0023: Fixed infrinements of C89
- DEF0021: Evaluation of unparenthesised compound binary truth-functions "...op...op..." lost information of unresolved operands causing incorrect simplifications.
- DEF0001: All usage errors now emit a diagnosis
- DEF0017: --symbols option failed to list FOO when occurring in ifdef FOO or ifndef FOO.
- DEF0018: Unnecessary insistence on --replace option to process mutliple files with --symbols option.
- DEF0019: Lingering reference to "--ignore" in usage diagnostic should have been changed to "--podsym".
- DEF0020: The man page is more complete and correct.
- FEA0001: Enable discarded lines to be output in the form of comments.
- FEA0002: --symbols option now has arguments `all', `first' and `locate'. `all' causes all occurrences of symbols to be listed. `first' causes only the first occurrence of each symbol to be listed. `locate' causes the file name and line number to be appended to each listed occurrence.
- FEA0003 New --line option generates line directives to make CPP line-numbering of output agree with input even of lines are dropped.
- RET0001 The --podsym option, formerly the --ignore option, is dropped as not being plausibly worthwhile.
- DEF0015: Truth-functional simplification was broken for constant operands when --constant eval in force.
- DEF0016: Clarified murky evaluation of the --podsym attribute over && and ||.
- REW0001: Parser substantially simplified and much more powerful. Previously only evaluated truth-functions and relational operators; could evaluate FOO defined -DFOO=VAL only where VAL was an integer constant. Now can evaluate all C operators except the conditional operator; can evaluate FOO provided VAL can be recursively evaluated, but will determine that circularly defined symbol -DFOO=BAR -DBAR=FOO is unresolved rather than loop forever.
Trivial fixes to sunifdef; significant fixes to the test framework.
- DEF0012: Warnings fixed to compile clean with -Wall
- DEF0013: Removed needless redefinition of PATH_MAX from Windows build.
- DEF0014: `make check' always reported success even if the tests reported failures
- TST0002: The test driver test_sunifdef is strengthened:
- To work without relying on system() to return a true exit code from the executed command
- To work without relaying on system() to distinguish output redirectors from the arguments of the command.
- To work in a Wine (Windows on Unix) emulator environment when the input pathnames are not Windified
- To work in a Cygwin (Unix on Windows) emulator environment when the input pathnames are not Windified.
Initial stable release.
- REW0002: The -i | --ignore option is renamed -p | --podsym to indicate better that option causes lines to be treated as Plain Old data. The -t | --text option is renamed -P | --pod for the same reason.
- REW0003: The implementation of the --constant policy, though consistent, was not conceptually coherent. Reworked.
- FEA0006: The -p | --podsym option is honoured for `if defined' and `if !defined' directives as well as ifdef and ifndef.
- DEF0004: Overlooked occurrence of "unifdef" rather than "sunifdef" in diagnostic output.
- DEF0005: The dropped lines count was not incremented for conflicts in the presence of the `--conflict delete' option.
- DEF0006: The SUMMARY_ERRORED_LINES status flag (return code & 64) was not set in respect of the `--conflict error' option.
- DEF0007: The `--conflict error' option was not followed through for the case where it causes an unconditional error to be output (return code & 128).
- DEF0009: printline_cut() was capable of leaving non-printable house-keeping bytes in the tidied up output buffer.
- DEF0010: The --constant policy should apply to constants only in truth-functional contexts but was applied in all contexts. In arithmetic contexts constants should always be treated as integers: the constant policy does not apply.
- DEF0011: Parentheses rendered redundant by simplification were not deleted in all cases where they safely could be.
- TST0001: Automated test framework provided. Executes with `make check'.
Bug fix release.
- DEF0002: memmove() miscalculation could cause seg fault in symbol table lookups.
- DEF0003: Mis-ordering of insertions into the symbol table could cause lookups to fail erroneously.
Initial Public Offering
Copyright © 2007 Michael Kinghan
Generated on Mon Feb 4 19:26:14 2008 for Sunifdef Home by
1.5.4 (with a little help from perl.)