From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E03FA383A203; Mon, 5 Sep 2022 17:06:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E03FA383A203 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662397617; bh=2kRRjj0mSzaud/8pkdgD9GZKW6i/xED6Zm68G4VTl+Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=y7OVcdzjaWO14+dX96NqZiM9iYYDvfXuY4O7EG0IyBNsrFTTnaB5pp92ky5HPfzY3 CYm61xNR50TAaT3xgR6LWgUpU1R44t0A7iZ0aiiHKJpE0uNUj0r8sfCu3IOdXirpZw y/nC5LVJaQ5MktIDmzig+ruKHllGkc4p7uyVkAiA= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106838] Built-in traits have wrong preconditions Date: Mon, 05 Sep 2022 17:06:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106838 --- Comment #1 from Jonathan Wakely --- According to https://gcc.gnu.org/onlinedocs/gcc/Type-Traits.html the precondition for __is_trivial is: "Requires: type shall be a complete type, (possibly cv-qualified) void, or = an array of unknown bound." That implies the following should be valid: struct Inc; bool b =3D __is_trivial(Inc[]); However, the implementation seems to match the requirement for the std::is_trivial trait, which is: "remove_all_extents_t shall be a complete type or cv void." This seems to be just a documentation bug.=