bug-zile
[Top][All Lists]
Advanced

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

Re: [Bug-zile] astr_cstr


From: Gary V. Vaughan
Subject: Re: [Bug-zile] astr_cstr
Date: Thu, 8 Sep 2011 21:12:12 +0700

Hi Reuben,

On 8 Sep 2011, at 19:19, Reuben Thomas wrote:
> On 8 September 2011 07:39, Gary V. Vaughan <address@hidden> wrote:
>> Worse, what are we to do with warnings like this though, which are spewed
>> out by the compiler without additional warning flags enabled?
> 
> This is why we really need a solution. Unfortunately, all I can find
> is statements that the philosophy of GCC is to the contrary (a
> reaction against a tendency to separate the compiler and lint, itself
> a reaction against heavyweight compilers 40 years ago). The trouble of
> course is that as warnings get more sophisticated in an
> unsophisticated language you're bound (as here) to get false
> positives, even when you don't take under-specified 30-year-old APIs
> into account.

Couldn't agree more.

> We'll see whether we get anything out of the gnulib list. Meanwhile, I
> wonder whether actually making a list of warnings to grep out of the
> compiler's output might be a goer?

I was going to suggest something similar, but it's beginning to smell of
overengineering.

My (overengineered) thoughts were to add comment annotations in the
source, extract them to an awk filter or similar during configuration,
and then have make run compilation through that filter, regenerating it
if the sources that contribute are touched.

For now, I'd be inclined to make it into a FIXME, and revisit when we're
starting to accumulate more warnings as the codebase grows or gcc gets
noisier.

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)



reply via email to

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