I suggest you ...

generate an Info message for inefficient structure packing

Since PC-Lint already has the size and alignment information, it could determine if structures members are not arranged most efficiently.

For example, in a standard 32-bit system, a structure defined as

struct foo
{
uint32_t a;
uint8_t b;
uint16_t c;
}

is not most efficiently arranged, requiring an additional padding byte between b and c to achieve the necessary alignment for c. A more efficient method would be to define foo as

struct foo
{
uint32_t a;
uint16_t b;
uint8_t c;
}

I think Lint could determine this and generate some Info message for struct name.

2 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Michael Metivier shared this idea  ·   ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base