Bug#561249: Spurious warning with -Wconversion (uint16_t/htons) in -O2 mode

2009-12-15 Thread Eric Estievenart
Package: g++-4.4 Version: 4.4.2-5 Severity: normal The bug may be rather in libc6-dev, which defines: htons to __bswap16 if optimize && little endian, and __bswap16 in bits/byteswap.h # define __bswap_16(x) \ (__extension__ \ ({

Bug#561249: g++-4.4: Spurious warning with -Wconversion (uint16_t/htons) in -O2 mode

2009-12-15 Thread Eric Estievenart
Package: g++-4.4 Version: 4.4.2-5 Severity: normal Consider following code: -- test.cpp - #include void test() { uint16_t s = 123; // No warning expected here uint16_t swapped = htons( s ); } -- g++-4.4 -Wconversion -Werror -c test.cpp => no er

Bug#488884: g++-4.3: Option -O{1,2,3} generates spurious warnings with -Wconversion

2008-07-01 Thread Eric Estievenart
Package: g++-4.3 Version: 4.3.1-4 Severity: normal The following file compiles without warning with: $ g++ -Wconversion -c htons.cpp but generates a warning with : $ g++ -O2 -Wconversion -c htons.cpp (also with -O1 or -O3) This basically generates spurious warnings or even prevents building if