Carson,

The struct_member_name:value syntax was obsoleted in GCC 2.5
See: 
http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Designated-Inits.html#Designated-Inits

The right thing to do is to change these to .struct_member_name = value syntax, 
which is what
you mentioned you did.

I think the delloem code use of __attribute__ ((packed)) should be fixed to use 
the configure
tests and ipmi_delloem.h should be fixed as well.

I don't think there is anything that can be done about  the __attribute__ 
((packed)) issue
where your compiler packs to 5 bytes instead of 3.  Your compiler understand 
the the attribute
packed syntax, but does not pack the same way that gcc does.   As such, 
configure doesn't
believe you have __attribute__ ((packed)) so it defaults to #pragma pack syntax.

Does your compiler support #pragma pack(1) syntax?   If it does and it packs to 
3 instead of
5 bytes, #pragma pack could be used.

-- Jim Mankovich | jm...@hp.com --

On 8/7/2012 7:19 PM, Carson Gaspar wrote:
> On 8/7/12 2:54 PM, Jim Mankovich wrote:
>> Carson,
>>
>> Does 1.8.11 compile without issue on Studio compilers on Sol 11?
> No - it looks like lib/ipmi_mc.c has been gcc only for a long time now :-(
>
> Where does the struct_member_name: value syntax even come from? Every
> reference I can find uses .struct_member_name = value. If I replace all
> foo: "bar" lines with .foo = bar lines, and hack out the pack pragma
> define from config.h, the code compiles.
>
> The delloem code uses __attribute__ ((packed)) unconditionally, ignoring
> the configure tests.
>
> ipmi_delloem.h also does an unconditional #pragma pack(1) at the top of
> the file, causing everything to be packed, which is certainly not what's
> intended, as only some structures have a packed attribute.
>
> Oracle's cc supports the __attribute__ ((packed)) syntax, but does not
> pack the test structure used in configure to 3 bytes the way gcc does,
> it packs to 5 bytes (unsurprising for 5 chars, modified with bitlengths
> though they may be). If that's not good enough, then there is no way to
> use anything but gcc.
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to