aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2003-08-02 15:33:22 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:00:59 -0700
commit7da90b157ff1d292de6fb5361f60fb80752ce466 (patch)
tree19ddf490285621f41a1a4a968a5f8effe64a27bf /expression.h
parentFix degenerate types for array/fn expressions. We used to (diff)
downloadsparse-7da90b157ff1d292de6fb5361f60fb80752ce466.tar.gz
sparse-7da90b157ff1d292de6fb5361f60fb80752ce466.tar.bz2
sparse-7da90b157ff1d292de6fb5361f60fb80752ce466.zip
Cast evaluation is special: we want to simplify the cast early
in order to see NULL pointer expressions immediately. We want NULL pointers to be visible as such at type check time, long before we do the full expansion/simplification phase. A NULL pointer is a weaker type than a normal (void *), since it has no context or address space associated with it, for example.
Diffstat (limited to 'expression.h')
-rw-r--r--expression.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/expression.h b/expression.h
index a9245ca..b2fc482 100644
--- a/expression.h
+++ b/expression.h
@@ -153,4 +153,8 @@ struct token *compound_statement(struct token *, struct statement *);
/* The preprocessor calls this 'constant_expression()' */
#define constant_expression(token,tree) conditional_expression(token, tree)
+/* Cast folding of constant values.. */
+void cast_value(struct expression *expr, struct symbol *newtype,
+ struct expression *old, struct symbol *oldtype);
+
#endif