From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D87B23858C5E; Thu, 2 Mar 2023 19:56:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D87B23858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677787013; bh=YFjhEcv2aNOm6Gaq5CleV71Wu+nenvVjgkKuxmB+YgU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kds2l0QrAFv6eRM4X0blIQZKbXupnnchg2hqsJxtFLyb8QZDeQtCdZBL3Oy9d7l8z gN2/PXAlDLr6wYGRmEC0kjd0eOrTR0V1qKVt3NCY6LzABWruRh6OlSAElSmPjw/YuW IQnDH97jHPZIUSQdgD/lpBgDfJoAXh1vfew3fvGA= From: "qinzhao at gcc dot gnu.org" 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: Thu, 02 Mar 2023 19:56:53 +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: qinzhao at gcc dot gnu.org 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 #12 from qinzhao at gcc dot gnu.org --- (In reply to Martin Uecker from comment #9) > > Here, we want to use a member of the struct as a size=C2=A0 > expression. This could work equally at function and file scope. > But the semantics need to be worked out. I have started to work > on a patch for GCC a couple of weeks ago using PLACEHOLDER_EXPR, > but did not get very far. what kind of semantics your patch will support?=