This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43064] improve location and text of diagnostics in constructor initializer lists
- From: "lopezibanez at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Feb 2018 19:45:35 +0000
- Subject: [Bug c++/43064] improve location and text of diagnostics in constructor initializer lists
- Auto-submitted: auto-generated
- References: <bug-43064-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43064
--- Comment #6 from Manuel López-Ibáñez <lopezibanez at gmail dot com> ---
If I remember correctly, the problem here is constants and other
non-expression nodes don't have a location, so diagnostics use
input_location, which points to the end of the initializer. Something like
X+1 should work.
If so, David started fixing this problem, but this code may need fixes
similar to these: https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00660.html
Otherwise, the problem is more insidious, and the nodes are probably built
with the wrong location.