This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: internal compiler error
> The errors you mention are thr result of the blank lines in the code, with
> thr result that preprocessor does not dee the complete define statement.
> The minor adaptions I mentioned are the removal of these blank lines. The
> compiler I used was the one that ships with RedHat 6.0. I hope this helps
> you any further.
I admit I don't understand. In the version of utilitym.h that you
send, the first error is around the line
template <class From>
class UniversalStorage
{
// Static checks for mismatched parameter type:
typedef char assertSize [sizeof (from) == SIZE];
// will not compile if sizeof 'From' is wrong
if (const Base* assertInheritence = &from)
0;// will not compile if 'From' is not : public Base
new (itsStorage) From (from); // placement new & copy ctor
};
This is plain wrong, you cannot have an if-statement in a class. You
must write a function or method to put statements into it; this is
just not valid C++.
Why are you saying the preprocessor would have to do anything here?
Also, in what message did you mention a minor adaption? All I have is
in
http://gcc.gnu.org/ml/gcc-bugs/2000-03/msg00308.html
Regards,
Martin
P.S. Please CC: gcc-bugs@gcc.gnu.org