[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
29-fyi-verbose-fatal.patch
From: |
Akim Demaille |
Subject: |
29-fyi-verbose-fatal.patch |
Date: |
Mon, 03 Sep 2001 17:11:23 +0200 |
Autoconf (well, autoupdate) doesn't like some of Gary's recent
changes. I still don't know what, but something. And this was on the
way.
BTW, I don't like CAPITALS for enums, so I'm tempted to lowercase all of
/* Operation modes for m4_lookup_symbol (). */
typedef enum
{
M4_SYMBOL_LOOKUP,
M4_SYMBOL_INSERT,
M4_SYMBOL_DELETE,
M4_SYMBOL_PUSHDEF,
M4_SYMBOL_POPDEF,
M4_SYMBOL_IGNORE
} m4_symbol_lookup;
but I'd like your approval first.
now let's dive into:
10. ./tools.at:470: testing autoupdate...
./tools.at:491: autoupdate
--- - Mon Sep 3 16:59:42 2001
+++ at-stderr Mon Sep 3 16:59:42 2001
@@ -1,2 +1,1238 @@
+/usr/local/bin/m4: /tmp/au4676.32573/disable.m4: 1: INTERNAL ERROR:
Attempt to delete non-existant symbol: <<m4_split>>
+/usr/local/bin/m4: /tmp/au4676.32573/disable.m4: 2: INTERNAL ERROR:
Attempt to delete non-existant symbol: AC_AIX
+/usr/local/bin/m4: /tmp/au4676.32573/disable.m4: 3: INTERNAL ERROR:
Attempt to delete non-existant symbol: AC_ARG_ENABLE
+/usr/local/bin/m4: /tmp/au4676.32573/disable.m4: 4: INTERNAL ERROR:
Attempt to delete non-existant symbol: AC_ARG_PROGRAM
+/usr/local/bin/m4: /tmp/au4676.32573/disable.m4: 5: INTERNAL ERROR:
Attempt to delete non-existant symbol: AC_ARG_VAR
+/usr/local/bin/m4: /tmp/au4676.32573/disable.m4: 6: INTERNAL ERROR:
Attempt to delete non-existant symbol: AC_ARG_WITH
:(
Ah, OK, I have it: it very simple:
src/ace/tests % echo 'undefine(foo)' | m4 17:03 remo
m4: stdin: 1: INTERNAL ERROR: Attempt to delete non-existant symbol: foo
I must say that I *much* prefer this than the previous behavior, which
allows undefining non existant stuff. So I'm in favor of keeping this
feature. But be aware that this is incompatible.
I so much prefer this, that you can find this in M4sugar's documentation:
| Redefined M4 Macros
| -------------------
|
| With a few exceptions, all the M4 native macros are moved in the
| `m4_' pseudo-namespace, e.g., M4sugar renames `define' as `m4_define'
| etc.
|
| Some M4 macros are redefined, and are slightly incompatible with
| their native equivalent.
|
| - Macro: m4_undefine (MACRO)
| Contrary to the M4 builtin, this macro fails if MACRO is not
| defined. Use
|
| m4_ifdef([MACRO], [m4_undefine([MACRO])])
|
| to recover the behavior of the builtin.
so I personally consider it is autoupdate which is buggy here.
BTW, then, it would make sense to have failures for:
src/ace/tests % echo 'defn(foo)' | m4 17:04 remo
src/ace/tests % echo 'popdef(foo)' | m4 17:06 remo
src/ace/tests % 17:06 remo
which is what M4sugar does.
Index: ChangeLog
from Akim Demaille <address@hidden>
* m4/symtab.c (m4_lookup_symbol): Give more details when reporting
internal errors.
Avoid using `default' in switch, as it hides useful compiler
warnings when a case is forgotten.
Index: m4/symtab.c
--- m4/symtab.c Mon, 03 Sep 2001 15:40:52 +0200 akim
+++ m4/symtab.c Mon, 03 Sep 2001 16:54:19 +0200 akim
@@ -203,16 +203,16 @@
}
else
M4ERROR ((warning_status, 0,
- _("INTERNAL ERROR: Attempt to delete non-existant symbol")));
+ _("INTERNAL ERROR: Attempt to delete non-existant symbol:
%s"),
+ name));
return 0;
-
- default:
- M4ERROR ((warning_status, 0,
- _("INTERNAL ERROR: Illegal mode to m4_symbol_lookup ()")));
- abort ();
}
}
+ M4ERROR ((warning_status, 0,
+ _("INTERNAL ERROR: Illegal mode to m4_symbol_lookup (%s, %d)"),
+ name, mode));
+ abort ();
/*NOTREACHED*/
return 0;
}
- 29-fyi-verbose-fatal.patch,
Akim Demaille <=