Mercurial > hg > index.cgi
comparison 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 |
comparison
equal
deleted
inserted
replaced
260:c5b1dd523ac4 | 261:f45b2a68c3da |
---|---|
133 ndir = strcasecmp(sym, se -> symbol); | 133 ndir = strcasecmp(sym, se -> symbol); |
134 // if (!ndir && !CURPRAGMA(cl, PRAGMA_SYMBOLNOCASE) && !(se -> flags & symbol_flag_set)) | 134 // if (!ndir && !CURPRAGMA(cl, PRAGMA_SYMBOLNOCASE) && !(se -> flags & symbol_flag_set)) |
135 if (!ndir && !(se -> flags & symbol_flag_set)) | 135 if (!ndir && !(se -> flags & symbol_flag_set)) |
136 { | 136 { |
137 if (strcmp(sym, se -> symbol)) | 137 if (strcmp(sym, se -> symbol)) |
138 ndir = 1; | 138 { |
139 if (!CURPRAGMA(cl, PRAGMA_SYMBOLNOCASE) && !(se -> flags & symbol_flag_nocase)) | |
140 ndir = 1; | |
141 } | |
139 } | 142 } |
140 if (!ndir && se -> context != context) | 143 if (!ndir && se -> context != context) |
141 { | 144 { |
142 ndir = (context < se -> context) ? -1 : 1; | 145 ndir = (context < se -> context) ? -1 : 1; |
143 } | 146 } |