[PATCH gcc/* v3 0/2] Typed qualifiers, libstdc++ backporting edition
Arsen Arsenović
aarsenovic@baylibre.com
Sat Sep 5 13:07:40 GMT 2026
From: Arsen Arsenović <arsen@gcc.gnu.org>
Okay, I've finished a backport of the std::optional from libstdc++. It
was mostly mechanical as described in the commit message of patch 1.
This patch does not use it directly, but the named address spaces
support will and, with the help of the gcc-rust developers, so will the
Rust FE.
std::expected was reimplemented, also described in patch 1.
Both were tested against the libstdc++ testsuite.
I also wrote up a section in gccint about qualification per request on
IRC.
I chose not to change cv_qualifier further in the end.
Reg-strapped on x86_64-linux-gnu, also built stage1 against gcc-5.5.
OK? If so, I'll send the rebased named address spaces patch (which also
passes reg-strap and whose stage1 builds with gcc-5.5) next.
Arsen Arsenović (2):
gcc: backport std::{optional,expected} from libstdc++ into C++14
gcc: stop using 'int' to represent sets of qualifiers
gcc/ada/gcc-interface/decl.cc | 15 +-
gcc/ada/gcc-interface/gigi.h | 14 +-
gcc/ada/gcc-interface/utils.cc | 3 +-
gcc/attribs.cc | 7 +-
gcc/attribs.h | 2 +-
gcc/c-family/c-ada-spec.cc | 6 +-
gcc/c-family/c-common.cc | 20 +-
gcc/c-family/c-common.h | 8 +-
gcc/c-family/c-format.cc | 2 +-
gcc/c-family/c-pretty-print.cc | 9 +-
gcc/c-family/c-pretty-print.h | 2 +-
gcc/c/c-decl.cc | 90 +-
gcc/c/c-objc-common.cc | 4 +-
gcc/c/c-parser.cc | 8 +-
gcc/c/c-tree.h | 6 +-
gcc/c/c-typeck.cc | 84 +-
gcc/config/aarch64/aarch64-acle-builtins.cc | 2 +-
gcc/config/arm/arm-c.cc | 3 +-
gcc/config/arm/arm-mve-builtins.cc | 2 +-
gcc/config/avr/avr.cc | 8 +-
gcc/config/gcn/gcn-tree.cc | 11 +-
gcc/config/i386/i386-builtins.cc | 2 +-
gcc/config/i386/i386.cc | 2 +-
gcc/config/rl78/rl78.cc | 2 +-
gcc/config/rs6000/rs6000-c.cc | 6 +-
gcc/config/s390/s390-c.cc | 6 +-
gcc/coretypes.h | 2 +-
gcc/cp/call.cc | 4 +-
gcc/cp/class.cc | 2 +-
gcc/cp/cp-objcp-common.cc | 7 +
gcc/cp/cp-objcp-common.h | 3 +-
gcc/cp/cp-tree.h | 12 +-
gcc/cp/decl.cc | 12 +-
gcc/cp/error.cc | 2 +-
gcc/cp/mangle.cc | 7 +-
gcc/cp/method.cc | 32 +-
gcc/cp/module.cc | 3 +-
gcc/cp/pt.cc | 11 +-
gcc/cp/reflect.cc | 12 +-
gcc/cp/semantics.cc | 4 +-
gcc/cp/tree.cc | 34 +-
gcc/cp/typeck.cc | 42 +-
gcc/d/d-codegen.cc | 2 +-
gcc/d/types.cc | 2 +-
gcc/doc/generic.texi | 460 +++-
gcc/dwarf2out.cc | 46 +-
gcc/fortran/trans-openmp.cc | 2 +-
gcc/fortran/trans-types.cc | 3 +-
gcc/gimple-lower-bitint.cc | 21 +-
gcc/gimplify.cc | 13 +-
gcc/ipa-free-lang-data.cc | 5 +-
gcc/jit/dummy-frontend.cc | 2 +-
gcc/langhooks-def.h | 2 +-
gcc/langhooks.cc | 2 +-
gcc/langhooks.h | 5 +-
gcc/objc/objc-act.cc | 6 +-
gcc/omp-low.cc | 4 +-
gcc/omp-oacc-neuter-broadcast.cc | 4 +-
gcc/omp-offload.cc | 15 +-
gcc/rust/backend/rust-tree.cc | 35 +-
gcc/rust/backend/rust-tree.h | 10 +-
gcc/stdbackport/expected | 2361 +++++++++++++++++
gcc/stdbackport/expectedfwd | 31 +
gcc/stdbackport/gbits/assert.h | 29 +
gcc/stdbackport/gbits/check_system_h.h | 31 +
.../gbits/enable_special_members.h | 310 +++
gcc/stdbackport/gbits/exception_defines.h | 53 +
gcc/stdbackport/gbits/extras.h | 56 +
gcc/stdbackport/gbits/functional_hash.h | 60 +
gcc/stdbackport/gbits/inplace_tags.h | 58 +
gcc/stdbackport/gbits/invoke.h | 132 +
gcc/stdbackport/gbits/more_type_traits.h | 614 +++++
gcc/stdbackport/gbits/optional_ref.h | 550 ++++
gcc/stdbackport/gbits/stl_construct.h | 162 ++
gcc/stdbackport/optional | 1786 +++++++++++++
gcc/stdbackport/optionalfwd | 36 +
gcc/tree-core.h | 74 +-
gcc/tree-dump.cc | 7 +-
gcc/tree-pretty-print.cc | 14 +-
gcc/tree-profile.cc | 2 +-
gcc/tree-sra.cc | 3 +-
gcc/tree-ssa-address.cc | 3 +-
gcc/tree-switch-conversion.cc | 3 +-
gcc/tree-vect-stmts.cc | 3 +-
gcc/tree.cc | 180 +-
gcc/tree.h | 282 +-
gcc/ubsan.cc | 4 +-
gcc/vtable-verify.cc | 6 +-
libcc1/libcc1plugin.cc | 2 +-
libcc1/libcp1plugin.cc | 4 +-
90 files changed, 7612 insertions(+), 396 deletions(-)
create mode 100644 gcc/stdbackport/expected
create mode 100644 gcc/stdbackport/expectedfwd
create mode 100644 gcc/stdbackport/gbits/assert.h
create mode 100644 gcc/stdbackport/gbits/check_system_h.h
create mode 100644 gcc/stdbackport/gbits/enable_special_members.h
create mode 100644 gcc/stdbackport/gbits/exception_defines.h
create mode 100644 gcc/stdbackport/gbits/extras.h
create mode 100644 gcc/stdbackport/gbits/functional_hash.h
create mode 100644 gcc/stdbackport/gbits/inplace_tags.h
create mode 100644 gcc/stdbackport/gbits/invoke.h
create mode 100644 gcc/stdbackport/gbits/more_type_traits.h
create mode 100644 gcc/stdbackport/gbits/optional_ref.h
create mode 100644 gcc/stdbackport/gbits/stl_construct.h
create mode 100644 gcc/stdbackport/optional
create mode 100644 gcc/stdbackport/optionalfwd
--
2.55.0
More information about the Gcc-rust
mailing list