On Tue, Feb 04, 2014 at 04:36:22AM -0500, Mayuresh Kathe wrote:
> hello,
> 
> i was fiddling around with ada95 under openbsd 5.4 using gnat-4.6.
> 
> i created a sample program as below.
> ----
> with Ada.Text_IO;
> use  Ada.Text_IO;
> 
> procedure Hello is
>       -- no variables required
> begin
>       Put_Line ("Hello, world!");
> end Hello;
> ----
> 
> the code compiled (not cleanly) and gave me an executable.
> the messages thrown up during compilation are below.
> ----
> egcc -c hello.adb
> gnatbind -x hello.ali
> gnatlink hello.ali
> /usr/local/lib/gcc/x86_64-unknown-openbsd5.4/4.6.4/adalib/libgnat.a(adaint.o)(.text+0x3f3):
>  In function `__gnat_os_filename':
> /usr/obj/gcc-4.6.4/build-amd64/gcc/ada/rts/adaint.c:714: warning: strcpy() is 
> almost always misused, please use strlcpy()
> /usr/local/lib/gcc/x86_64-unknown-openbsd5.4/4.6.4/adalib/libgnat.a(cstreams.o)(.text+0x12c):
>  In function `__gnat_full_name':
> /usr/obj/gcc-4.6.4/build-amd64/gcc/ada/rts/cstreams.c:237: warning: strcat() 
> is almost always misused, please use strlcat()
> /usr/local/lib/gcc/x86_64-unknown-openbsd5.4/4.6.4/adalib/libgnat.a(adaint.o)(.text+0x1c8):
>  In function `__gnat_try_lock':
> /usr/obj/gcc-4.6.4/build-amd64/gcc/ada/rts/adaint.c:552: warning: sprintf() 
> is often misused, please use snprintf()

This is "normal". gnatlib "works" on a wide variety of platforms and
there is no autoconf or anything, thus it's all very rough and basic C.
In addition, many buffers are allocated on the Ada side, and the buffer
size is not known in the C files due to a variety of very poor design
choices.

I've tried fixing this rats nest before, and got lost. I don't plan on
trying again. In part because it pisses me off that the company which
effectively owns the copyright to this part of gcc doesn't give two
shits about the "free" version or anything but their commercial
offerings.

Reply via email to