From: nmm1 on
In article <1jln8x1.1krz2eb1nec77aN%nospam(a)see.signature>,
Richard Maine <nospam(a)see.signature> wrote:
>>
>> >I recall a J3 meeting from nearly 2 decades ago where a presentation was
>> >made in committee about some of the brokenness. My (possibly flawed)
>> >recollection of the general reaction was something like...
>>
>> I very strongly disagree with that, and many other people did at the
>> time, and earlier and later. The problem isn't that it isn't very
>> serious, but that it's damn near unfixable, and the reason that you
>> may not have seen any pressure is precisely because the people who
>> had tried had given up and the new crop wasn't ripe.
>
>Just to clarify. I'm not saying I personally agreed with that position.
>I think I'll just abstain without trying to even advocate a personal
>position at all. I was just describing my perception of what I saw as
>the reaction of at least quite a few other people on the committee. Part
>of why I recall it so vividly is that it was not a reaction that I found
>pleasing. Of course, it is easy for that kind of perception of other
>people's opinions to be wrong, but do note that as being what I was
>attempting to describe.

Sorry - I misunderstood!

We are certainly agreed that it's a foul problem and isn't likely
to be fixed ....


Regards,
Nick Maclaren.
From: gmail-unlp on
First: thank you very much for sharing your ideas. I know I'm not
going to learn the fine points of function side effect issues from a
usenet thread, but I don't have access to any of the people who know
the most about the subject. And I think in this usenet group there are
some people who know at least very much... and definitely much more
than me.

I really like
> the people who know the most about the subject are
> also likely to be the ones who know better than to
> argue about it
I think I'll use this in the future.

About standards and discrepancies:
Interesting... there are definitions in the standards which do not
seem to be useful at all... I don't have problems to accept compiler
(or processor, to be standard compliant) dependences, but I don't see
as many such warnings as it should be... maybe I didn't see the
standards deeply enough... and now I don't know if it's worth... of
course I'll be more careful looking/avoiding things like side effects
and verifying how the processor I'm using "understands" my code... and
this seems to be arcane.

Do you think we have to leave the text in C.4.2 as those processor
dependent issues?

About side effects and
> It's wrong, anyway, as you might expect. The last
> sentence applies only to C-like languages ...
I think we know better than to argue about it

Thank you again.

From: Thomas Koenig on
On 2010-07-15, Richard Maine <nospam(a)see.signature> wrote:

> If you are actually a compiler writer, then you probably need to dig
> into some of the issues a lot more deeply.

Assume, for the moment, that a compiler writer turns to Usenet
for some guidance on whether a particular optimization that sounds
plausible is indeed misguided ;-)

Let's say the compiler writer introduces an optimizatio that
replaces an expression like

b = f(x) + f(x)

with

aux = f(x)
b = aux + aux

even if f is not known to be PURE?

Would that compiler writer introduce a bug into his/her compiler?
From: nmm1 on
In article <i1nr9c$2r5$1(a)newsreader5.netcologne.de>,
Thomas Koenig <tkoenig(a)netcologne.de> wrote:
>On 2010-07-15, Richard Maine <nospam(a)see.signature> wrote:
>
>> If you are actually a compiler writer, then you probably need to dig
>> into some of the issues a lot more deeply.
>
>Assume, for the moment, that a compiler writer turns to Usenet
>for some guidance on whether a particular optimization that sounds
>plausible is indeed misguided ;-)
>
>Let's say the compiler writer introduces an optimizatio that
>replaces an expression like
>
> b = f(x) + f(x)
>
>with
>
> aux = f(x)
> b = aux + aux
>
>even if f is not known to be PURE?
>
>Would that compiler writer introduce a bug into his/her compiler?

No.


Regards,
Nick Maclaren.
From: glen herrmannsfeldt on
nmm1(a)cam.ac.uk wrote:
> In article <i1nr9c$2r5$1(a)newsreader5.netcologne.de>,
> Thomas Koenig <tkoenig(a)netcologne.de> wrote:
(snip)

>>Let's say the compiler writer introduces an optimizatio that
>>replaces an expression like

>> b = f(x) + f(x)

>>with

>> aux = f(x)
>> b = aux + aux

>>even if f is not known to be PURE?

>>Would that compiler writer introduce a bug into his/her compiler?

> No.

OK, but how about:

a = f(x)
b = a+f(x)
with
b = 2*f(x)

Or even more:

a=0
do i=1,10
a=a+f(x)
enddo

with a=10*f(x)

-- glen