This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: basic-improvements merge status
- From: Jan Hubicka <jh at suse dot cz>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, Zack Weinberg <zack at codesourcery dot com>,gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, rth at cygnus dot com
- Date: Mon, 16 Dec 2002 23:44:39 +0100
- Subject: Re: basic-improvements merge status
- References: <20021216222302.GC3138@kam.mff.cuni.cz> <200212162238.RAA31382@makai.watson.ibm.com>
> >>>>> Jan Hubicka writes:
>
> >> #ifndef HAVE_SINF
> >> float
> >> sinf(float x)
> >> {
> >> return (float) sin(x);
> >> }
> >> #endif
> >>
> >> is being compiled as
>
> Jan> I think we can deal with -fno-builtin-fsin to avoid gcc from being
> Jan> active on optimizing this.
> Jan> The name sinf is reserved by C90 standard, so this is not valid C.
>
> float
> foo (float x)
> {
> return (float) sin(x);
> }
>
> always should be valid without the user having to specify -fno-builtin, as
> your change requires on systems without sinf(). stubs.c could be compiled
As I've mentined I am handling this with the other patch that disables
the transfomration for C90 until we decide how to detect such systems.
On C99 and C++ it is always valid as runtime is required to have it (and
thats why libstdc++ does it). I hope Richard will have time to take a
look on these patches soon.
I am not configure expert, but can I detect the runtime library
properties in it? (when we are building without glibc, we need to
rebuild anyway at least on Linux bootstrap, so this should be possible)
Other way would be to use target macro. Something like
TARGET_C99_RUNTIME. Ideal would be to push these functions into libgcc,
but I am not quite sure how this can be done (ie so they will be
overwriten by runtime).
What sounds sane?
Honza
> with -fno-builtin, but that's just covering up the incorrect assumption in
> the transformation.
>
> David