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
ddf72901
Commit
ddf72901
authored
Aug 23, 2012
by
Jason Merrill
Committed by
Jason Merrill
Aug 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* decl.c (compute_array_index_type): Use type_dependent_expression_p.
From-SVN: r190626
parent
545ca0f2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
gcc/cp/ChangeLog
+4
-0
gcc/cp/cp-tree.h
+4
-4
gcc/cp/decl.c
+4
-5
No files found.
gcc/cp/ChangeLog
View file @
ddf72901
2012-08-23 Jason Merrill <jason@redhat.com>
* decl.c (compute_array_index_type): Use type_dependent_expression_p.
2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/20420
...
...
gcc/cp/cp-tree.h
View file @
ddf72901
...
...
@@ -5775,10 +5775,10 @@ extern linkage_kind decl_linkage (tree);
extern
duration_kind
decl_storage_duration
(
tree
);
extern
tree
cp_walk_subtrees
(
tree
*
,
int
*
,
walk_tree_fn
,
void
*
,
struct
pointer_set_t
*
);
#define cp_walk_tree(
a,b,c,d
) \
walk_tree_1 (
a, b, c, d
, cp_walk_subtrees)
#define cp_walk_tree_without_duplicates(
a,b,c
) \
walk_tree_without_duplicates_1 (
a, b, c
, cp_walk_subtrees)
#define cp_walk_tree(
tp,func,data,pset
) \
walk_tree_1 (
tp, func, data, pset
, cp_walk_subtrees)
#define cp_walk_tree_without_duplicates(
tp,func,data
) \
walk_tree_without_duplicates_1 (
tp, func, data
, cp_walk_subtrees)
extern
tree
fold_if_not_in_template
(
tree
);
extern
tree
rvalue
(
tree
);
extern
tree
convert_bitfield_to_declared_type
(
tree
);
...
...
gcc/cp/decl.c
View file @
ddf72901
...
...
@@ -7916,7 +7916,6 @@ stabilize_vla_size (tree size)
tree
compute_array_index_type
(
tree
name
,
tree
size
,
tsubst_flags_t
complain
)
{
tree
type
;
tree
itype
;
tree
osize
=
size
;
tree
abi_1_itype
=
NULL_TREE
;
...
...
@@ -7924,10 +7923,10 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
if
(
error_operand_p
(
size
))
return
error_mark_node
;
type
=
TREE_TYPE
(
size
);
/* type_dependent_expression_p? */
if
(
!
dependent_type_p
(
type
))
if
(
!
type_dependent_expression_p
(
size
))
{
tree
type
=
TREE_TYPE
(
size
);
mark_rvalue_use
(
size
);
if
(
cxx_dialect
<
cxx0x
&&
TREE_CODE
(
size
)
==
NOP_EXPR
...
...
@@ -7989,7 +7988,7 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
/* We can only call value_dependent_expression_p on integral constant
expressions; treat non-constant expressions as dependent, too. */
if
(
processing_template_decl
&&
(
dependent_type_p
(
typ
e
)
&&
(
type_dependent_expression_p
(
siz
e
)
||
!
TREE_CONSTANT
(
size
)
||
value_dependent_expression_p
(
size
)))
{
/* We cannot do any checking for a SIZE that isn't known to be
...
...
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