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 00/13] more minor constification


On 07/22/2014 07:55 PM, Tom Tromey wrote:
> This series is some more minor constification for gdb.
> 
> Patches 10, 11, and 12 contain what might be considered minor hacks.
> Some command fields are generally visible to gdb (the struct is not
> opaque) but are conceptually const.  However there are cases where the
> fields are in fact freed when the command object is destroyed.
> 
> I chose to cast away const at these points, on the theory that
> const-correctness for the bulk of the code is outweighs the cost of
> this hack.  

That all looked fine to me.  That's just working as C intended.

Thanks for doing all this.

Pedro Alves


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