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
2525c782
Commit
2525c782
authored
Mar 30, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r633
parent
c4fcf531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
17 deletions
+35
-17
gcc/c-common.c
+35
-17
No files found.
gcc/c-common.c
View file @
2525c782
...
...
@@ -147,9 +147,41 @@ decl_attributes (decl, attributes)
{
tree
a
;
for
(
a
=
attributes
;
a
;
a
=
TREE_CHAIN
(
a
))
if
(
TREE_VALUE
(
a
)
!=
0
if
(
TREE_VALUE
(
a
)
==
get_identifier
(
"packed"
))
{
if
(
TREE_CODE
(
decl
)
==
FIELD_DECL
)
DECL_PACKED
(
decl
)
=
1
;
}
else
if
(
TREE_VALUE
(
a
)
!=
0
&&
TREE_CODE
(
TREE_VALUE
(
a
))
==
TREE_LIST
&&
TREE_PURPOSE
(
TREE_VALUE
(
a
))
==
get_identifier
(
"aligned"
))
&&
TREE_PURPOSE
(
TREE_VALUE
(
a
))
==
get_identifier
(
"mode"
))
{
int
i
;
char
*
specified_name
=
IDENTIFIER_POINTER
(
TREE_VALUE
(
TREE_VALUE
(
a
)));
/* Give this decl a type with the specified mode. */
for
(
i
=
0
;
i
<
NUM_MACHINE_MODES
;
i
++
)
if
(
!
strcmp
(
specified_name
,
GET_MODE_NAME
(
i
)))
{
tree
type
=
type_for_size
(
GET_MODE_BITSIZE
(
i
),
TREE_UNSIGNED
(
TREE_TYPE
(
decl
)));
if
(
type
!=
0
)
{
TREE_TYPE
(
decl
)
=
type
;
DECL_SIZE
(
decl
)
=
0
;
layout_decl
(
decl
);
}
else
error
(
"no data type for mode `%s'"
,
specified_name
);
}
if
(
i
==
NUM_MACHINE_MODES
)
error
(
"unknown machine mode `%s'"
,
specified_name
);
}
else
if
(
TREE_VALUE
(
a
)
!=
0
&&
TREE_CODE
(
TREE_VALUE
(
a
))
==
TREE_LIST
&&
TREE_PURPOSE
(
TREE_VALUE
(
a
))
==
get_identifier
(
"aligned"
))
{
int
align
=
TREE_INT_CST_LOW
(
TREE_VALUE
(
TREE_VALUE
(
a
)))
*
BITS_PER_UNIT
;
...
...
@@ -161,26 +193,12 @@ decl_attributes (decl, attributes)
&&
TREE_CODE
(
decl
)
!=
FIELD_DECL
)
warning_with_decl
(
decl
,
"alignment specified for `%s' which is not a variable"
);
/* ??? The maximum alignment gcc can currently handle is 16 bytes!
We should change the representation to be the log of the
actual alignment since we only handle powers of 2 anyway. */
else
if
(
align
>
255
)
warning_with_decl
(
decl
,
"requested alignment of `%s' exceeds compiler limits"
);
else
DECL_ALIGN
(
decl
)
=
align
;
}
else
if
(
TREE_VALUE
(
a
)
!=
0
&&
TREE_CODE
(
TREE_VALUE
(
a
))
==
TREE_LIST
&&
TREE_PURPOSE
(
TREE_VALUE
(
a
))
==
get_identifier
(
"packed"
))
{
if
(
TREE_CODE
(
decl
)
==
FIELD_DECL
)
DECL_PACKED
(
decl
)
=
1
;
}
else
if
(
TREE_VALUE
(
a
)
!=
0
&&
TREE_CODE
(
TREE_VALUE
(
a
))
==
TREE_LIST
&&
TREE_PURPOSE
(
TREE_VALUE
(
a
))
==
get_identifier
(
"format"
))
&&
TREE_PURPOSE
(
TREE_VALUE
(
a
))
==
get_identifier
(
"format"
))
{
tree
list
=
TREE_VALUE
(
TREE_VALUE
(
a
));
tree
format_type
=
TREE_PURPOSE
(
list
);
...
...
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