From owner-svn-src-head@freebsd.org Fri Aug 25 15:12:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A3FCDDA92E for ; Fri, 25 Aug 2017 15:12:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7EB863F71 for ; Fri, 25 Aug 2017 15:12:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22b.google.com with SMTP id f1so444372ith.0 for ; Fri, 25 Aug 2017 08:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=E3xfF4Q2s6msYkkCE1FuFmrVUvuChhx2V/2ZfJvFHq4=; b=YVCmy/ZTBfOo0O2YdHvZ0lqjpdYR/blwvNydjoDTbYcZh++P+BeubBJ3O9HuyImSUj 1pe6wjTaNoWqqBQQ/aLOzGxQw6upomuvW8dtYlB8fbPvXMGyO9t26CbAIO4z6B/8e832 Fasx6d3RIjPfRtz9eHkWkZ7dmDTPpxJH0ymBQecbUMIh3H7fGopfuj5CD3+gUAvLKPfd IiaxAqEJ4Y4GMaX/zLuwIESUWNDjszbBjJiEvRw8w+cTpZk0QV3Rj3getpWt9DGGz+sA mPbVP9WH6BAsgsWIgU1iPfTJ3t6+lQkCfUWDE4T5xm9RMqHKdt1rMBm/2478BEojKgq9 yUaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=E3xfF4Q2s6msYkkCE1FuFmrVUvuChhx2V/2ZfJvFHq4=; b=e7etZ0x8SjBqHVOQ5K8AicGSObG8AxjzLptGYKY6T6ncwkz+hi+sjPKfhQBBT6HzTw C6Np/Ve8AsGNXdvi9eTK88MJclebKgEoJhzL564PmUoSxMS+AYGbzdFyEZBgk9s5bvdx sMuSBiibR6P1++g75AeEfPCNJuFxiawS7UCCro9Izhxf0U571MceUuc0D9K9nTjcTbsb tRISMEqOep09CL8za90Oc3iZN7DZ28ymZZUJXjjIPMm0/dyKFsxHNcKqFmwpCr7M2RVx /EwL1K1K7dENuKKNk8/jqQBnYzbTP2JYnwjdQYn+Pq6PdDsIbLamqlureaGIDRDJzgKF agJw== X-Gm-Message-State: AHYfb5grkdaBTZX9niKX3WGklq9JnVmTP+JAioRmZzp4pDT6d/Wuhcz/ ZrYWoxf+DpLDxOaCrQcluWM8b+yx7pkV X-Received: by 10.36.159.194 with SMTP id c185mr2158592ite.31.1503673961110; Fri, 25 Aug 2017 08:12:41 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Fri, 25 Aug 2017 08:12:40 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:c525:dd46:ae7:666a] In-Reply-To: References: <1C5A448F-C91A-4599-8500-E4E46E6F5205@dsl-only.net> From: Warner Losh Date: Fri, 25 Aug 2017 09:12:40 -0600 X-Google-Sender-Auth: _kxfuPSK-xI_oIiFfngz2VSJxlU Message-ID: Subject: Re: svn commit: r322875 - head/sys/dev/nvme To: Ed Schouten Cc: Mark Millard , David Chisnall , Warner Losh , "svn-src-head@freebsd.org" , FreeBSD Current , FreeBSD-STABLE Mailing List , freebsd-hackers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2017 15:12:42 -0000 On Fri, Aug 25, 2017 at 6:53 AM, Ed Schouten wrote: > 2017-08-25 9:46 GMT+02:00 Mark Millard : > > It appears that at least 11.1-STABLE -r322807 does not handle > > -std=c++98 styles of use of _Static_assert for g++7 in that > > g++7 reports an error: > > Maybe we need to do something like this? > > Index: sys/sys/cdefs.h > =================================================================== > --- sys/sys/cdefs.h (revision 322887) > +++ sys/sys/cdefs.h (working copy) > @@ -294,7 +294,7 @@ > #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_static_assert) > #define _Static_assert(x, y) static_assert(x, y) > -#elif __GNUC_PREREQ__(4,6) > +#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) > /* Nothing, gcc 4.6 and higher has _Static_assert built-in */ > #elif defined(__COUNTER__) > #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) This looks good to my eye, but my level of C++ pedantic knowledge is suboptimal. Warner