[Top][All Lists]

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

Re: bison 1.32

From: Paul Eggert
Subject: Re: bison 1.32
Date: Wed, 30 Jan 2002 15:17:54 -0800 (PST)

> From: Akim Demaille <address@hidden>
> Date: 29 Jan 2002 18:43:37 +0100

> Paul, what would you suggest?  Testing the cross-compilation code only
> for GCC seems to make sense to me.

That seems a bit strong, as other compilers can cross-compile.
Before doing that, I'd like to try to fix the underlying problem with
HP-UX's C compiler, as I expect it may break other things too.

Currently the autoconf source code says this:

  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.

My guess is that this known HP bug is related to the problem that
Mr. Brand is observing.  Mr. Brand's log indicates that Autoconf is
trying to compile a program like this:

   int main () {
     static int test_array [1 - 2 * !(((unsigned long) (sizeof (unsigned 
char))) >= 0)];
     test_array [0] = 0;
     return 0;

This is portable standard C code, but if my guess is correct, it fails
for some reason on the HP-UX compiler.

I have three requests for Mr. Brand:

1.  The part of the log that I saw in Akim's email actually said "<"
    instead of ">=", but I'm guessing that a previous entry in the log
    said ">=", as Autoconf tries that first.  Can you please verify
    this guess?  You should be able to find something like the above
    program in your config.log already, and config.log should already
    report a failure for the above compilation.

2.  Can you please verify the above program indeed fails when you
    compile it by hand?  Please compile it as follows:

      cc -c -Ae +O2 +Onolimit +DAportable -I/pro/local/include 
-I/usr/include/X11R6 conftest.c

3.  Assuming the above program does not compile for you,
    can you please try compiling the following instead?
    Please use the same command line:

      int main () {
        static unsigned char uc;
        static int test_array[1 - 2 * !((sizeof uc) >= 0)];
        test_array [0] = 0;
        return 0;

If (3) compiles, then we can work around the HP-UX cc bugs by changing
Autoconf to use (3)'s form.

reply via email to

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