This is the mail archive of the gcc@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]

Re: plugin-provided pragmas & Fortran or Ada?


On 06/22/2010 06:20 AM, Basile Starynkevitch wrote:
> Assuming a plugin (e.g. MELT) add a new pragma using PLUGIN_PRAGMAS, is
> this pragma usable from Ada or Fortran code?
> 
> I am not very familiar with Ada or Fortran. I believe Ada has some
> syntax for pragmas -but do Ada pragma have the same API inside GCC
> plugins as C or C++ pragmas?- and I am not sure about Fortran. Many
> Fortran dialects or implementations parse specially some kind of
> comments -but I don't know if these are giving pragma events to plugins.

Regarding Fortran: "Pragmas" seem to be only rarely used in Fortran
programs - with possible exception of the !DEC$ directives, which seem
to be mostly used for attributes and has been superseded mostly by the C
bindings of Fortran; !DEC$ has also been used for parallelization as
precursor of OpenMP.

gfortran only supports setting some attributes via !GCC$ (and supports
OpenMP) - but nothing more; cf.
http://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html
The plan is to support all function/variable attributes, but that's
still on the TODO list. Additionally, one might add more functionality,
but that's currently not even on the TODO list.

Thus, if you need more, it has to be programmed.

Tobias


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