This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC warnings question
- From: llewelly at xmission dot com
- To: Jonathan Wilson <jonwil at tpgi dot com dot au>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: 13 Apr 2004 04:51:05 -0600
- Subject: Re: GCC warnings question
- References: <407BA35B.2030206@tpgi.com.au>
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' .