On Sun, May 21, 2000 at 11:49:18AM -0400, Dimitrie O. Paun wrote:
> 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 :).
Yes, OK, this is only a quick thought, though.
> 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.
Yes, you're right.
Can this be done in a more clean way ?
Maybe one ought to seperate the error message and the output of the
parameters ?
Or maybe only manage error numbers for further documentation lookup in
a file ?
> Third, I don't like introducing complicated behaviour on error path like
> this -- it can interfere with the problem you want reported.
Umm, what exactly do you mean here ?
> Forth, how many FIXME/ERR/WARNs will benefit from such a scheme?
Well, I think that at least *permanent* error messages with grave problems
should be converted.
I know that this approach isn't optimal. But can that be improved somehow ?
By using such a file we could add localized error messages easily, too.
Andreas Mohr