public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26167]  New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
@ 2006-02-08  1:10 kristian dot hermansen at gmail dot com
  2006-02-08 11:36 ` [Bug c++/26167] " rguenth at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: kristian dot hermansen at gmail dot com @ 2006-02-08  1:10 UTC (permalink / raw)
  To: gcc-bugs

gcc reports the signedness probelm correctly, but g++ does not. See below for a
demonstration:

$ cat signedness.cpp
#include <iostream>
using namespace std;

void foo (unsigned int a){
cout << a << endl;
}

int main(){
int b = -1;
foo (b);
return 0;
}

$ g++ -Wall -Wconversion -o signedness signedness.cpp

### NO WARNINGS ARE OUTPUT HERE FROM g++ ###

$ g++ -v -save-temps -Wall -Wconversion -o signedness signedness.cpp Using
built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--with-gxx-include-dir=/usr/include/c++/4.0.2 --enable-shared
--with-system-zlib --libexecdir=/usr/lib --enable-nls
--without-included-gettext --enable-threads=posix --program-suffix=-4.0
--enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
--enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
 /usr/lib/gcc/i486-linux-gnu/4.0.2/cc1plus -E -quiet -v -D_GNU_SOURCE
signedness.cpp -mtune=i486 -Wall -Wconversion -fpch-preprocess -o signedness.ii
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu" ignoring
nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.0.2
 /usr/include/c++/4.0.2/i486-linux-gnu
 /usr/include/c++/4.0.2/backward
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.0.2/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux-gnu/4.0.2/cc1plus -fpreprocessed signedness.ii -quiet
-dumpbase signedness.cpp -mtune=i486 -auxbase signedness -Wall -Wconversion
-version -o signedness.s
GNU C++ version 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
(i486-linux-gnu)
        compiled by GNU C version 4.0.2 20050808 (prerelease) (Ubuntu
4.0.1-4ubuntu9).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128479
 as -V -Qy --32 -o signedness.o signedness.s
GNU assembler version 2.16.1 (i486-linux-gnu) using BFD version 2.16.1 Debian
GNU/Linux
 /usr/lib/gcc/i486-linux-gnu/4.0.2/collect2 --eh-frame-hdr -m elf_i386
-dynamic-linker /lib/ld-linux.so.2 -o signedness
/usr/lib/gcc/i486-linux-gnu/4.0.2/../../../../lib/crt1.o
/usr/lib/gcc/i486-linux-gnu/4.0.2/../../../../lib/crti.o
/usr/lib/gcc/i486-linux-gnu/4.0.2/crtbegin.o
-L/usr/lib/gcc/i486-linux-gnu/4.0.2 -L/usr/lib/gcc/i486-linux-gnu/4.0.2
-L/usr/lib/gcc/i486-linux-gnu/4.0.2/../../../../lib
-L/usr/lib/gcc/i486-linux-gnu/4.0.2/../../.. -L/lib/../lib -L/usr/lib/../lib
signedness.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib/gcc/i486-linux-gnu/4.0.2/crtend.o
/usr/lib/gcc/i486-linux-gnu/4.0.2/../../../../lib/crtn.o
--
Kristian Hermansen


-- 
           Summary: -Wconversion fails to detect signedness conversion from
                    int to unsigned int in fuction call
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kristian dot hermansen at gmail dot com


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
@ 2006-02-08 11:36 ` rguenth at gcc dot gnu dot org
  2006-02-08 14:46 ` mueller at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-08 11:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2006-02-08 11:36 -------
Confirmed.  The C frontend warns about this.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-08 11:36:49
               date|                            |


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
  2006-02-08 11:36 ` [Bug c++/26167] " rguenth at gcc dot gnu dot org
@ 2006-02-08 14:46 ` mueller at gcc dot gnu dot org
  2006-02-08 15:32 ` gdr at integrable-solutions dot net
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mueller at gcc dot gnu dot org @ 2006-02-08 14:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mueller at gcc dot gnu dot org  2006-02-08 14:46 -------
ugh, that warning isn't even in -Wextra. 


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
  2006-02-08 11:36 ` [Bug c++/26167] " rguenth at gcc dot gnu dot org
  2006-02-08 14:46 ` mueller at gcc dot gnu dot org
@ 2006-02-08 15:32 ` gdr at integrable-solutions dot net
  2006-02-26  6:40 ` kristian dot hermansen at gmail dot com
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gdr at integrable-solutions dot net @ 2006-02-08 15:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from gdr at integrable-solutions dot net  2006-02-08 15:32 -------
Subject: Re:  -Wconversion fails to detect signedness conversion from int to
unsigned int in fuction call

"mueller at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| ugh, that warning isn't even in -Wextra. 

I'll be happy to review patch to make the warning work in the C++
front-end.  I'll do it myself if nobody feels like tackling it :-)

-- Gaby


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (2 preceding siblings ...)
  2006-02-08 15:32 ` gdr at integrable-solutions dot net
@ 2006-02-26  6:40 ` kristian dot hermansen at gmail dot com
  2006-08-21  5:41 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: kristian dot hermansen at gmail dot com @ 2006-02-26  6:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kristian dot hermansen at gmail dot com  2006-02-26 05:56 -------
Go ahead and tackle it.  I'm not going to fix this myself...
--
Kristian Hermansen


-- 

kristian dot hermansen at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (3 preceding siblings ...)
  2006-02-26  6:40 ` kristian dot hermansen at gmail dot com
@ 2006-08-21  5:41 ` pinskia at gcc dot gnu dot org
  2006-09-16  1:08 ` lopezibanez at gmail dot com
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-21  5:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-08-21 05:41 -------
This should never have been in waiting.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
   Last reconfirmed|2006-02-08 11:36:49         |2006-08-21 05:41:07
               date|                            |


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (4 preceding siblings ...)
  2006-08-21  5:41 ` pinskia at gcc dot gnu dot org
@ 2006-09-16  1:08 ` lopezibanez at gmail dot com
  2006-09-17 18:37 ` kristian dot hermansen at gmail dot com
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: lopezibanez at gmail dot com @ 2006-09-16  1:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from lopezibanez at gmail dot com  2006-09-16 01:08 -------
In which way gcc reports the problem correctly? What gcc currently reports is
that if the prototype were missing the value would be passed as a signed int.
It is not warning you about the conversion, it warns you about the effect of
having a prototype.

If you mean that gcc (and g++) should warn that a signed variable is passed to
a function that expects an unsigned variable, then when using the -Wcoercion
flag (provided by the Wcoercion project [*]), both cc1 and cc1plus report:

pr26167.cpp:10: warning: coercion to 'unsigned int' from 'int' may alter its
value

[*] http://gcc.gnu.org/wiki/Wcoercion


-- 

lopezibanez at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lopezibanez at gmail dot com


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (5 preceding siblings ...)
  2006-09-16  1:08 ` lopezibanez at gmail dot com
@ 2006-09-17 18:37 ` kristian dot hermansen at gmail dot com
  2006-09-17 18:39 ` kristian dot hermansen at gmail dot com
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: kristian dot hermansen at gmail dot com @ 2006-09-17 18:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from kristian dot hermansen at gmail dot com  2006-09-17 18:37 -------
Will gcc/g++ integrate the Wcoercion project's solution?  It seems to have been
sponsored by Google's Summer of Code 2006.  Maybe it will be tested/included
soon?  Here is the developer: lopezibanez@gmail.com

Should we contact him?  -Wcoercion would be very useful for warning about many
security flaws in software...


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (6 preceding siblings ...)
  2006-09-17 18:37 ` kristian dot hermansen at gmail dot com
@ 2006-09-17 18:39 ` kristian dot hermansen at gmail dot com
  2006-09-17 20:31 ` tbm at cyrius dot com
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: kristian dot hermansen at gmail dot com @ 2006-09-17 18:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from kristian dot hermansen at gmail dot com  2006-09-17 18:39 -------
Sorry, I didn't notice at first that this was you!!!  Will you integrate
Wcoercion into gcc/g++ soon or will it always remain a side project?  It would
be nice to see such a warning come from using -Wall.


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (7 preceding siblings ...)
  2006-09-17 18:39 ` kristian dot hermansen at gmail dot com
@ 2006-09-17 20:31 ` tbm at cyrius dot com
  2006-09-18  8:16 ` lopezibanez at gmail dot com
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: tbm at cyrius dot com @ 2006-09-17 20:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from tbm at cyrius dot com  2006-09-17 20:31 -------
It's aiming for inclusion in GCC 4.3, see
http://gcc.gnu.org/wiki/GCC_4.3_Release_Planning


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (8 preceding siblings ...)
  2006-09-17 20:31 ` tbm at cyrius dot com
@ 2006-09-18  8:16 ` lopezibanez at gmail dot com
  2006-09-18 12:11 ` mueller at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: lopezibanez at gmail dot com @ 2006-09-18  8:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from lopezibanez at gmail dot com  2006-09-18 08:16 -------
Yes, I hope to get it into 4.3. Nonetheless, if you wish to test it, I can add
the patch here.


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (9 preceding siblings ...)
  2006-09-18  8:16 ` lopezibanez at gmail dot com
@ 2006-09-18 12:11 ` mueller at gcc dot gnu dot org
  2006-09-18 12:22 ` lopezibanez at gmail dot com
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mueller at gcc dot gnu dot org @ 2006-09-18 12:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from mueller at gcc dot gnu dot org  2006-09-18 12:11 -------
yes please. Actually I created my own patch for bringing the C++ frontend on
ear with the C frontend, but I didn't submit it because it produced bazillions
of (legal) warnings in the code I usually compile, too many to be useful. 


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (10 preceding siblings ...)
  2006-09-18 12:11 ` mueller at gcc dot gnu dot org
@ 2006-09-18 12:22 ` lopezibanez at gmail dot com
  2006-09-18 12:45 ` lopezibanez at gmail dot com
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: lopezibanez at gmail dot com @ 2006-09-18 12:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from lopezibanez at gmail dot com  2006-09-18 12:22 -------
Created an attachment (id=12291)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12291&action=view)
wcoercion patch r116922

Patch for trunk revision 116922 (bootstrapped and tested on i686-pc-linux-gnu).


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (11 preceding siblings ...)
  2006-09-18 12:22 ` lopezibanez at gmail dot com
@ 2006-09-18 12:45 ` lopezibanez at gmail dot com
  2006-10-16 15:37 ` mueller at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: lopezibanez at gmail dot com @ 2006-09-18 12:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from lopezibanez at gmail dot com  2006-09-18 12:45 -------
(In reply to comment #11)
> yes please. Actually I created my own patch for bringing the C++ frontend on
> ear with the C frontend, but I didn't submit it because it produced bazillions
> of (legal) warnings in the code I usually compile, too many to be useful. 
> 

I would like to take a look to your patch if that is possible.

A few things worth commenting on the wcoercion patch:

1) One of the development goals is to separate the original behaviour of
Wconversion in the C front end from the "other behaviour" of Wconversion
(slightly present on the C front end and pervasive in the C++ front end).
Therefore, Wconversion has been replaced by Wtraditional-conversion and
Wcoercion (the interesting one). The names are tentative, pending discussion by
GCC developers, and likely will change in the future. If you find all this
confusing, please read http://gcc.gnu.org/wiki/Wcoercion#Background. If you
work in the KDE project, it would be interesting (for me) to know your opinion
on how to handle the transition.

2) Wconversion option is not completely deleted by my patch, it still exists
for C++/Fortran/ObjC++ when the behaviour has not been modified and it didn't
conflict with Wtraditional-conversion or Wcoercion. Properly speaking, these
Wconversion warnings should be moved to Wcoercion. However, there is little
point on doing this until there is a definitive decision on the names of the
new options. Thus, to obtain the full set of coercion warnings in C++ you may
need to specify "-Wconversion -Wcoercion" (In short, Wconversion are the ones
that were already there undocumented, Wcoercion are new or modified).

3) There are a few issuess pending the review of GCC developers. For example,
warning messages could be more specific/informative.

4) I don't think we should pollute this bug report further. Thus, feel free to
write me directly. Much better would be to discuss things in public in the gcc
mail list: we may even get the attention of some GCC developer. 


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (12 preceding siblings ...)
  2006-09-18 12:45 ` lopezibanez at gmail dot com
@ 2006-10-16 15:37 ` mueller at gcc dot gnu dot org
  2006-11-24  1:51 ` manu at gcc dot gnu dot org
  2006-11-24  1:56 ` manu at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: mueller at gcc dot gnu dot org @ 2006-10-16 15:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from mueller at gcc dot gnu dot org  2006-10-16 15:37 -------
*** Bug 26298 has been marked as a duplicate of this bug. ***


-- 

mueller at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m dot becker at spider-
                   |                            |software dot net


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (13 preceding siblings ...)
  2006-10-16 15:37 ` mueller at gcc dot gnu dot org
@ 2006-11-24  1:51 ` manu at gcc dot gnu dot org
  2006-11-24  1:56 ` manu at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: manu at gcc dot gnu dot org @ 2006-11-24  1:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from manu at gcc dot gnu dot org  2006-11-24 01:50 -------
Subject: Bug 26167

Author: manu
Date: Fri Nov 24 01:50:33 2006
New Revision: 119143

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119143
Log:
2006-11-24  Manuel Lopez-Ibanez <manu@gcc.gnu.org>

        PR c/2707
        PR c++/26167
        * c-common.c (conversion_warning): New.
        (convert_and_check): Call conversion_warning unless there is an
        overflow warning.
        * doc/invoke.texi (-Wconversion): Update description.

testsuite/

        * gcc.dg/Wconversion-integer.c: New. Supersedes 
        Wconversion-negative-constants.c 
        * gcc.dg/Wconversion-real.c: New.
        * gcc.dg/Wconversion-real-integer.c: New.
        * gcc.dg/Wconversion-negative-constants.c: Deleted.
        * g++.dg/warn/Wconversion1.C: Modified.


Added:
    trunk/gcc/testsuite/gcc.dg/Wconversion-integer.c
    trunk/gcc/testsuite/gcc.dg/Wconversion-real-integer.c
    trunk/gcc/testsuite/gcc.dg/Wconversion-real.c
Removed:
    trunk/gcc/testsuite/gcc.dg/Wconversion-negative-constants.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/doc/invoke.texi
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/warn/Wconversion1.C


-- 


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


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

* [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call
  2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
                   ` (14 preceding siblings ...)
  2006-11-24  1:51 ` manu at gcc dot gnu dot org
@ 2006-11-24  1:56 ` manu at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: manu at gcc dot gnu dot org @ 2006-11-24  1:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from manu at gcc dot gnu dot org  2006-11-24 01:56 -------
Fixed in mainline.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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


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

end of thread, other threads:[~2006-11-24  1:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-08  1:10 [Bug c++/26167] New: -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call kristian dot hermansen at gmail dot com
2006-02-08 11:36 ` [Bug c++/26167] " rguenth at gcc dot gnu dot org
2006-02-08 14:46 ` mueller at gcc dot gnu dot org
2006-02-08 15:32 ` gdr at integrable-solutions dot net
2006-02-26  6:40 ` kristian dot hermansen at gmail dot com
2006-08-21  5:41 ` pinskia at gcc dot gnu dot org
2006-09-16  1:08 ` lopezibanez at gmail dot com
2006-09-17 18:37 ` kristian dot hermansen at gmail dot com
2006-09-17 18:39 ` kristian dot hermansen at gmail dot com
2006-09-17 20:31 ` tbm at cyrius dot com
2006-09-18  8:16 ` lopezibanez at gmail dot com
2006-09-18 12:11 ` mueller at gcc dot gnu dot org
2006-09-18 12:22 ` lopezibanez at gmail dot com
2006-09-18 12:45 ` lopezibanez at gmail dot com
2006-10-16 15:37 ` mueller at gcc dot gnu dot org
2006-11-24  1:51 ` manu at gcc dot gnu dot org
2006-11-24  1:56 ` manu at gcc dot gnu dot 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).