This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: middle-end/2133
- To: nobody at gcc dot gnu dot org
- Subject: Re: middle-end/2133
- From: Carlo Wood <carlo at alinoe dot com>
- Date: 3 Mar 2001 04:26:02 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Carlo Wood <carlo at alinoe dot com>
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>