Mercurial > hg > CbC > CbC_gcc
comparison gcc/tree-diagnostic.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Language-independent diagnostic subroutines for the GNU Compiler | 1 /* Language-independent diagnostic subroutines for the GNU Compiler |
2 Collection that are only for use in the compilers proper and not | 2 Collection that are only for use in the compilers proper and not |
3 the driver or other programs. | 3 the driver or other programs. |
4 Copyright (C) 1999-2017 Free Software Foundation, Inc. | 4 Copyright (C) 1999-2018 Free Software Foundation, Inc. |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify it under | 8 GCC is free software; you can redistribute it and/or modify it under |
9 the terms of the GNU General Public License as published by the Free | 9 the terms of the GNU General Public License as published by the Free |
244 | 244 |
245 /* Default tree printer. Handles declarations only. */ | 245 /* Default tree printer. Handles declarations only. */ |
246 bool | 246 bool |
247 default_tree_printer (pretty_printer *pp, text_info *text, const char *spec, | 247 default_tree_printer (pretty_printer *pp, text_info *text, const char *spec, |
248 int precision, bool wide, bool set_locus, bool hash, | 248 int precision, bool wide, bool set_locus, bool hash, |
249 bool, const char **) | 249 bool *, const char **) |
250 { | 250 { |
251 tree t; | 251 tree t; |
252 | 252 |
253 /* FUTURE: %+x should set the locus. */ | 253 /* FUTURE: %+x should set the locus. */ |
254 if (precision != 0 || wide || hash) | 254 if (precision != 0 || wide || hash) |
280 percent_G_format (text); | 280 percent_G_format (text); |
281 return true; | 281 return true; |
282 | 282 |
283 case 'K': | 283 case 'K': |
284 t = va_arg (*text->args_ptr, tree); | 284 t = va_arg (*text->args_ptr, tree); |
285 percent_K_format (text, t); | 285 percent_K_format (text, EXPR_LOCATION (t), TREE_BLOCK (t)); |
286 return true; | 286 return true; |
287 | 287 |
288 default: | 288 default: |
289 return false; | 289 return false; |
290 } | 290 } |
291 | 291 |
292 if (set_locus) | 292 if (set_locus) |
293 text->set_location (0, DECL_SOURCE_LOCATION (t), true); | 293 text->set_location (0, DECL_SOURCE_LOCATION (t), SHOW_RANGE_WITH_CARET); |
294 | 294 |
295 if (DECL_P (t)) | 295 if (DECL_P (t)) |
296 { | 296 { |
297 const char *n = DECL_NAME (t) | 297 const char *n = DECL_NAME (t) |
298 ? identifier_to_locale (lang_hooks.decl_printable_name (t, 2)) | 298 ? identifier_to_locale (lang_hooks.decl_printable_name (t, 2)) |