This is the mail archive of the
mailing list for the GCC project.
Re: What is "fnspec function type attribute"?
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: FX <fxcoudert at gmail dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Fri, 6 Jun 2014 22:24:27 +0200 (CEST)
- Subject: Re: What is "fnspec function type attribute"?
- Authentication-results: sourceware.org; auth=none
- References: <D9AA3F44-CF35-4915-B152-B952C4B95933 at gmail dot com>
- Reply-to: gcc at gcc dot gnu dot org
On Fri, 6 Jun 2014, FX wrote:
In fortran/trans-decl.c, we have a comment above the code building function decls, saying:
The SPEC parameter specifies the function argument and return type
specification according to the fnspec function type attribute. */
I was away from GCC development for some time, so this is news to me. The syntax is not immediately clear, and neither a Google search nor a grep of the trunkʼs numerous .texi files reveals any information. Iʼm creating new decls, what I am to do with it?
You can look at the 2 functions in gimple.c that use gimple_call_fnspec,
and refer to tree-core.h for the meaning of EAF_*, etc. A string like
'2': the first letter is about the return, here we are returning the
'x': the first argument is ignored
'.': not saying anything about the second argument.