This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, fortran, RFC] Add warning for missing location information
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 14 Nov 2016 14:35:07 +0100
- Subject: [Patch, fortran, RFC] Add warning for missing location information
- Authentication-results: sourceware.org; auth=none
Hello world,
the attached patch runs through gfortran's AST to check for missing
location information.
If something is found, a warning is issued. I chose not to issue an
error because missing location information does not make a program
invalid. The patch would cause testsuite regressions for changes
which cause missing location information, which is a good thing because
we want to catch missing locations as soon as they are (potentially)
introduced.
The checking is turned off if CHECKING_P is not defined, so it should
not slow down release compilers.
I used DK_NOTE here, but that is open to discussion. Maybe it would be
better to define another warning class for this?
Regression-tested "as is". I also tested that a note is actually
issued by temporarily re-introducing a bug that has been fixed in
the meantime.
What do you think? OK for trunk, or should something be done
differently?
Regards
Thomas