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__ \
({
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
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
3 matches
Mail list logo