Bug #19077 2013-08-05 18:57
anshbansal
Functions not recognized by the editor if enums are used
If the return type of a function is an enum then that function isn't placed in the list of functions. The program runs fine but the function isn't placed in the list `current file's symbols` -> `functions`
For example
enum status {STACK_SUCCESS, STACK_FAILURE};
typedef struct node {
void *data;
struct node *lower;
} stack_node;
typedef struct stack {
size_t elem_size;
size_t stack_size;
stack_node *top;
} STACK;
enum status stack_init(STACK *stack, size_t elem_size)
{
stack->elem_size = elem_size;
stack->stack_size = 0;
stack->top = NULL;
return STACK_SUCCESS;
}
The function `stack_init` will not be recognized in the current file's functions. It is possible to make it recognize by using () around enum status but then it is an error and the code doesn't compile.
The complete code using which I found this bug is present at https://github.com/anshbansal/general/blob/master/C/Data_Structures/Stack/stack_by_pointers.c
- Category
- Application::Editor
- Group
- Platform:Windows
- Status
- Open
- Close date
- Assigned to