"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
"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
"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
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
; 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
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
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
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,
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
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
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
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
t code doesn't crash.
--
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
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:
15 matches
Mail list logo