This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Refactor -Wmisleading-indentation API and extend coverage
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>
- Cc: David Malcolm <dmalcolm at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>
- Date: Mon, 08 Jun 2015 20:44:36 +0100
- Subject: Re: [PATCH] Refactor -Wmisleading-indentation API and extend coverage
- Authentication-results: sourceware.org; auth=none
- References: <1433707596-6988-1-git-send-email-patrick at parcs dot ath dot cx> <1433787065 dot 12727 dot 128 dot camel at surprise> <CA+C-WL-xbABcE0mzJS8EVu3Q2FTz5JVjZRFaApRcAaJvQ_4GiQ at mail dot gmail dot com>
Patrick Palka <patrick@parcs.ath.cx> writes:
> On Mon, Jun 8, 2015 at 2:11 PM, David Malcolm <dmalcolm@redhat.com> wrote:
>>> void
>>> warn_for_misleading_indentation (const common_token_info &guard_tinfo,
>>> const common_token_info &body_tinfo,
>>> const common_token_info &next_tinfo);
>>
>> [Do we allow C++ reference syntax? I'm OK with it, and some of the
>> more "C++y" parts of codebase use it (templates), but I think Jeff
>> objected last time I tried to submit a patch with it :) ]
>
> I'm not sure. The use of references is not a big deal to me in this
> case at least. I will just pass three pointers instead.
FWIW: I thought const references were allowed for cases where the object
is logically being passed by value. We used that a lot in thw wide-int
code, where actually passing by value would be too slow and passing by
pointer too unnatural.
I thought it was out and in-out references that were the problem.
Thanks,
Richard