Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 2.4 and forward declarations
#1
Would the use of tags for forward declarations be considered a failure of this rule, if used such as
Code:
struct test;
typedef struct test test_T;

typedef bool (*Callback_T)(test_T const * p_test);

struct test
{
    uint32_t var;
    Callback_T callback;
};
For consistency in type usage, I would prefer to utilize the typedef whenever referring to this structure, including in the callback definition, but this leads our analysis tools to flag that "test" is only used in the typedef.
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)