comparing translations of invalid source

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Quoted text here. Click to load it

Thank you for your question, sorry I do not understand it.

Do you agree the echo/ blech example is illegit and the fetch/ zero
example is legit?  Do you agree the echo/ blech example is illegit
only because the implicit epilogue of blech may free the int i before
returning?

Can you restate your question less concisely?

Meanwhile, I can try to explain how I may be misunderstanding/
misusing c.a.e. jargon.  Above I have quoted myself in full, below I
say again less concisely what I meant to say before.  In Five points:

a) I'm thinking we can (and should?) educate people new to C language
law by studying the effects of source-to-source transformations.

We can compare and contrast the translations of similar or identical
sources, provided the translations exist, no matter whether some
printed C standard does or does not promise that two compliant
compilers whose hypothetical authors have actually already corrected
their last bugs will agree what the source means.

b) Translations exist, indeed appear massively distributed, for
plainly "invalid" source such as the example above.

c) C compilers translate syntactically invalid source into syntax
errors.

d) C compilers translate semantically invalid source into more
revealing constructs.  Possibly the result I have enjoyed most came
from a compiler who calmly produced an executable that called null
whenever a code path actually referenced a subroutine not found during
link.

e) I don't feel confident I have learned a parliamentary rule fully
until after I can teach someone else how to bend it usefully e.g. my
appreciation for <setjmp.h> increased when first I discovered the use
of the carefully "invalid" longjmp back to longjmp:

fibers in C across platforms, if abused without asm
http://plavarre.blog-city.com/read/433074.htm

Pat LaVarre

Re: comparing translations of invalid source
Quoted text here. Click to load it

Please try to keep your attributes together.  I have patched this
up.

Epilogue has no meaning to me.  I assume you mean returning the
address of automatic storage which is no longer in scope.  Nothing
is getting freed.  That is a beginners mistake.

The above was not the code I specified as invalid, however.  

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.
Re: comparing translations of invalid source
I soooooooooooooo don't get this.

Quoted text here. Click to load it

I do not know what "my attributes" are, nor that they were not
"together".
 
Quoted text here. Click to load it

Ouch.  I thought "epilogue" was standard compiler jargon.  By
"prologue" I mean the code that the compiler implicitly emits to be
executed as part of every entry to a subroutine.  By "epilogue" I mean
the code that the compiler implicit emits to be executed as part of
every exit from a subroutine.  Often compilers targetting
microcontrollers give people a way of saying please omit the prologue
and epilogue so that the body of a routine (esp. an interrupt handler)
can be nothing but inline asm.

Quoted text here. Click to load it

Yes.


Seemingly we're also speaking from two different traditions re the
verb "to free".

I say automatic storage is "automatic" because it is "allotted" by the
implicit prologue and "freed" by the implicit epilogue.  What do you
say?  "Acquired" and "released"?

Quoted text here. Click to load it

Not sure what you mean by "that".

I think you mean to say that only beginners frequently forget that the
implicit epilogue frees all their automatic storage.  I agree.  I
meant to be discussing the work of educating such beginners.

Quoted text here. Click to load it

Ouch now I am completely lost.  The view of your post that I saw that
said you spoke of this code as invalid was:

--- http://groups.google.com/groups?selm40%0480D6.6CFF887D%40yahoo.com

From: CBFalconer ( snipped-for-privacy@yahoo.com)
Subject: Re: whose 8051 cc overlays static inline stack frames
View: Complete Thread (28 articles)
Original Format
Newsgroups: comp.arch.embedded
Date: 2004-01-13 18:52:58 PST

Pat LaVarre wrote:
Quoted text here. Click to load it

How can you compare translations of invalid source?

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline