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
d146c305
Commit
d146c305
authored
Jun 01, 1998
by
Robert Lipe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional changes from Martin.
From-SVN: r20167
parent
8e54705d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
19 deletions
+5
-19
gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
+4
-4
gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
+1
-0
gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
+0
-15
No files found.
gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
View file @
d146c305
//
Compiles. Shouldn't.
//
Build don't link:
class
A
{
private
:
int
i1_
;
public
:
void
f
(
int
const
i1
=
1
);
void
f
(
int
const
i1
=
1
);
// ERROR -
};
void
A
::
f
(
int
const
i1
=
1
)
// !!! SHOULD TRIGGER AN ERROR !!!
{
A
::
f
(
int
const
i1
=
1
)
{
// ERROR - duplicate default argument
i1_
=
i1
;
}
...
...
gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
View file @
d146c305
//Build don't link:
#include <vector.h>
#include <algo.h>
...
...
gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
View file @
d146c305
...
...
@@ -8,41 +8,26 @@ Expr(){};
Expr
(
const
T
&
){};
};
#ifdef TEMPLATE
template
<
class
T
>
inline
bool
compare
(
const
Expr
<
T
>
a
,
const
Expr
<
T
>
b
){
return
true
;
};
#else
inline
bool
compare
(
const
Expr
<
int
>
a
,
const
Expr
<
int
>
b
){
return
true
;
};
#endif
void
main
()
{
vector
<
int
>
a
(
3
);
#if TEMPLATE == 1
sort
(
a
.
begin
(),
a
.
end
(),
static_cast
<
bool
(
*
)(
const
Expr
<
int
>
,
const
Expr
<
int
>
)
>
(
compare
)
);
#elif TEMPLATE == 2
sort
(
a
.
begin
(),
a
.
end
(),
compare
<
int
>
);
#elif TEMPLATE == 3
sort
<
vector
<
int
>::
iterator
,
pointer_to_binary_function
<
const
Expr
<
int
>
,
const
Expr
<
int
>
,
bool
>
>
(
a
.
begin
(),
a
.
end
(),
compare
);
#elif TEMPLATE == 4
sort
(
a
.
begin
(),
a
.
end
(),
ptr_fun
<
const
Expr
<
int
>
,
const
Expr
<
int
>
,
bool
>
(
compare
)
);
#elif TEMPLATE == 5
sort
(
a
.
begin
(),
a
.
end
(),
ptr_fun
(
compare
<
int
>
)
);
#elif TEMPLATE == 6
sort
(
a
.
begin
(),
a
.
end
(),
pointer_to_binary_function
<
const
Expr
<
int
>
,
const
Expr
<
int
>
,
bool
>
(
compare
)
);
#elif TEMPLATE == 7
sort
(
a
.
begin
(),
a
.
end
(),
pointer_to_binary_function
<
const
Expr
<
int
>
,
const
Expr
<
int
>
,
bool
>
(
compare
<
int
>
)
);
#elif TEMPLATE == 8
sort
(
a
.
begin
(),
a
.
end
(),
pointer_to_binary_function
<
const
Expr
<
int
>
,
const
Expr
<
int
>
,
bool
>
(
compare
<>
)
);
#else
sort
(
a
.
begin
(),
a
.
end
(),
compare
);
#endif
}
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