Bug 34506 - gcc disallows comma between C/C++ OpenMP clauses
Summary: gcc disallows comma between C/C++ OpenMP clauses
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Jakub Jelinek
URL:
Keywords: openmp, rejects-valid
Depends on:
Blocks:
 
Reported: 2007-12-17 09:25 UTC by Jakub Jelinek
Modified: 2007-12-23 19:12 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-12-17 14:40:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2007-12-17 09:25:50 UTC
OpenMP 2.5 in 2.1 has:
#pragma omp directive-name [clause[ [,] clause]...] new-line
and for Fortran
sentinel directive-name [clause[[,] clause]...]
While for Fortran the optional commas are accepted, the C/C++ parser rejects them.

Working on a patch.
Comment 1 Jakub Jelinek 2007-12-17 14:17:00 UTC
Subject: Bug 34506

Author: jakub
Date: Mon Dec 17 14:16:42 2007
New Revision: 131008

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131008
Log:
	PR c/34506
	* c-parser.c (c_parser_omp_all_clauses): Accept optional comma
	in between clauses.

	* parser.c (cp_parser_omp_all_clauses): Accept optional comma
	in between clauses.

	* gcc.dg/gomp/clause-2.c: New test.
	* g++.dg/gomp/clause-4.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/gomp/clause-4.C
    trunk/gcc/testsuite/gcc.dg/gomp/clause-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-parser.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog

Comment 2 Jakub Jelinek 2007-12-17 14:40:16 UTC
Fixed on the trunk so far.
Comment 3 Andrew Pinski 2007-12-23 19:12:52 UTC
Fixed so closing.