Skip to content

Commit 390a00a

Browse files
committed
ET_HAS_EXCEPTIONS: require defined(_MSC_VER) to conclude _HAS_EXCEPTIONS implies exceptions are on
_HAS_EXCEPTIONS might get defined on some other platform by coincidence; require it to be actual MSVC for us to conclude exceptions are on. Differential Revision: [D76857541](https://our.internmc.facebook.com/intern/diff/D76857541/) [ghstack-poisoned]
1 parent d1bfa4d commit 390a00a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/platform/compiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ using ssize_t = ptrdiff_t;
173173

174174
#ifdef __EXCEPTIONS
175175
#define ET_HAS_EXCEPTIONS 1
176-
#elif defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS
176+
#elif defined(_MSC_VER) && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS
177177
#define ET_HAS_EXCEPTIONS 1
178178
#else
179179
#define ET_HAS_EXCEPTIONS 0

0 commit comments

Comments
 (0)