https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97175
--- Comment #5 from David Binderman <dcb314 at hotmail dot com> --- >From the text in the proposed patch: >Using DECL_SOURCE_LOCATION() with a tree node that's not a DECL >isn't a good idea, and neither is using EXPR_LOCATION() with >a node that is a DECL. Both trigger an ICE when presented with >a node they don't expect. How much work would it be to move this test from run time to compile time ? So if DECL_SOURCE_LOCATION was given a non-DECL node or EXPR_LOCATION is given a DECL, then gcc refuses to compile. Flushing out all the bugs where these macros are misused sounds like a step in the right direction to me.