Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for support for local function pointer declarations #291

Open
eleehiga opened this issue Jun 24, 2022 · 0 comments
Open

Request for support for local function pointer declarations #291

eleehiga opened this issue Jun 24, 2022 · 0 comments

Comments

@eleehiga
Copy link
Contributor

eleehiga commented Jun 24, 2022

Currently in the code from https://www.geeksforgeeks.org/function-pointer-in-c/:

#include "math.h" 
#include "stdlib.h"
#include "stdarg.h"
#include "stdio.h"
#include "string.h"


void fun(int a)
{
    printf("Value of a is %d\n", a);
}
  
int main()
{
    // fun_ptr is a pointer to function fun() 
    void (*fun_ptr)(int) = &fun;
  
    /* The above line is equivalent of following two
       void (*fun_ptr)(int);
       fun_ptr = &fun; 
    */
  
    // Invoking fun() using fun_ptr
    (*fun_ptr)(10);
  
    return 0;
}

On the line void (*fun_ptr)(int) = &fun; there is a parse error with ( symbol. And this is probably because function pointers are not supported. Therefore, was wondering if you guys could please have Verifast support function pointers?

@eleehiga eleehiga changed the title Request for support for lines like int (*send_func)(struct wl_closure *, struct wl_connection *)) Request for support for function pointers Jun 27, 2022
@eleehiga eleehiga changed the title Request for support for function pointers Request for support for local function pointer declarations Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant