From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28706 invoked by alias); 15 Mar 2013 18:24:07 -0000 Received: (qmail 28677 invoked by uid 22791); 15 Mar 2013 18:24:05 -0000 X-SWARE-Spam-Status: No, hits=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Mar 2013 18:23:58 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2FINt7r011250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Mar 2013 14:23:56 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2FI00eQ012213; Fri, 15 Mar 2013 14:00:00 -0400 Message-ID: <5143619F.9040701@redhat.com> Date: Fri, 15 Mar 2013 18:27:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Steve Ellcey CC: gdb-patches@sourceware.org Subject: Re: [patch, simulator] Fix sim_command_completer arguments. References: <2642b17f-5e3b-41b2-a985-ffcaa9220e95@BAMAIL02.ba.imgtec.org> In-Reply-To: <2642b17f-5e3b-41b2-a985-ffcaa9220e95@BAMAIL02.ba.imgtec.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00685.txt.bz2 On 03/15/2013 05:31 PM, 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. Actually, the completers prototype only got that "const" this week, and I missed that there were completers in the sim: http://sourceware.org/ml/gdb-patches/2013-03/msg00572.html Sorry about that. > 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. That's the right fix, thanks. -- Pedro Alves