<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Itanium ABI: mangling issue with external names in template args (gcc vs. ABI)"
   href="http://llvm.org/bugs/show_bug.cgi?id=22621">22621</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Itanium ABI: mangling issue with external names in template args (gcc vs. ABI)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Wolfgang_Pieb@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following example from the ABI (5.1.5)

void foo(char) {}
template <void (&)(char)> struct CB {};
void bar(CB<foo> cb) {}

produces the following mangling for bar():

_Z3bar2CBILZ3foocEE

According to the ABI the 'Z' in the middle is supposed to be
preceded by an underscore, foo being a name with external linkage.

There's a FIXME comment in CXXNameMangler::mangleTemplateArg() in
ItaniumMangle.cpp saying that gcc leaves out the underscore. This
is why clang does so, too.

Is the priority to conform to the ABI or to be as compatible with
gcc as possible?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>