Skip to content

Commit 724676f

Browse files
committed
Revert "fix a problem with pointer calculations"
This reverts commit 59ca49f. The original entry just said "fixes a pointer calculation problem" I haven't been able to find that problem, and the commit itself introduces another serious issue, namely that a struct like `CON struct int64(long n[2])` gets miscompiled, as compared to `CON struct int64(long lo, long hi)`. Since Chip is using the former form in some objects, I think we should revert this and deal with the pointer issue when it comes up.
1 parent a3dd4e8 commit 724676f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

frontends/common.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,6 @@ DeclareMemberVariablesOfSizeFlag(Module *P, int sizeRequest, int offset)
20152015
int curSizeFlag = 0;
20162016
int isUnion = P->isUnion;
20172017
AST *varblocklist;
2018-
int oldoffset = offset;
20192018
unsigned sym_flags = 0;
20202019
bool sawSmall = false;
20212020

@@ -2149,7 +2148,7 @@ DeclareMemberVariablesOfSizeFlag(Module *P, int sizeRequest, int offset)
21492148
offset = EnterVars(SYM_VARIABLE, &P->objsyms, curtype, idlist, offset, P->isUnion, sym_flags);
21502149
}
21512150
}
2152-
if (sawSmall || (curtypesize != LONG_SIZE && offset != oldoffset)) {
2151+
if (sawSmall) {
21532152
P->longOnly = 0;
21542153
}
21552154
return offset;

0 commit comments

Comments
 (0)