This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: '!$OMP' directive followed by several spaces


On Thu, Feb 15, 2007 at 09:04:42AM +0100, Philippe Schaffnit wrote:
>
>Hi!
>
>Sorry, I've kind of lost track of the thread: the patch proposed by
>Bernhard should be submitted / committed as obvious or should I change
>my code?

I'm not in the position to test the patch currently nor to formally
submit it (or apply it as obvious for that matter). I think that it
fixes a real issue that is legal.

cheers,
>
>Thanks!
>
>Philippe
>
>Tobias Burnus wrote:
>> 
>> Hi,
>> 
>> Bernhard Fischer wrote:
>> > Does the standard require that the directive is followed by ' ' and not
>> > by the class space? If so then the assert should be corrected, too, from
>> > the looks.
>> >
>> >
>> >>          gcc_assert (c == ' ');
>> >> +         gfc_gobble_whitespace ();
>> >>
>> 
>> I think the assert is ok - at least for non-continuation lines it is
>> required:
>> 
>> http://www.openmp.org/drupal/mp-documents/spec25.pdf
>> (Words in [ ] brackets are added by me.)
>> 
>> "2.1.2 Free Source Form Directives"
>> [...]
>> "The sentinel ["!$omp"] can appear in any column as long as it is
>> preceded only by white space (spaces and tab characters). It must appear
>> as a single word with no intervening character. Fortran free form line
>> length, white space, and continuation rules apply to the directive line.
>> [>] Initial directive lines must have a space after the sentinel. [<]
>> Continued directive lines must have an ampersand as the last nonblank
>> character on the line, prior to any comment placed inside the directive.
>> Continuation directive lines can have an ampersand after the directive
>> sentinel with optional white space before and after the
>> ampersand."
>> 
>> For fixed source form (2.1.1):
>> "Initial directive lines must have a space or zero in column 6, and
>> continuation directive lines must have a character other than a space or
>> a zero in column 6."
>> 
>> Tobias
>
>


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