+2006-10-06 Jakub Jelinek <jakub@redhat.com>
+
+ * scanner.c (skip_free_comments): Return bool instead of void.
+ (gfc_next_char_literal): Don't return ' ' if & is missing after
+ !$omp or !$. Use skip_{free,fixed}_comments directly instead
+ of gfc_skip_comments.
+
2006-10-04 Brooks Moses <bmoses@stanford.edu>
* gfortran.texi: (Current Status): update and rewrite to reflect
/* Comment lines are null lines, lines containing only blanks or lines
- on which the first nonblank line is a '!'. */
+ on which the first nonblank line is a '!'.
+ Return true if !$ openmp conditional compilation sentinel was
+ seen. */
-static void
+static bool
skip_free_comments (void)
{
locus start;
openmp_flag = 1;
openmp_locus = old_loc;
gfc_current_locus = start;
- return;
+ return false;
}
}
gfc_current_locus = old_loc;
{
gfc_current_locus = old_loc;
next_char ();
- return;
+ return true;
}
}
gfc_current_locus = old_loc;
if (openmp_flag && at_bol)
openmp_flag = 0;
gfc_current_locus = start;
+ return false;
}
if (gfc_current_form == FORM_FREE)
{
+ bool openmp_cond_flag;
+
if (!in_string && c == '!')
{
if (openmp_flag
continue_line = gfc_current_locus.lb->linenum;
/* Now find where it continues. First eat any comment lines. */
- gfc_skip_comments ();
+ openmp_cond_flag = skip_free_comments ();
if (prev_openmp_flag != openmp_flag)
{
gfc_warning_now ("Missing '&' in continued character constant at %C");
gfc_current_locus.nextc--;
}
+ /* Both !$omp and !$ -fopenmp continuation lines have & on the
+ continuation line only optionally. */
+ else if (openmp_flag || openmp_cond_flag)
+ gfc_current_locus.nextc--;
else
{
c = ' ';
old_loc = gfc_current_locus;
gfc_advance_line ();
- gfc_skip_comments ();
+ skip_fixed_comments ();
/* See if this line is a continuation line. */
if (openmp_flag != prev_openmp_flag)