Re: gcc 4.3.0, -Wconversion: assignment-by operators for shorter types

2008-05-27 Thread Andriy Gapon
‘int main()’: test-conv.cc:8: warning: conversion to ‘short int’ from ‘int’ may alter its value test-conv.cc:9: warning: conversion to ‘short int’ from ‘int’ may alter its value $ g++ -dumpversion 4.3.0 2008/5/26 Andriy Gapon <[EMAIL PROTECTED]>: If I write something like the following: ui

Re: gcc 4.3.0, -Wconversion: assignment-by operators for shorter types

2008-05-27 Thread Andriy Gapon
on 27/05/2008 21:48 Andrew Pinski said the following: On Tue, May 27, 2008 at 11:29 AM, Andriy Gapon <[EMAIL PROTECTED]> wrote: Should I still open a new one or maybe it's better to follow up on one of those two. And just in case, here's a better description of wha

Re: gcc 4.3.0, -Wconversion: assignment-by operators for shorter types

2008-05-27 Thread Andriy Gapon
on 27/05/2008 22:00 Andrew Pinski said the following: On Tue, May 27, 2008 at 11:56 AM, Andriy Gapon <[EMAIL PROTECTED]> wrote: 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 co

gcc 4.3.0, -Wconversion against -O1

2008-09-19 Thread Andriy Gapon
ntohs(x) __bswap_16 (x) # define htonl(x) __bswap_32 (x) # define htons(x) __bswap_16 (x) # endif # endif #endif -- Andriy Gapon

gcc 4.3.0, -Wconversion and conditional operator

2008-09-19 Thread Andriy Gapon
r 1) in the condition, then the code compiles. I think gcc should be smarter here. -- Andriy Gapon