This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: compile with gcc option -O0 or -O
Hi All:
i have just enable -Wall -Wextra. but seem there is no any useful
infomation. just some things like:
/work/smsc/include/xscmsgqueuemx.h:62: warning: unused parameter ‘seconds’
/work/smsc/include/xscmsgqueuemx.h:247: warning: unused parameter ‘pri’
xmmgiwparam.cc: In function ‘uint8 findSCerrInd(TASK_TYPE*,
GIW_VAR_STR*, uint8*, uint8*, uint8*, uint8*)’:
xmmgiwparam.cc:555: warning: suggest parentheses around ‘&&’ within ‘||’
xmmgiwparam.cc: At global scope:
xmmgiwparam.cc:212: warning: unused parameter ‘type’
xmmgiwparam.cc:1391: warning: unused parameter ‘task’
xmmgiwparam.cc:1462: warning: unused parameter ‘task’
xmmgiwparam.cc:1574: warning: unused parameter ‘msg’
xmmgiwparam.cc: In function ‘void put_giwu_MOdataInd(GIW_VAR_STR*, giw_asn*)’:
xmmgiwparam.cc:1946: warning: unused variable ‘address’
xmmgiwparam.cc: In function ‘void put_giw_up_params(MESSAGE*,
PRIMITIVE, GIW_VAR_STR*)’:
xmmgiwparam.cc:2055: warning: unused variable ‘alertingMSaddr’
xmmgiwparam.cc:2060: warning: unused variable ‘addr_str’
xmmgiwparam.cc: In function ‘void put_giwd_openReq(GIW_VAR_STR*,
giw_asn*, ISDNAddress*)’:
xmmgiwparam.cc:2915: warning: suggest parentheses around ‘&&’ within ‘||’
xmmgiwparam.cc:2933: warning: suggest parentheses around ‘&&’ within ‘||’
xmmgiwparam.cc: In function ‘void put_giwd_forwardSMReq(MESSAGE*,
GIW_VAR_STR*, giw_asn*)’:
xmmgiwparam.cc:3163: warning: suggest parentheses around ‘&&’ within ‘||’
xmmgiwparam.cc: At global scope:
xmmgiwparam.cc:3143: warning: unused parameter ‘msg’
xmmgiwparam.cc: In function ‘void put_giw_down_params(MESSAGE*,
PRIMITIVE, GIW_VAR_STR*)’:
xmmgiwparam.cc:3347: warning: unused variable ‘smRPsmea’
xmmgiwparam.cc:3348: warning: unused variable ‘scAddrForHLR’
,
I am wondering now, Could i add the optimization options which is
enable by -O one by one?
by then, hope i could find which optimization option affect my code?
but I do not know what is the difference options which is owned just by -O?
thanks again.
On Fri, Sep 16, 2011 at 5:47 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 16 September 2011 10:12, zou wonder wrote:
>> hi david:
>> i have tried to enable all the warning option you provided :
>> and here are some warnings:
>
> As Miles said, many of the warning options David suggested are not
> suitable for all code, you will get most of the benefit just using
> -Wall -Wextra
>