]> pd.if.org Git - lice/blob - lice.h
autocommit for files dated 2014-11-17 20:15:26
[lice] / lice.h
1 #ifndef LICE_HDR
2 #define LICE_HDR
3 #include "util.h"
4
5 #ifdef LICE_TARGET_AMD64
6 #   include "arch_amd64.h"
7 #else
8     /*
9      * Any additional future targets will just keep bracing with
10      * conditional inclusion here.
11      */
12 #   include "arch_dummy.h"
13 #endif
14
15 #ifdef __GNUC__
16 #   define NORETURN __attribute__((noreturn))
17 #else
18 #   define NORETURN
19 #endif
20
21 /*
22  * Function: compile_error
23  *  Write compiler error diagnostic to stderr, formatted
24  *
25  * Parameters:
26  *  fmt - Standard format specification string
27  *  ... - Additional variable arguments
28  *
29  * Remarks:
30  *  This function does not return, it kills execution via a call to
31  *  exit(1);
32  */
33 void NORETURN compile_error(const char *fmt, ...);
34
35 /*
36  * Function: compile_warn
37  *  Write compiler warning diagnostic to stderr, formatted
38  *
39  * Parameters:
40  *  fmt - Standard format specification string
41  *  ... - Additional variable arguments
42  */
43 void compile_warn(const char *fmt, ...);
44
45 /*
46  * Function: compile_ice
47  *  Write an internal compiler error diagnostic to stderr, formatted
48  *  and abort.
49  *
50  * Parameters:
51  *  fmt - Standard format specification string
52  *  ... - Additional variable arguments
53  *
54  * Remarks:
55  *  Thie function does not return, it aborts execution via a call to
56  *  abort()
57  */
58 void NORETURN compile_ice(const char *fmt, ...);
59
60 /* TODO: eliminate */
61 extern bool compile_warning;
62
63 #endif