public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55077] New: implement and enable by default -Wliteral-conversion
@ 2012-10-25 23:52 manu at gcc dot gnu.org
  2012-10-27 19:48 ` [Bug c++/55077] " manu at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: manu at gcc dot gnu.org @ 2012-10-25 23:52 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55077

             Bug #: 55077
           Summary: implement and enable by default -Wliteral-conversion
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: manu@gcc.gnu.org


>From clang:

test.cc:4:23: warning: implicit conversion from 'double' to 'int' changes value
from 3.1415926 to 3 [-Wliteral-conversion]
 static const int c = 3.1415926;
                  ~   ^~~~~~~~~

This should be fairly easy, since we warn already with -Wconversion:

1) Change the warning flag.
2) Show the values before/after.


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

end of thread, other threads:[~2023-05-31  2:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-25 23:52 [Bug c++/55077] New: implement and enable by default -Wliteral-conversion manu at gcc dot gnu.org
2012-10-27 19:48 ` [Bug c++/55077] " manu at gcc dot gnu.org
2012-10-28 18:02 ` joseph at codesourcery dot com
2013-11-10  6:37 ` pinskia at gcc dot gnu.org
2022-04-14 15:55 ` dcb314 at hotmail dot com
2023-05-31  2:16 ` 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).