https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57025

--- Comment #9 from Alan Coopersmith <alan.coopersmith at oracle dot com> ---
And I got here this week due to the discussion on
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2258/diffs?commit_id=78cd9c60eef40650bba1182d8bb51fc9beb938e2#note_254374
about why Mesa needed to check for _cplusplus and not just __STDC_VERSION__
when deciding whether or not to use the "restrict" keyword.

I too fear you'll be carrying this code for a while - even in the latest
patches, Solaris 10 has in the <sys/feature_tests.h> header:

#if __STDC_VERSION__ - 0 >= 199901L
#define _STDC_C99
#endif

[...]

#if defined(_STDC_C99) && (defined(__XOPEN_OR_POSIX) && !defined(_XPG6))
#error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
        and pre-2001 POSIX applications"
#elif !defined(_STDC_C99) && \
        (defined(__XOPEN_OR_POSIX) && defined(_XPG6))
#error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications \
        require the use of c99"
#endif

That's also in the initial release of Solaris 11.3 - you either need to have
Solaris 11.3 support updates or to upgrade to Solaris 11.4 to get a version
of <sys/feature_tests.h> without that check.

Reply via email to