Re: compile warning patches

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 17 Oct 2001 13:57:48 +0200

Adrian Chadd wrote:

> Right. Well, I'm now getting irked (again!) by gcc's evilness
> when it comes to warning output. I'll go and dig up a copy of
> Digital Unix on some alpha this week to do the compiles under -
> Digital Unix's compiler outputs really, really nice error messages
> and warnings which show you immediately where the problem is.

Regarding GCC:

always look at the first emitted warning only. Make sure to ignore any
followup warnings unless you know that these tell you additional
information on where the problem is.

My experience is that GCC does a farily good job at indicatig where the
problem is but is a bit too persistent in trying to complete the file
even in case of errors, causing the real error to disappear in tons of
other unrelated and often wrong followup errors.

The main benefit I see of using other compilers is that these look for
other things or aspects of the source "style". The warnings discussed is
mostly for trapping things which are legal from a bare bone C language
view but which may make poor assumptions about the build environment,
CPU type used or plain stupid.

Regards
Henrik
Received on Wed Oct 17 2001 - 05:57:12 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:33 MST