Skip to content

Commit

Permalink
Address the support of typeof operator
Browse files Browse the repository at this point in the history
As of C23, typeof is now included as part of the C standard.
  • Loading branch information
jserv committed Dec 7, 2023
1 parent 68e1afc commit 53a9c70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@
*/
#define COUNT_VARARGS(...) _GET_NTH_ARG("ignored", ##__VA_ARGS__, 4, 3, 2, 1, 0)

#if defined(__GNUC__) || defined(__clang__)
/* As of C23, typeof is now included as part of the C standard. */
#if defined(__GNUC__) || defined(__clang__) || \
(defined(__STDC__) && defined(__STDC_VERSION__) && \
(__STDC_VERSION__ >= 202000L)) /* C2x/C23 ?*/
#define __HAVE_TYPEOF 1
#endif

Expand Down

0 comments on commit 53a9c70

Please sign in to comment.