220 7324 <alpine.LRH.2.03.1310161404320.5247@cs.indiana.edu> article
Path: news.gmane.org!not-for-mail
From: Jeremiah Willcock <jewillco@crest.iu.edu>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Setting calling convention separately from rest of linkage
Date: Wed, 16 Oct 2013 14:13:11 -0400 (EDT)
Lines: 24
Approved: news@gmane.org
Message-ID: <alpine.LRH.2.03.1310161404320.5247@cs.indiana.edu>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=ISO-8859-1
X-Trace: ger.gmane.org 1381947192 26424 80.91.229.3 (16 Oct 2013 18:13:12 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 16 Oct 2013 18:13:12 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBAABBN5O7OJAKGQEPTXZXWY@isocpp.org Wed Oct 16 20:13:15 2013
Return-path: <std-proposals+bncBAABBN5O7OJAKGQEPTXZXWY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pd0-f197.google.com ([209.85.192.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBAABBN5O7OJAKGQEPTXZXWY@isocpp.org>)
	id 1VWVas-0007lC-1o
	for gclcip-std-proposals@m.gmane.org; Wed, 16 Oct 2013 20:13:14 +0200
Original-Received: by mail-pd0-f197.google.com with SMTP id w10sf1775656pde.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 16 Oct 2013 11:13:12 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=date:from:to:subject:message-id:user-agent:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=DQGvpHRr5Jov/CjsXp4HNydVJHavIm5fFDiWQRGcG1E=;
        b=AnXp3hTSN4rnriZv9KgZFsXiJ2MaPPp1QtOjQ93m8/cbNSnGM/Jwv1Fbw5amNWy957
         MVOccu/3s/5lzJsJJAT8t3sNykPIh5XgFtKRVtvtEVOIPs5mUtznldfae1lgVGUpO/Vf
         LVtqoODjDYy0fv9CYRVf2EDU2DcRUJqBCd5oRFzC+FYBms8ldh6/aY4KgIfaUhv+7YDJ
         GXDsPYsJMhkeawFaAIOPDm9Bis3LjwmibUPuYEhHeyYAJmTmWn5i1XsjDTBa29lblMda
         f80kTbWA0+VN1N8u/cXEIB6oHGEpk8C1QniDoZ3LcRzRLp/0XZ8fv+EVjTyHRt5245eZ
         og+Q==
X-Received: by 10.66.26.5 with SMTP id h5mr1624718pag.1.1381947192821;
        Wed, 16 Oct 2013 11:13:12 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.74.35 with SMTP id q3ls617715qev.50.gmail; Wed, 16 Oct 2013
 11:13:11 -0700 (PDT)
X-Received: by 10.236.223.168 with SMTP id v38mr1677745yhp.86.1381947191792;
        Wed, 16 Oct 2013 11:13:11 -0700 (PDT)
Original-Received: from hartman.uits.indiana.edu (hartman.uits.indiana.edu. [129.79.1.194])
        by mx.google.com with ESMTP id f10si30078855yhd.377.1969.12.31.16.00.00;
        Wed, 16 Oct 2013 11:13:11 -0700 (PDT)
Received-SPF: neutral (google.com: 129.79.1.194 is neither permitted nor denied by best guess record for domain of jewillco@crest.iu.edu) client-ip=129.79.1.194;
X-IronPort-AV: E=Sophos;i="4.93,508,1378872000"; 
   d="scan'208";a="80928373"
Original-Received: from mssg-relay.indiana.edu ([129.79.1.73])
  by irpt-internal-relay.indiana.edu with ESMTP; 16 Oct 2013 14:13:11 -0400
Original-Received: from hartman.uits.indiana.edu (hartman.uits.indiana.edu [129.79.1.194])
	by mssg-relay.indiana.edu (8.14.7/8.14.4/IU Messaging Team) with ESMTP id r9GID50X029069
	for <std-proposals@isocpp.org>; Wed, 16 Oct 2013 14:13:11 -0400
X-IronPort-AV: E=Sophos;i="4.93,508,1378872000"; 
   d="scan'208";a="80928371"
Original-Received: from burns.uits.indiana.edu (HELO mail-relay.iu.edu) ([129.79.1.202])
  by irpt-internal-relay.indiana.edu with ESMTP; 16 Oct 2013 14:13:11 -0400
Original-Received: from flowerpot.osl.iu.edu (flowerpot.osl.iu.edu [129.79.49.75])
	(authenticated bits=0)
	by mail-relay.iu.edu (8.14.7/8.14.4/IU Messaging Team Submission) with ESMTP id r9GIDBJK013753
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <std-proposals@isocpp.org>; Wed, 16 Oct 2013 14:13:11 -0400
X-X-Sender: jewillco@flowerpot.osl.iu.edu
User-Agent: Alpine 2.03 (LRH 1266 2009-07-14)
X-Original-Sender: jewillco@crest.iu.edu
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 129.79.1.194 is neither permitted nor denied by best guess
 record for domain of jewillco@crest.iu.edu) smtp.mail=jewillco@crest.iu.edu
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:7324
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7324>

There does not appear to currently be a way to have a function with 
internal linkage but C calling convention: extern "C" uses external 
linkage, while "static" uses the C++ calling convention.  The particular 
issue where this matters is in passing function pointers to C code. For 
example, there is no Standard-allowed way to pass an instance of a 
function template as a C function pointer without an extra layer of 
non-template wrapping.  Would it make sense to have a construct
that sets the calling convention but uses internal 
linkage, or a mechanism that only sets the calling convention without 
affecting linkage at all (to allow the kind of linkage used for template 
instances)?  Because it would not affect name mangling, it could be 
applied to function templates as well, plus the names of these functions 
would not need to be unique across namespaces as with extern "C".

-- Jeremiah Willcock

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
