git: 2cadeb7ce1fb - main - devel/cdecl: update to 18.1

From: Larry Rosenman <ler_at_FreeBSD.org>
Date: Sun, 21 Jul 2024 04:39:00 UTC
The branch main has been updated by ler:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2cadeb7ce1fbebeb9c0cfffd38dbb777e30cf3ef

commit 2cadeb7ce1fbebeb9c0cfffd38dbb777e30cf3ef
Author:     Larry Rosenman <ler@FreeBSD.org>
AuthorDate: 2024-07-21 04:37:25 +0000
Commit:     Larry Rosenman <ler@FreeBSD.org>
CommitDate: 2024-07-21 04:38:56 +0000

    devel/cdecl: update to 18.1
    
    ChangeLog:
    alignas scoped names*
    Alignments can now have names to denote the number of bytes, e.g.:
    
    c++decl> explain alignas(N) char c
    declare c as character aligned as N bytes
    where N is presumed to be an integer constant.
    
    _BitInt multi-declarations
    Declarations like:
    
    declare x, y as bit precise integer 4
    are now correct.
    
    CDECL_TEST=false tests
    Fixed these tests.
    
    CDECL_TEST=true & --no-config
    Specifying the --no-config option now always works even when testing.
    
    enum, class, struct, & union multi-declarations
    Explaining these is now correct, e.g.:
    
    cdecl> explain enum E x, y, f()
    declare x, y as enumeration E
    declare f as function returning enumeration E
    Glob help
    Fixed glob help.
    
    Implicit int warnings
    In C89, implicit int is now warned about in more cases, e.g.:
    
    cdecl> set c89
    cdecl> explain static x
                   ^
    9: warning: missing type specifier; "int" assumed
    declare x as static integer
    K&R C typeless parameters in English
    To match gibberish output, K&R C typeless parameters now print as integer in pseudo-English:
    
    cdecl> set c17
    cdecl> explain char f(x)
                          ^
    16: warning: missing type specifier; "int" assumed
    declare f as function (x as integer) returning character
    --no-prompt option short option
    The short option for --no-prompt has been changed from -p to -P.
    
    New --permissive-types, -p options
    Permits either unknown names or keywords in language versions other than the current language as types in pseudo-English. By default, a declaration like:
    
    declare p as pointer to T
    where T is an unknown type would result in "unknown type" error. Similarly, a declaration in C like:
    
    declare p as pointer to class
    would result in an "unsupported type in C" error even though class would be a valid user-defined type in C. This option permits such declarations.
    
    Permissive types is not the default because always permitting either unknown names or keywords in language versions other than the current language as types can result in confusing errors. For example, if permissive types were the default, then you would get the following in C:
    
     cdecl> declare D as virtual destructor
                         ^
     14: warning: "virtual" is a keyword in C++
     virtual D;
                                 ^
     22: syntax error: "destructor": unexpected token ...
    Here, virtual, not being a keyword in C and therefore a valid name for a user-defined type, would be taken to be a type name, so cdecl would interpret that to mean you want to declare D as a variable of type virtual -- and cdecl would do so by printing virtual D (but still warning that virtual is a keyword in C++). But then destructor would be unexpectedly encountered and generate an error. (It could easily be the case that you simply forgot to set the current language to C++ instead of C.)
    
    With the default non-permissive behavior, you would instead get:
    
     cdecl> declare D as virtual destructor
                         ^
     14: error: "virtual": unsupported keyword in C
    which is clearer, but at the cost of not permitting valid declarations that use either unknown names or keywords in language versions other than the current language as types.
    
    show ::FILE
    Fixed a crash.
    
    show fixed glob
    Now, showing a specific glob (one having no *s in it) like:
    
    c++decl> show ::FILE
    will show the definition of FILE even though it's predefined and not the
    default of user-defined.
    
    Type name warnings
    Defining types that are keywords in other languages are now warned about, e.g.:
    
    cdecl> struct friend
                  ^
    8: warning: "friend" is a keyword in C++98
    typedef modifiers
    Attempting to use modifiers with typedefs is now correctly forbidden, e.g.:
    
    typedef int T
    explain unsigned T                  // error
    ** Unknown names**
    Now checking for unknown names in pointer-to-member and reference declarations.
---
 devel/cdecl/Makefile | 2 +-
 devel/cdecl/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/devel/cdecl/Makefile b/devel/cdecl/Makefile
index 4a61aa13f510..da699f3cd20d 100644
--- a/devel/cdecl/Makefile
+++ b/devel/cdecl/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	cdecl
-PORTVERSION=	18.0
+PORTVERSION=	18.1
 DISTVERSIONPREFIX=	${PORTNAME}-
 CATEGORIES=	devel
 
diff --git a/devel/cdecl/distinfo b/devel/cdecl/distinfo
index f445c8402aee..5085777be490 100644
--- a/devel/cdecl/distinfo
+++ b/devel/cdecl/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1720264069
-SHA256 (paul-j-lucas-cdecl-cdecl-18.0_GH0.tar.gz) = 02872c270c1c15bc09782d83dcdea746abb879c5e9b3c45bbc750b8e4edd6e1b
-SIZE (paul-j-lucas-cdecl-cdecl-18.0_GH0.tar.gz) = 1009882
+TIMESTAMP = 1721536630
+SHA256 (paul-j-lucas-cdecl-cdecl-18.1_GH0.tar.gz) = 5ff1a644c6bdfab1a5039ab0539705f7c33e8b2a4790a22565a19a16c07c04d2
+SIZE (paul-j-lucas-cdecl-cdecl-18.1_GH0.tar.gz) = 1019156