This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] remove some unused globals


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]