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

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

Discussion

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>

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

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.

 

History

No changes have been made to this item

Back to the top

Powered by Savane 3.16-ed84.
Corresponding source code