Releases: paul-j-lucas/cdecl
cdecl-9.9
C78
C78 is now accepted as an alias for K&RC.
"Did you mean ...?" for set
options
"Did you mean ...?" suggestions have been added for set
options.
More predefined types
Added iconv_t
, locale_t
, posix_spawnattr_t
, posix_spawn_file_actions_t
, regex_t
, regmatch_t
, and regoff_t
.
Nested types in C
Nested types:
struct S { typedef int Int; }
are now correctly caught as an error in C.
Pointer-to-function qualifiers
A pointer to function with qualifiers, e.g.:
int (*f)() const // illegal
is now correctly caught as an error.
Scoped name bit-fields
A scoped name having a bit-field width:
int S::x : 3 // illegal
is now correctly caught as an error.
Storage class bit-fields
A declaration having a storage class and a bit-field width:
static int x : 3 // illegal
is now correctly caught as an error.
cdecl-9.8
Added extern "C" using
support
extern "C" using
declarations are now supported.
C++ auto
help
The help for pseudo-English now correctly includes auto
as a storage class for C++98 and C++03.
Adding --explicit-int
to --help
Added (the missing) --explicit-int
to the help message.
Added Doxyfile
to tarball
Added (the missing) Doxyfile
to the dist-generated tarball.
cdecl-9.7
Multi-type typedef
Multiple types can now be declared in a single typedef
:
typedef int Int, *Pint;
New abbreviations
There are new abbreviations:
conv conversion
ctor constructor
dtor destructor
Qualified pointer spacing
Fixed spacing for qualified pointers.
cdecl-9.6
Specific languages in error messages
Rather than just say " is not supported in ", now says " is not supported until ."
More constructor & destructor warning checks
Constructors and destructors are now checked for throw
. Constructor parameters are now checked for warnings.
Reserved identifier warnings
Warnings are now given for names that are reserved identifiers, specifically names that match the patterns _[A-Z_]*
(C and C++) or *__*
(C++ only).
Type redefinition error now includes existing type
If you attempt to redefine an existing type with a different type, the error message now includes the existing type.
Fixed thread_local
thread_local
is now correctly allowed only in C11 or C++11 or later.
Function auto
parameters in C++20
Functions in C++20 now allow auto
parameters.
_Bool
_Bool
is now recognized only in C99 and later and not in C++.
imaginary
imaginary
is now mapped only to _Imaginary
in C99 and later and not in C++.
throw()
in C++20
throw()
is no longer supported in C++20.
Fixed args
help
The help for args
no longer prints <name>
for when the current language is either C2X or C++.
cdecl-9.5.1
Functions as parameters
A function as a parameter is now automatically converted to a pointer to function per 6.3.2.1(4) of the C standard.
[[
and ]]
"tokens" allow whitespace
The [[
and ]]
"tokens" now allow whitespace between them (since they're not distinct tokens).
AX_CHECK_COMPILE_FLAG
Replaced used of AX_CFLAGS_GCC_OPTION
with AX_CHECK_COMPILE_FLAG
.
cdecl-9.5
Added enum
, class
, struct
, and union
attribute specifier support
Attributes can now also be specified for enum
, class
, struct
, and union
declarations:
cdecl> explain [[maybe_unused]] struct S x // previously supported
cdecl> explain struct [[maybe_unused]] S x // now also supported
Unfortunately, the resulting English is the same for both:
declare x as maybe-unused structure S
because there's no other (obvious) way to word the English so it's different between cases.
"Did you mean ...?" for attributes
"Did you mean ...?" suggestions have been added for misspelled attributes.
Improved "unknown" error messages
When a name is unknown in the current language but exists in a later language, the type of name is now used in the error message.
Added fixed-type enum
support
Fixed-type enumerations are now supported:
c++decl> explain enum E : char8_t
define E as enumeration E of type char8_t
Added extern "C"
support
extern "C"
declarations are now supported.
Added C2X __attr__
aliases
In C2X, the attribute aliases of __deprecated__
, __maybe_unused__
, and __nodiscard__
are now supported.
Added support for parsing C++ attribute arguments
Arguments for attributes are now parsed, but otherwise ignored. (A warning is printed that it's ignored.)
Added support for parsing C++17 using
in attributes
The optional using
in attributes is now parsed, but otherwise ignored. (A warning is printed that it's ignored.)
Added support for parsing GNU __attribute__
GNU C's __attribute__
syntax is now parsed, but otherwise ignored. (A warning is printed that it's ignored.)
Fixed auto
with storage class
The storage class in a declaration like:
c++decl> explain static auto f() -> int
declare f as static function returning int
is now correctly included.
Fixed register enum
Enumerations were wrongly forbidden from being register
.
cdecl-9.4
Improved constructor & destructor declaration support
Inline file-scope and defaulted & deleted in-class constructors & destructors are now supported; final
& override
are now supported for destructors.
Explaining forward declarations
Forward enum
, class
, struct
, and union
declarations are now supported:
cdecl> explain struct S
define S as struct S
Catching types having bit-field widths
Types having bit-field widths are now correctly reported as errors.
Fixed showing as using
Fixed showing of types having qualified pointers as using
declarations.
More predefined types
Added constraint_handler_t
and lconv
.
Fixed char** f()
crash
Explaining this declaration now works.
cdecl-9.3
Bit-fields
Declarations with bit-field widths are now supported:
cdecl> explain unsigned x : 3
declare x as unsigned int width 3 bits
Digraph warning
A warning is given if the digraph option is set and the current language is C89 or earlier.
cdecl-9.2
In-class constructor declarations
In-class constructor declarations without any storage-class-like type are now supported:
c++decl> explain C(int)
declare C as constructor (int)
Context-senstive final
& override
Both final
and override
are now recognized as keywords only in a member function declaration context:
c++decl> explain int final
declare final as int
c++decl> explain void f() final
declare f as final virtual member function returning void
cdecl-9.1
K&R C typedef
s
K&R C now has a set of predefined typedef
declarations distinct from C89 that include only those shown in the first edition of The C Programming Language.
K&R C main()
arguments
The arguments of main()
are no longer checked for type in K&R C.
main()
third argument
A third argument of either:
char *envp[]
char **envp
(or const
versions) for main()
is now supported.
K&R C functions
Implicit int
functions in K&R C are now supported:
cdecl> set knrc
cdecl> explain f(x)
declare f as function (x) returning int
Additionally, if returning
english is omitted, it's equivalent to returning int
in C95 and earlier.
Language-version-specific help
Help is now specific to particular language versions, not just C or C++.
show english
The show
command now allows english
explicitly as an option. (Since it's the default, it's ignored.)
"Did you mean ...?" improvements
"Did you mean ...?" suggestions have been added for explain
and type suggestions are only those valid in the current language.
Additional no-
English synonyms
The English synonyms of no-return
, no-except
, no-discard
, and no-unique-address
have been added.