On Sun, 21 May 2000, Andreas Mohr wrote:
> instead of doing
> FIXME( "FATAL: Need to relocate %s, but no relocation records present
>(%s). Try to run that file directly !\n",
> filename,
> (nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)?
> "stripped during link" : "unknown reason" );
>
> we really ought to do
> FIXME_FILE(1234, filename,
>(nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)?, "stripped during link"
>: "unknown reason" );
To be honest, I don't like this proposal.
First, it is a bit ugly to write FIXME_FILE :).
Second, and more importantly, it convolutes the code. If you look at the
first line, you can (easily) tell that parameters match the %s (in fact,
gcc can check that and it does!). When you look at the second line, all
this is lost -- you don't even know that you output! This is a problem,
because the WARN/ERR/FIXME output messages also serve as inline
documentation that is valuable for developers.
Third, I don't like introducing complicated behaviour on error path like
this -- it can interfere with the problem you want reported.
Forth, how many FIXME/ERR/WARNs will benefit from such a scheme?
--
Dimi.