From owner-freebsd-questions@FreeBSD.ORG Fri Feb 24 09:41:43 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B0421065670 for ; Fri, 24 Feb 2012 09:41:43 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (unknown [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 743668FC16 for ; Fri, 24 Feb 2012 09:41:43 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id q1O9fgxI056624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 24 Feb 2012 01:41:43 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.14.2/Submit) with UUCP id q1O9fgps056623 for freebsd-questions@freebsd.org; Fri, 24 Feb 2012 01:41:42 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: from fbsd81 ([192.168.200.81]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA02880; Fri, 24 Feb 12 01:37:24 PST Date: Fri, 24 Feb 2012 01:37:22 -0800 From: perryh@pluto.rain.com To: freebsd-questions@freebsd.org Message-Id: <4f47bcc2.i0iNgy94hupdyGb5%perryh@pluto.rain.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Converting C++ to C X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 09:41:43 -0000 Some early implementations of C++ operated as preprocessors that emitted C code. Is there any current tool that will do that? I didn't recognize any such option in the g++ manpage, although I suppose it's possible that one of the -fdump-tree- options would come close enough. Reason: I want to make what I think would be a fairly minor change to a small (1100-line) C++ program, but I don't know C++ -- only C -- and I don't understand the program well enough to mess with it. I suspect I would be able to figure out an equivalent C program. In case it matters, I'm using FreeBSD 8.1.