From owner-freebsd-current@freebsd.org Fri Aug 25 15:12:42 2017 Return-Path: Delivered-To: freebsd-current@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 1CCFCDDA930 for ; Fri, 25 Aug 2017 15:12:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (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 D1FB363F74 for ; Fri, 25 Aug 2017 15:12:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x229.google.com with SMTP id f1so444370ith.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=PkuSFNDyNu0wI3bL2kz4sOTYtT/Q0x+rrd+bJkHmnhjKCo3ik6ttcKmFCiGdcQS7Nm HsoA8j8ooJ3v9hIRHvNkChOl9tva/R0ZOC+wAAZf+AbEacRu0MwMGLiipHpEa9r6Jevo SxJUR+MpzKdJVbUgNikiNw3Uq2f/XQsrBXmjuAdX+ch0u3cJA8UYJp+9NyRhN+D8+Pmr gNPq2Yd1m0LaVENsE+1f+q+r/g+KC4td/e+FCThj8r6Pu2Dib3/S3bK/gdB5HbUngB/o ijGALBBx3iNKs0FgD/6JZFvy+kQVhLrossAa7B5LTV4YgqEd8eupPqrGXkz97owstDtU /mXw== X-Gm-Message-State: AHYfb5hqAEuBSkZKvRCVpqoLQ80KiHpzf98OPT5HBDWueJGVY/A7CvD1 RwFNdC7QL3/OnF7d8yxjfB9iTRA4xouZ 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: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-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