[cfe-dev] uninitialized variable warning, etc

Chris Lattner clattner at apple.com
Sat Mar 7 22:52:54 PST 2009


On Mar 7, 2009, at 1:46 PM, Eli Friedman wrote:

> On Sat, Mar 7, 2009 at 12:24 AM, Chris Lattner <clattner at apple.com>  
> wrote:
>> On Mar 6, 2009, at 11:45 PM, रजनीश wrote:
>>>
>>> Here are some examples taken from ffmpeg-export-2008-12-18
>>
>> These are all exactly the sorts of things that the warning was  
>> designed to
>> catch.  Are spaces really that horrible to use? :)
>
> Trying to dictate a coding style using compiler warnings isn't
> productive.

I completely disagree. Warnings are *all about* (optionally, when  
enabled) forcing coding standards on people.  Warnings are inherently  
about code that is valid but dubious.

> I like the suggestion that we should warn on "=- " (with
> a trailing space), but not not just "=-"; the false positive rate with
> the trailing space should be almost zero, and the people using a
> coding style that puts spaces around operators keep the benefit of the
> warning.

That is a great suggestion, implemented!
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090302/013618.html

-Chris



More information about the cfe-dev mailing list