Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit de4158f

Browse files
committed
Workaround gcc 4.8's new -Wunused-local-typedefs interaction with nvcc
1 parent df7aabb commit de4158f

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

thrust/detail/config/config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@
3333
#include <thrust/detail/config/compiler_fence.h>
3434
#include <thrust/detail/config/forceinline.h>
3535
#include <thrust/detail/config/hd_warning_disable.h>
36+
#include <thrust/detail/config/global_workarounds.h>
3637

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2008-2013 NVIDIA Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#pragma once
18+
19+
#include <thrust/detail/config/compiler.h>
20+
21+
// XXX workaround gcc 4.8+'s complaints about unused local typedefs by silencing them globally
22+
#if defined(THRUST_GCC_VERSION) && (THRUST_GCC_VERSION >= 40800)
23+
# if defined(__NVCC__) && (CUDA_VERSION >= 6000)
24+
# pragma GCC diagnostic ignored "-Wunused-local-typedefs"
25+
# endif // nvcc & cuda 6+
26+
#endif // gcc 4.8
27+

0 commit comments

Comments
 (0)