www.digitalmars.com         C & C++   DMDScript  

c++ - Free-Standing Code

reply Me <Me_member pathlink.com> writes:
I was wondering if someone could answer this.  Is there a way generate
free-standing code (no exception handling, no run time type information, no
dynamic memory allocation[new, delete], and no use of the standard library) with
the Digital Mars compiler?  
The reason I ask is that I am creating a little pet OS project and the kernal I
am making won't have run-time support for those.  Thanks. 
Aug 03 2004
parent reply "Walter" <newshound digitalmars.com> writes:
"Me" <Me_member pathlink.com> wrote in message
news:ceoco6$1b1u$1 digitaldaemon.com...
 I was wondering if someone could answer this.  Is there a way generate
 free-standing code (no exception handling, no run time type information,
no
 dynamic memory allocation[new, delete], and no use of the standard
library) with
 the Digital Mars compiler?
 The reason I ask is that I am creating a little pet OS project and the
kernal I
 am making won't have run-time support for those.  Thanks.
Sure. The complete library source comes with the DMC++ CD, and you can stub and modify to suit.
Aug 03 2004
parent reply Me <Me_member pathlink.com> writes:
I only have the DMC++ version that is available on the website.

I found some of the info I was looking for by nosing through the DM website.

It looks like run time type information and exception handling are disabled by
default.

Will the DM compiler put support for dynamic memory allocation and the standard
library in the code if I don't use it in the source?



In article <ceoeih$1bvm$1 digitaldaemon.com>, Walter says...
"Me" <Me_member pathlink.com> wrote in message
news:ceoco6$1b1u$1 digitaldaemon.com...
 I was wondering if someone could answer this.  Is there a way generate
 free-standing code (no exception handling, no run time type information,
no
 dynamic memory allocation[new, delete], and no use of the standard
library) with
 the Digital Mars compiler?
 The reason I ask is that I am creating a little pet OS project and the
kernal I
 am making won't have run-time support for those.  Thanks.
Sure. The complete library source comes with the DMC++ CD, and you can stub and modify to suit.
Aug 03 2004
parent "Walter" <newshound digitalmars.com> writes:
"Me" <Me_member pathlink.com> wrote in message
news:cep33g$1n0i$1 digitaldaemon.com...
 I only have the DMC++ version that is available on the website.
To get the full library source, you'll need the DMC++ CD from www.digitalmars.com/shop.html.
 I found some of the info I was looking for by nosing through the DM
website.
 It looks like run time type information and exception handling are
disabled by
 default.
Yes.
 Will the DM compiler put support for dynamic memory allocation and the
standard
 library in the code if I don't use it in the source?
Of course, if you call to 'new' in your code, the compiler must insert a call to something that allocates memory. If you don't, it won't.
Aug 03 2004