Re: [RFC][PATCH v2] PR preprocessor/83173: Additional check before decrementing highest_location

2018-08-10 Thread Mike Gulick
On 05/29/2018 11:25 AM, Mike Gulick wrote: > On 03/04/2018 02:27 PM, Mike Gulick wrote: >> >> >> On 02/09/2018 05:54 PM, Mike Gulick wrote: >>> Hi David, >>> >>> Here is a new version of the linemap patch (see my earlier emails for an >>&g

Re: [PATCH v4] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-26 Thread Mike Gulick
On 11/13/18 3:12 PM, David Malcolm wrote: > On Tue, 2018-11-13 at 14:54 -0500, Mike Gulick wrote: >> 2018-11-13 Mike Gulick > > [...] > >> * gcc/diagnostic-core.h (num_digits): Add extern definition. > > FWIW you moved the decl to diagnostic.h, but didn&

[PATCH v5] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-26 Thread Mike Gulick
2018-11-26 Mike Gulick PR preprocessor/83173 * gcc/input.c (dump_location_info): Dump reason and included_from fields from line_map_ordinary struct. Fix indentation when location > 5 digits. * libcpp/location-example.txt: Update example -fd

Re: [PATCH v4] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-27 Thread Mike Gulick
On 11/26/18 8:29 PM, David Malcolm wrote: > On Mon, 2018-11-26 at 22:17 +0000, Mike Gulick wrote: >> On 11/13/18 3:12 PM, David Malcolm wrote: >>> On Tue, 2018-11-13 at 14:54 -0500, Mike Gulick wrote: >>>> 2018-11-13 Mike Gulick >>> >>> [...]

Re: [PATCH v4] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-27 Thread Mike Gulick
On 11/27/18 9:27 AM, David Malcolm wrote: [...] > > I can commit them for you if you like. Please can you repost the > latest version of the patches as one kit, for clarity, so I can commit > them. > Do you want me to repost them as a patch series, or as a single patch? > Thanks > Dave >

[PATCH v5 1/3] PR preprocessor/83173: Additional check before decrementing highest_location

2018-11-27 Thread Mike Gulick
2018-11-27 Mike Gulick PR preprocessor/83173 * libcpp/files.c (_cpp_stack_include): Check if line_table->highest_location is past current line before decrementing. --- libcpp/files.c | 32 +++- 1 file changed, 23 insertions(+)

[PATCH v5 2/3] PR preprocessor/83173: New test

2018-11-27 Thread Mike Gulick
2018-11-27 Mike Gulick PR preprocessor/83173 * gcc.dg/plugin/location-overflow-test-pr83173.c: New test. * gcc.dg/plugin/location-overflow-test-pr83173.h: Header for pr83173.c. * gcc.dg/plugin/location-overflow-test-pr83173-1.h: Header for

[PATCH v5 3/3] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-27 Thread Mike Gulick
2018-11-27 Mike Gulick PR preprocessor/83173 * gcc/input.c (dump_location_info): Dump reason and included_from fields from line_map_ordinary struct. Fix indentation when location > 5 digits. * libcpp/location-example.txt: Update example -fd

Re: [PATCH v5 1/3] PR preprocessor/83173: Additional check before decrementing highest_location

2018-11-27 Thread Mike Gulick
On 11/27/18 11:07 AM, David Malcolm wrote: > On Tue, 2018-11-27 at 09:53 -0500, Mike Gulick wrote: >> 2018-11-27 Mike Gulick >> >> PR preprocessor/83173 >> * libcpp/files.c (_cpp_stack_include): Check if >> line_table->highest_

[PATCH v3 0/3] PR preprocessor/83173: C preprocessor generates incorrect linemarkers

2018-11-01 Thread Mike Gulick
ase let me know if you have any feedback, and how I should proceed. I do not have gcc contributor paperwork in place, as I believe that needs to be initiated by a maintainer, but I do have an employer disclaimer already approved, so the process should be simple. Thanks, Mike Mike Gulick (3): PR pr

[PATCH v3 1/3] PR preprocessor/83173: Additional check before decrementing highest_location

2018-11-01 Thread Mike Gulick
2018-10-31 Mike Gulick PR preprocessor/83173 * libcpp/files.c (_cpp_stack_include): Check if line_table->highest_location is past current line before decrementing. --- libcpp/files.c | 32 +++- 1 file changed, 23 insertions(+)

[PATCH v3 2/3] PR preprocessor/83173: New test

2018-11-01 Thread Mike Gulick
2018-10-31 Mike Gulick PR preprocessor/83173 * gcc.dg/plugin/location-overflow-test-pr83173.c: New test. * gcc.dg/plugin/location-overflow-test-pr83173.h: Header for pr83173.c. * gcc.dg/plugin/location-overflow-test-pr83173-1.h: Header for

[PATCH v3 3/3] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-01 Thread Mike Gulick
2017-10-31 Mike Gulick PR preprocessor/83173 * gcc/input.c (dump_location_info): Dump reason and included_from fields from line_map_ordinary struct. Fix indentation when location > 5 digits. * libcpp/location-example.txt: Update example -fd

Re: [PATCH v3 1/3] PR preprocessor/83173: Additional check before decrementing highest_location

2018-11-02 Thread Mike Gulick
On 11/2/18 5:13 PM, David Malcolm wrote: > On Thu, 2018-11-01 at 11:56 -0400, Mike Gulick wrote: >> 2018-10-31 Mike Gulick >> >> PR preprocessor/83173 >> * libcpp/files.c (_cpp_stack_include): Check if >> line_table->highest_

Re: [PATCH v3 3/3] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-12 Thread Mike Gulick
On 11/2/18 5:04 PM, David Malcolm wrote: > On Thu, 2018-11-01 at 11:56 -0400, Mike Gulick wrote: >> 2017-10-31 Mike Gulick >> >> PR preprocessor/83173 >> * gcc/input.c (dump_location_info): Dump reason and >> included_from fields fr

Re: [PATCH v3 3/3] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-13 Thread Mike Gulick
On 11/12/18 7:56 PM, David Malcolm wrote: > On Mon, 2018-11-12 at 21:13 +0000, Mike Gulick wrote: >> On 11/2/18 5:04 PM, David Malcolm wrote: >>> On Thu, 2018-11-01 at 11:56 -0400, Mike Gulick wrote: >>>> 2017-10-31 Mike Gulick >>>> >>&

[PATCH v4] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-13 Thread Mike Gulick
2018-11-13 Mike Gulick PR preprocessor/83173 * gcc/input.c (dump_location_info): Dump reason and included_from fields from line_map_ordinary struct. Fix indentation when location > 5 digits. * libcpp/location-example.txt: Update example -fd

Re: [RFC][PATCH] PR preprocessor/83173: Additional check before decrementing highest_location

2018-01-14 Thread Mike Gulick
On 01/12/2018 06:16 PM, David Malcolm wrote: > On Fri, 2017-12-01 at 17:57 -0500, Mike Gulick wrote: >> I've come up with some patches that fix PR preprocessor/83173, which >> I reported >> a couple of weeks ago. >> >> The first patch is a test case.

Re: [RFC][PATCH] PR preprocessor/83173: Additional check before decrementing highest_location

2018-01-23 Thread Mike Gulick
On 01/14/2018 12:16 PM, Mike Gulick wrote: > On 01/12/2018 06:16 PM, David Malcolm wrote: [snip] >> >> I was going to suggest renaming your new test to e.g. >> location-overflow-test-pr83173.c >> so that it matches the glob in those comments, but given that you ref

Re: [RFC][PATCH v2] PR preprocessor/83173: Additional check before decrementing highest_location

2018-02-09 Thread Mike Gulick
ternal-locations output to include the reason and included_from fields from the line_map_ordinary data structure. I aos fixed an issue with the output alignment. I found this useful when evaluating these changes. Thanks, Mike From e3f23f66ad18598fc21a9223b7f29572a14d1588 Mon Sep 17 00:00:00

Re: [RFC][PATCH v2] PR preprocessor/83173: Additional check before decrementing highest_location

2018-03-04 Thread Mike Gulick
On 02/09/2018 05:54 PM, Mike Gulick wrote: > Hi David, > > Here is a new version of the linemap patch (see my earlier emails for an > updated > version of the test code). Hi David, Just wondering if you have had a chance to look at these updated patches yet. Let me know

[RFC][PATCH] PR preprocessor/83173: Additional check before decrementing highest_location

2017-12-01 Thread Mike Gulick
ases. Both of these pass the gcc/g++ test suites with no regressions. Thanks in advance for the review/feedback! -Mike >From 6ff0068284c346c8db08c4b6b4d9a66d8464aeac Mon Sep 17 00:00:00 2001 From: Mike Gulick Date: Thu, 30 Nov 2017 18:35:48 -0500 Subject: [PATCH 1/2] PR preprocessor/83173: New