[Fortran] RFC: Patch to support STDCALL etc. (PR 34112)
Tobias Burnus
burnus@net-b.de
Sat Jun 20 23:18:00 GMT 2009
Steve Kargl wrote:
> On Sat, Jun 20, 2009 at 12:17:15AM +0200, Tobias Burnus wrote:
>
>> Attached is the first version of a patch which allows to use
>>
>> !GCC$ ATTRIBUTES attribute :: symbol-list
>>
Updated version:
- Now also an attribute-list is supported (e.g. "STDCALL, DLLEXPORT").
- Fixed some smaller items
- Rewrote parts of the manual
- Included two test cases
> Here's some further comments on the manual page.
>
Thanks for the suggestions.
> Intel's 'Programmer's Manual' refers to the '!DEC$' as a compiler
> directive. How about changing the title of this section to
>
> 'GNU Fortran Compiler Directives'
>
I think that is a useful idea.
> "The GCC manual refers
> to compiler directives as attributes. To distinguish between
> the usual Fortran use of attribute, the GNU Fortran manual uses
> the term directive."
I think that is confusing. STDCALL is an attribute: It is called as such
in Intel's documentation, in GCC's documentation and also the name
syntax is "ATTRIBUTES STDCALL": That adds the attribute "STDCALL" to a
symbol. That's similar to "POINTER ::" adding the pointer attribute to a
symbol.
I changed the section of the manual and I hope it is now less confusing.
> +For details, @ref{Top,,gcc,C Extensions,Variable Attributes}.
>
> s/,/ see/
>
The @ref already inserts a "see". I now changed the ref to @ref{...,C
Extensions} as seemingly linking directly to "Variable Attributes" is
not possible.
> +where in free-form Fortran only whitespace is allowed before @code{!GNU$}
>
> s/Fortran/source code/
>
> The use of the word 'only' seems out of place.
>
The following does not work with !$OMP and !GNU$:
i = 5 !GNU$ ATTRIBUTES stdcall :: func
I fear that this restriction is lost when the "only" is removed.
I hope I have not missed any suggestion.
I have successfully bootstrapped, added some modifications, build
successfully on x86-64-linux.
The new tests have successfully been tested via:
make check-gfortran RUNTESTFLAGS="--target_board=unix/-m32
dg.exp=compiler-directive_*.f*"
The test suite (with -m32) is still running, but so far successful.
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stdcall3.diff
Type: text/x-patch
Size: 31731 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090620/2dfe1a10/attachment.bin>
More information about the Fortran
mailing list