On 08/31/2016 10:26 AM, David Malcolm wrote:
On Wed, 2016-08-31 at 10:23 -0600, Martin Sebor wrote:
On 08/25/2016 10:30 AM, Martin Sebor wrote:
On 08/25/2016 10:23 AM, David Malcolm wrote:
Martin: here are the fixups for your patch I needed to apply to
make
it work with mine. I couldn't actually get any of your existing
test
cases to emit locations within the string literals, due to them
all
being embedded in macro expansions (possibly relating to PR
c/77328),
so I added a simple testcase using -fdiagnostics-show-caret,
which
does successfully show a range within the string.
Posting in the hope that it's helpful; I haven't attempted a
bootstrap
with it.
I've tried the patch but the changes don't compile because
substring_loc is not declared. I see the class defined in
c-family/c-common.h which I can't include here in the middle
end. Am I missing some another patch?
The fixup patch is on top of
https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01811.html
which moves class substring_loc to gcc/substring-locations.h.
Great! With that patch my pass builds fine, all my tests pass,
and based on a quick comparison the output of the diagnostics
looks unchanged.
Thanks
Martin