Xc++ warning codes

The following 18 warning codes are defined:

codedescription
1000Forward declaration of %s contains metadata
1001Non-reflected %s contains metadata
1002Reflected %s references non-registered %s
1003isa on %s doesn't inherit from IObject
1004%s is not reflected and has redundant << >> directives
1005mvector<T> is deprecated - instead use xvector<movable<pref<T> > >
1006Inconsistent subtyping of IObject in base interfaces
1007%s subtypes IObject but isn't reflected
1008%s doesn't appear in public header of library
1009%s not exported in public header of library
1010%s declarations have inconsistent signatures : %s %s
1011%s is defined in a header file and isn't inlined
1012%s defined in library without prior declaration
1013isa on %s not reflected
1014%s implementing %s without associated 'isa'
1015$warning(push) without matching pop
1016%s not defined
1017+ on forward declaration of %s deprecated

Disable warnings

Warnings can be disabled, for example the following disables warning 1014:


$warning(push; disable: 1014)
$class X <<-copy>> isa IPersistable
{
public:
    $implementing IPersistable {Serialise Deserialise}, Ix;
};
$warning(pop)

Grammar for $warning declarations

Grammar (expressed in EBNF ISO 14977) is:


warning-item =
    'push' |
    'pop' |
    'disable', ':', integer-expr, { integer-expr } |
    'enable', ':', integer-expr, { integer-expr };

warning-decl =
    '$', 'warning', 
    '(',
    [ warning-item, { ';', warning-item }, [';'] ],
    ')';

Examples:


$warning()
$warning(push)
$warning(enable:1000)
$warning(disable:1004)
$warning(push; disable : 1003 1012; enable 1000)
$warning(pop)