Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Non-sucking Win32 C compiler

Name: Anonymous 2009-08-12 14:37

I need a small (not bloated to hell, clean, not system ruining / service installing) compiler for tiny C programs with POSIX-like semantics (i.e. C library that doesn't suck and stuff like read() instead of ReadFileWEX(WHANDLE, WSHARINGMODE, WSECURITYCONTEXT, NULL, NULL, NULL, NULL) - true POSIX stuff like fork() et al is not needed).

Visual Studio or cygwin are out of the question. Some GCC distro like mingw might be OK depending on how much the installation sucks (ideally there wouldn't be any installation at all).

Any ideas or do I give up to ENTERPRISE-quality software?

Name: Anonymous 2009-08-15 22:40

>>66
You completely misunderstand both the halting problem and this one. The difference here is that the compiler has a higher order view of the inner workings of whatever you give it. It does not have some magical black box and has to return 1 or 0 based on whether the black box halts on given input or not. It can analyze inside the black box and determine for itself.

compiler: is strlen pure? yes
compiler: will str1[i] = str2[i] ever change the invariant?
compiler: will "i" ever exceed the length of str1?
compiler: no, the invariant is bounded above by strlen(str1)
compiler: therefore str1[i] = str2[i] will never overwrite the null terminator
compiler: therefore neither strlen changes
compiler: the loop invariant must never change
compiler: i can optimize this out

Find where the halting problem is solved please.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List