From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ecc38b3271b36b88,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!34g2000pru.googlegroups.com!not-for-mail From: ytomino Newsgroups: comp.lang.ada Subject: What is the warning about builtin-function on gcc-4.6.0 ? Date: Fri, 25 Mar 2011 23:32:43 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 114.164.26.2 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1301121163 8536 127.0.0.1 (26 Mar 2011 06:32:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 26 Mar 2011 06:32:43 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 34g2000pru.googlegroups.com; posting-host=114.164.26.2; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19428 Date: 2011-03-25T23:32:43-07:00 List-Id: Hello. gcc-4.6.0 was released! I'm trying to compile my code with gcc-4.6.0, and I found a strange warning at using built-in functions of gcc. The minimal code is here: with Ada.Text_IO; procedure test1 is function isfinite (X : Long_Float) return Integer; pragma Import (Intrinsic, isfinite, "__builtin_isfinite"); begin -- 10 is finite value, it puts 1 Ada.Text_IO.Put_Line (Integer'Image ( isfinite (Long_Float'Value ("10")))); -- 10 / 0 is infinite, it puts 0 Ada.Text_IO.Put_Line (Integer'Image ( isfinite (Long_Float'Value ("10") / Long_Float'Value ("0")))); end test1; $ /usr/local/bin/gcc-4.5.2/gnatmake test1 gcc -c test1.adb gnatbind -x test1.ali gnatlink test1.ali ~/projects/exam/ada/compiler/builtin $ /usr/local/bin/gcc-4.6.0/gnatmake test1 gcc -c test1.adb test1.adb:3:13: warning: profile of "isfinite" doesn't match the builtin it binds <- this warning gnatbind -x test1.ali gnatlink test1.ali I tried changing the prototype again and again, function isfinite (X : Long_Float) return Integer; function isfinite (X : Long_Float) return Boolean; function isfinite (X : Float) return Integer; function isfinite (X : Long_Long_Float) return Integer; ...etc... but I could not erase this warning... Can anyone erase this warning ? Thank you. -- Yuta Tomino