Commit 5f132b93 authored by Russ Cox's avatar Russ Cox

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

reported by erik quanstrom.

R=ken2
https://golang.org/cl/181071
parent 316cb50d
...@@ -724,7 +724,7 @@ int yyparse(void); ...@@ -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); ...@@ -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*);
......
...@@ -584,7 +584,7 @@ typename(Type *t) ...@@ -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;
......
...@@ -2085,7 +2085,7 @@ frame(int context) ...@@ -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;
......
...@@ -30,7 +30,6 @@ unsafenmagic(Node *fn, NodeList *args) ...@@ -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;
......
...@@ -1072,7 +1072,7 @@ ret: ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment