I know MSVC does, and GCC doesn't? What about the others?
Asked
Active
Viewed 503 times
2
-
Why would this matter to you? And I didn't realise that MSVC did - I don't think it used to, and I can't see any reason why it should. – Jul 29 '10 at 17:19
-
1It determines whether you can change the access of a function while still maintaining binary compatibility. – Marc Mutz - mmutz Jul 29 '10 at 17:22
-
2@Neil: to foil people trying to use `#define private public` to help with debugging. – Mike Seymour Jul 29 '10 at 17:23
-
@Mike Not something I've ever done. – Jul 29 '10 at 17:29
-
1@mmutz Whenever I see the dread words "binary compatibility" I always get the feeling that the person using them does not know what they mean. You may, of course, be an exception. – Jul 29 '10 at 17:31
-
@Neil: it's probably not something you'd ever want to do in MSVC, with its nice graphical debugger. On some platforms, `printf` and access violations are the best debugging tools available. – Mike Seymour Jul 29 '10 at 17:57
-
@Mike I haven't used MSVC since 6.0. – Jul 29 '10 at 18:28
-
@Mike: Isn't it undefined behaviour to use a keyword as macro identifier no matter what name mangling does? – sellibitze Jul 30 '10 at 06:06
-
@sellibitze: it certainly is; only do it if you know how your compiler/linker behaves, and never leave it in production code. – Mike Seymour Jul 30 '10 at 10:16
2 Answers
2
@Neil: MSVC does: http://labs.trolltech.com/blogs/2009/08/12/some-thoughts-on-binary-compatibility/
EDIT: sorry, i meant to reply.

Sergio Martins
- 897
- 2
- 8
- 18
-
2Interesting link. Those crazy guys at MS, eh? One suspects too many interns with too much time on their hands. – Jul 29 '10 at 17:34
-
0
This probably not only depends on compiler but also on platform. ARM name mangling scheme does not use access modifiers to mangle names. Itanium does (gcc follows this one). Microsoft as far as I know is the only one to use it on it's own scheme.

Vitor Py
- 5,145
- 4
- 39
- 62