On 02/26/2012 01:29 PM, ольга крыжановская wrote:
Glenn, I use a newer gcc version: gcc (SUSE Linux) 4.5.0 20100604
[gcc-4_5-branch revision 160292].

Can any one in the list confirm the warning with gcc>= 4.5?

We use -fno-strict-aliasing for ksh compilation. I've turned it off and got this:

src/lib/libast/vmalloc/vmbest.c:202:5: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmbest.c:440:4: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmbest.c:571:3: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmbest.c:682:3: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmbest.c:693:5: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmbest.c:694:5: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmopen.c:145:2: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmopen.c:150:2: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmopen.c:151:2: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmprivate.c:169:2: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmstat.c:100:7: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libast/vmalloc/vmstat.c:102:7: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libsum/sum-sha2.c:743:2: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libsum/sum-sha2.c:1104:2: warning: dereferencing type-punned pointer will break strict-aliasing rules src/lib/libsum/sum-sha2.c:1105:2: warning: dereferencing type-punned pointer will break strict-aliasing rules src/cmd/ksh93/edit/emacs.c:1077:7: warning: dereferencing type-punned pointer will break strict-aliasing rules src/cmd/ksh93/edit/emacs.c:1079:7: warning: dereferencing type-punned pointer will break strict-aliasing rules


Olga

On Sun, Feb 26, 2012 at 7:02 AM, Glenn Fowler<[email protected]>  wrote:

I don;t see this with
gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux)

On Wed, 15 Feb 2012 23:32:38 +0100 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote:
Glenn, in libast's vmalloc I get this warning if I compile libast on
Suse Linux with gcc4 and CCFLAGS='-O3 -flto -fstrict-aliasing
-Wstrict-aliasing': src/lib/libast/vmalloc/vmstat.c:100:7: warning:
dereferencing type-punned pointer will break strict-aliasing rules
This appears to be the only aliasing related warning.

Olga
--
       ,   _                                    _   ,
      { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     [email protected]   \-`\-'----.
  `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
       /\/\     Solaris/BSD//C/C++ programmer   /\/\
       `--`                                      `--`

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers





_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to