2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/34600
* decl.c (grokdeclarator): In case of extern and initializer, return
error_mark_node after the error.
/testsuite
2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/34600
* g++.dg/parse/crash43.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139099
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/34600
+ * decl.c (grokdeclarator): In case of extern and initializer, return
+ error_mark_node after the error.
+
2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 30551
warning (0, "%qs initialized and declared %<extern%>", name);
}
else
- error ("%qs has both %<extern%> and initializer", name);
+ {
+ error ("%qs has both %<extern%> and initializer", name);
+ return error_mark_node;
+ }
}
/* Record `register' declaration for warnings on &
+2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/34600
+ * g++.dg/parse/crash43.C: New.
+
2008-08-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/28152
--- /dev/null
+// PR c++/34600
+
+namespace N
+{
+ void foo()
+ {
+ extern int i = 0; // { dg-error "error: 'i' has both 'extern' and initializer" }
+ }
+}