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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ecc38b3271b36b88 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: What is the warning about builtin-function on gcc-4.6.0 ? Date: Sun, 27 Mar 2011 23:42:45 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <0ea88302-a755-4a61-bf5b-728469c9d5d2@34g2000pru.googlegroups.com> Reply-To: anon@anon.org NNTP-Posting-Host: dOBoIx+PD+beWpKHe+1+Vw.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: g2news1.google.com comp.lang.ada:18526 Date: 2011-03-27T23:42:45+00:00 List-Id: In <0ea88302-a755-4a61-bf5b-728469c9d5d2@34g2000pru.googlegroups.com>, ytomino writes: >On Mar 27, 9:00=A0pm, a...@att.net wrote: >> Using C you may need to also change the first underscore or remove both >> such as >> >> =A0 pragma Import (C, isfinite, "_builtin_isfinite"); > >$ /usr/local/bin/gcc-4.6.0/gnatmake test1 >gcc -c test1.adb >gnatbind -x test1.ali >gnatlink test1.ali >Undefined symbols: > "__builtin_isfinite", referenced from: > __ada_test1 in test1.o > __ada_test1 in test1.o >ld: symbol(s) not found >collect2: ld returned 1 exit status >gnatlink: error when calling /usr/local/bin/gcc-4.6.0/gcc >gnatmake: *** link failed. > >> or >> =A0 pragma Import (C, isfinite, "builtin_isfinite"); > >$ /usr/local/bin/gcc-4.6.0/gnatmake test1 >gcc -c test1.adb >gnatbind -x test1.ali >gnatlink test1.ali >Undefined symbols: > "_builtin_isfinite", referenced from: > __ada_test1 in test1.o > __ada_test1 in test1.o >ld: symbol(s) not found >collect2: ld returned 1 exit status >gnatlink: error when calling /usr/local/bin/gcc-4.6.0/gcc >gnatmake: *** link failed. > >In the first, libc.a (or libm.a) does not have the body of "isfinite" >function. >gcc expands builtin-functions to inline-assembly code. >To tell the truth, libm.a has "_isfinite", but that is unused to call >"__builtin_isfinite". >Please make sure with nm. forgot tyo make the c code a function: int _gnat_builtin_isfinite ( x ) long x ; { return __builtin_isfinite ( x ) ; }