bugDotGNU Portable.NET - Bugs: bug #11123, pnetc: Not able to convert...

 
 

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

bug #11123: pnetc: Not able to convert function pointer types properly

Submitted by:  James Michael DuPont <mdupont>
Submitted on:  Thu 25 Nov 2004 04:36:29 AM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Thu 25 Nov 2004 04:36:29 AM UTC, original submission:

Here is a test case that happens :
the first warning should be an error, but I disable it. The point is that you can convert from the F to void*, but not in the context of line 7. Line 6 represents the problem I am having compiling.

test3.c:4: warning: incompatible types in assignment2
test3.c:6: no conversion from `int * (S )' to `int (S , S )'
test3.c:7: no conversion from `int * (S )' to `void '
-------------------------------
struct S;
int F(struct S *);
int foo(){
void * pf= &F;
int (*f1)(struct S ,struct S ) =((int (*) (struct S ,struct S ))pf);
int (*f2)(struct S ,struct S ) =((int (*) (struct S ,struct S ))F);
int (*f3)(struct S ,struct S ) =((int (*) (struct S ,struct S ))(void*)F);
}

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 add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

No changes have been made to this item

Back to the top


Powered by Savane 3.3