]>
git.saurik.com Git - bison.git/blob - src/complain.h
1 /* Declaration for error-reporting function for Bison.
2 Copyright (C) 2000, 2001, 2002, 2006, 2009 Free Software Foundation,
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 # define COMPLAIN_H_ 1
21 # include "location.h"
27 /** Informative messages, but we proceed. */
29 void warn (char const *format
, ...)
30 __attribute__ ((__format__ (__printf__
, 1, 2)));
32 void warn_at (location loc
, char const *format
, ...)
33 __attribute__ ((__format__ (__printf__
, 2, 3)));
35 /** An error, but we continue and die later. */
37 void complain (char const *format
, ...)
38 __attribute__ ((__format__ (__printf__
, 1, 2)));
40 void complain_at (location loc
, char const *format
, ...)
41 __attribute__ ((__format__ (__printf__
, 2, 3)));
43 /** A fatal error, causing immediate exit. */
45 void fatal (char const *format
, ...)
46 __attribute__ ((__noreturn__
, __format__ (__printf__
, 1, 2)));
48 void fatal_at (location loc
, char const *format
, ...)
49 __attribute__ ((__noreturn__
, __format__ (__printf__
, 2, 3)));
51 /** Whether an error was reported. */
52 extern bool complaint_issued
;
58 #endif /* !COMPLAIN_H_ */