[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf-2.52g on HP-UX (was: bison 1.32)
From: |
Paul Eggert |
Subject: |
Re: autoconf-2.52g on HP-UX (was: bison 1.32) |
Date: |
Fri, 1 Feb 2002 21:01:12 -0800 (PST) |
> > # 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.
>
> Do you know if the report is available on SUM, or only to the reporting
> customer? If public, through what interface?
Sorry, I don't know. That SR number was reported by another HP user,
who said that a compiler guy at HP had filed a bug report.
> Could you please be more specific.
That's not necessary, as you answered the question indirectly in your
later answers.
> l1:/tmp 115 > cat conftest2.c
> int main ()
> {
> static unsigned char uc;
> static int test_array[1 - 2 * !((sizeof uc) >= 0)];
> test_array[0] = 0;
> return (0);
> } /* main */
> l1:/tmp 116 > cc -c -Ae +O2 +Onolimit +DAportable -I/pro/local/include
> -I/usr/include/X11R6 conftest2.c
> cc: "conftest2.c", line 4: error 1879: Variable-length arrays cannot have
> static storage.
Yes, it's clear that that cc is buggy.
Is there some way to work around the problem? What happens if you
compile with plain 'cc -c', for example?
Also, how about the following three programs? I'm asking because the
HP bug report indicates that at least the first program should work.
static int test_array[1 - 2 * !((int)(sizeof(unsigned char)) >= 0)];
int main ()
{
test_array[0] = 0;
return (0);
}
static int test_array[1 - 2 * !((long)(sizeof(unsigned char)) >= 0)];
int main ()
{
test_array[0] = 0;
return (0);
}
static int test_array[1 - 2 * !((unsigned long)(sizeof(unsigned char)) >= 0)];
int main ()
{
test_array[0] = 0;
return (0);
}
- Re: autoconf-2.52g on HP-UX (was: bison 1.32),
Paul Eggert <=