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
b03d739a
Commit
b03d739a
authored
31 years ago
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(pop_init_level): Add special case for nonincremental scalar initializers.
From-SVN: r5503
parent
235174ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
gcc/c-typeck.c
+23
-0
No files found.
gcc/c-typeck.c
View file @
b03d739a
...
...
@@ -5712,6 +5712,28 @@ pop_init_level (implicit)
}
else
if
(
constructor_type
==
0
)
;
else
if
(
TREE_CODE
(
constructor_type
)
!=
RECORD_TYPE
&&
TREE_CODE
(
constructor_type
)
!=
UNION_TYPE
&&
TREE_CODE
(
constructor_type
)
!=
ARRAY_TYPE
&&
!
constructor_incremental
)
{
/* A nonincremental scalar initializer--just return
the element, after verifying there is just one. */
if
(
constructor_elements
==
0
)
{
error_init
(
"empty scalar initializer%s"
,
" for `%s'"
,
NULL
);
constructor
=
error_mark_node
;
}
else
if
(
TREE_CHAIN
(
constructor_elements
)
!=
0
)
{
error_init
(
"extra elements in scalar initializer%s"
,
" for `%s'"
,
NULL
);
constructor
=
TREE_VALUE
(
constructor_elements
);
}
else
constructor
=
TREE_VALUE
(
constructor_elements
);
}
else
if
(
!
constructor_incremental
)
{
if
(
constructor_erroneous
)
...
...
@@ -5726,6 +5748,7 @@ pop_init_level (implicit)
TREE_CONSTANT
(
constructor
)
=
1
;
if
(
constructor_constant
&&
constructor_simple
)
TREE_STATIC
(
constructor
)
=
1
;
resume_momentary
(
momentary
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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