[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stdalign test with HP-UX cc
From: |
Bruno Haible |
Subject: |
stdalign test with HP-UX cc |
Date: |
Wed, 15 Mar 2017 22:03:46 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-66-generic; KDE/5.18.0; x86_64; ; ) |
Hi Paul,
With cc on HP-UX 11.31, test-stdalign.c fails to compile:
cc -DHAVE_CONFIG_H -I. -I.. -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1
-I. -I. -I.. -I./.. -I../gllib -I./../gllib -g -c -o test-stdalign.o
test-stdalign.c
cc: "test-stdalign.c", line 65: error 1000: Unexpected symbol: "8".
cc: "test-stdalign.c", line 65: error 1000: Unexpected symbol: "8".
cc: "test-stdalign.c", line 66: error 1000: Unexpected symbol: "8".
cc: "test-stdalign.c", line 66: error 1000: Unexpected symbol: "8".
...
This is the info about the compiler:
$ cat > x.c
__STDC_VERSION__
__HP_cc
__HP_aCC
$ cc -E x.c
# 1 "x.c"
__STDC_VERSION__
111120
__HP_aCC
The number 111120 is larger than 061200 (octal!, = 25216), but it apparently
does not support the definition for _Alignas that you try use in stdalign.in.h
line 108.
Since I don't have access to a newer HP-UX cc compiler, I propose to just
disable this definition for HP-UX cc. This patch fixes the error.
2017-03-14 Bruno Haible <address@hidden>
stdalign: Make it work with HP-UX cc.
* lib/stdalign.in.h (_Alignas): Don't define for HP-UX cc.
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
index c2b791e..f6f4190 100644
--- a/lib/stdalign.in.h
+++ b/lib/stdalign.in.h
@@ -103,7 +103,7 @@
# elif ((defined __APPLE__ && defined __MACH__ \
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
: __GNUC__) \
- || 061200 <= __HP_cc || 061200 <= __HP_aCC \
+ || 061200 <= __HP_aCC \
|| __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
# elif 1300 <= _MSC_VER
- stdalign test with HP-UX cc,
Bruno Haible <=
- Re: stdalign test with HP-UX cc, Paul Eggert, 2017/03/16
- Re: stdalign test with HP-UX cc, Bruno Haible, 2017/03/16
- Re: stdalign test with HP-UX cc, Paul Eggert, 2017/03/17
- Re: stdalign test with HP-UX cc, Bruno Haible, 2017/03/17
- Re: stdalign test with HP-UX cc, Paul Eggert, 2017/03/17
- Re: stdalign test with HP-UX cc, Bruno Haible, 2017/03/17
- Re: stdalign test with HP-UX cc, Paul Eggert, 2017/03/19
- Re: stdalign test with HP-UX cc, Bruno Haible, 2017/03/19
- Re: stdalign test with HP-UX cc, Bruno Haible, 2017/03/19
- Re: stdalign test with HP-UX cc, Bruno Haible, 2017/03/19