This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
- From: "karx11erx at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 20 Jun 2008 12:33:05 -0000
- Subject: [Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
- References: <bug-36576-16337@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from karx11erx at hotmail dot com 2008-06-20 12:33 -------
(In reply to comment #9)
> (In reply to comment #8)
> > > Because gcc 4.1 throws some errors on our
> > > code that works flawlessly with MS compilers and gcc 3, and that absolutely do
> > > not seem to be justified, and I wanted to make sure this problem is either
> > > fixed or still present in the latest gcc release in order to avoid remarks like
> > > "update to the latest compiler version".
> >
> > Have you read the changes pages?
> > Start with http://gcc.gnu.org/gcc-3.4/changes.html and then read
> > http://gcc.gnu.org/gcc-4.0/changes.html and then
> > http://gcc.gnu.org/gcc-4.1/changes.html . Most likely your C++ code is not
> > really standard C++ after all.
> >
>
> Which rule is forbidding this:
>
> template <class T> class CTest {
> struct test {
> int i;
> } test *testptr;
> };
>
(In reply to comment #8)
> > Because gcc 4.1 throws some errors on our
> > code that works flawlessly with MS compilers and gcc 3, and that absolutely do
> > not seem to be justified, and I wanted to make sure this problem is either
> > fixed or still present in the latest gcc release in order to avoid remarks like
> > "update to the latest compiler version".
>
> Have you read the changes pages?
> Start with http://gcc.gnu.org/gcc-3.4/changes.html and then read
> http://gcc.gnu.org/gcc-4.0/changes.html and then
> http://gcc.gnu.org/gcc-4.1/changes.html . Most likely your C++ code is not
> really standard C++ after all.
>
There is also no ambiguity in this:
template<class T> CBase<T>
{
protected:
T *i;
};
template<class T> CDerived : public CBase<T>
{
inline T* foo (void) { return const_cast <T*> i; }
}
Yet it only compiles if it is defined like this:
template<class T> CDerived : public CBase<T>
{
inline T* foo (void) { return const_cast<T*> this->i; }
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576