On Wed, Sep 16, 2009 at 4:07 PM, Christopher Nelson
<chris.nelson.1...@gmail.com> wrote:
>>>> I suppose you could consider tweaking the call to use 'void' rather
>>>> than 'char' pointers.   In retrospect, that would have been a better
>>>> choice, and might keep your compiler happy.   But note that this
>>>> change would have to be applied throughout the whole codebase.
>>>
>>> I'm running up against a local rule that requires our code to compile
>>> without warnings.  I can ask for an exception for the generated code
>>> but maybe I'll do the void -> char change locally; I can't practically
>>> *re*generate the code so I'm not losing any thing.
>>
>> Have you already considered adding -fno-strict-aliasing to the list of
>> gcc compiler flags ?
>
> I guess that'd be the exception I'd ask for.  Our standard says
> "-Wall" with no warnings.

My proposal does not contradict your coding standard. Strict aliasing
is a performance optimization present in newer gcc's. According to the
mib2c output that has been posted on this list, it is not safe to
enable this optimization for code generated by mib2c. So you should
disable this optimization via -fno-strict-aliasing. This flag does not
disable any compiler warnings, it disables a compiler transformation.

Please read the section in the gcc manual about -fno-strict-aliasing /
-Wno-strict-aliasing.

Bart.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to