1219820Sjeff/* Basic error reporting routines. 2219820Sjeff Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 3219820Sjeff Free Software Foundation, Inc. 4219820Sjeff 5219820SjeffThis file is part of GCC. 6219820Sjeff 7219820SjeffGCC is free software; you can redistribute it and/or modify it under 8219820Sjeffthe terms of the GNU General Public License as published by the Free 9219820SjeffSoftware Foundation; either version 2, or (at your option) any later 10219820Sjeffversion. 11219820Sjeff 12219820SjeffGCC is distributed in the hope that it will be useful, but WITHOUT ANY 13219820SjeffWARRANTY; without even the implied warranty of MERCHANTABILITY or 14219820SjeffFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15219820Sjefffor more details. 16219820Sjeff 17219820SjeffYou should have received a copy of the GNU General Public License 18219820Sjeffalong with GCC; see the file COPYING. If not, write to the Free 19219820SjeffSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 20219820Sjeff02110-1301, USA. */ 21219820Sjeff 22219820Sjeff/* warning, error, and fatal. These definitions are suitable for use 23219820Sjeff in the generator programs; eventually we would like to use them in 24219820Sjeff cc1 too, but that's a longer term project. 25219820Sjeff 26219820Sjeff N.B. We cannot presently use ATTRIBUTE_PRINTF with these functions, 27219820Sjeff because they can be extended with additional format specifiers which 28219820Sjeff GCC does not know about. */ 29219820Sjeff 30219820Sjeff#ifndef GCC_ERRORS_H 31219820Sjeff#define GCC_ERRORS_H 32219820Sjeff 33219820Sjeff/* The first parameter is for compatibility with the non-generator 34219820Sjeff version of warning(). For those, you'd pass an OPT_W* value from 35219820Sjeff options.h, but in generator programs it has no effect, so it's OK 36219820Sjeff to just pass zero for calls from generator-only files. */ 37219820Sjeffextern void warning (int, const char *, ...) ATTRIBUTE_PRINTF_2; 38219820Sjeffextern void error (const char *, ...) ATTRIBUTE_PRINTF_1; 39219820Sjeffextern void fatal (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1; 40219820Sjeffextern void internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1; 41219820Sjeffextern const char *trim_filename (const char *); 42219820Sjeff 43219820Sjeffextern int have_error; 44219820Sjeffextern const char *progname; 45219820Sjeff 46219820Sjeff#endif /* ! GCC_ERRORS_H */ 47219820Sjeff