comp.lang.ada
 help / color / mirror / Atom feed
* What is the warning about builtin-function on gcc-4.6.0 ?
@ 2011-03-26  6:32 ytomino
  2011-03-26  8:45 ` Florian Weimer
  2011-03-26 22:22 ` anon
  0 siblings, 2 replies; 39+ messages in thread
From: ytomino @ 2011-03-26  6:32 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2011-03-30 19:28 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-26  6:32 What is the warning about builtin-function on gcc-4.6.0 ? ytomino
2011-03-26  8:45 ` Florian Weimer
2011-03-26  9:13   ` ytomino
2011-03-26  9:43     ` Florian Weimer
2011-03-26 10:07       ` ytomino
2011-03-26 10:24         ` Florian Weimer
2011-03-26 15:14           ` Dmitry A. Kazakov
2011-03-26 21:36             ` ytomino
2011-03-27  9:50               ` Dmitry A. Kazakov
2011-03-26 14:50         ` Simon Wright
2011-03-26 15:50           ` Florian Weimer
2011-03-26 16:32             ` Simon Wright
2011-03-26 17:02               ` Florian Weimer
2011-03-26 17:48                 ` Simon Wright
2011-03-26 18:48                   ` Florian Weimer
2011-03-27  2:08                 ` Randy Brukardt
2011-03-27  8:37                   ` Florian Weimer
2011-03-27 16:41                     ` Robert A Duff
2011-03-27 17:21                       ` Florian Weimer
2011-03-27 17:56                         ` Robert A Duff
2011-03-27 16:51                     ` Robert A Duff
2011-03-27 17:05                       ` Florian Weimer
2011-03-27 17:14                         ` Robert A Duff
2011-03-29  2:20                           ` Randy Brukardt
2011-03-29 18:35                             ` Robert A Duff
2011-03-29 23:35                               ` Randy Brukardt
2011-03-30  1:02                               ` Adam Beneschan
2011-03-30 12:57                                 ` Robert A Duff
2011-03-30 14:41                                   ` Adam Beneschan
2011-03-30 18:39                                     ` Robert A Duff
2011-03-30 19:28                                   ` Randy Brukardt
2011-03-26 21:58       ` ytomino
2011-03-26 22:00         ` Florian Weimer
2011-03-26 22:22 ` anon
2011-03-26 22:36   ` ytomino
2011-03-27 12:00     ` anon
2011-03-27 18:50       ` ytomino
2011-03-27 23:35         ` anon
2011-03-27 23:42         ` anon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox