00001 /* Basic error reporting routines. 00002 Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 00003 Free Software Foundation, Inc. 00004 00005 This file is part of GCC. 00006 00007 GCC is free software; you can redistribute it and/or modify it under 00008 the terms of the GNU General Public License as published by the Free 00009 Software Foundation; either version 2, or (at your option) any later 00010 version. 00011 00012 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 00013 WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with GCC; see the file COPYING. If not, write to the Free 00019 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 00020 02110-1301, USA. */ 00021 00022 /* warning, error, and fatal. These definitions are suitable for use 00023 in the generator programs; eventually we would like to use them in 00024 cc1 too, but that's a longer term project. 00025 00026 N.B. We cannot presently use ATTRIBUTE_PRINTF with these functions, 00027 because they can be extended with additional format specifiers which 00028 GCC does not know about. */ 00029 00030 #ifndef GCC_ERRORS_H 00031 #define GCC_ERRORS_H 00032 00033 /* The first parameter is for compatibility with the non-generator 00034 version of warning(). For those, you'd pass an OPT_W* value from 00035 options.h, but in generator programs it has no effect, so it's OK 00036 to just pass zero for calls from generator-only files. */ 00037 extern void warning (int, const char *, ...) ATTRIBUTE_PRINTF_2; 00038 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1; 00039 extern void fatal (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1; 00040 extern void internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1; 00041 extern const char *trim_filename (const char *); 00042 00043 extern int have_error; 00044 extern const char *progname; 00045 00046 #endif /* ! GCC_ERRORS_H */
1.5.6