Bug#187599: acknowledged by developer (Not a bug: Cannot subtract from streampos)

2003-11-17 Thread Bart Samwel
There exists a conversion from streampos to streamoff, so that the expression can be interpreted as =09(streamoff)pos - 1 or =09pos.operator-(1) In both cases conversions are used (from streampos to streamoff, and from int to long). The ambiguouity can be resolved be writing =09pos - 1L Probably th

Bug#187599: Cannot subtract from streampos

2003-04-04 Thread Bart Samwel
Package: g++ Version: 3.2.3-20030331 If I have the following code: #include int foo() { std::streampos pos; pos - 1; } When I compile this with "g++ -Wall test.cc", this gives me: test.cc: In function `int foo()': test.cc:6: ISO C++ says that `std::fpos<_StateT> std::fpos<_StateT>::operator

Bug#158704: gcc: gcc compiles incorrect loop

2002-08-29 Thread Bart Samwel
Carlos O'Donell wrote: int main() { int a = 0; while (a == 0) { a = 1; } while (1) /* Do nothing */ ; return 0; } The issue is a rather pedantic one. Should an error be generated by the compiler indicating that 'return 0' can never be reached? Not an error because the code is in fact c

Bug#158704: gcc: gcc compiles incorrect loop

2002-08-29 Thread Bart Samwel
le (1) /* Do nothing */ ; return 0; } Regards, Bart Samwel Eugene Morozov wrote: Package: gcc Version: 2:2.95.4-16 Severity: normal gcc compiles following program without emitting warning even with -Wall -ansi -pedantic. gcc-3.2 also compiles this program. int main() { int a = 0; while (a