Linux and aliasing?

Toon Moene toon@moene.indiv.nluug.nl
Fri Jun 4 11:11:00 GMT 1999


Jeffrey A Law wrote:

> Mark Mitchell wrote:

>   > Either
>   > 1. Leave it as it is (the Linux kernel will need -fno-strict-aliasing).

> This is my strong preference.
> 
> I see no need to make conforming, portable code run slower.

Exactly.  Remember that a standard is a contract between producer and
(end-)user, in our case:  between compiler writer and C programmer.

	"We won't optimize your constructs away as long as you program 
	 according to said standard"

Giving Linus more freedom in getting his C code to compile to the code
he thinks is right will take freedom away from us, the compiler writers.
Unfortunately, this is not according to contract and won't be upheld in
court.

> Folks working with non-portable code can use -fno-strict-aliasing and pay
> the resulting performance penalty.

Or those Fortran users (like me) who still do not understand how a
strictly C performance enhancement can worsen the code generated for
purely Fortran source, like it is the case for me (I use
-fno-strict-aliasing since the end of February - and no, we Fortran
users do not have a problem with aliasing; as I outlined on comp.arch,
we outlawed it).

Cheers.

[Oh, BTW, it doesn't make sense to call me names - I'm a native of
 Amsterdam; if I cared about *that*, I would have been dead for decades,
 now]

-- 
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://world.std.com/~burley/g77.html


More information about the Gcc mailing list