This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/28488] incorrect warning says signed and unsigned type in conditional expression



------- Comment #5 from gurganbl at rose-hulman dot edu  2006-07-26 11:42 -------
That would be a problem in assignment, not in the conditional. Additionally, if
I do unsigned int baz = 0;
signed int bar = -1;
baz = bar;

I get no warning. I agree with what you say about there being a problem and
what the problem is, but it should give the same warning as for the above code.
Currently, the ?: syntax gives a misleading warning since the problem is not in
the conditional but in the assignment and strictly having the assignment
problem is not generating a warning.


-- 

gurganbl at rose-hulman dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]