Update pointer to member function substitution language

Mark Mitchell mark at codesourcery.com
Mon Oct 21 16:29:54 UTC 2002


As per recent discussions on this list regarding substitutions and
pointers-to-members, I have updated the document with the following
patch.

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Index: abi.html
===================================================================
RCS file: /usr/local/Repository/cxx-abi/abi.html,v
retrieving revision 1.37
diff -c -5 -p -r1.37 abi.html
*** abi.html	17 Oct 2002 01:03:57 -0000	1.37
--- abi.html	21 Oct 2002 16:29:24 -0000
*************** If a component has not been encountered 
*** 4568,4577 ****
--- 4568,4595 ----
  its mangling is identified,
  and it is added to a dictionary of substitution candidates.
  No entity is added to the dictionary twice.
  
  <p>
+ The type of a non-static member function is considered to be
+ different, for the purposes of substitution, from the type of a
+ namespace-scope or static member function whose type appears similar.
+ Therefore, in the following example:
+ <blockquote><code><pre>
+ typedef void T();
+ struct S {};
+ void f(T*, T (S::*)) {}
+ </pre></code></blockquote>
+ the function <code>f</code> is mangled as
+ <code>_Z1fPFvvEM1SFvvE</code>; the type of the member function pointed
+ to by the second parameter is not considered the same as the type of
+ the function pointed to by the first parameter.  Both function types
+ are, however, entered the substitution table; subsequent references to
+ either variant of the function type will result in the use of
+ substitutions.
+ 
+ <p>
  Substitution is according to the production:
  
  <pre><font color=blue><code>
    <substitution> ::= S <seq-id> _
  		 ::= S_
*************** unwind table location.
*** 4868,4877 ****
--- 4886,4899 ----
  
  <p> <hr> <p>
  <a name=revisions>
  <h2> Appendix R: Revision History </h2>
  <p> <hr> <p>
+ 
+ <p>
+ <font color=blue>[021021]</font>
+ Clarify mangling of pointer-to-member functions.
  
  <p>
  <font color=blue>[021016]</font>
  Clarify mangling of floating-point literals.
  



More information about the cxx-abi-dev mailing list