EmbDev.net

Forum: ARM programming with GCC/GNU tools pragma for padding structure items?


von A. S. (aleksazr)


Rate this post
useful
not useful
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?

von A. S. (aleksazr)


Rate this post
useful
not useful
I'm thinking something like:

#pragma dont_give_structure_warnings
#include "header.h"
#pragma do_give_structure_warnings

von Andreas B. (Guest)


Rate this post
useful
not useful
See GCC manual entry Diagnostic Pragmas (section 6.56.10 in 4.6.0 docs).

von A. S. (aleksazr)


Rate this post
useful
not useful
Thanks!

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.