[Bug ada/15765] asmname should be verbatim if starting with an asterisk
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Sep 12 11:45:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list