This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [patch] Fix array aliasing conftest
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: Ken Werner <ken at linux dot vnet dot ibm dot com>
- Cc: newlib at sourceware dot org
- Date: Wed, 08 Apr 2009 16:00:21 -0400
- Subject: Re: [patch] Fix array aliasing conftest
- References: <200904081657.35173.ken@linux.vnet.ibm.com>
Patch checked in, thanks.
-- Jeff J.
Ken Werner wrote:
Hi,
while looking at the autoconf scripts I noticed newlibs check for array
aliasing support (_HAVE_ARRAY_ALIASING). The configure.in specifies the
following conftest:
char x[3] = { 'a', 'b', 'c' };
extern char y[2] __attribute__((alias ("x+1")));
This looks valid but autoconf strips the square brackets. The generated
configure states:
char x3 = { 'a', 'b', 'c' };
extern char y2 __attribute__((alias ("x+1")));
I think this has never compiled as intended. Adding additional square brackets
in the configure.in seem to fix that. A patch is attached.
Regards
Ken