Red Hat Bugzilla – Bug 159445
gcc 4.0.0-9 fails with C++ errors where 4.0.0-8 succeeds
Last modified: 2007-11-30 17:11:07 EST
gcc-4.0.0-9 fails with many C++ errors for "amarok" from Fedora Extras CVS (FC-4
branch, tag amarok-1_2_4-5_fc4) which compiles fine with gcc-4.0.0-8.
Installation is Fedora Core 4 Development (Rawhide) with only gcc/libstdc++ and
a few dependencies updated for gcc-4.0.0-9.
Build log for last version that built fine:
A few hours later it failed to build:
When I saw the new build failure, I thought that the Fedora Extras buildsys had
updated to gcc-4.0.0-9. Indeed, I'm able to reproduce the compilation failures
with gcc-4.0.0-9 and a local machine.
Can you please attach preprocessed source of one of the files that used to
compile and now do not?
Created attachment 115104 [details]
gzipped preprocessed amarok/src/collectiondb.ii
That looks to be buggy amarok source code. Say
friend class CollectionView;
in a class does not serve as a forward class declaration. Either class
CollectionView must be defined first, or there needs to be
class CollectionView; somewhere above it.
See http://gcc.gnu.org/PR1016 for details.
It's news to me that apparently it was actually possible to compile broken C++
code like that for some time. [Stroustrup clearly says that a friend declaration
does not introduce a name into enclosing scope.]