public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20123] New: mangled name of typeid doesn't encode cv-qualifer.
@ 2005-02-21 23:12 yanliu at ca dot ibm dot com
  2005-02-21 23:15 ` [Bug c++/20123] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: yanliu at ca dot ibm dot com @ 2005-02-21 23:12 UTC (permalink / raw)
  To: gcc-bugs

Here is a testcase:
#include <typeinfo>
int const volatile v5[10] = {0};
int
main (int argc, char **argv) {
  const std::type_info& t = typeid (::v5);
}

According to Itanium C++ ABI, the mangled name of typeid(::v5) should follow 
the following grammer rules:
 <mangled-name> ::= _Z <encoding>
    <encoding> 	::= <special-name>
       <special-name> ::= TI <type>	# typeinfo structure
          <type> ::= <array-type>
             <array-type> ::= A <positive dimension number> _ <element type>

To my understanding, the element type follows the <type> rule and is used to 
encode the type of variable v5[10]:
                <type> ::= <CV-qualifiers> <type>
                   <CV-qualifiers> ::= [r] [V] [K] # restrict (C99), volatile, 
const


So the mangled name should be: __ZTIA10_VKi. But using gcc 4.0 compiler, I am 
getting "__ZTIA10_i" mangled name instead. 

Please verify the problem, thanks.

-- 
           Summary: mangled name of typeid doesn't encode cv-qualifer.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yanliu at ca dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20123


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <bug-20123-5317@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2009-03-05 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-21 23:12 [Bug c++/20123] New: mangled name of typeid doesn't encode cv-qualifer yanliu at ca dot ibm dot com
2005-02-21 23:15 ` [Bug c++/20123] " pinskia at gcc dot gnu dot org
2005-02-21 23:35 ` yanliu at ca dot ibm dot com
2005-02-24 23:45 ` jody-atd-030903 at atdesk dot com
     [not found] <bug-20123-5317@http.gcc.gnu.org/bugzilla/>
2009-03-05 18:35 ` jason at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).