Menu

#1511 updates for GCC 15

Undefined
applied
nobody
None
Patch
2025-03-24
2025-01-23
Dan Horak
No

Here are fixes needed to get C::B built with GCC 15

Maybe the use of <ciso646> could be removed completely as only _LIBCPP_VERSION is only mentioned in ./src/sdk/mozilla_chardet/include/mfbt/mozilla/Compiler.h, but not used for anything real if I see right.</ciso646>

2 Attachments

Discussion

  • pecan

    pecan - 2025-01-23

    For information only:
    // ----------------------------------------------------------------------------
    what is c++ uint_fast32_t
    // ----------------------------------------------------------------------------
    uint_fast32_t is a C++ fixed-width integer type defined in the <cstdint> header. It represents the fastest unsigned integer type with at least 32 bits
    Key characteristics of uint_fast32_t include:
    It is guaranteed to be at least 32 bits wide.
    It is optimized for speed on the target platform.
    Its actual size may vary depending on the architecture.</cstdint>

    On some systems, uint_fast32_t might be implemented as a 64-bit integer if that's faster than a 32-bit integer
    .For example, on a 64-bit Intel architecture, uint_fast32_t could be 64 bits wide2
    The purpose of uint_fast32_t is to provide a balance between guaranteed minimum size and optimal performance. It's particularly useful when writing portable code that requires fast integer operations with at least 32 bits of precision1
    // ----------------------------------------------------------------------------
    What is ciso646
    // ----------------------------------------------------------------------------
    <ciso646> is a C++ standard library header that provides alternative spellings for C++ operators1</ciso646>

    . It was originally introduced as a compatibility header to include the C standard library header <iso646.h>1</iso646.h>

    The main purpose of <ciso646> was to define alternative tokens for operators that might be difficult to type on some international keyboards2
    . However, in C++, these alternative spellings are treated as keywords and do not require the inclusion of any header5
    Key points about <ciso646>:</ciso646></ciso646>

    It defines 11 macro constants as alternatives for C++ operators5
    
    In C++, the header has no effect as the alternative spellings are built-in keywords
    The header was deprecated in C++17 and removed in C++202
    In C, the equivalent <iso646.h> header is still retained for compatibility2
    

    While <ciso646> is no longer necessary in modern C++, understanding its historical context helps in comprehending legacy code and the evolution of the C++ language.</ciso646>

    // ----------------------------------------------------------------------------
    What is the c++ <version> header
    // ---------------------------------------------------------------------------
    The <version> header is a C++ standard library header introduced in C++20. It provides implementation-dependent information about the standard library, such as implementation-specific library version macros5
    Key points about the <version> header:</version></version></version>

    It supplies information about the standard library implementation.
    The header contains implementation-specific library version macros.
    It was introduced as part of the C++20 standard.
    

    The <version> header is primarily used by developers who need to check for specific features or versions of the standard library implementation they are using. This can be particularly useful when writing cross-platform code or when dealing with different compiler versions that may have varying levels of C++ standard support.</version>

     
  • pecan

    pecan - 2025-03-12

    In GCC, the usage of <ciso646> and <iso646.h> has evolved over time, with <version> now being the recommended header for certain functionality15.
    Key differences:</version></iso646.h></ciso646>

    <ciso646> and <iso646.h>:
    
        Originally provided alternative operator representations in C1.
    
        In C++, these operators became keywords, making the header essentially empty2.
    
        Deprecated in C++17 and removed in C++2015.
    
    <version>:
    
        Introduced as a replacement for detecting implementation-specific macros4.
    
        Recommended for use in C++20 and later4.
    

    GCC-specific behavior:

    In GCC 4.6.3 and earlier, <ciso646> was still included as a compatibility header3.
    
    Recent GCC versions (as of 2025) issue warnings or errors when using <ciso646>:
    
        C++17 and later: Warning about deprecation4.
    
        C++20 and later: Error, suggesting to use <version> instead4.
    

    For modern C++ development with GCC, it's recommended to use <version> for implementation-specific macro detection, as <ciso646> is no longer part of the C++ standard library</ciso646></version>

     
  • pecan

    pecan - 2025-03-24

    Applied svn 13640
    Thanks

     
  • pecan

    pecan - 2025-03-24
    • status: open --> applied
     

Log in to post a comment.

MongoDB Logo MongoDB