This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: structure pragma
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: aleksazr <aleksazr at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 1 Apr 2011 17:59:23 +0100
- Subject: Re: structure pragma
- References: <31294994.post@talk.nabble.com>
On 1 April 2011 14:54, aleksazr wrote:
>
> I'm using a third-party header file that contains structures
> with non-aligned items and GCC 4.6.0 gives me a bunch of
> "padding struct to align" and "padding struct size" msgs.
>
> How can I disable those warnings for that header file only?
If there's a warning option controlling them (shown as [-W...] in the
warning diagnostic) you can use pragmas:
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html