changeset 458:983341326428

Patch from Andrew Johnson to fix global compound literals.
author Rob Landley <rob@landley.net>
date Sat, 18 Aug 2007 01:02:45 -0500
parents b28f6437f95d
children 4c3895074170
files tcc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tcc.c	Sat Aug 18 00:13:48 2007 -0500
+++ b/tcc.c	Sat Aug 18 01:02:45 2007 -0500
@@ -6482,7 +6482,7 @@
            there and in function calls. */
         /* arrays can also be used although they are not lvalues */
         if ((vtop->type.t & VT_BTYPE) != VT_FUNC &&
-            !(vtop->type.t & VT_ARRAY))
+            !(vtop->type.t & VT_ARRAY) && !(vtop->type.t & VT_LLOCAL))
             test_lvalue();
         mk_pointer(&vtop->type);
         gaddrof();