Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c4.c:45:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
- next()
- ^~~~
- c4.c:49:21: error: non-void function 'next' should return a value [-Wreturn-type]
- if (!(tk = *p)) return;
- ^
- c4.c:54:23: warning: field precision should have type 'int', but argument has type 'long' [-Wformat]
- printf("%d: %.*s", line, p - lp, lp);
- ~~^~ ~~~~~~
- c4.c:59:70: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
- "OPEN,READ,CLOS,PRTF,MALC,MSET,MCMP,EXIT," + *++le * 5);
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
- c4.c:59:70: note: use array indexing to silence this warning
- "OPEN,READ,CLOS,PRTF,MALC,MSET,MCMP,EXIT," + *++le * 5);
- ^
- c4.c:75:39: warning: cast to 'char *' from smaller integer type 'int' [-Wint-to-pointer-cast]
- if (tk == id[Hash] && !memcmp((char *)id[Name], pp, p - pp)) { tk = id[Tk]; return; }
- ^
- c4.c:75:85: error: non-void function 'next' should return a value [-Wreturn-type]
- if (tk == id[Hash] && !memcmp((char *)id[Name], pp, p - pp)) { tk = id[Tk]; return; }
- ^
- c4.c:81:7: error: non-void function 'next' should return a value [-Wreturn-type]
- return;
- ^
- c4.c:87:7: error: non-void function 'next' should return a value [-Wreturn-type]
- return;
- ^
- c4.c:95:9: error: non-void function 'next' should return a value [-Wreturn-type]
- return;
- ^
- c4.c:108:7: error: non-void function 'next' should return a value [-Wreturn-type]
- return;
- ^
- c4.c:110:78: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '=') { if (*p == '=') { ++p; tk = Eq; } else tk = Assign; return; }
- ^
- c4.c:111:76: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '+') { if (*p == '+') { ++p; tk = Inc; } else tk = Add; return; }
- ^
- c4.c:112:76: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '-') { if (*p == '-') { ++p; tk = Dec; } else tk = Sub; return; }
- ^
- c4.c:113:60: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '!') { if (*p == '=') { ++p; tk = Ne; } return; }
- ^
- c4.c:114:113: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '<') { if (*p == '=') { ++p; tk = Le; } else if (*p == '<') { ++p; tk = Shl; } else tk = Lt; return; }
- ^
- c4.c:115:113: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '>') { if (*p == '=') { ++p; tk = Ge; } else if (*p == '>') { ++p; tk = Shr; } else tk = Gt; return; }
- ^
- c4.c:116:75: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '|') { if (*p == '|') { ++p; tk = Lor; } else tk = Or; return; }
- ^
- c4.c:117:76: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '&') { if (*p == '&') { ++p; tk = Lan; } else tk = And; return; }
- ^
- c4.c:118:37: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '^') { tk = Xor; return; }
- ^
- c4.c:119:37: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '%') { tk = Mod; return; }
- ^
- c4.c:120:37: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '*') { tk = Mul; return; }
- ^
- c4.c:121:38: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '[') { tk = Brak; return; }
- ^
- c4.c:122:38: error: non-void function 'next' should return a value [-Wreturn-type]
- else if (tk == '?') { tk = Cond; return; }
Advertisement
Add Comment
Please, Sign In to add comment