From: Dazhi Z. <zd...@gm...> - 2011-02-05 23:59:13
|
Hi, Suppose there is a statement static int a; In the vglob function, e.g., method vglob g = match g with GVarDecl(v, l) -> begin DoChildren end |GVar(v,init,loc) -> DoChildren | GFun(f, l) -> DoChildren | GType(t,l) -> DoChildren | GCompTag(c, l) -> DoChildren | _ -> the declaration of "static int a; " is not matched by any case. It can be caught if there is not "static" ahead. So why is this? -Dz |
From: Christoph S. <cs...@fr...> - 2011-02-06 11:30:48
|
On Sat, Feb 05, 2011 at 06:59:06PM -0500, Dazhi Zhang wrote: > the declaration of "static int a; " is not matched by any case. It can be > caught if there is not "static" ahead. I cannot confirm your finding. My Cil matches static int n; in the Cil.GVar (variable, initialization, location) branch of "method vglob" as I expect it, because it is a variable definition (not a declaration). /Chris |