Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4103470imm; Wed, 5 Sep 2018 10:44:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOVbCQnHwqyfvxa23nd+MgAgQwh2jn9ahcIc1H2HPSpQod2X8QksfJ7p0oKtMr5Ht78UGY X-Received: by 2002:a17:902:758b:: with SMTP id j11-v6mr40172355pll.29.1536169475996; Wed, 05 Sep 2018 10:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536169475; cv=none; d=google.com; s=arc-20160816; b=hpJQuOryaMLZ7go1ULIr2NzkCoa4W3PBn03UBOS78TQHMSw5wVZme+AWMBlEesUqR7 7FwtoJFmv85DBysH0QozZaxJc7925Hq/RVQC+kA9Moji1KBUPQASIUGtbQEbjU3f6rxz hkd9F3CqbFaN/l8OzImsNJl0oHTYIK/x7aIFfZE4zhkBksWdEjqbbR694qZtpPHhWs46 qzRImdib7sJ0g5tRhy/Ya3L1X70ktdUfwVlj/t5GAheugpHWpcgHIXZqdEn6UuQqsRrX j4bgfBiMPZXevWy6OCVrB7NK0nhmjMY1pnBX9Mczmiary+G7t30Vj+XTIVaFG1VtF6WR Vm9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EA8V1EcGCcOx9Xgjv0nb77S6gsfiYt9zI66cyrJ+PTY=; b=AZYWQPeROPwQH0+cHYNVOtF7DGj9WxSjxbW5hgnnq/neO1/i21bQQuwHwBbPseZqa7 u17zSSQ3XvJWABACXb1d6ZH9sqLz9g4aiy5ZwtNC+Vt68vtktq7YdJbq14rU/mCHuKiC DWC25UL8/rkseqMmUqqoYilZuz2eZlFV0gXwsRmAVYgwjyRjUoBzjoTmk7Qz9Jzk7vBU q/1cb8GQ6NV2tQ1fL4v352pGLCOwbiwhgbXAHOg2giepVuL/MVXogeDAyXB/fc4C9LgK +1ebg/7Nnlo9ZhS51s6q2aEsndjaiNk4DFYgglk5xopYM6v+8PUGETwKMq0wDa1FHDtp gLbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9-v6si2585687ply.16.2018.09.05.10.44.19; Wed, 05 Sep 2018 10:44:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727685AbeIEWOU (ORCPT + 99 others); Wed, 5 Sep 2018 18:14:20 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726497AbeIEWOT (ORCPT ); Wed, 5 Sep 2018 18:14:19 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5A33F4023351; Wed, 5 Sep 2018 17:43:05 +0000 (UTC) Received: from redhat.com (ovpn-124-138.rdu2.redhat.com [10.10.124.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5861AFA96C; Wed, 5 Sep 2018 17:42:59 +0000 (UTC) Date: Wed, 5 Sep 2018 13:42:58 -0400 From: "Michael S. Tsirkin" To: Yann Droneaud Cc: Greg KH , David Howells , linux-api@vger.kernel.org, linux-kbuild@vger.kernel.org, Michal Marek , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, keyrings@vger.kernel.org, David Airlie , linux-nilfs@vger.kernel.org, linux-nvdimm@lists.01.org, codalist@coda.cs.cmu.edu, coda@cs.cmu.edu, coreteam@netfilter.org, Rob Clark , linux-arm-msm@vger.kernel.org, Kent Overstreet , Dan Williams , Takashi Iwai , linux-bcache@vger.kernel.org, Coly Li , Jaroslav Kysela , Jan Harkes , Masahiro Yamada , Ryusuke Konishi , Jason Wang , Mat Martineau , netfilter-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, moderated for non-subscribers , freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] UAPI: Check headers by compiling all together as C++ Message-ID: <20180905133711-mutt-send-email-mst@kernel.org> References: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> <20180905165552.GB25206@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 05 Sep 2018 17:43:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 05 Sep 2018 17:43:05 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 05, 2018 at 07:33:38PM +0200, Yann Droneaud wrote: > Hi, > > Le mercredi 05 septembre 2018 ? 18:55 +0200, Greg KH a ?crit : > > On Wed, Sep 05, 2018 at 04:54:27PM +0100, David Howells wrote: > > > > > > Here's a set of patches that inserts a step into the build process to make > > > sure that the UAPI headers can all be built together with C++ (if the > > > compiler being used supports C++). All but the final patch perform fixups, > > > including: > > > > Wait, why do we care? What has recently changed to start to directly > > import kernel uapi files into C++ code? > > > > And if userspace wants to do this, can't they do the C namespace trick > > themselves when they do the import? That must be how they are doing it > > today, right? > > > > They can't. > > > Adding extern "C" { } doesn't magically make "class" a non keyword. > Even if it was the case, writing C++ code using whatever->class would > probably broke because class is a keyword in C++. I think it's a bug in the language TBH. > -- > Yann Droneaud > OPTEYA >