This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix array aliasing conftest


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]