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 242,879 of 243,242    |
|    Tim Rentsch to Andrey Tarasevich    |
|    Re: function pointer question    |
|    07 Jan 26 07:35:17    |
   
   From: tr.17687@z991.linuxsc.com   
      
   Andrey Tarasevich writes:   
      
   > On Sat 1/3/2026 12:04 PM, Chris M. Thomasson wrote:   
   >   
   >> struct object_prv_vtable {   
   >> int (*fp_destroy) (void* const);   
   >> };   
   >   
   > And interesting piece of trivia about C function types and function   
   > type compatibility rules is that:   
   >   
   > 1. Top-level qualifiers on function parameters are preserved as part   
   > of function type.   
      
   Not completely wrong but not exactly right either.   
      
   > However, such top-level qualifiers are ignored when   
   > determining function type compatibility.   
      
   It's easier to take the point of view that top-level qualifiers   
   for function parameters don't participate in the type of the   
   function as a whole. Taking that view is easier to understand   
   and gives results that are indistinguishable from the actual   
   rules.   
      
   --- 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