On 2021-04-19 17:57:04 +0200, Michael Matz wrote:
> On Mon, 19 Apr 2021, Michael Matz wrote:
> > I'm not sure what "this" refers to here, but we basically need to accept
> > any of these forms of decls and defs of main:
> > 
> > int main();
> > int main() { ... }
> > void main();
> > void main() { ... }
> 
> Gah!  And of course also the ones with void (which does declare a prototype
> even outside of a function def, then, and hence must match a definition if
> there's a separate one):
> 
> int main(void);
> int main(void) { ... }
> void main(void);
> void main(void) { ... }
> 
> > int main(int argc, char *argv[]);
> > int main(int argc, char *argv[]) { ... }
> > void main(int argc, char *argv[]);
> > void main(int argc, char *argv[]) { ... }

But I think it should warn on the forms without a prototype,
like "int main();".

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to