Skip to content

Commit

Permalink
Misc upstream fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fuhsnn committed Sep 8, 2023
1 parent 320942d commit 0fd7cdf
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ static void copy_struct_reg(void) {
if (ty->size > 8) {
if (has_flonum(ty, 8, 16, 0)) {
assert(ty->size == 12 || ty->size == 16);
if (ty->size == 4)
if (ty->size == 12)
println(" movss 8(%%rdi), %%xmm%d", fp);
else
println(" movsd 8(%%rdi), %%xmm%d", fp);
Expand Down
6 changes: 0 additions & 6 deletions hashmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ static HashEntry *get_or_insert_entry(HashMap *map, char *key, int keylen) {
if (match(ent, key, keylen))
return ent;

if (ent->key == TOMBSTONE) {
ent->key = key;
ent->keylen = keylen;
return ent;
}

if (ent->key == NULL) {
ent->key = key;
ent->keylen = keylen;
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ int main(int argc, char **argv) {
return 0;
}

if (input_paths.len > 1 && opt_o && (opt_c || opt_S | opt_E))
if (input_paths.len > 1 && opt_o && (opt_c || opt_S || opt_E))
error("cannot specify '-o' with '-c,' '-S' or '-E' with multiple files");

StringArray ld_args = {0};
Expand Down
5 changes: 0 additions & 5 deletions parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,11 +1098,6 @@ static void array_initializer1(Token **rest, Token *tok, Initializer *init) {

bool first = true;

if (init->is_flexible) {
int len = count_array_init_elements(tok, init->ty);
*init = *new_initializer(array_of(init->ty->base, len), false);
}

for (int i = 0; !consume_end(rest, tok); i++) {
if (!first)
tok = skip(tok, ",");
Expand Down

0 comments on commit 0fd7cdf

Please sign in to comment.