[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange test in stdalign.m4

From: Eli Zaretskii
Subject: Re: Strange test in stdalign.m4
Date: Sat, 30 Mar 2013 08:58:09 +0300

> Date: Fri, 29 Mar 2013 19:42:13 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden
> On 03/29/2013 10:25 AM, Eli Zaretskii wrote:
> >> The test works for me, with GCC 4.7.2 and 4.8.0.  But you're right, it
> >> > does rely on an extension to ISO C11.  Which GCC versions
> >> > were you using?
> > The newest one was 4.4.3 (on fencepost).
> But fencepost GCC 4.4.3 lacks stdalign.h, which means the test program
> that you gave should fail to compile, and the stdalign.h test's failure
> to compile under GCC 4.4.3 is a feature not a bug.  I.e., although
> you've found a portability problem in that test, I don't see how
> the problem is relevant to GCC 4.4.3.

Yes, I know there's no stdalign.h on fencepost, but I injected the
contents of gnulib's stdalign.h as a preamble to the test program, to
see if it will work.

The goal was to see whether the problem is specific to the (older)
version of GCC I have on the particular Windows box where I first saw
the failure.

> You mentioned earlier that you saw the following diagnostics:
>   ta.c:36: error: expected specifier-qualifier-list before ‘alignas_int’
>   ta.c:36: error: ‘struct <anonymous>’ has no member named ‘__b’
> Which compiler version emitted these diagnostics?

The one on fencepost.

The broader context of this is running the configure script on a
Windows machine, where I arrange for the configure tests to use the
header files in the nt/inc directory in order to pass some of the
tests, which would have failed if only the system headers were used.
In nt/inc, we have stdalign.h that is a copy of lib/stdalign.h, but
the compiler might still be old.

If you'd prefer not to modify the gnulib test (although I don't see
downsides to that), I can force configure to accept nt/inc/stdalign.h
by setting an autoconf variable, although I think fixing the test is
cleaner.  I just was stumped by the failure and didn't understand what
was going on.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]