[Previous]  [Up]  [Next]

Compilation and linking

MaskThrow



CFront frequently generates warnings for valid source code that otherwise compiles without problems. The MaskThrow module from Mark Seaborn's Dreamscape C++ class library blocks specific compiler warnings from being passed onto Zap/StrongEd/SrcEdit throwback browsers.

A user configurable list of warnings may be disabled by modifying the Masked file and recompiling the module. The supplied version disables the following warnings:

Non-ANSI #include ...
This is disabled to allow headers of the form <iostream.h> to be included without irritating warnings. This is largely redundant at the moment, because headers are always included in "iostream.h" form.
static ... declared but not used
This warning typically indicates that a function declared inline has been emitted out of line in a translation unit despite not actually being used. CFront inlining behaviour is so unpredicatable (see section on inlining) that completely avoiding such warnings is more or less impossible, and consequently it is more convenient to suppress them.
static function...not defined - treated as extern
This warning is also due to CFront's unpredictable inlining behaviour. Sometimes a prototype for an out of line function declared inline is produced without a matching definition. Either a non-static version will be defined elsewhere or an error will be reported at link time.
please provide an out-of-line defintion ... which is needed by derived classes
This warning is generated whenever CFront sees the declaration of a pure virtual destructor. This implies that any header file declaring a class with a pure virtual destructor will generate spurious warnings, which can be particularly irrititating if that header is widely included. It is unlikely that a destructor would be made pure virtual by mistake, and in the event of an out of line definition being omitted an error will be reported at link time.

 [Previous]  [Up]  [Next]