diff options
author | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:41:59 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:41:59 +0000 |
commit | 5413b5486ba77949122a8bfd6067d31626e330f3 (patch) | |
tree | 6956d71f05d79d40e52fed28668bf9db104a4a04 /gas/write.c | |
parent | f28844f209b0de6783df75e402dd1c26f3edb0c7 (diff) | |
download | binutils-redhat-5413b5486ba77949122a8bfd6067d31626e330f3.tar.gz |
Add -Wshadow to the gcc command line options used when compiling the binutils.
Fix up all warnings generated by the addition of this switch.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gas/write.c b/gas/write.c index 8adb87b94a..1ded21f94f 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1787,22 +1787,24 @@ write_object_file (void) if (symbol_equated_reloc_p (symp) || S_IS_WEAKREFR (symp)) { - const char *name = S_GET_NAME (symp); + const char *sname = S_GET_NAME (symp); + if (S_IS_COMMON (symp) - && !TC_FAKE_LABEL (name) + && !TC_FAKE_LABEL (sname) && !S_IS_WEAKREFR (symp) && (!S_IS_EXTERNAL (symp) || S_IS_LOCAL (symp))) { expressionS *e = symbol_get_value_expression (symp); + as_bad (_("Local symbol `%s' can't be equated to common symbol `%s'"), - name, S_GET_NAME (e->X_add_symbol)); + sname, S_GET_NAME (e->X_add_symbol)); } if (S_GET_SEGMENT (symp) == reg_section) { /* Report error only if we know the symbol name. */ if (S_GET_NAME (symp) != reg_section->name) as_bad (_("can't make global register symbol `%s'"), - name); + sname); } symbol_remove (symp, &symbol_rootP, &symbol_lastP); continue; |