Date: Wed, 02 Mar 2005 16:22:13 +0000 From: Chris Hodgins <chodgins@cis.strath.ac.uk> To: Florian Hengstberger <e0025265@student.tuwien.ac.at> Cc: FreeBSD mailinglist <freebsd-questions@freebsd.org> Subject: Re: c standard Message-ID: <4225E835.5050406@cis.strath.ac.uk> In-Reply-To: <icqfqw.8f29so@webmail.tuwien.ac.at> References: <icqfqw.8f29so@webmail.tuwien.ac.at>
next in thread | previous in thread | raw e-mail | index | archive | help
Florian Hengstberger wrote:
> Following is possible with gcc and g++:
>
> #include <math.h>
>
> double sin(double)
> {
> return 1;
> }
>
> int main()
> {
> sin(1);
> return 1;
> }
>
> Why I don't get any warnings like:
>
> sin prevously defined in math.h ...
>
> when I compile with -Wall -pedantic -ansi.
>
> Why is it possible to overwrite the definition of sin,
> is this part of the standard?
>
> Secondly the definition (not declaration) of double sin(double)
> misses a variable!
> Is this ok, when the variable is not referenced in the code?
>
> Thanks in advance,
> Florian
>
> ------------------------------------------------------
> Linux/BSD: The daemons are not longer just in my head!
> ------------------------------------------------------
> Florian Hengstberger
> e0025265@student.tuwien.ac.at
> http://stud3.tuwien.ac.at/~e0025265
> ------------------------------------------------------
>
>
>
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>
I would address your question to the comp.lang.c newsgroup. They are
very knowledgable about such things.
Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4225E835.5050406>
