diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index f8bf4ba63c9..0a907511d80 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -489,6 +489,11 @@ Qt::HANDLE QThread::currentThreadIdImpl() noexcept int QThreadPrivate::idealThreadCount = 1; #endif +#if QT_CONFIG(trivial_auto_var_init_pattern) && defined(Q_CC_GNU_ONLY) +// Don't pre-fill the automatic-storage arrays used in this function +// (important for the FreeBSD & Linux code using a VLA). +__attribute__((optimize("trivial-auto-var-init=uninitialized"))) +#endif int QThread::idealThreadCount() noexcept { int cores = 1; |
