Skip to content

Commit 547346d

Browse files
stepanchegfacebook-github-bot
authored andcommitted
[caffe2] Fix -Wundef
Summary: * `#if` with some undefined name is a warning when `-Wundef` is specified (which is in ovrsource for example) * identifiers starting with two underscores are [reserved for compiler internals](https://en.cppreference.com/w/cpp/language/identifiers) Test Plan: CI Reviewed By: ezyang Differential Revision: D27318070 fbshipit-source-id: 4989fc6a3bf3c176eddd7c25aca47414e4973edd
1 parent 058357a commit 547346d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

caffe2/perfkernels/cvtsh_ss_bugfix.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
// Apple clang was fixed in 8.1
44
#if defined(__apple_build_version__) && ((__clang_major__ < 8) || ((__clang_major__ == 8) && (__clang_minor__ < 1)))
5-
#define __APPLE_NEED_FIX 1
5+
#define CAFFE2_INTERNAL_APPLE_NEED_FIX 1
66
#endif
77

88
// Regular clang was fixed in 3.9
99
#if defined(__clang__) && (__clang_major__ < 4) && (__clang_minor__ < 9)
10-
#define __CLANG_NEED_FIX 1
10+
#define CAFFE2_INTERNAL_CLANG_NEED_FIX 1
1111
#endif
1212

13-
#if __APPLE_NEED_FIX || __CLANG_NEED_FIX
13+
#if defined(CAFFE2_INTERNAL_APPLE_NEED_FIX) || defined(CAFFE2_INTERNAL_CLANG_NEED_FIX)
1414

1515
#include <c10/util/Half.h>
1616
#include <emmintrin.h>

0 commit comments

Comments
 (0)