Subject: Re: C compiler flags
To: NetBSD/pkgsrc-users <firstname.lastname@example.org>
From: Christian Biere <email@example.com>
Date: 11/15/2006 21:31:15
Blair Sadewitz wrote:
> I have seen packages before which do not use -O2, probably due to bugs
> in the compiler.
Probably? I doubt it. It is very likely a bug in the package.
> Now, bugs are hopefully transient, but they do exist. Actually, I
> think some packages had problems like this on the alpha architecture,
> for example.
Yes, I've seen funky results from code ignoring alignment requirements
which were clear and not very special bugs in the software, not the
compiler. For GCC it's a good idea to add
CFLAGS += -Wall -Wformat=2 -Wshadow
to /etc/mk.conf. That tells a lot about the code quality. Of course
if people think they can cast problems away that might show nothing.