This is the mail archive of the 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: New name mangling in g++

On Jan 29, 2001, Andreas Schwab <> wrote:

> Jakub Jelinek <> writes:
> |> On Mon, Jan 29, 2001 at 05:32:59PM +0100, Andreas Schwab wrote:

> |> > The `const' is not part of the interface.

> |> const is part of the interface, it is encoded with the K.

> Since argument b is passed by value, the const should not matter, should
> it?

It shouldn't and doesn't matter.  ``Any cv-qualifier modifying a
parameter type is deleted.  [Example: type type void(*)(const int)
becomes void(*)int --end example] Such cv-qualifiers affect only the
definition of the parameter within the body of the function; they do
not affect the function type.'' [dcl.fct]/3

Obviously, only the top-level cv-qualifier is discarded.  The `const'
of `char const*', for example, is not discarded, because the
cv-qualifier doesn't directly modify the parameter type.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

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