public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch][Docs] Update dllimport documentation
@ 2007-11-10 11:36 Danny Smith
  2007-11-12  4:25 ` Mark Mitchell
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Smith @ 2007-11-10 11:36 UTC (permalink / raw)
  To: gcc-patches

The rewrite of dllimport code in March

http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123344

allowed pointers to dllimport'd functions
to be used as constant initializers.  This documents that change.

Tested on i686-pc-mingw32.


2007-11-09  Danny Smith  <dannysmith@users.sourceforge.net>

	* doc/extend.texi (dllimport): Document that pointers to dllimport'd
	functions can be used as constant.


Index: extend.texi
===================================================================
--- extend.texi	(revision 129972)
+++ extend.texi	(working copy)
@@ -2126,9 +2126,12 @@
 functions, using the attribute for a variable eliminates a thunk in
 the DLL@.

-One drawback to using this attribute is that a pointer to a function
-or variable marked as @code{dllimport} cannot be used as a constant
-address.  On Microsoft Windows targets, the attribute can be disabled
+One drawback to using this attribute is that a pointer to a
+@emph{variable} marked as @code{dllimport} cannot be used as a constant
+address. However, a pointer to a @emph{function} with the
+@code{dllimport} attribute can be used as a constant initializer; in
+this case, the address of a stub function in the import lib is
+referenced.  On Microsoft Windows targets, the attribute can be disabled
 for functions by setting the @option{-mnop-fun-dllimport} flag.

 @item eightbit_data

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch][Docs] Update dllimport documentation
  2007-11-10 11:36 [Patch][Docs] Update dllimport documentation Danny Smith
@ 2007-11-12  4:25 ` Mark Mitchell
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Mitchell @ 2007-11-12  4:25 UTC (permalink / raw)
  To: Danny Smith; +Cc: gcc-patches

Danny Smith wrote:

> 2007-11-09  Danny Smith  <dannysmith@users.sourceforge.net>
> 
> 	* doc/extend.texi (dllimport): Document that pointers to dllimport'd
> 	functions can be used as constant.

OK.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-12  1:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-10 11:36 [Patch][Docs] Update dllimport documentation Danny Smith
2007-11-12  4:25 ` Mark Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).