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
5289b665
Commit
5289b665
authored
Feb 17, 1994
by
Doug Evans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(decl_attributes): Decode section attribute.
From-SVN: r6582
parent
7ffa4f13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
gcc/c-common.c
+27
-0
No files found.
gcc/c-common.c
View file @
5289b665
...
...
@@ -207,6 +207,7 @@ decl_attributes (decl, attributes)
tree
decl
,
attributes
;
{
tree
a
;
for
(
a
=
attributes
;
a
;
a
=
TREE_CHAIN
(
a
))
if
(
TREE_VALUE
(
a
)
==
get_identifier
(
"packed"
))
{
...
...
@@ -255,6 +256,32 @@ decl_attributes (decl, attributes)
}
else
if
(
TREE_VALUE
(
a
)
!=
0
&&
TREE_CODE
(
TREE_VALUE
(
a
))
==
TREE_LIST
&&
TREE_PURPOSE
(
TREE_VALUE
(
a
))
==
get_identifier
(
"section"
))
{
#ifdef ASM_OUTPUT_SECTION_NAME
if
(
TREE_CODE
(
decl
)
==
FUNCTION_DECL
||
TREE_CODE
(
decl
)
==
VAR_DECL
)
{
if
(
TREE_CODE
(
decl
)
==
VAR_DECL
&&
current_function_decl
!=
NULL_TREE
)
error
(
"section attribute cannot be specified for local variables"
);
/* The decl may have already been given a section attribute from
a previous declaration. Ensure they match. */
else
if
(
DECL_SECTION_NAME
(
decl
)
!=
NULL_TREE
&&
strcmp
(
TREE_STRING_POINTER
(
DECL_SECTION_NAME
(
decl
)),
TREE_STRING_POINTER
(
TREE_VALUE
(
TREE_VALUE
(
a
))))
!=
0
)
error_with_decl
(
decl
,
"section of `%s' conflicts with previous declaration"
);
else
DECL_SECTION_NAME
(
decl
)
=
TREE_VALUE
(
TREE_VALUE
(
a
));
}
else
error_with_decl
(
decl
,
"section attribute not allowed for `%s'"
);
#else
error_with_decl
(
decl
,
"section attributes are not supported for this target"
);
#endif
}
else
if
(
TREE_VALUE
(
a
)
!=
0
&&
TREE_CODE
(
TREE_VALUE
(
a
))
==
TREE_LIST
&&
TREE_PURPOSE
(
TREE_VALUE
(
a
))
==
get_identifier
(
"aligned"
))
{
tree
align_expr
=
TREE_VALUE
(
TREE_VALUE
(
a
));
...
...
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