gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-W options in Makefiles


From: Chris B . Vetter
Subject: -W options in Makefiles
Date: Fri, 08 Nov 2002 16:29:52 -0800

Hi,

I admit I'm paranoid when it comes to compiler warnings, yet I feel the following
suggestion for GNUstep's makefiles makes some sense:

I noticed that GNUstep only uses -Wall, which, in my opinion, is kind of sloppy (sorry) since there are a lot of missing casts, plain wrong parameters, missing and duplicated definitions and so on. Sorry again, but I think there are only a
few who wouldn't agree on that.

So, I suggest to extend the inclusion of -W statements to at least the following:

ADDITIONAL_CPPFLAGS = -Wall -Werror -Wshadow -Wpointer-arith
-Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
-Wnested-externs -Winline

As I said, I'm kinda paranoid - but I'm sure the benefit is obvious - cleaner code that actually works and doesn't b0rk out because someone passed a float instead of a pointer, plus a performance increase due to the fact that, eg
NSMakeRect() actually DOES use float instead of int.

I'm aware that this would include a lot of work and correction, however I think
it would be worth it. At least it's something to think about...

--
Chris






reply via email to

[Prev in Thread] Current Thread [Next in Thread]