Amarendra said:
Hi,
I am working on a legacy user space app, which has been developed
entirely in C, some 15 years ago. Needless to say, it does not even
partially conform to any standard.
"Some fifteen years ago?" That would be, let's see,
2004
-15
____
1989
Now, where have I seen that number before? Ah, yes: it
was the adoption date of the very first C Standard, the one
that gave rise to the still-used moniker "ANSI C." Why in
the world would new code being written in that year fail to
take the new Standard into account?
Aha! It's now January, and in January of 1989 the not-
yet-Standard was still in draft form (still with `noalias')
and had not yet been formally adopted. So it's entirely
understandable that your programmers chose to ignore it; it
was a whole ten months in the future, after all, so what
difference could it make? Why slow down the slash-and-burn
coding effort by wasting thought on the remote future?
True, it was the case in 1989 and even for three or four
years thereafter that Standard-conforming implementations
were less widely available and more bug-ridden than one could
have hoped. Still, even those of us who will never be called
geniuses could see that conforming implementations were on
the way and would be Good Things when they arrived -- and
we started writing in such a way as to be ready when the
Great Day dawned. The original authors of your code seem to
have chosen to sleep through that dawn; perhaps they were the
spiritual kindred of those who, to this day, inveigh against
the updated C99 Standard.