we need _GNU_SOURCE for popen
[cparser] / type_t.h
index efc97b6..58703f4 100644 (file)
--- a/type_t.h
+++ b/type_t.h
@@ -27,8 +27,10 @@ typedef enum {
        TYPE_TYPEOF
 } type_type_t;
 
+/* note that the constant values represent the rank of the types as defined
+ * in ยง 6.3.1 */
 typedef enum {
-       ATOMIC_TYPE_INVALID,
+       ATOMIC_TYPE_INVALID = 0,
        ATOMIC_TYPE_VOID,
        ATOMIC_TYPE_CHAR,
        ATOMIC_TYPE_SCHAR,
@@ -61,7 +63,6 @@ typedef enum {
        TYPE_QUALIFIER_CONST    = 1 << 0,
        TYPE_QUALIFIER_RESTRICT = 1 << 1,
        TYPE_QUALIFIER_VOLATILE = 1 << 2,
-       TYPE_QUALIFIER_INLINE   = 1 << 3,
 } type_qualifier_t;
 
 struct type_t {
@@ -101,11 +102,11 @@ struct function_parameter_t {
 };
 
 struct function_type_t {
-       type_t               type;
-       type_t              *result_type;
+       type_t                type;
+       type_t               *result_type;
        function_parameter_t *parameters;
-       bool                 variadic;
-       bool                 unspecified_parameters;
+       bool                  variadic;
+       bool                  unspecified_parameters;
 };
 
 struct compound_type_t {