From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15839 invoked by alias); 4 Jun 2010 15:04:36 -0000 Received: (qmail 15802 invoked by uid 22791); 4 Jun 2010 15:04:35 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM X-Spam-Check-By: sourceware.org Received: from mail-ww0-f41.google.com (HELO mail-ww0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Jun 2010 15:04:24 +0000 Received: by wwb24 with SMTP id 24so1094104wwb.0 for ; Fri, 04 Jun 2010 08:04:21 -0700 (PDT) Received: by 10.227.133.18 with SMTP id d18mr10697127wbt.186.1275663859013; Fri, 04 Jun 2010 08:04:19 -0700 (PDT) Received: from yakj.usersys.redhat.com (nat-pool-brq-t.redhat.com [209.132.186.34]) by mx.google.com with ESMTPS id z33sm10724346wbd.1.2010.06.04.08.04.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 04 Jun 2010 08:04:17 -0700 (PDT) Message-ID: <4C0915EF.6030906@gnu.org> Date: Fri, 04 Jun 2010 15:04:00 -0000 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Thunderbird/3.0.4 MIME-Version: 1.0 To: Ian Lance Taylor CC: Ralf Wildenhues , binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH] Fix PR bootstrap/42798 References: <20100601204405.GA1170@gmx.de> <20100602111845.GA16161@ins.uni-bonn.de> <4C064B77.3020207@gnu.org> <20100603063319.GC28276@gmx.de> <20100603065852.GA28617@gmx.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 2010-06/txt/msg00118.txt.bz2 On 06/04/2010 04:59 PM, Ian Lance Taylor wrote: > With regard to the gold change. What will happen if the system header > files provide only a declaration > char *basename(const char *) > ? I think it works, because C casts are allowed to do anything they want to constness. Certainly both of the following compile fine: char *f(const char *x) { } typedef char *(*funtype) (char *g); funtype gg = (char * (*) (char *)) f; char *f(char *x) { } typedef char *(*funtype) (const char *g); funtype gg = (char * (*) (const char *)) f; Paolo