public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] remove some unused globals
@ 2016-04-12 13:59 tbsaunde+binutils
  2016-04-12 16:25 ` Nick Clifton
  2016-04-13 11:25 ` Nick Clifton
  0 siblings, 2 replies; 4+ messages in thread
From: tbsaunde+binutils @ 2016-04-12 13:59 UTC (permalink / raw)
  To: binutils; +Cc: Trevor Saunders

From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>

hi,

$subject, built crosses to msp430-elf and m32c-elf, ok?

Trev

gas/ChangeLog:

2016-04-12  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* config/tc-m32c.c (M32C_Macros): Remove.
	* config/tc-msp430.c (option_numbers): Likewise.
---
 gas/config/tc-m32c.c   | 2 +-
 gas/config/tc-msp430.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c
index 70f0aeb..b28797b 100644
--- a/gas/config/tc-m32c.c
+++ b/gas/config/tc-m32c.c
@@ -475,7 +475,7 @@ enum {
   M32C_MACRO_ADJNZ_3,
   M32C_MACRO_ADJNZ_4,
   M32C_MACRO_ADJNZ_5,
-} M32C_Macros;
+};
 
 static struct {
   int insn;
diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c
index f9df729..8e95b1d 100644
--- a/gas/config/tc-msp430.c
+++ b/gas/config/tc-msp430.c
@@ -684,7 +684,7 @@ enum
 {
   OPTION_SILICON_ERRATA = OPTION_MD_BASE,
   OPTION_SILICON_ERRATA_WARN,
-} option_numbers;
+};
 
 static unsigned int silicon_errata_fix = 0;
 static unsigned int silicon_errata_warn = 0;
-- 
2.1.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove some unused globals
  2016-04-12 13:59 [PATCH] remove some unused globals tbsaunde+binutils
@ 2016-04-12 16:25 ` Nick Clifton
  2016-04-12 17:21   ` Trevor Saunders
  2016-04-13 11:25 ` Nick Clifton
  1 sibling, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2016-04-12 16:25 UTC (permalink / raw)
  To: tbsaunde+binutils, binutils

Hi Trev,

> $subject, built crosses to msp430-elf and m32c-elf, ok?

If you make these enums anonymous, doesn't that make them harder to use/reference from a debugger ?

Cheers
  Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove some unused globals
  2016-04-12 16:25 ` Nick Clifton
@ 2016-04-12 17:21   ` Trevor Saunders
  0 siblings, 0 replies; 4+ messages in thread
From: Trevor Saunders @ 2016-04-12 17:21 UTC (permalink / raw)
  To: Nick Clifton; +Cc: tbsaunde+binutils, binutils

On Tue, Apr 12, 2016 at 05:25:10PM +0100, Nick Clifton wrote:
> Hi Trev,
> 
> > $subject, built crosses to msp430-elf and m32c-elf, ok?
> 
> If you make these enums anonymous, doesn't that make them harder to use/reference from a debugger ?

I'm not sure I follow, these enums have always been anonymous in the
sense you can't name there type.  So it used to be we declared a set of
constants in the { } and then declared a variable of some anonymous enum
type, but then we never used that variable and only used the enum
constants with other variables.  So I expect the only difference this
makes to debugging is that you can't refer to a variable that doesn't
exist, but since that variable never does anything examining it seems
pointless.

Now it may well be that naming these types, and changing some variables
from type int to the enum type would improve debugging by getting gdb to
just print the constant name, but I don't think anything is regressed
here.  Looking a little deeper it seems like in the msp430 it might be
clearer to just use a bool or something.

Thanks!

Trev

> 
> Cheers
>   Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove some unused globals
  2016-04-12 13:59 [PATCH] remove some unused globals tbsaunde+binutils
  2016-04-12 16:25 ` Nick Clifton
@ 2016-04-13 11:25 ` Nick Clifton
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Clifton @ 2016-04-13 11:25 UTC (permalink / raw)
  To: tbsaunde+binutils, binutils

Hi Trev,

> 2016-04-12  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
> 
> 	* config/tc-m32c.c (M32C_Macros): Remove.
> 	* config/tc-msp430.c (option_numbers): Likewise.

Approved - please apply.

(I tried to construct a GDB based scenario where this change would be 
a problem, but failed utterly... :-)

Cheers
  Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-13 11:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 13:59 [PATCH] remove some unused globals tbsaunde+binutils
2016-04-12 16:25 ` Nick Clifton
2016-04-12 17:21   ` Trevor Saunders
2016-04-13 11:25 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).