aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r--gcc/fortran/openmp.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 7df7384c187..cd28384589c 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -31,7 +31,7 @@ along with GCC; see the file COPYING3. If not see
/* Match an end of OpenMP directive. End of OpenMP directive is optional
whitespace, followed by '\n' or comment '!'. */
-match
+static match
gfc_match_omp_eos (void)
{
locus old_loc;
@@ -57,6 +57,17 @@ gfc_match_omp_eos (void)
return MATCH_NO;
}
+match
+gfc_match_omp_eos_error (void)
+{
+ if (gfc_match_omp_eos() == MATCH_YES)
+ return MATCH_YES;
+
+ gfc_error ("Unexpected junk at %C");
+ return MATCH_ERROR;
+}
+
+
/* Free an omp_clauses structure. */
void