This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] value: Make accessor methods' parameters const-correct


On 04/06/2016 09:35 PM, Martin Galvan wrote:
> I did a quick pass over value.c and value.h and made some of the accessor methods'
> parameters const-correct. Besides the obvious benefits, this is required if we
> want to use them on values that are already declared as const (such as the parameters
> to lval_funcs). I also const-ified some of the pass-by-value parameters; while
> they're not as important it's still nice to have them like that.

Thanks for doing this.

Const on pointer parameters is certainly useful.  But since you asked
me [ :-) ], I'm on the "const on value params is mostly useless
clutter" camp.  It's something you don't see many style guides requiring,
and it's something gdb hasn't been doing either.

So personally I'd prefer a patch without those bits.

> 
> There's probably a lot more stuff that can be made const, here and elsewhere.
> 
> I have write access and copyright assignment. Ok to commit?
Thanks,
Pedro Alves


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