diff lwasm/symbol.c @ 259:0c4b3e8b4d0b

Fix pragma nosymbolcase interaction with -D Actually make --pragma=nosymbolcase flag symbols defined subsequently on the command line as not being case sensitive. Otherwise, things don't behave quite as expected. There is still a gotcha in that if the -D appears before the --pragma option, the symbol will still be case sensitive.
author William Astle <lost@l-w.ca>
date Fri, 01 Feb 2013 00:04:19 -0700
parents 5330ba70836a
children f45b2a68c3da
line wrap: on
line diff
--- a/lwasm/symbol.c	Thu Jan 31 19:34:54 2013 -0700
+++ b/lwasm/symbol.c	Fri Feb 01 00:04:19 2013 -0700
@@ -185,6 +185,10 @@
 	{
 		nse -> flags |= symbol_flag_nocase;
 	}
+	if (!cl && (as -> pragmas & PRAGMA_SYMBOLNOCASE))
+	{
+		nse -> flags |= symbol_flag_nocase;
+	}
 	nse -> value = lw_expr_copy(val);
 	nse -> symbol = lw_strdup(sym);
 	nse -> right = NULL;