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 *)'

Submitted by:  James Michael DuPont <mdupont>
Submitted on:  Sun 10 Aug 2003 10:10:34 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 03 Oct 2003 12:32:07 AM UTCrweatherStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1