Declarations in switches, errors

Henry Spencer henry at utzoo.uucp
Sat Sep 30 15:20:00 AEST 1989


In article <637 at crdos1.crd.ge.COM> davidsen at crdos1.UUCP (bill davidsen) writes:
>It a feature with limited use even if it did work, but I am bothered by
>anything I can write which is legal but may not work the same way on all
>implementations...

If you want all legal constructs to work the same way in all implementations,
you are in the wrong newsgroup! :-)  C is *full* of things that are
implementation-specific to some degree or other.  The usual reason is
that most programs don't care about characteristic X, but want the code
to run fast, and pinning down characteristic X implies major speed loss
on some machines.

Actually, very few languages have the property you're after.  At the
very least, the detailed properties of floating-point arithmetic are
almost always implementation-defined.

And, as Doug has pointed out, ironically, the behavior of initializers at
the head of a case is not an example of this sort of thing.  Such
initializers *do* *not* get executed in any conforming implementation.
-- 
"Where is D.D. Harriman now,   |     Henry Spencer at U of Toronto Zoology
when we really *need* him?"    | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.std.c mailing list