Patch: Improve demangling w.r.t. possible underscore prefix

Ranjit Mathew rmathew@hotmail.com
Mon Feb 17 15:01:00 GMT 2003


>It seems like it will break if ever __USER_LABEL_PREFIX__is not '_'.

I'm guessing that you mean "...if ever __USER_LABEL_PREFIX__ is not '_'
[and is not empty either]". Well, I checked for all instances of
USER_LABEL_PREFIX in all files in "gcc/config" and its subfolders
and every target either defines it to an underscore or an empty
string. Besides, c++filt does not handle anything more complicated
than an underscore. That way the patch looks fine to me, unless I've
misunderstood your question completely.


>Why can't you just cat __USER_LABEL_PREFIX__ to the start of the name?
>Surround the whole thing by #ifdef __USER_LABEL_PREFIX__.

By "cat" if you mean the "##" preprocessor operator, it does not work.
If you mean something like "__USER_LABEL_PREFIX__mylabel", that does
not work either. Nor do a whole lot of other things that I tried - the
only thing that seems to work is the twin-concatenation-macros
idiom you see in the patch that I borrowed from the GCC sources and
as I remark, I do not fully understand exactly why it works only
this way. :-(

Ranjit.

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



More information about the Java mailing list