Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76476 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19229 invoked from network); 13 Aug 2014 11:05:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2014 11:05:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Received: from [78.32.209.33] ([78.32.209.33:53921] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/81-11625-5664BE35 for ; Wed, 13 Aug 2014 07:05:10 -0400 Received: from addw by mint.phcomp.co.uk with local (Exim 4.72) (envelope-from ) id 1XHWNL-0000xf-4h for internals@lists.php.net; Wed, 13 Aug 2014 12:05:51 +0100 Date: Wed, 13 Aug 2014 12:05:51 +0100 To: internals@lists.php.net Message-ID: <20140813110551.GD11050@phcomp.co.uk> Mail-Followup-To: internals@lists.php.net References: <942D2AF6-BDC2-4214-BD58-4B5945C28CE3@ajf.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Parliament Hill Computers Ltd User-Agent: Mutt/1.5.20 (2009-12-10) Subject: Re: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement From: addw@phcomp.co.uk (Alain Williams) On Wed, Aug 13, 2014 at 12:57:40PM +0200, Ferenc Kovacs wrote: > On Wed, Aug 13, 2014 at 11:42 AM, Andrea Faulds wrote: > > > Hi! > > > > On 13 Aug 2014, at 08:47, Ferenc Kovacs wrote: > > > > > and I also think that this isn't an important enough issue to warrant a > > BC > > > break (albeit this is the better kind of BC: probably doesn't effect too > > > many people, and they will be clearly notified about the error at compile > > > time) so I voted no based on this two thing. > > > > This isn’t really a BC break. Multiple default blocks didn’t actually work > > anyway, we just silently ignored extra ones. > > > > not sure what do you mean here, multiple default cases can be reached the > same way as any other duplicated case branch(as shown in my snippet in the > mail you replied to). > even if those were always "silently ignored" as you falsely claim, it would > still be a BC break, as code working before this change would stop working > with a fatal error. It is a bug. No one should be using this, get rid of it. However: not until the next major version. There are prob a few bits of code that have this in there -- accidentally. People expect to perform minor upgrades without breakage - so just leave it there. When there is a major upgrade it is expected that a few things might not work - so do it when people a rebuilding systems and expect such things. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include