This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/34112] Add $!DEC ATTRIBUTE support for 32bit Windows' STDCALL



------- Comment #5 from burnus at gcc dot gnu dot org  2008-02-05 15:12 -------
> I thought a bit about that recently, and I don't like the idea of having to
> support parts of another vendor's extension. The first other idea I had was to
> add that STDCALL specification as an extension to the BIND syntax:

If we don't follow !$DEC than I'm in favor of this variant, which one could
implement even if one implements !$DEC at some point.

> So, my next idea is to provide an compile-time option that would make all
> BIND(C) procedures in the compiled file STDCALL

I'm really against this; I think this is very confusing and makes it very hard
to combine STDCALL with non-STDCALL procedures.

#if defined __GFORTRAN__
  #define STDCALL  STDCALL
#else
  #define STDCALL  C
#endif

  subroutine my() bind(STDCALL,name="foo")

Or alternatively, though more difficult to CPP:

  subroutine my() bind(C,attribute="stdcall",name="foo")

where one could think of allowing other items from
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34112


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