rizin/librz/include
NOT XVilka e23ac87bc9
librz/type: parse, render and size C23 enum underlying types (#3498) (#6433)
C23 lets an enum fix its underlying type, e.g. "enum E : long long { ... }".
The C grammar already exposes it as the "underlying_type" field of an
enum_specifier, and RzBaseType already has a "type" slot documented as
used by enums, but the parser ignored the field and always left it NULL.

- parse_enum_node() now reads the "underlying_type" field and stores the
  parsed type on RzBaseType::type (reusing parse_type_node_single(), so
  primitive, sized and typedef'd integer types are all handled). Classic
  enums keep a NULL underlying type.
- The pretty printer emits " : <type>" between the enum name and its body
  when an underlying type is present, so "tc"/"tcd"/"tec" round-trip it.
- enum_bitsize() now derives the width from the underlying type instead of
  the hardcoded 32-bit default (resolving the long-standing FIXME); it
  still falls back to 32 for a classic enum.

Single-token underlying types (int, uint64_t, char, ...) work end-to-end
with the bundled grammar revision: the existing "enhanced enum" db test is
updated to round-trip "enum v : int" and a unit test covers
"enum EU : uint64_t". Multi-word underlying types (long long, unsigned int)
are added as BROKEN db tests; the bundled grammar parses them to an ERROR
node and drops the underlying type, so these tests fail for now and will
pass once rizin-grammar-c accepts sized type specifiers as the enum
underlying type. No further rizin change is needed for that step.

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-05-31 04:01:02 +08:00
..
rz_crypto librz/bin: add CaRT container format support (#5964) 2026-03-07 20:51:50 +08:00
rz_esil Move ESIL into its own namespace (#6199) 2026-04-11 16:26:01 +08:00
rz_il shell: fix output indentation in plF command (#6198) 2026-04-12 19:33:18 +08:00
rz_util librz/util: shared Unicode subscript formatting for bit-vectors and floats (#6418) 2026-05-29 02:02:58 +08:00
sflib Rewrite C compiler code for rz-gg (#5761) 2026-01-10 13:36:51 +08:00
meson.build Install missing rz_math.h header (#6401) 2026-05-25 10:32:36 +02:00
rz_agraph.h Fix RZ_IPI usage on public headers & fix memory leak in the ROP code. (#6171) 2026-04-08 13:37:17 +08:00
rz_analysis.h librz/core: implement ROP/JOP/COP gadget cache (#6328) 2026-05-24 21:48:42 +08:00
rz_arch.h
rz_asm.h librz/debug: native debugger plugin for RISC-V (#5966) 2026-04-26 16:28:07 +08:00
rz_basefind.h Revert back only the changes for the threads code and ignores rz-test 2024-06-02 18:11:06 +08:00
rz_bin.h util: extend string search with user-defined printable characters (#6161) 2026-05-01 22:47:14 +08:00
rz_bin_dwarf.h Fix memory leaks related to DWARF (#6245) 2026-04-17 17:33:11 +00:00
rz_bin_source_line.h Add HtSP, HtSS, HtSU, SetS (#4415) 2024-04-16 20:27:48 +08:00
rz_bind.h
rz_bp.h Move RzBreakpoint into RzDebug (#5124) 2025-05-13 01:57:37 +08:00
rz_build_version.h.in
rz_cmd.h Implement colors for tables and move RzListInfo out of table.c (#5729) 2026-01-05 21:34:41 +08:00
rz_cmp.h
rz_config.h Add RzConfigValidator for validating (on set) owned variables (#6356) 2026-05-16 16:12:13 +02:00
rz_cons.h librz/cons/histogram: revamp static horizontal histogram (#5290, #6372) (#6427) 2026-05-30 20:29:11 +08:00
rz_constructor.h
rz_core.h support context-aware core plugins (#6404) 2026-05-28 20:37:01 +08:00
rz_crypto.h librz/util: base64, base85, base36, base32, base16 support and refactor (#5216) (#5271) 2025-08-17 15:26:25 +08:00
rz_debug.h Add new implementation of RzConfig (#5820) 2026-05-03 15:34:48 +08:00
rz_demangler.h Remove rz-libswift to avoid embedding C++ projects. (#5320) 2025-08-27 10:38:10 +08:00
rz_diff.h
rz_drx.h
rz_egg.h Cleanup egg code from unused code. (#5767) 2026-01-10 17:02:38 +08:00
rz_endian.h Revert changes for rz_read_be128 and rz_write_be128 (#5779) 2026-01-11 18:06:02 +08:00
rz_flag.h Fix aav.aav.* naming #2205 (#6079) 2026-03-29 17:49:04 +08:00
rz_flirt.h Add WASM to sig enum in rz_flirt.h (#4945) 2025-02-28 14:06:16 +08:00
rz_gadget.h librz/core: implement ROP/JOP/COP gadget cache (#6328) 2026-05-24 21:48:42 +08:00
rz_getopt.h
rz_hash.h hash: add fnv1a algorithm (#6186) 2026-04-09 19:05:02 +08:00
rz_heap_glibc.h Fix RZ_IPI usage on public headers & fix memory leak in the ROP code. (#6171) 2026-04-08 13:37:17 +08:00
rz_heap_jemalloc.h Fix RZ_IPI usage on public headers & fix memory leak in the ROP code. (#6171) 2026-04-08 13:37:17 +08:00
rz_il.h
rz_io.h Fix RZ_IPI usage on public headers & fix memory leak in the ROP code. (#6171) 2026-04-08 13:37:17 +08:00
rz_jemalloc_types.h heap: refactor parser for jemalloc 4.5.0 (#5722) 2026-01-07 00:24:12 +08:00
rz_lang.h Remove static global variables from armass.c, rtr.c, rtr_http.c, and c.c (#6183) 2026-04-09 00:53:01 +08:00
rz_lib.h refactor: Use HtSP for storing plugins. (#4687) 2024-10-26 16:31:13 +08:00
rz_list.h Revert "Implement Pool Node allocation for RzList (#6203)" (#6313) 2026-05-04 22:45:00 +08:00
rz_magic.h Fix memory leak in RzMagicLine: free test_string and name fields (#5782) 2026-01-15 13:37:04 +00:00
rz_main.h rz-ar: add archive extraction utility (#6036) 2026-03-18 03:51:18 +08:00
rz_mark.h refactor: rz_mark_foreach_glob to rz_mark_foreach_regex (#5446) 2025-10-11 00:55:10 +08:00
rz_math.h test/bench: measure standard deviation for benchmarks (#6390) 2026-05-25 05:08:06 +08:00
rz_parse.h
rz_pdb.h Fix RZ_IPI usage on public headers & fix memory leak in the ROP code. (#6171) 2026-04-08 13:37:17 +08:00
rz_pf.h Rewrite the pf parser and rework the grammar (#6410) 2026-05-29 03:58:58 +08:00
rz_platform.h Reject NULL values in rz_platform_profiles_init() (#5090) 2025-04-22 15:49:02 +08:00
rz_project.h librz/type: parse, render and size C23 enum underlying types (#3498) (#6433) 2026-05-31 04:01:02 +08:00
rz_reg.h RzReg: Associate roles with RzRegItem instead of name strings (#6291) 2026-04-30 12:03:51 +02:00
rz_search.h Remove dead code of /b. 2025-12-31 23:45:05 +08:00
rz_sign.h
rz_skiplist.h
rz_skyline.h
rz_socket.h Remove RAP protocol (#5046) 2025-03-27 00:55:06 +08:00
rz_syscall.h Fix: asn and asr command #3885 (#5477) 2025-11-04 23:38:16 +08:00
rz_th.h Fix deadlock in rz_th_queue_close_when_empty() (#6383) 2026-05-25 09:25:29 +02:00
rz_type.h type: add a pf-format to C-declaration converter (#6422) 2026-05-30 00:29:06 +08:00
rz_types.h Fix build on sparc64 and ppc 2026-05-04 06:22:00 +02:00
rz_types_base.h Use stdint types for ut64 and friends (#6276) 2026-04-22 21:43:04 +08:00
rz_types_overflow.h
rz_userconf.h.in Implement ring buffer (#6081) 2026-04-13 10:15:49 +00:00
rz_util.h test/bench: measure standard deviation for benchmarks (#6390) 2026-05-25 05:08:06 +08:00
rz_vector.h Add order ignoring remove_at version with better performance. (#6389) 2026-05-22 20:54:49 +00:00
rz_windows.h
rz_windows_heap.h Simplify relative #include to windows_heap_types.h (#6211) 2026-04-11 23:25:15 +08:00