Index: imcc/imcc.l
===================================================================
RCS file: /cvs/public/parrot/imcc/imcc.l,v
retrieving revision 1.79
diff -u -r1.79 imcc.l
--- imcc/imcc.l	24 Nov 2003 06:03:23 -0000	1.79
+++ imcc/imcc.l	2 Dec 2003 22:49:04 -0000
@@ -682,6 +682,8 @@
 
     UNUSED(valp);
     frame = new_frame();
+    /* When an error occurs, then report it as being in a macro */
+    frame->is_macro = 1;
 
     expansion = find_macro_param(name);
     if (expansion) {
@@ -695,7 +697,6 @@
         /* remember macro name for error reporting
          */
         sourcefile = const_cast(name);
-        frame->is_macro = 1;
 	/* whitespace can be savely ignored */
 	do {
 	    c = input();
Index: imcc/imclexer.c
===================================================================
RCS file: /cvs/public/parrot/imcc/imclexer.c,v
retrieving revision 1.83
diff -u -r1.83 imclexer.c
--- imcc/imclexer.c	24 Nov 2003 06:03:43 -0000	1.83
+++ imcc/imclexer.c	2 Dec 2003 22:49:13 -0000
@@ -3977,6 +3977,8 @@
 
     UNUSED(valp);
     frame = new_frame();
+    /* When an error occurs, then report it as being in a macro */
+    frame->is_macro = 1;
 
     expansion = find_macro_param(name);
     if (expansion) {
@@ -3990,7 +3992,6 @@
         /* remember macro name for error reporting
          */
         sourcefile = const_cast(name);
-        frame->is_macro = 1;
 	/* whitespace can be savely ignored */
 	do {
 	    c = input();
Index: imcc/t/syn/macro.t
===================================================================
RCS file: /cvs/public/parrot/imcc/t/syn/macro.t,v
retrieving revision 1.4
diff -u -r1.4 macro.t
--- imcc/t/syn/macro.t	23 Oct 2003 17:03:01 -0000	1.4
+++ imcc/t/syn/macro.t	2 Dec 2003 22:49:13 -0000
@@ -1,6 +1,6 @@
 #!perl
 use strict;
-use TestCompiler tests => 21;
+use TestCompiler tests => 23;
 
 # macro tests
 
@@ -281,5 +281,29 @@
 .end
 CODE
 /unknown macro/
+OUTPUT
+
+output_like( <<'CODE', <<OUTPUT, "unexpected IDENTIFIER" );
+.sub _main
+.macro M()
+    this gives a parse error
+.endm
+    .M()
+    end
+.end
+CODE
+/parse error, unexpected IDENTIFIER/
+OUTPUT
+
+output_like( <<'CODE', <<OUTPUT, "unknown macro" );
+.sub _main
+.macro M(A)
+    .arg .A
+.endm
+    .M(a)
+    end
+.end
+CODE
+/in macro '.M'/
 OUTPUT
 
