This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimzer bug [?]
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Subject: Re: optimzer bug [?]
- From: "John F. Dumas" <jdumas at locutus dot kingwoodcable dot com>
- Date: Sun, 5 Dec 1999 16:35:20 -0600 (EST)
- cc: gcc-bugs at gcc dot gnu dot org
On Sun, 5 Dec 1999, Martin v. Loewis wrote:
> > When I compile the above code with g++ 2.95 on linux without optimization
> > it compiles/works fine but when I compile with optimization I get:
>
> Thanks for your bug report. This is fixed in mainline compiler (2.96
> 19991202 (experimental)).
>
> Regards,
> Martin
Right on, thanks for the response - I did have one other wierd problem,
the following code:
#include <iostream.h>
class Test
{
public:
Test() { cout << "Test()" << endl; }
~Test() { cout << "~Test()" << endl; }
private:
static void operator delete(void *ptr);
};
int main()
{
Test *t = new Test();
return(0);
}
does not compile with 2.95, it says:
test.cpp: In function `int main()':
test.cpp:10: `static void Test::operator delete(void *)' is private
test.cpp:15: within this context
the above code does compile with other c++ compilers (though no other g++
variants I know of). Odder still, the above code will compile if I add
'friend' to the beginning of 'static void operator delete(void *ptr);'
Is this also a bug?
//***********************************************************************
// John F. Dumas Contract Software Developer
// 5311 Jasper Grove Unix, Win32, Web - C/C++, Java, CGI Scripting
// Kingwood TX, 77345 jdumas[at]locutus[dot]kingwoodcable[dot]com
// (281)-360-9264 http://locutus.kingwoodcable.com/
//***********************************************************************