History

allow redefinition of func_old_type functions

void *memcpy(void*, const void*, unsigned); This gave an error if memcpy() has been used before implicitely, e.g. for structure passing etc.

grischka committed 17 years ago

Commit 6a004ed1 parent c3701df1 file · +7 −4Browse files

Unified · Split

tccgen.c+7−4
@@ -115,10 +115,13 @@ static Sym *external_sym(int v, CType *type, int r) · 114 unmodified lines
115 /* push forward reference */115 /* push forward reference */
116 s = sym_push(v, type, r | VT_CONST | VT_SYM, 0);116 s = sym_push(v, type, r | VT_CONST | VT_SYM, 0);
117 s->type.t |= VT_EXTERN;117 s->type.t |= VT_EXTERN;
118 } else {118 } else if (s->type.ref == func_old_type.ref) {
119 if (!is_compatible_types(&s->type, type))119 s->type.ref = type->ref;
120 error("incompatible types for redefinition of '%s'", 120 s->r = r | VT_CONST | VT_SYM;
121 get_tok_str(v, NULL));121 s->type.t |= VT_EXTERN;
122 } else if (!is_compatible_types(&s->type, type)) {
123 error("incompatible types for redefinition of '%s'",
124 get_tok_str(v, NULL));
122 }125 }
123 return s;126 return s;
124}127}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t