]> Savannah Git Hosting - gnulib.git/commitdiff
stdint-tests: long long preproc on recent Sun C
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Sep 2021 06:46:19 +0000 (23:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Sep 2021 06:46:39 +0000 (23:46 -0700)
* tests/test-stdint.c: Test long long preprocessor constants on
Oracle Developer Studio 12.6, where they should work.

ChangeLog
doc/posix-headers/stdint.texi
m4/extern-inline.m4
tests/test-func.c
tests/test-stdint.c

index f1e5cc7d6648cbe546b7a6bff19b0e5b20cfce6f..d64252c386124e5f491fdc7c89b792f7793c7931 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-09-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       stdint-tests: long long preproc on recent Sun C
+       * tests/test-stdint.c: Test long long preprocessor constants on
+       Oracle Developer Studio 12.6, where they should work.
+
 2021-09-13  Bruno Haible  <bruno@clisp.org>
 
        extern-inline: Fix syntax error on macOS with GCC 11 (regr. 2021-08-22).
index 784799b0f2fae02d8c112cb4d0de96fc5dea0fd7..7f33b20d23d15ed168635594976884e395207777 100644 (file)
@@ -58,8 +58,10 @@ so public header files should avoid these types.
 Macros are used instead of typedefs.
 @item
 Some C preprocessors mishandle constants that do not fit in @code{long int}.
-For example, as of 2007, Sun C mishandles @code{#if LLONG_MIN < 0} on
-a platform with 32-bit @code{long int} and 64-bit @code{long long int}.
+For example, as of 2007, Sun C mishandled @code{#if LLONG_MIN < 0} on
+a platform with 32-bit @code{long int} and 64-bit @code{long long int};
+this bug was fixed on or before Oracle Developer Studio 12.6
+(Sun C 5.15 SunOS_sparc 2017/05/30).
 Some older preprocessors mishandle constants ending in @code{LL}.
 To work around these problems, compute the value of expressions like
 @code{LONG_MAX < LLONG_MAX} at @code{configure}-time rather than at
index 94443f2125452db4c26b1e676871e6386e4b452d..a4ac5ea532af579400a9b4d03a34a9373ae7b767 100644 (file)
@@ -17,7 +17,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
    mishandles inline functions that call each other.  E.g., for 'inline void f
    (void) { } inline void g (void) { f (); }', c99 incorrectly complains
    'reference to static identifier "f" in extern inline function'.
-   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+   This bug was observed with Oracle Developer Studio 12.6
+   (Sun C 5.15 SunOS_sparc 2017/05/30).
 
    Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
    on configurations that mistakenly use 'static inline' to implement
index d680759668cd31e287d500f57b716fe1aa213cc4..0d00b97efa23170e886ab47f947537b5cf33e729 100644 (file)
@@ -27,8 +27,8 @@ main ()
 {
   ASSERT (strlen (__func__) > 0);
 
-  /* On SunPRO C 5.9, sizeof __func__ evaluates to 0.  The compiler warns:
-     "warning: null dimension: sizeof()".  */
+  /* On Oracle Developer Studio 12.6 and earlier, sizeof __func__ yields 0.
+     The compiler warns: "warning: null dimension: sizeof()".  */
 #if !defined __SUNPRO_C
   ASSERT (strlen (__func__) + 1 == sizeof __func__);
 #endif
index dc6fad7aa62db68a4747627c169e924e5e4534bc..737ff56c89567bbc9707ff782388838201e0944a 100644 (file)
@@ -247,9 +247,10 @@ uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX };
 verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX);
 verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0);
 
-/* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in
+/* Older Sun C and HP-UX 10.20 cc don't support 'long long' constants in
    the preprocessor.  */
-#if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__))
+#if !((defined __SUNPRO_C && __SUNPRO_C < 0x5150) \
+      || (defined __hpux && !defined __GNUC__))
 #if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX
 /* ok */
 #else