delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/29/06:41:55

From: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters)
Subject: RE: WINAPI definition
29 Oct 1997 06:41:55 -0800 :
Message-ID: <01BCE478.4021D9E0.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
To: "'Thomas Nichols'" <thomas DOT nichols AT mail DOT com>
Cc: "'GNU-Win32'" <gnu-win32 AT cygnus DOT com>

Thomas Nichols[SMTP:thomas DOT nichols AT mail DOT com] wrote:
>to compile, and the following line breaks:
>
>	static BOOL (WINAPI *Ctl3dRegister)(HINSTANCE);
>
>>From looking at preprocessor output, WINAPI is getting expanded to
>__attribute__ ((stdcall))
>
>and cc1plus.exe doesn't like this at all.

cc1plus has a bug/feature in the parsing code such that attributes
cannot appear in the same places they can in cc1. I think you might
be able to put the WINAPI (or attribute) at the end of the
declaration to get the same effect, but I'm not sure.

Colin.

PS. It's an interesting question to me whether this works
    right anyway. Assuming the GNU guys were smart (and
    they often are) the stdcall attribute can be attached
    to function pointers this way and when you call a
    function through the pointer the proper PASCAL type
    calling process will be followed. It does strike me
    as the kind of thing that could get forgotten though...


-- Colin Peters - Saga Univ. Dept. of Information Science
-- colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp - finger for PGP public key
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019