parser: Parse and reject GCC range initializers "[0 ... 9]".
[cparser] / ast_t.h
diff --git a/ast_t.h b/ast_t.h
index 5764883..e0371e7 100644 (file)
--- a/ast_t.h
+++ b/ast_t.h
@@ -106,7 +106,9 @@ typedef enum expression_kind_t {
        EXPR_UNARY_DELETE,
        EXPR_UNARY_DELETE_ARRAY,
        EXPR_UNARY_THROW,
-       EXPR_UNARY_LAST = EXPR_UNARY_THROW,
+       EXPR_UNARY_REAL,
+       EXPR_UNARY_IMAG,
+       EXPR_UNARY_LAST = EXPR_UNARY_IMAG,
 
        EXPR_BINARY_FIRST,
        EXPR_BINARY_ADD = EXPR_BINARY_FIRST,
@@ -212,7 +214,9 @@ typedef enum funcname_kind_t {
        case EXPR_UNARY_CAST:              \
        case EXPR_UNARY_ASSUME:            \
        case EXPR_UNARY_DELETE:            \
-       case EXPR_UNARY_DELETE_ARRAY
+       case EXPR_UNARY_DELETE_ARRAY:      \
+       case EXPR_UNARY_IMAG:              \
+       case EXPR_UNARY_REAL
 
 /**
  * unary expression with optional operand
@@ -344,6 +348,7 @@ struct designator_t {
        position_t    pos;
        symbol_t     *symbol;      /**< the symbol if any */
        expression_t *array_index; /**< the array index if any */
+       expression_t *range_last;  /**< last index of a range initializer, if any */
        designator_t *next;
 };