* gcc.target/powerpc/altivec-volatile.c: Adjust expected warning.
[official-gcc.git] / gcc / tree-diagnostic.c
blobb456a2a5fbf67330d53debf4791349dbf7a5dd7c
1 /* Language-independent diagnostic subroutines for the GNU Compiler
2 Collection that are only for use in the compilers proper and not
3 the driver or other programs.
4 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
5 2009, 2010 Free Software Foundation, Inc.
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
12 version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 #include "config.h"
24 #include "system.h"
25 #include "coretypes.h"
26 #include "tree.h"
27 #include "diagnostic.h"
28 #include "tree-diagnostic.h"
29 #include "langhooks.h"
30 #include "langhooks-def.h"
32 /* Prints out, if necessary, the name of the current function
33 that caused an error. Called from all error and warning functions. */
34 void
35 diagnostic_report_current_function (diagnostic_context *context,
36 diagnostic_info *diagnostic)
38 diagnostic_report_current_module (context);
39 lang_hooks.print_error_function (context, input_filename, diagnostic);
42 void
43 default_tree_diagnostic_starter (diagnostic_context *context,
44 diagnostic_info *diagnostic)
46 diagnostic_report_current_function (context, diagnostic);
47 pp_set_prefix (context->printer, diagnostic_build_prefix (context,
48 diagnostic));