mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 21:25:32 +08:00
g++.dg/lookup/exception1.C: New test.
From-SVN: r60763
This commit is contained in:
parent
cd2801fb0b
commit
faa75e896f
@ -1,5 +1,7 @@
|
||||
2003-01-01 Nathanael Nerode <neroden@gcc.gnu.org>
|
||||
|
||||
g++.dg/lookup/exception1.C: New test.
|
||||
|
||||
g++.dg/lookup/template1.C: New test.
|
||||
|
||||
g++.dg/parse/namespace2.C: New test.
|
||||
|
33
gcc/testsuite/g++.dg/lookup/exception1.C
Normal file
33
gcc/testsuite/g++.dg/lookup/exception1.C
Normal file
@ -0,0 +1,33 @@
|
||||
/* PR 2743 */
|
||||
/* {dg-do compile} */
|
||||
|
||||
namespace ns {
|
||||
class Exception
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
namespace ns
|
||||
{
|
||||
class Test {
|
||||
public:
|
||||
inline Test() throw( Exception );
|
||||
inline Test(int n ) throw( Exception );
|
||||
private:
|
||||
int i;
|
||||
};
|
||||
}
|
||||
|
||||
// This line used to fail because Exception wasn't looked up in the
|
||||
// right scope.
|
||||
ns::Test::Test() throw( Exception ) : i( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
ns::Test::Test( int n ) throw( Exception ) : i( n )
|
||||
{
|
||||
}
|
||||
|
||||
int main(int argc, char* argv) {
|
||||
ns::Test test;
|
||||
}
|
Loading…
Reference in New Issue
Block a user