From: Keith.S.Thompson+u@gmail.com   
      
   bart writes:   
   > On 24/10/2025 00:04, Keith Thompson wrote:   
   >> bart writes:   
   [...]   
      
   I note that you've ignored the vast majority of my previous article.   
      
   >>> Regarding your example, my old C compiler (which is a fraction the   
   >>> size of this new Cdecl) 'explains' it as:   
   >>>   
   >>> 'ref proc(int)ref proc()void'   
   >>>   
   >>> (Not quite English, more Algol68-ish.)   
   >> Can I run your old C compiler on my Ubuntu system?   
   >>   
   >   
   > The old one needed a tweak to bring it up-to-date for my newer C   
   > transpiler. So it was easier to port the feature to the newer product.   
   >   
   > Download https://github.com/sal55/langs/blob/master/ccu.c   
   >   
   > (Note: 86Kloc/2MB file; this is poor quality, linear C generated from   
   > intermediate language.)   
   >   
   > Build instructions are at the top. Although this targets Win64, it   
   > works enough to demonstrate the feature above. Create this C file (say   
   > test.c):   
   >   
   > int main(void) {   
   > void (*f(int i))(void);   
   > $showmode f;   
   > }   
   >   
   > Run as follows (if built as 'ccu'):   
   >   
   > ./ccu -s test   
   >   
   > It will display the type during compilation.   
   >   
   > Obviously this is not a dedicated product (and doing the reverse needs   
   > a separate program), but I only needed to add about 10 lines of code   
   > to support '$showmode'.   
   >   
   > Original source, omitting the unneeded output options, would be 2/3   
   > the size of that configure script.   
      
   OK, I was able to compile and run your ccu.c, and at least on this   
   example it works as you've described it. It looks interesting,   
   but I personally don't find it particularly useful, given that I   
   already have cdecl, I prefer its syntax, and it's easier to use   
   (and I almost literally could not care less about the number of   
   lines of code needed to implement cdecl).   
      
   --   
   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)   
|