diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2018-02-22 16:48:24 +0200 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2018-02-23 13:23:01 +0000 |
commit | bcd5532fcb8442d930721f0c8048c764f4cbbf1e (patch) | |
tree | 6b0d30a6941e8d608af7c04f75837e9f22ea74b0 | |
parent | ab28ef132ed4dc8d5137a43feb3e152b792e191a (diff) |
Fix thread_local test
If _Thread_local is used on a block-scope declaration, it must be
combined with either static or extern to decide linkage.
Change-Id: I228b3520767197c6cdf5134ff5a666ab2aca33ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | tests/auto/corelib/global/qglobal/qglobal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/qglobal/qglobal.c b/tests/auto/corelib/global/qglobal/qglobal.c index af42efa7f6..0719c4b921 100644 --- a/tests/auto/corelib/global/qglobal/qglobal.c +++ b/tests/auto/corelib/global/qglobal/qglobal.c @@ -110,7 +110,7 @@ Q_STATIC_ASSERT(!!1); static thread_local int gt_var; void thread_local_test() { - thread_local int t_var; + static thread_local int t_var; t_var = gt_var; } #endif |