ANSI prototype confusion
    Doug Gwyn 
    gwyn at smoke.brl.mil
       
    Sat Dec  8 06:34:27 AEST 1990
    
    
  
In article <4559 at idunno.Princeton.EDU> byron at astro.Princeton.EDU (Byron Rakitzis) writes:
>        void qsort(void *, int, int, int (*)(void *, void *));
>This is okay, except that gcc then complains if strcmp or any
>function not taking (void *, void *) as arguments is passed to qsort.
It SHOULD complain, since internally qsort() is going to be passing void*
arguments to the function, so it had better be defined with compatible
argument types.
    
    
More information about the Comp.lang.c
mailing list