aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 2497c7f6d23..31ca8fe1eb2 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -3046,6 +3046,8 @@ location_of (tree t)
if (DECL_P (t))
return DECL_SOURCE_LOCATION (t);
+ if (TREE_CODE (t) == DEFAULT_ARG)
+ return defarg_location (t);
return EXPR_LOC_OR_LOC (t, input_location);
}