type: Make an assert()ion independent of the last entry of an enum.
[cparser] / builtins.h
1 /*
2  * This file is part of cparser.
3  * Copyright (C) 2012 Matthias Braun <matze@braunis.de>
4  */
5 #ifndef BUILTINS_H
6 #define BUILTINS_H
7
8 #include <stdbool.h>
9
10 typedef enum {
11         BUILTIN_NONE,
12         BUILTIN_ALLOCA,
13         BUILTIN_INF,
14         BUILTIN_NAN,
15         BUILTIN_EXPECT,
16         BUILTIN_VA_END,
17         BUILTIN_OBJECT_SIZE,
18         BUILTIN_ROTL,
19         BUILTIN_ROTR,
20         BUILTIN_LIBC,
21         BUILTIN_LIBC_CHECK,
22         BUILTIN_FIRM,
23 } builtin_kind_t;
24
25 /**
26  * Create predefined gnu builtins.
27  */
28 void create_gnu_builtins(void);
29
30 /**
31  * Create predefined MS intrinsics.
32  */
33 void create_microsoft_intrinsics(void);
34
35 /**
36  * Some functions like setjmp,longjmp are known from libc and need special
37  * attributes like noreturn or returns_twice.
38  * (Adding __attribute__(())s in the libc headers would be enough but apparently
39  *  this is not done in most cases since people rely on a list of hardcoded
40  *  names in gcc, so we have to duplicate this here)
41  */
42 void adapt_special_functions(function_t *function);
43
44 #endif