Bug 11039 - [3.3 regression] Bad interaction between implicit typename deprecation and friendship
Summary: [3.3 regression] Bad interaction between implicit typename deprecation and fr...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3
: P1 critical
Target Milestone: 3.3.1
Assignee: Kriang Lerdsuwanakij
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-30 19:37 UTC by Wolfgang Bangerth
Modified: 2003-06-08 10:53 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-05-31 17:54:42


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Bangerth 2003-05-30 19:37:33 UTC
This doesn't compile without a warning on 3.3 (and 3.2.3 FWIW):
--------------------------------
template <typename T> struct X {
    struct Y {
	struct Z {};
    };
    
    friend struct Y::Z;
};
--------------------------------

g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
x.cc:6: warning: `X<T>::Y::Z' is implicitly a typename
x.cc:6: warning: implicit typename is deprecated, please see the documentation
   for details

That's bogus, of course. It's particularly bad, since this warning
cannot be switched off and thus makes use of -Werror unusable on some
code :-( Since it compiled just fine without problems prior to the
implicit typename deprecation, I rate this as a regression.

It works just fine on mainline.

Kriang, would you mind taking a look?

W.

PS: Yes, I know the friend declaration isn't necessary. It's just,
some other compilers don't :-((
Comment 1 Kriang Lerdsuwanakij 2003-06-08 10:53:26 UTC
Fixed in 3.3 branch.