hosted and freestanding implementations

S

subramanian100in

The ISO/IEC-14882:2003 document mentions the following in the section
"1.4 Implementation Compliance" paragraph 7:

"Two kinds of implementations of defined:hosted and freestanding. For
a hosted implementation, this International Standard defines the set
of available libraries. A freestanding implementation is one in which
the execution may take place without the benefit of an operating
system, and has an implementation-defined set of libraries that
includes certain language-support libraries(17.4.1.3)"

From the above definition, I am unable to understand what is a hosted
implementation and and what is a freestanding implementation. Kindly
explain these two kinds of implementations.

I am using g++3.4.3 under Redhat Enterprise Linux on an Intel-x86
based PC. Kindly let me know whether this implementation is a hosted
implementation or a freestanding implementation.

Thanks
V.Subramanian
 
V

Victor Bazarov

The ISO/IEC-14882:2003 document mentions the following in the section
"1.4 Implementation Compliance" paragraph 7:

"Two kinds of implementations of defined:hosted and freestanding. For
a hosted implementation, this International Standard defines the set
of available libraries. A freestanding implementation is one in which
the execution may take place without the benefit of an operating
system, and has an implementation-defined set of libraries that
includes certain language-support libraries(17.4.1.3)"

From the above definition, I am unable to understand what is a hosted
implementation and and what is a freestanding implementation. Kindly
explain these two kinds of implementations.

I am using g++3.4.3 under Redhat Enterprise Linux on an Intel-x86
based PC. Kindly let me know whether this implementation is a hosted
implementation or a freestanding implementation.

Hosted implementation: running on (or under) an operating system. Your
computer has an independent operating system, so the implementation is
indeed a hosted one. Also, the resulting executable is going to be
hosted as well since it's not capable of running on a computer without
an operating system.

V
 
J

James Kanze

Hosted implementation: running on (or under) an operating
system. Your computer has an independent operating system, so
the implementation is indeed a hosted one. Also, the
resulting executable is going to be hosted as well since it's
not capable of running on a computer without an operating
system.

That's certainly the intent: that a freestanding implementation
can run without the underlying support of an operating system,
say by being burned into a PROM. There are, however, some
differences between the two languages: a freestanding system
uses an implementation defined means of start-up, rather than
main; a freestanding system might require you to provide a
function called _tmain, for example, rather than main, and it
might provide the argument list in wchar_t rather than char.
And while the intent is to support systems without an OS, the
freestanding implementation can place pretty much any
requirements on the environment that it wants.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top