+2008-07-11 Dodji Seketeli <dseketel@redhat.com>
+
+ PR c++/13101
+ * decl.c (grokdeclarator): Warn about initializing variables
+ of storage class 'extern' only after the type of the declarator
+ has been properly computed.
+
2008-07-11 Dodji Seketeli <dseketel@redhat.com>
PR c++/31754
cp_parser_type_specifier, cp_parser_simple_type_specifier,
cp_parser_omp_for_loop, cp_parser_pragma): use location in error messages.
-2008-06-30 Dodji Seketeli <dseketel@redhat.com>
+
+2008-07-11 Dodji Seketeli <dseketel@redhat.com>
PR c++/31754
* pt.c, semantic.c:
* pt.c: (tsubst_copy_and_build): Adjust.
(unify): Handle { }.
* name-lookup.c (arg_assoc_type): Handle init_list_type_node.
-
+
2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
* typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
storage_class = sc_none;
}
}
- else if (storage_class == sc_extern && initialized
- && !funcdef_flag)
- {
- if (toplevel_bindings_p ())
- {
- /* It's common practice (and completely valid) to have a const
- be initialized and declared extern. */
- if (!(type_quals & TYPE_QUAL_CONST))
- warning (0, "%qs initialized and declared %<extern%>", name);
- }
- else
- error ("%qs has both %<extern%> and initializer", name);
- }
else if (storage_class == sc_extern && funcdef_flag
&& ! toplevel_bindings_p ())
error ("nested function %qs declared %<extern%>", name);
}
}
+ if (storage_class == sc_extern && initialized && !funcdef_flag)
+ {
+ if (toplevel_bindings_p ())
+ {
+ /* It's common practice (and completely valid) to have a const
+ be initialized and declared extern. */
+ if (!(type_quals & TYPE_QUAL_CONST))
+ warning (0, "%qs initialized and declared %<extern%>", name);
+ }
+ else
+ error ("%qs has both %<extern%> and initializer", name);
+ }
+
/* Record `register' declaration for warnings on &
and in case doing stupid register allocation. */
+2008-07-11 Dodji Seketeli <dseketel@redhat.com>
+
+ PR c++/13101
+ * g++.dg/parse/func-ptr-decl.C: New test.
+ * gcc/testsuite/g++.old-deja/g++.jason/crash11.C: Update this to
+ catch a warning that is generated by virtue of fixing this bug.
+
2008-07-11 Dodji Seketeli <dseketel@redhat.com>
* g++.dg/other/semicolon.C: Tighten this test, making it column aware.