Description
cdecl is a command-line program for composing and deciphering C and C++ declarations and casts, the hard-to-read type syntax that programmers often call gibberish. It can be used interactively in a terminal or take input from the command line or standard input. It also helps with C preprocessor macros by performing the expansion one step at a time, which makes macro bugs easier to trace. The tool distinguishes between language versions, from K&R C through C89, C99, C11, C17 and C23, and from C++98 to C++26. It knows many predefined types, including common POSIX and standard library types and all Microsoft Windows types, and it supports calling conventions, variadic parameters, inline functions and typedef declarations. The project is public on GitHub and uses GNU Autotools for building. It is useful for students, systems programmers and anyone who reads or maintains older C code and wants to check what a declaration means before changing it.…
Highlights
- Decipher and compose C and C++ declarations
- Interactive terminal mode or command-line input
- Expands C preprocessor macros step by step
- Knows language versions from K&R C to C++26
- Built with GNU Autotools
Ratings & Reviews
No ratings yet
Be the first to rate Cdecl.
People also visit

cpp-coding-standards
C++ coding standards based on the C++ Core Guidelines (isocpp.github.io)
Cdecl FAQ
What is cdecl for?
It composes and deciphers C or C++ declarations and casts, and it can expand C preprocessor macros step by step.
Who is it for?
Programmers who write or read C and C++ declarations and want a tool to check what they mean.
How do I use it?
Run it interactively in a terminal, or pass the declaration on the command line or through standard input.
Which language versions does it support?
It distinguishes K&R C, C89 through C23, and C++98 through C++26, and includes many standard and Windows types.
How is it built?
The codebase uses GNU Autotools. The source is public on GitHub.
What are the best Cdecl alternatives?
Popular alternatives to Cdecl include cpi, Ccls and Gdbgui. See all Cdecl alternatives





