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: C++ FE stripping const qualifiers from function prototypes (bug or feature?)


On Thu, Mar 12, 2009 at 10:29, Mark Mitchell <mark@codesourcery.com> wrote:

> Just to be completely clear: top-level cv-qualifiers (don't forget
> volatile, and don't forget to think about restrict) are removed from the
> type of function parameters when computing the type of the function.

Yes, I mean removing the 'const' and 'volatile' qualifier from
TYPE_ARG_TYPES (ie, the function signature).  I don't intend to do
anything for 'restrict'.

> However, they do of course apply *within* the function; you cannot
> change a parameter of type "const int i".

Right.


Thanks.  Diego.


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