typedef struct switch_statement_t switch_statement_t;
typedef struct declaration_statement_t declaration_statement_t;
typedef struct expression_statement_t expression_statement_t;
+typedef struct computed_goto_statement_t computed_goto_statement_t;
typedef struct goto_statement_t goto_statement_t;
typedef struct label_statement_t label_statement_t;
typedef struct case_label_statement_t case_label_statement_t;
} expression_classification_t;
/**
- * Returns true if a given expression is a compile time
- * constant. ยง6.6
- *
- * @param expression the expression to check
+ * Returns true when an initializer contains only constants/linker_constant
+ * values.
*/
expression_classification_t is_constant_initializer(const initializer_t *initializer);
/**
* Checks if an expression is a constant/known value to the linker. Examples:
- * - all constant expression casted to a pointer type
+ * - all constant/linker constant expression casted to a pointer type
* - "&x", with x being a global variable.
* - "array" or "a.array" in case array is an array and array and a,
* respectively is an object with link time constant address
long fold_constant_to_int(const expression_t *expression);
bool fold_constant_to_bool(const expression_t *expression);
+bool constant_is_negative(const expression_t *constant);
/**
* the type of a literal is usually the biggest type that can hold the value.