[patch] Fix array aliasing conftest

Jeff Johnston jjohnstn@redhat.com
Wed Apr 8 20:13:00 GMT 2009


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
>
>   



More information about the Newlib mailing list