bug-gnulib
[Top][All Lists]
Advanced

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

Re: stdalign test with HP-UX cc


From: Paul Eggert
Subject: Re: stdalign test with HP-UX cc
Date: Thu, 16 Mar 2017 00:38:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Bruno Haible wrote:
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.

That sounds too drastic; I worry that it would break GNU Emacs, which relies on having alignas.

Does Emacs 25.1 build with that compiler? If so, could you investigate why Enacs works, whereas the stdalign test fails? Emacs 25.1 should be using lib/stdalign.in.h. If it works for Emacs and fails for tests/test-stdalign.c, then the latter is probably just too picky.

I don't have access to any HP-UX cc, unfortunately. MariaDB 10.1.22 include/my_compiler.h uses this test:

  #elif defined(__HP_aCC) || defined(__HP_cc)
  # if (__HP_aCC >= 60000) || (__HP_cc >= 60000)

and Qt 4, which I think worries only about C++, has the equivalent of:

  #if __cplusplus >= 199707L && __HP_aCC-0 >= 061200

(though it uses '__attribute__((aligned(n))', not '__attribute__ ((__aligned__ (n)))'). I expect it's Qt that I got the "061200" from. At this point these compiler-version numbers are so old it will be difficult to find out whether they were really supposed to be octal or decimal, way back when.

Does it fix things to replace '__attribute__ ((__aligned__ (n)))' with '__attribute__((aligned(n))' in lib/stdalign.in.h? If so, we could use that as a workaround. This is a long-shot, admittedly.



reply via email to

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