This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] mostly unify readonly_error in C and C++ front-ends
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Nathan Froyd <froydnj at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 9 Dec 2010 21:34:13 +0000 (UTC)
- Subject: Re: [PATCH] mostly unify readonly_error in C and C++ front-ends
- References: <20101209203538.GP25904@nightcrawler>
On Thu, 9 Dec 2010, Nathan Froyd wrote:
> This patch introduces a common readonly_error function that can be used
> by the C and C++ front-ends along with associated tweaks to make it work
> right. Notably, the C++-specific readonly_error_kind goes away,
> subsumed by lvalue_use, and the C++ readonly_error function is renamed
> to cp_readonly_error to handle a few C++-specific cases.
>
> I thought the C++ wording was better in most cases, though the "used as
> `asm' output" phrasing that the C front-end uses is preferable to "(via
> 'asm' output)", I think. I also think the greater number of cases
> handled by the C++ front-end and the more precise wording will be useful
> in the C front-end.
>
> Tested on x86_64-unknown-linux-gnu. OK to commit?
The C changes are OK with the addition of the assertion that the "named
return value" case only appears for C++.
--
Joseph S. Myers
joseph@codesourcery.com