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
50e65854
Commit
50e65854
authored
May 03, 1993
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(grokdeclarator, ARRAY_REF case): Build array type, and
then build the variant array type. From-SVN: r4314
parent
1d77b9c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
gcc/c-decl.c
+7
-4
No files found.
gcc/c-decl.c
View file @
50e65854
...
...
@@ -4189,15 +4189,19 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
warning ("array type has incomplete element type");
#endif
/* Build the array type itself.
Merge any constancy or volatility into the target type. */
#if 0 /* We shouldn't have a function type here at all!
Functions aren't allowed as array elements. */
if (pedantic && TREE_CODE (type) == FUNCTION_TYPE
&& (constp || volatilep))
pedwarn ("ANSI C forbids const or volatile function types");
#endif
/* Build the array type itself, then merge any constancy or
volatility into the target type. We must do it in this order
to ensure that the TYPE_MAIN_VARIANT field of the array type
is set correctly. */
type
=
build_array_type
(
type
,
itype
);
if
(
constp
||
volatilep
)
type
=
c_build_type_variant
(
type
,
constp
,
volatilep
);
...
...
@@ -4207,7 +4211,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
volatilep = 0;
#endif
type
=
build_array_type
(
type
,
itype
);
if
(
size_varies
)
C_TYPE_VARIABLE_SIZE
(
type
)
=
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