Skip to content

Releases: paul-j-lucas/cdecl

cdecl-9.0

19 Dec 01:56
Compare
Choose a tag to compare

Showing as using declarations
The show command can now alternatively show types as using declarations.

Language-sensitive show command
For predefined or user, the show command now shows only types that are valid in the current language. (See the man page for details.)

Language-sensitive type printing
When printing enum, struct, class, or union types, they are shown differently depending on what language the type was defined in and whether the current language is C or C++:

c++decl> define S as struct S
c++decl> show user typedef
struct S;
c++decl> set c
cdecl> show all user typedef
typedef struct S S;

co_await, co_return, co_yield added
These C++20 keywords were added to prevent use as identifiers in C++20 and warn in older languages.

cdecl-8.3

11 Dec 02:01
Compare
Choose a tag to compare

"Did you mean ...?" added
If you make a typographical error for either commands or type names, you'll now receive "did you mean?" suggestions as part of the error message.

Multiple, comma-separated declarations
Multiple, comma-separated declarations are finally supported.

C17
The official informal name for ISO/IEC 9899:2018 is now C17 instead of C18. However, C18 is still accepted as an alias for C17.

C90
C90 is now accepted as an alias for C89.

cdecl-8.2

21 Nov 14:38
Compare
Choose a tag to compare

Added align
Pseudo-English now allows align as a synonym for aligned.

Multiple set options
The set command can now take multiple options.

Show abbreviated form
When showing types in pseudo-English, the abbreviated form is used, e.g.:

cdecl> show
struct S;           // instead of: typedef struct S S;

Type-qualified arrays of unspecified size
C99 type-qualified array function arguments can now have a size omitted, e.g.:

void f( int a[const] );

cdecl-8.1

13 Sep 18:53
Compare
Choose a tag to compare

Enum declarations
Enumerations can now be declared in the same abbreviated manner as classes:

enum E
enum class E2

Unified Parallel C support
Added support for Unified Parallel C:

  • Added qualifiers relaxed, shared, and strict.
  • However, for the shared qualifier, the optional layout qualifier is parsed but otherwise ignored.

Since the Unified Parallel C standard is based on C99, support for Unified Parallel C is available only when the language is set to C99.

Restricted references
GNU C++ allows references to be restricted:

void f( int &__restrict r )
void g( int &&__restrict rr )

Now, cdecl does too.

More C++ std types
Added types std::adopt_lock_t, std::align_val_t, std::ambiguous_local_time, std::atomic_bool, std::atomic_char, std::atomic_char16_t, std::atomic_char32_t, std::atomic_char8_t, std::atomic_flag, std::atomic_int, std::atomic_int16_t, std::atomic_int32_t, std::atomic_int64_t, std::atomic_int8_t, std::atomic_int_fast16_t, std::atomic_int_fast32_t, std::atomic_int_fast64_t, std::atomic_int_fast8_t, std::atomic_int_least16_t, std::atomic_int_least32_t, std::atomic_int_least64_t, std::atomic_int_least8_t, std::atomic_intmax_t, std::atomic_intptr_t, std::atomic_llong, std::atomic_long, std::atomic_ptrdiff_t, std::atomic_schar, std::atomic_short, std::atomic_signed_lock_free, std::atomic_size_t, std::atomic_uchar, std::atomic_uint, std::atomic_uint16_t, std::atomic_uint32_t, std::atomic_uint64_t, std::atomic_uint8_t, std::atomic_uint_fast16_t, std::atomic_uint_fast32_t, std::atomic_uint_fast64_t, std::atomic_uint_fast8_t, std::atomic_uint_least16_t, std::atomic_uint_least32_t, std::atomic_uint_least64_t, std::atomic_uint_least8_t, std::atomic_uintmax_t, std::atomic_uintptr_t, std::atomic_ullong, std::atomic_ulong, std::atomic_unsigned_lock_free, std::atomic_ushort, std::atomic_wchar_t, std::bad_alloc, std::bad_any_cast, std::bad_array_new_length, std::bad_cast, std::bad_exception, std::bad_function_call, std::bad_optional_access, std::bad_type_id, std::bad_variant_access, std::bad_weak_ptr, std::byte, std::chrono::choose, std::chrono::day, std::chrono::file_clock, std::chrono::gps_clock, std::chrono::high_resolution_clock, std::chrono::is_clock, std::chrono::last_spec, std::chrono::leap_second, std::chrono::local_info, std::chrono::local_t, std::chrono::month, std::chrono::month_day, std::chrono::month_day_last, std::chrono::month_weekday, std::chrono::month_weekday_last, std::chrono::nonexistent_local_time, std::chrono::steady_clock, std::chrono::sys_info, std::chrono::system_clock, std::chrono::tai_clock, std::chrono::time_zone, std::chrono::time_zone_link, std::chrono::tzdb, std::chrono::tzdb_list, std::chrono::utc_clock, std::chrono::weekday, std::chrono::weekday_indexed, std::chrono::weekday_last, std::chrono::year, std::chrono::year_month, std::chrono::year_month_day, std::chrono::year_month_day_last, std::chrono::year_month_weekday, std::chrono::year_month_weekday_last, std::codecvt_base, std::condition_variable, std::condition_variable_any, std::ctype_base, std::cv_status, std::defer_lock_t, std::domain_error, std::error_category, std::error_code, std::error_condition, std::filebuf, std::filesystem::copy_options, std::filesystem::directory_entry, std::filesystem::directory_iterator, std::filesystem::directory_options, std::filesystem::file_status, std::filesystem::filesystem_error, std::filesystem::file_type, std::filesystem::path, std::filesystem::perm_options, std::filesystem::perms, std::filesystem::recursive_directory_iterator, std::filesystem::space_info, std::format_error, std::fstream, std::future_errc, std::future_error, std::future_status, std::ifstream, std::invalid_argument, std::ios, std::ios_base::failure, std::iostream, std::istream, std::istringstream, std::length_error, std::locale, std::logic_error, std::messages_base, std::money_base, std::mutex, std::nonstopstate_t, std::ofstream, std::ostream, std::ostringstream, std::osyncstream, std::out_of_range, std::overflow_error, std::range_error, std::recursive_mutex, std::recursive_timed_mutex, std::regex, std::regex_error, std::runtime_error, std::shared_mutex, std::shared_timed_mutex, std::stop_source, std::stop_token, std::streambuf, std::stringbuf, std::stringstream, std::string_view, std::syncbuf, std::system_error, std::time_base, std::timed_mutex. std::try_to_lock_t, std::u16string_view, std::u32string_view, std::u8string_view, std::underflow_error, std::wfilebuf, std::wfstream, std::wifstream, std::wios, std::wiostream, std::wistream, std::wistringstream, std::wofstream, std::wostream, std::wostringstream, std::wosyncstream, std::wregex, std::wstreambuf, std::wstringbuf, std::wstringstream, std::wstring_view, and std::wsyncbuf.

cdecl-8.0

30 Jul 04:17
Compare
Choose a tag to compare

C2X support
Added support for C2X:

  • Added type char8_t.
  • Added [[...]] syntax for attributes.
  • Added [[deprecated]], [[maybe_unused]], and [[nodiscard]] attributes.
  • Removed support for typeless function arguments in K&R C.

More C++20 support
Added support for constinit and export in C++20.

Embedded C support
Added support for Embedded C:

  • Added types _Accum and _Fract (and accum and fract).
  • Added modifier _Sat (and sat and saturated).
  • Added the typedefs int_hk_t, int_hr_t, int_k_t, int_lk_t, int_lr_t, int_r_t, uint_uhk_t, uint_uhr_t, uint_uk_t, uint_ulk_t, uint_ulr_t, and uint_your_t.

Since the Embedded C standard is based on C99, support for Embedded C is available only when the language is set to C99.

Forbidding attribute syntax
The [[xxx]] attribute syntax is now forbidden until either C2X or C++11.

class, struct, & union optional ;
Semicolons are now optional after class, struct, or union declarations.

class, struct, & union define themselves
Before now:

class C { typedef int Int; }

would define only C::Int as a type. Now, the enclosing class, struct, or union is also defined as a type. Hence, the above is now equivalent to:

define C as class C
define C::Int as int

This also means that either:

class C { }
class C

is eqivalent to:

define C as class C

class, struct, & union commands
class, struct, and union are now commands (just like namespace).

Per-scope types; fixed English scope name order
Each scope of a scoped name (sname) now has its own type. Additionally, the English printed order is now (correctly) inner-to-outermost. For example:

c++decl> namespace N { class C { typedef int I; }; }
c++decl> explain N::C::I x
declare x as I of class C of namespace N

Floating-point extensions for C types
Added types _Decimal32_t, _Decimal64_t, _Decimal64x, _Decimal128x, _Float32, _Float32x, _Float64, _Float128, _Float128x, femode_t, and long_double_t.

Aligned to
Now allowing to in addition to as for ... aligned [as|to] ....

show as
Now allowing an optional as in show ... [as] typedef.

asm
Added the asm keyword to prevent declarations from using it.

cdecl-7.4.1

11 Jul 19:54
Compare
Choose a tag to compare

Allowing signed main()
The legal signed main() signature is now accepted.

Ignoring east-const in English
East const is now ignored when explaining gibberish.

Disallowing reference to reference
References to references are now errors.

cdecl-7.4

01 Jul 14:05
Compare
Choose a tag to compare

Bison debugging change
Changed --enable--yydebug configure option to --enable-bison-debug, --yydebug/-y cdecl options to --bison-debug/-B, and yydebug to bison-debug set option.

Added Flex debugging
Added --enable-flex-debug configure option, --flex-debug/-F cdecl options, and flex-debug set option.

Fixed set options
Finally fixed parsing of set options.

cdecl-7.3

29 Jun 15:29
Compare
Choose a tag to compare

Checking main()s signature
The signature of main() is now checked.

More C standard types
Added the standard C types atomic_flag, double_t, fenv_t, fexcept_t, float_t, jmp_buf, memory_order, va_list, wctrans_t, and wctype_t.

Fixed explaining pointer-to-array function arguments
Explaining a declaration like:

cdecl> explain void f(double (*a)[5])

crashed; fixed.

cdecl-7.2

14 Jun 15:30
Compare
Choose a tag to compare

new & delete operator overloading
Added support for composing and deciphering C++ overloaded new, new[], delete, and delete[] operators.

extern &static functions
extern or static functions can not be const.

English scoped types
Given:

struct S { typedef int Int; }
explain S::Int x

the explanation is:

declare x as Int of structure S

but English types ("T of ...") weren't legal in cdecl's grammar. They are now.

More C++ std types
Added types std::align_val_t, std::destroying_delete_t, and std::nothrow_t.

throw() put back
throw is still a keyword so it was put back in C++20.

Fixed user-defined literal argument
Explicitly specifying int is now accepted.

cdecl-7.1

26 May 16:04
Compare
Choose a tag to compare

Added more GNU extensions
Added GNU C's __complex, __complex__, __const, __inline, __restrict, __signed, __signed__, __volatile, and __volatile__.

_Bool in C
In C, _Bool is now emitted rather than bool.

register removed
register is now removed (but still reserved) in C++17 and later.