Re: lcc-win32
On Mon, 11 Oct 2004 21:56:37 +0200, jacob navia
<jacob@jacob.re mcomp.fr> wrote:
[color=blue]
> Mike Wahler wrote:
>[color=green]
> > "jacob navia" <jacob@jacob.re mcomp.fr> wrote in message
> > news:416ae03e$0 $26698$8fcfb975 @news.wanadoo.f r...
> >[color=darkred]
> >>Mike Wahler wrote:
> >>A library standard doesn't have any impact in the language.[/color]
> >
> >
> > But it does impact an implementation, which does have
> > a practical impact: E.g. storage space required, gobbling
> > up more names, etc.
> >[/color]
> No. You do not want it?
> Do not include
> #include <stdlist.h>
> <snip> If you do not use the floating
> point library (math.h) you just do not write:
> #include <math.h>
> and all names are still available to you and it is a legal
> program.[/color]
Not really. All standard library function names are reserved with
external linkage whether or not you #include their declarations and/or
ever reference them. You can't legally write your own sin() or fopen()
or whatever. (At least on a hosted implementation. ) Some (many?)
implementations do allow you to provide your own routines, which are
selected in preference to the standard one(s), as long as you don't
interfere with library internals. As a practical matter most of the
math routines stand pretty much alone, except for setting errno, and
overridng them has a fairly good chance of working but not standard.
[color=blue]
> You can then write:
> myfloat mysin(myfloat arg);
> and you can code the sinus function using only integer operations
> and table lookups.
>[/color]
That's true, since it uses a different name than the standard one. You
could do that even if you DID #include <math.h>.
- David.Thompson1 at worldnet.att.ne t
On Mon, 11 Oct 2004 21:56:37 +0200, jacob navia
<jacob@jacob.re mcomp.fr> wrote:
[color=blue]
> Mike Wahler wrote:
>[color=green]
> > "jacob navia" <jacob@jacob.re mcomp.fr> wrote in message
> > news:416ae03e$0 $26698$8fcfb975 @news.wanadoo.f r...
> >[color=darkred]
> >>Mike Wahler wrote:
> >>A library standard doesn't have any impact in the language.[/color]
> >
> >
> > But it does impact an implementation, which does have
> > a practical impact: E.g. storage space required, gobbling
> > up more names, etc.
> >[/color]
> No. You do not want it?
> Do not include
> #include <stdlist.h>
> <snip> If you do not use the floating
> point library (math.h) you just do not write:
> #include <math.h>
> and all names are still available to you and it is a legal
> program.[/color]
Not really. All standard library function names are reserved with
external linkage whether or not you #include their declarations and/or
ever reference them. You can't legally write your own sin() or fopen()
or whatever. (At least on a hosted implementation. ) Some (many?)
implementations do allow you to provide your own routines, which are
selected in preference to the standard one(s), as long as you don't
interfere with library internals. As a practical matter most of the
math routines stand pretty much alone, except for setting errno, and
overridng them has a fairly good chance of working but not standard.
[color=blue]
> You can then write:
> myfloat mysin(myfloat arg);
> and you can code the sinus function using only integer operations
> and table lookups.
>[/color]
That's true, since it uses a different name than the standard one. You
could do that even if you DID #include <math.h>.
- David.Thompson1 at worldnet.att.ne t
Comment