Re: How to clear unknown pragma warning for OpenMP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 July 2015 at 17:01, Jeffrey Walton wrote:
>
> g++ -DNDEBUG -g2 -O3 -Wall -fPIC -march=native -pipe -c rw.cpp
> rw.cpp:130:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
>   #pragma omp parallel sections if(CRYPTOPP_RW_USE_OMP)
>  ^

Pretty ugly, but if you want the OpenMP directives to be dependent on
whether OpenMP support is actually enabled you could do:

#if _OPENMP
#pragma omp section
#endif

(I haven't tested whether the omp pragma still works this way.)



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux