Win32 function attribute

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Win32 function attribute

Edward Diener-3
Using mingw/gcc-4.8.1 If I precompile a source file which includes one
of the win32 header files ( from the latest w32api-4.0.3-1 package ) I
see that the WINBASEAPI which precedes win32 function declarations
expands to nothing. Should this not expand to __attribute__((dllimport))
for gcc, as it does for mingw64/gcc ?




------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Win32 function attribute

Eli Zaretskii
> From: Edward Diener <[hidden email]>
> Date: Mon, 01 Jun 2015 14:06:16 -0400
>
> Using mingw/gcc-4.8.1 If I precompile a source file which includes one
> of the win32 header files ( from the latest w32api-4.0.3-1 package ) I
> see that the WINBASEAPI which precedes win32 function declarations
> expands to nothing. Should this not expand to __attribute__((dllimport))
> for gcc, as it does for mingw64/gcc ?

AFAIK, the dllimport attribute is not needed with C functions, but it
might be needed with variables and C++ classes.  See the GCC manual
for the details.


------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Win32 function attribute

Edward Diener-3
On 6/1/2015 2:50 PM, Eli Zaretskii wrote:

>> From: Edward Diener <[hidden email]>
>> Date: Mon, 01 Jun 2015 14:06:16 -0400
>>
>> Using mingw/gcc-4.8.1 If I precompile a source file which includes one
>> of the win32 header files ( from the latest w32api-4.0.3-1 package ) I
>> see that the WINBASEAPI which precedes win32 function declarations
>> expands to nothing. Should this not expand to __attribute__((dllimport))
>> for gcc, as it does for mingw64/gcc ?
>
> AFAIK, the dllimport attribute is not needed with C functions, but it
> might be needed with variables and C++ classes.  See the GCC manual
> for the details.

 From the GCC docs:

"For Microsoft Windows targets the use of the dllimport attribute on
functions is not necessary, but provides a small performance benefit by
eliminating a thunk in the DLL."



------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe