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
37e05cd5
Commit
37e05cd5
authored
Nov 02, 1998
by
Mark Mitchell
Committed by
Mark Mitchell
Nov 02, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* init.c (expand_vec_init): Fix off-by-one error.
From-SVN: r23506
parent
0ae9f65b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
gcc/cp/ChangeLog
+4
-0
gcc/cp/init.c
+2
-2
gcc/testsuite/g++.old-deja/g++.other/init10.C
+22
-0
No files found.
gcc/cp/ChangeLog
View file @
37e05cd5
1998-11-02 Mark Mitchell <mark@markmitchell.com>
* init.c (expand_vec_init): Fix off-by-one error.
1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
* parse.y (apparent_template_type): new type
...
...
gcc/cp/init.c
View file @
37e05cd5
...
...
@@ -2853,10 +2853,10 @@ expand_vec_init (decl, base, maxindex, init, from_array)
&&
!
(
TREE_CODE
(
maxindex
)
==
INTEGER_CST
&&
num_initialized_elts
==
TREE_INT_CST_LOW
(
maxindex
)
+
1
))
{
/* If the ITERATOR is equal to
zero
, then we don't have to loop;
/* If the ITERATOR is equal to
-1
, then we don't have to loop;
we've already initialized all the elements. */
expand_start_cond
(
build
(
NE_EXPR
,
boolean_type_node
,
iterator
,
integer_zero_node
),
iterator
,
minus_one
),
0
);
/* Otherwise, loop through the elements. */
...
...
gcc/testsuite/g++.old-deja/g++.other/init10.C
0 → 100644
View file @
37e05cd5
int
i
;
struct
D
{
D
()
{
i
++
;
}
};
struct
C
{
C
()
{}
D
d
[
1
];
};
int
main
()
{
C
c
;
if
(
i
!=
1
)
return
1
;
}
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