From owner-svn-src-all@freebsd.org Sat Feb 22 16:25:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9E8B243E1C for ; Sat, 22 Feb 2020 16:25:23 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48PtwL5Pgwz3K8V for ; Sat, 22 Feb 2020 16:25:22 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1582388721; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=SmiYxCFM4SK42e9wSI8NVCT2yLVd54VbxIEbCPnUCNuPwC/kS0/vKRikM9It7cFIl6NWyEbI3at+N Y6MffhveDP3dNnQly1mzwpCXbZqGmelUEsiS6MgktuQSAfClVjBN6xTllUqzD4KeSwTg+65dZTM6xC ElRlZvCZmy9E//NO3wAqH9qBzur5hcAXJv63jY94MN6hk7me2I7ME2PlmmLVzzu+3+tGJvI4X5j8aB 2Q5o3d1QVCDnQi3c4zCUH6XsUiS29szelImQphrAA7H9Q3jVdPGOPK9lW7QgESkz8D2zJUMpH3l1qt 9LMJ0cwa8c6vXUxczq/f+C6nmHZnwew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=sj21eItO2VADe93zlviwDk+gtGEJZKGSlMRaA5jLyqA=; b=Mr82Q+NaAJkmliNvV87i8dIpvcIAvMdEVX59ny11bpawEZk/N5h5kEHe8iCOpj99ZZgHA8JffaURh lS9hhgd4dQvLE+vbGsE/wLKC67d0wW/RhNW9QWjrAajbTBxaBPx3TrjwVK3SCbxqrXKZCCDMm0QUKa 8yKpeQKggYAwK0AxM2YWomijDrjOvddu7fhM3JuXAHwrEpNIyHZ2m+wG5flZjpsoogZdWw/tl2QZSI 0CKDFP8WGCp61yyAa1AM3202nZ3xFuvzyxUv80E90eBlz5utceZ3fwFVjcILz55mA0hwRludtdG434 X8pqEJxn/CYqEvM2jfiwYDXiEBivHeQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=sj21eItO2VADe93zlviwDk+gtGEJZKGSlMRaA5jLyqA=; b=DSn83lMjGLWZMBgKJbcpd5ikx6oUn0BWAvANWlLfU/xwCPC4enmvXbXMosiKn6/vNYrobS0udU1PH 4iQqQsr++OXqRwhXY5Q1+jSgXPTnkmt6xKGjFIVSvvsRhITF6l52uXdLJR15FaoywpkF/Lv+wubpwy 7w7tTcMk4LeIMpdY67YeWahAm+ioYXkmHcaD+fqb+woSbhQGvfojtpsVXY26bLdUIjjs1jdsnEc2ey UCcYbTBPkfak4fKR5TrTfgYi9WF6hfdZgWUlnF2fBvg/fnz9O9NM2p3L3FMl78Hy28CIKN080v18JL FPiUsx7TfMzQw3lRqELGU93zpdemu1A== X-MHO-RoutePath: aGlwcGll X-MHO-User: ea89366c-558f-11ea-9eb3-25e2dfa9fa8d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id ea89366c-558f-11ea-9eb3-25e2dfa9fa8d; Sat, 22 Feb 2020 16:25:20 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 01MGPJDZ015842; Sat, 22 Feb 2020 09:25:19 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r358248 - head/sys/vm From: Ian Lepore To: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 22 Feb 2020 09:25:18 -0700 In-Reply-To: <202002221620.01MGK46E072303@repo.freebsd.org> References: <202002221620.01MGK46E072303@repo.freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48PtwL5Pgwz3K8V X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.96 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.97)[-0.969,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_LONG(-0.99)[-0.995,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2020 16:25:23 -0000 On Sat, 2020-02-22 at 16:20 +0000, Kyle Evans wrote: > Author: kevans > Date: Sat Feb 22 16:20:04 2020 > New Revision: 358248 > URL: https://svnweb.freebsd.org/changeset/base/358248 > > Log: > vm_radix: prefer __builtin_unreachable() to an unreachable panic() > > This provides the needed hint to GCC and offers an annotation for readers to > observe that it's in-fact impossible to hit this point. We'll get hit with a > a -Wswitch error if the enum applicable to the switch above were to get > expanded without the new value(s) being handled. > > Modified: > head/sys/vm/vm_radix.c > > Modified: head/sys/vm/vm_radix.c > ============================================================================== > --- head/sys/vm/vm_radix.c Sat Feb 22 13:23:27 2020 (r358247) > +++ head/sys/vm/vm_radix.c Sat Feb 22 16:20:04 2020 (r358248) > @@ -208,8 +208,7 @@ vm_radix_node_load(smrnode_t *p, enum vm_radix_access > case SMR: > return (smr_entered_load(p, vm_radix_smr)); > } > - /* This is unreachable, silence gcc. */ > - panic("vm_radix_node_get: Unknown access type"); > + __unreachable(); > } > > static __inline void What does __unreachable() do if the code ever becomes reachable? Like if a new enum value is added and this switch doesn't get updated? -- Ian