From mboxrd@z Thu Jan 1 00:00:00 1970 From: dwalker@doomd.net (Derrik Walker v2.0) Date: Wed, 31 Dec 2014 02:52:46 -0500 Subject: [TUHS] K&R C on a modern Linux box? ( was Re: I swear! I rtfm'ed ) In-Reply-To: References: <0CD3A100-6CDD-449C-8FD0-A3F93F421A0D@tuhs.org> <54A36066.6080001@mhorton.net> <1420005743.2068.5.camel@doomd.net> Message-ID: <1420012366.2068.13.camel@doomd.net> On Wed, 2014-12-31 at 01:16 -0500, Jacob Ritorto wrote: > Hey, thanks, Derrik. > I don't mess with Linux much (kind of an Illumos junkie by trade ;), > but I bet gcc would. I did out of curiosity do it with the Macintosh > cc (Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)) > and it throws warnings about our not type-defining functions because > you're apparently supposed to do this explicitly these days, but it > dutifully goes on to assume int and compiles our test K&R stuff mostly > fine. It does unfortunately balk pretty badly at the naked returns we > initially had, though. Wish it didn't because it strikes me as being > beautifully simple.. > It compiles and runs with no warnings or any issues with gcc 4.9.2 on Fedora 21. Like so many x-gener Linux guys, I was a UNIX guy in the early '90's, and just fell into Linux. So, you are running BSD 2.11, on a real PDP-11 ( or is it a VAX ), in your house? Or are you using an emulator? Either way, that's still probably no small feat. I have a Mac Plus emulator ( MiniVMac ) that I installed MachTen on, just to see if I could get it running, and it works. ( MachTen is this odd sort of UNIX that was available for the Mac in the '90's, that runs on top of Mac OS ). > > thx again for the encouragement! > jake > No problem. Anyone getting the younger ones into the older technology is good! - Derrik