# The GNU compatibility matrix.
#
# Design: spec/13-gnu-compat.md section 13.2. This file is the source of truth for what
# `__has_attribute`, `__has_builtin`, `__has_feature`, `__has_extension` and
# `__has_c_attribute` answer, and `build.rs` turns it into the table the compiler reads. It
# is a table rather than prose because the alternative is a list that disagrees with the
# compiler, and a compiler that claims a feature it does not have is worse than one that
# admits it: a header that gets a yes and then fails to compile is far harder to diagnose
# than one that takes its fallback path.
#
# Fields:
# name the spelling the `__has_*` operator is asked about, without any `__` armour
# kind attribute, c-attribute, builtin, feature or extension
# gcc_version the GCC release that introduced it, for the record
# status unimplemented, partial, implemented or rejected
# answer what to answer when the status is not `implemented`, see below
# value what `__has_c_attribute` returns, which the standard fixes per attribute
# used_by projects known to need it, from the corpus in spec/15-testing.md
# tests the tests that prove the status, named as `crate::test` or as a file path
# notes anything a reader needs that the fields above do not say
#
# `answer` exists because ignoring an unimplemented attribute is not always harmless.
# Ignoring `hot` produces slower code. Ignoring `packed` produces wrong code, so a row marked
# `answer = "error"` is refused rather than warned about when it is finally parsed and found
# to be unimplemented. Both are section 13.4's rule, written down where the code can read it.
#
# Only `implemented` answers yes. `partial` answers no on purpose: a feature that works most
# of the time is exactly the case where the fallback path is the safer one.
# Preprocessor features, which are the ones that exist today.
[[feature]]
name = "__has_include"
kind = "feature"
gcc_version = "5.0"
status = "implemented"
used_by = ["linux", "glibc", "sqlite", "systemd"]
tests = ["rucc-pp::has_include_answers_from_the_search_path"]
notes = "C23 standard as well as a GNU extension. Answered against the same search path an `#include` on the same line would use."
[[feature]]
name = "__has_include_next"
kind = "feature"
gcc_version = "5.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-pp::has_include_next_starts_where_include_next_would"]
[[feature]]
name = "__has_embed"
kind = "feature"
gcc_version = "15.0"
status = "implemented"
used_by = []
tests = ["rucc-pp::has_embed_tells_missing_from_present_from_empty"]
notes = "Three answers rather than two, because a resource that exists and is empty needs different code from one that is missing."
[[feature]]
name = "__has_attribute"
kind = "feature"
gcc_version = "5.0"
status = "implemented"
used_by = ["linux", "glibc", "systemd", "curl"]
tests = ["rucc-pp::has_attribute_answers_out_of_the_matrix"]
notes = "The operator works. What it answers about is this table, so almost every attribute answers no until the parser lands."
[[feature]]
name = "__has_c_attribute"
kind = "feature"
gcc_version = "11.0"
status = "implemented"
used_by = ["systemd"]
tests = ["rucc-pp::the_scoped_spelling_of_an_attribute_is_the_same_question"]
notes = "Answers with the value the standard gives the attribute rather than with one, which is why the table carries a value column."
[[feature]]
name = "__has_builtin"
kind = "feature"
gcc_version = "10.0"
status = "implemented"
used_by = ["linux", "glibc", "ffmpeg"]
tests = ["rucc-pp::has_builtin_answers_no_until_the_builtin_is_real"]
[[feature]]
name = "__has_feature"
kind = "feature"
gcc_version = "14.0"
status = "implemented"
used_by = ["llvm"]
tests = ["rucc-pp::has_feature_and_has_extension_read_the_same_table"]
notes = "A Clang operator that GCC took, and headers ask it before asking anything else."
[[feature]]
name = "__has_extension"
kind = "feature"
gcc_version = "14.0"
status = "implemented"
used_by = ["llvm"]
tests = ["rucc-pp::has_feature_and_has_extension_read_the_same_table"]
notes = "Answers yes wherever `__has_feature` does, because a feature that is available is available whatever mode it is asked in."
[[feature]]
name = "pragma_once"
kind = "feature"
gcc_version = "3.4"
status = "implemented"
used_by = ["linux", "systemd", "sqlite"]
tests = ["rucc-pp::pragma_once_skips_the_second_read_and_does_not_reach_the_output"]
[[feature]]
name = "include_next"
kind = "extension"
gcc_version = "2.0"
status = "implemented"
used_by = ["glibc", "musl"]
tests = ["rucc-pp::include_next_continues_after_the_directory_the_file_came_from"]
[[feature]]
name = "variadic_macros"
kind = "feature"
gcc_version = "3.0"
status = "implemented"
used_by = ["linux", "glibc", "sqlite", "systemd", "curl"]
tests = ["rucc-pp::variadic_arguments_arrive_as_one_argument_with_the_commas_intact"]
[[feature]]
name = "gnu_variadic_macros"
kind = "extension"
gcc_version = "2.0"
status = "implemented"
used_by = ["linux", "glibc"]
tests = ["rucc-pp::the_gnu_named_variadic_form_works_the_same_way", "rucc-pp::the_gnu_comma_swallowing_extension_drops_the_comma"]
notes = "The named form `args...` and the `, ## __VA_ARGS__` comma swallowing, which the kernel's logging macros are built out of."
[[feature]]
name = "pragma_operator"
kind = "feature"
gcc_version = "3.0"
status = "implemented"
used_by = ["linux", "glibc", "ffmpeg"]
tests = ["rucc-pp::the_pragma_operator_works_from_inside_a_macro"]
[[feature]]
name = "counter_macro"
kind = "extension"
gcc_version = "4.3"
status = "implemented"
used_by = ["linux", "systemd"]
tests = ["rucc-pp::the_counter_is_a_different_number_every_time"]
notes = "`__COUNTER__`, which is how a macro makes a name nobody else will pick. The kernel's `BUILD_BUG_ON` is built out of it."
[[feature]]
name = "base_file_macro"
kind = "extension"
gcc_version = "2.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-pp::the_base_file_is_the_one_named_on_the_command_line"]
notes = "`__BASE_FILE__`, the file on the command line rather than the header the use is in."
[[feature]]
name = "include_level_macro"
kind = "extension"
gcc_version = "2.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-pp::the_include_level_counts_the_headers_above_it"]
notes = "`__INCLUDE_LEVEL__`, which glibc uses to tell a header included directly from one pulled in by another."
[[feature]]
name = "file_name_macro"
kind = "extension"
gcc_version = "12.0"
status = "implemented"
used_by = []
tests = ["rucc-pp::the_file_name_is_the_file_without_the_directories"]
notes = "`__FILE_NAME__`, `__FILE__` with the directories taken off. Clang had it first and GCC took it, and code uses it to keep build paths out of a binary."
[[feature]]
name = "embed"
kind = "feature"
gcc_version = "15.0"
status = "implemented"
used_by = []
tests = ["rucc-pp::embed_writes_the_bytes_of_the_resource"]
notes = "C23, with `limit`, `prefix`, `suffix`, `if_empty` and `gnu::offset`. The bytes become real tokens for now. The fast path that fills an initializer without making them needs the parser."
# Statement and expression extensions, from section 13.3. None of these can work before the
# parser lands in M2, and every one of them is in the kernel.
[[feature]]
name = "asm_labels"
kind = "extension"
gcc_version = "2.0"
status = "implemented"
used_by = ["glibc", "linux", "sqlite"]
tests = ["rucc-sema::an_assembler_name_written_after_a_declarator_is_the_symbol_the_name_stands_for"]
notes = "An assembler name written after a declarator, which says what symbol the name stands for. A local kept in a named register is the other reading of the syntax and is not here."
[[feature]]
name = "statement_expressions"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux", "glibc", "systemd"]
tests = []
notes = "Every min, max and container_of variant in the kernel is one."
[[feature]]
name = "typeof"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux", "glibc", "systemd"]
tests = []
notes = "C23 as `typeof`. `__typeof__` is the spelling that works in every mode."
[[feature]]
name = "labels_as_values"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["cpython", "lua", "linux"]
tests = []
notes = "Constrains the optimizer: a block whose address is taken cannot be deleted or merged."
[[feature]]
name = "case_ranges"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux", "ffmpeg"]
tests = []
[[feature]]
name = "binary_conditional"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux", "glibc"]
tests = []
notes = "`x ?: y`, which evaluates `x` once."
[[feature]]
name = "zero_length_arrays"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux", "glibc"]
tests = []
[[feature]]
name = "void_pointer_arithmetic"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux", "glibc"]
tests = []
[[feature]]
name = "designated_initializer_ranges"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux"]
tests = []
notes = "`[0 ... 9] = x`."
[[feature]]
name = "cast_to_union"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = []
tests = []
[[feature]]
name = "extension_keyword"
kind = "extension"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["glibc", "linux"]
tests = []
notes = "`__extension__`, which suppresses pedantic diagnostics for one expression."
[[feature]]
name = "nested_functions"
kind = "extension"
gcc_version = "2.0"
status = "rejected"
used_by = []
tests = []
notes = "The settled exception from spec/06-lexer-and-parser.md. They need an executable trampoline on the stack, which no hardened target allows. `-fnested-functions` says exactly this."
# Attributes, from section 13.4. `answer = \"error\"` marks the ones whose silent ignoring
# changes semantics rather than performance.
[[feature]]
name = "aligned"
kind = "attribute"
gcc_version = "2.0"
status = "implemented"
answer = "error"
used_by = ["linux", "glibc", "ffmpeg", "openssl"]
tests = ["rucc-driver::the_layout_attributes_move_the_members_and_the_record_the_way_gcc_lays_them_out", "rucc-driver::the_aligned_attribute_on_a_declaration_raises_what_that_one_object_is_aligned_to", "rucc-driver::what_a_declaration_asked_to_be_aligned_to_is_what_the_assembler_is_told", "rucc-driver::an_aligned_typedef_says_what_an_object_of_it_is_aligned_to_and_may_lower_it"]
notes = "Says what a record, a member, an object, a function or a typedef is aligned to. On the first four it only ever raises, and on a typedef gcc lets it lower as well, so an aligned(2) int really is at a multiple of two."
[[feature]]
name = "packed"
kind = "attribute"
gcc_version = "2.0"
status = "implemented"
answer = "error"
used_by = ["linux", "systemd", "curl"]
tests = ["rucc-driver::the_layout_attributes_move_the_members_and_the_record_the_way_gcc_lays_them_out"]
notes = "On a record and on one member of a record, in both the bare and the armoured spelling."
[[feature]]
name = "scalar_storage_order"
kind = "attribute"
gcc_version = "6.1"
status = "unimplemented"
answer = "error"
used_by = []
tests = ["rucc-driver::a_record_that_asks_for_the_other_byte_order_is_refused_rather_than_laid_out_in_this_one"]
notes = "Reverses the byte order of every scalar in a record, which is what a program reading a wire format or a disk image on the other endianness writes it for. Ignoring it lays the record out in the host order and hands back every field with its bytes the wrong way round, so it is refused."
[[feature]]
name = "section"
kind = "attribute"
gcc_version = "2.0"
status = "unimplemented"
answer = "error"
used_by = ["linux", "systemd"]
tests = []
notes = "The kernel's initcall and section placement machinery is built on it, and ignoring it silently produces a kernel that does not boot."
[[feature]]
name = "no_sanitize"
kind = "attribute"
gcc_version = "4.8"
status = "unimplemented"
answer = "error"
used_by = ["linux"]
tests = []
[[feature]]
name = "naked"
kind = "attribute"
gcc_version = "4.7"
status = "unimplemented"
answer = "error"
used_by = ["linux"]
tests = []
[[feature]]
name = "mode"
kind = "attribute"
gcc_version = "2.0"
status = "unimplemented"
answer = "error"
used_by = ["glibc"]
tests = []
[[feature]]
name = "transparent_union"
kind = "attribute"
gcc_version = "2.0"
status = "implemented"
used_by = ["glibc"]
tests = ["tests/golden/transparent-union.c", "tests/accept/a-transparent-union-that-is-a-struct.c"]
notes = "On a union, in both places gcc takes it: after the closing brace and on the declarator of the typedef, which is where glibc writes it. A parameter of the union type is compatible with a parameter of any member's type, and a value assigned to one goes into whichever member it fits, which is the same object a cast to a union builds. Dropped with a warning on anything that is not a union and on a union that is not the size and the alignment of its first member, which is gcc's own rule and its own answer to breaking it."
[[feature]]
name = "noreturn"
kind = "attribute"
gcc_version = "2.5"
status = "partial"
used_by = ["linux", "glibc", "sqlite", "systemd"]
tests = ["rucc-sema::noreturn_written_as_the_attribute_is_kept", "tests/golden/gnu.c"]
notes = "The claim reaches the IR as `attrs(noreturn)` on the function, and `_Noreturn` and `[[noreturn]]` land in the same place. Nothing acts on it yet: the block after a call to one still falls through to whatever comes next, so `if (!p) abort();` is still read as a path that can carry a null pointer. That half is tamnd/rucc#712."
[[feature]]
name = "always_inline"
kind = "attribute"
gcc_version = "3.1"
status = "unimplemented"
used_by = ["linux", "glibc", "ffmpeg"]
tests = []
[[feature]]
name = "gnu_inline"
kind = "attribute"
gcc_version = "4.1"
status = "implemented"
used_by = ["linux", "glibc"]
tests = ["rucc-sema::gnu_inline_reads_the_two_words_the_other_way_round", "tests/golden/gnu.c"]
notes = "Which of the two readings of `inline` the name is under, and so whether a definition of it is emitted. The reading is a fact about the name, so the attribute reaches the declarations already read, which is the order the C library writes its headers in."
[[feature]]
name = "noinline"
kind = "attribute"
gcc_version = "3.1"
status = "unimplemented"
used_by = ["linux", "glibc"]
tests = []
[[feature]]
name = "flatten"
kind = "attribute"
gcc_version = "4.1"
status = "unimplemented"
used_by = ["systemd"]
tests = []
[[feature]]
name = "hot"
kind = "attribute"
gcc_version = "4.3"
status = "unimplemented"
used_by = ["linux"]
tests = []
[[feature]]
name = "cold"
kind = "attribute"
gcc_version = "4.3"
status = "unimplemented"
used_by = ["linux", "systemd"]
tests = []
[[feature]]
name = "pure"
kind = "attribute"
gcc_version = "2.96"
status = "unimplemented"
used_by = ["linux", "glibc", "curl"]
tests = []
[[feature]]
name = "const"
kind = "attribute"
gcc_version = "2.5"
status = "unimplemented"
used_by = ["linux", "glibc"]
tests = []
[[feature]]
name = "malloc"
kind = "attribute"
gcc_version = "2.96"
status = "unimplemented"
used_by = ["glibc", "systemd"]
tests = []
[[feature]]
name = "returns_twice"
kind = "attribute"
gcc_version = "4.1"
status = "unimplemented"
answer = "error"
used_by = ["glibc"]
tests = []
notes = "`setjmp` is declared with it, and ignoring it means the register allocator may keep a value in a register across a `longjmp`."
[[feature]]
name = "no_instrument_function"
kind = "attribute"
gcc_version = "2.95"
status = "unimplemented"
used_by = ["linux"]
tests = []
[[feature]]
name = "no_stack_protector"
kind = "attribute"
gcc_version = "11.0"
status = "unimplemented"
answer = "error"
used_by = ["linux"]
tests = []
[[feature]]
name = "no_caller_saved_registers"
kind = "attribute"
gcc_version = "7.0"
status = "unimplemented"
answer = "error"
used_by = ["linux"]
tests = []
[[feature]]
name = "target"
kind = "attribute"
gcc_version = "4.4"
status = "unimplemented"
answer = "error"
used_by = ["ffmpeg", "openssl", "linux"]
tests = []
[[feature]]
name = "target_clones"
kind = "attribute"
gcc_version = "6.0"
status = "unimplemented"
used_by = ["glibc"]
tests = []
[[feature]]
name = "optimize"
kind = "attribute"
gcc_version = "4.4"
status = "unimplemented"
used_by = ["linux"]
tests = []
[[feature]]
name = "interrupt"
kind = "attribute"
gcc_version = "4.3"
status = "unimplemented"
answer = "error"
used_by = ["linux"]
tests = []
[[feature]]
name = "used"
kind = "attribute"
gcc_version = "3.1"
status = "implemented"
answer = "error"
used_by = ["linux", "systemd"]
tests = ["rucc-driver::an_attribute_keeps_a_static_function_nothing_refers_to"]
notes = "It is what keeps a symbol the linker script needs from being dropped, and emitting a definition nothing refers to is the whole of what it asks for."
[[feature]]
name = "unused"
kind = "attribute"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux", "glibc", "systemd"]
tests = []
[[feature]]
name = "retain"
kind = "attribute"
gcc_version = "11.0"
status = "partial"
answer = "error"
used_by = ["linux"]
tests = ["rucc-driver::an_attribute_keeps_a_static_function_nothing_refers_to"]
notes = "The compiler keeps the definition. The `SHF_GNU_RETAIN` section flag that asks the linker to keep it as well is not written yet."
[[feature]]
name = "visibility"
kind = "attribute"
gcc_version = "3.3"
status = "implemented"
used_by = ["glibc", "systemd", "openssl", "curl"]
tests = ["rucc::the_attribute_a_declaration_wrote_reaches_the_listing", "rucc::a_declaration_that_asked_beats_the_flag_that_did_not_know_about_it"]
notes = "All four strings are taken and there are three answers, because `internal` is `hidden` plus a promise about never taking the address across a component boundary and nothing here derives anything from that promise. It reaches `st_other` in an object and `.hidden` or `.protected` in a listing, `.private_extern` on Mach-O, and nothing on COFF, which has no per symbol spelling of either. `-fvisibility=` is the same answer asked for on the command line, and the attribute wins where both are written."
[[feature]]
name = "weak"
kind = "attribute"
gcc_version = "2.0"
status = "unimplemented"
answer = "error"
used_by = ["linux", "glibc", "musl"]
tests = []
[[feature]]
name = "alias"
kind = "attribute"
gcc_version = "2.0"
status = "implemented"
used_by = ["glibc", "musl"]
tests = ["rucc::a_second_name_reaches_the_same_object_the_first_one_does"]
notes = "The target has to be defined in the same file, which is GCC's rule as well. An alias of an alias is refused rather than written as a name pointing at a name."
[[feature]]
name = "weakref"
kind = "attribute"
gcc_version = "4.2"
status = "unimplemented"
answer = "error"
used_by = ["glibc"]
tests = []
[[feature]]
name = "cleanup"
kind = "attribute"
gcc_version = "3.4"
status = "implemented"
used_by = ["systemd", "linux", "glibc"]
tests = ["tests/golden/cleanup-attribute.c", "tests/accept/a-cleanup-on-an-object-that-outlives-its-block.c"]
notes = "Runs the handler on every way out of the block the object was declared in, which is the closing brace and every return, break, continue and goto that leaves it, in the reverse of the order the objects were declared. Not longjmp, which gcc does not promise either. A computed goto or an asm goto out of a block that owes one is turned down rather than built without the calls. The handler counts as a use of the function, which is what keeps a static inline one in the object file when the attribute is the only thing in the translation unit that names it."
[[feature]]
name = "constructor"
kind = "attribute"
gcc_version = "2.0"
status = "partial"
answer = "error"
used_by = ["glibc", "systemd", "openssl"]
tests = ["rucc-driver::an_attribute_keeps_a_static_function_nothing_refers_to"]
notes = "The definition is kept rather than dropped as unreferenced. The `.init_array` entry that makes it run before `main` is not emitted yet, so the function is there and nothing calls it."
[[feature]]
name = "destructor"
kind = "attribute"
gcc_version = "2.0"
status = "partial"
answer = "error"
used_by = ["glibc", "openssl"]
tests = ["rucc-driver::an_attribute_keeps_a_static_function_nothing_refers_to"]
notes = "Kept the same way `constructor` is kept, and the `.fini_array` entry that makes it run after `main` returns is missing the same way."
[[feature]]
name = "deprecated"
kind = "attribute"
gcc_version = "3.1"
status = "unimplemented"
used_by = ["glibc", "openssl", "curl"]
tests = []
[[feature]]
name = "warning"
kind = "attribute"
gcc_version = "4.3"
status = "unimplemented"
used_by = ["glibc", "linux"]
tests = []
[[feature]]
name = "error"
kind = "attribute"
gcc_version = "4.3"
status = "unimplemented"
used_by = ["linux", "glibc"]
tests = []
notes = "The kernel turns a link failure into a compile-time message with it, so it has to fire after optimization, when it is known the call survives."
[[feature]]
name = "format"
kind = "attribute"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["linux", "glibc", "systemd", "curl", "ffmpeg"]
tests = []
notes = "It has to actually work. It is the mechanism behind printf format checking, which is one of the few warnings that finds real bugs."
[[feature]]
name = "format_arg"
kind = "attribute"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["glibc"]
tests = []
[[feature]]
name = "nonnull"
kind = "attribute"
gcc_version = "3.3"
status = "unimplemented"
used_by = ["glibc", "systemd"]
tests = []
[[feature]]
name = "returns_nonnull"
kind = "attribute"
gcc_version = "4.9"
status = "unimplemented"
used_by = ["glibc", "systemd"]
tests = []
[[feature]]
name = "warn_unused_result"
kind = "attribute"
gcc_version = "3.4"
status = "unimplemented"
used_by = ["linux", "glibc", "systemd"]
tests = []
[[feature]]
name = "sentinel"
kind = "attribute"
gcc_version = "4.0"
status = "unimplemented"
used_by = ["glibc"]
tests = []
[[feature]]
name = "access"
kind = "attribute"
gcc_version = "10.0"
status = "unimplemented"
used_by = ["glibc"]
tests = []
[[feature]]
name = "counted_by"
kind = "attribute"
gcc_version = "14.0"
status = "unimplemented"
used_by = ["linux"]
tests = []
[[feature]]
name = "fallthrough"
kind = "attribute"
gcc_version = "7.0"
status = "unimplemented"
used_by = ["linux", "systemd", "ffmpeg"]
tests = []
[[feature]]
name = "assume_aligned"
kind = "attribute"
gcc_version = "4.9"
status = "unimplemented"
used_by = ["glibc"]
tests = []
[[feature]]
name = "vector_size"
kind = "attribute"
gcc_version = "3.1"
status = "implemented"
used_by = ["ffmpeg", "openssl"]
tests = ["rucc-driver::the_vector_size_attribute_builds_a_type_of_lanes_and_measures_it_in_bytes", "tests/golden/vectors.c"]
notes = "The type and its operators are here and the lanes are computed one at a time, which is correct and is not the instruction the machine has. A vector in a register is `tamnd/rucc#200`, and so is passing one where the psABI puts it rather than as the lanes it is made of."
[[feature]]
name = "may_alias"
kind = "attribute"
gcc_version = "3.3"
status = "unimplemented"
answer = "error"
used_by = ["ffmpeg", "glibc"]
tests = []
[[feature]]
name = "designated_init"
kind = "attribute"
gcc_version = "5.1"
status = "unimplemented"
used_by = ["linux"]
tests = []
[[feature]]
name = "nocommon"
kind = "attribute"
gcc_version = "2.0"
status = "unimplemented"
used_by = ["glibc"]
tests = []
# The C23 standard attributes, which `__has_c_attribute` answers with the number the standard
# gives them rather than with 1.
[[feature]]
name = "deprecated"
kind = "c-attribute"
gcc_version = "10.0"
status = "unimplemented"
value = "201904"
used_by = []
tests = []
[[feature]]
name = "fallthrough"
kind = "c-attribute"
gcc_version = "10.0"
status = "unimplemented"
value = "201904"
used_by = []
tests = []
[[feature]]
name = "maybe_unused"
kind = "c-attribute"
gcc_version = "10.0"
status = "unimplemented"
value = "202106"
used_by = []
tests = []
[[feature]]
name = "nodiscard"
kind = "c-attribute"
gcc_version = "10.0"
status = "unimplemented"
value = "202003"
used_by = []
tests = []
[[feature]]
name = "noreturn"
kind = "c-attribute"
gcc_version = "13.0"
status = "partial"
value = "202202"
used_by = []
tests = ["rucc-sema::noreturn_written_as_the_attribute_is_kept"]
notes = "C23's spelling of the row above, read by the same code and carrying the same amount of the way. What is left is the same thing, which is that nothing acts on the claim yet."
[[feature]]
name = "unsequenced"
kind = "c-attribute"
gcc_version = "13.0"
status = "unimplemented"
value = "202207"
used_by = []
tests = []
[[feature]]
name = "reproducible"
kind = "c-attribute"
gcc_version = "13.0"
status = "unimplemented"
value = "202207"
used_by = []
tests = []
# Builtins, from section 13.5. The list is the part of the several hundred that real code
# reaches for first, and it grows as the matrix fills in.
[[feature]]
name = "__builtin_constant_p"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
used_by = ["linux", "glibc", "systemd"]
tests = ["rucc-driver::builtin_constant_p_is_folded_where_it_is_written_rather_than_called"]
notes = "Answered in the front end, one where the argument folds there and zero otherwise. gcc folds it after optimization, so its answer can differ between -O0 and -O2, and the kernel's BUILD_BUG_ON depends on the folding that happens after inlining. Raising the answer for the arguments that only become constant later is work for the optimizer and not for this."
[[feature]]
name = "__builtin_expect"
kind = "builtin"
gcc_version = "2.96"
status = "implemented"
signature = "long(long, long)"
used_by = ["linux", "glibc", "sqlite", "systemd", "curl"]
tests = ["rucc-driver::the_hint_builtins_are_their_first_argument_and_the_hint_leaves_no_trace"]
notes = "The value is the first argument and the second is a hint. The signature is kept because the call is checked against it, which is where the argument count message and the conversion of the first argument to long come from, and check/builtin/expect.rs builds an ExprKind::Expect after that. The hint is carried: lowering writes Opcode::Expect, and rucc_opt::expect moves the claim onto the arms of the branch the value ends up controlling and takes the instruction away, so prediction reads a weight on the edge rather than a node."
[[feature]]
name = "__builtin_expect_with_probability"
kind = "builtin"
gcc_version = "9.0"
status = "implemented"
signature = "long(long, long, double)"
used_by = ["linux"]
tests = ["rucc-driver::the_hint_builtins_are_their_first_argument_and_the_hint_leaves_no_trace"]
notes = "The same answer as __builtin_expect with a third argument saying how often the expectation holds. The probability is folded to ten thousandths and ends up on the branch arm, and a probability that does not fold or is outside zero to one leaves the default weight in place. gcc 16 reports nothing about such a probability, at any optimization level, so neither does this."
[[feature]]
name = "__builtin_unreachable"
kind = "builtin"
gcc_version = "4.5"
status = "implemented"
signature = "void(void)"
used_by = ["linux", "glibc", "ffmpeg"]
tests = ["rucc-driver::a_promise_that_control_does_not_arrive_writes_no_instruction"]
notes = "The call becomes a node with nothing under it and lowers to unreachable_hint, which writes no instruction, the same as gcc 16 at -O0. The signature is kept because the call is checked against it, and the node is put in its place after that in check/builtin/unreachable.rs. What is not done is treating the rest of the block as dead, which is an optimization rather than the meaning and is the optimizer's to make."
[[feature]]
name = "__builtin_trap"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "void(void)"
used_by = ["linux"]
tests = ["rucc-driver::a_trap_is_the_instruction_the_machine_has_no_meaning_for"]
notes = "One instruction, `ud2`, which the manual promises will never be given a meaning, so the processor raises the fault for an instruction it does not know and Linux ends the program with SIGILL. Not a call to `abort`, because this is written most in a kernel and in a freestanding program and neither has an `abort` to call, and gcc 16.2.0 writes `ud2` for it too. The block does not end at the call: what ends a block here is control going somewhere and this goes nowhere, so what follows is written and never reached."
[[feature]]
name = "__builtin_types_compatible_p"
kind = "builtin"
gcc_version = "3.1"
status = "implemented"
used_by = ["linux"]
tests = ["rucc-sema::types_compatible_p_is_a_constant_that_ignores_the_top_level_qualifiers"]
notes = "An operator that names two types rather than a call, so the parser reads it and the answer is a constant. The row said unimplemented until the status column started deciding whether a call to a name is refused."
[[feature]]
name = "__builtin_choose_expr"
kind = "builtin"
gcc_version = "3.1"
status = "implemented"
used_by = ["linux"]
tests = ["rucc-sema::choose_expr_takes_one_arm_and_never_looks_at_the_other"]
[[feature]]
name = "__builtin_offsetof"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
used_by = ["linux", "glibc", "musl"]
tests = ["rucc-sema::offsetof_is_a_byte_offset_and_reaches_through_an_anonymous_member"]
notes = "The same shape as `__builtin_types_compatible_p`: a type name and a member path, read by the parser and folded to a byte offset."
[[feature]]
name = "__builtin_classify_type"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
used_by = ["linux"]
tests = ["rucc-sema::classify_type_answers_gcc_s_number_for_every_kind_of_type", "rucc-sema::the_expression_form_of_classify_type_promotes_and_the_type_form_does_not"]
notes = "Syntax rather than a call, because the operand may be a type name, and a constant out. The numbers are gcc's `enum type_class` and a program writes them out rather than including a header for them, so they are an interface. The two forms answer differently for the same type: an expression takes the default argument promotions on the way in, since gcc declares the builtin variadic, and a type name takes nothing."
[[feature]]
name = "__builtin_add_overflow"
kind = "builtin"
gcc_version = "5.0"
status = "implemented"
used_by = ["linux", "systemd"]
tests = ["rucc-driver::an_overflow_check_is_arithmetic_and_not_a_call", "rucc-driver::an_overflow_check_is_done_at_a_type_that_holds_every_operand"]
[[feature]]
name = "__builtin_sub_overflow"
kind = "builtin"
gcc_version = "5.0"
status = "implemented"
used_by = ["linux", "systemd"]
tests = ["rucc-driver::an_overflow_check_is_arithmetic_and_not_a_call", "rucc-driver::an_overflow_check_writes_the_wrapped_answer_whether_or_not_it_fit"]
[[feature]]
name = "__builtin_mul_overflow"
kind = "builtin"
gcc_version = "5.0"
status = "implemented"
used_by = ["linux", "systemd"]
tests = ["rucc-driver::an_overflow_check_is_arithmetic_and_not_a_call", "rucc-codegen::a_checked_multiply_becomes_a_multiply_and_the_high_half_of_the_product"]
[[feature]]
name = "__builtin_clz"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned int)"
used_by = ["linux", "ffmpeg", "sqlite"]
tests = ["rucc-driver::the_bit_counts_are_instructions_and_not_calls"]
[[feature]]
name = "__builtin_ctz"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned int)"
used_by = ["linux", "ffmpeg"]
tests = ["rucc-driver::the_bit_counts_are_instructions_and_not_calls"]
[[feature]]
name = "__builtin_popcount"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned int)"
used_by = ["linux", "sqlite"]
tests = ["rucc-driver::the_bit_counts_are_instructions_and_not_calls"]
[[feature]]
name = "__builtin_parity"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned int)"
used_by = []
tests = ["rucc-driver::a_parity_is_the_low_bit_of_the_set_bit_count"]
[[feature]]
name = "__builtin_ffs"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(int)"
used_by = ["linux"]
tests = ["rucc-driver::the_first_set_bit_is_one_based_and_zero_for_a_zero"]
[[feature]]
name = "__builtin_bswap16"
kind = "builtin"
gcc_version = "4.8"
status = "implemented"
signature = "uint16_t(uint16_t)"
used_by = ["linux", "ffmpeg", "curl"]
tests = ["rucc-driver::a_byte_swap_is_arithmetic_and_not_a_call"]
[[feature]]
name = "__builtin_bswap32"
kind = "builtin"
gcc_version = "4.3"
status = "implemented"
signature = "uint32_t(uint32_t)"
used_by = ["linux", "ffmpeg", "curl"]
tests = ["rucc-driver::the_byte_swaps_reverse_at_the_width_their_name_says"]
[[feature]]
name = "__builtin_bswap64"
kind = "builtin"
gcc_version = "4.3"
status = "implemented"
signature = "uint64_t(uint64_t)"
used_by = ["linux", "ffmpeg"]
tests = ["rucc-driver::the_byte_swaps_reverse_at_the_width_their_name_says"]
[[feature]]
name = "__builtin_object_size"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
signature = "size_t(const void *, int)"
used_by = ["glibc", "linux"]
tests = ["rucc-driver::the_object_size_of_an_address_is_what_the_layout_leaves_in_front_of_it", "rucc-driver::an_address_with_no_object_in_sight_answers_at_the_end_of_the_range_its_kind_asks_for"]
notes = "_FORTIFY_SOURCE is built on it, so glibc's headers stop working correctly without it."
[[feature]]
name = "__builtin_dynamic_object_size"
kind = "builtin"
gcc_version = "12.0"
status = "implemented"
signature = "size_t(const void *, int)"
used_by = ["glibc", "linux"]
tests = ["rucc-driver::the_object_size_of_an_address_is_what_the_layout_leaves_in_front_of_it", "rucc-driver::a_kind_that_is_not_one_of_the_four_is_refused"]
notes = "A constant answer satisfies it, so it is answered where the plain spelling is."
[[feature]]
name = "__builtin_assume_aligned"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
signature = "void *(const void *, size_t, ...)"
used_by = ["glibc", "ffmpeg"]
tests = ["rucc-driver::assume_aligned_is_its_first_argument_and_keeps_the_rest"]
notes = "The value is the first argument cast back to `void *` and the promise about its low bits is dropped, which nothing here reads yet. The arguments that are not the answer are evaluated, because gcc 16.2.0 evaluates them at every optimization level even though it has folded the call away."
[[feature]]
name = "__builtin_prefetch"
kind = "builtin"
gcc_version = "3.1"
status = "implemented"
signature = "void(const void *, ...)"
used_by = ["linux", "sqlite"]
tests = ["rucc-driver::a_prefetch_is_one_of_four_instructions_and_the_locality_is_what_picks"]
notes = "A hint that an address is about to be used, which is one instruction on x86-64 and promises nothing: a machine that drops it runs the program correctly, because the only thing it can change is how long the program takes. The two arguments behind the address are optional and both have to be constants, since the instruction is chosen by what they say, and check/builtin/prefetch.rs is where that is enforced. The locality picks between prefetchnta, prefetcht2, prefetcht1 and prefetcht0, which is what gcc 16.2.0 writes for the same four programs. The write hint is carried in the IR and not used here, because prefetchw is not in the base instruction set and gcc writes it only when the command line says the part has it."
[[feature]]
name = "__builtin_return_address"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void *(unsigned int)"
used_by = ["linux", "glibc"]
tests = ["rucc-driver::the_return_address_is_one_word_above_the_frame_the_walk_ended_at"]
notes = "The address control goes back to from a frame, which is the one above it read one word further along. Everything the row beside this one says applies here too, including the forced frame pointer: gcc reads the return address of the frame a function is in off the stack pointer when it kept no frame pointer, and this keeps one and reads 8(%rbp) instead, which costs a push and a pop in a function that asked."
[[feature]]
name = "__builtin_frame_address"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void *(unsigned int)"
used_by = ["linux", "glibc"]
tests = ["rucc-driver::the_frame_address_is_the_frame_pointer_after_walking_that_many_links"]
notes = "Where a frame is, which on x86-64 is what the frame pointer holds, so a function that asks for one is given a frame pointer whether or not anything else asked. A depth above zero walks that many saved frame pointers first, one load each, which is what gcc 16.2.0 writes for the same program. The depth has to be a constant, since the walk is that many instructions long, and check/builtin/frame.rs is where that is enforced along with the limit of 255 that gcc does not have. What the answer is worth is the program's own business: the chain only reaches as far as the callers that kept a frame pointer, which is why gcc documents a nonzero depth as unsafe and warns about one under -Wall."
[[feature]]
name = "__builtin_thread_pointer"
kind = "builtin"
gcc_version = "11.0"
status = "implemented"
signature = "void *(void)"
used_by = ["rpmalloc"]
tests = ["rucc-driver::the_address_of_this_thread_s_own_storage_is_read_out_of_the_segment_register"]
notes = "The address of the block of storage the running thread has, which on x86-64 is one instruction, movq %fs:0. The signature is kept because the call is checked against it, and the node is put in its place after that in check/builtin/thread.rs. What a program does with the answer is its own business, since the layout of what is behind the pointer is the C library's and not the compiler's, which is why an allocator that keeps a cache per thread writes this rather than a thread-local of its own."
[[feature]]
name = "__builtin_alloca"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void *(size_t)"
used_by = ["glibc", "systemd"]
tests = ["rucc-driver::an_alloca_takes_the_bytes_off_the_stack_pointer_and_answers_where_they_are", "rucc-driver::the_bytes_an_alloca_took_are_still_there_at_the_end_of_the_block_that_took_them"]
notes = "The stack pointer moved down by the size rounded up to sixteen, which is the same instruction a variable length array is and a different promise about how long the bytes last: these live until the function returns and an array lives until the end of its block. That is what an alloca in a loop means and it is the whole reason to write one. The lowering keeps the promise by taking every scope open where the call was written out of the business of restoring the stack pointer, which is what gcc 16.2.0 at -O0 does, measured rather than read off the manual. The signature is kept because the call is checked against it and is where the conversion of the argument to a size_t comes from, and the node is put in its place after that in check/builtin/alloca.rs. The alignment of the answer is sixteen because the builtin says nothing about what the bytes will hold, so the only safe answer is one that suits every type the target has. The plain name alloca means this too, under the rule the absolute value family is answered by: only where the callee is a function with external linkage declared with exactly the type the C library gives it, and not under -fno-builtin or -ffreestanding. gcc expands the plain name inline as well, and gcc.c-torture/execute/20010122-1.c is a program that would fail to link if it did not."
[[feature]]
name = "__builtin_setjmp"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(void *)"
used_by = []
tests = ["rucc-driver::the_pair_that_saves_a_place_lowers_to_the_two_markers"]
notes = "Writes down where this function is and answers zero, and answers one where control came back to it through a __builtin_longjmp over the same buffer. Not the library's setjmp: there is no function of the name to call, the buffer is five words rather than a jmp_buf, and nothing about the signal mask is promised either way. The buffer holds the frame pointer, the address to come back to, and the stack pointer, which is the shape gcc 16.2.0 writes at -O0, measured rather than read off the manual. It lowers to one setjmp_marker rather than to a branch and a block, because the edge a longjmp travels is not an edge of this function and a block standing where control comes back would be a block nothing reaches. What is not done yet is the code generation and the rule that nothing live across one stays in a register, which is tamnd/rucc#223."
[[feature]]
name = "__builtin_longjmp"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void(void *, int)"
used_by = []
tests = ["rucc-driver::the_pair_that_saves_a_place_lowers_to_the_two_markers", "rucc-driver::a_longjmp_whose_second_argument_is_not_one_is_turned_down"]
notes = "Reads a buffer a __builtin_setjmp wrote and goes back there, and never comes back. The second argument has to be the constant 1 and is a place-holder: this pair does not carry a value back the way the library's longjmp does, since what the matching save answers is decided by which way control reached it, and gcc 16.2.0 refuses every other value with the same sentence check/builtin/jump.rs reports under E0710. It lowers to one longjmp_marker, which is not a terminator, so what follows it is written and never reached. The code generation is tamnd/rucc#223."
[[feature]]
name = "__builtin_va_list"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
used_by = ["linux", "glibc", "musl", "sqlite"]
tests = ["rucc-target::va_list_is_the_psabis_type_and_not_one_type_with_four_spellings", "rucc-sema::the_rest_of_the_family_is_handed_the_address_of_the_list_and_answers_nothing"]
notes = "A keyword naming a target defined type rather than a builtin function. gcc declares it as a typedef that is always in scope, which is the same type reached another way. Which type it is is the psABI's answer: an array of one structure on SysV, a structure on AAPCS, and a pointer everywhere else."
[[feature]]
name = "__builtin_va_start"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
used_by = ["linux", "glibc", "musl", "sqlite"]
tests = ["rucc-sema::va_start_wants_a_variadic_function_and_the_parameter_the_named_ones_stopped_at", "rucc-parse::the_variable_argument_family_is_syntax_and_not_four_calls"]
notes = "The second argument is required, as it is in gcc: C23 made it optional in the `va_start` macro and the macro passes a zero for it. It is checked against the last named parameter and then dropped, since it is not evaluated."
[[feature]]
name = "__builtin_va_arg"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
used_by = ["linux", "glibc", "musl", "sqlite"]
tests = ["rucc-sema::va_arg_has_the_type_it_was_asked_for_and_warns_where_it_could_not_be_passed", "rucc-sema::va_arg_refuses_a_list_that_is_not_one_and_a_type_with_no_size"]
notes = "An intrinsic down to the machine, because what it becomes is the psABI's answer. A structure or a union is not read yet."
[[feature]]
name = "__builtin_va_end"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
used_by = ["linux", "glibc", "musl", "sqlite"]
tests = ["rucc-sema::the_rest_of_the_family_is_handed_the_address_of_the_list_and_answers_nothing", "rucc-parse::the_variable_argument_family_is_syntax_and_not_four_calls"]
notes = "Nothing at all on every psABI here, and still emitted, since it is what says the list stops being read."
[[feature]]
name = "__builtin_va_copy"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc", "musl", "curl"]
tests = ["rucc-sema::the_rest_of_the_family_is_handed_the_address_of_the_list_and_answers_nothing", "rucc-parse::the_variable_argument_family_is_syntax_and_not_four_calls"]
# The library builtins, the family where the answer is the library function of the same name
# with the prefix taken off. A program writes `__builtin_memcpy` rather than `memcpy` to reach
# the function the C library promises even where a macro or a definition of its own has taken
# the plain name, and to say that the usual meaning is the one intended so that the compiler may
# fold the call. Folding is an optimization on top of the call and not instead of it, so a
# `library` here says what the call means and nothing about how good the code for it is.
#
# What each of these needs is a declaration and a name to put on the call, both of which are on
# this row, so the rows below carry a `library` and are implemented. The ones that are not here
# are the ones that need more than that: the classification family wants a comparison rather than
# a call, and the stdio functions that take a `FILE *` cannot have their type written in the words
# a signature is made of. The `_chk` variants follow the same rule and have a section of their own
# below only because what they mean takes a paragraph of its own to say.
[[feature]]
name = "__builtin_abort"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void(void)"
library = "abort"
used_by = ["linux", "glibc", "sqlite"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
notes = "Two fifths of the files in the gcc torture suite call this, most of them nothing else out of the library, because it is what a test that has found a wrong answer does."
[[feature]]
name = "__builtin_exit"
kind = "builtin"
gcc_version = "2.5"
status = "implemented"
signature = "void(int)"
library = "exit"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_malloc"
kind = "builtin"
gcc_version = "2.5"
status = "implemented"
signature = "void *(size_t)"
library = "malloc"
used_by = ["glibc", "sqlite", "ffmpeg"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_calloc"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "void *(size_t, size_t)"
library = "calloc"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_realloc"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "void *(void *, size_t)"
library = "realloc"
used_by = ["glibc", "ffmpeg"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_free"
kind = "builtin"
gcc_version = "2.5"
status = "implemented"
signature = "void(void *)"
library = "free"
used_by = ["glibc", "sqlite", "ffmpeg"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_abs"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(int)"
library = "abs"
used_by = ["linux", "ffmpeg"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_with_the_type_this_expects", "rucc-driver::the_absolute_value_family_is_the_magnitude_and_not_a_call", "rucc-driver::a_plain_name_the_program_took_is_the_programs_own_function"]
notes = "Answered rather than called, along with the plain name where the program has not taken it. The magnitude of a two's complement integer is four instructions and the most negative value comes back as itself, which is what gcc gives as well."
[[feature]]
name = "__builtin_labs"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "long(long)"
library = "labs"
used_by = ["glibc", "ffmpeg"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_with_the_type_this_expects", "rucc-driver::the_absolute_value_family_is_the_magnitude_and_not_a_call", "rucc-driver::a_plain_name_the_program_took_is_the_programs_own_function"]
notes = "Answered rather than called, along with the plain name where the program has not taken it. The magnitude of a two's complement integer is four instructions and the most negative value comes back as itself, which is what gcc gives as well."
[[feature]]
name = "__builtin_llabs"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long long(long long)"
library = "llabs"
used_by = ["glibc", "ffmpeg"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_with_the_type_this_expects", "rucc-driver::the_absolute_value_family_is_the_magnitude_and_not_a_call", "rucc-driver::a_plain_name_the_program_took_is_the_programs_own_function"]
notes = "Answered rather than called, along with the plain name where the program has not taken it. The magnitude of a two's complement integer is four instructions and the most negative value comes back as itself, which is what gcc gives as well."
[[feature]]
name = "__builtin_memcpy"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void *(void *, const void *, size_t)"
library = "memcpy"
used_by = ["linux", "glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_memset"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void *(void *, int, size_t)"
library = "memset"
used_by = ["linux", "glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_memcmp"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(const void *, const void *, size_t)"
library = "memcmp"
used_by = ["linux", "glibc", "openssl"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_memmove"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void *(void *, const void *, size_t)"
library = "memmove"
used_by = ["linux", "glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_memchr"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "void *(const void *, int, size_t)"
library = "memchr"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_mempcpy"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "void *(void *, const void *, size_t)"
library = "mempcpy"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
notes = "A GNU addition rather than a standard one, which answers the end of what it wrote instead of the start."
[[feature]]
name = "__builtin_bcopy"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "void(const void *, void *, size_t)"
library = "bcopy"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
notes = "The older spelling of memmove, with the arguments the other way round, which is the trap in it."
[[feature]]
name = "__builtin_bzero"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "void(void *, size_t)"
library = "bzero"
used_by = ["glibc", "openssl"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_index"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "char *(const char *, int)"
library = "index"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_rindex"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "char *(const char *, int)"
library = "rindex"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strlen"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "size_t(const char *)"
library = "strlen"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function", "rucc-driver::the_length_and_the_order_of_a_string_literal_are_known_here"]
[[feature]]
name = "__builtin_strcmp"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(const char *, const char *)"
library = "strcmp"
used_by = ["linux", "glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function", "rucc-driver::the_length_and_the_order_of_a_string_literal_are_known_here"]
[[feature]]
name = "__builtin_strncmp"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(const char *, const char *, size_t)"
library = "strncmp"
used_by = ["linux", "glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strcpy"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "char *(char *, const char *)"
library = "strcpy"
used_by = ["linux", "glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strncpy"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "char *(char *, const char *, size_t)"
library = "strncpy"
used_by = ["linux", "glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strcat"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "char *(char *, const char *)"
library = "strcat"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strncat"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "char *(char *, const char *, size_t)"
library = "strncat"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strchr"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "char *(const char *, int)"
library = "strchr"
used_by = ["linux", "glibc", "curl"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strrchr"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "char *(const char *, int)"
library = "strrchr"
used_by = ["glibc", "curl"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strstr"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "char *(const char *, const char *)"
library = "strstr"
used_by = ["glibc", "curl"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strspn"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "size_t(const char *, const char *)"
library = "strspn"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strcspn"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "size_t(const char *, const char *)"
library = "strcspn"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strpbrk"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "char *(const char *, const char *)"
library = "strpbrk"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strdup"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "char *(const char *)"
library = "strdup"
used_by = ["glibc", "systemd", "curl"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_strndup"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "char *(const char *, size_t)"
library = "strndup"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_stpcpy"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "char *(char *, const char *)"
library = "stpcpy"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_stpncpy"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "char *(char *, const char *, size_t)"
library = "stpncpy"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_printf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(const char *, ...)"
library = "printf"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_sprintf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(char *, const char *, ...)"
library = "sprintf"
used_by = ["glibc", "sqlite"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_snprintf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "int(char *, size_t, const char *, ...)"
library = "snprintf"
used_by = ["glibc", "sqlite", "systemd"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_puts"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(const char *)"
library = "puts"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_putchar"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(int)"
library = "putchar"
used_by = ["glibc"]
tests = ["rucc-sema::every_library_builtin_is_declared_under_its_own_name_and_called_by_the_library_one", "rucc-driver::a_call_to_a_library_builtin_reaches_the_library_function"]
[[feature]]
name = "__builtin_clzl"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned long)"
used_by = ["linux", "ffmpeg", "sqlite"]
tests = ["rucc-driver::the_bit_counts_ask_about_the_width_their_name_says"]
[[feature]]
name = "__builtin_clzll"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned long long)"
used_by = ["linux", "ffmpeg", "sqlite"]
tests = ["rucc-driver::the_bit_counts_ask_about_the_width_their_name_says"]
[[feature]]
name = "__builtin_ctzl"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned long)"
used_by = ["linux", "ffmpeg"]
tests = ["rucc-driver::the_bit_counts_ask_about_the_width_their_name_says"]
[[feature]]
name = "__builtin_ctzll"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned long long)"
used_by = ["linux", "ffmpeg"]
tests = ["rucc-driver::the_bit_counts_ask_about_the_width_their_name_says"]
[[feature]]
name = "__builtin_popcountl"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned long)"
used_by = ["linux", "sqlite"]
tests = ["rucc-driver::the_bit_counts_ask_about_the_width_their_name_says"]
[[feature]]
name = "__builtin_popcountll"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned long long)"
used_by = ["linux", "sqlite"]
tests = ["rucc-driver::the_bit_counts_ask_about_the_width_their_name_says"]
[[feature]]
name = "__builtin_parityl"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned long)"
used_by = []
tests = ["rucc-driver::a_parity_is_the_low_bit_of_the_set_bit_count"]
[[feature]]
name = "__builtin_parityll"
kind = "builtin"
gcc_version = "3.4"
status = "implemented"
signature = "int(unsigned long long)"
used_by = []
tests = ["rucc-driver::a_parity_is_the_low_bit_of_the_set_bit_count"]
[[feature]]
name = "__builtin_ffsl"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "int(long)"
used_by = ["linux"]
tests = ["rucc-driver::the_first_set_bit_is_one_based_and_zero_for_a_zero"]
[[feature]]
name = "__builtin_ffsll"
kind = "builtin"
gcc_version = "4.3"
status = "implemented"
signature = "int(long long)"
used_by = ["linux"]
tests = ["rucc-driver::the_first_set_bit_is_one_based_and_zero_for_a_zero"]
# The `_chk` builtins, which are what a fortified glibc header turns every copy into. Under
# `_FORTIFY_SOURCE` the `memcpy` a program writes becomes `__builtin___memcpy_chk` with
# `__builtin_object_size` of the destination behind it, and a program that includes `string.h` on a
# distribution's compiler reaches these whether its author has heard of them or not.
#
# Each is a library builtin whose library name is the checking function, so a call to one is a call
# to `__memcpy_chk` and the size argument goes with it. That is the answer that is always right:
# the checking function takes `(size_t) -1` to mean nothing is known and does no check, which is
# what the fortified header passes when the object size is not known, so the meaning of the program
# is the same whatever the compiler could work out. What it costs is a call gcc would have folded
# away, which is an optimization on top of a call that was already correct rather than a difference
# in what the program does, and it is tamnd/rucc#225's second half.
#
# The rule about the name is the same one the rows above follow, which is easy to misread here and
# worth saying: `__builtin___memcpy_chk` with `__builtin_` taken off is `__memcpy_chk`, and the
# three underscores in the middle are two of the builtin's prefix and one of the library's.
#
# The three `v` spellings are the first rows in the table whose signature names `__builtin_va_list`,
# which is a type the target chooses the shape of rather than the width of, and which is why a
# parameter in a signature is adjusted the way a parameter in a declaration is.
[[feature]]
name = "__builtin___memcpy_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "void *(void *, const void *, size_t, size_t)"
library = "__memcpy_chk"
used_by = ["glibc", "linux", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size", "rucc-driver::a_checking_call_whose_size_says_nothing_is_known_is_the_plain_library_call"]
[[feature]]
name = "__builtin___memmove_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "void *(void *, const void *, size_t, size_t)"
library = "__memmove_chk"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___mempcpy_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "void *(void *, const void *, size_t, size_t)"
library = "__mempcpy_chk"
used_by = ["glibc"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___memset_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "void *(void *, int, size_t, size_t)"
library = "__memset_chk"
used_by = ["glibc", "linux", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___strcpy_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "char *(char *, const char *, size_t)"
library = "__strcpy_chk"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size", "rucc-driver::a_checking_call_whose_size_says_nothing_is_known_is_the_plain_library_call"]
[[feature]]
name = "__builtin___stpcpy_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "char *(char *, const char *, size_t)"
library = "__stpcpy_chk"
used_by = ["glibc"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___strcat_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "char *(char *, const char *, size_t)"
library = "__strcat_chk"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___strncpy_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "char *(char *, const char *, size_t, size_t)"
library = "__strncpy_chk"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___stpncpy_chk"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
signature = "char *(char *, const char *, size_t, size_t)"
library = "__stpncpy_chk"
used_by = ["glibc"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size", "rucc-driver::a_checking_call_whose_size_says_nothing_is_known_is_the_plain_library_call"]
[[feature]]
name = "__builtin___strncat_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "char *(char *, const char *, size_t, size_t)"
library = "__strncat_chk"
used_by = ["glibc"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___sprintf_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "int(char *, int, size_t, const char *, ...)"
library = "__sprintf_chk"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size", "rucc-driver::a_checking_call_whose_size_says_nothing_is_known_is_the_plain_library_call"]
notes = "The second argument is the flag that says whether a `%n` in a writable format is refused, which is why the printing half of the family never walks back to the plain function."
[[feature]]
name = "__builtin___snprintf_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "int(char *, size_t, int, size_t, const char *, ...)"
library = "__snprintf_chk"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___vsprintf_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "int(char *, int, size_t, const char *, __builtin_va_list)"
library = "__vsprintf_chk"
used_by = ["glibc"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::the_v_spellings_of_the_chk_family_take_the_list_a_va_list_parameter_holds"]
[[feature]]
name = "__builtin___vsnprintf_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "int(char *, size_t, int, size_t, const char *, __builtin_va_list)"
library = "__vsnprintf_chk"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::the_v_spellings_of_the_chk_family_take_the_list_a_va_list_parameter_holds"]
[[feature]]
name = "__builtin___printf_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "int(int, const char *, ...)"
library = "__printf_chk"
used_by = ["glibc", "systemd"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::a_chk_builtin_reaches_the_checking_function_and_keeps_the_size"]
[[feature]]
name = "__builtin___vprintf_chk"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
signature = "int(int, const char *, __builtin_va_list)"
library = "__vprintf_chk"
used_by = ["glibc"]
tests = ["rucc-sema::every_chk_builtin_calls_the_checking_function_the_library_defines", "rucc-sema::ten_of_the_family_fold_to_the_function_they_guard_and_the_formatted_six_do_not", "rucc-driver::the_v_spellings_of_the_chk_family_take_the_list_a_va_list_parameter_holds"]
# The two builtins whose answer is the sign bit of an operand. These have no signature because
# they are answered in the front end rather than called: both are in the math library rather than
# the C one, so a call left behind would not link for a program that never asked for `-lm`, and
# neither one needs anything the library has. Each is a mask over the bits, which is also the only
# description that is right for a nan and for a negative zero. The rules are in
# `check/builtin/sign.rs`.
[[feature]]
name = "__builtin_fabs"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = ""
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_name_in_the_family_is_a_row_of_the_table_and_is_answered_not_called", "rucc-driver::a_sign_builtin_is_a_mask_over_the_bits_and_not_a_call"]
notes = "Apple's math.h writes every isinf and isfinite over it, so no program on that platform includes math.h without needing it."
[[feature]]
name = "__builtin_fabsf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = ""
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_name_in_the_family_is_a_row_of_the_table_and_is_answered_not_called", "rucc-driver::a_sign_builtin_is_a_mask_over_the_bits_and_not_a_call"]
[[feature]]
name = "__builtin_fabsl"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = ""
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_name_in_the_family_is_a_row_of_the_table_and_is_answered_not_called", "rucc-driver::a_sign_builtin_is_a_mask_over_the_bits_and_not_a_call"]
[[feature]]
name = "__builtin_copysign"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = ""
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_name_in_the_family_is_a_row_of_the_table_and_is_answered_not_called", "rucc-driver::a_sign_builtin_is_a_mask_over_the_bits_and_not_a_call", "rucc-driver::the_sign_builtins_answer_a_zero_and_a_nan_the_way_the_bits_say"]
[[feature]]
name = "__builtin_copysignf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = ""
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_name_in_the_family_is_a_row_of_the_table_and_is_answered_not_called", "rucc-driver::a_sign_builtin_is_a_mask_over_the_bits_and_not_a_call"]
[[feature]]
name = "__builtin_copysignl"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = ""
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_name_in_the_family_is_a_row_of_the_table_and_is_answered_not_called", "rucc-driver::a_sign_builtin_is_a_mask_over_the_bits_and_not_a_call"]
# The three that name a half of a complex value. These carry a signature because the call is
# checked against it the way an ordinary call is, and then answered rather than left behind: the
# operators they stand for are `~`, `__real__` and `__imag__`, which the language already had, and
# all three functions are in the math library, which a program that wrote one never had a reason to
# ask for. The rules are in `check/builtin/complex.rs`, along with the plain names.
[[feature]]
name = "__builtin_conjf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "_Complex float(_Complex float)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
[[feature]]
name = "__builtin_conj"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "_Complex double(_Complex double)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
[[feature]]
name = "__builtin_conjl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "_Complex long double(_Complex long double)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
notes = "What a value of this width does below the front end is issue 326, the same as every other use of the type."
[[feature]]
name = "__builtin_crealf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "float(_Complex float)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
[[feature]]
name = "__builtin_creal"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "double(_Complex double)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
[[feature]]
name = "__builtin_creall"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long double(_Complex long double)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
[[feature]]
name = "__builtin_cimagf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "float(_Complex float)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
[[feature]]
name = "__builtin_cimag"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "double(_Complex double)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
[[feature]]
name = "__builtin_cimagl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long double(_Complex long double)"
used_by = ["gcc-torture", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_of_the_complex_family_is_a_row_of_the_table_with_its_type", "rucc-driver::the_complex_builtins_are_the_halves_of_the_value_and_not_a_call"]
# The builtins whose answer is a constant, which are answered in the front end rather than called.
# A program writes one where nothing may be called at all, since `double x = __builtin_inf();` at
# file scope is an initializer for an object with static storage duration and has to have a value
# at translation time. The nan spellings keep a library name for the call that is left when the
# payload is not written out, which is what gcc emits for the same program. The rules are in
# `check/builtin/constant.rs`.
[[feature]]
name = "__builtin_inf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "double(void)"
used_by = ["sqlite", "glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call"]
[[feature]]
name = "__builtin_inff"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "float(void)"
used_by = ["sqlite", "glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call"]
[[feature]]
name = "__builtin_infl"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "long double(void)"
used_by = ["sqlite", "glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call"]
[[feature]]
name = "__builtin_huge_val"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "double(void)"
used_by = ["sqlite", "glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call"]
[[feature]]
name = "__builtin_huge_valf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "float(void)"
used_by = ["sqlite", "glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call"]
[[feature]]
name = "__builtin_huge_vall"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "long double(void)"
used_by = ["sqlite", "glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call"]
[[feature]]
name = "__builtin_ceil"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "double(double)"
library = "ceil"
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
notes = "SQLite calls it directly under __GNUC__, which is the path every build that is not MSVC takes."
[[feature]]
name = "__builtin_ceilf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "float(float)"
library = "ceilf"
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_ceill"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "long double(long double)"
library = "ceill"
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_floor"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "double(double)"
library = "floor"
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_floorf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "float(float)"
library = "floorf"
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_floorl"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "long double(long double)"
library = "floorl"
used_by = ["sqlite", "ffmpeg", "glibc"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_trunc"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "double(double)"
library = "trunc"
used_by = ["sqlite", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_truncf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "float(float)"
library = "truncf"
used_by = ["sqlite", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_truncl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long double(long double)"
library = "truncl"
used_by = ["sqlite", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_round"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "double(double)"
library = "round"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
notes = "A half goes away from zero rather than to even, which is the one place C and IEEE 754's default disagree."
[[feature]]
name = "__builtin_roundf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "float(float)"
library = "roundf"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_roundl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long double(long double)"
library = "roundl"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_rint"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "double(double)"
library = "rint"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::the_two_that_read_the_rounding_mode_are_called_and_not_folded", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
notes = "Deliberately not folded. What it answers depends on the rounding mode the program is running under, and gcc 16.2.0 refuses a static initializer written with one for that reason."
[[feature]]
name = "__builtin_rintf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "float(float)"
library = "rintf"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::the_two_that_read_the_rounding_mode_are_called_and_not_folded", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_rintl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long double(long double)"
library = "rintl"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::the_two_that_read_the_rounding_mode_are_called_and_not_folded", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_nearbyint"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "double(double)"
library = "nearbyint"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::the_two_that_read_the_rounding_mode_are_called_and_not_folded", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_nearbyintf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "float(float)"
library = "nearbyintf"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::the_two_that_read_the_rounding_mode_are_called_and_not_folded", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_nearbyintl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long double(long double)"
library = "nearbyintl"
used_by = ["glibc", "musl"]
tests = ["rucc-sema::the_two_that_read_the_rounding_mode_are_called_and_not_folded", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_fmax"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "double(double, double)"
library = "fmax"
used_by = ["gcc-torture", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
notes = "The nan rule is the library's rather than the machine's: fmax of a nan and a number is the number, so this is not the maxsd instruction under another name."
[[feature]]
name = "__builtin_fmaxf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "float(float, float)"
library = "fmaxf"
used_by = ["gcc-torture", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_fmaxl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long double(long double, long double)"
library = "fmaxl"
used_by = ["gcc-torture", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_fmin"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "double(double, double)"
library = "fmin"
used_by = ["gcc-torture", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_fminf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "float(float, float)"
library = "fminf"
used_by = ["gcc-torture", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_fminl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "long double(long double, long double)"
library = "fminl"
used_by = ["gcc-torture", "glibc", "musl"]
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_that_is_called_under_its_own_name", "rucc-base::a_number_taken_to_an_integer_lands_where_the_host_puts_it", "rucc-driver::a_math_library_builtin_of_a_constant_is_the_answer_and_not_a_call", "rucc-driver::a_math_library_builtin_of_anything_else_is_a_call_to_the_library"]
[[feature]]
name = "__builtin_nan"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "double(const char *)"
library = "nan"
used_by = ["glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call", "rucc-driver::a_nan_is_written_with_the_payload_the_program_asked_for"]
[[feature]]
name = "__builtin_nanf"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "float(const char *)"
library = "nanf"
used_by = ["glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call", "rucc-driver::a_nan_is_written_with_the_payload_the_program_asked_for"]
[[feature]]
name = "__builtin_nanl"
kind = "builtin"
gcc_version = "2.0"
status = "implemented"
signature = "long double(const char *)"
library = "nanl"
used_by = ["glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call", "rucc-driver::a_nan_is_written_with_the_payload_the_program_asked_for"]
[[feature]]
name = "__builtin_nans"
kind = "builtin"
gcc_version = "3.3"
status = "implemented"
signature = "double(const char *)"
library = "nans"
used_by = ["glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call", "rucc-driver::a_nan_is_written_with_the_payload_the_program_asked_for"]
[[feature]]
name = "__builtin_nansf"
kind = "builtin"
gcc_version = "3.3"
status = "implemented"
signature = "float(const char *)"
library = "nansf"
used_by = ["glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call", "rucc-driver::a_nan_is_written_with_the_payload_the_program_asked_for"]
[[feature]]
name = "__builtin_nansl"
kind = "builtin"
gcc_version = "3.3"
status = "implemented"
signature = "long double(const char *)"
library = "nansl"
used_by = ["glibc"]
tests = ["rucc-sema::every_name_answered_here_is_a_row_of_the_table_and_says_it_is_done", "rucc-driver::a_builtin_whose_answer_is_a_constant_is_one_and_not_a_call", "rucc-driver::a_nan_is_written_with_the_payload_the_program_asked_for"]
# The floating point classification builtins, which are questions about a value rather than
# functions. Every macro `math.h` gives these names to expands to the builtin of the same name, so
# there is nothing under any of them to call, and what each becomes is a comparison. The six that
# ask about a pair are type generic, since they promote their two operands against each other and
# so have no one signature; the spellings ending in a width are not, and the difference shows:
# `__builtin_isinff(1e300)` is one and `__builtin_isinf(1e300)` is zero. The rules are in
# `check/builtin/classify.rs`.
[[feature]]
name = "__builtin_isgreater"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_c_has_an_operator_for_is_that_operator"]
notes = "`a > b`. The standard's macro differs in not raising the invalid operation exception on a quiet NaN, and this compiler does not model floating point exceptions, so there is nothing left to keep apart."
[[feature]]
name = "__builtin_isgreaterequal"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_c_has_an_operator_for_is_that_operator"]
[[feature]]
name = "__builtin_isless"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_c_has_an_operator_for_is_that_operator"]
[[feature]]
name = "__builtin_islessequal"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_c_has_an_operator_for_is_that_operator"]
[[feature]]
name = "__builtin_islessgreater"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_classification_builtins_are_comparisons_and_not_calls"]
notes = "`a < b || a > b`, which is not `a != b`, because that is true when the two are unordered."
[[feature]]
name = "__builtin_isunordered"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_classification_builtins_are_comparisons_and_not_calls"]
notes = "Whether either operand is a NaN, which is one predicate of the IR's comparison and cannot be written with C's operators without naming an operand twice."
[[feature]]
name = "__builtin_isnan"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_classification_builtins_are_comparisons_and_not_calls"]
[[feature]]
name = "__builtin_isnanf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
[[feature]]
name = "__builtin_isnanl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
[[feature]]
name = "__builtin_isinf"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_classification_builtins_are_comparisons_and_not_calls"]
[[feature]]
name = "__builtin_isinff"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
[[feature]]
name = "__builtin_isinfl"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
[[feature]]
name = "__builtin_isfinite"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_classification_builtins_are_comparisons_and_not_calls"]
[[feature]]
name = "__builtin_finite"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
notes = "The BSD spelling of isfinite, which gcc keeps and which takes a double rather than being type generic."
[[feature]]
name = "__builtin_finitef"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
[[feature]]
name = "__builtin_finitel"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
[[feature]]
name = "__builtin_isnormal"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_last_three_classification_builtins_are_comparisons_and_not_calls"]
notes = "Finite and at least the smallest normal of the format, which is the one constant of the family that is not an infinity."
[[feature]]
name = "__builtin_isinf_sign"
kind = "builtin"
gcc_version = "4.4"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_last_three_classification_builtins_are_comparisons_and_not_calls"]
notes = "isinf with a sign, and the one question of the family whose answer is a number rather than a bit."
[[feature]]
name = "__builtin_fpclassify"
kind = "builtin"
gcc_version = "4.4"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_last_three_classification_builtins_are_comparisons_and_not_calls"]
notes = "Five integer constant expressions in front of the value, one of which is the answer. glibc's fpclassify macro is exactly this call."
[[feature]]
name = "__builtin_signbit"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::the_classification_builtins_are_comparisons_and_not_calls"]
notes = "The one of the family that is not a question about the value. A negative zero compares equal to a positive one and its sign bit is set, so the answer comes from the bits."
[[feature]]
name = "__builtin_signbitf"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
[[feature]]
name = "__builtin_signbitl"
kind = "builtin"
gcc_version = "4.0"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_classification_spelling_that_names_a_width_converts_before_it_asks"]
# The atomic builtins, from gcc 4.7, which is the model C11 took its own atomics from. Every one
# of them except the two lock free questions is type generic: what `__atomic_load_n` answers with
# is whatever its first argument points at, so there is no signature to write here and the rule
# that stands in for one is in `check/builtin/generic.rs`.
[[feature]]
name = "__atomic_load_n"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["linux", "glibc", "openssl"]
tests = ["rucc-driver::an_ordered_access_is_ordered_in_the_ir", "rucc-driver::an_ordered_access_is_the_plain_instruction_on_this_machine"]
notes = "The one the rest of the family is shaped like: a pointer and a memory order in, and whatever the pointer points at out."
[[feature]]
name = "__atomic_load"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::an_access_through_a_second_pointer_is_the_same_access_and_one_more"]
notes = "The read for an object too big to come back in a register, which writes what it read through a second pointer instead of answering it."
[[feature]]
name = "__atomic_store_n"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["linux", "glibc", "openssl"]
tests = ["rucc-driver::an_ordered_access_is_ordered_in_the_ir", "rucc-driver::an_ordered_access_is_the_plain_instruction_on_this_machine"]
[[feature]]
name = "__atomic_store"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::an_access_through_a_second_pointer_is_the_same_access_and_one_more"]
notes = "The write of the same shape, whose value arrives by pointer and is read before the store."
[[feature]]
name = "__atomic_exchange_n"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "The C11 exchange, which puts a value in the object and answers what was there. `xchg` on this machine, which locks the bus whether or not it is asked to."
[[feature]]
name = "__atomic_exchange"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::an_access_through_a_second_pointer_is_the_same_access_and_one_more"]
notes = "The exchange of the same shape, which is one plain read, the `xchg` the `_n` spelling is, and one plain write."
[[feature]]
name = "__atomic_compare_exchange_n"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["linux", "glibc", "openssl"]
tests = ["rucc-driver::a_compare_and_exchange_is_one_instruction_answering_two_things", "rucc-driver::a_compare_and_exchange_is_a_locked_instruction_at_the_width_of_the_object"]
notes = "The C11 compare and exchange, whose value expected arrives by pointer so that what was found can be written back through it when the exchange did not happen."
[[feature]]
name = "__atomic_compare_exchange"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_compare_and_exchange_is_one_instruction_answering_two_things", "rucc-driver::a_compare_and_exchange_is_a_locked_instruction_at_the_width_of_the_object"]
notes = "The same, with the value to put there arriving by pointer as well, which is the form for an object too big to pass in a register."
[[feature]]
name = "__atomic_fetch_add"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["linux", "glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "A read, an add and a write back, answering the value that was there before. `lock xadd` on this machine. The operand is added as it is written, so on a pointer object it moves the pointer by bytes and not by elements, which is what gcc does."
[[feature]]
name = "__atomic_fetch_sub"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "The same over a subtraction, which is the same instruction over the negated operand."
[[feature]]
name = "__atomic_fetch_and"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "A read, a bitwise and and a write back, answering the value that was there before. This machine has no single instruction for it, so it is a loop around `lock cmpxchg`: read the word, work out what should be there, put it back if nothing else got in first, and go round again when something did."
[[feature]]
name = "__atomic_fetch_or"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "A read, a bitwise or and a write back, answering the value that was there before. This machine has no single instruction for it, so it is a loop around `lock cmpxchg`: read the word, work out what should be there, put it back if nothing else got in first, and go round again when something did."
[[feature]]
name = "__atomic_fetch_xor"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "A read, a bitwise exclusive or and a write back, answering the value that was there before. This machine has no single instruction for it, so it is a loop around `lock cmpxchg`: read the word, work out what should be there, put it back if nothing else got in first, and go round again when something did."
[[feature]]
name = "__atomic_fetch_nand"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The and with every bit of the answer flipped, which is what gcc has meant by nand since 4.4, answering the value before. This machine has no single instruction for it, so it is a loop around `lock cmpxchg`: read the word, work out what should be there, put it back if nothing else got in first, and go round again when something did."
[[feature]]
name = "__atomic_add_fetch"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "The same add, answering the value that is there afterwards, which is the answer above and the operand added again."
[[feature]]
name = "__atomic_sub_fetch"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "The same subtraction, answering the value that is there afterwards."
[[feature]]
name = "__atomic_and_fetch"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The and answering the value afterwards, which is the same loop and then the arithmetic again over what it read."
[[feature]]
name = "__atomic_or_fetch"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The or answering the value afterwards, which is the same loop and then the arithmetic again over what it read."
[[feature]]
name = "__atomic_xor_fetch"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The exclusive or answering the value afterwards, which is the same loop and then the arithmetic again over what it read."
[[feature]]
name = "__atomic_nand_fetch"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The nand answering the value afterwards, which is the same loop and then the and and the flip again over what it read."
[[feature]]
name = "__atomic_test_and_set"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_flag_is_an_exchange_of_one_byte_and_a_store_of_a_zero_over_the_same_byte"]
notes = "An exchange of a one into a byte, answering whether anything was there. One byte whatever the pointer points at, because the object is an `atomic_flag` and there is no other way to read one."
[[feature]]
name = "__atomic_clear"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["glibc"]
tests = ["rucc-driver::a_flag_is_an_exchange_of_one_byte_and_a_store_of_a_zero_over_the_same_byte"]
notes = "The other half of the flag, which puts the zero back over the same byte."
[[feature]]
name = "__atomic_thread_fence"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
used_by = ["linux", "glibc"]
tests = ["rucc-driver::a_barrier_is_one_instruction_at_the_strongest_ordering_and_none_below_it", "rucc-driver::a_memory_order_an_operation_cannot_carry_is_read_as_the_strongest"]
[[feature]]
name = "__atomic_signal_fence"
kind = "builtin"
gcc_version = "4.7"
status = "unimplemented"
used_by = []
tests = []
[[feature]]
name = "__atomic_always_lock_free"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
signature = "_Bool(size_t, const void *)"
used_by = ["glibc"]
tests = ["rucc-driver::the_lock_free_questions_are_answered_as_constants"]
notes = "Answers about a type rather than about an object, so its second argument may be a null pointer and its own type is fixed. That is why these two have a signature and the rest of the family does not."
[[feature]]
name = "__atomic_is_lock_free"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
signature = "_Bool(size_t, const void *)"
used_by = ["glibc", "openssl"]
tests = ["rucc-driver::the_lock_free_questions_are_answered_as_constants"]
notes = "The same answer as the one above rather than a call into libatomic, since there is no libatomic here to call and the answer this gives is the stronger of the two."
# The older family, from gcc 4.1, which predates the memory model and takes a list of variables
# the barrier protects after the arguments it actually uses. Type generic in the same way.
[[feature]]
name = "__sync_synchronize"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
signature = "void(void)"
used_by = ["linux", "sqlite"]
tests = ["rucc-driver::a_barrier_is_one_instruction_at_the_strongest_ordering_and_none_below_it"]
notes = "The one member of the __sync family that is not type generic, which is why it is the one with a signature here."
# The three x86 fence instructions under the names gcc gives them, which are the same node as the
# barrier above at the same ordering. A header writes one of these when it wants the instruction
# and not the ordering, and mingw-w64's psdk_inc/intrin-impl.h writes the store one inside
# __faststorefence, which is how every Windows program that includes windows.h reaches it.
[[feature]]
name = "__builtin_ia32_sfence"
kind = "builtin"
gcc_version = "3.1"
status = "implemented"
signature = "void(void)"
used_by = []
tests = ["rucc-driver::the_three_x86_fences_are_the_barrier_the_strongest_ordering_gives"]
notes = "A store fence. Lowered as the full barrier, which is stronger than the instruction and so is a safe answer, for the reason the shipped xmmintrin.h gives at _mm_sfence."
[[feature]]
name = "__builtin_ia32_lfence"
kind = "builtin"
gcc_version = "3.1"
status = "implemented"
signature = "void(void)"
used_by = []
tests = ["rucc-driver::the_three_x86_fences_are_the_barrier_the_strongest_ordering_gives"]
notes = "A load fence, and the same answer as the store one for the same reason."
[[feature]]
name = "__builtin_ia32_mfence"
kind = "builtin"
gcc_version = "3.1"
status = "implemented"
signature = "void(void)"
used_by = []
tests = ["rucc-driver::the_three_x86_fences_are_the_barrier_the_strongest_ordering_gives"]
notes = "A fence over both, which is what the full barrier already is, so this is the one of the three that is exact."
[[feature]]
name = "__sync_fetch_and_add"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = ["linux", "sqlite"]
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "The older family's spelling of the add answering the value before, which is a full barrier because everything in that family is."
[[feature]]
name = "__sync_fetch_and_sub"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "The same over a subtraction."
[[feature]]
name = "__sync_fetch_and_or"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The older family's spelling of the or answering the value before, which is how a flag is set in a word of them."
[[feature]]
name = "__sync_fetch_and_and"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The older family's spelling of the and answering the value before, which is a full barrier because everything in that family is."
[[feature]]
name = "__sync_fetch_and_xor"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The older family's spelling of the exclusive or answering the value before."
[[feature]]
name = "__sync_fetch_and_nand"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The older family's spelling of the nand answering the value before, and it means the same thing the newer one does since gcc 4.4."
[[feature]]
name = "__sync_add_and_fetch"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "The older family's spelling of the add answering the value afterwards."
[[feature]]
name = "__sync_sub_and_fetch"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "The same over a subtraction."
[[feature]]
name = "__sync_or_and_fetch"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The older family's spelling of the or answering the value afterwards."
[[feature]]
name = "__sync_and_and_fetch"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The older family's spelling of the and answering the value afterwards."
[[feature]]
name = "__sync_xor_and_fetch"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The older family's spelling of the exclusive or answering the value afterwards."
[[feature]]
name = "__sync_nand_and_fetch"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_bitwise_read_modify_write_is_a_loop_around_the_compare_and_exchange"]
notes = "The older family's spelling of the nand answering the value afterwards."
[[feature]]
name = "__sync_bool_compare_and_swap"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = ["linux", "sqlite"]
tests = ["rucc-driver::a_compare_and_exchange_is_one_instruction_answering_two_things", "rucc-driver::a_compare_and_exchange_is_a_locked_instruction_at_the_width_of_the_object"]
notes = "The older family, answering whether the exchange happened. A full barrier, since that family has no memory order argument."
[[feature]]
name = "__sync_val_compare_and_swap"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = ["linux"]
tests = ["rucc-driver::a_compare_and_exchange_is_one_instruction_answering_two_things", "rucc-driver::a_compare_and_exchange_is_a_locked_instruction_at_the_width_of_the_object"]
notes = "The same instruction answering what it found rather than whether it matched."
[[feature]]
name = "__sync_lock_test_and_set"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "Taking a lock, which is an exchange at acquire ordering. One of the two names in the older family that is not a full barrier, since taking a lock has nothing to say about what may move out behind it."
[[feature]]
name = "__sync_lock_release"
kind = "builtin"
gcc_version = "4.1"
status = "implemented"
used_by = []
tests = ["rucc-driver::a_read_modify_write_is_one_instruction_and_the_arithmetic_a_name_asks_for", "rucc-driver::a_read_modify_write_is_an_exchange_or_a_locked_add_at_the_width_of_the_object"]
notes = "Giving a lock back, which is a store of a zero at release ordering. The other name that is not a full barrier, for the mirror of the reason above."
[[feature]]
name = "__builtin_clrsb"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
signature = "int(int)"
used_by = []
tests = ["rucc-sema::all_eighteen_names_are_rows_of_the_table_that_carry_a_signature", "rucc-driver::the_redundant_sign_bit_count_is_instructions_and_not_a_call"]
notes = "How many bits below the sign bit repeat it, which is the leading zero count of the value folded onto its own sign less one. The only one of the family whose operand is signed for a reason about the question rather than about the C library, since a type with no sign bit has no redundant sign bits."
[[feature]]
name = "__builtin_clrsbl"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
signature = "int(long)"
used_by = []
tests = ["rucc-sema::all_eighteen_names_are_rows_of_the_table_that_carry_a_signature", "rucc-driver::the_bit_counts_ask_about_the_width_their_name_says"]
[[feature]]
name = "__builtin_clrsbll"
kind = "builtin"
gcc_version = "4.7"
status = "implemented"
signature = "int(long long)"
used_by = []
tests = ["rucc-sema::all_eighteen_names_are_rows_of_the_table_that_carry_a_signature", "rucc-driver::the_bit_counts_ask_about_the_width_their_name_says"]
[[feature]]
name = "__builtin_imaxabs"
kind = "builtin"
gcc_version = "3.0"
status = "implemented"
signature = "intmax_t(intmax_t)"
library = "imaxabs"
used_by = []
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_with_the_type_this_expects", "rucc-driver::the_widest_absolute_value_is_whichever_type_the_target_makes_intmax_t"]
notes = "The magnitude at `intmax_t`, which is `long` on a target whose `long` is sixty four bits wide and `long long` everywhere else. Answered rather than called, along with the plain name where the program has not taken it, exactly as the three narrower ones are."
[[feature]]
name = "__builtin_uabs"
kind = "builtin"
gcc_version = "15.0"
status = "implemented"
signature = "unsigned int(int)"
used_by = []
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_with_the_type_this_expects", "rucc-driver::the_unsigned_absolute_value_family_answers_in_the_unsigned_type"]
notes = "The magnitude of a signed value as the unsigned type of the same width, which is the one shape of absolute value with no undefined case: the most negative value has no positive counterpart in the signed type and has one in the unsigned type. No library declares this name, so there is nothing to call and the answer is always built."
[[feature]]
name = "__builtin_ulabs"
kind = "builtin"
gcc_version = "15.0"
status = "implemented"
signature = "unsigned long(long)"
used_by = []
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_with_the_type_this_expects", "rucc-driver::the_unsigned_absolute_value_family_answers_in_the_unsigned_type"]
[[feature]]
name = "__builtin_ullabs"
kind = "builtin"
gcc_version = "15.0"
status = "implemented"
signature = "unsigned long long(long long)"
used_by = []
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_with_the_type_this_expects", "rucc-driver::the_unsigned_absolute_value_family_answers_in_the_unsigned_type"]
[[feature]]
name = "__builtin_umaxabs"
kind = "builtin"
gcc_version = "15.0"
status = "implemented"
signature = "uintmax_t(intmax_t)"
used_by = []
tests = ["rucc-sema::every_prefixed_spelling_is_a_row_of_the_table_with_the_type_this_expects", "rucc-driver::the_widest_absolute_value_is_whichever_type_the_target_makes_intmax_t"]
[[feature]]
name = "__builtin_add_overflow_p"
kind = "builtin"
gcc_version = "7.0"
status = "implemented"
used_by = []
tests = ["rucc-driver::an_overflow_predicate_writes_nothing_and_answers_the_bit_the_check_would"]
notes = "The check without the store, which answers whether the addition would fit in the type of its third argument and writes nothing. The third argument is there to name a type, so it is not evaluated."
[[feature]]
name = "__builtin_sub_overflow_p"
kind = "builtin"
gcc_version = "7.0"
status = "implemented"
used_by = []
tests = ["rucc-driver::an_overflow_predicate_writes_nothing_and_answers_the_bit_the_check_would"]
[[feature]]
name = "__builtin_mul_overflow_p"
kind = "builtin"
gcc_version = "7.0"
status = "implemented"
used_by = []
tests = ["rucc-driver::an_overflow_predicate_writes_nothing_and_answers_the_bit_the_check_would"]