C++ name mangling in C

daniel@poradnik-webmastera.com daniel@poradnik-webmastera.com
Mon Aug 11 12:16:00 GMT 2014


Cytowanie Jonathan Wakely <jwakely.gcc@gmail.com>:

> On 11 August 2014 11:45,  <daniel@poradnik-webmastera.com> 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



More information about the Gcc-help mailing list