Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Your idea to use a union of function pointers also allows a much broader range of function parameter types to be used. When you call a function that used a K&R declaration, the arguments are subject to default promotion e.g. short to int, so you can't call "int f(short)" if it is only declared "int f()". Your idea doesn't have this problem.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: