Mercurial > hg > index.cgi
diff lwasm/symbol.c @ 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 | 0c4b3e8b4d0b |
children | d149e2b56981 |
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) {