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, simulator] Fix sim_command_completer arguments.


On 03/15/2013 10:31 AM, Steve Ellcey wrote:
My build of gdb and sim have recently started failing with:

/local/home/sellcey/nightly2/src/gdb/gdb/remote-sim.c: In function '_initialize_remote_sim':
/local/home/sellcey/nightly2/src/gdb/gdb/remote-sim.c:1323: error: passing argument 2 of 'set_cmd_completer' from incompatible pointer type
/local/home/sellcey/nightly2/src/gdb/gdb/command.h:161: note: expected 'struct VEC_char_ptr * (*)(struct cmd_list_element *, const char *, const char *)' but argument is of type 'struct VEC_char_ptr * (*)(struct cmd_list_element *, char *, char *)'

I didn't see any change in gdb/sim that might be causing this but I am
building with the latest (ToT) GCC and I think a change there might have
caused GCC to start catching this discrepency in argument types.  I would
like to fix it by adding the 'const' modifier to the sim_command_completer
text and word arguments so that its argument types match filename_completer,
expression_completer, etc.

I encountered a similar tightening of type checking with gcc-head while building opcode/mips-dis.c.

OK for MicroBlaze.


-- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077


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