This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC] Mark __asm__ identifiers as referenced in varasm.c
- From: Roger Sayle <roger at eyesopen dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: gcc-patches at gcc dot gnu dot org, <dave dot anglin at nrc dot ca>
- Date: Thu, 6 Jul 2006 11:45:00 -0600 (MDT)
- Subject: Re: [PATCH/RFC] Mark __asm__ identifiers as referenced in varasm.c
Hi Steve,
On Thu, 6 Jul 2006, Steve Ellcey wrote:
> I saw this problem too and submitted a different patch. I got no comments
> on it.
>
> http://gcc.gnu.org/ml/gcc-patches/2006-01/msg01655.html
>
> I pinged again in February but still got no reponse.
> http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00721.html
I'm sorry, I suspect I left this for someone else to respond to.
This varasm identifier stuff isn't my usual area of expertise.
I'll admit that I appreciate the aggresive simplicity of your patch.
A little archeology reveals that the original call to the macro
STRIP_NAME_ENCODING, which by default just stripped the asterisk
from the start of the name, dates back to a check-in by Richard
Kenner, subversion revision 7651, July 5th 1994.
http://gcc.gnu.org/viewcvs?view=rev&revision=7651
I'm guessing that all motivation for changes from that era have
been lost in the mists of time. One possible explanation might
be that a port he was working on at the time defined its own
implementation of STRIP_NAME_ENCODING?
Given the lack of comment and informed expertise on this aspect
of varasm, your patch has gone without comment for months, I'm
inclining to towards a "lets try your patch and see what breaks"
approach. We'll give the list a few days for further opportunity
to comment. In the meantime, it would be good to try your patch
on a few more platforms to make sure there are no issues on the
common targets. I'll see if I can find some spare cycles on
alpha and powerpc which are likely to have been the platforms
that have motivated Kenner's change. However, after 12 years
its not unlikely that decl identifiers are now handled completely
differently, and this code truly is obsolete.
A compromise intermediate, should we discover any problems with
your patch, is to only call strip_encoding if the name doesn't begin
with an asterisk, and failing that we can fall back to my conservative
"double probe" approach (looking up asterisk names a second time
if the stripped lookup fails to find an identifier).
Roger
--