From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 86CFC385E00B; Sat, 28 Mar 2020 15:39:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86CFC385E00B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585409964; bh=xMe2VeYM4EmG8deME1/iMltZ7Pbz8ya33XlHrwx85lc=; h=From:To:Subject:Date:From; b=mFk1cojpwfo4vGZ27TQqCxW3h0rsXArhaqEk8fFseXuoxyw2vndE7E5VJwTzqqapt W3Ugw4Z5gPnXfFHz0af1oPUBy5UE3Atgl5LSA9WL0/nuNYwckH22bv1mwmrvXeiUNi E0/n5J3oVZBHtmAD76u/MttbZot3Z9EQAn5YSD9M= From: "matthew at wil dot cx" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94382] New: conflicting function types should show more context Date: Sat, 28 Mar 2020 15:39:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: matthew at wil dot cx 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Sat, 28 Mar 2020 15:39:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94382 Bug ID: 94382 Summary: conflicting function types should show more context Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: matthew at wil dot cx Target Milestone: --- The diagnostic would be better if it showed the entire function prototype: ../fs/iomap/apply.c:13:1: error: conflicting types for =E2=80=98__iomap_app= ly=E2=80=99 13 | __iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsig= ned flags, | ^~~~~~~~~~~~~ In file included from ../fs/iomap/apply.c:9: ../include/linux/iomap.h:152:1: note: previous declaration of =E2=80=98__io= map_apply=E2=80=99 was here 152 | __iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsig= ned flags, | ^~~~~~~~~~~~~ $ grep -A3 __iomap_apply include/linux/iomap.h fs/iomap/apply.c=20 include/linux/iomap.h:__iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, include/linux/iomap.h- const struct iomap_ops *ops, iomap_actor_t actor, include/linux/iomap.h- struct iomap *iomap, struct iomap *srcmap); include/linux/iomap.h- -- include/linux/iomap.h: length =3D __iomap_apply(inode, pos, length, flags,= ops, actor, include/linux/iomap.h- &iomap, &srcmap); include/linux/iomap.h- /* include/linux/iomap.h- * Now that we have guaranteed that the space allocation will succeed, -- fs/iomap/apply.c:__iomap_apply(struct inode *inode, loff_t pos, loff_t leng= th, unsigned flags, fs/iomap/apply.c- struct iomap *iomap, struct iomap *srcmap, fs/iomap/apply.c- const struct iomap_ops *ops, iomap_actor_t actor) fs/iomap/apply.c-{ The bug in my code is fairly obvious, but the diagnostic doesn't show the p= art of the function signature that doesn't match.=