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
956662b2
Commit
956662b2
authored
Feb 22, 1999
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New test case from Nathan Sidwell.
From-SVN: r25379
parent
89d3d442
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
gcc/testsuite/g++.old-deja/g++.eh/spec6.C
+46
-0
No files found.
gcc/testsuite/g++.old-deja/g++.eh/spec6.C
0 → 100644
View file @
956662b2
// Build don't link:
// Copyright (C) 1999 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 19 Jan 1999 <nathan@acm.org>
// Determine that throw specifiers are checked correctly.
// [except.spec] 1, a type in an exception specifier shall not be incomplete,
// or pointer or ref to incomplete
struct
X
;
// ERROR - forward declaration
void
fn1
()
throw
(
X
);
// ERROR - incomplete type
void
fn2
()
throw
(
X
*
);
// ERROR - incomplete type
void
fn3
()
throw
(
X
&
);
// ERROR - incomplete type
void
fn4
()
throw
(
void
);
// ERROR - incomplete type
// except for cv pointer to void
void
fn5
()
throw
(
void
*
);
// [except.spec] 2, exception specifiers must be the same set of types (but
// can be reordered)
void
fn
()
throw
(
int
,
char
);
void
fn
()
throw
(
char
,
int
){}
// [except.spec] 3, virtual function overriders shall throw a subset of the
// overridden function
struct
E
{};
struct
F
:
public
E
{};
struct
A
{
virtual
void
foo
()
throw
();
virtual
void
baz
()
throw
(
double
,
int
);
virtual
void
bar
();
virtual
void
qux
()
throw
(
E
);
virtual
void
quux
()
throw
(
F
);
};
struct
B
:
A
{
virtual
void
foo
()
throw
(
int
);
// ERROR - not in base function
virtual
void
baz
()
throw
(
double
);
virtual
void
bar
(
int
)
throw
(
int
);
virtual
void
qux
()
throw
(
F
);
virtual
void
quux
()
throw
(
E
);
// ERROR - not in base function
};
// [except.spec] 5, types shall not be defined in exception specifiers
void
fn6
()
throw
(
struct
Z
{});
// ERROR - types shall not be defined
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