[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 29-fyi-verbose-fatal.patch
From: |
akim |
Subject: |
Re: 29-fyi-verbose-fatal.patch |
Date: |
Tue, 4 Sep 2001 09:51:35 +0200 |
User-agent: |
Mutt/1.3.20i |
On Mon, Sep 03, 2001 at 07:57:06PM +0100, Gary V. Vaughan wrote:
>
> I'd rather not, because I think that constants (be they #defined or
> enumerated) should be easily distinguishable from variable names. As
OK.
> a matter of fact, I think the m4_symbol_lookup design is screwy, I
> plan to rewrite it as 5 functions at some point -- one for each piece
> of functionality the current function swallows. I would have done it
> when I rewrote the symbol table, but I wasn't sure how to disentagle
> the M4_SYMBOL_IGNORE instances, and though it best to work the bugs
> out of what has been changed so far before another source quake ;-)
OK, I'm on it, don't start!
> > src/ace/tests % echo 'undefine(foo)' | m4 17:03
> > remo
> > m4: stdin: 1: INTERNAL ERROR: Attempt to delete non-existant symbol: foo
>
> Oops. Unintentional, I assure you!
I believe you, I'm sure you'd have chosen something else than `INTERNAL ERROR:'
as error msg :)
> Unfortunately, it is also incompatible with at least Solaris' 2 m4
> implementations too =(O| I agree that it makes for more robust code
> though... perhaps we could enable it from the command line or and/or
> argument to debugmode. OTOH, I guess that as long as we turn it off
> with --traditional and/or some runtime mechanism, it might be wise to
> leave it enabled by default?
I'm a great believer in -W, --warning, $WARNINGS.
> That's odd. I would have expected each of them to end up in the same
> code in symtyab.h, and already exhibit similar behaviour. But you're
> right, whatever we decide to do with undefine should be applied in
> equal measure to the others.
I'm working on this issue too. This is because it does help me fixing
autoupdate, which is much more challenging than I expected :(
> > Avoid using `default' in switch, as it hides useful compiler
> > warnings when a case is forgotten.
>
> That is a nice idiom that I hadn't actually given though to before.
> Cool, thanks. DOes gcc warn in this case without additional -W
> options btw?
`-Wswitch'
Warn whenever a `switch' statement has an index of enumeral type
and lacks a `case' for one or more of the named codes of that
enumeration. (The presence of a `default' label prevents this
warning.) `case' labels outside the enumeration range also
provoke warnings when this option is used.