pub struct Feature {
pub name: &'static str,
pub kind: Kind,
pub gcc_version: &'static str,
pub status: Status,
pub signature: &'static str,
pub answer: Answer,
pub value: u32,
pub used_by: &'static [&'static str],
pub tests: &'static [&'static str],
pub notes: &'static str,
}Expand description
One row of the matrix.
Fields§
§name: &'static strThe spelling asked about, with no __ armour on it.
kind: KindWhich operator answers for it.
gcc_version: &'static strThe GCC release that introduced it.
status: StatusHow far along it is.
signature: &'static strThe type a builtin has, written as a C prototype without the name, or empty.
Empty for everything that is not a builtin, and for a builtin whose type depends on
what it is handed: __builtin_constant_p takes anything, __builtin_add_overflow
takes three types that have to agree, and the atomics are a family rather than a
function. Those are decided where the arguments are, and a fixed type here would be a
worse answer than none.
It is a string rather than a structure because size_t is a different type on two
targets and this table has no target. The compiler reads it once per builtin it is
asked for. The set of words it may use is fixed and build.rs checks it, so a typo
fails this crate’s build rather than the compile of whoever first calls the builtin.
answer: AnswerWhat to do when it is met and is not implemented.
value: u32What __has_c_attribute answers with, which the standard fixes per attribute. One for
every other kind, where the operators answer one or nothing.
used_by: &'static [&'static str]Projects known to need it, from the corpus in spec/15-testing.md.
tests: &'static [&'static str]The tests that prove the status, named as crate::test or as a file path.
notes: &'static strAnything a reader needs that the fields above do not say.