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
58be9ce9
Commit
58be9ce9
authored
Jan 15, 2010
by
Dodji Seketeli
Committed by
Dodji Seketeli
Jan 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert commit of PR c++/42634, which was commit r155868
From-SVN: r155936
parent
cbe80ff8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
38 deletions
+14
-38
gcc/cp/ChangeLog
+5
-0
gcc/cp/error.c
+4
-3
gcc/testsuite/ChangeLog
+5
-0
gcc/testsuite/g++.dg/template/error45.C
+0
-35
No files found.
gcc/cp/ChangeLog
View file @
58be9ce9
2010-01-15 Dodji Seketeli <dodji@redhat.com>
* error.c (dump_template_parms,count_non_default_template_args):
Revert changes of PR c++/42634.
2010-01-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/42674
...
...
gcc/cp/error.c
View file @
58be9ce9
...
...
@@ -165,7 +165,8 @@ dump_template_argument (tree arg, int flags)
static
int
count_non_default_template_args
(
tree
args
,
tree
params
,
int
flags
)
{
int
n
=
TREE_VEC_LENGTH
(
args
);
tree
inner_args
=
INNERMOST_TEMPLATE_ARGS
(
args
);
int
n
=
TREE_VEC_LENGTH
(
inner_args
);
int
last
;
if
(
params
==
NULL_TREE
...
...
@@ -194,7 +195,7 @@ count_non_default_template_args (tree args, tree params, int flags)
NULL_TREE
,
false
,
true
);
--
processing_template_decl
;
}
if
(
!
cp_tree_equal
(
TREE_VEC_ELT
(
args
,
last
),
def
))
if
(
!
cp_tree_equal
(
TREE_VEC_ELT
(
inner_
args
,
last
),
def
))
break
;
}
...
...
@@ -1491,9 +1492,9 @@ dump_template_parms (tree info, int primary, int flags)
?
DECL_INNERMOST_TEMPLATE_PARMS
(
TI_TEMPLATE
(
info
))
:
NULL_TREE
);
args
=
INNERMOST_TEMPLATE_ARGS
(
args
);
len
=
count_non_default_template_args
(
args
,
params
,
flags
);
args
=
INNERMOST_TEMPLATE_ARGS
(
args
);
for
(
ix
=
0
;
ix
!=
len
;
ix
++
)
{
tree
arg
=
TREE_VEC_ELT
(
args
,
ix
);
...
...
gcc/testsuite/ChangeLog
View file @
58be9ce9
2010-01-15 Dodji Seketeli <dodji@redhat.com>
* g++.dg/template/error45.C: Revert as part of reverting changes
or PR c++/42634.
2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/42684
...
...
gcc/testsuite/g++.dg/template/error45.C
deleted
100644 → 0
View file @
cbe80ff8
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/42634
// { dg-options "-g -std=gnu++0x" }
// { dg-do compile }
template
<
typename
T
>
T
declval
();
template
<
typename
T
,
typename
...
Args
>
struct
is_constructible
{
template
<
typename
T1
,
typename
...
Args1
>
static
decltype
(
T1
(
declval
<
Args1
>
()...),
char
())
test
();
static
const
bool
value
=
sizeof
(
test
<
T
,
Args
...
>
())
==
1
;
};
template
<
bool
>
struct
enable_if
{
typedef
void
type
;
};
template
<
class
T1
,
class
T2
>
struct
pair
{
template
<
class
U2
,
class
=
typename
enable_if
<
is_constructible
<
T2
,
U2
&&>::
value
>::
type
>
pair
(
const
T1
&
,
U2
&&
)
{
}
};
struct
string
{
string
()
:
p
(
0
)
{}
char
*
p
;
};
struct
Foo
{
string
s
;
int
i
;
};
void
f
()
{
pair
<
int
,
Foo
>
(
1
,
Foo
());
}
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