This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C++ name mangling in C
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Daniel FruÅyÅski <daniel at poradnik-webmastera dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 11 Aug 2014 00:36:11 +0100
- Subject: Re: C++ name mangling in C
- Authentication-results: sourceware.org; auth=none
- References: <20140809215057 dot Horde dot vyEDuGF06pHW1H_WOtKpyw1 at sirzooro dot prohost dot pl> <CAH6eHdTwP-1p3OS8pZM6gs8fW1-5Ojob7hqBnyweqdzQCsRxiA at mail dot gmail dot com> <20140810215514 dot Horde dot 4cJmUEtNwCy1YcH5ioNT9g1 at sirzooro dot prohost dot pl>
On 10 August 2014 20:55, <daniel@poradnik-webmastera.com> wrote:
> Cytowanie Jonathan Wakely <jwakely.gcc@gmail.com>:
>
>> On 9 August 2014 20:50, <daniel@poradnik-webmastera.com> wrote:
>>>
>>> If there is no such option, I would like to open an enhancement to add
>>> it. I
>>> thought about it for some time and looks that this new option should do 3
>>> things: enable C++ name mangling, enable extern "C" directive and define
>>> the
>>> __cplusplus macro. Any comments on this proposal is also welcome.
>>
>>
>> So you want GCC to behave like a C++ compiler. It can already do that.
>>
>> Just use C++.
>>
>> If you get errors, fix them.
>
>
> Easier said than done. I think it will take about month of work to change
> our code base in order to compile it using g++. We are planning to do this
> eventually, but not now. Because of this I am looking for some temporary
> solution to use now.
It will be a lot easier to fix your code than to modify GCC to do what
you're requesting.