From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B115F3858C78; Wed, 1 Mar 2023 23:27:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B115F3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677713277; bh=R+ek3W7W8FULhn02SSpuZxCACxbF5jGwNPTRQlXxyio=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JB+d7xqIJR+7uOq79dsSTdtMutsh78Eqt4QzDtzpGdP3EpSEpvn5BmPpss+vKiQto AJ6NZevyqUkZ5O2PjyKtp6T/4onG4gbCIYpRakc5oWH4v8AR6OIcmT51R3oaJkK+Bd iy8yc/RXIlYj667vzOCh+4dNsvf4EOJRQorhkfH4= From: "kees at outflux dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108896] provide "element_count" attribute to give more context to __builtin_dynamic_object_size() and -fsanitize=bounds Date: Wed, 01 Mar 2023 23:27: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: kees at outflux dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: qinzhao 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=3D108896 --- Comment #6 from Kees Cook --- I really want to avoid the changes to sizeof() -- this will confuse a lot of other things. Sizeof is expected to be a constant expression, for example. I think the attribute is best since it avoids colliding with anything else.=