diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-05-04 00:31:55 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-05-04 00:31:55 +0000 |
commit | 244541410209602edc266168fdb1adba099eee88 (patch) | |
tree | 8275d8ff37b3da3474071310070829e8593a0098 /gcc | |
parent | 07c49ed5a6fc1b48281492c19e6658bd0ffe25b6 (diff) | |
download | gcc-244541410209602edc266168fdb1adba099eee88.zip gcc-244541410209602edc266168fdb1adba099eee88.tar.gz gcc-244541410209602edc266168fdb1adba099eee88.tar.bz2 |
re PR c++/24985 (caret diagnostics)
2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/24985
gcc/
* tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Show caret
for macro expansion.
From-SVN: r187134
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-diagnostic.c | 18 |
2 files changed, 15 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8bd4101..635e914 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org> + + PR c++/24985 + * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Show caret + for macro expansion. + 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org> * flags.h (flag_permissive): Do not declare. diff --git a/gcc/tree-diagnostic.c b/gcc/tree-diagnostic.c index 0a55925f..cbdbb77 100644 --- a/gcc/tree-diagnostic.c +++ b/gcc/tree-diagnostic.c @@ -187,30 +187,30 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context, LRK_MACRO_DEFINITION_LOCATION, NULL); saved_kind = diagnostic->kind; - saved_prefix = context->printer->prefix; + saved_prefix = pp_get_prefix (context->printer); saved_location = diagnostic->location; diagnostic->kind = DK_NOTE; diagnostic->location = resolved_def_loc; - pp_base_set_prefix (context->printer, - diagnostic_build_prefix (context, - diagnostic)); + pp_set_prefix (context->printer, + diagnostic_build_prefix (context, diagnostic)); pp_newline (context->printer); pp_printf (context->printer, "in expansion of macro '%s'", linemap_map_get_macro_name (iter->map)); pp_destroy_prefix (context->printer); + diagnostic_show_locus (context, diagnostic); diagnostic->location = resolved_exp_loc; - pp_base_set_prefix (context->printer, - diagnostic_build_prefix (context, - diagnostic)); + pp_set_prefix (context->printer, + diagnostic_build_prefix (context, diagnostic)); pp_newline (context->printer); - pp_printf (context->printer, "expanded from here"); + pp_string (context->printer, "expanded from here"); pp_destroy_prefix (context->printer); + diagnostic_show_locus (context, diagnostic); diagnostic->kind = saved_kind; diagnostic->location = saved_location; - context->printer->prefix = saved_prefix; + pp_set_prefix (context->printer, saved_prefix); } VEC_free (loc_map_pair, heap, loc_vec); |