home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,490 of 243,242   
   Keith Thompson to Andrey Tarasevich   
   Re: New and improved version of cdecl   
   26 Oct 25 15:36:07   
   
   XPost: comp.lang.c++   
   From: Keith.S.Thompson+u@gmail.com   
      
   Andrey Tarasevich  writes:   
   > On Wed 10/22/2025 2:39 PM, Keith Thompson wrote:   
   >> ...   
   >   
   > I believe I have already posted about it here... or maybe not?   
   >   
   > cdecl.org reports a "syntax error" for declarations with top-level   
   > `const` qualifiers on function parameters:   
   >   
   >   void foo(char *const)   
   >   
   > Such declarations are perfectly valid. (And adding an explcit   
   > parameter name does not help).   
   >   
   > The current version of cdecl.org still complains about it.   
      
   You're probably using 2.5, the version most commonly packaged with Linux   
   distributions.  The cdecl.org site uses that same old version.   
      
   This entire thread is about the newer version available at   
   .  It doesn't have that bug.   
      
   $ cdecl --version   
   cdecl 18.6   
   Copyright (C) 2025 Paul J. Lucas   
   License GPLv3+: GNU GPL version 3 or later .   
   This is free software: you are free to change and redistribute it.   
   There is NO WARRANTY to the extent permitted by law.   
   $ cdecl explain 'void foo(char *const)'   
   declare foo as function (constant pointer to character) returning void   
   $ cdecl explain 'void foo(char *const foo)'   
   declare foo as function (foo as constant pointer to character) returning void   
   $   
      
   (I'm not entirely pleased that the newer version expands "char" to   
   "character" and, worse, "int" to "integer", but I can live with it.)   
      
   --   
   Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com   
   void Void(void) { Void(); } /* The recursive call of the void */   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca