From 7e61b11f23abe1a2b0f5e826c0832a291895df4a Mon Sep 17 00:00:00 2001 From: Jesse Rosenstock Date: Sat, 15 Aug 2020 21:22:31 +0200 Subject: [PATCH] Add _Static_assert docs to cc65 extensions Fixes #1149. --- doc/cc65.sgml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/cc65.sgml b/doc/cc65.sgml index dba0a0288..a81358510 100644 --- a/doc/cc65.sgml +++ b/doc/cc65.sgml @@ -792,6 +792,21 @@ This cc65 version has some extensions to the ISO C standard. size zero, even if it is initialized.

+ cc65 supports + /* C11 version with message. */ + _Static_assert (sizeof (int) == 2, "Expected 2-bytes ints."); + + /* C2X version without message. */ + _Static_assert (sizeof (int) == 2); + + + Computed gotos, a GCC extension, has limited support. With it you can use fast jump tables from C. You can take the address of a label with a double ampersand, putting them in a static const array of type void *.