public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eggert at cs dot ucla.edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/98021] New: #warning issues redundant diagnostic lines Date: Thu, 26 Nov 2020 23:53:59 +0000 [thread overview] Message-ID: <bug-98021-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98021 Bug ID: 98021 Summary: #warning issues redundant diagnostic lines Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: eggert at cs dot ucla.edu Target Milestone: --- I ran into this problem when building something from Gnulib. For the following program foo.c: #warning "GCC might issue a bogus -Wreturn-local-addr warning here." #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." The command 'gcc -S foo.c' issues the following diagnostics, which are too repetitive: foo.c:1:2: warning: #warning "GCC might issue a bogus -Wreturn-local-addr warning here." [-Wcpp] 1 | #warning "GCC might issue a bogus -Wreturn-local-addr warning here." | ^~~~~~~ foo.c:2:2: warning: #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." [-Wcpp] 2 | #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." | ^~~~~~~ GCC should simply output something like this instead: foo.c:1:2: warning: GCC might issue a bogus -Wreturn-local-addr warning here. [-Wcpp] foo.c:2:2: warning: See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>. [-Wcpp]
next reply other threads:[~2020-11-26 23:53 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-26 23:53 eggert at cs dot ucla.edu [this message] 2020-11-27 0:03 ` [Bug preprocessor/98021] " pinskia at gcc dot gnu.org 2020-11-27 2:14 ` eggert at cs dot ucla.edu 2020-11-27 5:34 ` egallager at gcc dot gnu.org 2020-11-27 7:36 ` rguenth at gcc dot gnu.org 2020-11-27 11:18 ` schwab@linux-m68k.org 2020-11-27 11:54 ` schwab@linux-m68k.org 2020-11-28 1:30 ` eggert at cs dot ucla.edu 2020-11-28 8:11 ` schwab@linux-m68k.org 2020-11-28 17:28 ` eggert at cs dot ucla.edu 2020-11-28 17:52 ` schwab@linux-m68k.org 2020-11-28 18:54 ` eggert at cs dot ucla.edu 2020-11-28 19:45 ` schwab@linux-m68k.org 2020-11-28 20:29 ` eggert at cs dot ucla.edu 2020-11-28 21:06 ` schwab@linux-m68k.org 2020-11-29 1:23 ` eggert at cs dot ucla.edu 2020-11-29 8:09 ` schwab@linux-m68k.org 2021-02-10 20:37 ` 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-98021-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).