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

Commit

Permalink
Workaround gcc 4.8's new -Wunused-local-typedefs interaction with nvcc
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhoberock committed Dec 11, 2013
1 parent df7aabb commit de4158f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions thrust/detail/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@
#include <thrust/detail/config/compiler_fence.h>
#include <thrust/detail/config/forceinline.h>
#include <thrust/detail/config/hd_warning_disable.h>
#include <thrust/detail/config/global_workarounds.h>

27 changes: 27 additions & 0 deletions thrust/detail/config/global_workarounds.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2008-2013 NVIDIA Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include <thrust/detail/config/compiler.h>

// XXX workaround gcc 4.8+'s complaints about unused local typedefs by silencing them globally
#if defined(THRUST_GCC_VERSION) && (THRUST_GCC_VERSION >= 40800)
# if defined(__NVCC__) && (CUDA_VERSION >= 6000)
# pragma GCC diagnostic ignored "-Wunused-local-typedefs"
# endif // nvcc & cuda 6+
#endif // gcc 4.8

0 comments on commit de4158f

Please sign in to comment.