https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27557

Jim Cownie <jcownie at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jcownie at gmail dot com

--- Comment #19 from Jim Cownie <jcownie at gmail dot com> ---
The OpenMP aspect of this is still present in GCC 10, so this bug has beena
round for almost *15 years*!
Other compilers (LLVM, Intel, ...) happily compile such code. 

Given that the underlying mechanisms now exist, a fix for the OpenMP aspect
really shouldn't be too hard, should it?

I really don't want to have to write

#if (__GNUC__)
  // Work around GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27557
  // (Scroll near the end...)
  static thread_local fileStats threadRes;
#else
  static fileStats threadRes;
#pragma omp threadprivate (threadRes)
#endif

in all of my code examples and blog posts, since it just makes GCC look poor.

Reply via email to