From owner-freebsd-questions@FreeBSD.ORG Wed Mar 2 16:17:06 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7192B16A4CE for ; Wed, 2 Mar 2005 16:17:06 +0000 (GMT) Received: from smtphost.cis.strath.ac.uk (smtphost.cis.strath.ac.uk [130.159.196.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DA9043D31 for ; Wed, 2 Mar 2005 16:17:05 +0000 (GMT) (envelope-from chodgins@cis.strath.ac.uk) Received: from [192.168.1.4] (82-133-115-69.dyn.gotadsl.co.uk [82.133.115.69]) j22GGuF2004408; Wed, 2 Mar 2005 16:16:56 GMT Message-ID: <4225E835.5050406@cis.strath.ac.uk> Date: Wed, 02 Mar 2005 16:22:13 +0000 From: Chris Hodgins User-Agent: Mozilla Thunderbird 1.0 (X11/20050204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Florian Hengstberger References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CIS-MailScanner-Information: Please contact support@cis.strath.ac.uk for more information X-CIS-MailScanner: Found to be clean X-CIS-MailScanner-SpamCheck: not spam, SpamAssassin (score=1.052, required 6, MAILTO_TO_SPAM_ADDR 1.05) X-CIS-MailScanner-SpamScore: s X-CIS-MailScanner-From: chodgins@cis.strath.ac.uk cc: FreeBSD mailinglist Subject: Re: c standard X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2005 16:17:06 -0000 Florian Hengstberger wrote: > Following is possible with gcc and g++: > > #include > > 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