From d32034a78d8125005902d0b82e06463428615fed Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Mon, 12 Nov 2007 22:05:38 +0000 Subject: [PATCH] extend.texi (dllimport): Document that pointers to dllimport'd functions can be used as constant. * doc/extend.texi (dllimport): Document that pointers to dllimport'd functions can be used as constant. From-SVN: r130124 --- gcc/ChangeLog | 5 +++++ gcc/doc/extend.texi | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dcdfc68db96..320816b31df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-11-12 Danny Smith + + * doc/extend.texi (dllimport): Document that pointers to dllimport'd + functions can be used as constant. + 2007-11-12 Eric Botcazou PR rtl-optimization/34035 diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 82df683bd9e..1c0d476a63a 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -2126,9 +2126,12 @@ versions of the GNU linker, but can now be avoided by passing the 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 -- 2.30.2