From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 02DDC3840C1D; Mon, 15 Jun 2020 16:45:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02DDC3840C1D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592239549; bh=SU8AMHuI1NKpn6w5/OPfbD+4XsNpmv8MJARRyVPvWmo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vgeOguPhgRnvFtqQC834PHDivDIQayasD/06llNlaZVw1M1V/Fd/DBXC1nwDhH9/8 BOq7S5lWQr/Ewl6/mQjMg4pjuMuxldzBTeaNbE7DHFZvG53ZTRohJvENxuVv6bGo5N 4oQFIK/xZzuwZiahbqYmVXyuBoqinakKvsmWUFks= From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/95625] missing detail in -Waddress initializing a function argument Date: Mon, 15 Jun 2020 16:45:48 +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: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: minor X-Bugzilla-Who: msebor 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: component 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 16:45:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95625 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c++ |c --- Comment #1 from Martin Sebor --- As mentioned in comment #0, this is a generic C/C++ improvement: "The test = case is C++ but a similar improvement applies to the C front end." In fact, it's even more relevant to C where the warning doesn't underline the argument it refers to: Here's a corresponding C test case. Wh $ cat pr95625.c && gcc -O2 -S -Wall -Wextra pr95625.c void f (int, int, int, _Bool, int *); void g (int i) { f (1, 2, 3, &i, &i); } pr95625.c: In function =E2=80=98g=E2=80=99: pr95625.c:5:3: warning: the address of =E2=80=98i=E2=80=99 will always eval= uate as =E2=80=98true=E2=80=99 [-Waddress] 5 | f (1, 2, 3, &i, &i); | ^=