errors.h revision 169689
1139823Simp/* Basic error reporting routines.
221259Swollman   Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
321259Swollman   Free Software Foundation, Inc.
421259Swollman
521259SwollmanThis file is part of GCC.
621259Swollman
721259SwollmanGCC is free software; you can redistribute it and/or modify it under
821259Swollmanthe terms of the GNU General Public License as published by the Free
921259SwollmanSoftware Foundation; either version 2, or (at your option) any later
1021259Swollmanversion.
1121259Swollman
1221259SwollmanGCC is distributed in the hope that it will be useful, but WITHOUT ANY
1321259SwollmanWARRANTY; without even the implied warranty of MERCHANTABILITY or
1421259SwollmanFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1521259Swollmanfor more details.
1621259Swollman
1721259SwollmanYou should have received a copy of the GNU General Public License
1821259Swollmanalong with GCC; see the file COPYING.  If not, write to the Free
1921259SwollmanSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
2021259Swollman02110-1301, USA.  */
2121259Swollman
2221259Swollman/* warning, error, and fatal.  These definitions are suitable for use
2321259Swollman   in the generator programs; eventually we would like to use them in
2421259Swollman   cc1 too, but that's a longer term project.
2521259Swollman
2621259Swollman   N.B. We cannot presently use ATTRIBUTE_PRINTF with these functions,
2721259Swollman   because they can be extended with additional format specifiers which
2821259Swollman   GCC does not know about.  */
2921259Swollman
3050477Speter#ifndef GCC_ERRORS_H
3121259Swollman#define GCC_ERRORS_H
3221259Swollman
3321259Swollman/* The first parameter is for compatibility with the non-generator
3421259Swollman   version of warning().  For those, you'd pass an OPT_W* value from
3521259Swollman   options.h, but in generator programs it has no effect, so it's OK
3621259Swollman   to just pass zero for calls from generator-only files.  */
3721259Swollmanextern void warning (int, const char *, ...) ATTRIBUTE_PRINTF_2;
3821259Swollmanextern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
3921259Swollmanextern void fatal (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1;
4021259Swollmanextern void internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1;
4121259Swollmanextern const char *trim_filename (const char *);
4221259Swollman
4321259Swollmanextern int have_error;
4421259Swollmanextern const char *progname;
4521259Swollman
4621259Swollman#endif /* ! GCC_ERRORS_H */
4721259Swollman