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

--- Comment #10 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot 
Uni-Bielefeld.DE> ---
> --- 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.

Fortunately that's resolved now.

> 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

Right.  However, Solaris 10 support was removed after GCC 9, so we won't
have to worry about that any longer.

> 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.

Indeed.  Solaris 11.3 is the oldest Solaris 11 update I can (and do)
check regularly.  However, people without access to the support repo
will either be stuck with S11.3 FCS or need a reinstall of S11.4 FCS
given the lack of an upgrade path without the support repo.

Since I don't want to leave Solaris users under the development and
testing clause out in the cold, I'm not yet prepared to declare S11.3
unsupported, so even on GCC trunk we cannot think about removing the
__STDC_VERSION__ and _XOPEN_SOURCE defines for C++.

Reply via email to