Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
fb2000b2
Commit
fb2000b2
authored
Aug 04, 1999
by
Nathan Sidwell
Committed by
Nathan Sidwell
Aug 04, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* g++.old-deja/g++.eh/spec6.C: Add more tests. Remove XFAILS.
From-SVN: r28495
parent
4cc1d462
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
116 additions
and
16 deletions
+116
-16
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/g++.old-deja/g++.eh/spec6.C
+112
-16
No files found.
gcc/testsuite/ChangeLog
View file @
fb2000b2
1999-08-04 Nathan Sidwell <nathan@acm.org>
* g++.old-deja/g++.eh/spec6.C: Add more tests. Remove XFAILS.
Wed Aug 4 01:17:17 1999 Jeffrey A Law (law@cygnus.com)
Wed Aug 4 01:17:17 1999 Jeffrey A Law (law@cygnus.com)
* gcc.c-torture/execute/990804-1.c: New test.
* gcc.c-torture/execute/990804-1.c: New test.
...
...
gcc/testsuite/g++.old-deja/g++.eh/spec6.C
View file @
fb2000b2
...
@@ -7,40 +7,136 @@
...
@@ -7,40 +7,136 @@
// [except.spec] 1, a type in an exception specifier shall not be incomplete,
// [except.spec] 1, a type in an exception specifier shall not be incomplete,
// or pointer or ref to incomplete
// or pointer or ref to incomplete
struct
X
;
// ERROR - forward declaration - XFAIL
struct
X
;
// ERROR - forward declaration.*
void
fn1
()
throw
(
X
);
// ERROR - incomplete type - XFAIL
void
fn1
()
throw
(
X
);
// ERROR - invalid use of undefined type
void
fn2
()
throw
(
X
*
);
// ERROR - incomplete type - XFAIL
void
fn2
()
throw
(
X
*
);
// ERROR - invalid use of undefined type
void
fn3
()
throw
(
X
&
);
// ERROR - incomplete type - XFAIL
void
fn3
()
throw
(
X
&
);
// ERROR - invalid use of undefined tyoe
void
fn4
()
throw
(
void
);
// ERROR - incomplete type - XFAIL
void
fn4
()
throw
(
void
);
// ERROR - invalid use of void expression
void
fn5
()
throw
(
void
&
);
// ERROR - invalid type // ERROR - invalid use of void
// except for cv pointer to void
// except for cv pointer to void
void
fn5
()
throw
(
void
*
);
void
fn6
()
throw
(
void
*
);
// ok -- pointer to void
void
fn7
()
throw
(
void
const
*
);
// ok -- pointer to cv void
template
<
class
T
>
void
fny
()
throw
(
T
);
// ok (so far)
template
<>
void
fny
<
int
>
()
throw
(
int
);
// ok
template
<>
void
fny
<
void
>
()
throw
(
void
);
// ERROR - invalid use of void
template
<
class
T
>
void
fnx
(
T
*
)
throw
(
T
){}
// ERROR - invalid use of void expression
void
fx
()
{
fnx
((
int
*
)
0
);
fnx
((
void
*
)
0
);
}
// [except.spec] 2, exception specifiers must be the same set of types (but
// [except.spec] 2, exception specifiers must be the same set of types (but
// can be reordered)
// can be reordered)
void
fn
()
throw
(
int
,
char
);
// gets bogus error - XFAIL
void
baz1
()
throw
(
int
,
char
);
void
fn
()
throw
(
char
,
int
){}
// gets bogus error - ordering is irrelevant - XFAIL
void
baz1
()
throw
(
char
,
int
){}
// reordering is ok
void
baz2
()
throw
(
int
,
char
);
void
baz2
()
throw
(
int
,
char
,
int
){}
// duplicates are ignored
typedef
int
Int
;
void
baz3
()
throw
(
int
,
char
);
void
baz3
()
throw
(
Int
,
char
){}
// typedefs are the same type ...
void
baz4
()
throw
(
int
,
Int
,
char
);
// ... so this is a duplicate
void
baz4
()
throw
(
Int
,
char
){}
void
fna
()
throw
(
int
,
char
);
// ERROR - to previous declaration
void
fna
()
throw
(
int
const
,
char
);
// ERROR - declaration different exceptions // ERROR - to previous declaration
void
fna
()
throw
(
int
){}
// ERROR - declaration different exceptions
void
fnb
()
throw
(
int
,
char
);
// ERROR - to previous declaration
void
fnb
()
throw
(
char
){}
// ERROR - declaration different exceptions
void
fnc
()
throw
(
int
,
char
);
// ERROR - to previous declaration
void
fnc
()
throw
(
char
,
int
,
float
){}
// ERROR - declaration different exceptions
void
fnd
()
throw
();
// ERROR - to previous declaration
void
fnd
()
throw
(
char
){}
// ERROR - declaration different exceptions
void
fne
()
throw
(
char
);
// ERROR - to previous declaration
void
fne
()
throw
(){}
// ERROR - declaration different exceptions
void
fnf
();
// ERROR - to previous declaration
void
fnf
()
throw
(
char
){}
// ERROR - declaration different exceptions
void
fng
()
throw
(
char
);
// ERROR - to previous declaration
void
fng
(){}
// ERROR - declaration different exceptions
void
fnh
()
throw
(
int
,
char
);
// ERROR - to previous declaration
void
fnh
()
throw
(
int
,
float
){}
// ERROR - declaration different exceptions
void
fni
()
throw
(
int
,
char
);
// ERROR - to previous declaration
void
fni
()
throw
(
float
,
char
){}
// ERROR - declaration different exceptions
// [except.spec] 3, virtual function overriders shall throw a subset of the
// [except.spec] 3, virtual function overriders shall throw a subset of the
// overridden function
// overridden function
struct
E
{};
struct
E
{};
struct
F
:
public
E
{};
struct
F
:
public
E
{};
struct
F1
:
public
E
{};
struct
G
:
public
F
,
F1
{};
struct
H
:
private
E
{};
struct
A
struct
A
{
{
virtual
void
foo
()
throw
();
virtual
void
foo
()
throw
();
// ERROR - overriding
virtual
void
baz
()
throw
(
double
,
int
);
virtual
void
baz
()
throw
(
double
,
int
);
virtual
void
bar
();
virtual
void
bar
();
virtual
void
qux
()
throw
(
E
);
virtual
void
qux
()
throw
(
E
);
virtual
void
quux
()
throw
(
F
);
virtual
void
qux
(
int
)
throw
(
E
const
*
);
// ERROR - overriding (pedantically)
virtual
void
quux
()
throw
(
F
);
// ERROR - overriding
virtual
void
quux
(
int
)
throw
(
F
*
);
// ERROR - overriding
virtual
void
wibble
()
throw
(
E
);
// ERROR - overriding
virtual
void
wobble
()
throw
(
E
*
);
// ERROR - overriding
virtual
void
wobble
(
int
)
throw
(
E
*
);
// ERROR - overriding
virtual
void
wabble
(
int
)
throw
(
E
*
);
virtual
void
wubble
(
int
)
throw
(
E
*
,
H
*
);
virtual
~
A
()
throw
();
// ERROR - overriding XFAIL
};
};
struct
B
:
A
struct
B
:
A
{
{
virtual
void
foo
()
throw
(
int
);
// ERROR - not in base function - XFAIL
virtual
void
foo
()
throw
(
int
);
// ERROR - looser throw - A::foo
virtual
void
baz
()
throw
(
double
);
virtual
void
baz
()
throw
(
double
);
// ok subset
virtual
void
bar
(
int
)
throw
(
int
);
virtual
void
bar
(
int
)
throw
(
int
);
// ok not overriding
virtual
void
qux
()
throw
(
F
);
virtual
void
qux
()
throw
(
F
);
// ok subset
virtual
void
quux
()
throw
(
E
);
// ERROR - not in base function - XFAIL
virtual
void
qux
(
int
)
throw
(
F
*
);
// ERROR - looser (pedantically)
virtual
void
quux
()
throw
(
E
);
// ERROR - looser throw - A::quux()
virtual
void
quux
(
int
)
throw
(
E
*
);
// ERROR - looser throw - A::quux(int)
virtual
void
wibble
()
throw
(
E
*
);
// ERROR - looser throw - A::wibble
virtual
void
wobble
()
throw
(
G
*
);
// ERROR - looser throw - A::wobble()
virtual
void
wobble
(
int
)
throw
(
H
*
);
// ERROR - looser throw - A::wobble(int)
virtual
void
wubble
(
int
)
throw
(
H
*
);
// ok
virtual
void
wabble
(
int
)
throw
(
F1
*
,
F
*
);
// ok
};
struct
A1
{
virtual
void
foo
()
throw
(
int
);
virtual
void
bar
()
throw
();
// ERROR - overriding
virtual
~
A1
()
throw
(
int
);
};
struct
B1
:
A
{
};
struct
C
:
A
,
A1
{
virtual
void
foo
()
throw
(
int
);
// ERROR - looser throw - A::foo
virtual
void
bar
()
throw
(
int
);
// ERROR - looser throw - A1::bar
// The xfail is because we don't build exception specifiers for implicit
// members. So we don't check them either.
// C::~C() throw(int), is the correct specification of the destructor.
};
// ERROR - looser throw - A::~A() - XFAIL
struct
D
:
A
,
A1
{
// The xfail here is because we don't have the check in the right place to
// catch dtor failings.
virtual
~
D
()
throw
(
int
);
// ERROR - looser throw - A::~A() - XFAIL
};
};
// [except.spec] 5, types shall not be defined in exception specifiers
// [except.spec] 5, types shall not be defined in exception specifiers
void
fn
6
()
throw
(
struct
Z
{});
// ERROR - types shall not be defined - XFAIL
void
fn
8
()
throw
(
struct
Z
{});
// ERROR - ANSI C++ forbids
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment