bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: build problem on HP-UX 10.20


From: Bruno Haible
Subject: Re: build problem on HP-UX 10.20
Date: Fri, 6 Feb 2004 22:03:43 +0100
User-agent: KMail/1.5

Christopher Seip wrote:
> The make fails in gettext-runtime/lib, compiling the setenv.c file, it is
> choking on the allocsa.h file:
>
> cc -DDEPENDS_ON_LIBINTL=1 -DHAVE_CONFIG_H -I. -I. -I.. -I../intl
> -I./../intl -I../../gettext-tools/lib -I./../../gettext-tools/lib -Ae
> +DAportable -c setenv.c
> cc: "../../gettext-tools/lib/allocsa.h", line 96: error 1509: Enumeration
> value must be constant.
> cc: "../../gettext-tools/lib/allocsa.h", line 106: warning 551: Integer
> division by zero.
>
> Anything I can do to get past this barrier?

Yes, please. Since you are at HP, you at in a very good position for
reporting these three HP-UX 10.20 cc bugs to HP.

=========================== bug1.c ========================
#include <stddef.h>
enum {
  a = offsetof(struct { char x; long y; }, y)
};
enum {
  b = a
};
===========================================================

$ cc -Ae -c bug1.c
cc: "bug1.c", line 6: error 1509: Enumeration value must be constant.

Bug the enumeration value in line 6, namely "a", is a constant, according
to ISO C 99 section 6.6.(6). {I'm not joking!}

=========================== bug2.c ========================
#include <stddef.h>
enum {
  a = offsetof(struct { char x; long y; }, y)
};
int b = a;
===========================================================

$ cc -Ae -c bug2.c
cc: "bug2.c", line 5: error 1521: Incorrect initialization.

=========================== bug3.c ========================
#include <stddef.h>
#include <stdio.h>
enum {
  a = offsetof(struct { char x; long y; }, y)
};
int main () { printf("%d", a); return 0; }
===========================================================

$ cc -Ae -c bug3.c
cc: line 6: main(): internal error 5167: Alignment inappropriate for Ucode 
operator (5167)

Uh uh, cc caught itself...

I'll add a workaround to the next gettext release. Thanks for the report.

Bruno





reply via email to

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