This is the mail archive of the
mailing list for the GCC project.
Re: gcc 4.3.0, -Wconversion: assignment-by operators for shorter types
on 27/05/2008 21:48 Andrew Pinski said the following:
On Tue, May 27, 2008 at 11:29 AM, Andriy Gapon <email@example.com> wrote:
Should I still open a new one or maybe it's better to follow up on one of
And just in case, here's a better description of what I am reporting
(demonstration by comparison):
The warnings with the below code is correct because of how C/C++
define promotions. It is ^/|/& where the warnings are not correct and
should be solved.
Thank you for the explanation! I didn't realize the difference.
OTOH, do you think that those arithmetic warnings are practical (as
opposed to being correct)?
I understand the rules of the language(s) but honestly I expect the same
behavior for short and for int in expressions like those. And in cases
where I don't expect it I'll be careful about result type anyway.