From owner-svn-src-head@freebsd.org Thu Sep 29 22:47:24 2016 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 4D10AC02484; Thu, 29 Sep 2016 22:47:24 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::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 D4F5DBE4; Thu, 29 Sep 2016 22:47:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id b4so13046055wmb.0; Thu, 29 Sep 2016 15:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=4WkMu+4Wvn+g3cdI24ZENcuD3jPJ8YR1hxpcuV/2dpU=; b=vp67lDef7ECWLpJY4G8k0aasGZFoGT0blUI6XWKY/h9g8xbdXbSfwtfrEz1hWfsNR8 xabVbteiKT+UNx73h/nAumjHxymH6mZGo4CQ2QGhLPq/eqFcBCvDzHXAkod2vQvAu6t0 GPy5fFsjg0IMmUHJLI98Pe2iCoPbPsplLogRMrpFzzchCBla4F57XpXeWv5cgArJmUw5 oMgLTTXnWTS5mGFXh36wAH8I6eq/CsIgYm/MbATH5KDN4vHKCpM7erTzKwDeV2qIAjou bqoImHh+XFOqr6gtCWL2XhVO+P8y70MHm0jM4yVUa/2uOzu13zErhU8emmZjGCeUPT4M Pmew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=4WkMu+4Wvn+g3cdI24ZENcuD3jPJ8YR1hxpcuV/2dpU=; b=SU6JPoy3y0ZQaHglvlA5qRUde8ZJ3DQi5vS0WsI2SQ9rleGEw2eRGHw9b4xgKo9nqe j8k0zqF5DXNkVVSH6ai/rF/66jWoTK0Dj5BMatv+BCCkFxmtn2SX0UKxUp8n9WJKZ555 /mqaLC6q8O3YeC581F88gowUD2y9/X3hnszCAmUAgkVG/EvSoRZuzGciN+BnF2t5rTUX xa5x2pkgSQvsd5A9BBzOQgCZC5zHLYOa3eQYLcEtZfcS4AZG7f7c1SBimg80CidLqwNf 5AqtURJ1VPgk0esMikY2AKUyoikMnNSEQU09/Y4AP7eoA+i+NZq/wsr3p1ui+9WzruYl 4YIg== X-Gm-Message-State: AA6/9RmvafCGnR5+H4V2NTtOF8a83sqwdZji+8LE/0plPZut60VpLQcz0dAgwmRYcmWtkdMnx5elELr+jPmxRw== X-Received: by 10.194.22.136 with SMTP id d8mr3438220wjf.5.1475189242319; Thu, 29 Sep 2016 15:47:22 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.194.15.134 with HTTP; Thu, 29 Sep 2016 15:47:21 -0700 (PDT) In-Reply-To: References: <201605270531.u4R5VE6R006890@repo.freebsd.org> From: Alan Somers Date: Thu, 29 Sep 2016 16:47:21 -0600 X-Google-Sender-Auth: -9Y3PFNeg_x8h5veuoxFIaM2pqo Message-ID: Subject: Re: svn commit: r300824 - head/lib/libmd To: Ed Schouten Cc: "Conrad E. Meyer" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Thu, 29 Sep 2016 22:47:24 -0000 On Fri, May 27, 2016 at 1:00 AM, Ed Schouten wrote: > 2016-05-27 8:50 GMT+02:00 Conrad Meyer : >> There's nothing to support =E2=80=94 literally ignoring the keyword is a= n >> acceptable implementation. So it's disappointing C++ chooses to >> reject C keywords. > > Keep in mind that C++ does not reject "static" altogether; only in > this specific context. The reason for it is that in C++, there are > other ways of enforcing similar properties. For example by using > std::array, which has the size as part of its type. > >> If sys/md5.h includes a static inline function, there are bigger >> problems with potentially trying to interpret C code as C++. > > We have quite a lot of public header files that contain static inline > functions that also work well in C++ mode. is a good > example. > >> Your proposed macro seems ok, although it is pretty long for where it >> would be used. Maybe __min_size()? > > Sure! Is anybody still intending to write this feature? I just ran into the same c++-includability bug with sha256.h and sha512.h. It would be nice to fix them the right way instead of using r300824's workaround. -Alan