From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21898 invoked by alias); 12 Jun 2007 21:55:59 -0000 Received: (qmail 21890 invoked by uid 22791); 12 Jun 2007 21:55:58 -0000 X-Spam-Check-By: sourceware.org Received: from www.design-und-bits.de (HELO butan180.server4free.de) (62.75.177.180) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Jun 2007 21:55:55 +0000 Received: from penner.goldach.test (mnch-4db018ae.pool.einsundeins.de [77.176.24.174]) (authenticated bits=0) by butan180.server4free.de (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l5CLtpSP019618 for ; Tue, 12 Jun 2007 23:55:51 +0200 Received: from localhost (localhost [127.0.0.1]) by penner.goldach.test (Postfix) with ESMTP id 20AF41F62C for ; Tue, 12 Jun 2007 23:55:35 +0200 (CEST) Received: from penner.goldach.test ([127.0.0.1]) by localhost (penner.goldach.test [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20631-02 for ; Tue, 12 Jun 2007 23:55:32 +0200 (CEST) Received: from [192.168.135.98] (skunk.goldach.test [192.168.135.98]) by penner.goldach.test (Postfix) with ESMTP for ; Tue, 12 Jun 2007 23:55:32 +0200 (CEST) Message-ID: <466F1653.6080508@redflo.de> Date: Tue, 12 Jun 2007 22:41:00 -0000 From: Florian Gleixner User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: dealing with built-in functions Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg00161.txt.bz2 Hi, i try to fugure out what is the "best way". The following code throws a warning: #include #include int main(void) { double x=1.7; printf("%f %f",x,round(x)); } gcc r.c -lm r.c: In function 'main': r.c:9: warning: incompatible implicit declaration of built-in function 'round' I can avoid this by using the compiler switch -fno-builtin. But as far as i understand, the built in functions are optimized. So if i use -fno-builtin, i lose some cycles? I can also put at line 3: extern double round(double); and then i don't need the -fno-builtin. But what does that mean? Which round() do i use then? Can i avoid the warning if i use other types of variables - i don't know how the built-in round() is defined. Other thoughts? Thank you! Flo