stack quirk?

Tom Rombouts tomr at ashtate
Wed Aug 1 09:29:34 AEST 1990


In article <359 at taumet.com> steve at taumet.com (Stephen Clamage) writes:
>brianh at hpcvia.CV.HP.COM (brian_helterline) writes:
>
>|>printf("\n%d %d\n", ++i, ++i);
>
>There is no guarantee in what order ++i and i++ will be evaluated,

Just to tie this into the recent "value of lint" thread, this is
exactly the type of thing that a good lint will flag.  ("Warning:
expression depends on order of evaluation", etc.)  Readers of this
group may remember a "bug" fragment of code from MSC 5.1 to 6.0
that seemed to operate differently a few months ago that Gimpel
PC-Lint correctly flagged.

Tom Rombouts  Torrance Techie  tomr at ashtate.A-T.com  V:(213) 538-7108



More information about the Comp.lang.c mailing list