This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/15765] asmname should be verbatim if starting with an asterisk


------- Additional Comments From dannysmith at users dot sourceforge dot net  2004-09-24 09:17 -------
This has been fixed on trunk by a patch for another PR:

2004-08-21  Danny Smith  <dannysmith@users.sourceforge.net>

	PR  c++/16030
	* config/i386/winnt/c (gen_stdcall_suffix, gen_fastcall_suffix):
	Remove, merging into ...
	(gen_stdcall_or_fastcall_suffix): New function, returning tree
	rather than const char*, and accepting additional parameter.
	Don't add suffix to '*'-prefixed symbols or variadic functions.
	(i386_pe_encode_section_info): Adjust for call to new function.
	Call change_decl_assembler_name.

Note, now that this has been fixed, the following in gnat_ugn.texi
is no longer accurate.

  @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@@4}, that is, there is no
  trailing underscore but the appropriate @code{@@}@code{@i{nn}} is always
  added at the end of the @code{Link_Name} by the compiler.

This example now produces the unresolved name
	U retrieve_val

with no decoration at all. 

Danny

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15765


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]