+2004-03-18 Mark Mitchell <mark@codesourcery.com>
+
+ * c-decl.c (grokdeclarator): Do not complain about redeclaring
+ visible "static" identifiers "extern" in a local scope.
+ * dwarf2out.c (loc_descriptor_from_tree): Handle pre- and
+ post-increments/decrements.
+
2004-03-18 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (current_function_arg_words): Delete.
/* It is invalid to create an `extern' declaration for a
variable if there is a global declaration that is
- `static'. */
+ `static' and the global declaration is not visible. */
if (extern_ref && current_scope != global_scope)
{
tree global_decl;
global_decl = identifier_global_value (declarator);
if (global_decl
&& TREE_CODE (global_decl) == VAR_DECL
+ && lookup_name (declarator) != global_decl
&& !TREE_PUBLIC (global_decl))
error ("variable previously declared `static' redeclared "
"`extern'");
case CALL_EXPR:
return 0;
+ case PREINCREMENT_EXPR:
+ case PREDECREMENT_EXPR:
+ case POSTINCREMENT_EXPR:
+ case POSTDECREMENT_EXPR:
+ /* There are no opcodes for these operations. */
+ return 0;
+
case ADDR_EXPR:
/* We can support this only if we can look through conversions and
find an INDIRECT_EXPR. */
+2004-03-18 Mark Mitchell <mark@codesourcery.com>
+
+ * gcc.dg/local1.c: New test.
+
+ * gcc.dg/debug/dwarf2/c99-typedef1.c: New test.
+
2004-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/torture/builtin-convert-1.c: New test.
--- /dev/null
+// { dg-options "-std=iso9899:1999 -gdwarf-2" }
+
+void f() {
+ int n = 3;
+ typedef int T[n++];
+
+ T t;
+ t[0] = 7;
+}
--- /dev/null
+static int i;
+
+extern int i;
+
+static void f() {
+ extern int i;
+}