errors.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Basic error reporting routines.
  2. Copyright (C) 1999-2015 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. /* warning, error, and fatal. These definitions are suitable for use
  16. in the generator programs; eventually we would like to use them in
  17. cc1 too, but that's a longer term project.
  18. N.B. We cannot presently use ATTRIBUTE_PRINTF with these functions,
  19. because they can be extended with additional format specifiers which
  20. GCC does not know about. */
  21. #ifndef GCC_ERRORS_H
  22. #define GCC_ERRORS_H
  23. extern void warning (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_COLD;
  24. extern void error (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_COLD;
  25. extern void fatal (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1 ATTRIBUTE_COLD;
  26. extern void internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1 ATTRIBUTE_COLD;
  27. extern const char *trim_filename (const char *);
  28. extern int have_error;
  29. extern const char *progname;
  30. #endif /* ! GCC_ERRORS_H */