Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33458 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62146 invoked by uid 1010); 27 Nov 2007 15:49:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 62131 invoked from network); 27 Nov 2007 15:49:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2007 15:49:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 64.233.166.180 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 64.233.166.180 py-out-1112.google.com Received: from [64.233.166.180] ([64.233.166.180:5714] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5C/A8-09419-87C3C474 for ; Tue, 27 Nov 2007 10:49:13 -0500 Received: by py-out-1112.google.com with SMTP id d32so4220686pye for ; Tue, 27 Nov 2007 07:49:10 -0800 (PST) Received: by 10.35.51.19 with SMTP id d19mr4840558pyk.1196178549285; Tue, 27 Nov 2007 07:49:09 -0800 (PST) Received: from ?192.168.1.131? ( [76.65.228.201]) by mx.google.com with ESMTPS id v55sm4227815pyh.2007.11.27.07.49.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Nov 2007 07:49:08 -0800 (PST) Cc: "Alexey Zakhlestin" , "Stanislav Malyshev" , internals@lists.php.net Message-ID: To: Andy Lester In-Reply-To: <9AFAC4FC-6B0A-4917-8C5F-9DEA4827B3AB@petdance.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Tue, 27 Nov 2007 10:49:04 -0500 References: <20071127074757.GA25945@petdance.com> <474BDAF8.6020308@zend.com> <9AFAC4FC-6B0A-4917-8C5F-9DEA4827B3AB@petdance.com> X-Mailer: Apple Mail (2.915) Subject: Re: [PHP-DEV] [PATCH] Clean up struct initalizations From: ilia@prohost.org (Ilia Alshanetsky) GCC will spue a slew of warnings that can be safely ignored and in some cases are bogus. The pedantic changes only make the code harder to read and yield very little if any benefits in return. For larger, more complex structs like zvals it'll only create a meaningless mess. There is absolutely no reason that any half decent compiler will not be able to understand {0} for any declared struct. On 27-Nov-07, at 10:12 AM, Andy Lester wrote: > > On Nov 27, 2007, at 8:34 AM, Alexey Zakhlestin wrote: > >> On 11/27/07, Ilia Alshanetsky wrote: >>> IMHO {0} is sufficiently clear for human consumption. >> >> {NULL, 0, 0} brings real structure dimensions to the context, which >> is >> good (less need to check "headers"). > > It also means that you don't get compiler errors any more like you > would with {0}. Now, you can know that if there's a warning about > the number of initializers that it's something you should pay > attention to. > > The key for long-term maintenance is to clean up the slop so that > the compiler doesn't squawk about it at high levels of warnings. > Then when you do have real squawk-worthy problems, they don't get > lost in the noise of meaningless warnings. > > > -- > Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance > > > > Ilia Alshanetsky