Bug#530949: gcc-4.4: warns about idiomatic use of Berkeley sockets

2009-05-29 Thread Philip Martin
"brian m. carlson" writes: > I'm aware of that. My opinion remains the same: GCC should generate > POSIX-conformant code without warnings with -O2 -Wall. That can be > achieved by disabling -fstrict-aliasing at -O2, by patching glibc to > allow aliasing of the relevant types, by special-casing

Bug#530949: gcc-4.4: warns about idiomatic use of Berkeley sockets

2009-05-29 Thread Philip Martin
"brian m. carlson" writes: > I expect that when used on a POSIX system (at least in strict POSIX mode > or when invoked as "c99"), gcc-4.4 neither warns nor generates code > contrary to POSIX with -O2 -Wall. You can add -fno-strict-aliasing which will disable the optimisation and thus prevent th

Bug#530949: gcc-4.4: warns about idiomatic use of Berkeley sockets

2009-05-29 Thread Philip Martin
"brian m. carlson" writes: > This is a standard and idiomatic usage of Berkeley sockets. AFAIK, > there is no other way to work with the sockets interface, and even if > there were, this method is extremely common, not to mention sanctioned > by POSIX. It may be idiomatic but it's not strictly

Bug#392880: gcc-4.1: off-by-one error for string initialiser warnings

2006-10-14 Thread Philip Martin
not too long, section 6.7.8/15 of the ISO C standard states: "Successive characters of the character literal (including the terminating null character if there is room or if the array is of unknown size) initialize the elements of the array" So string3 is correctly initiali

Re: g++ template problem

2006-01-30 Thread Philip Martin
; before 'mi' > mmap2::const_iterator mi2; // error: expected `;' before 'mi2' > } > }; You need to use: typename mmap::const_iterator mi; typename mmap2::const_iterator mi2; See the discussion about "dependent names

Bug#312362: g++-4.0: friend is ineffective in namespace

2005-06-07 Thread Philip Martin
ke namespace ns { class A; }; ns::A operator+(const ns::A& x, const ns::A& y); class ns::A { public: A(int j) { i = j; }; private: int i; friend A (::operator+)(const A& x, const A& y); }; using namespace ns; A operator+(const A& x, const A& y

Bug#291641: libtool: resolves dependencies to the install tree rather than the build tree

2005-02-01 Thread Philip Martin
Scott James Remnant <[EMAIL PROTECTED]> writes: > On Sat, 2005-01-22 at 01:01 +0000, Philip Martin wrote: > >> I find the libtool inter-library documentation confusing, but I think this >> is a Debian bug simply because Debian's libtool fails and GNU's libtool

Bug#291641: libtool: resolves dependencies to the install tree rather than the build tree

2005-01-23 Thread Philip Martin
c should > honour the RPATH of that shared library. I'm not a compiler expert, but does gcc ever see that information? I think gcc, via collect2, invokes the ld linker to do the link and so gcc never sees any of the NEEDED or RPATH data. The ld linker is part of the binutils package,

Bug#291641: libtool: resolves dependencies to the install tree rather than the build tree

2005-01-22 Thread Philip Martin
Scott James Remnant <[EMAIL PROTECTED]> writes: > On Sat, 2005-01-22 at 01:01 +0000, Philip Martin wrote: > >> A recent change to the Subversion source (revision 12801) introduced >> new functions into the three dependent libraries, and made >> libsvn_ra-1.so

Bug#249691: gcc-3.4: false compiler error (templated base, templated child, private member)

2004-05-20 Thread Philip Martin
at this to be the correct behavior? I think it's 14.6/8 "When looking for the declaration of a name used in a template definition, the usual lookup rules (3.4.1, 3.4.2) are used for nondependent names" -- Philip Martin

Bug#249691: gcc-3.4: false compiler error (templated base, templated child, private member)

2004-05-20 Thread Philip Martin
c.gnu.org/gcc-3.4/changes.html "In a template definition, unqualified names will no longer find members of a dependent base" You need to refer to "this->f" rather than the unqualified "f". -- Philip Martin

Bug#244894: libstdc++5-3.3-dev: const_reverse_iterators seem to be broken

2004-04-20 Thread Philip Martin
This is currently an open issue with the C++ standard library, see http://std.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#280 -- Philip Martin

Bug#185243: libstdc++3-dev: rope segfaults under heavy load

2003-03-18 Thread Philip Martin
t code doesn't crash. -- Philip Martin

Bug#185243: libstdc++3-dev: rope segfaults under heavy load

2003-03-18 Thread Philip Martin
> unsigned int rand(unsigned int max) { > unsigned int rval = (unsigned int)(((double)max)*rand()/(RAND_MAX)); > if (rval == max) > return max-1; > } This function returns no value if rval != max so the behaviour is undefined. -- Philip Martin

Bug#151065: g++: destructor called twice

2002-06-28 Thread Philip Martin
The segmentation fault is a bug in your code, not in gcc. A temporary is getting constructed, and you are using the compiler generated assignment operator, so you get two instances deallocating the same memory. Try adding a private operator= class ScalarVector : public Vector { private: