From: "Danny Smith" <dansmister@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: [Patch][Docs] Update dllimport documentation
Date: Sat, 10 Nov 2007 11:36:00 -0000 [thread overview]
Message-ID: <9c03c2dd0711091536j66ec6a6wd21510a5a8e2e49d@mail.gmail.com> (raw)
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
next reply other threads:[~2007-11-09 23:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-10 11:36 Danny Smith [this message]
2007-11-12 4:25 ` Mark Mitchell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c03c2dd0711091536j66ec6a6wd21510a5a8e2e49d@mail.gmail.com \
--to=dansmister@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).