This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: STDCALL first patch


> 
> Hi all,
> 
> I'll try to be very quiet for a week in order to focus on my work,  
> but before I go I have one last patch to send... I'm not submitting  
> it formally for review, but I thought it might be useful to follow  
> the "release early, release often" scheme...
> 
> This patch adds support for some of the popular !DEC$ ATTRIBUTES,  
> namely dllimport, dllexport, stdcall, fastcall and cdecl. It scans,  
> parses and matches these attributes against a list of know  
> attributes, flags them in a new field of our attributes structure,  
> symbol->attr.ext_attr and translates them into GCC attributes (for  
> these 5, the GNU attribute name is the same, but it's coded in all  
> generality and a generic 1-to-1 mapping can be provided in array  
> ext_attr_list.
> 
> The patch is not complete yet: for example it doesn't yet 
> write these  
> new attributes to modules files or read them back. Apart from the  
> module stuff, I believe it's fully functional though, so you can try  
> it for yourself. I want to get your opinions, if any, on the first  
> draft before going further.
> 

The patch seems to address only function definition as handled in
build_function_decl.  What about handling of extern (in  "C" sense)
function decls in gfc_get_extern_function_decl?  Without that, the main
use on windows (handling WINAPI imports) will still fail.

Should win32-specific mangling of name be addition of "@nn" suffix be
handled automatically (my preference and the way that Gnat handles
STDCALL) or do we need a way for user to specify an ALIAS?

Danny 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]