Hi,
I forgot to mention that it was OpenBSD/sparc
On my OpenBSD/x86 computer however I get the same problem and it has gcc 4.2
Thus it appears to be an OpenBSD problem? I reconfigured and made clean. I
don't see any apparent OS difference there.
This may be an OpenBSD libc problem. Can you check how NULL is defined? I
fixed a bug in FreeBSD libc a couple of years back that would cause this, and
they may have inherited the same bug from some common ancestor. In C, the
definition of NULL is usually (void*)0, but in C++ it is supposed to be 0
(except that 0 is an int so on LP64 this causes stack smashing on variadic
functions, but I digress), and it's possible that they just #define it to 0 for
C and C++. GCC provides a builtin __null which works better - it's a special
literal that is a 0 value in any pointer type.