Bug with ISO_C_BINDING on Mac OS?

Angelo Graziosi angelo.graziosi@alice.it
Sat Jun 1 12:48:00 GMT 2013


Tobias Burnus wrote:
> If you use VALUE, you will pass some random value which is in the actual argument, which will cause problems.

I apologize if I introduce myself in this topic, I have tried the 
original test cases proposed by Janus and they work on Cygwin (32 bit) 
and fail on Mac OS X (64 bit, Lion) as described.. but what caught my 
attention is the above sentence... I have created a module which 
interface several Windows API etc. functions,

...
   public BeginPaint
   interface
      function BeginPaint(hWnd,lpPaint) bind(C,name='BeginPaint')
        import
        !GCC$ ATTRIBUTES STDCALL :: BeginPaint
        integer(HDC_T) :: BeginPaint
        integer(HWND_T), intent(in), value :: hWnd
        type(PAINTSTRUCT_T), intent(out) :: lpPaint
      end function BeginPaint
   end interface

etc. At the moment the applications I have created, and compiled on XP 
32, run also on Windows 7 64. I wonder if I have to remove the "value" 
attribute for the same reasons cited by Tobias..


TIA,
  Angelo.



More information about the Fortran mailing list