strict-aliasing documentation bug.

Giacomo Catenazzi cate@neper.ethz.ch
Tue Apr 18 08:09:00 GMT 2000


I found in info pages:

The following options control specific optimizations.  The `-O2' option
turns on all of these optimizations except `-funroll-loops'
`-funroll-all-loops', and `-fstrict-aliasing'.  On most machines, the `-O'
option turns on the `-fthread-jumps' and `-fdelayed-branch' options, but
specific machines may handle it differently.


But in FAQ there are:

Building Linux kernels
The linux kernel violates certain aliasing rules specified in the ANSI/ISO
standard. Starting with GCC 2.95, the gcc optimizer by default relies on
these rules to produce more efficient code and thus will produce
malfunctioning kernels. To work around this problem, the flag
-fno-strict-aliasing must be added to the CFLAGS variable in the main
kernel Makefile.


Also there are something wrong. Are the strict-aliasing turned on by
default?


	giacomo



More information about the Gcc-bugs mailing list