public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonas Rahlf <jonas.rahlf@gmail.com>
To: gcc@gcc.gnu.org
Subject: New/improved warning option for padding bytes
Date: Fri, 19 Aug 2022 12:12:35 +0200	[thread overview]
Message-ID: <CAHJ7zASLFodZHOCX0YY2Cq_dKrOHaTGZcTeSCXGFYVvRKXNe2A@mail.gmail.com> (raw)

As a firmware developer I would appreciate a warning option about padding
bytes, but only for such cases where you can reduce the number of padding
bytes by rearranging the fields.

The current -Wpadded warns about all padding bytes, which is annoying.

The concept sounds simple: you rearrange all fields from large to small and
check if the size changed.

The goal is to more easily optimize RAM/flash in space constrained systems.

Jonas

             reply	other threads:[~2022-08-19 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 10:12 Jonas Rahlf [this message]
2022-08-21 23:12 ` Eric Gallager

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHJ7zASLFodZHOCX0YY2Cq_dKrOHaTGZcTeSCXGFYVvRKXNe2A@mail.gmail.com \
    --to=jonas.rahlf@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).