Hello,

as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79106 is still open from what I 
can tell, I wanted to gently bump this patch I provided a while back. It was 
earmarked for gcc-11 in 
https://gcc.gnu.org/pipermail/gcc-patches/2020-January/539201.html but did not 
make it into the release.

Original submission: 
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-12/msg01113.html

Please let me know if something is missing.

Best
Lucas

-----Original Message-----
From: Bader, Lucas 
Sent: Montag, 16. Dezember 2019 12:19
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] get source line for diagnostic from preprocessed file / PR 
preprocessor/79106

Hello,

within a compile cluster, only the preprocessed output of GCC is transferred to 
remote nodes for compilation. 
When GCC produces advanced diagnostics (with -fdiagnostics-show-caret), e.g. 
prints out the affected source
line and fixit hints, it attempts to read the source file again, even when 
compiling a preprocessed file (-fpreprocessed). 
This leads to wrong diagnostics when building with a compile cluster, or, more 
generally, when changing or deleting the original source file.

This patch attempts to alter the behavior by implementing a 
location_get_source_line_preprocessed 
function that can be used in diagnostic-show-locus.c in case a preprocessed 
file is compiled.
There was some previous discussion on this behavior on PR preprocessor/79106.

This is my first patch to GCC, so in case something is wrong with the format, 
please let me know.

Best regards
Lucas

Reply via email to