Wno-packed flag not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would like to know if I'm making the wrong assumption about the
Wno-packed compile flag.  Should not this flag turn off warning messages
like this

	warning: 'packed' attribute ignored for field of type 'UCH'

Here are some of the 'define's

typedef unsigned char UCH;
typedef signed short int W;
#define SPACKD __attribute__((packed))

Here is the structure before macro substitution

typedef struct _device_request
{
	UCH bmRequestType SPACKD;
	UCH bRequest SPACKD;
	UW wValue SPACKD;
	UW wIndex SPACKD;
	UW wLength SPACKD;
} DEVICE_REQUEST;


And after

typedef struct _device_request
{
 UCH bmRequestType __attribute__((packed));
 UCH bRequest __attribute__((packed));
 UW wValue __attribute__((packed));
 UW wIndex __attribute__((packed));
 UW wLength __attribute__((packed));
} DEVICE_REQUEST;

I've verified that -Wno-packed was specified.

I just want to turn off the warning messages.  

Thanks
John Morrison
Printronix, Inc.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux