Sunifdef ("Son of Unifdef")



Sunifdef ("Son of Unifdef")


Sunifdef is a commandline tool for eliminating superfluous preprocessor clutter from C and C++ source files. It is a more powerful successor to the FreeBSD 'unifdef' tool.

Sunifdef is most useful to developers of constantly evolving products with large code bases, where preprocessor conditionals are used to configure the feature sets, APIs or implementations of different releases. In these environments the code base steadily accumulates #ifdef pollution as transient configuration options become obselete. Sunifdef can largely automate the recurrent task of purging redundant #if logic from the code.

News

Six bugs are fixed - see the Changelog page. Five of these fixes address defects of sunifdef's parsing and evaluation of integer constants. Hitherto sunifdef has parsed hex numerals only "by good luck" and has not distinguished octal from decimal numerals. Integer overflow in numerals was not caught. This version properly distinguishes hex, octal and decimal numerals and applies a safe overflow policy (leave the numeral unresolved and emit a warning) when a numeral's value will exceed INT_MAX. This policy falls short of emulating the C preprocessor's arithmetic in limit cases, which is a recognised defect.

Supported Platforms

There is a good chance that Sunifdef will build from source on a system that provides the GNU build tools and Perl.

Authorship, Copyright & License


SourceForge.net Logo Copyright © 2008 Michael Kinghan


Generated on Mon Feb 4 19:26:14 2008 for Sunifdef Home by  doxygen 1.5.4 (with a little help from perl.)