From: 046-301-5902@kylheku.com   
      
   On 2026-01-03, David Brown wrote:   
   > On 02/01/2026 23:18, Chris M. Thomasson wrote:   
   >> On 1/2/2026 1:52 PM, Kaz Kylheku wrote:   
   >>> On 2026-01-02, Michael Sanders wrote:   
   >>>> On Fri, 2 Jan 2026 17:48:16 -0000 (UTC), Kaz Kylheku wrote:   
   >>>>   
   >>>>> On 2026-01-02, Michael Sanders wrote:   
   >>>>>> B: because every function must have a return type   
   >>>>>> *including function pointers*?   
   >>>>>   
   >>>>> What it is you think type is, in the context of C?   
   >>>>>   
   >>>>> Does type survive into run-time?   
   >>>>>   
   >>>>> If a function pointer is missing type information about return type,   
   >>>>> and   
   >>>>> that function pointer is needed for expressing a function call, where   
   >>>>> does the compiler get the type from?   
   >>>>   
   >>>> Its void that's throwing me Kaz. I'm not sure what to think when   
   >>>> it comes to void pointers.   
   >>>   
   >>> Because you teleported here from 1985.   
   >>   
   >> [...]   
   >>   
   >> One note, void* cannot hold a function pointer without getting undefined   
   >> or implementation-defined behavior.   
   >>   
   >   
   > Kaz mentioned several types that "void *" is a generic /object/ pointer.   
   > Functions are not objects - pointers to functions are completely   
   > different from pointers to objects. You can't mix them without "I know   
   > what I am doing" explicit casts, with non-portable behaviour and a   
   > serious risk of UB.   
      
   "I know that I'm on POSIX" goes a long way also.   
      
   --   
   TXR Programming Language: http://nongnu.org/txr   
   Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal   
   Mastodon: @Kazinator@mstdn.ca   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|