From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 450 invoked by alias); 22 Jun 2010 07:18:24 -0000 Received: (qmail 32674 invoked by uid 22791); 22 Jun 2010 07:18:23 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Jun 2010 07:18:18 +0000 Received: from [192.168.178.22] (port-92-204-85-235.dynamic.qsc.de [92.204.85.235]) by mx02.qsc.de (Postfix) with ESMTP id 363D11E1E7; Tue, 22 Jun 2010 09:18:14 +0200 (CEST) Message-ID: <4C2063B5.40204@net-b.de> Date: Tue, 22 Jun 2010 08:59:00 -0000 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4 Thunderbird/3.0.4 MIME-Version: 1.0 Newsgroups: gmane.comp.gcc.devel To: basile@starynkevitch.net CC: gcc@gcc.gnu.org, jeremie.salvucci@free.fr Subject: Re: plugin-provided pragmas & Fortran or Ada? References: <1277180442.24042.13.camel@glinka> In-Reply-To: <1277180442.24042.13.camel@glinka> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg00664.txt.bz2 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