Skip to content

Commit

Permalink
Update utils.h
Browse files Browse the repository at this point in the history
Co-authored-by: Adeel Mujahid <[email protected]>
  • Loading branch information
cshung and am11 committed Mar 29, 2024
1 parent c0edccb commit 6b5b725
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/native/minipal/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@
#define __has_attribute(x) 0
#endif

#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif

#if defined(__cplusplus) && __has_cpp_attribute(fallthrough)
# define FALLTHROUGH [[fallthrough]]
#ifdef __cplusplus
# ifndef __has_cpp_attribute
# define __has_cpp_attribute(x) 0
# endif
# if __has_cpp_attribute(fallthrough)
# define FALLTHROUGH [[fallthrough]]
# else
# define FALLTHROUGH
# endif
#elif __has_attribute(fallthrough)
# define FALLTHROUGH __attribute__((fallthrough))
#else
Expand Down

0 comments on commit 6b5b725

Please sign in to comment.