473,672 Members | 2,450 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1965
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 objektorientier ter Datenverarbeitu ng
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...@gm ail.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@@YAX H@Z
00000007 T ?ffunction@@YIX H@Z
00000000 T ?sfunction@@YGX H@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
2013
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 making class variables
4
1883
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. when I link the 2 binaries in VC++ it works fine but with DDK this gives as error saying _foo@8 not found.
1
2520
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 files defining their objects and functions, and *.so files (I'm on a Sun Sparc machine running Solaris) containing the implementation of the functions. I'm compiling with the GNU g++ compiler. According to the
6
6516
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 "yes", but i vaguely remember having read that it's not exactly like that one might say that "name mangling" is a part of c++ compiler specification and is a naming scheme to support function overloading
1
1903
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, it contains symbols (entry points) like: jpeg_read_header I'm trying to link my program with this library. My program is in Visual C++. The link fails with link-time errors such as:
6
1716
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 into google to no avail. Dave.
5
1959
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 account ?I know that C++ standard does not tell anything about name mangling and only talks bout function overloading. But, I have observed that the Metrowerks Code Warrior compiler does take return type into the mangling scheme. Is it not a bug...
8
3135
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 anyone tell in detail as to what name mangling is all about?
14
2987
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
8486
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8932
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8609
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7449
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6240
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1819
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.