This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: demengler in libstdc++ is changed
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: <tm_gccmail at kloo dot net>
- Cc: Matt Austern <austern at apple dot com>, "H. J. Lu" <hjl at lucon dot org>, gcc at gcc dot gnu dot org
- Date: 14 Nov 2003 17:16:23 -0500
- Subject: Re: demengler in libstdc++ is changed
- References: <Pine.LNX.4.21.0311141356000.16464-100000@mail.kloo.net>
<tm_gccmail@kloo.net> writes:
> On Fri, 14 Nov 2003, Matt Austern wrote:
>
> > Example: _Z3fooPKi could reasonably be demangled as foo(const int*),
> > or foo(int const*), or foo(int const *), or a number of other
> > choices. All are correct; as far as the compiler is concerned, there
> > is no difference between them. Programmers use those forms
> > interchangeably, or choose between them on stylistic grounds. In
> > my opinion a demangler that chose any of those forms is correct.
> >
> > --Matt
>
> I'm confused. To me, these are not the same.
>
> foo(const int *) is a function which takes "pointer to a const int".
>
> foo (int const *) is a function which takes "const pointer to an int".
>
> What am I missing?
A function which takes "const pointer to an int" would be written as
foo (int * const)
Ian