]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
attribute: Work around compiler bug of Oracle cc 12.6.
authorBruno Haible <bruno@clisp.org>
Fri, 29 Mar 2024 13:35:01 +0000 (14:35 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 29 Mar 2024 13:35:01 +0000 (14:35 +0100)
* m4/gnulib-common.m4 (gl_COMMON_BODY): Expand _GL_ATTRIBUTE_PACKED to
empty on SunPRO C.

ChangeLog
m4/gnulib-common.m4

index 84a33eecb7a85e8104940d524162ec0241d67885..72bb1819fed76a2a7d8af5f341354a4ff9149e04 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-03-29  Bruno Haible  <bruno@clisp.org>
+
+       attribute: Work around compiler bug of Oracle cc 12.6.
+       * m4/gnulib-common.m4 (gl_COMMON_BODY): Expand _GL_ATTRIBUTE_PACKED to
+       empty on SunPRO C.
+
 2024-03-29  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool.py: Don't print Makefile.am edits that are already done.
index d8d0904f78771bf6c642220d88effbb9c7a2a07f..d028b0ac2a379ddf05e7074ade34445cf1cb2f3d 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 92
+# gnulib-common.m4 serial 93
 dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -504,8 +504,10 @@ AC_DEFUN([gl_COMMON_BODY], [
    minimizing the memory required.  */
 /* Applies to: struct members, struct, union,
    in C++ also: class.  */
+/* Oracle Studio 12.6 miscompiles code with __attribute__ ((__packed__)) despite
+   __has_attribute OK.  */
 #ifndef _GL_ATTRIBUTE_PACKED
-# if _GL_HAS_ATTRIBUTE (packed)
+# if _GL_HAS_ATTRIBUTE (packed) && !defined __SUNPRO_C
 #  define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
 # else
 #  define _GL_ATTRIBUTE_PACKED