Search code examples
cturbo-c

What C version does Borland Turbo C 2.01 use?


I've started working with Turbo C 2.01 as a hobby project. Yes, the DOS version. Since it came out in 1987, I assume it doesn't support C90... except it does. Well, pieces of it. The volatile keyword works. And straight K&R isn't supported; I tried K&R style declarations, to an error.

So, I was wondering what form of C Turbo C uses. I'm sure it's nonstandard, but it seems somewhat consistent, and since this was a very popular compiler back in the day, I'm sure there's some collection of information... right?


Solution

  • There was no real standard back then, and additionally MS-DOS had its own quirks (namely the segmented memory model, and different application memory models using them differently...).

    So I think it's safe to say, Turbo C 2.01 uses Turbo C 2.01 dialect of C.

    About supporting C90, note that the standard obviously did its best to have existing C code be compatible with it. So it's not surprising Turbo C from 87 can build most C90 programs with minimal changes.