2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/23959
* decl.c (pop_switch): Only call c_do_switch_warnings
when not processing templates.
2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/23959
* g++.dg/warn/Wswitch-default-1.C: New test.
* g++.dg/warn/Wswitch-default-2.C: New test.
From-SVN: r105466
PR c++/22137
* cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
(check_template_keyword): New function.
(finish_id_expression): Change prototoype.
(finish_qualified_id_expr): Change prototype.
(build_qualified_name): New function.
(finish_class_member_access_expr): Change prototype.
* init.c (build_offset_ref): Use build_qualified_name.
* mangle.c (write_expression): Likewise.
* parser.c (cp_parser_primary_expression): Remove qualifying_class
parameter. Add address_p and template_arg_p. Use
build_qualified_name.
(cp_parser_id_expression): Default *template_p to
template_keyword_p. Check for invalid uses of the template
keyword.
(cp_parser_postfix_expression): Eliminate special handling for
qualified names. Adjust call to cp_parser_primary_expression.
(cp_parser_postfix_dot_deref_expression): Adjust call to
cp_parser_id_expression and finish_class_member_access_expr.
(cp_parser_template_argument_list): Add comment.
(cp_parser_template_argument): Adjust use of
cp_parser_primary_expression. Remove call to
finish_qualified_id_expr.
(cp_parser_lookup_name): Use build_qualified_name.
* pt.c (tsubst): Use build_qualified_name.
(tsubst_qualified_id): Likewise. Adjust call to
finish_qualified_id_expr.
(tsubst_copy): Use build_qualified_name.
(tsubst_copy_and_build): Adjusts call to finish_id_expression and
finish_class_member_access_expr.
* semantics.c (finish_non_static_data_member): Use
build_qualified_name.
(finish_qualified_id_expr): Add template_p and template_arg_p
parameters.
(finish_id_expression): Remove qualifiying_class parameter. Add
template_p, done, address_p, and template_arg_p. Use
build_qualified_name. Adjust calls to
finish_class_member_acess_expr.
* tree.c (build_qualified_name): New function.
* typeck.c (check_template_keyword): New function.
(finish_class_member_access_expr): Add template_p argument. Check
for invalid uses of the template keyword.
PR c++/22137
* g++.dg/parse/template18.C: New test.
* g++.dg/template/nontype15.C: Likewise.
From-SVN: r105463
* gimplify.c (gimplify_var_or_parm_decl): Split out from ...
(gimplify_expr): ... here.
(gimplify_compound_lval): Use it in initial scan loop. Allow
fb_lvalue in base expression.
From-SVN: r105458
PR 23141
PR 23142
* tree-vrp.c (vrp_meet): Fix the intersection of equivalence
sets VR0->EQUIV and VR1->EQUIV when meeting a range and an
anti-range.
(vrp_visit_phi_node): Only prevent infinite iterations when
the previous result and the new result are both VR_RANGEs.
From-SVN: r105436
* config/fpu-387.h (set_fpu): Remove extra ":" in stmxcsr.
Change cw and cw_sse variables to unsigned.
(SSE): New definition.
(has_sse): Use it.
From-SVN: r105402
cp:
PR c++/23984
* class.c (build_base_path): The vtable is always the first thing
in the vtt.
testsuite:
PR c++/23984
* g++.dg/init/ctor7.C: New.
From-SVN: r105396
2005-10-13 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/21304
* tree-dfa.c (add_referenced_var): Only look at decls which
have TREE_CONSTANT or TREE_READONLY set instead of if
!TREE_PUBLIC or !TREE_CONSTANT.
From-SVN: r105390
PR c++/20721
* cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
* decl.c (duplicate_decls): Merge it into new declarations.
(decl_jump_unsafe): Use it, rather than DECL_INITIAL.
(cp_finish_decl): Set it, when appropriate.
PR c++/20721
* g++.dg/init/goto2.C: New test.
From-SVN: r105380
2005-10-13 Thomas Koenig <Thomas.Koenig@online.de>
* io/unix.c(fd_alloc_r_at): Use read() instead of do_read()
only in case of special files (e.g. terminals).
From-SVN: r105373
PR c++/22464
* semantics.c (finish_id_expression): Issue errors about uses of
local variables in containing functions even in templates.
PR c++/22180
* call.c (build_new_method_call): Correct pretty-printing of
destructor names.
* pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
identifier.
PR c++/23694
* decl.c (start_method): Return error_mark_node for errors.
PR c++/23307
* pt.c (push_template_decl_real): Complain about attempts to
declare template variables.
PR c++/22352
* pt.c (tsubst_template_parms): Set processing_template_decl while
processing the parameters.
(tsubst_decl): Set processing_template_decl when substituting into
a TEMPLATE_DECL.
PR c++/22405
* pt.c (most_specialized_instantiation): Robustify.
PR c++/22464
* g++.dg/template/crash/41.C: New test.
PR c++/22180
* g++.dg/template/crash40.C: New test.
PR c++/23694
* g++.dg/parse/friend5.C: New test.
PR c++/23307
* g++.dg/template/crash38.C: New test.
PR c++/22352
* g++.dg/template/friend38.C: New test.
PR c++/22405
* g++.dg/template/crash39.C: New test.
From-SVN: r105365