Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!munnari.oz.au!bruce!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.std.c Subject: Re: call to revolt Message-ID: <6519@goanna.cs.rmit.oz.au> Date: 26 Jun 91 09:02:53 GMT References: Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 37 In article , rabson@physics.ubc.ca (David Rabson) writes: > Outlawing lvalue casts, however, borders on fascism. I have yet to see > a pre-ansi compiler that fails to treat properly > > void *thing; > ((int *)thing)++; > > (or, if it doesn't know about voids, the same thing with char *thing). Funny thing, I've been using C since V6+ UNIX (1979), and I have never ever had any reason to use one of these things. If you really want to accomplish the probable intended effect of that, thing = (void*)(1+(int*)thing); is legal, is it not? > I hereby invite the black-shirts from the ansi camp to explain their > prejudice against casting lvalues. It was never part of the language, and this is an area where X3J11 chose not to innovate. If you're going to moan about things which were never explicitly legal vanishing, how about my old favourite? Labels used to be usable as constants of type char*, so I could pass a label in a C function to an assembly-coded function. Great for speeding up threaded-code. But did the ANSI committee support that lovely old hack? No. Sob sob sob. Do I call them "black-shirts" for this? No. > The rest of us should stop sitting back and start fighting. If enough > customers insist on casting lvalues and otherwising ignoring ansi's > meddling in Kernighan's and Ritchie's work, vendors will create > correct, rather than compliant, compilers. It's attitudes like this that make me think about switching to Ada. -- I agree with Jim Giles about many of the deficiencies of present UNIX.