This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/4] PR c++/62314: add fixit hint for missing "template <> " in explicit specialization
- From: Trevor Saunders <tbsaunde at tbsaunde dot org>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Apr 2016 10:30:48 -0400
- Subject: Re: [PATCH 1/4] PR c++/62314: add fixit hint for missing "template <> " in explicit specialization
- Authentication-results: sourceware.org; auth=none
- References: <1461853698-43954-1-git-send-email-dmalcolm at redhat dot com>
On Thu, Apr 28, 2016 at 10:28:15AM -0400, David Malcolm wrote:
> This is a resend of a patch kit I sent in stage 3; the original post
> was here:
> https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01933.html
>
> I've rebased the patches against yesterday's trunk and retested them.
>
> They add various fix-it hints to existing diagnostics (PR 62314 is a
> catch-all for adding fix-its).
>
> The first patch in the kit adds a fix-it insertion hint for missing
> "template <> " in explicit specializations, and improves the
> reported range of the type name by capturing the full range, rather
> than just one token within it.
>
> I note that clang (http://clang.llvm.org/diagnostics.html) suggests
> inserting
> template<>
> whereas our diagnostic talks about
> template <>
> hence I have the fixit suggest inserting that. Should we change our
> wording instead, and lose the space?
Selfishly I'd prefer to lose the space on the grounds all the other
projects I work on don't put one there and gcc is inconsistant about it.
That said assuming there are projects that put a space there it seems
unfortunate we need to pick one which will definitely be suboptimal for
some people.
Trev