diff options
author | Marek Polacek <polacek@redhat.com> | 2019-12-20 23:25:44 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2019-12-20 23:25:44 +0000 |
commit | 97ba5b86a3c7afba4e53b84d40e056328c5ba5e0 (patch) | |
tree | 964eaf4d8762968920cc5d3c6b4db538b25f48c9 /gcc/fortran/expr.c | |
parent | 7731b8e6f4bb44d2d1ec33072db65f2ccbf94121 (diff) | |
download | gcc-97ba5b86a3c7afba4e53b84d40e056328c5ba5e0.zip gcc-97ba5b86a3c7afba4e53b84d40e056328c5ba5e0.tar.gz gcc-97ba5b86a3c7afba4e53b84d40e056328c5ba5e0.tar.bz2 |
PR c++/92974 - bogus location for enum and non-enum in ?: warning.
build_min_non_dep wasn't setting any location so when we were emitting the
warning in the following test while instantiating a template, its location
was UNKNOWN_LOCATION. Rather than adding a location_t parameter, let's use
the location from the original expression.
* tree.c (build_min_non_dep): Use the location of NON_DEP when
building the expression.
* g++.dg/diagnostic/enum1.C: New test.
* g++.dg/gomp/loop-2.C: Adjust dg-error.
* g++.dg/gomp/for-21.C: Likewise.
From-SVN: r279685
Diffstat (limited to 'gcc/fortran/expr.c')
0 files changed, 0 insertions, 0 deletions