projects
/
scc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
602c2db
)
Fix trailing padding in aggregate static initializers
author
Robert Pengelly
<robertapengelly@hotmail.com>
Sat, 31 Oct 2026 10:20:35 +0000
(10:20 +0000)
committer
Robert Pengelly
<robertapengelly@hotmail.com>
Sat, 31 Oct 2026 10:20:35 +0000
(10:20 +0000)
parse.c
patch
|
blob
|
history
diff --git
a/parse.c
b/parse.c
index 394e24fe1af4d73888ada074ff6ba367d18be407..7b8bc9adf517ce08ec05f3d85622cc414629e888 100644
(file)
--- a/
parse.c
+++ b/
parse.c
@@
-3722,7
+3722,15
@@
void parse_type_spec (void) {
}
if (!aggregate_is_packed) {
- aggregate_size = (int) align_up_long (aggregate_size, aggregate_align);
+
+ int aligned_size = (int) align_up_long (aggregate_size, aggregate_align);
+
+ if (!is_union && aligned_size > aggregate_size && aggregate_field_count < MAX_AGG_FIELDS) {
+ aggregate_fields[aggregate_field_count++] = -(aligned_size - aggregate_size);
+ }
+
+ aggregate_size = aligned_size;
+
}
{