adtools
adtools copied to clipboard
Add AmigaOS-style RawDoFmt() parameter validation.
It should be possible to add an attribute to varargs derivatives of RawDoFmt() such as IUtility->SNPrintf() that causes the compiler to verify that format specifiers match the given parameters. If not a warning should be brought up.
The gcc has this feature since quite a while for printf()-style functions but these for now assume 32 bit ints while RawDoFmt() defaults to 16 bit width. The new attribute should probably be a variation of the existing attribute.