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
23ad4d41
Commit
23ad4d41
authored
Mar 29, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r619
parent
5c8bab4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
gcc/stor-layout.c
+8
-3
No files found.
gcc/stor-layout.c
View file @
23ad4d41
...
@@ -188,8 +188,10 @@ layout_decl (decl, known_align)
...
@@ -188,8 +188,10 @@ layout_decl (decl, known_align)
DECL_SIZE
(
decl
)
=
size_int
(
spec_size
);
DECL_SIZE
(
decl
)
=
size_int
(
spec_size
);
}
}
/* Force alignment required for the data type.
/* Force alignment required for the data type.
But if the decl itself wants greater alignment, don't override that. */
But if the decl itself wants greater alignment, don't override that.
else
if
(
TYPE_ALIGN
(
type
)
>
DECL_ALIGN
(
decl
))
Likewise, if the decl is packed, don't override it. */
else
if
(
DECL_ALIGN
(
decl
)
==
0
||
(
!
DECL_PACKED
(
decl
)
&&
TYPE_ALIGN
(
type
)
>
DECL_ALIGN
(
decl
)))
DECL_ALIGN
(
decl
)
=
TYPE_ALIGN
(
type
);
DECL_ALIGN
(
decl
)
=
TYPE_ALIGN
(
type
);
/* See if we can use an ordinary integer mode for a bit-field. */
/* See if we can use an ordinary integer mode for a bit-field. */
...
@@ -302,6 +304,7 @@ layout_record (rec)
...
@@ -302,6 +304,7 @@ layout_record (rec)
record_align
=
MAX
(
record_align
,
desired_align
);
record_align
=
MAX
(
record_align
,
desired_align
);
#else
#else
if
(
PCC_BITFIELD_TYPE_MATTERS
&&
TREE_TYPE
(
field
)
!=
error_mark_node
if
(
PCC_BITFIELD_TYPE_MATTERS
&&
TREE_TYPE
(
field
)
!=
error_mark_node
&&
DECL_BIT_FIELD
(
field
)
&&
!
integer_zerop
(
TYPE_SIZE
(
TREE_TYPE
(
field
))))
&&
!
integer_zerop
(
TYPE_SIZE
(
TREE_TYPE
(
field
))))
{
{
/* For these machines, a zero-length field does not
/* For these machines, a zero-length field does not
...
@@ -350,6 +353,7 @@ layout_record (rec)
...
@@ -350,6 +353,7 @@ layout_record (rec)
if
(
PCC_BITFIELD_TYPE_MATTERS
if
(
PCC_BITFIELD_TYPE_MATTERS
&&
TREE_CODE
(
field
)
==
FIELD_DECL
&&
TREE_CODE
(
field
)
==
FIELD_DECL
&&
TREE_TYPE
(
field
)
!=
error_mark_node
&&
TREE_TYPE
(
field
)
!=
error_mark_node
&&
DECL_BIT_FIELD
(
field
)
&&
!
DECL_PACKED
(
field
)
&&
!
DECL_PACKED
(
field
)
&&
!
integer_zerop
(
DECL_SIZE
(
field
)))
&&
!
integer_zerop
(
DECL_SIZE
(
field
)))
{
{
...
@@ -371,6 +375,7 @@ layout_record (rec)
...
@@ -371,6 +375,7 @@ layout_record (rec)
if
(
BITFIELD_NBYTES_LIMITED
if
(
BITFIELD_NBYTES_LIMITED
&&
TREE_CODE
(
field
)
==
FIELD_DECL
&&
TREE_CODE
(
field
)
==
FIELD_DECL
&&
TREE_TYPE
(
field
)
!=
error_mark_node
&&
TREE_TYPE
(
field
)
!=
error_mark_node
&&
DECL_BIT_FIELD
(
field
)
&&
!
DECL_PACKED
(
field
)
&&
!
DECL_PACKED
(
field
)
&&
!
integer_zerop
(
DECL_SIZE
(
field
)))
&&
!
integer_zerop
(
DECL_SIZE
(
field
)))
{
{
...
@@ -499,7 +504,7 @@ layout_union (rec)
...
@@ -499,7 +504,7 @@ layout_union (rec)
#ifdef PCC_BITFIELD_TYPE_MATTERS
#ifdef PCC_BITFIELD_TYPE_MATTERS
/* On the m88000, a bit field of declare type `int'
/* On the m88000, a bit field of declare type `int'
forces the entire union to have `int' alignment. */
forces the entire union to have `int' alignment. */
if
(
PCC_BITFIELD_TYPE_MATTERS
)
if
(
PCC_BITFIELD_TYPE_MATTERS
&&
DECL_BIT_FIELD
(
field
))
union_align
=
MAX
(
union_align
,
TYPE_ALIGN
(
TREE_TYPE
(
field
)));
union_align
=
MAX
(
union_align
,
TYPE_ALIGN
(
TREE_TYPE
(
field
)));
#endif
#endif
...
...
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