This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ FE stripping const qualifiers from function prototypes (bug or feature?)
- From: Diego Novillo <dnovillo at google dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: gcc at gcc dot gnu dot org, Lawrence Crowl <crowl at google dot com>, Jason Merrill <jason at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 12 Mar 2009 09:36:23 -0400
- Subject: Re: C++ FE stripping const qualifiers from function prototypes (bug or feature?)
- References: <b798aad50903120342r7ba8809fj93f35f275a8d5c84@mail.gmail.com> <49B90F06.4020002@oracle.com>
On Thu, Mar 12, 2009 at 09:32, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>> Notice how the third argument is 'int' instead of 'const int'. ÂIs
>> this the way C++ is supposed to behave or is this a bug in the FE?
>>
> Well, I would say this is a rather well known C++ feature not a bug. It
> took me a little time finding the exact section of the standard where it
> is stated but I think finally I found it: but last item of 13.1/3. Also,
> 8.3.5/3.
Thanks, this makes it easier. I will add this as part of the FE
cleanup we do before writing the IL to disk.
Diego.