<< Back to previous view

[PCC-33] Verification of function arguments not working for function pointers Created: 14/Feb/09  Updated: 01/May/14

Status: Closed
Project: pcc
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Gregory McGarry Assignee: Anders Magnusson
Resolution: Cannot Reproduce Votes: 0
Environment: OS X/i386 10.5

The following code doesn't compile due to an invalid verification of the function arguments. OSX/ppc segfaults on the same code.

typedef int (*MyFunc)(const char *fmt, ...);

print(const char *fmt, ...)

static MyFunc func = (MyFunc)print;

        return func;

        return (*(getFunc()))("%d\n", 10);

Comment by Anders Magnusson [ 14/Feb/09 10:27 AM ]
This has been a problem ~forever, and is difficult to handle. On most places where it shows up I have tried to avoid typechecking.
Comment by Anders Magnusson [ 01/May/14 03:22 PM ]
Seems to have been fixed since bug report.
Generated at Sat Nov 28 05:04:56 CET 2015 using JIRA Enterprise Edition, Version: 3.13.1-#333.