1
0
mirror of https://github.com/golang/go synced 2024-09-25 15:10:11 -06:00

gc: various C nits, found by plan 9 compiler.

reported by erik quanstrom.

R=ken2
https://golang.org/cl/181071
This commit is contained in:
Russ Cox 2009-12-27 09:32:30 -08:00
parent 316cb50db1
commit 5f132b93eb
5 changed files with 4 additions and 6 deletions

View File

@ -724,7 +724,7 @@ int yyparse(void);
void addidir(char*); void addidir(char*);
void importfile(Val*, int line); void importfile(Val*, int line);
void cannedimports(char*, char*); void cannedimports(char*, char*);
void unimportfile(); void unimportfile(void);
int32 yylex(void); int32 yylex(void);
void typeinit(void); void typeinit(void);
void lexinit(void); void lexinit(void);
@ -1174,7 +1174,6 @@ void cgen_ret(Node *n);
int isfat(Type*); int isfat(Type*);
void clearfat(Node *n); void clearfat(Node *n);
void cgen(Node*, Node*); void cgen(Node*, Node*);
struct Prog;
void gused(Node*); void gused(Node*);
void gdata(Node*, Node*, int); void gdata(Node*, Node*, int);
void gdatastring(Node*, Strlit*); void gdatastring(Node*, Strlit*);

View File

@ -584,7 +584,7 @@ typename(Type *t)
return n; return n;
} }
Sym* static Sym*
dtypesym(Type *t) dtypesym(Type *t)
{ {
int ot, n; int ot, n;

View File

@ -2085,7 +2085,7 @@ frame(int context)
case ONAME: case ONAME:
if(flag) if(flag)
print("--- %s frame ---\n", p); print("--- %s frame ---\n", p);
print("%O %S G%ld T\n", n->op, n->sym, n->vargen, n->type); print("%O %S G%ld %T\n", n->op, n->sym, n->vargen, n->type);
flag = 0; flag = 0;
break; break;

View File

@ -30,7 +30,6 @@ unsafenmagic(Node *fn, NodeList *args)
} }
r = args->n; r = args->n;
n = nod(OLITERAL, N, N);
if(strcmp(s->name, "Sizeof") == 0) { if(strcmp(s->name, "Sizeof") == 0) {
typecheck(&r, Erv); typecheck(&r, Erv);
tr = r->type; tr = r->type;

View File

@ -1072,7 +1072,7 @@ ret:
*np = n; *np = n;
} }
Node* static Node*
makenewvar(Type *t, NodeList **init, Node **nstar) makenewvar(Type *t, NodeList **init, Node **nstar)
{ {
Node *nvar, *nas; Node *nvar, *nas;