This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: middle-end/2133


The following reply was made to PR middle-end/2133; it has been noted by GNATS.

From: Carlo Wood <carlo@alinoe.com>
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: middle-end/2133
Date: Sat, 3 Mar 2001 05:24:34 +0100

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2133&database=gcc
 
 I decided to make a summary for the person who will fix this.
 
 Bug1:
 
   A 'K' in front of (member) function pointers (and references) need 
   to make the pointer (reference) const, not the function:
 
   KPF<return_type><p1><p2>...<pN>E               --> <return_type> (* const)(<p1>, <p2>, ..., <pN>)
   KRF<return_type><p1><p2>...<pN>E               --> <return_type> (& const)(<p1>, <p2>, ..., <pN>)
   KM<scopetype>F<return_type><p1><p2>...<pN>E    --> <return_type> (<scopetype>::* const)(<p1>, <p2>, ..., <pN>)
 
   or, more in general:
 
   K<type>                                       --> <prefix> const <postfix>
 
 Bug2:
 
   A possibility needs to be added to the mangling sheme to mangle
   const functions, this should be done as was done in with the old
   ABI by putting the qualifier in front of the 'F':
 
   PKF<return_type><p1><p2>...<pN>E               --> <return_type> (*)(<p1>, <p2>, ..., <pN>) const
   RKF<return_type><p1><p2>...<pN>E               --> <return_type> (&)(<p1>, <p2>, ..., <pN>) const
   M<scopetype>KF<return_type><p1><p2>...<pN>E    --> <return_type> (<scopetype>::*)(<p1>, <p2>, ..., <pN>) const
 
 -- 
 Carlo Wood <carlo@alinoe.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]