Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn )
Newsgroups: comp.lang.c
Subject: Re: Does your compiler get this program right?
Message-ID: <9018@smoke.BRL.MIL>
Date: 30 Nov 88 18:59:22 GMT
References: <4082@cs.utexas.edu> <350@lakart.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) )
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 12

In article <350@lakart.UUCP> dg@lakart.UUCP (David Goodenough) writes:
-In particular, if I say
-	extern char *zoot();
-	*(zoot()) += '\001';
-and zoot() gets called twice in evaluating the above statement, then I'm
-going to ditch my C compiler because it's broken. If the standard says that
-zoot() can be called twice, then I'm going to ignore the standard, because
-IT'S broken.

The Standard has this right.  The problem reported, *f++ += *g++; causing
f to be incremented twice, is clearly wrong.  In fact it's a bug in many
versions of PCC.