This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] value: Make accessor methods' parameters const-correct
- From: Martin Galvan <martin dot galvan at tallertechnologies dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: Pedro Alves <palves at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>, Tom Tromey <tom at tromey dot com>
- Date: Thu, 7 Apr 2016 10:49:19 -0300
- Subject: Re: [PATCH] value: Make accessor methods' parameters const-correct
- Authentication-results: sourceware.org; auth=none
- References: <1459974933-616-1-git-send-email-martin dot galvan at tallertechnologies dot com> <57059D83 dot 2010403 at redhat dot com> <570662E0 dot 1020500 at ericsson dot com>
On Thu, Apr 7, 2016 at 10:38 AM, Simon Marchi <simon.marchi@ericsson.com> wrote:
> And to be pedantic, if you want to make all arguments const you should also do this :)
>
> -set_value_bitpos (struct value *value, int bit)
> +set_value_bitpos (struct value *const value, const int bit)
Yeah, I thought of that but it'd been too much. Thanks for the
feedback guys, I'll be sending v2 in a moment.
Btw, while I was looking through value.c I saw many functions whose
names are 'deprecated', or 'hack', yet they're still being used. If
you guys want I can look into removing/replacing them after I'm done
with the synthetic reference fixes.