This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/15765] asmname should be verbatim if starting with an asterisk
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Sep 2007 11:45:02 -0000
- Subject: [Bug ada/15765] asmname should be verbatim if starting with an asterisk
- References: <bug-15765-5368@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2007-09-12 11:45 -------
I think this was fixed (from gcc/ada/gnat_ugn.texi):
@noindent
As for the @code{C} calling convention, when the @code{External_Name}
parameter is missing, it is taken to be the name of the Ada entity in lower
case. If instead of writing the above import pragma you write:
@smallexample @c ada
@group
function Get_Val (V : Interfaces.C.long) return Interfaces.C.int;
pragma Import (Stdcall, Get_Val, External_Name => "retrieve_val");
@end group
@end smallexample
@noindent
then the imported routine is @code{_retrieve_val@@4}. However, if instead
of specifying the @code{External_Name} parameter you specify the
@code{Link_Name} as in the following example:
@smallexample @c ada
@group
function Get_Val (V : Interfaces.C.long) return Interfaces.C.int;
pragma Import (Stdcall, Get_Val, Link_Name => "retrieve_val");
@end group
@end smallexample
@noindent
then the imported routine is @code{retrieve_val}, that is, there is no
decoration at all. No leading underscore and no Stdcall suffix
@code{@@}@code{@i{nn}}.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Component|target |ada
Keywords|wrong-code |
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15765