Bruno Haible wrote:
This manual is for a quite new HP cc on Itanium (IA-64) servers.
I'm talking about an older HP cc on hppa.
2008 is "quite new"? Clocks must run slowly in the HP-UX world. :-)
I guess the 'aligned' attribute works with some HP-UX cc compilers but not
others. We know it does not work on your compiler (PA-RISC, __HP_cc==111120).
This circa 2013 email quoting Richard Lloyd:
https://lists.gnu.org/archive/html/bug-gnulib/2013-02/msg00095.html
suggests that he had PA-RISC version 111120 and Itanium version 62600 - the
former corresponding to the compiler you used, and the latter presumably
corresponding to the Itanium version A.06.20 listed in the manual you cited, the
manual that says "__attribute__ ((aligned (16)))" works.
I'm inclined to guess that the 'aligned' attribute works on new-enough Itanium
but not PA-RISC compilers. If my guess is right Emacs is in less trouble, since
PA-RISC is mostly obsolete but Itanium is still going. So, how about if we
assume that the "061200" applies to Itanium but not PA-RISC? That should fix
your problem, and we can find out later if the "061200" is right for Itanium, if
and when someone tries it out. Something like the attached, which I boldly
installed.
From 72922da37967a7501be73a3dd2d209276bc4b162 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sat, 18 Mar 2017 22:35:02 -0700
Subject: [PATCH] stdalign: restore previous behavior for HP-UX IA64
See Bruno Haible's email in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-03/msg00066.html
which cites p 150 of a manual saying that 'aligned' works on Itanium.
* lib/stdalign.in.h (_Alignas):
Assume the '061200' applies to Itanium, not to PA-RISC.
* m4/stdalign.m4 (gl_STDALIGN_H): Adjust to match stdalign.in.h.
---
ChangeLog | 10 ++++++++++
lib/stdalign.in.h | 2 +-
m4/stdalign.m4 | 4 ++--
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b0529b5..396b0b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-03-18 Paul Eggert <egg...@cs.ucla.edu>
+
+ stdalign: restore previous behavior for HP-UX IA64
+ See Bruno Haible's email in:
+ http://lists.gnu.org/archive/html/bug-gnulib/2017-03/msg00066.html
+ which cites p 150 of a manual saying that 'aligned' works on Itanium.
+ * lib/stdalign.in.h (_Alignas):
+ Assume the '061200' applies to Itanium, not to PA-RISC.
+ * m4/stdalign.m4 (gl_STDALIGN_H): Adjust to match stdalign.in.h.
+
2017-03-17 Bruno Haible <br...@clisp.org>
stat-time, timespec: Support use of the header files in C++ mode.
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
index f6f4190..1b6d8cb 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_aCC \
+ || (__ia64 && (061200 <= __HP_cc || 061200 <= __HP_aCC)) \
|| __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
# elif 1300 <= _MSC_VER
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index 5c15ef0..a7572a3 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -35,8 +35,8 @@ AC_DEFUN([gl_STDALIGN_H],
|| (defined __APPLE__ && defined __MACH__ \
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
: __GNUC__) \
- || __HP_aCC || __IBMC__ || __IBMCPP__ \
- || __ICC || 0x5110 <= __SUNPRO_C \
+ || (__ia64 && (061200 <= __HP_cc || 061200 <= __HP_aCC)) \
+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
|| 1300 <= _MSC_VER)
struct alignas_test { char c; char alignas (8) alignas_8; };
char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
--
2.7.4