From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A8FCD385842C; Tue, 20 Dec 2022 21:09:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8FCD385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671570585; bh=RRJtkQpbkT2kJZwX1aQeHG2hGzKb5/vrUpX3U+ZCgys=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iYdzGMqTCjg8wXOt1zjRhFyh2HR9zxHTesLU360P672VgQI+D768ZehBFaTwq/UFA QdzZ5ZcED+KmS+CLe0dXJySxyJl2z08IFL59H2IgVhX2g3xbYqpskgSAgl6ra+Z5tg PTd0210PJy0Pv9KlAVyCnudCqDkvBeOvEfi7Fl94= From: "james.hilliard1 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration Date: Tue, 20 Dec 2022 21:09:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: james.hilliard1 at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: MOVED 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=3D108189 --- Comment #8 from James Hilliard --- (In reply to Andrew Pinski from comment #7) > Yes the warning is really still correct even if a closer testcase would b= e: > ``` > int f(struct {int t;} *b) > { > return b->t; > } >=20 > int f1(void *a) > { > return f(a); > } > ``` > I am actually shocked clang didn't implement this warning since there is = no > type which is compatible with the typeof *b outside of function f. Yeah, clang with -std=3Dgnu17 -pedantic doesn't even complain at all from t= he looks of it. Does it make sense to allow disabling this specific warning in GCC?=