Re: Freestanding Environment
From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 03/05/04
- Next message: Kevin Bracey: "Re: semantics of loating point exception handling"
- Previous message: Jens.Toerring_at_physik.fu-berlin.de: "Re: Difference between strcpy() and strcat()?"
- In reply to: Keith Thompson: "Re: Freestanding Environment"
- Next in thread: Keith Thompson: "Re: Freestanding Environment"
- Reply: Keith Thompson: "Re: Freestanding Environment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 5 Mar 2004 12:21:44 GMT
In <lnsmgoyy5o.fsf@nuthaus.mib.org> Keith Thompson <kst-u@mib.org> writes:
>Dan.Pop@cern.ch (Dan Pop) writes:
>> In <lnwu61shp9.fsf@nuthaus.mib.org> Keith Thompson <kst-u@mib.org> writes:
>[...]
>> >Ahem.
>> >
>> >This is comp.lang.c. If someone asks about "freestanding
>> >environments" in this newsgroup, it's reasonable to assume that the
>> >question is about the C programming language, especially since the C99
>>
>> The question is relevant to C programming, even if it is not about the
>> C programming language. The C standard itself mentions the concept of
>> "freestanding environment", without elaborating on it, hence the OP's
>> question about concrete examples was legit. And a freestanding
>> environment is still a freestanding environment even if no C
>> implementation exists for it...
>
>Ok, you're at least partly correct. I had missed section 5.1.2,
>"Execution environments", which defines the terms "freestanding
>environment" and "hosted environment".
>
>But since "freestanding environment" is a term defined by the C
>standard, I'm not convinced that a freestanding environment (in the
>sense that the term should be used in this newsgroup) can exist in the
>absence of a C implementation. There can be non-C freestanding
>environments, just as the term "byte" can have a non-C meaning that
>may or may not match the C definition, but when we talk about "bytes"
>and "freestanding environments" here it should be with the
>understanding that we're using the terms as they're defined in the C
>standard.
Read the standard carefully. It doesn't really *define* the concept
of freestanding environment, it merely describes the particularities of
C implementations and C programs developed for such an environment.
Which are relevant only if a C implementation exists for that
environment, but the concept of freestanding environment is the same,
with or without a C implementation.
Too bad you didn't follow my advice to engage your brain.
>> >standard defines the term "freestanding implementation" in section 4,
>> >paragraph 6 (and the C90 standard defines the same term in section 4,
>> >paragraph 2). (I assumed you already knew that, since you replied to
>> >the question with useful information without complaining that the
>> >question was off-topic.)
>>
>> We were talking about "freestanding environment", not about "freestanding
>> implementation", which is something completely different.
>>
>> If you engage your brain, you may realise the difference...
>
>Certainly there's a difference, but I'd say there's a strong link
>between a "freestanding implementation" and a "freestanding
>environment" (and likewise for "hosted"). Off the top of my head, I'd
>say that a freestanding implementation provides a freestanding
>(runtime) environment. That statement may be imprecise or even wrong,
>so take it with a grain of salt.
It's dead wrong. The freestanding implementation is a set of software
tools:
3.12
1 implementation
particular set of software, running in a particular translation
environment under particular control options, that performs
^^^^^^^^^^^^^
translation of programs for, and supports execution of functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
in, a particular execution environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So, the execution environment exists independently of the C
implementation, because it is the C implementation that targets the
environment, rather than creating it.
Which makes sense: the microcomputer controlling the microwave oven
together with the interface between the microcomputer and the oven (which
are the execution environment) are not provided by any freestanding C
implementation.
This is why it makes perfect sense to talk about freestanding environment
even in the absence of a C implementation, without contradicting the C
standard in any way.
There is no way to tell the difference between a microwave oven
executing a C program and one executing a program written in any other
language. For the simple reason that what they *really* execute
is a machine code program which could have been written in *any*
programming language implemented for that execution environment.
><OT>
>On a personal note, I'm getting really tired of the "engage your
>brain" taunts.
You'd better take the advice seriously, instead of being tired of it.
>I don't expect you to do anything about it, but I just had to mention it.
></OT>
If you (realistically) don't expect me to do anything about it, what's
the point in mentioning it?
I put some serious thought in my posts and it is really annoying to see
them addressed in a superficial manner, as you did in this thread.
Dan
-- Dan Pop DESY Zeuthen, RZ group Email: Dan.Pop@ifh.de
- Next message: Kevin Bracey: "Re: semantics of loating point exception handling"
- Previous message: Jens.Toerring_at_physik.fu-berlin.de: "Re: Difference between strcpy() and strcat()?"
- In reply to: Keith Thompson: "Re: Freestanding Environment"
- Next in thread: Keith Thompson: "Re: Freestanding Environment"
- Reply: Keith Thompson: "Re: Freestanding Environment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|