Skip to content

Releases: paul-j-lucas/cdecl

cdecl-18.7.2

01 Mar 13:44

Choose a tag to compare

Fixed a similar macro empty character literal crash
The following:

cdecl> #define EMPTY_CHAR ''

no longer crashes and now works as expected.

cdecl-18.7.1

28 Feb 23:54

Choose a tag to compare

Fixed macro empty string literal crash
The following:

cdecl> #define EMPTY_STRING ""

no longer crashes and now works as expected.

cdecl-18.7

28 Feb 14:13

Choose a tag to compare

Compound literal storage class
Compound literals now allow a storage class per C23:

cdecl> explain (static struct chan*[])
cast into array of pointer to static structure chan

Concatenate adjacent string literals
When expanding macros, a new final step of concatenating adjacent string literals has been added.

__STDC_ macros
Defining a macro with a name beginning with __STDC_ now results in a warning that such names are reserved.

XDG Base Directory Specification
cdecl now additionally supports this specification for locating its configuration file, specifically the XDG_CONFIG_HOME and XDG_CONFIG_DIRS environment variables.

cdecl-18.6

25 Nov 02:43

Choose a tag to compare

Better "did you mean" suggestions
"Did you mean" suggestions now include all that are "similar enough," not only those that have the same Damerau-Levenshtein distance as the best suggestion.

--no-typedefs, -t option, twice
Specifying the -t option twice now suppresses predefining all types, even those normally required. (This is a debugging aid for developers of cdecl itself. Certain results willl be incorrect.)

East-const _Atomic
When in east-const mode, _Atomic is now also printed east.

_Atomic void parameters
Such parameters are now also correctly flagged as illegal.

Color prompts
Initial color prompts have been fixed.

Multiline comments
Multiline C-style comments /* */ are now supported (mostly).

cdecl-18.5

04 Jul 14:44

Choose a tag to compare

[[indeterminate]]
Added support for C++26 indeterminate attribute.

C++26 types
Added the predefined types std::hazard_pointer, std::hive_limits, std::rcu_domain, std::text_encoding, std::contracts::assertion_kind, std::contracts::contract_violation, std::contracts::detection_mode, std::contracts::evaluation_semantic, std::linalg::column_major_t, std::linalg::explicit_diagonal_t, std::linalg::implicit_unit_diagonal_t, std::linalg::lower_triangle_t, std::linalg::row_major_t, and std::linalg::upper_triangle_t.

Fixed explanations of pointers/references with storage classes
Explanations of things like:

cdecl> explain static int *p
declare p as static pointer to integer

are now correct.

cdecl-18.4.2

07 Apr 12:12

Choose a tag to compare

Fixed issue #38: Accumulating newlines in command-line history
A newline should be added to the command-line only after it's been added to the history.

cdecl-18.4.1

09 Sep 01:58

Choose a tag to compare

readline.h & stdio.h fix
Compensating for the apparent fact that genuine GNU readline.h (wrongly) requires a manual #include <stdio.h>.

cdecl-18.4

03 Sep 13:20

Choose a tag to compare

C++26
Initial support for C++26 has been added, specifically = delete("reason") is now supported.

However, since C++26 is (at least) 2 years away, the default language for C++ is still C++23.

Placemarker for empty macro argument
Macros that can take a single argument can also accept no arguments since it's interpreted as an argument of a placemarker, e.g.:

cdecl> #define M1(A)    [A]
cdecl> expand M1()
M1() => [A]
| A =>
M1() => []

is correct.

cdecl-18.3

15 Aug 14:40

Choose a tag to compare

no option autocompletion
Since the "no" options are of the form nofoo and not no-foo, if the user types:

cdecl> set no-<tab>

i.e., includes -, it's changed to just "no" so cdecl will still present all the "no" options.

Dynamic __FILE__ & __LINE__ macros
The value of __FILE__ is now the current input file, if any, or stdin. The value of __LINE__ is the line numer within that file, if any.

language option
The lang option has been replaced by language to match the --language command-line option.

Fixed set lang
Giving a value for a language for the set command is now correctly forbidden, e.g.:

cdecl> set c=x
             ^
7: error: "x": set option "c" takes no value

## whitespace
Fixed incorrect deletion of whitespace when concatenating tokens in some cases.

__VA_ARGS__ as ## argument
__VA_ARGS__ as a ## argument is now correctly not further expanded, e.g.:

cdecl> #define XPASTE(...)  x ## __VA_ARGS__
cdecl> expand XPASTE(__LINE__)
...
XPASTE(__LINE__) => x__LINE__

__VA_OPT__ expanding to nothing
When __VA_OPT__ expands to nothing, it needs to expand into a placemarker.

__VA_OPT__ whitespace
Leading & trailing whitespace in __VA_OPT__() tokens is now trimmed, e.g.:

cdecl> #define CALL_QUOTE(x) QUOTE(x)
cdecl> #define QUOTE(X) #X
cdecl> #define TILDAS(...) ~__VA_OPT__( ~ )~
cdecl> expand CALL_QUOTE(TILDAS(x))
...
CALL_QUOTE(~~~) => "~~~"

cdecl-18.2

29 Jul 23:15

Choose a tag to compare

More permissive types
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.