public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55671] New: -Wconversion fails to warn for sign-conversion
@ 2012-12-13  8:46 loose at astron dot nl
  2012-12-13 10:34 ` [Bug c++/55671] " paolo.carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: loose at astron dot nl @ 2012-12-13  8:46 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55671
           Summary: -Wconversion fails to warn for sign-conversion
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: loose@astron.nl


g++ doesn't warn about the following statement when using -Wconversion, whereas
gcc does.

$ cat Wconversion-bug.c 
unsigned i = -1;

$ g++ -Wconversion -c Wconversion-bug.c
[no output]

$ gcc -Wconversion -c Wconversion-bug.c 
Wconversion-bug.c:1:1: warning: negative integer implicitly converted to
unsigned type [-Wsign-conversion]

$ g++ --version
g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


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

end of thread, other threads:[~2012-12-13 23:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-13  8:46 [Bug c++/55671] New: -Wconversion fails to warn for sign-conversion loose at astron dot nl
2012-12-13 10:34 ` [Bug c++/55671] " paolo.carlini at oracle dot com
2012-12-13 10:36 ` redi at gcc dot gnu.org
2012-12-13 10:38 ` redi at gcc dot gnu.org
2012-12-13 10:42 ` paolo.carlini at oracle dot com
2012-12-13 11:10 ` loose at astron dot nl
2012-12-13 11:26 ` redi at gcc dot gnu.org
2012-12-13 11:29 ` paolo.carlini at oracle dot com
2012-12-13 12:03 ` loose at astron dot nl
2012-12-13 13:25 ` manu at gcc dot gnu.org
2012-12-13 23:30 ` paolo.carlini at oracle dot com

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