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.