This pass is responsible for resolving the privacy of items and verifying
that access to these items is performed within the limits of that privacy.
By default, items in Rust are private and only public to the current
module and its submodules. However, the user can annotate an item with
various qualifiers such as `pub` to publicly expose an item. Furthermore,
a module path can be given to `pub` to restrict an item's privacy to a
certain module: These paths need to be resolved and later on checked by
the privacy error reporter.
gcc/rust/
* checks/errors/privacy/rust-privacy-check.cc: New.
* checks/errors/privacy/rust-privacy-check.h: New.
* checks/errors/privacy/rust-privacy-common.h: New.
* checks/errors/privacy/rust-privacy-ctx.cc: New.
* checks/errors/privacy/rust-privacy-ctx.h: New.
* checks/errors/privacy/rust-privacy-reporter.cc: New.
* checks/errors/privacy/rust-privacy-reporter.h: New.
* checks/errors/privacy/rust-pub-restricted-visitor.cc: New.
* checks/errors/privacy/rust-pub-restricted-visitor.h: New.
* checks/errors/privacy/rust-reachability.cc: New.
* checks/errors/privacy/rust-reachability.h: New.
* checks/errors/privacy/rust-visibility-resolver.cc: New.
* checks/errors/privacy/rust-visibility-resolver.h: New.
Similarly to the unsafe checker, constant evaluation can only be performed
in a few contexts and include restrictions on the Rust language. Should
the user fail to uphold those conditions, errors will be reported and the
compilation pipeline interrupted.
These contexts are as follow:
- Array type length expressions
- Array repeat length expressions
- Constants
- Statics
- Enum discriminants
- Const generic arguments
In these contexts, the user is restricted to calling only functions marked
as `const` or perform arithmetic operations only on certain types, among
other restrictions.
gcc/rust/
* checks/errors/rust-const-checker.cc: New.
* checks/errors/rust-const-checker.h: New.
The UnsafeChecker visitor verifies that unsafe actions are only performed
in unsafe contexts. Otherwise, an error should be reported to the user and
the compilation pipeline should be halted. These contexts, which include
unsafe blocks or unsafe functions, are allowed to perform more actions
than regular safe Rust code. These actions currently include:
- Dereferencing raw pointers
- Calls to unsafe functions
- Use of inline assembly
- Use of mutable static
- Use of extern static
- Access to a union's field
- Call to functions with #[target(feature)] attribute
- Initializing type with rustc_layout_scalar_valid_range attribute
- Mutation of layout constrained field
- Borrow of layout constrained field
gcc/rust/
* checks/errors/rust-unsafe-checker.cc: New.
* checks/errors/rust-unsafe-checker.h: New.
Contains abstractions over Rust's types, used when performing the
HIR's type-resolution.
gcc/rust/
* typecheck/rust-tyty.cc: New.
* typecheck/rust-tyty.h: New.
The attribute checker is responsible for checking the validity of various
attributes including built-in ones. It is currently unfinished and will
receive some modifications, as well as become the host of some existing
code in the compiler which needs to be refactored. One of its
responsibilities is to make sure that arguments given to built-in
attributes are correct, or contain the correct type of information. This
visitor also checks that an attribute is allowed to be used in the current
particular context.
gcc/rust/
* util/rust-attributes.cc: New.
* util/rust-attributes.h: New.
This hash was ported from the Go runtime, as we needed a hash for the legacy
symbol mangling system. All symbols in Rust contain a hash of some
metadata for uniqueness on generic functions.
gcc/rust/
* util/fnv-hash.h: New.
This is a wrapper for make_unique. We can likely get rid of this, as there
are other implementations available, or simply keep using the unique_ptr
constructor.
gcc/rust/
* util/rust-make-unique.h: New.
This performs the lowering of the AST to HIR. The interesting piece here is
that we desugar much of the AST as mentioned in the previous pass, but
crucially, we also strip out all code that is "marked-for-strip" which failed
cfg-expansion from the expansion pass. After this, the HIR includes all code
required to compile for this crate.
gcc/rust/
* hir/rust-ast-lower-base.cc: New.
* hir/rust-ast-lower-base.h: New.
* hir/rust-ast-lower-block.h: New.
* hir/rust-ast-lower-enumitem.h: New.
* hir/rust-ast-lower-expr.h: New.
* hir/rust-ast-lower-extern.h: New.
* hir/rust-ast-lower-implitem.h: New.
* hir/rust-ast-lower-item.cc: New.
* hir/rust-ast-lower-item.h: New.
* hir/rust-ast-lower-pattern.cc: New.
* hir/rust-ast-lower-pattern.h: New.
* hir/rust-ast-lower-stmt.h: New.
* hir/rust-ast-lower-struct-field-expr.h: New.
* hir/rust-ast-lower-type.h: New.
* hir/rust-ast-lower.cc: New.
* hir/rust-ast-lower.h: New.
* hir/rust-hir-dump.cc: New.
* hir/rust-hir-dump.h: New.
This patch implements the classes mentioned in the previous HIR patch,
as well as a set of visitor frameworks used in handling that HIR.
gcc/rust/
* hir/tree/rust-hir-full-decls.h: New.
* hir/tree/rust-hir-full-test.cc: New.
* hir/tree/rust-hir-full.h: New.
* hir/tree/rust-hir-visitor.h: New.
* hir/tree/rust-hir.h: New.
This patch contains the declarations needed for our second intermediate
representation, which we will refer to as an HIR.
This gives the front-end a chance to desugar much of the AST, such as:
- Removing distinction between functions and methods
- Removing Macros
- Removing IdentifierExprs
- Removing duplicate attribute structures
gcc/rust/
* hir/tree/rust-hir-expr.h: New.
* hir/tree/rust-hir-item.h: New.
* hir/tree/rust-hir-path.h: New.
* hir/tree/rust-hir-pattern.h: New.
* hir/tree/rust-hir-stmt.h: New.
* hir/tree/rust-hir-type.h: New.
The name resolution is split into two phases, one toplevel pass which scans
the whole "Crate" which iterates all items and nested items in modules to
generate a context class full of CanonicalPath items. It also generates
a hierarchy of parent->child and child->parent relationships using the AST
NodeId for PathResolution in the second phase.
The second phase drills into each item like functions and creates a stack
of canonical paths for variables etc so that we can store information in
a side table of usage variable 'a' resolves to NodeId '123' which refers
to the NodeId of the "let a;" statement.
gcc/rust/
* resolve/rust-ast-resolve-base.cc: New.
* resolve/rust-ast-resolve-base.h: New.
* resolve/rust-ast-resolve-expr.cc: New.
* resolve/rust-ast-resolve-expr.h: New.
* resolve/rust-ast-resolve-implitem.h: New.
* resolve/rust-ast-resolve-item.cc: New.
* resolve/rust-ast-resolve-item.h: New.
* resolve/rust-ast-resolve-path.cc: New.
* resolve/rust-ast-resolve-path.h: New.
* resolve/rust-ast-resolve-pattern.cc: New.
* resolve/rust-ast-resolve-pattern.h: New.
* resolve/rust-ast-resolve-stmt.cc: New.
* resolve/rust-ast-resolve-stmt.h: New.
* resolve/rust-ast-resolve-struct-expr-field.cc: New.
* resolve/rust-ast-resolve-struct-expr-field.h: New.
* resolve/rust-ast-resolve-toplevel.h: New.
* resolve/rust-ast-resolve-type.cc: New.
* resolve/rust-ast-resolve-type.h: New.
* resolve/rust-ast-resolve.cc: New.
* resolve/rust-ast-resolve.h: New.
* resolve/rust-ast-verify-assignee.h: New.
* resolve/rust-name-resolver.cc: New.
* resolve/rust-name-resolver.h: New.
The expansion pass is responsible for two actions on our AST:
1. Expanding macro calls
2. Performing conditional compilation
Calls to macros should be checked and expanded into an AST fragment based on
the context they've been called in. This is similar to token substitution, with
a lot of intricacies and checks being performed. A single invocation can result
in an AST fragment containing multiple statements or multiple expressions,
which need to be handled as well. Furthermore, Rust macros can contain
repetitions relying on Kleine operators, similar to regular expression
patterns, that also need to be expanded properly.
Finally, Rust code can be hidden behind `cfg` directives, which allow the user
to perform conditional compilation. If a `cfg` predicate is not met, the
expression or statement it refers to should be marked for strip and removed
from the AST.
gcc/rust/
* expand/rust-attribute-visitor.cc: New.
* expand/rust-attribute-visitor.h: New.
* expand/rust-macro-builtins.cc: New.
* expand/rust-macro-builtins.h: New.
* expand/rust-macro-expand.cc: New.
* expand/rust-macro-expand.h: New.
* expand/rust-macro-invoc-lexer.cc: New.
* expand/rust-macro-invoc-lexer.h: New.
* expand/rust-macro-substitute-ctx.cc: New.
* expand/rust-macro-substitute-ctx.h: New.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Co-authored-by: Joel Phillips <simplytheother@gmail.com>
Signed-off-by: Joel Phillips <simplytheother@gmail.com>
This patch contains the second half of the templated Rust parser.
gcc/rust/
* parse/rust-parse-impl.h: New, second half.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Signed-off-by: Joel Phillips <simplytheother@gmail.com>
This is a Pratt-style parser for Rust that implements all of the AST. The
rust-parser-impl.h is the implementation of the parser as a template,
allowing it to be given ManagedTokenSource and avoid virtual calls. The
downside is it takes time to compile when used.
see: https://en.wikipedia.org/wiki/Operator-precedence_parser#Pratt_parsing
This patch contains the first half of the templated parser, so as to not
lose patches in the mailing list archives.
gcc/rust/
* parse/rust-cfg-parser.cc: New.
* parse/rust-cfg-parser.h: New.
* parse/rust-parse-impl.h: New.
* parse/rust-parse.cc: New.
* parse/rust-parse.h: New.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Signed-off-by: Joel Phillips <simplytheother@gmail.com>
The lexer is referred to as a ManagedTokenSource within the parser. This
lexer does not currently support Unicode, but serves as a starting point
to do so.
gcc/rust/
* lex/rust-codepoint.h: New.
* lex/rust-lex.cc: New.
* lex/rust-lex.h: New.
* lex/rust-token.cc: New.
* lex/rust-token.h: New.
* rust-buffered-queue.h: New.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Co-authored-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Joel Phillips <simplytheother@gmail.com>
This patch contains the basic framework of our AST visitors, as well as
one aimed at pretty-printing and exporting these AST nodes.
gcc/rust/
* ast/rust-ast-dump.cc: New.
* ast/rust-ast-dump.h: New.
* ast/rust-ast-visitor.h: New.
* ast/rust-cond-compilation.h: New.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Signed-off-by: Joel Phillips <simplytheother@gmail.com>
This adds the proper definitions of our AST Item nodes.
gcc/rust/
* ast/rust-item.h: New.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Signed-off-by: Joel Phillips <simplytheother@gmail.com>
This is a full C++11 class hierarchy representing the Rust AST. We do not
allow dynamic_cast and so the main mechanism to work with the AST is by
using the visitor interface. Slowly we are adding TREE_CODE style node
types to the AST which will allow for more ways to work with the AST but
for now this is it.
See: https://doc.rust-lang.org/reference/items.html
gcc/rust/
* ast/rust-ast-full-decls.h: New.
* ast/rust-ast-full-test.cc: New.
* ast/rust-ast-full.h: New.
* ast/rust-ast.h: New.
* operator.h: New.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Signed-off-by: Joel Phillips <simplytheother@gmail.com>
This testsuite is heavily inspired from the LTO testsuite that uses a
pattern where each file is compiled to an object file and finally linked
together. Since Rust does not have headers/prototypes, we rely on the
ordering here so that all files numbered greater than zero get compiled to
object files first. This leaves the _0 file free to test the 'extern crate' and
'use' keywords to force testing of the compiler to read metadata from the
other 'crates'.
gcc/testsuite/
* rust/link/generic_function_0.rs: New.
* rust/link/generic_function_1.rs: New.
* rust/link/link.exp: New.
* rust/link/simple_function_0.rs: New.
* rust/link/simple_function_1.rs: New.
* rust/link/trait_import_0.rs: New.
* rust/link/trait_import_1.rs: New.
This copies over code from other front-end testsuites to enable testing
for the rust front-end specifically.
gcc/testsuite/
* lib/rust-dg.exp: New.
* lib/rust.exp: New.
Co-authored-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
The Rust 'char' type should use the DWARF DW_ATE_UTF encoding.
gcc/
* dwarf2out.cc (is_rust): New.
(base_type_die): Use DW_ATE_UTF for the Rust 'char' type.
(gen_compile_unit_die): Handle "GNU Rust".
Co-authored-by: Mark Wielaard <mark@klomp.org>
Co-authored-by: Marc Poulhiès <dkm@kataplop.net>
When doing if-conversion we simply throw away labels without checking
whether they are possibly targets of non-local gotos or have their
address taken. The following rectifies this and refuses to if-convert
such loops.
PR tree-optimization/108076
* tree-if-conv.cc (if_convertible_loop_p_1): Reject blocks
with non-local or forced labels that we later remove
labels from.
* gcc.dg/torture/pr108076.c: New testcase.
The r13-4547 commit added new non-static function to libbacktrace:
backtrace_uncompress_zstd but for the libsanitizer use we need to
rename it, so that it is in __asan_* namespace and doesn't clash
with other copies of libbacktrace.
2022-12-13 Jakub Jelinek <jakub@redhat.com>
libsanitizer/
PR sanitizer/108072
* libbacktrace/backtrace-rename.h (backtrace_uncompress_zstd): Define.
This patch enables "have_cbranchcc4" on rs6000 by defining a
"cbranchcc4" expander. "have_cbrnachcc4" is a flag in ifcvt.cc to
indicate if branching by CC bits is valid or not. With this flag
enabled, some branches can be optimized to conditional moves.
2022-12-07 Haochen Gui <guihaoc@linux.ibm.com>
gcc/
* config/rs6000/rs6000.md (cbranchcc4): New expander.
gcc/testsuite
* gcc.target/powerpc/cbranchcc4-1.c: New.
* gcc.target/powerpc/cbranchcc4-2.c: New.
prepare_cmp_insn is a help function to generate comparison rtx.
It should not assume that cbranchcc4 exists and all sub-CC modes
are supported on a target. When the check fails, it could go to
fail and return a NULL rtx as its callers check the return value
for CCmode.
The test case (gcc.target/powerpc/cbranchcc4-1.c) which covers
failure path will be committed with an rs6000 specific patch.
2022-12-05 Haochen Gui <guihaoc@linux.ibm.com>
gcc/
* optabs.cc (prepare_cmp_insn): Return a NULL rtx other than
assertion failure when targets don't have cbranch optab or
predicate check fails.
This patch broke a couple of different patterns; reverting while I work on a
fix.
PR c++/108701
This reverts commit bd0485f20f4794f9787237706a6308473a8e9415.
PR go/108057
The current version is the same as for the previous GCC release,
but there have been minor changes like new type descriptors that
make it impossible to run Go programs built with the previous GCC
release with the current libgo.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/456976
gcc/fortran/ChangeLog:
PR fortran/102180
* array.cc (match_array_element_spec): Add check for bad
assumed-implied-spec.
(gfc_match_array_spec): Reorder logic so that the first bad array
element spec may trigger an error.
gcc/testsuite/ChangeLog:
PR fortran/102180
* gfortran.dg/pr102180.f90: New test.
Sometimes, nested lambdas of templated functions get no code generation
due to them being marked as instantianted outside of all modules being
compiled in the current compilation unit. This despite enclosing
template instances being marked as instantiated inside the current
compilation unit. To fix, all enclosing templates are now checked in
`function_defined_in_root_p'.
Because of this change, `function_needs_inline_definition_p' has also
been fixed up to only check whether the regular function definition
itself is to be emitted in the current compilation unit.
PR d/108055
gcc/d/ChangeLog:
* decl.cc (function_defined_in_root_p): Check all enclosing template
instances for definition in a root module.
(function_needs_inline_definition_p): Replace call to
function_defined_in_root_p with test for outer module `isRoot'.
gcc/testsuite/ChangeLog:
* gdc.dg/torture/imports/pr108055conv.d: New.
* gdc.dg/torture/imports/pr108055spec.d: New.
* gdc.dg/torture/imports/pr108055write.d: New.
* gdc.dg/torture/pr108055.d: New test.
Enable TARGET_CONST_ANCHOR to allow complex constants to be created via
immediate add/sub. Use a 24-bit range as that enables a 3 or 4-instruction
immediate to be replaced by 2 add/sub instructions. Fix the costing of
add/sub to support 24-bit and 12-bit shifted immediates.
The generated code for the testcase is now the same or better than LLVM.
It also results in a small codesize reduction on SPEC.
gcc/
* config/aarch64/aarch64.cc (aarch64_rtx_costs): Add correct costs
for 24-bit and 12-bit shifted immediate add/sub.
(TARGET_CONST_ANCHOR): Define.
* config/aarch64/predicates.md (aarch64_pluslong_immediate):
Fix range check.
gcc/testsuite/
* gcc.target/aarch64/movk_3.c: New test.
This optimizes the following sequence
((a < b) & c) | ((a >= b) & d)
into
(a < b ? c : d) & 1
for scalar and on vector we can omit the & 1.
Also recognizes
(-(a < b) & c) | (-(a >= b) & d)
into
a < b ? c : d
This changes the code generation from
zoo2:
cmp w0, w1
cset w0, lt
cset w1, ge
and w0, w0, w2
and w1, w1, w3
orr w0, w0, w1
ret
into
cmp w0, w1
csel w0, w2, w3, lt
and w0, w0, 1
ret
and significantly reduces the number of selects we have to do in the vector
code.
gcc/ChangeLog:
* match.pd: Add new rule.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/if-compare_1.c: New test.
* gcc.target/aarch64/if-compare_2.c: New test.
While writing a patch series I started getting incorrect codegen out from
VEC_PERM on partial struct types.
It turns out that this was happening because the TARGET_CAN_CHANGE_MODE_CLASS
implementation has a slight bug in it. The hook only checked for SIMD to
Partial but never Partial to SIMD. This resulted in incorrect subregs to be
generated from the fallback code in VEC_PERM_EXPR expansions.
I have unfortunately not been able to trigger it using a standalone testcase as
the mid-end optimizes away the permute every time I try to describe a permute
that would result in the bug.
The patch now rejects any conversion of partial SIMD struct types, unless they
are both partial structures of the same number of registers or one is a SIMD
type who's size is less than 8 bytes.
gcc/ChangeLog:
* config/aarch64/aarch64.cc (aarch64_can_change_mode_class): Restrict
conversions between partial struct types properly.
This implements the new tbranch optab for AArch64.
we cannot emit one big RTL for the final instruction immediately.
The reason that all comparisons in the AArch64 backend expand to separate CC
compares, and separate testing of the operands is for ifcvt.
The separate CC compare is needed so ifcvt can produce csel, cset etc from the
compares. Unlike say combine, ifcvt can not do recog on a parallel with a
clobber. Should we emit the instruction directly then ifcvt will not be able
to say, make a csel, because we have no patterns which handle zero_extract and
compare. (unlike combine ifcvt cannot transform the extract into an AND).
While you could provide various patterns for this (and I did try) you end up
with broken patterns because you can't add the clobber to the CC register. If
you do, ifcvt recog fails.
i.e.
int
f1 (int x)
{
if (x & 1)
return 1;
return x;
}
We lose csel here.
Secondly the reason the compare with an explicit CC mode is needed is so that
ifcvt can transform the operation into a version that doesn't require the flags
to be set. But it only does so if it know the explicit usage of the CC reg.
For instance
int
foo (int a, int b)
{
return ((a & (1 << 25)) ? 5 : 4);
}
Doesn't require a comparison, the optimal form is:
foo(int, int):
ubfx x0, x0, 25, 1
add w0, w0, 4
ret
and no compare is actually needed. If you represent the instruction using an
ANDS instead of a zero_extract then you get close, but you end up with an ands
followed by an add, which is a slower operation.
gcc/ChangeLog:
* config/aarch64/aarch64.md (*tb<optab><mode>1): Rename to...
(*tb<optab><ALLI:mode><GPI:mode>1): ... this.
(tbranch_<code><mode>4): New.
* config/aarch64/iterators.md(ZEROM, zerom): New.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/tbz_1.c: New test.
This adds a new test-and-branch optab that can be used to do a conditional test
of a bit and branch. This is similar to the cbranch optab but instead can
test any arbitrary bit inside the register.
This patch recognizes boolean comparisons and single bit mask tests.
gcc/ChangeLog:
* dojump.cc (do_jump): Pass along value.
(do_jump_by_parts_greater_rtx): Likewise.
(do_jump_by_parts_zero_rtx): Likewise.
(do_jump_by_parts_equality_rtx): Likewise.
(do_compare_rtx_and_jump): Likewise.
(do_compare_and_jump): Likewise.
* dojump.h (do_compare_rtx_and_jump): New.
* optabs.cc (emit_cmp_and_jump_insn_1): Refactor to take optab to check.
(validate_test_and_branch): New.
(emit_cmp_and_jump_insns): Optiobally take a value, and when value is
supplied then check if it's suitable for tbranch.
* optabs.def (tbranch_eq$a4, tbranch_ne$a4): New.
* doc/md.texi (tbranch_@var{op}@var{mode}4): Document it.
* optabs.h (emit_cmp_and_jump_insns): New.
* tree.h (tree_zero_one_valued_p): New.
The backend has an existing V2HFmode that is used by pairwise operations.
This mode was however never made fully functional. Amongst other things it was
never declared as a vector type which made it unusable from the mid-end.
It's also lacking an implementation for load/stores so reload ICEs if this mode
is every used. This finishes the implementation by providing the above.
Note that I have created a new iterator VHSDF_P instead of extending VHSDF
because the previous iterator is used in far more things than just load/stores.
It's also used for instance in intrinsics and extending this would force me to
provide support for mangling the type while we never expose it through
intrinsics.
gcc/ChangeLog:
* config/aarch64/aarch64-simd.md (*aarch64_simd_movv2hf): New.
(mov<mode>, movmisalign<mode>, aarch64_dup_lane<mode>,
aarch64_store_lane0<mode>, aarch64_simd_vec_set<mode>,
@aarch64_simd_vec_copy_lane<mode>, vec_set<mode>,
reduc_<optab>_scal_<mode>, reduc_<fmaxmin>_scal_<mode>,
aarch64_reduc_<optab>_internal<mode>, aarch64_get_lane<mode>,
vec_init<mode><Vel>, vec_extract<mode><Vel>): Support V2HF.
(aarch64_simd_dupv2hf): New.
* config/aarch64/aarch64.cc (aarch64_classify_vector_mode):
Add E_V2HFmode.
* config/aarch64/iterators.md (VHSDF_P): New.
(V2F, VMOVE, nunits, Vtype, Vmtype, Vetype, stype, VEL,
Vel, q, vp): Add V2HF.
* config/arm/types.md (neon_fp_reduc_add_h): New.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/sve/slp_1.c: Update testcase.
This test fails if chrono::days::rep or chrono::years::rep is a 32-bit
type, because a large days or years value silently overflows a 32-bit
integer when converted to seconds. It would be conforming to implement
chrono::days as chrono::duration<int32_t, ratio<86400>>, but would make
this overflow case more likely. Similarly for chrono::years,
chrono::months and chrono::weeks. This test is here to remind us not to
make that change lightly.
libstdc++-v3/ChangeLog:
* testsuite/20_util/duration/arithmetic/overflow_c++20.cc: New
test.
Clang now defines an __is_unsigned built-in, and Windows defines an
_Out_ macro. Replace uses of those as identifiers.
There might also be a problem with __is_signed, which we use in several
places.
libstdc++-v3/ChangeLog:
* include/std/chrono (hh_mm_ss): Rename __is_unsigned member to
_S_is_unsigned.
* include/std/format (basic_format_context): Rename _Out_
template parameter to _Out2.
* testsuite/17_intro/names.cc: Add Windows SAL annotation
macros.