This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: demengler in libstdc++ is changed


<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


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