This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: gcc don't allow commas between clauses for openmp


gcc-4.3-20070912 doesn't allow commas between clauses. Details given
following. I have just scanned c-parser.c and found we could change
c_parser_omp_clause_name () to enable it.  But I want to know more
before making any changes on it myself.  "openmp implementation in
gcc" in GCC SUMMIT 2006 seems not covering the details,  e.g. what
kind of features gcc doesn't presently support for openmp.  Thanks,

> --lijuan
>
> micro# /import/dr3/s10/gcc-4.3/bin/gcc a.c -fopenmp
> a.c: In function 'main':
> a.c:11: error: expected '#pragma omp' clause before ',' token
> micro# cat a.c
> #include <omp.h>
> #include <stdio.h>
>
> int main(void)
> {
>   int i = 1, j = 2;
>
>   omp_set_dynamic(0);
>   omp_set_num_threads(4);
>
>   #pragma omp parallel shared(i), private(j)
>   {
>     j =  omp_get_thread_num();
>     printf("t#: %i  i: %i  j: %i\n", omp_get_thread_num(), i, j);
>   }
>
>   return 0;
> }
> micro# /import/dr3/s10/gcc-4.3/bin/gcc -v
> Using built-in specs.
> Target: sparc-sun-solaris2.10
> Configured with: /import/dr2/starlex/orig/trunk/configure --prefix=/import/dr3/s10/gcc-4.3/ --enable-languages=c,c++,fortran --disable-gnattools --with-mpfr=/ws/gccfss/tools --with-gmp=/ws/gccfss/tools
> Thread model: posix
> gcc version 4.3.0 20070912 (experimental) (GCC)
>


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