public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "matthew at wil dot cx" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-94382-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94382 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 ‘__iomap_apply’ 13 | __iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, | ^~~~~~~~~~~~~ In file included from ../fs/iomap/apply.c:9: ../include/linux/iomap.h:152:1: note: previous declaration of ‘__iomap_apply’ was here 152 | __iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, | ^~~~~~~~~~~~~ $ grep -A3 __iomap_apply include/linux/iomap.h fs/iomap/apply.c 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 = __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 length, 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 part of the function signature that doesn't match.
next reply other threads:[~2020-03-28 15:39 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-28 15:39 matthew at wil dot cx [this message] 2020-04-20 23:08 ` [Bug c/94382] " dmalcolm at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94382-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).