This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC warnings question


Jonathan Wilson <jonwil@tpgi.com.au> writes:

> Is there a way to turn off these 2 warnings:
> warning: dereferencing type-punned pointer will break
> strict-aliasing rules

Since the warning indicates GCC may be generating code which behaves
    differently from what the programmer expected, you should consider 
    turning off the optimization: -fno-strict-aliasing .

If you are sure you want the optimization but not the warning, use
    -Wno-strict-aliasing .

> warning: `xxx' defined but not used

-Wno-unused .

See http://xrl.us/bvxs for warning flags docs.

> without turning anything else off?
> 
> And also, what does the first warning mean?

It's explained in the docs, see http://xrl.us/brh2 and search for
'aliasing' .



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]