This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran, Patch, OpenMP] PR33445 - Warn if (free format) !$OMP& is used as no continuation line
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 21 Sep 2007 13:41:01 -0400
- Subject: Re: [Fortran, Patch, OpenMP] PR33445 - Warn if (free format) !$OMP& is used as no continuation line
- References: <46F3E48C.3090206@net-b.de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Sep 21, 2007 at 05:34:36PM +0200, Tobias Burnus wrote:
> + else if (c2 == '&')
> + gfc_warning_now ("Found $!OMP& at %C but no "
> + "preceeding directive with "
> + "a tailing &");
If you want this warning to help with transitioning fixed-form
OpenMP code to free-form, it shouldn't warn just about !$omp&,
but about !$ompX where X is any character but space.
!$omp parallel
!$omp+ if(.true.)
call foo
!$omp end parallel
is as valid fixed-form as !$omp& if (.true.) at that point.
Of course when the char is not &, you need to do more work than
just add & at the end of previous line.
Jakub