+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).
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
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
{
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
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