[svn:parrot] r40227 - in trunk: compilers/imcc t/compilers/imcc/syn

NotFound at svn.parrot.org NotFound at svn.parrot.org
Thu Jul 23 15:23:58 UTC 2009


Author: NotFound
Date: Thu Jul 23 15:23:56 2009
New Revision: 40227
URL: https://trac.parrot.org/parrot/changeset/40227

Log:
[imcc] convert warning about duplicate identifier in error, TT #767

Modified:
   trunk/compilers/imcc/symreg.c
   trunk/t/compilers/imcc/syn/errors.t

Modified: trunk/compilers/imcc/symreg.c
==============================================================================
--- trunk/compilers/imcc/symreg.c	Thu Jul 23 06:51:50 2009	(r40226)
+++ trunk/compilers/imcc/symreg.c	Thu Jul 23 15:23:56 2009	(r40227)
@@ -642,10 +642,9 @@
     ASSERT_ARGS(mk_ident)
     char   * const fullname = _mk_fullname(pesky_global__namespace, name);
     SymReg *r = get_sym_by_name(&(IMCC_INFO(interp)->last_unit->hash), name);
-    if (r && r->set != t) {
-        IMCC_print_inc(interp);
-        IMCC_warning(interp, "Duplicated IDENTIFIER '%s'\n", fullname);
-    }
+    if (r && r->set != t)
+        IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+                "syntax error, duplicated IDENTIFIER '%s'\n", fullname);
 
     r = mk_symreg(interp, fullname, t);
     r->type = VTIDENTIFIER;

Modified: trunk/t/compilers/imcc/syn/errors.t
==============================================================================
--- trunk/t/compilers/imcc/syn/errors.t	Thu Jul 23 06:51:50 2009	(r40226)
+++ trunk/t/compilers/imcc/syn/errors.t	Thu Jul 23 15:23:56 2009	(r40227)
@@ -78,9 +78,6 @@
 /^error:imcc:syntax error, unexpected IDENTIFIER, expecting/
 END_EXPECTED
 
-TODO: {
-  local $TODO = 'TT #767';
-
 pir_error_output_like( <<'END_PIR', <<'END_EXPECTED', 'no multiple .local, TT #767' );
 .sub main :main
   .local pmc p
@@ -90,8 +87,6 @@
 /^error:imcc:syntax error, duplicated IDENTIFIER/
 END_EXPECTED
 
-}
-
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4


More information about the parrot-commits mailing list