Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix building error for error: fallthrough annotation in unreachable code #100742

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/coreclr/interop/comwrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,9 @@ HRESULT ManagedObjectWrapper::QueryInterface(
return E_NOINTERFACE;

default:
#if !defined(__clang__) || (__clang_major__ > 13) // Workaround bug in old clang
_ASSERTE(false && "Unknown result value");
#endif
FALLTHROUGH;
case TryInvokeICustomQueryInterfaceResult::FailedToInvoke:
// Set the 'lacks' flag since our attempt to use ICustomQueryInterface
Expand Down
8 changes: 0 additions & 8 deletions src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,6 @@ extern bool g_arm64_atomics_present;
#define __has_cpp_attribute(x) (0)
#endif

#ifndef FALLTHROUGH
#if __has_cpp_attribute(fallthrough)
#define FALLTHROUGH [[fallthrough]]
#else // __has_cpp_attribute(fallthrough)
#define FALLTHROUGH
#endif // __has_cpp_attribute(fallthrough)
#endif // FALLTHROUGH

/******************* PAL-Specific Entrypoints *****************************/

#define IsDebuggerPresent PAL_IsDebuggerPresent
Expand Down