|
From: | Paul Miller |
Subject: | Re: [Openexr-devel] Compiling with gcc4.0.1 - compilation error andfix |
Date: | Wed, 20 Jul 2005 09:09:01 -0500 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
Florian Kainz wrote:
The proposed fix for exrmaketiled is harmless one way or the other, and changing the code won't create a problem. However, I still maintain that there is a bug in gcc 4.0.1 that should be reported. Section 11.4, clause 2 (page 180) of ISO/IEC 14882 contains two code examples. Here's one of them: class X { enum { a = 100; } friend class Y; }; class Y { int v[X::a]; // OK, Y is a friend of X }; ... Note that there is no forward declaration of Y before X. Does gcc 4.0.1 give an error message for the example above?
This is a different situation than trying to reference Y in X. A friend declaration is different from a usage/containment declaration.
So, to put a pointer to Y in X, you would need to declare "class Y" above X: class Y; class X { class Y *y_ptr; ...
Florian _______________________________________________ Openexr-devel mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/openexr-devel
-- Paul Miller | address@hidden | www.fxtech.com | Got Tivo?
[Prev in Thread] | Current Thread | [Next in Thread] |