changeset 261:f45b2a68c3da

Make case insensitive symbols error out on duplication Make case insensitive symbols raise multiply defined symbol errors in the following circumstances: * if the original symbol was defined under symbolnocase * if the current symbol is being defined under symbolnocse
author William Astle <lost@l-w.ca>
date Mon, 04 Feb 2013 20:51:55 -0700
parents c5b1dd523ac4
children 7de7b14ebaee
files lwasm/symbol.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/symbol.c	Mon Feb 04 20:35:47 2013 -0700
+++ b/lwasm/symbol.c	Mon Feb 04 20:51:55 2013 -0700
@@ -135,7 +135,10 @@
 		if (!ndir && !(se -> flags & symbol_flag_set))
 		{
 			if (strcmp(sym, se -> symbol))
-				ndir = 1;
+			{
+				if (!CURPRAGMA(cl, PRAGMA_SYMBOLNOCASE) && !(se -> flags & symbol_flag_nocase))
+					ndir = 1;
+			}
 		}
 		if (!ndir && se -> context != context)
 		{