https://gcc.gnu.org/g:e63d913a6182b14310af507de3b53e42b86cbd12

commit r17-1166-ge63d913a6182b14310af507de3b53e42b86cbd12
Author: Rainer Orth <[email protected]>
Date:   Tue Jun 2 10:31:47 2026 +0200

    Switch g++ to default Solaris 11.4 compilation environment
    
    g++ has predefined _XOPEN_SOURCE=600 since
    
            [fixincludes, v3] Enable full ISO C99 support for C++ on Solaris 10+
            http://gcc.gnu.org/ml/gcc-patches/2010-05/msg01308.html
    
    While Solaris 10 introduced XPG6/POSIX.1-2001 support, the default
    compilation environment remained XPG3 until Solaris 11.3.  However,
    libstdc++ uses many XPG6 interfaces, so g++ needed to explicitly enable
    that.
    
    Only Solaris 11.4 implemented XPG7/POSIX.1-2008 support, at the same
    time changing the default to XPG7.
    
    Therefore, g++ can remove the explicit enablement of XPG6, using the
    11.4 default just like gcc has done all the time.
    
    __EXTENSIONS__ needs to remain, however: a considerable part of
    libstdc++ depends on that.
    
    Bootstrapped on i386-pc-solaris2.11, amd64-pc-solaris2.11,
    sparc-sun-solaris2.11, and sparcv9-sun-solaris2.11.  There were no
    changed to any config.h file.
    
    2026-05-15  Rainer Orth  <[email protected]>
    
            gcc:
            * config/sol2.h (TARGET_OS_CPP_BUILTINS): Don't define
            _XOPEN_SOURCE=600 for C++.

Diff:
---
 gcc/config/sol2.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
index aff67fca3232..b83cb84582d4 100644
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -114,7 +114,6 @@ along with GCC; see the file COPYING3.  If not see
            builtin_define ("__STDC_VERSION__=201112L");\
            break;                                      \
          }                                             \
-       builtin_define ("_XOPEN_SOURCE=600");           \
        builtin_define ("_LARGEFILE_SOURCE=1");         \
        builtin_define ("_LARGEFILE64_SOURCE=1");       \
        builtin_define ("_FILE_OFFSET_BITS=64");        \

Reply via email to