This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix PR bootstrap/42798
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>, binutils at sourceware dot org, gdb-patches at sourceware dot org
- Date: Fri, 04 Jun 2010 17:04:15 +0200
- Subject: Re: [PATCH] Fix PR bootstrap/42798
- References: <20100601204405.GA1170@gmx.de> <AANLkTim4-8VpK907cHTIcT2ELeZEgOBpLf0FUJmpPCJN@mail.gmail.com> <20100602111845.GA16161@ins.uni-bonn.de> <4C064B77.3020207@gnu.org> <20100603063319.GC28276@gmx.de> <20100603065852.GA28617@gmx.de> <mcrocfqaloq.fsf@dhcp-172-17-9-151.mtv.corp.google.com>
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