]> pd.if.org Git - lice/blob - opt.h
autocommit for files dated 2014-11-17 20:15:22
[lice] / opt.h
1 #ifndef LICE_OPT_HDR
2 #define LICE_OPT_HDR
3
4 #include <stdbool.h>
5
6 typedef enum {
7     STANDARD_LICEC, /* LICE variant (C11 with extensions) */
8     STANDARD_GNUC,  /* GNUC variant                       */
9     STANDARD_KANDR, /* K&R C                              */
10     STANDARD_C90,   /* C90 (ISO/IEC 9899:1990)            */
11     STANDARD_C99,   /* C99 (ISO/IEC 9899:1999)            */
12     STANDARD_C11    /* C11 (ISO/IEC 9889:2011)            */
13 } opt_std_t;
14
15 typedef enum {
16     EXTENSION_DOLLAR          = 1 << 1,  /* Dollar signs in Identifier Names                  */
17     EXTENSION_TYPEOF          = 1 << 2,  /* Referring to a Type with typeof                   */
18     EXTENSION_OMITOPCOND      = 1 << 3,  /* Conditionals with Omitted Operands                */
19     EXTENSION_STATEMENTEXPRS  = 1 << 4,  /* Statements and Declarations in Expressions        */
20     EXTENSION_NOMEMBERSTRUCT  = 1 << 5,  /* Structures with No Members                        */
21     EXTENSION_NONCONSTINIT    = 1 << 6,  /* Non-Constant Initializers                         */
22     EXTENSION_CASERANGES      = 1 << 7,  /* Case Ranges                                       */
23     EXTENSION_ESCCHAR         = 1 << 8,  /* The Character <ESC> in Constants                  */
24     EXTENSION_INCOMPLETEENUM  = 1 << 9,  /* Incomplete enum Types                             */
25     EXTENSION_BINARYCONSTANTS = 1 << 10, /* Binary constants using the '0b' prefix            */
26     EXTENSION_ARITHMETICVOID  = 1 << 11, /* Arithmetic on void- and Function-Pointers         */
27     EXTENSION_LABELASVALUES   = 1 << 12, /* Labels as Values                                  */
28     EXTENSION_ZEROARRAYS      = 1 << 13, /* Arrays of Length Zero                             */
29
30     /* always the last in the list */
31     EXTENSION_NONSTANDARD     = 1 << 14
32 } opt_extension_t;
33
34 bool opt_std_test(opt_std_t std);
35 bool opt_extension_test(opt_extension_t ext);
36 void opt_std_set(opt_std_t std);
37 void opt_extension_set(opt_extension_t ext);
38
39 #endif