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?
I'm thinking something like: #pragma dont_give_structure_warnings #include "header.h" #pragma do_give_structure_warnings
See GCC manual entry Diagnostic Pragmas (section 6.56.10 in 4.6.0 docs).