03-10-2022, 08:02 AM
Hi.
MISRA-C group will give you the final answer but, to me there are some things to change...
In your comment, your saying "function declaration". This is not correct as your implementation is a "pointer declaration"
Therefore the function definition could go wrong with the pointer (name) usage...
Maybe i'm wrong:
- if you have a good compiler/linker, it will identify the pointer declaration as the function prototype.
- if not, you will have a pointer not initialized with the function definition address. 2 objects with the same name...
leading to bad things when you will use the pointer...
MISRA-C group will give you the final answer but, to me there are some things to change...
In your comment, your saying "function declaration". This is not correct as your implementation is a "pointer declaration"
Therefore the function definition could go wrong with the pointer (name) usage...
Maybe i'm wrong:
- if you have a good compiler/linker, it will identify the pointer declaration as the function prototype.
- if not, you will have a pointer not initialized with the function definition address. 2 objects with the same name...
leading to bad things when you will use the pointer...
<t></t>