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
3a369acd
Commit
3a369acd
authored
Jun 03, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(layout_decl): Test DECL_PACKED and TYPE_PACKED instead of
flag_pack_struct. From-SVN: r12141
parent
02eb6e90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
gcc/stor-layout.c
+3
-5
No files found.
gcc/stor-layout.c
View file @
3a369acd
...
...
@@ -254,7 +254,7 @@ layout_decl (decl, known_align)
DECL_BIT_FIELD_TYPE
(
decl
)
=
DECL_BIT_FIELD
(
decl
)
?
type
:
0
;
if
(
maximum_field_alignment
!=
0
)
DECL_ALIGN
(
decl
)
=
MIN
(
DECL_ALIGN
(
decl
),
maximum_field_alignment
);
else
if
(
flag_pack_struct
)
else
if
(
DECL_PACKED
(
decl
)
)
DECL_ALIGN
(
decl
)
=
MIN
(
DECL_ALIGN
(
decl
),
BITS_PER_UNIT
);
}
...
...
@@ -391,7 +391,7 @@ layout_record (rec)
int
type_align
=
TYPE_ALIGN
(
TREE_TYPE
(
field
));
if
(
maximum_field_alignment
!=
0
)
type_align
=
MIN
(
type_align
,
maximum_field_alignment
);
else
if
(
flag_pack_struct
)
else
if
(
TYPE_PACKED
(
rec
)
)
type_align
=
MIN
(
type_align
,
BITS_PER_UNIT
);
record_align
=
MAX
(
record_align
,
type_align
);
...
...
@@ -433,9 +433,7 @@ layout_record (rec)
&&
TREE_TYPE
(
field
)
!=
error_mark_node
&&
DECL_BIT_FIELD_TYPE
(
field
)
&&
!
DECL_PACKED
(
field
)
/* If #pragma pack is in effect, turn off this feature. */
&&
maximum_field_alignment
==
0
&&
!
flag_pack_struct
&&
!
integer_zerop
(
DECL_SIZE
(
field
)))
{
int
type_align
=
TYPE_ALIGN
(
TREE_TYPE
(
field
));
...
...
@@ -470,7 +468,7 @@ layout_record (rec)
if
(
maximum_field_alignment
!=
0
)
type_align
=
MIN
(
type_align
,
maximum_field_alignment
);
else
if
(
flag_pack_struct
)
else
if
(
TYPE_PACKED
(
rec
)
)
type_align
=
MIN
(
type_align
,
BITS_PER_UNIT
);
/* A bit field may not span the unit of alignment of its type.
...
...
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