GCC's "-fno-strict-aliasing"? (Developers)
> As far as I know does the C standard has a few rules about aliassing. An
> alias is e.g. if you have two pointers of different types, then C assumes
> that they can't point to the same memory. (IOW one can't be an alias of
> the other)
That's also in the docs. 
> A compiler can use that to optimize and reorder statements and
> assignments.
> -fno-strict-aliasing turns of that optimization, IOW their code is dirty
> and not ANSI C compatible.
But why is, e.g., Zlib faster then, if -fno-strict-aliasing turns off that optimization?
> So it turns off a valid optimization. It is afaik a typical optimization
> that is turned globally off if "strange" things happen.
I see. 
---
Forum admin
Complete thread:
- GCC's "-fno-strict-aliasing"? - rr, 17.09.2008, 18:01 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- GCC's "-fno-strict-aliasing"? - marcov, 18.09.2008, 10:30
- GCC's "-fno-strict-aliasing"? - rr, 18.09.2008, 11:37
- GCC's "-fno-strict-aliasing"? - marcov, 18.09.2008, 13:20
- GCC's "-fno-strict-aliasing"? - RayeR, 18.09.2008, 14:10
- GCC's "-fno-strict-aliasing"? - rr, 18.09.2008, 11:37
- GCC's "-fno-strict-aliasing"? - rr, 25.09.2008, 16:38
- GCC's "-fno-strict-aliasing"? - RayeR, 29.09.2008, 17:09
- GCC's "-fno-strict-aliasing"? - marcov, 18.09.2008, 10:30
Mix view