From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9724 invoked by alias); 11 Aug 2014 12:16:08 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 9712 invoked by uid 89); 11 Aug 2014 12:16:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: da.nameserverus2.com Received: from da.nameserverus2.com (HELO da.nameserverus2.com) (86.111.247.88) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 11 Aug 2014 12:16:06 +0000 Received: from sir10000 by da.nameserverus2.com with local (Exim 4.83) (envelope-from ) id 1XGoWB-0004Nk-0U for gcc-help@gcc.gnu.org; Mon, 11 Aug 2014 14:16:03 +0200 Received: from 140.101.16.142 ([140.101.16.142]) by sirzooro.prohost.pl (Horde Framework) with HTTP; Mon, 11 Aug 2014 14:16:02 +0200 Date: Mon, 11 Aug 2014 12:16:00 -0000 Message-ID: <20140811141602.Horde.U2tZekSvXHQDnS4cFS-29A1@sirzooro.prohost.pl> From: daniel@poradnik-webmastera.com To: gcc-help Subject: Re: C++ name mangling in C References: <20140809215057.Horde.vyEDuGF06pHW1H_WOtKpyw1@sirzooro.prohost.pl> <20140810215514.Horde.4cJmUEtNwCy1YcH5ioNT9g1@sirzooro.prohost.pl> <20140811124543.Horde.pXSGtMzLIHVjX3-Xj3hoHA1@sirzooro.prohost.pl> In-Reply-To: User-Agent: Internet Messaging Program (IMP) H5 (6.2.1) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline X-SW-Source: 2014-08/txt/msg00089.txt.bz2 Cytowanie Jonathan Wakely : > On 11 August 2014 11:45, wrote: >> I do not know GCC internals so I cannot estimate effort for such >> modification. I thought that this will not be so hard, but looks that is is >> not so easy. > > "Make the C compiler have an option to act like the C++ compiler" is > basically an entire new language that is halfway between C and C++. > That's a huge amount of work and testing, which you're asking other > people to do because it is too difficult for you to fix your code. It is not too difficult, it is time consuming. And we do not have much free time now. Therefore I am looking for some temporary solutions to make our code better. Now I see that my proposal is not very realistic to implement from your point of view. > >> BTW, I realized that there may be an easier way to do such validation in GCC >> - write information about each function prototype (found where function is >> implemented) and each function call to object files (e.g. as debug data or >> in other format), and use it to perform validation in linker. What do you >> think about this? > > That sounds more realistic (and would be useful to people using C, not > your suggested C-with-mangling) but I it's still many weeks of work by > many people, so you don't have to spend a month fixing your code. Even > if it happened, it wouldn't be available in released versions of GCC > and the linker for months, so it is not going to help you find "some > temporary solution to use now". I know that you have to stick with your release plans, so this is not something to expect soon. I understand this. What I am looking for are things which I could use now; I thought there may be something in gcc already to help me with my work now, so I asked here. I also look for long term solutions which could be helpful for me and for others, so I asked more questions. Sorry if I annoyed you. Thank you for your answer. I will wait for some more feedback on my last proposal about adding and using this extra info, and log and enhancement. -- Regards, Daniel