public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/108310] New: Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it
@ 2023-01-06  3:59 egallager at gcc dot gnu.org
  2023-01-06  4:06 ` [Bug c/108310] " egallager at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: egallager at gcc dot gnu.org @ 2023-01-06  3:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108310

            Bug ID: 108310
           Summary: Some warnings that -Wtraditional-conversion causes to
                    be emitted aren't actually controlled by it
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: diagnostic, easyhack
          Severity: trivial
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: egallager at gcc dot gnu.org
                CC: msebor at gcc dot gnu.org
  Target Milestone: ---

So, I'm having trouble crafting a testcase that properly reproduces this issue,
but let's see if we can do this just by looking at the source: in
gcc/c/c-typeck.cc, starting at line 3464 (as it currently exists), there is a
block of code that emits some warnings from -Wtraditional-conversion:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c/c-typeck.cc;h=e06f052eb46a72d3d50835330c5af975e7c52084;hb=HEAD#l3464
However, instead of being called like:
warning_at (ploc, OPT_Wtraditional_conversion, "");
like the rest of the warnings in the area, these two are just called like:
warning_at (ploc, 0, "");
This means that when the warning actually gets printed, the flag controlling
it, [-Wtraditional-conversion], isn't actually printed alongside it. `git
blame` says that Martin Sebor was the last person to touch this code in
r9-4484-g550dfbdcf6d93d. I might be able to fix this myself if someone can
confirm for me that this is an actual mistake that ought to be fixed (of
course, anyone else is welcome to fix it first!).

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-08-25 13:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06  3:59 [Bug c/108310] New: Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it egallager at gcc dot gnu.org
2023-01-06  4:06 ` [Bug c/108310] " egallager at gcc dot gnu.org
2023-01-06  4:16 ` egallager at gcc dot gnu.org
2023-01-12 14:59 ` egallager at gcc dot gnu.org
2023-01-12 15:13 ` redi at gcc dot gnu.org
2023-08-07 22:28 ` egallager at gcc dot gnu.org
2023-08-25 13:34 ` egallager at gcc dot gnu.org

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).