Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: peltz@cerl.uiuc.edu (Steve Peltz)
Subject: Re: Alpha compiler bug
Date: 14 Feb 1995 19:08:30 GMT	[thread overview]
Message-ID: <3hqv3e$qb2@vixen.cso.uiuc.edu> (raw)
In-Reply-To: id.M3CH1.QJF@nmti.com

In article <id.M3CH1.QJF@nmti.com>, Peter da Silva <peter@nmti.com> wrote:
>In article <3houb5$8cr@vixen.cso.uiuc.edu>,
>Steve Peltz <peltz@cerl.uiuc.edu> wrote:
>> Expression such as:
>> 	(temp = a + b, temp * (a + b)) + (temp = c + d, temp * (c + d))
>
>This is actually undefined behaviour for ANSI. All the comma operators
>guarantee is that "temp = a + b" will be evaluated before "temp * (a + b)",
>and similarly for the second expression.

Is this true for an argument list as well? My actual problem occurred
when I tried to pass the two subexpressions to a function, rather than
add them together.

Is there any way to force the order for something like this? This is actually
a macro expansion, where in the general case it needs to look like a single
expression (it might be a macro expansion, or it might be a function call).
-- 
Steve Peltz
tricorn@uiuc.edu


  reply	other threads:[~1995-02-14 19:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3houb5$8cr@vixen.cso.uiuc.edu>
1995-02-14  8:01 ` Alpha compiler bug David Gelhar
1995-02-15  9:57   ` Ronald F. Guilmette
1995-02-14 14:21 ` Stefan Monnier
1995-02-14 17:15 ` Peter da Silva
1995-02-14 19:08   ` Steve Peltz [this message]
1995-02-16 17:50     ` Peter da Silva
1995-02-18 17:53       ` Dan Pop
1995-02-14 19:45 ` Dave Hill
1995-02-21 17:37   ` HP LJ4M on OSF/3 Tadhg McCarthy
1995-02-21 17:41   ` PCL files on a HP4M printer Tadhg McCarthy
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox