473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

C++0x on name mangling.

Does anybody know if C++0x is going to change C++ name mangling at
all? Such as, standardizing name mangling instead of leaving it up to
the compiler?

Jason
Feb 29 '08 #1
4 1945
On Feb 29, 3:44 am, "jason.cipri...@gmail.com"
<jason.cipri...@gmail.comwrote:
Does anybody know if C++0x is going to change C++ name
mangling at all? Such as, standardizing name mangling instead
of leaving it up to the compiler?
C++ does not, and in fact, cannot define implementation details.
There are too many differences at the architecture level to make
this practical.

Specific platforms can, and occasionally do, define a platform
specific C++ API. Regretfully, far too occasionally---there
isn't one for either Solaris/Sparc nor Windows/PC, and as far as
I know, only an ad hoc one for Linux/PC. (All platforms I know
do defined a platform specific API for C.)

And of course, any time the API differs, you want some sort of
differing conventions for name mangling, so that you don't
accidentally link code which won't work together. (I'm not
aware of any case where the API's are identical, but the name
mangling isn't. I would consider the name mangling part of the
API. On the other hand, I wouldn't be surprised if different
languages---e.g. Pascal and C---under Windows mangled the names
in the same way, despite using different calling conventions.
It was, at least, a problem under MS-DOS.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Feb 29 '08 #2
What is name mangling ? No idea what u talking here ?

Thanks for your explanation
Feb 29 '08 #3
On Fri, 29 Feb 2008 02:31:29 -0800, PeterAPIIT wrote:
What is name mangling ? No idea what u talking here ?
http://en.wikipedia.org/wiki/Name_mangling

--
Lionel B
Feb 29 '08 #4
On Feb 29, 4:31 am, James Kanze <james.ka...@gmail.comwrote:
[all kinds of stuff]
Thanks for the good explanation!
>On the other hand, I wouldn't be surprised if different
languages---e.g. Pascal and C---under Windows mangled the names
in the same way, despite using different calling conventions.
FYI, that problem no longer seems to exist:

void __stdcall sfunction (int) { }
void __fastcall ffunction (int) { }
void __cdecl cfunction (int) { }

Ends up with:

00000012 T ?cfunction@@YAXH@Z
00000007 T ?ffunction@@YIXH@Z
00000000 T ?sfunction@@YGXH@Z

Using both MS CL 12.00 (VS 6) and 14.00 (VS 2005).

Thanks,
Jason
Feb 29 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Steven Bethard | last post by:
Philippe C. Martin wrote: > class Debug_Stderr: > __m_text = '' > __m_log_text = None > __m_dbg = None > __m_refresh_count = 0 <rant> I don't see the benefit in 99.9% of cases for...
4
by: sunny | last post by:
Hi, I was trying to call a function in an an asm file from a C file(driver). In c file the funcrtion is defined as: extern int foo(int,int); In the asm file the function is defined as _foo. ...
1
by: Tim Slattery | last post by:
Does the C++ language standard mandate a particular name-mangling method? I'm trying to use the Entrust toolkit to create a C++ program that encrypts and decrypts files. Entrust supplies header...
6
by: yyy | last post by:
my question is rather theoretical than practical in the pure programming aspect... is "name mangling" the same as "name decorating" ? browsing the web, you might find multiple people saying...
1
by: noleander | last post by:
I need to use a library supplied by someone else: libjpeg.lib. This is a plain C library. I do not have the source code. I do have the header *.h files. When I run dumpbin on the libjpeg.lib,...
6
by: David Wade | last post by:
Folks, Does any one know of any "name mangling" software that allows standard C with long names to be linked? Any suggestions for a better place to look? I have tried putting various searchs...
5
by: Subhransu Sahoo | last post by:
Hi All, Does the C++ standard tell function overloading can't be done with the return types of two functions ? If so, is it true that the name mangling scheme does not take the return type into...
8
by: sam_cit | last post by:
Hi Everyone, I read somwhere that c++ compiler does name mangling of functions which is why c source code can't invoke functions from object files that were generated using c++ compiler. Can...
14
by: Megalo | last post by:
why not make "name mangling" of C++ standard so should be possible to call the classes and the functions of C++ from other C++ compiler thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.