[PATCH] remove some unused globals

Trevor Saunders tbsaunde@tbsaunde.org
Tue Apr 12 17:21:00 GMT 2016


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



More information about the Binutils mailing list