Shouldn't ANSI have provided nonvolatile instead of volatile?

Henry Spencer henry at utzoo.uucp
Tue Feb 13 05:23:43 AEST 1990


In article <17910 at rpp386.cactus.org> woody at rpp386.cactus.org (Woodrow Baker) writes:
>I wish that there had been more notice, or information as to when the
>standards meetings were held, or that they had gotten a wider input.

It was fairly widely publicized in the C community at the time, actually.

>They virtually ignored the needs of control programmers.

Looking at the list of X3J11 members, I really doubt this -- there is
no shortage of people there from companies with very heavy involvement
in such things.

>Flexible way to declare a function as an interrupt handler.
>I like Turbo 'C's modifier of      interrupt.

Unfortunately very machine-specific.  No, not all machines have interrupts
resembling those of the 8086.  This is also an area where a little bit of
assembly-language glue -- often necessary anyway -- goes a very long way
to solving the problem.

>It simply brackets the entire function with a push all registers, and
>restore all registers.  The definition of it would be:  saves the 
>entire working register set of the machine and restores it on exit.

This is vast overkill for interrupts on, say, the AMD 29000 -- a machine
being sold primarily to the high-end control market, and one that is noted
for blazing-fast interrupt handling.  Actually, many modern processor
architectures (the 8086 and descendants do not qualify!) have special
provisions for very-low-latency interrupts that would be ill-served by
such a feature.

>QUADS.	I.E. double longs.

The "common extensions" discussion in the appendix mentions "long long int"
among other things.  I think the major problem here was simply that there
was little experience with it.  Pity.

>FIXED  i.e. fixed point math.  This type would deal with chars,ints, longs
>and quads.  There would be an assumed binary point in the middle of the
>data...

But *I* want the assumed binary point three bits from the right! :-)  This
whole area is a massive swamp of conversion rules, overflow handling, etc.
I doubt that anyone has ever added this to C, and I think there is good
reason to fear the consequences.  Despite some of the uninformed flaming,
very little of what's in ANSI C is actually X3J11 inventions:  almost all
of it has actually been tried, and proven workable, in some C compiler
somewhere.  This is important.  The few things that *were* X3J11 inventions
are among the worst botches in the standard.
-- 
SVR4:  every feature you ever |     Henry Spencer at U of Toronto Zoology
wanted, and plenty you didn't.| uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list