History

collapse branch in decl(), making way for next patch

Joe Soroka committed 15 years ago

Commit ce8c1881 parent 3beb3831 file · +9 −9Browse files

Unified · Split

tccgen.c+9−9
@@ -5560,21 +5560,21 @@ ST_FUNC void decl(int l) · 5559 unmodified lines
5560 /* XXX: test storage specifiers ? */5560 /* XXX: test storage specifiers ? */
5561 sym = sym_push(v, &type, INT_ATTR(&ad), 0);5561 sym = sym_push(v, &type, INT_ATTR(&ad), 0);
5562 sym->type.t |= VT_TYPEDEF;5562 sym->type.t |= VT_TYPEDEF;
5563 } else if ((type.t & VT_BTYPE) == VT_FUNC) {
5564 /* external function definition */
5565 /* specific case for func_call attribute */
5566 type.ref->r = INT_ATTR(&ad);
5567 external_sym(v, &type, 0, asm_label);
5568 } else {5563 } else {
5569 /* not lvalue if array */
5570 r = 0;5564 r = 0;
5571 if (!(type.t & VT_ARRAY))5565 if ((type.t & VT_BTYPE) == VT_FUNC) {
5566 /* external function definition */
5567 /* specific case for func_call attribute */
5568 type.ref->r = INT_ATTR(&ad);
5569 } else if (!(type.t & VT_ARRAY)) {
5570 /* not lvalue if array */
5572 r |= lvalue_type(type.t);5571 r |= lvalue_type(type.t);
5572 }
5573 has_init = (tok == '=');5573 has_init = (tok == '=');
5574 if ((btype.t & VT_EXTERN) ||5574 if ((btype.t & VT_EXTERN) || ((type.t & VT_BTYPE) == VT_FUNC) ||
5575 ((type.t & VT_ARRAY) && (type.t & VT_STATIC) &&5575 ((type.t & VT_ARRAY) && (type.t & VT_STATIC) &&
5576 !has_init && l == VT_CONST && type.ref->c < 0)) {5576 !has_init && l == VT_CONST && type.ref->c < 0)) {
5577 /* external variable */5577 /* external variable or function */
5578 /* NOTE: as GCC, uninitialized global static5578 /* NOTE: as GCC, uninitialized global static
5579 arrays of null size are considered as5579 arrays of null size are considered as
5580 extern */5580 extern */

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