Cdecl is a program which will turn English-like phrases such as
"declare foo as array 5 of pointer to function returning int" into C
declarations such as "int (*foo[5])()" and vice-versa. It handles
typecasts and C++ as well, and offers command line editing and
history.
Provides
Requires
License
GPL-3.0-or-later
Changelog
* Sun Mar 01 2026 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.7.2
* Fixed a similar macro empty character literal crash
* Sun Mar 01 2026 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.7.1
* Fixed macro empty string literal crash
* Sat Feb 28 2026 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.7
* Compound literals now allow a storage class per C23.
* When expanding macros, a new final step of concatenating
adjacent string literals has been added.
* cdecl now additionally supports this specification for locating
its configuration file, specifically the XDG_CONFIG_HOME and
XDG_CONFIG_DIRS environment variables.
* Tue Nov 25 2025 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.6
* Better "did you mean" suggestions.
* Specifying the -t option twice now suppresses predefining all
types.
* Multiline C-style comments /* */ are now supported (mostly).
* _Atomic void parameters are now also correctly flagged as
illegal.
* Sat Jul 05 2025 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.5
* Added support for C++26 `indeterminate` attribute and
some predefined types.
* `static` storage class support.
* Mon Apr 07 2025 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.4.2
* Fixed issue with accumulating newlines in command-line history.
* Tue Sep 03 2024 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.4
* Initial support for C++26 has been added, specifically =
delete("reason") is now supported.
* Support placemarkers for empty macro argument.
* Thu Aug 15 2024 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.3
* Autocompletion for `set no-<TAB>`
* Enhancements for preprocessor __VA macros
* Wed Jul 31 2024 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.2
* Unknown names are now always permitted as types in
pseudo-English. Hence, the --permissive-types option now only
additionally allows keywords in language versions other than
the current language as types.
* Sat Jul 20 2024 Jan Engelhardt <jengelh@inai.de>
- Update to release 18.1
* Alignments can now have names to denote the number of bytes.
* In C89, implicit int is now warned about in more cases.
* To match gibberish output, K&R C typeless parameters now print
``as integer`` in pseudo-English.
* Sat Jul 06 2024 Jan Engelhardt <jengelh@inai.de>
- Update to release 18
* Allowing blocks & user-defined literals in multi-declarations
* cast & declare command executable name support
* New --lineno, -L option
* Tue Jun 18 2024 Jan Engelhardt <jengelh@inai.de>
- Update to release 17.0.1
* Functions returning parameter packs is now correctly illegal.
* Thu Jun 13 2024 Jan Engelhardt <jengelh@inai.de>
- Update to release 17.0
* Support abbreviated function template parameter packs
* Added ``help`` option suggestions
* Support ``auto`` parameters in typedefs
* Recognize structured binding declarations
* Tue May 28 2024 Jan Engelhardt <jengelh@inai.de>
- Update to release 16.4.1
* Echoing commands short option
* Improved error messages for predefined types
* Tue Apr 16 2024 Jan Engelhardt <jengelh@inai.de>