[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-25 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 --- Comment #9 from Zhendong Su --- (In reply to Marc Glisse from comment #8) > I think Andrew's point is that we might have: > ... Thanks for your explanation Marc. I think I see the point now, although the rational still feels a bit convoluted

[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-25 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 --- Comment #8 from Marc Glisse --- I think Andrew's point is that we might have: #if T_IS_UNSIGNED typedef unsigned T; #else typedef int T; #endif int f(T,T); and thus the following: T_IS_UNSIGNED || f(a,b) can be used as a short version f

[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-24 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 --- Comment #7 from Zhendong Su --- Andrew, this actually feels to me more like a static type checking issue, i.e., whether the code is dead or not isn't all that relevant here. The important thing is that the function fn1 takes two unsigned int's

[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-24 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 --- Comment #6 from Andrew Pinski --- (In reply to Chengnian Sun from comment #5) > (In reply to Andrew Pinski from comment #4) > > (In reply to Chengnian Sun from comment #3) > > > (In reply to Andrew Pinski from comment #1) > > > > IIRC this was

[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-24 Thread chengniansun at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 --- Comment #5 from Chengnian Sun --- (In reply to Andrew Pinski from comment #4) > (In reply to Chengnian Sun from comment #3) > > (In reply to Andrew Pinski from comment #1) > > > IIRC this was done so that code which uses macros and have condit

[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-24 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 --- Comment #4 from Andrew Pinski --- (In reply to Chengnian Sun from comment #3) > (In reply to Andrew Pinski from comment #1) > > IIRC this was done so that code which uses macros and have conditional code > > like: > > > > MACRO1 || fn1(a, b)

[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-24 Thread chengniansun at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 --- Comment #3 from Chengnian Sun --- (In reply to Andrew Pinski from comment #1) > IIRC this was done so that code which uses macros and have conditional code > like: > > MACRO1 || fn1(a, b) Sorry, I do not understand. Can you elaborate more? W

[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-24 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/59939] No warning on signedness changes caused by implicit conversion

2014-01-24 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59939 --- Comment #1 from Andrew Pinski --- IIRC this was done so that code which uses macros and have conditional code like: MACRO1 || fn1(a, b)