Index: gcc/tree-diagnostic.c
===================================================================
--- gcc/tree-diagnostic.c	(revision 186353)
+++ gcc/tree-diagnostic.c	(working copy)
@@ -90,27 +90,22 @@ DEF_VEC_ALLOC_O (loc_map_pair, heap);
     test.c:5:14: error: invalid operands to binary << (have 'double' and 'int')
     test.c:2:9: note: in expansion of macro 'OPERATE'
     test.c:5:3: note: expanded from here
     test.c:5:14: note: in expansion of macro 'SHIFTL'
     test.c:8:3: note: expanded from here
-    test.c:8:3: note: in expansion of macro 'MULT2'
+    test.c:8:3: note: in expansion of macro 'MULT'
     test.c:13:3: note: expanded from here
 
    The part that goes from the third to the eighth line of this
    diagnostic (the lines containing the 'note:' string) is called the
    unwound macro expansion trace.  That's the part generated by this
-   function.
-
-   If FIRST_EXP_POINT_MAP is non-null, *FIRST_EXP_POINT_MAP is set to
-   the map of the location in the source that first triggered the
-   macro expansion.  This must be an ordinary map.  */
+   function.  */
 
 static void
 maybe_unwind_expanded_macro_loc (diagnostic_context *context,
                                  diagnostic_info *diagnostic,
-                                 source_location where,
-                                 const struct line_map **first_exp_point_map)
+                                 source_location where)
 {
   const struct line_map *map;
   VEC(loc_map_pair,heap) *loc_vec = NULL;
   unsigned ix;
   loc_map_pair loc, *iter;
@@ -141,12 +136,12 @@ maybe_unwind_expanded_macro_loc (diagnos
          This is basically how we go "down" in the trace of macro
          expansions that led to WHERE.  */
       where = linemap_unwind_toward_expansion (line_table, where, &map);
     } while (linemap_macro_expansion_map_p (map));
 
-  if (first_exp_point_map)
-    *first_exp_point_map = map;
+  /* Now map is set to the map of the location in the source that
+     first triggered the macro expansion.  This must be an ordinary map.  */
 
   /* Walk LOC_VEC and print the macro expansion trace, unless the
      first macro which expansion triggered this trace was expanded
      inside a system header.  */
   if (!LINEMAP_SYSP (map))
@@ -222,8 +217,7 @@ maybe_unwind_expanded_macro_loc (diagnos
 void
 virt_loc_aware_diagnostic_finalizer (diagnostic_context *context,
 				     diagnostic_info *diagnostic)
 {
   maybe_unwind_expanded_macro_loc (context, diagnostic,
-				   diagnostic->location,
-				   NULL);
+				   diagnostic->location);
 }
Index: libcpp/line-map.c
===================================================================
--- libcpp/line-map.c	(revision 186353)
+++ libcpp/line-map.c	(working copy)
@@ -1013,35 +1013,38 @@ linemap_macro_loc_to_exp_point (struct l
    expansion of a macro, this is what happens.
 
    * If LRK is set to LRK_MACRO_EXPANSION_POINT
    -------------------------------
 
-   The virtual location is resolved to the location to the locus of
-   the expansion point of the macro.
+   The virtual location is resolved to the first macro expansion point
+   that led to this macro expansion.
 
    * If LRK is set to LRK_SPELLING_LOCATION
    -------------------------------------
 
-   The virtual location is resolved to the location to the locus where
-   the token has been spelled in the source. This can follow through
-   all the macro expansions that led to the token.
+   The virtual location is resolved to the locus where the token has
+   been spelled in the source.   This can follow through all the macro
+   expansions that led to the token.
 
-   * If LRK is set to LRK_MACRO_PARM_REPLACEMENT_POINT
+   * If LRK is set to LRK_MACRO_DEFINITION_LOCATION
    --------------------------------------
 
+   The virtual location is resolved to the locus of the token in the
+   context of the macro definition.
+
    If LOC is the locus of a token that is an argument of a
    function-like macro [replacing a parameter in the replacement list
    of the macro] the virtual location is resolved to the locus of the
    parameter that is replaced, in the context of the definition of the
    macro.
 
    If LOC is the locus of a token that is not an argument of a
    function-like macro, then the function behaves as if LRK was set to
    LRK_SPELLING_LOCATION.
 
-   If MAP is non-NULL, *MAP is set to the map of the resolved
-   location.  Note that if the resturned location wasn't originally
+   If LOC_MAP is not NULL, *LOC_MAP is set to the map encoding the
+   returned location.  Note that if the returned location wasn't originally
    encoded by a map, the *MAP is set to NULL.  This can happen if LOC
    resolves to a location reserved for the client code, like
    UNKNOWN_LOCATION or BUILTINS_LOCATION in GCC.  */
 
 source_location
Index: libcpp/include/line-map.h
===================================================================
--- libcpp/include/line-map.h	(revision 186353)
+++ libcpp/include/line-map.h	(working copy)
@@ -649,11 +649,11 @@ enum location_resolution_kind
    If LOC is the locus of a token that is not an argument of a
    function-like macro, then the function behaves as if LRK was set to
    LRK_SPELLING_LOCATION.
 
    If LOC_MAP is not NULL, *LOC_MAP is set to the map encoding the
-   returned location.  Note that if the resturned location wasn't originally
+   returned location.  Note that if the returned location wasn't originally
    encoded by a map, the *MAP is set to NULL.  This can happen if LOC
    resolves to a location reserved for the client code, like
    UNKNOWN_LOCATION or BUILTINS_LOCATION in GCC.  */
 
 source_location linemap_resolve_location (struct line_maps *,
