comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: gcc-7 breaks unsized C array bindings
Date: Wed, 30 Aug 2017 22:27:49 +0100
Date: 2017-08-30T22:27:49+01:00	[thread overview]
Message-ID: <lyo9qwycdm.fsf@pushface.org> (raw)
In-Reply-To: 8e16852a-8d56-401f-bebf-916b918fb020@googlegroups.com

ytomino <aghia05@gmail.com> writes:

> C header:
>
>  extern int unsized_C_array[];
>
> Ada binding:
>
>  unsized_C_array : array (Interfaces.C.size_t) of Interfaces.C.int
>     with Import, Convention => C, External_Name => "unsized_C_array";
>
> gcc-7 treats this common idiom as a runtime error. Moreover, it
> reports no message on compile-time. This behavior is very malicious
> mischief.  (I have already reported it as
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81961 )

Still present in GCC 8.0.0 (20170820).

      parent reply	other threads:[~2017-08-30 21:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25  8:03 gcc-7 breaks unsized C array bindings ytomino
2017-08-27  7:16 ` Shark8
2017-08-27  7:57   ` Jeffrey R. Carter
2017-08-30 21:27 ` Simon Wright [this message]
replies disabled

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