dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bug #4697] [PNET][PNET/C][TYPECONVERSION][FUNCTIONPOI


From: nobody
Subject: [Pnet-developers] [bug #4697] [PNET][PNET/C][TYPECONVERSION][FUNCTIONPOINTER]no conversion from `int * (float *, float *)' to `int * (void *, void *)'
Date: Sun, 10 Aug 2003 06:10:35 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5a) Gecko/20030618

=================== BUG #4697: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4697&group_id=353

Submitted by: mdupont                 Project: DotGNU Portable.NET          
Submitted on: Sun 08/10/2003 at 12:10
Category:  None                       Severity:  5 - Major                  
Bug Group:  None                      Resolution:  None                     
Assigned to:  None                    Status:  Open                         

Summary:  [PNET][PNET/C][TYPECONVERSION][FUNCTIONPOINTER]no conversion from 
`int * (float *, float *)' to `int * (void *, void *)'

Original Submission:  /*
  simple test of type conversion of parameters
It seems that this bug prevents qsort to be used effectivly
*/
typedef unsigned int size_t;
typedef int (*__compar_fn_t) (/*__const*/ void *, /*__const*/ void *);
extern void qsort (void *__base, size_t __nmemb, size_t __size,
                   __compar_fn_t __compar);

static int compare_pos (const float *a, const float *b)
{
  return 1;
}

int main()
{
  int i;
  static float *save_array = ((void *)0);
  qsort(save_array,i, sizeof(float),
        (int (*) (const void *, const void *))compare_pos); 
  //CSCC: no conversion from `int * (float *, float *)' to `int * (void *, void 
*)'
  //GCC: warning: passing arg 4 of `qsort' from incompatible pointer type

// here I try to pass it directly 
  qsort(save_array,i, sizeof(float),
        compare_pos); 
  // incompatible type for argument 4 of `qsort'

}




No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4697&group_id=353

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]