Live data from Hacker News

The Cscript Style Guide – CScript is the standard C

github.com

1–10 of 13 posts

Re: The Cscript Style Guide – CScript is the standard C

#5

This is interesting, but I wouldn't say it is valid C. main() doesn't know about greet(auto s) and wouldn't be able to call it in valid C89, right?

It's valid K&R since everything defaults to int. The linker will match the symbols sans prototype. That wasn't obsoleted until C23.

Re: The Cscript Style Guide – CScript is the standard C

#10
post #6

To compile CScript to C: apt install gcc-dev cat hello.cs > hello.c gcc hello.c

Nope… you need to follow the instructions:

  gcc -std=gnu89 -m32 -fno-builtin
because GCC defaults to ISO C23 these days, and that will not work, and neither will anything where int and a pointer aren't the same size :)
Post reply on HN