Article View: comp.std.c
Article #4446Re: On sequence points and evaluation order
From: Christopher R. Volpe
Date: Fri, 08 Dec 1995 15:48
Date: Fri, 08 Dec 1995 15:48
36 lines
2274 bytes
2274 bytes
In article <4a6sjr$t1j@lyra.csx.cam.ac.uk>, nmm1@cus.cam.ac.uk (Nick Maclaren) writes: |>I recommend switching back to Pascal, if that is powerful enough for |>your purposes :-( It ain't, and I'm not yet convinced I need to. |> |>Not merely does the standard allow strange things to happen between |>semicolons, I'm not talking about signals, in case that's what you had in mind. |> but I can witness that a very high proportion of compilers |>actually produce such code. On the other hand, many of the really |>ghastly examples that I have seen are associated with signal-handling, |>which is something you can't do at all in standard Pascal (or Fortran, |>for that matter). Can you give me an example of the kind of code that compilers generate that indicates that something funny is going on between sequence points? |> |>In extreme cases (like the Cray YMP), not merely do I have to make an |>unreasonable proportion of my local variables static AND volatile, but |>I have to compile the most sensitive parts of my code without any |>optimisation at all. That particular example does not involve signal |>handling and shows that, even if the standard mandates a particular |>instruction ordering, it is unsafe to rely on it. If a particular buggy compiler refuses to accept identifiers with the prefix "_xyxy", does that make it unsave to use such identifiers in general? -- Chris Volpe Phone: (518) 387-7766 (Dial Comm 8*833 GE Corporate R&D Fax: (518) 387-6560 PO Box 8, Schenectady, NY 12301 Email: volpecr@crd.ge.com
Technical Details
Message-ID:
<4a9mnh$3hn@rdsunx.crd.ge.com>Path:
arc1-ca.pugleaf.net!bart.crd.ge.com!volpeReferences:
<49l428$od0@bolverk.cs.cornell.edu> <49ojjp$hsm@newshost.lanl.gov> <49qiu7$25h@natasha.rmii.com> <49v3ii$nve@rdsunx.crd.ge.com> <1995Dec6.000503.6676@sq.com> <TANMOY.95Dec5221739@qcd.lanl.gov> <4a6r9u$hq5@rdsunx.crd.ge.com> <4a6sjr$t1j@lyra.csx.cam.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!bart.crd.ge.com!volpe From: volpe@bart.crd.ge.com (Christopher R. Volpe) Newsgroups: comp.std.c Subject: Re: On sequence points and evaluation order Date: 8 Dec 1995 15:48:01 GMT Organization: GE Corporate Research & Development Sender: volpe@bart (Christopher R. Volpe) Distribution: world Message-ID: <4a9mnh$3hn@rdsunx.crd.ge.com> References: <49l428$od0@bolverk.cs.cornell.edu> <49ojjp$hsm@newshost.lanl.gov> <49qiu7$25h@natasha.rmii.com> <49v3ii$nve@rdsunx.crd.ge.com> <1995Dec6.000503.6676@sq.com> <TANMOY.95Dec5221739@qcd.lanl.gov> <4a6r9u$hq5@rdsunx.crd.ge.com> <4a6sjr$t1j@lyra.csx.cam.ac.uk> Reply-To: volpe@ausable.crd.ge.com NNTP-Posting-Host: bart.crd.ge.com