C Function is deprecated
c, compiler-warnings, readline
Solution
`Function` is a `typedef` (an alias of a pointer to function returning `int`) marked as deprecated by the library:
typedef int Function () __attribute__ ((deprecated));
Just use:
typedef struct {
char *name; /* User printable name of the function. */
int (*func)(); /* Function to call to do the job. */
char *doc; /* Documentation for this function. */
} COMMAND;
Problem
I used the code in below link: Readline Library And I defined a struct like this ``` typedef struct { char *name; /* User printable name of the function. */ Function *func; /* Function to call to do the job. */ char *doc; /* Documentation for this function. */ } COMMAND; ``` When I compile the code the compiler displays these warnings: "Function is deprecated [-Wdeprecated-declarations]" So what type should I change if I cannot use the function type?