bugDotGNU Portable.NET - Bugs: bug #4697, ...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  James Michael DuPont <mdupont>
Submitted:  Sun 10 Aug 2003 10:10:34 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Fri 03 Oct 2003 12:32:07 AM UTC, comment #1: 

Fix committed to CVS - 3 Oct 2003

Rhys Weatherley <rweather>
Group administrator
Sun 10 Aug 2003 10:10:34 AM UTC, 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'

}

James Michael DuPont <mdupont>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2003-10-03 rweather StatusNone None
    Open/ClosedOpen None

Back to the top

Powered by Savane 3.13-3230.
Corresponding source code