190075Sobrien/* Basic error reporting routines. 2169689Skan Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 3132718Skan Free Software Foundation, Inc. 490075Sobrien 590075SobrienThis file is part of GCC. 690075Sobrien 790075SobrienGCC is free software; you can redistribute it and/or modify it under 890075Sobrienthe terms of the GNU General Public License as published by the Free 990075SobrienSoftware Foundation; either version 2, or (at your option) any later 1090075Sobrienversion. 1190075Sobrien 1290075SobrienGCC is distributed in the hope that it will be useful, but WITHOUT ANY 1390075SobrienWARRANTY; without even the implied warranty of MERCHANTABILITY or 1490075SobrienFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1590075Sobrienfor more details. 1690075Sobrien 1790075SobrienYou should have received a copy of the GNU General Public License 1890075Sobrienalong with GCC; see the file COPYING. If not, write to the Free 19169689SkanSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 20169689Skan02110-1301, USA. */ 2190075Sobrien 2290075Sobrien/* warning, error, and fatal. These definitions are suitable for use 2390075Sobrien in the generator programs; eventually we would like to use them in 2490075Sobrien cc1 too, but that's a longer term project. 2590075Sobrien 2690075Sobrien N.B. We cannot presently use ATTRIBUTE_PRINTF with these functions, 2790075Sobrien because they can be extended with additional format specifiers which 2890075Sobrien GCC does not know about. */ 2990075Sobrien 3090075Sobrien#ifndef GCC_ERRORS_H 3190075Sobrien#define GCC_ERRORS_H 3290075Sobrien 33169689Skan/* The first parameter is for compatibility with the non-generator 34169689Skan version of warning(). For those, you'd pass an OPT_W* value from 35169689Skan options.h, but in generator programs it has no effect, so it's OK 36169689Skan to just pass zero for calls from generator-only files. */ 37169689Skanextern void warning (int, const char *, ...) ATTRIBUTE_PRINTF_2; 38169689Skanextern void error (const char *, ...) ATTRIBUTE_PRINTF_1; 39169689Skanextern void fatal (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1; 40169689Skanextern void internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1; 41132718Skanextern const char *trim_filename (const char *); 4290075Sobrien 4390075Sobrienextern int have_error; 4490075Sobrienextern const char *progname; 45117395Skan 4690075Sobrien#endif /* ! GCC_ERRORS_H */ 47