Remix.run Logo
asveikau 13 hours ago

I think the definition of "valid" may differ. Is this a standard conforming C program? No. Did you use implementation details of your platform to create a program that loads and runs correctly? Sure.

Most interesting C programs violate the standard in some way though.

elpocko 13 hours ago | parent [-]

>Most interesting C programs violate the standard in some way though.

Wow, who counted them and decided what is or isn't interesting? And would the interesting programs still be interesting if they didn't violate the standard?

pechay 13 hours ago | parent | next [-]

All C programs are interesting. The first potentially non-interesting program in C is interesting because it's the first non-interesting one. :)

asveikau 12 hours ago | parent | prev [-]

I guess what I'm saying is that some common practices are under specified and live in gray areas of the standard, and practicing programmers rely on those behaviors.

Sometimes other standards like POSIX cover the gaps.