mesa: added #ifdef __GNUC__ around GLubyte bitfield usage

It would be nice if there were a #pragma or something to disable the warnings:

main/texenvprogram.c:87: warning: type of bit-field ‘Source’ is a GCC extension
main/texenvprogram.c:88: warning: type of bit-field ‘Operand’ is a GCC extension

but there doesn't appear to be a way to do that.
This commit is contained in:
Brian Paul 2009-09-02 08:45:34 -06:00
parent a46e32787d
commit 83e4470d9a
1 changed files with 5 additions and 0 deletions

View File

@ -82,8 +82,13 @@ texenv_doing_secondary_color(GLcontext *ctx)
#define DISASSEM (MESA_VERBOSE & VERBOSE_DISASSEM)
struct mode_opt {
#ifdef __GNUC__
GLubyte Source:4; /**< SRC_x */
GLubyte Operand:3; /**< OPR_x */
#else
GLubyte Source; /**< SRC_x */
GLubyte Operand; /**< OPR_x */
#endif
};
struct state_key {