[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: |
H.Merijn Brand |
Subject: |
Re: autoconf-2.52g on HP-UX (was: bison 1.32) |
Date: |
Mon, 04 Feb 2002 10:23:57 +0100 |
On Sat 02 Feb 2002 06:01, Paul Eggert <address@hidden> wrote:
> > > # 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);
> }
l1:/tmp 108 > cat > xx.c
static int test_array[1 - 2 * !((int)(sizeof(unsigned char)) >= 0)];
int main ()
{
test_array[0] = 0;
return (0);
}
l1:/tmp 109 > cc +O2 -Ae -o xx xx.c
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (xx.o) was detected.
The linked output may not run on a PA 1.x system.
l1:/tmp 110 > cat > xx.c
static int test_array[1 - 2 * !((long)(sizeof(unsigned char)) >= 0)];
int main ()
{
test_array[0] = 0;
return (0);
}
l1:/tmp 111 > cc +O2 -Ae -o xx xx.c
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (xx.o) was detected.
The linked output may not run on a PA 1.x system.
l1:/tmp 112 > cat > xx.c
static int test_array[1 - 2 * !((unsigned long)(sizeof(unsigned char)) >= 0)];
int main ()
{
test_array[0] = 0;
return (0);
}
l1:/tmp 113 > cc +O2 -Ae -o xx xx.c
cc: "xx.c", line 1: error 1877: Objects with linkage (internal or external) cann
ot have a variably-modified type.
Exit 1
l1:/tmp 114 >
HTH
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 630 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/