1 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4 * typeck.c (build_binary_op): Call overflow_warning if
5 TREE_OVERFLOW_P is true for the result and not for any of the
8 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
11 * class.c (add_method): Don't wait until template
12 instantiation time to complain about duplicate methods.
14 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
17 * semantics.c (finish_unary_op_expr): Warn only if result
18 overflowed and operands did not.
20 2007-01-05 Ian Lance Taylor <iant@google.com>
22 * typeck.c (build_binary_op): Warn about comparing a non-weak
25 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
27 * pt.c (tsubst): Propagate the need for structural equality checks
28 when reducing the level of template parameters.
30 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
32 * pt.c: Fix a comment typo.
34 2006-01-02 Ian Lance Taylor <iant@google.com>
36 * semantics.c (maybe_convert_cond): Optionally warn when using an
37 assignment as a condition.
38 * typeck.c (convert_for_assignment): Optionally warn about
39 assigning the result of an assignment to a bool.
41 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
43 * pt.c (canonical_template_parms): Correct typo in comment.
45 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
47 * typeck.c (structural_comptypes): Renamed from "comptypes".
48 (comptypes): Use canonical type information to perform fast type
49 comparison. When VERIFY_CANONICAL_TYPES, verify that the
50 canonical type comparison returns the same results as we would see
51 from the current, structural check. Support COMPARE_STRUCTURAL
52 when we need structural checks.
53 * decl.c (typename_compare): Fix comment.
54 (build_typename_type): TYPENAME_TYPE nodes require structural
55 equality checks, because they resolve different based on the
57 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
58 require structural equality checks (for now).
59 (build_ptrmemfunc_type): Build the canonical pointer to member
61 (compute_array_index_type): Whenever we build a new index type
62 to represent the size of an array in a template, we need to mark
63 this index type as requiring structural equality. This goes for
64 arrays with value-dependent sizes with the current ABI, or all
66 * tree.c (cplus_array_hash): New.
67 (struct cplus_array_info): New.
68 (cplus_array_compare): New.
69 (cplus_array_htab): New.
70 (build_cplus_array_type_1): Use a hash table to cache the array
71 types we build. Build the canonical array type for each array
73 (cp_build_qualified_type_real): When building a cv-qualified array
74 type, use the hash table of array types and build canonical array
76 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
77 use structural equality (for now).
78 * cp-tree.h (COMPARE_STRUCTURAL): New.
79 * pt.c (canonical_template_parms): New.
80 (canonical_type_parameter): New.
81 (process_template_parm): Find the canonical type parameter.
82 (lookup_template_class): When we have named the primary template
83 type, set the canonical type for our template class to the primary
84 template type. If any of the template arguments need structural
85 equality checks, the template class needs structural equality
87 (tsubst): When reducing the level of a template template
88 parameter, we require structural equality tests for the resulting
89 parameter because its template parameters have not had their types
90 canonicalized. When reducing a template type parameter, find the
91 canonical reduced type parameter.
92 (any_template_arguments_need_structural_equality_p): New.
94 2006-12-31 Simon Martin <simartin@users.sourceforge.net>
97 * parser.c (cp_parser_primary_expression): Return error_mark_node when
98 a statement-expression is found outside of a function body.
100 2006-12-28 Kazu Hirata <kazu@codesourcery.com>
102 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P, TYPE_FUNCTION_SCOPE_P):
105 * decl2.c: Fix a comment typo.
107 2006-12-21 Andrew Pinski <pinskia@gmail.com>
110 * decl.c (cxx_builtin_function): Only copy the decl if adding
111 it to the std namespace.
113 2006-12-21 Andrew Pinski <pinskia@gmail.com>
116 * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
118 2006-12-22 Kazu Hirata <kazu@codesourcery.com>
120 * decl.c: Fix a coment typo.
122 2006-12-18 Ian Lance Taylor <iant@google.com>
124 * decl.c (start_preparsed_function): Add support for
125 -Wmissing-declarations.
127 2006-12-16 Simon Martin <simartin@users.sourceforge.net>
130 * cp-tree.h (struct deferred_access_check): New structure to represent a
131 deferred access check. It replaces the previous representation as a tree.
132 (get_deferred_access_checks): Return a vector of struct
133 deferred_access_check instead of a tree list.
134 (perform_access_checks): Take a vector of struct deferred_access_check
135 instead of a tree list.
136 * semantics.c (struct deferred_access): Store the deferred access checks
137 as a vector of struct deferred_access_check instead of a tree list.
138 (push_deferring_access_checks): Handle the change in struct
140 (get_deferred_access_checks): Likewise.
141 (pop_to_parent_deferring_access_checks): Likewise.
142 (perform_or_defer_access_check): Likewise.
143 (perform_access_checks): Take a vector of struct deferred_access_check
144 instead of a tree list.
145 * parser.c (struct tree_check): New structure to store various data
146 associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
147 (struct cp_token): Changed the value field to be a union with a pointer to
148 a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
149 tokens and a tree field for all other tokens.
150 (eof_token): Adjusted due to the change in struct cp_token.
151 (cp_lexer_get_preprocessor_token): Likewise.
152 (cp_lexer_purge_token): Likewise.
153 (cp_lexer_purge_tokens_after): Likewise.
154 (cp_lexer_print_token): Likewise.
155 (cp_parser_error): Likewise.
156 (cp_parser_identifier): Likewise.
157 (cp_parser_string_literal): Likewise.
158 (cp_parser_primary_expression): Likewise.
159 (cp_parser_unqualified_id): Likewise.
160 (cp_parser_parenthesized_expression_list): Likewise.
161 (cp_parser_storage_class_specifier_opt): Likewise.
162 (cp_parser_function_specifier_opt): Likewise.
163 (cp_parser_type_specifier): Likewise.
164 (cp_parser_simple_type_specifier): Likewise.
165 (cp_parser_initializer_list): Likewise.
166 (cp_parser_member_specification_opt): Likewise.
167 (cp_parser_attribute_list): Likewise.
168 (cp_parser_objc_expression): Likewise.
169 (cp_parser_objc_protocol_qualifiers): Likewise.
170 (cp_parser_objc_selector): Likewise.
171 (cp_parser_objc_declaration): Likewise.
172 (cp_parser_objc_statement): Likewise.
173 (cp_parser_omp_clause_name): Likewise.
174 (cp_parser_omp_clause_default): Likewise.
175 (cp_parser_omp_clause_schedule): Likewise.
176 (cp_parser_omp_parallel): Likewise.
177 (cp_parser_initial_pragma): Likewise.
178 (pragma_lex): Likewise.
179 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
180 (cp_parser_nested_name_specifier_opt): Likewise.
181 Use cp_token::u::tree_check_value to save the token's value, the
182 associated deferred checks and its qualifying scope.
183 (cp_parser_template_id): Likewise.
184 (cp_parser_template_declaration_after_export): Adjusted the call to
185 get_deferred_access_checks.
186 (cp_parser_init_declarator): Take the access checks as a vector of struct
187 deferred_access_check instead of a tree list.
188 (cp_parser_single_declaration): Likewise.
189 (cp_parser_perform_template_parameter_access_checks): Likewise.
190 (cp_parser_simple_declaration): Adjusted the call to
191 cp_parser_init_declarator.
192 (cp_parser_explicit_specialization): Adjusted the call to
193 cp_parser_single_declaration.
195 2006-12-13 Ian Lance Taylor <iant@google.com>
199 * parser.c (cp_parser_expression_stack_entry): Add field
201 (cp_parser_binary_expression): Track tree code of left hand side
202 of expression. Use it when calling build_x_binary_op.
203 (cp_parser_selection_statement): Add if_p parameter. Change all
204 callers. Warn about ambiguous else.
205 (cp_parser_statement): Add if_p parameter. Change all callers.
206 (cp_parser_implicitly_scoped_statement): Likewise.
207 * typeck.c (build_x_binary_op): Add parameters arg1_code and
208 arg2_code. Change all callers. Call warn_about_parentheses.
209 * cp-tree.h (build_x_binary_op): Update declaration.
211 2006-12-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
213 * decl.c (build_enumerator): Update error message to match C
216 2006-12-11 Jan Hubicka <jh@suse.cz>
218 * decl2.c (var_finalized_p): Update for renamed varpool functions.
220 2006-12-09 Zack Weinberg <zackw@panix.com>
222 * parser.c (yydebug, enum pragma_omp_clause): Delete.
224 2006-12-07 Mark Mitchell <mark@codesourcery.com>
227 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
228 (explicit_class_specialization_p): Declare.
229 * pt.c (explicit_class_specialization_p): New function.
230 * parser.c (cp_parser_init_declarator): Check correct number of
231 template parameters for in-class function definitions.
232 (cp_parser_check_declrator_template_parameters): Stop looking for
233 template classes when we find an explicit specialization.
235 2006-12-07 Lee Millward <lee.millward@codesourcery.com>
238 * cp_parser_elaborated_type_specifier: Check
239 the return value of check_elaborated_type_specifier.
241 2006-12-06 Mark Mitchell <mark@codesourcery.com>
244 * parser.c (cp_parser_init_declarator): Reject initialization of
247 2006-12-05 Mark Mitchell <mark@codesourcery.com>
250 * decl2.c (check_member_template): Move check for member
251 templates in local classes to ...
252 * parser.c (cp_parser_template_declaration_after_export):
256 * decl.c (check_array_designated_initializer): New function.
257 (maybe_deduce_size_from_array_init): Use it.
258 (reshape_init_array): Likewise.
260 2006-12-05 Aldy Hernandez <aldyh@redhat.com>
262 Merge from gimple-tuples-branch.
264 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
266 * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
267 (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
268 (cxx_omp_clause_copy_ctor): Same.
269 (cxx_omp_clause_assign_op): Same.
271 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
273 * cp-tree.h (union lang_tree_node): Gimple statements do not
275 (TREE_INDIRECT_USING): Look in base.
277 2006-12-04 Jan Hubicka <jh@suse.cz>
279 * cp-objcp-common.c (cp_expr_size): Return NULL in the case
282 2006-12-04 Mark Mitchell <mark@codesourcery.com>
285 * pt.c (tsubst_decl): Disallow variables of function type.
288 * call.c (add_builtin_candidate): Do not permit NULL pointer
289 constants to be compared with template parameters.
291 2006-12-04 Eric Botcazou <ebotcazou@adacore.com>
293 * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
294 Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
296 2006-12-03 Richard Henderson <rth@redhat.com>
297 Andrew Pinski <pinskia@gmail.com>
300 * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
302 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
305 * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
307 2006-12-02 Kazu Hirata <kazu@codesourcery.com>
309 * name-lookup.c: Follow spelling conventions.
311 2006-12-01 Geoffrey Keating <geoffk@apple.com>
313 * decl.c (poplevel): Check DECL_INITIAL invariant.
314 (duplicate_decls): Preserve DECL_INITIAL when eliminating
315 a new definition in favour of an old declaration.
316 (start_preparsed_function): Define and document value of
317 DECL_INITIAL before and after routine.
318 (finish_function): Check DECL_INITIAL invariant.
320 (cp_parser_function_definition_from_specifiers_and_declarator):
321 Skip duplicate function definitions.
323 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
326 * typeck.c (type_after_usual_arithmetic_conversions):
327 Fix assertion for vector types.
328 (build_binary_op): Use temporary for inner type of vector types.
330 2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
333 * typeck.c (build_binary_op): Fix pointer to member function
334 comparison for ptrmemfunc_vbit_in_delta targets.
336 2006-12-01 Dirk Mueller <dmueller@suse.de>
339 * decl.c (grokdeclarator): Warn for type qualifiers on return
340 type for non-dependent types.
341 * pt.c (tsubst_function_type): Warn for type qualifiers on
342 return type for dependent types.
344 2006-11-30 Geoffrey Keating <geoffk@apple.com>
346 * rtti.c (get_tinfo_decl): Handle return value from
347 pushdecl_top_level_and_finish.
349 2006-11-29 Lee Millward <lee.millward@codesourcery.com>
352 * parser.c (cp_parser_class_head): Move processing
353 of any base classes to...
354 (cp_parser_class_specifier) ...here. Take an extra
355 tree* parameter for any base classes. Only process
356 them if the opening brace was found.
358 2006-11-28 Jakub Jelinek <jakub@redhat.com>
361 * decl.c (grokfndecl): Check main's type after applying
362 attributes, not before.
364 2006-11-27 Mark Mitchell <mark@codesourcery.com>
366 * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
367 entries for a primary construction virtual table.
369 2006-11-26 Mark Mitchell <mark@codesourcery.com>
372 * parser.c (cp_parser): Add in_function_body.
373 (cp_parser_new): Initialize it.
374 (cp_parser_primary_expression): Use parser->in_function_body
375 instead of at_function_scope_p.
376 (cp_parser_asm_definition): Likewise.
377 (cp_parser_direct_declarator): Likewise.
378 (cp_parser_class_specifier): Clear parser->in_function_body.
379 (cp_parser_constructor_declarator_p): Use parser->in_function_body
380 instead of at_function_scope_p.
381 (cp_parser_function_body_after_declarator): Set
382 parser->in_function_body.
384 2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
386 * cp-tree.def (STATIC_ASSERT): New.
387 * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
388 * error.c (dump_decl): Handle STATIC_ASSERT.
389 * cp-tree.h (STATIC_ASSERT_CONDITION): New.
390 (STATIC_ASSERT_MESSAGE): New.
391 (STATIC_ASSERT_SOURCE_LOCATION): New.
392 (struct tree_static_assert): New.
393 (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
394 (union lang_tree_node): Add static_assertion.
395 (finish_static_assert): Declare.
396 * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
397 (pp_cxx_declaration): Handle STATIC_ASSERT.
398 * pt.c (instantiate_class_template): Handle
399 STATIC_ASSERT members.
400 (tsubst_expr): Handle STATIC_ASSERT statements.
401 * semantics.c (finish_static_assert): New.
402 * lex.c (D_CPP0X): New.
403 (reswords): Add static_assert keyword.
404 (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
405 * parser.c (cp_parser_block_declaration): Parse static
407 (cp_parser_static_assert): New.
408 (cp_parser_member_declaration): Parse static assertions.
410 2006-11-21 Jakub Jelinek <jakub@redhat.com>
413 * decl.c (cp_finish_decl): Check for value dependent brace enclosed
417 * cp-tree.h (WANT_VECTOR): Define.
418 (WANT_ARITH): Add WANT_VECTOR.
419 * cvt.c (build_expr_type_conversion): Handle vector types.
420 * typeck.c (build_unary_op): Add WANT_VECTOR to
421 build_expr_type_conversion flags.
423 2006-11-20 Simon Martin <simartin@users.sourceforge.net>
426 * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
427 extra argument that represents the declaration to use to print
428 potential error messages.
429 * init.c (build_offset_ref): Adjusted the call to
430 perform_or_defer_access_check.
431 * class.c (alter_access, resolve_address_of_overloaded_function):
433 * decl.c (make_typename_type, make_unbound_class_template): Likewise.
434 * search.c (lookup_member): Likewise.
435 * friend.c (add_friend): Likewise.
436 * parser.c (cp_parser_template_id,
437 cp_parser_pre_parsed_nested_name_specifier): Likewise.
438 * semantics.c (finish_non_static_data_member,
439 check_accessibility_of_qualified_id, finish_id_expression): Likewise.
440 (pop_to_parent_deferring_access_checks, perform_access_checks,
441 perform_or_defer_access_check): Adjusted the call to enforce_access.
442 * call.c (enforce_access): Use the new extra argument to build the
444 (build_op_delete_call): Adjusted the call to
445 perform_or_defer_access_check.
446 (build_over_call): Likewise.
448 2006-11-16 Dirk Mueller <dmueller@suse.de>
450 * name-lookup.c (begin_scope): Use GGC_CNEW instead of
453 2006-11-13 Roger Sayle <roger@eyesopen.com>
455 * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
456 base type info initializer has the correct type.
458 2006-11-13 Mark Mitchell <mark@codesourcery.com>
461 * pt.c (coerce_template_parms): Do not skip_evaluation while
462 substituting template arguments.
464 2006-11-11 Richard Guenther <rguenther@suse.de>
466 * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
467 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
469 2006-11-03 Roger Sayle <roger@eyesopen.com>
471 * call.c (build_op_delete_call): Test user-visible type against
472 size_type_node, instead of against the internal type, sizetype.
473 * class.c (type_requires_array_cookie): Likewise.
474 * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
475 handling of TYPE_IS_SIZETYPE.
476 * typeck.c (type_after_usual_arithmetic_conversions): Remove
477 special case handling of TYPE_IS_SIZETYPE.
478 (comptypes): Likewise.
480 2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
482 * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
483 if targetm.cxx.use_atexit_for cxa_atexit.
484 (start_cleanup_fn): Likewise.
485 (register_dtor_fn): Likewise.
487 2006-09-25 Geoffrey Keating <geoffk@apple.com>
489 * decl2.c (cp_write_global_declarations): Rename from
491 * cp-lang.c (finish_file): Don't call cp_finish_file.
492 * cp-tree.h (cp_write_global_declarations): Rename from
494 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
495 cp_write_global_declarations.
497 2006-10-31 Geoffrey Keating <geoffk@apple.com>
499 * name-lookup.c (get_anonymous_namespace_name): New.
500 (push_namespace_with_attribs): Use get_anonymous_namespace_name.
501 * decl2.c (start_objects): Update for rename of
502 get_file_function_name_long.
504 2006-10-30 Dirk Mueller <dmueller@suse.de>
507 * decl.c (grokdeclarator): Duplicate diagnostic message
508 for easier translation.
509 * decl.c (grokdeclarator): Fix line-wrapping.
511 2006-10-30 Dirk Mueller <dmueller@suse.de>
514 * decl.c (grokfndecl): Use check_main_parameter_types.
516 2006-10-30 Dirk Mueller <dmueller@suse.de>
519 * decl.c (grokfndecl): Duplicate warning message for
522 2006-10-30 Dirk Mueller <dmueller@suse.de>
524 * typeck.c (build_unary_op): Fix indenting. Use G_().
526 2006-10-29 Dirk Mueller <dmueller@suse.de>
529 * typeck.c (build_unary_op): Duplicate warning message
530 for easier translation.
532 2006-10-29 Dirk Mueller <dmueller@suse.de>
535 * typeck.c (build_array_ref): Warn for char subscriptions
538 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
540 * decl.c: Fix a comment typo.
542 2006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
545 * typeck.c (build_unary_op): Use same_type_p when comparing to
548 2006-10-29 Dirk Mueller <dmueller@suse.de>
551 * typeck.c (build_binary_op): Duplicate warning message
552 for better translation.
554 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
556 * decl.c (builtin_function_1): Move common code to
557 add_builtin_function.
558 (builtin_function): Rename to cxx_builtin_function.
559 Change the signature.
560 * call.c: Include langhooks.h.
561 (build_java_interface_fn_ref): Replace calls to
562 builtin_function with add_builtin_function.
563 * Make-lang.in (cp/call.o): Depend on langhooks.h.
564 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
565 cxx_builtin_function.
566 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
567 Change the signature.
569 2006-10-22 Nathan Sidwell <nathan@codesourcery.com>
572 * rtti.c (tinfo_base_init): The type info string is always global.
574 2006-10-20 Lee Millward <lee.millward@codesourcery.com>
575 Mark Mitchell <mark@codesourcery.com>
578 * decl2.c (grokbitfield): Detect invalid non-integral
579 types earlier when possible.
581 2006-10-18 Mark Shinwell <shinwell@codesourcery.com>
584 * typeck2.c (digest_init): Raise error upon attempts to
585 initialize arrays with variables.
587 2006-10-17 Lee Millward <lee.millward@codesourcery.com>
590 * cp-tree.h (xref_basetypes): Return bool instead of void.
591 * decl.c (xref_basetypes): Adjust definition. Return false
592 if the class bases are invalid.
593 * parser.c (cp_parser_class_head): Check the return value
596 2006-10-17 Mark Mitchell <mark@codesourcery.com>
599 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
603 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
605 (cp_parser_constructor_declarator_p): Use it.
606 (cp_parser_check_type_definition): Return a value indicating
607 whether or not the definition is valid.
608 (cp_parser_enum_specifier): Skip invalid enum definitions.
610 2006-10-17 Mark Mitchell <mark@codesourcery.com>
613 * typeck2.c (build_functional_cast): Don't zero-initialize
614 non-PODs; instead, call their constructors.
615 * method.c (synthesize_method): Always build mem-initializers, if
616 we're synthesizing the default constructor.
618 2006-10-17 Mark Mitchell <mark@codesourcery.com>
621 * decl.c (reshape_init_class): Move check for designated
623 * parser.c (cp_parser_initializer_list): ... here.
624 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
626 2006-10-16 Mark Mitchell <mark@codesourcery.com>
629 * typeck2.c (process_init_constructor_array): Reword comment.
630 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
634 * parser.c (cp_parser_using_declaration): Stop parsing when
635 something goes wrong with an access declaration.
638 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
639 types when their sizes are required. Refine test for VLAs.
642 * parser.c (cp_parser_template_argument): Don't consider "&var" a
643 possible constant-expression.
644 * pt.c (convert_nontype_argument): Refine handling of arguments of
647 2006-10-13 Mark Mitchell <mark@codesourcery.com>
650 * parser.c (function_declarator_p): New function.
651 (cp_parser_init_declarator): Use it.
652 (cp_parser_member_declaration): Likewise.
654 2006-10-12 Mark Mitchell <mark@codesourcery.com>
657 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
658 variably modified types.
660 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
663 * decl.c (start_decl): Return error_mark_node if a
664 function is initialized like a variable.
665 (check_var_type): If a variable of field is declared void,
666 set the type to error_mark_node.
667 (grokdeclarator): Check the return type of check_var_type.
668 * class.c (finish_struct_1): Robustify.
670 2006-10-11 Mark Mitchell <mark@codesourcery.com>
673 * decl.c (check_initializer): Issue errors about trying to
674 initialize arrays whose elements have variable size.
676 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
679 * cp-tree (struct cp_decl_specifier_seq): Rename to
680 conflicting_specifiers_p
681 * parser.c (cp_parser_set_storage_class): Set
682 conflicting_specifiers_p for the input decl specifier
683 if a typedef specifier is present. Rename uses of
684 multiple_specifiers_p to conflicting_specifiers_p.
685 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
686 class specifier has already been set for this declaration,
687 set conflicting_specifiers_p to true on the decl_specs.
688 * decl.c (grokdeclarator): Rename uses of
689 multiple_specifiers_p to conflicting_specifiers_p.
691 2006-10-10 Brooks Moses <bmoses@stanford.edu>
693 * Make-lang.in: Added "c++.pdf" target support.
695 2006-10-10 Richard Guenther <rguenther@suse.de>
697 PR rtl-optimization/29323
698 * decl.c (finish_function): Set TREE_NOTHROW only for
699 functions that bind local.
701 2006-10-09 Richard Henderson <rth@redhat.com>
705 2006-10-04 Richard Henderson <rth@redhat.com>
706 Jakub Jelinek <jakub@redhat.com>
708 * decl.c (grokvardecl): Don't error if !have_tls.
709 (grokdeclarator): Likewise.
710 * parser.c (cp_parser_omp_threadprivate): Likewise.
712 2006-10-03 Mark Mitchell <mark@codesourcery.com>
715 * friend.c (do_friend): Improve comments; add assertion.
716 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
717 typenames for qualified names used in declarations, even when
718 caching qualified name lookup.
721 * decl2.c (grokfield): Don't handle access declarations here.
722 * parser.c (cp_parser_using_declaration): Handle access
724 (cp_parser_block_declaration): Adjust calls to
725 cp_parser_using_declaration.
726 (cp_parser_member_declaration): Likewise. Use
727 cp_parser_using_declaration to look for access_declarations.
729 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
732 * init.c (build_new): Check for invalid init.
734 2006-10-02 Mark Mitchell <mark@codesourcery.com>
737 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
738 not try to actually evaluate sizeof for a VLA type.
740 2006-10-01 Mark Mitchell <mark@codesourcery.com>
743 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
744 * semantics.c (baselink_for_fns): Build a baselink, even when
745 processing a template.
748 * parser.c (cp_parser_postfix_dot_deref_expression): Use
749 BASELINK_ACCESS_BINFO as the qualifying scope when calling
750 adjust_result_of_qualified_name_lookup.
752 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
756 * cp-tree.h (redeclare_class_template): Adjust declaration
757 to return bool instead of void.
758 * pt.c (redeclare_class_template): Update definition.
759 Return false on error.
760 * decl.c (xref_tag): Return error_mark_node if
761 redeclare_class_template returned false.
764 * cp-tree.h (begin_specialization): Return bool
766 * pt.c (check_specialization_scope): Likwise.
767 Adjust comment. Return false if a specialization
768 isn't permitted in the current scope.
769 (begin_specialization): Use the return value of
770 check_specialization_scope.
771 * parser.c (cp_parser_explicit_specialization): If
772 begin_specialization returned false, skip the rest
773 of the specialization.
775 2006-09-21 Mark Mitchell <mark@codesourcery.com>
778 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
781 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
784 * decl.c (shadow_tag): Return error_mark_node
785 if maybe_process_partial_specialization failed.
788 * decl.c (grokdeclarator): Return error_mark_node on
789 declaration with two or more data types.
791 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
794 * class.c (check_for_override): Remove dllimport from virtual
797 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
800 * parser.c (cp_parser_labeled_statement): Return nothing. Do
801 not take in_statement_expr and in_compound as arguments. Rename
802 to cp_parser_label_for_labeled_statement. Parse only the label,
804 (cp_parser_statement): Parse the statement of a labeled-statement
805 from here, using tail recursion.
807 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
810 * init.c (build_zero_init): If we have an error mark node for
811 the array size, return.
813 2006-09-10 Mark Mitchell <mark@codesourcery.com>
816 * cp-objcp-common.c (cxx_staticp): New function.
817 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
818 * cp-tree.h (cxx_staticp): New function.
820 2006-09-09 Jason Merrill <jason@redhat.com>
823 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
825 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
828 * parser.c (cp_parser_skip_until_found): Rename to
829 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
830 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
831 Reorganize. Adjust comment.
832 (cp_parser_template_declaration_after_export): Adjust call.
833 (cp_parser_enclosed_template_argument_list): Likewise.
835 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
838 * init.c (build_new_1): Build a distinct type copy
839 for the array type that was returned from
840 build_cplus_array_type.
842 2006-09-07 Jason Merrill <jason@redhat.com>
845 * cvt.c (convert_to_void): Enable previous change.
848 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
851 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
854 * pt.c (fold_non_dependent_expr): Make sure expr is not
855 dereferenced if it is NULL.
857 2006-09-06 Zak Kipling <zak@transversal.com>
860 * decl.c (make_rtl_for_nonlocal_decl),
861 (start_preparsed_function): Don't use lbasename on
862 input_filename when calling get_fileinfo.
863 * semantics.c (begin_class_definition): Likewise.
864 * lex.c (cxx_make_type): Likewise.
865 (handle_pragma_interface): Call get_fileinfo on input_filename,
866 not on the parameter to the directive.
868 2006-09-06 Mark Mitchell <mark@codesourcery.com>
871 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
875 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
878 2006-09-06 Jason Merrill <jason@redhat.com>
881 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
882 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
883 * tree.c (build_cplus_new): Set it.
886 * cvt.c (convert_to_void): Replace a subexpression with no side
887 effects with void_zero_node.
888 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
889 (get_first_fn): Ditto.
890 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
892 2006-09-05 Jason Merrill <jason@redhat.com>
895 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
896 where the name is a type used incorrectly.
899 * typeck.c (maybe_warn_about_returning_address_of_local): Look
900 through COMPONENT_REF and ARRAY_REF.
903 * name-lookup.c (do_class_using_decl): Try to find the base even
904 if bases_dependent_p.
905 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
908 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
910 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
912 PR 23287 Revert my 2006-09-01 patch.
913 * parser.c: Reverted.
916 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
922 * parser.c (cp_parser_template_parameter_list): Add
923 invalid template parameters to the parameter list as
926 2006-09-02 Jakub Jelinek <jakub@redhat.com>
929 * except.c (build_throw): Only set current_function_returns_abnormally
933 * repo.c (repo_file): Remove.
934 (open_repo_file, reopen_repo_file_for_write): Return fopened
935 FILE * instead of setting global repo_file variable.
936 (init_repo): Adjust caller.
937 (finish_repo): Likewise. Return instead of goto out before
938 reopen_repo_file_for_write has been called.
940 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
943 * semantics.c (finish_call_expr): Add assert.
944 * name-lookup.c (lookup_arg_dependent): Check we found an overload
948 * parser.c (cp_parser_id_expression): Add member_p
949 argument. Update all callers.
950 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
951 the object's scope, if valid.
952 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
954 (cp_parser_postfix_dot_deref_expression): Set object_scope.
955 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
957 2006-08-30 Jason Merrill <jason@redhat.com>
960 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
961 the fields have been processed.
963 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
966 * call.c (build_x_va_arg): Remove the reference type
967 from the type before creating the pointer type.
969 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
972 * except.c (expand_start_catch_block): Use correct types for bitwise
975 2006-08-28 Jason Merrill <jason@redhat.com>
978 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
979 fields can't be packed.
982 * cvt.c (convert_to_void): Don't automatically load from volatiles
983 of TREE_ADDRESSABLE type.
985 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
988 * cp-tree.h (maybe_process_partial_specialization): Return
989 tree instead of void.
990 * parser.c (cp_parser_class_head): Use return value of
991 maybe_process_partial_specialization.
992 * pt.c (maybe_process_partial_specialization): Return error_mark_node
993 for broken specializations, TYPE otherwise. Check for template
996 2006-08-27 Mark Mitchell <mark@codesourcery.com>
999 * pt.c (register_specialization): Return error_mark_node for
1000 specialization-after-instantiation.
1001 * decl2.c (mark_used): Mark the main function used when one of its
1004 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
1007 * class.c (check_field_decls): Don't issue error about
1008 local classes containing static data members.
1010 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
1013 * parser.c (struct cp_token): Add input_file_stack_index.
1014 (eof_token): Update.
1015 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
1016 (cp_lexer_set_source_position_from_token): Restore input file
1019 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
1024 * pt.c (process_template_parm): Store invalid template
1025 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
1026 (push_inline_template_parms_recursive): Check for template
1027 parameters having a TREE_VALUE of error_mark_node rather than
1028 check the parameter itself.
1029 (mangle_class_name_for_template): Likewise.
1030 (comp_template_parms): When comparing the individual template
1031 parameters, return 1 if either is error_mark_node.
1032 (current_template_args): Robustify.
1033 (redeclare_class_template): Likewise.
1035 2006-08-26 Mark Mitchell <mark@codesourcery.com>
1038 * class.c (resolve_address_of_overloaded_function): Add
1039 access_path parameter. Perform access checks.
1040 (instantiate_type): Adjust call to
1041 resolve_address_of_overloaded_function. Remove unnecessary code.
1042 * tree.c (is_overloaded_fn): Document. Return 2 when there are
1043 acutally multiple functions.
1044 (really_overloaded_fn): Use is_overloaded_fn.
1045 * mangle.c (write_expression): Handle BASELINKs.
1046 * cp-tree.h (really_overloaded_fn): Return bool.
1047 (baselink_for_fns): Declare.
1048 * search.c (lookup_member): Check access for single static
1050 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
1051 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
1052 * semantics.c (finish_call_expr): Use baselink_for_fns.
1053 (baselink_for_fns): New function.
1054 (finish_id_expression): Use it.
1055 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
1058 * pt.c (tsubst): Issue errors about attempts to create VLAs at
1059 template-instantiation time.
1061 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1064 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
1065 template parameters. Improve error message for template type
1069 * cp-tree.h (grok_op_properties): Return bool instead of void.
1070 * decl.c (grokfndecl): Discard invalid operator declarations.
1071 (copy_fn_p): Revert change for PR 27547.
1072 (grok_op_properties): Return error status (true on success).
1073 * pt.c (tsubst_decl): Discard invalid operator declarations.
1075 2006-08-25 Mark Mitchell <mark@codesourcery.com>
1078 * decl.c (grokdeclarator): Disallow declarations with qualified
1079 names in local scopes.
1081 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
1084 * decl.c (make_typename_type): Only try and resolve it when
1085 context is not dependent. Refactor.
1086 * decl2.c (check_classfn): Push to class scope before looking for
1089 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
1092 * g++spec.c (lang_specific_driver): Always check if we need to
1093 swallow a space-separated arg to '-x'.
1094 * lang-specs.h: Don't create ouput files for '-xc++-header'
1097 2006-08-23 Jason Merrill <jason@redhat.com>
1100 * pt.c (push_template_decl_real): A friend template with class
1101 scope isn't primary.
1103 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
1106 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
1107 Move -fno-rtti check to be more specific.
1109 2006-08-22 Jason Merrill <jason@redhat.com>
1112 * call.c (build_over_call): Don't make a copy here if build_call
1115 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
1118 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
1121 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
1124 * parser.c (cp_parser_postfix_expression): Make sure that the
1125 saved value for parser->type_definition_forbidden_message is
1126 restored before returning to avoid an invalid free().
1128 2006-08-22 Jason Merrill <jason@redhat.com>
1131 * typeck.c (merge_types): If either of the types have the right
1132 attributes, return that one.
1134 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
1135 doing this to class types.
1136 * typeck.c (original_type): Deal with type quals properly.
1138 2006-08-21 Jason Merrill <jason@redhat.com>
1141 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
1142 just leave the expression as it is.
1143 (finish_stmt_expr): If the statement-expression has class type,
1144 wrap it in a TARGET_EXPR.
1145 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
1147 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
1149 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
1152 * decl.c (duplicate_decls): Return early if either
1153 newdecl or olddecl is error_mark_node.
1156 * decl.c (grokdeclarator): Return early after
1157 issuing diagnostic about an incomplete type.
1160 * tree.c (decl_anon_ns_mem_p): Robustify.
1161 * decl2.c (determine_visibility): Likewise.
1163 2006-08-20 Mark Mitchell <mark@codesourcery.com>
1166 * tree.c (cast_valid_in_integral_constant_expression_p): New
1168 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
1169 * pt.c (tsubst_expr): Add integral_constant_expression_p
1171 (fold_non_dependent_expr): Adjust callers of
1172 tsubst_{expr,copy_and_build}.
1173 (tsubst_friend_function): Likewise.
1174 (tsubst_template_arg): Likewise.
1175 (tsubst_default_argument): Likewise.
1176 (tsubst_decl): Likewise.
1178 (tsubst_omp_clasuses): Likewise.
1179 (regenerate_decl_fromp_template): Likewise.
1180 (instantiate_decl): Likewise.
1181 (tsubst_initializer_list): Likewise.
1182 (tsubst_enum): Likewise.
1183 (tsubst_expr): Use RECUR throughout.
1184 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
1185 invalid casts in integral constant expressions.
1186 * parser.c (cp_parser_postfix_expression): Use
1187 cast_valid_in_integral_constant_expression_p.
1188 (cp_parser_cast_expression): Likewise.
1189 (cp_parser_functional_cast): Likewise.
1192 * pt.c (tsubst_qualified_id): Do not strip references from
1195 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1198 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
1200 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
1201 for valid type-names.
1202 (cp_parser_unqualified_id): Fix error handling for destructors.
1205 * decl.c (xref_tag): Improve error message. Return early on error.
1208 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
1210 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
1213 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
1215 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
1218 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
1219 perform_integral_promotions for non integral type.
1221 2006-08-16 Jason Merrill <jason@redhat.com>
1224 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
1225 if arg is a function.
1227 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1230 * init.c (build_new): Return early on invalid placement.
1232 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
1235 * pt.c (process_template_parm): Robustify.
1237 2006-08-14 Steve Ellcey <sje@cup.hp.com>
1241 * operators.def: Remove <?, ?>, <?=, and >?= operators.
1242 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
1243 (cp_parser_warn_min_max): Remove.
1245 2006-08-11 Jason Merrill <jason@redhat.com>
1248 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
1249 attributes applied to a TYPENAME_TYPE.
1251 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
1254 * pt.c (coerce_template_parms): Copy across the
1255 invalid template arguments to the new template inner arguments.
1256 (retrieve_specialization): Robustify.
1259 * pt.c (coerce_template_template_parms): Robustify.
1262 * error.c (dump_template_parms): Robustify.
1265 * pt.c (redeclare_class_template): Robustify.
1268 * pt.c (type_unification_real): Robustify.
1270 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
1273 * decl.c (start_decl): Return error_mark_node if a
1274 diagnostic was issed for an invalid typedef initialization.
1276 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1279 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
1280 when parsing destructor names.
1283 * decl.c (duplicate_decls): Call check_default_args here.
1284 (start_preparsed_function): Do not call check_default_args.
1285 * name-lookup.c (pushdecl_maybe_friend): Only call
1286 check_default_args if duplicate_decls got bypassed.
1288 2006-08-02 Richard Guenther <rguenther@suse.de>
1292 2006-07-05 Richard Guenther <rguenther@suse.de>
1293 Andrew Pinski <pinskia@gcc.gnu.org>
1296 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1297 top level qualifiers for pointer type comparisons.
1299 2006-08-02 Mark Mitchell <mark@codesourcery.com>
1302 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
1304 2006-07-31 Mark Mitchell <mark@codesourcery.com>
1307 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
1308 (stabilize_call): Tweak documentation.
1309 (stabilize_init): Only call stabilize_call for calls.
1311 2006-08-01 Steve Ellcey <sje@cup.hp.com>
1314 * decl2.c (check_classfn): Remove early return.
1315 * search.c (lookup_member): Return NULL with bad type.
1317 2006-08-01 Steve Ellcey <sje@cup.hp.com>
1320 * decl.c (check_initializer): Check for 1 initializer on scalar types.
1322 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
1325 * pt.c (tsubst_copy_and_build): Mark used enum types.
1326 * semantics.c (finish_id_expression): Likewise.
1328 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1331 * decl.c (grokdeclarator): Check whether "long" or "short" was
1332 specified for non-integral types.
1334 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1336 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1338 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
1342 * pt.c (process_template_parm) Store invalid template
1343 parameters as error_mark_node in the paramater list.
1344 (push_inline_template_parms_recursive): Handle invalid
1345 template parameters.
1346 (comp_template_parms): Likewise.
1347 (check_default_tmpl_arg): Likewise.
1348 (coerce_template_template_parms): Likewise.
1349 (mangle_class_name_for_template): Likewise.
1350 (tsubst_template_parms): Likewise.
1351 * error.c (dump_template_argument_list): Likewise.
1353 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
1355 * cp-tree.h: Fix a comment typo.
1357 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1360 * decl.c (grokdeclarator): Return error_mark_node after invalid
1363 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
1366 * decl.c (grokvardecl): Use FROB_CONTEXT.
1367 * pt.c (register_specialization): Likewise.
1369 2006-07-23 Mark Mitchell <mark@codesourcery.com>
1372 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
1373 * name-lookup.c (unqualified_namespace_lookup): There is no way to
1374 have a hidden name in non-namespace scopes.
1375 * pt.c (tsubst_friend_class): Look for hidden names.
1376 * decl.c (lookup_and_check_tag): Fix typo in comment.
1378 * semantics.c (finish_compound_literal): Fix typo in comment.
1380 2006-07-21 Jason Merrill <jason@redhat.com>
1382 * decl2.c (determine_visibility): Don't propagate visibility from
1384 (constrain_class_visibility): Don't warn in system headers.
1385 Don't warn about pointer fields.
1387 2006-07-20 Mike Stump <mrs@apple.com>
1389 * decl2.c (determine_visibility_from_class): Don't use hidden
1390 visibility for explicit instantiations.
1392 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1395 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
1396 valid decls. Cleanup.
1399 * semantics.c (check_template_template_default_arg): Simplify
1402 2006-07-20 Jason Merrill <jason@redhat.com>
1405 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
1406 const variables with implicit internal linkage.
1407 * tree.c (decl_linkage): Only return lk_external if it's set.
1410 * decl2.c (constrain_visibility): Ignore the anonymous namespace
1411 for extern "C" decls.
1412 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
1414 * decl2.c (constrain_visibility): Remove specified and reason
1415 parameters. Don't touch decls that already have explicit visibility.
1416 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
1418 (determine_visibility_from_class): Reverse sense of
1419 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
1420 (constrain_class_visibility): Only complain about member visibility
1421 if the member type is another class. Don't change visibility of the
1424 2006-07-19 Mark Mitchell <mark@codesourcery.com>
1427 * decl.c (layout_var_decl): Don't call push_local_name here.
1428 (initialize_artificial_var): Assert artificiality.
1429 (cp_finish_decl): Call push_local_name here.
1431 2006-07-18 Mark Mitchell <mark@codesourcery.com>
1434 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
1437 2006-07-18 Mark Mitchell <mark@codesourcery.com>
1440 * semantics.c (check_accessibility_of_qualified_id): Robustify.
1443 * pt.c (tsubst_decl): Handling substitutions into a static data
1444 member from within the scope of the tempalte itself.
1446 2006-07-18 Lee Millward <lee.millward@gmail.com>
1449 * method.c (locate_copy): Check for non_reference
1450 returning error_mark_node.
1453 * decl.c (duplicate_decls): Return error_mark_node
1454 on ambiguous declaration.
1456 2006-07-18 Steve Ellcey <sje@cup.hp.com>
1459 * search.c (adjust_result_of_qualified_name_lookup): Change
1460 assert to part of if statement.
1462 2006-07-17 Steve Ellcey <sje@cup.hp.com>
1465 * decl.c (reshape_init_class): Return error_mark_node on error.
1467 2006-07-17 Steve Ellcey <sje@cup.hp.com>
1470 * decl2.c (check_classfn): Return NULL_TREE on error.
1472 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1475 * name-lookup.c (pushdecl_maybe_friend): Return early on
1477 * except.c (expand_start_catch_block): Use error_mark_node instead
1478 of NULL_TREE for invalid decls.
1479 * parser.c (cp_parser_exception_declaration): Return error_mark_node
1480 on invalid catch parameter. Simplify.
1482 2006-07-16 Jakub Jelinek <jakub@redhat.com>
1485 * decl2.c (note_vague_linkage_var): Removed.
1486 (finish_static_data_member_decl): Add decl to pending_statics vector
1487 directly. Do it even for non-public decls.
1489 2006-07-15 Lee Millward <lee.millward@gmail.com>
1492 * decl2.c (acceptable_java_type): Robustify. Use
1493 proper Boolean return type instead of return 1.
1494 (check_java_method): Don't issue error about
1495 type not being an acceptable Java parameter if
1496 it's error_mark_node.
1499 * parser.c (cp_parser_elaborated_type_specifier):
1500 Return early if an invalid type was detected.
1502 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1505 * parser.c (cp_parser_check_decl_spec): New function.
1506 (cp_parser_decl_specifier_seq): Factor out check for repeated
1507 decl-specifiers into cp_parser_check_decl_spec. Use it.
1508 (cp_parser_type_specifier_seq): Use it.
1511 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
1515 * decl2.c (cplus_decl_attributes): Check for invalid decls.
1517 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1520 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
1521 * decl2.c (grokfield): Likewise.
1523 2006-07-12 Geoffrey Keating <geoffk@apple.com>
1525 * decl2.c (determine_visibility): Don't change visibility of
1526 function locals because of -fvisibility-inlines-hidden.
1528 2006-07-12 Jason Merrill <jason@redhat.com>
1531 * semantics.c (note_decl_for_pch): Don't premangle templates.
1533 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
1535 * typeck.c (string_conv_p): Remove spurious quotation mark in
1538 2006-07-07 Lee Millward <lee.millward@gmail.com>
1539 Andrew Pinski <pinskia@gmail.com>
1542 * decl.c (define_label): Return error_mark_node on error.
1543 * semantics.c (finish_label_stmt): Don't call
1544 add_stmt for invalid labels.
1546 2006-07-06 Jason Merrill <jason@redhat.com>
1549 * decl2.c (finish_static_data_member_decl): Don't assert
1552 2006-07-05 Jason Merrill <jason@redhat.com>
1556 * class.c (check_field_decls): Check TYPE_PACKED after
1557 stripping array types.
1558 (finish_struct_bits): Don't copy TYPE_SIZE here.
1561 * friend.c (is_friend): Fix DR 45 implementation.
1563 2006-07-05 Richard Guenther <rguenther@suse.de>
1564 Andrew Pinski <pinskia@gcc.gnu.org>
1567 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1568 top level qualifiers for pointer type comparisons.
1570 2006-07-01 Jason Merrill <jason@redhat.com>
1573 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
1576 2006-06-30 Jason Merrill <jason@redhat.com>
1579 * call.c (build_new_method_call): Force evaluation of the
1580 instance pointer, not the object.
1582 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
1584 * decl2.c: Fix a comment typo.
1586 2006-06-30 Jason Merrill <jason@redhat.com>
1589 * decl2.c (grokfield): Only try to treat the decl as an access
1590 declaration if the scope is a class.
1592 2006-06-29 Jason Merrill <jason@redhat.com>
1599 * decl2.c (determine_visibility): Overhaul.
1600 (determine_visibility_from_class): Likewise.
1601 (min_vis_r, type_visibility, constrain_visibility): New fns.
1602 (constrain_visibility_for_template): Likewise.
1603 (constrain_class_visibility): Likewise.
1604 * decl.c (cp_finish_decl): Call determine_visibility for function
1606 * name-lookup.c (pushtag): Call determine_visibility.
1607 * decl.c (duplicate_decls): Don't copy visibility from template to
1609 * pt.c (check_explicit_specialization): Likewise.
1610 (lookup_template_class, tsubst_decl): Call determine_visibility.
1611 * class.c (finish_struct_1): Call constrain_class_visibility.
1616 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
1618 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
1619 (cp_parser_enum_specifier): Likewise.
1620 (cp_parser_elaborated_type_specifier): Apply attributes if this
1621 declares only the class.
1622 (cp_parser_class_specifier): Apply leading attributes immediately.
1623 * semantics.c (begin_class_definition): Add attributes parameter,
1624 apply them to the type.
1628 * tree.c (decl_anon_ns_mem_p): New function.
1629 * cp-tree.h: Declare it.
1630 * decl2.c (determine_visibility): Make anonymous namespace
1632 (min_vis_r, constrain_visibility): Likewise.
1633 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
1635 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
1637 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
1638 on anonymous namespaces.
1640 2006-06-28 Jason Merrill <jason@redhat.com>
1643 * pt.c (convert_template_argument): Pass all template arguments
1644 on to coerce_template_template_parms.
1646 2006-06-25 Lee Millward <lee.millward@gmail.com>
1647 Mark Mitchell <mark@codesuorcery.com>
1650 * decl2.c (grokbitfied): Remove check for grokdeclarator
1651 returning NULL_TREE, instead check for error_mark_node
1652 to indicate failure.
1653 * decl.c (grokdeclarator): Adjust block comment.
1655 2006-06-25 Lee Millward <lee.millward@gmail.com>
1658 * mangle.c (mangle_conv_op_name_for_type): Check for
1660 * name-lookup.c (push_class_level_binding): Robustify.
1661 (do_class_using_decl): Return early if name is error_mark_node.
1663 2006-06-23 Steve Ellcey <sje@cup.hp.com>
1666 * name-lookup.c (pushtag): Return if we have error_mark_node.
1668 2006-06-23 Steve Ellcey <sje@cup.hp.com>
1671 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
1673 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1676 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
1677 arguments. Fix comment.
1680 * init.c (build_new_1): Handle error_mark_nodes returned by
1681 build_java_class_ref.
1682 (build_java_class_ref): Do not abort compilation, but return
1683 error_mark_node. Improve error message. Fix indentation.
1685 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
1688 * decl.c (start_decl): Check that dllimports are not initialized.
1690 2006-06-22 Lee Millward <lee.millward@gmail.com>
1693 * typeck2.c (build_m_component_ref): Use error_operand_p.
1696 * decl.c (grokdeclarator): Return error_mark_node on
1697 invalid uses of the scope resolution operator.
1699 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1702 * pt.c (determine_specialization): Check for invalid decls.
1705 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
1709 * rtti.c (get_tinfo_decl_dynamic): Robustify.
1711 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1714 * init.c (push_base_cleanups): Skip members with invalid types.
1715 * typeck.c (build_class_member_access_expr): Robustify.
1717 2006-06-19 Mark Mitchell <mark@codesourcery.com>
1719 * pt.c (instantiate_template): Fix typo in comment.
1721 2006-06-19 Richard Guenther <rguenther@suse.de>
1723 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
1724 power-of-two token vector size.
1726 2006-06-16 Mark Mitchell <mark@codesourcery.com>
1729 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
1733 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
1737 * decl.c (have_extern_spec): Remove.
1738 (start_decl): Do not check have_extern_spec.
1739 (start_function): Likewise.
1740 * cp-tree.h (have_extern_spec): Remove.
1741 * parser.c (cp_parser_linkage_specification): Don't set
1743 (cp_parser_init_declarator): Likewise.
1744 (cp_parser_parameter_declaration): Do not treat parameters as
1745 within the scope of an unbraced linkage specification.
1747 2006-06-15 Mark Mitchell <mark@codesourcery.com>
1750 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
1752 * pt.c (unify): Use it.
1755 * call.c (build_conditional_expr): Robustify.
1758 * pt.c (instantiate_template): Set processing_template_decl to
1759 zero while performing substitutions.
1761 2006-06-14 Mark Mitchell <mark@codesourcery.com>
1764 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
1765 identify destructors.
1766 (cp_parser_nested_name_specifier_opt): Remove invalid
1768 (cp_parser_template_id): Refine heuristic for determining whether
1769 we are entering a scope.
1772 * parser.c (cp_parser_declarator): Robustify.
1775 * pt.c (tsubst_expr): Use finish_omp_atomic.
1776 (value_dependent_expression_p): All CALL_EXPRs are dependent.
1777 * semantics.c (finish_omp_atomic): Rework to use standard
1778 paradigms for handling non-dependent expressions.
1780 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1782 * typeck.c (build_modify_expr): Tidy diagnostic message.
1784 2006-06-14 Mark Mitchell <mark@codesourcery.com>
1787 * typeck.c (build_modify_expr): Disallow array assignment.
1789 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1791 * cp-tree.def: Fix typo.
1793 2006-06-13 Mark Mitchell <mark@codesourcery.com>
1796 * decl.c (decls_match): Allow an extern "C" variable declarations
1797 from different namespaces to match.
1798 (duplicate_decls): Disallow redeclaring a variable with a
1799 different linkage specification.
1801 2006-06-13 Jakub Jelinek <jakub@redhat.com>
1804 * cp-tree.h (cxx_int_tree_map): New struct.
1805 (struct language_function): Add extern_decl_map field.
1806 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
1807 to cp_function_chain->extern_decl_map hash table instead of
1808 copying over DECL_UID.
1809 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
1811 (cp_genericize_r): Remap DECL_EXTERN local decls using
1812 cp_function_chain->extern_decl_map hash table.
1813 * decl.c (finish_function): Clear extern_decl_map.
1815 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1818 * semantics.c (finish_offsetof): Handle pseudo-destructors.
1821 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
1825 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
1828 2006-06-12 Roger Sayle <roger@eyesopen.com>
1831 * typeck2.c (build_functional_cast): Use cp_convert to construct
1832 non-aggregate initializers instead of the user-level build_c_cast.
1834 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1837 * cp-tree.h (finish_offsetof): Add prototype.
1838 * semantics.c (finish_offsetof): New function.
1839 * parser.c (cp_parser_builtin_offsetof): Call it instead of
1841 * pt.c (tsubst_copy_and_build): Likewise.
1843 2006-06-06 Mark Mitchell <mark@codesourcery.com>
1846 * call.c (standard_conversion): Require that the derived type be
1847 complete when performing a derived-to-base conversion.
1849 2006-06-04 Mark Mitchell <mark@codesourcery.com>
1852 * decl.c (cp_finish_decl): Process initializers for static data
1853 members with non-dependent initializers, even in templates.
1856 * decl.c (maybe_deduce_size_from_array_init): If the declaration
1857 is erroneous, give it an erroneous type.
1858 (layout_var_decl): If the type is erroneous, give up.
1859 (check_initializer): Likewise.
1862 * cp-tree.h (TYPE_OBJ_P): New macro.
1863 (TYPE_PTROB_P): Use it.
1864 (TYPE_REF_OBJ_P): Likewise.
1865 * semantics.c (finish_compound_literal): Do not permit compound
1866 literals of non-object types.
1869 * typeck.c (original_type): Robustify.
1871 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1874 * init.c (constant_value_1): Return decl instead of error_mark_node
1875 for invalid initializers.
1877 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1880 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
1881 on operand of the COND_EXPR for the null pointer check.
1883 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1886 * typeck.c (build_unary_op): Mark the function as being used.
1888 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
1891 * parser.c (cp_parser_initial_pragma): Read one more token for
1892 caller after reading PCH file in.
1894 2006-05-31 Mark Mitchell <mark@codesourcery.com>
1897 * call.c (perform_implicit_conversion): Do not actually perform
1898 conversions in templates.
1901 * call.c (resolve_args): Check for invalid uses of bound
1902 non-static member functions.
1903 * init.c (build_offset_ref): Return error_mark_node for errors.
1906 * decl.c (reshape_init): Robustify.
1907 (reshape_init_array_1): Likewise.
1909 2006-05-30 Mark Mitchell <mark@codesourcery.com>
1912 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
1913 "friend" specifiers that do not appear in class scopes.
1916 * class.c (check_bitfield_decl): Ensure that all bitfields have
1919 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
1921 * pt.c (convert_nontype_argument): Fix a typo in an error
1924 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1926 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
1927 spelling conventions.
1929 2006-05-24 Mark Mitchell <mark@codesourcery.com>
1932 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
1933 error_mark_node to indicate an initialization is OK.
1934 (start_decl): Likewise. Adjust call to start_decl_1.
1935 (start_decl_1): Add initialized parameter. Simplify.
1936 * except.c (initialize_handler_parm): Adjust call to
1938 (expand_start_catch_block): Let cp_finish_decl initialize catch
1940 * cp-tree.h (start_decl_1): Adjust prototype.
1941 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
1942 (instantiate_decl): Let cp_finish_decl handle initialization.
1943 * semantics.c (finish_compound_literal): Create a temporary
1944 variable for the literal.
1945 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
1947 * decl2.c (finish_static_data_member_decl): Don't set
1949 (grokfield): Do not try to initialize functions.
1951 2006-05-23 Mark Mitchell <mark@codesourcery.com>
1954 * pt.c (determine_specialization): Disallow partial
1955 specializations of templates.
1957 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1960 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
1962 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
1964 2006-05-21 Mark Mitchell <mark@codesourcery.com>
1967 * cp-tree.h (cp_save_expr): New function.
1968 * init.c (build_new): Correct logic for zero-element array
1969 warning. Use cp_save_expr.
1970 * tree.c (cp_save_expr): New function.
1972 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1975 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
1978 2006-05-19 Mike Stump <mrs@apple.com>
1980 * typeck.c (default_conversion): Remove static.
1982 2006-05-19 Mark Mitchell <mark@codesourcery.com>
1985 * cp-tree.h (begin_function_try_block): Change prototype.
1986 (finish_function_handler_sequence): Likewise.
1987 * parser.c (cp_parser_function_try_block): Adjust calls.
1988 * pt.c (tsubst_expr): Adjust calls.
1989 * semantics.c (begin_function_try_block): Create an artificial
1991 (finish_function_handler_sequence): Close it.
1993 2006-05-18 Mark Mitchell <mark@codesourcery.com>
1997 * typeck.c (decay_conversion): Convert bitfields to their declared
1998 types here. Improve documentation. Avoid use of cp_convert.
1999 (default_conversion): Make it static. Perform integral promotions
2000 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
2002 * init.c (build_init): Remove.
2003 (expand_default_init): Do not call rvalue.
2004 * call.c (null_ptr_cst_p): Robustify.
2005 (build_conditional_expr): Tidy.
2006 * except.c (build_throw): Do not perform lvalue-to-rvalue
2007 conversion on operand before initializing temporary.
2008 * tree.c (convert.h): Include it.
2009 (convert_bitfield_to_declared_type): Use convert_to_integer, not
2011 (rvalue): Don't convert bitfields to their declared type here.
2012 * cp-tree.h (build_init): Remove.
2013 (default_conversion): Likewise.
2014 * typeck2.c (build_m_component_ref): Do not perform
2015 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
2016 conversions here. Correct error message.
2018 2006-05-17 Mark Mitchell <mark@codesourcery.com>
2021 * decl2.c (check_member_template): Remove checks for virtual
2023 * parser.c (cp_parser_function_specifier_opt): Complain about
2025 (cp_parser_pure_specifier): Likewise.
2028 * parser.c (cp_parser_set_storage_class): Check for
2029 invalid uses of storage classes on unbraced linkage
2031 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
2032 to cp_parser_set_storage_class.
2034 2006-05-17 Jakub Jelinek <jakub@redhat.com>
2037 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
2041 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2042 on combined parallel workshare constructs.
2043 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
2045 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2048 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
2050 2006-05-15 Mark Mitchell <mark@codesourcery.com>
2053 * cp-tree.h (perform_access_checks): New function.
2054 * semantics.c (perform_access_checks): New function.
2055 (perform_deferred_access_checks): Use it.
2056 * parser.c (cp_parser_simple_declaration): Adjust call to
2057 cp_parser_init_declarator.
2058 (cp_parser_type_parameter): Do not defer checks in default
2060 (cp_parser_explicit_specialization): Adjust call to
2061 cp_parser_single_declaration.
2062 (cp_parser_init_declarator): Perform template-parameter access
2064 (cp_parser_parameter_declaration): Do not defer checks for
2065 template parameter default arguments.
2066 (cp_parser_template_declaration_after_export): Gather access
2067 checks for template parameters, and pass them to
2068 cp_parser_single_declaration.
2069 (cp_parser_template_parameter_access_checks): New function.
2070 (cp_parser_single_declaration): Add checks parameter.
2073 * call.c (convert_like_real): Convert bitfields to their declared
2074 types when forming an rvalue.
2075 * tree.c (convert_bitfield_to_declared_type): New function.
2077 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
2079 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2082 * pt.c (any_dependent_template_arguments_p): Return early on invalid
2086 * search.c (adjust_result_of_qualified_name_lookup): Skip on
2087 invalid context_class.
2090 * pt.c (do_decl_instantiation): Return early on invalid decl.
2093 * pt.c (push_template_decl_real): Return error_mark_node instead
2097 * pt.c (tsubst_friend_class): Return early on invalid friend
2100 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
2102 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
2103 (cp/decl2.o): Likewise.
2104 (cp/typeck.o): Likewise.
2105 (cp/cvt.o): Likewise.
2106 (cp/parser.o): Likewise.
2107 (cp/call.o): Replace target.h with $(TARGET_H).
2109 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
2111 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
2112 COMPONENT_REF alone.
2114 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2117 * decl.c (copy_fn_p): Return early on non-member functions.
2119 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2122 * decl2.c (build_memfn_type): Skip invalid functions and class types.
2124 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2127 * pt.c (convert_nontype_argument): Return early on invalid arguments.
2129 * pt.c (process_template_parm): Remove superfluous temporary.
2132 * pt.c (process_template_parm): Handle erroneous non-type parameters.
2135 * typeck.c (convert_for_initialization): Skip erroneous types.
2138 * typeck.c (convert_arguments): Return early on args with
2141 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
2144 * typeck.c (build_static_cast_1): Save casted types in used types
2146 (build_reinterpret_cast_1): Same.
2147 * rtti.c (build_dynamic_cast_1): Same.
2149 2006-05-04 Jakub Jelinek <jakub@redhat.com>
2152 * parser.c (cp_parser_omp_for_loop): Only call
2153 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
2156 2006-05-02 Mark Mitchell <mark@codesourcery.com>
2159 * decl.c (grokdeclarator): Robustify checks for defining members
2160 of incomplete types.
2163 * class.c (add_method): Call grok_special_member_properties.
2164 * decl.c (grokdeclarator): Don't call it here.
2165 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
2166 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
2168 (start_method): Don't call grok_special_member_properties.
2169 * method.c (implicitly_declare_fn): Likewise.
2170 * pt.c (instantiate_class_template): Likewise.
2171 * decl2.c (grokfield): Likewise.
2173 2006-05-02 Jakub Jelinek <jakub@redhat.com>
2176 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
2177 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
2178 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
2180 2006-04-30 Mark Mitchell <mark@codesourcery.com>
2183 * pt.c (tsubst_default_argument): Increment function_depth around
2184 call to tsubst_expr.
2185 * parser.c (cp_parser_parameter_declaration): Likewise.
2186 * decl2.c (mark_used): Tidy.
2188 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2191 * decl.c (grok_op_properties): Skip operators with invalid args
2192 when checking for class-type or enum-type args.
2194 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2197 * decl.c (copy_fn_p): Skip functions with invalid first arg.
2199 2006-04-27 Mark Mitchell <mark@codesourcery.com>
2202 * tree.c (rvalue): Convert bitfields to their declared types.
2205 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
2208 2006-04-24 Mark Mitchell <mark@codesourcery.com>
2211 * typeck.c (decay_conversion): Don't adjust bitfield types.
2212 (perform_integral_promotions): Treat bitfield enums as enums, not
2213 as short integer types.
2214 * tree.c (rvalue): Convert bitfields to their correct types.
2216 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2219 * class.c (layout_class_type): Skip fields with invalid types.
2221 2006-04-23 Mark Mitchell <mark@codesourcery.com>
2224 * cp-tree.h (build_this_parm): Declare.
2225 (grok_method_quals): Remove.
2226 (build_memfn_type): Declare.
2227 (build_artificial_parm): Declare.
2228 (do_friend): Remove quals parameter.
2229 * decl.c (build_this_parm): New function.
2230 (grokfndecl): Use it. Do not pass quals to grokclassfn.
2231 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
2232 unnecessary TYPE_DECLs. Correct qualification of member function
2234 * method.c (implicitly_declare_fn): Use build_this_parm.
2235 * friend.c (do_friend): Remove quals parameter.
2236 * decl2.c (grok_method_quals): Remove.
2237 (build_memfn_type): New function.
2238 (build_artificial_parm): Give it external linkage.
2239 (grokclassfn): Remove quals parameter. Do not build "this"
2243 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
2244 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
2245 (decay_conversion): Convert bitfield expressions to the correct
2247 (build_modify_expr): Remove spurious conversions.
2248 * class.c (layout_class_type): Modify the type of bitfields to
2249 indicate a limited range.
2250 * call.c (standard_conversion): Adjust the type of bitfield
2251 expressions used in an rvalue context.
2252 (build_conditional_expr): Likewise.
2254 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
2256 * decl.c: Fix comment typos.
2258 2006-04-21 Eric Christopher <echristo@apple.com>
2260 * decl.c: Fix typo in function name.
2262 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2265 * parser.c (cp_parser_class_name): Check for invalid typenames.
2269 * pt.c (tsubst_friend_function): Return early if
2270 pushdecl_namespace_level fails.
2273 * typeck.c (convert_arguments): Return error_mark_node instead of
2275 * cp-tree.h (error_mark_list): Remove declaration.
2276 * decl.c (error_mark_list): Remove definition.
2277 (cxx_init_decl_processing): Do not initialize error_mark_list.
2280 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
2281 before calling convert_to_reference.
2282 * cvt.c (convert_to_reference): Assert that reftype is a
2285 2006-04-19 Mark Mitchell <mark@codesourcery.com>
2288 * class.c (currently_open_class): Tidy.
2289 * decl.c (grokdeclarator): If we encounter an erroneous
2290 declarator, assume that we have already issued an error message
2291 and return. Return error_mark_node instead of NULL_TREE in more
2292 places. Issue errors about function definitions that do not have
2293 a function declarator. Check for complete types for all function
2295 * cp-tree.h (cp_error_declarator): Remove.
2296 (currently_open_class): Change return type.
2297 * parser.c (cp_parser_id_expression): Add optional_p parameter.
2298 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
2299 (cp_parser_id_expression): Likewise.
2300 (cp_parser_unqualified_id): If the name is optional, return
2302 (cp_parser_postfix_dot_deref_expression): Adjust calls.
2303 (cp_parser_type_parameter): Likewise.
2304 (cp_parser_unqualified_id): Likewise.
2305 (cp_parser_direct_declarator): Likewise.
2306 (cp_parser_declarator_id): Add optional_p parameter.
2307 (cp_parser_function_definition_from_specifiers_and_declarator):
2308 Assume that start_function indicates failure only if it has issued
2310 (cp_parser_omp_var_list_no_open): Adjust calls.
2312 2006-04-17 Janis Johnson <janis187@us.ibm.com>
2314 PR c++/26114, c++/26115
2315 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
2316 * class.c (check_field_decls): Ditto.
2318 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2320 * init.c (build_offset_ref): Remove superfluous temporary.
2322 2006-04-16 Mark Mitchell <mark@codesourcery.com>
2325 * typeck.c (finish_class_member_access_expr): Robustify
2327 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
2329 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
2330 * pt.c: Include vecprim.h.
2331 (inline_parm_levels): Change the type to VEC(int,heap) *.
2332 (inline_parm_levels_used): Remove.
2333 (maybe_begin_member_template_processing,
2334 maybe_end_member_template_processing): Use VEC instead of
2337 * cp/call.c: Fix comment typos.
2339 2006-04-12 Mark Mitchell <mark@codesourcery.com>
2341 * parser.c (cp_parser_init_declarator): Initialize local variables
2344 2006-04-12 Roger Sayle <roger@eyesopen.com>
2346 * parser.c (cp_parser_init_declarator): Initialise
2347 is_parenthesized_init to false to avoid compiler warning.
2349 2006-04-11 Mark Mitchell <mark@codesourcery.com>
2351 * cp-tree.h (build_operator_new_call): Adjust prototype.
2352 (build_new_method_call): Likewise.
2353 (build_op_delete_call): Likewise.
2354 * init.c (build_raw_new_expr): New function.
2355 (build_new_1): Pass information as parameters, rather than
2356 bundling it into a NEW_EXPR.
2357 (build_new): Adjust accordingly.
2358 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
2359 (build_delete): Likewise.
2360 * decl.c (finish_destructor_body): Likewise.
2361 * call.c (build_operator_new_call): Return the allocation function
2363 (build_op_delete_call): Take allocation function as parameter.
2364 (build_special_member_call): Adjust call to build_new_method_call.
2365 (build_new_method_call): Return function called.
2366 * pt.c (tsubst_copy_and_build): Adjust call to
2367 build_new_method_call.
2368 * semantics.c (finish_call_expr): Likewise.
2369 * parser.c (cp_parser_postfix_expression): Likewise.
2370 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
2371 "incomplete", not "undefined", types.
2374 * decl.c (grokdeclarator): Remove namespace-handling code for
2375 pointers-to-members.
2376 * parser.c (cp_parser_ptr_operator): Check for qualified names
2380 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
2381 whether or not to look for a pure-specifier.
2382 (cp_parser_member_declaration): Likewise.
2384 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
2386 * decl2.c, pt.c, semantics.c: Fix comment typos.
2388 2006-04-06 Roger Sayle <roger@eyesopen.com>
2390 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
2392 2006-04-05 Jason Merrill <jason@redhat.com>
2394 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
2395 default hidden visibility for anonymous namespace.
2397 2006-03-29 Roger Sayle <roger@eyesopen.com>
2400 * init.c (build_vec_delete_1): Convert BASE pointer's type to
2401 the base pointer type to avoid a type mismatch in the EQ_EXPR.
2403 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
2405 * search.c (maybe_suppress_debug_info): If
2406 flag_emit_class_debug_always then don't suppress.
2408 2006-03-22 Jason Merrill <jason@redhat.com>
2410 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
2411 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
2413 2006-03-21 Jakub Jelinek <jakub@redhat.com>
2416 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
2418 2006-03-21 Jason Merrill <jason@redhat.com>
2421 * parser.c (cp_parser_declaration): Support attributes on
2422 anonymous namespaces.
2423 * name-lookup.c (push_namespace_with_attribs): Anonymous
2424 namespaces default to hidden visibility.
2426 2006-03-20 Jason Merrill <jason@redhat.com>
2428 PR c++/21764, c++/19238
2429 * decl.c (cp_finish_decl): Call determine_visibility later.
2430 (start_preparsed_function): Likewise.
2431 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
2432 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
2433 * name-lookup.h (struct cp_binding_level): Add has_visibility
2435 * name-lookup.c: Include c-pragma.h.
2436 (push_namespace_with_attribs): Split out from push_namespace.
2437 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
2438 (leave_scope): Pop visibility if appropriate.
2439 * decl2.c (determine_visibility_from_class): Split out from...
2440 (determine_visibility): ...here. Handle function scope and
2442 (import_export_decl): Move visibility handling to
2443 determine_visibility_from_class.
2444 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
2445 attributes on namespace declarations.
2447 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2450 * decl.c (grokdeclarator): Do not accept long long double.
2451 Reorganize checks for invalid (combinations of) type modifiers.
2452 Quote modifiers in messages.
2454 2006-03-09 Jason Merrill <jason@redhat.com>
2456 PR c++/16387, c++/16389
2457 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
2458 (cxx_sizeof_or_alignof_expr): Split out from here.
2460 2006-03-09 Diego Novillo <dnovillo@redhat.com>
2462 Merge from gomp-20050608-branch
2464 2006-02-02 Diego Novillo <dnovillo@redhat.com>
2466 * decl.c (pop_labels_1): Use appropriate pointer casting.
2467 (poplevel_named_label_1): Likewise.
2468 (named_label_entry_hash): Likewise.
2469 (named_label_entry_eq): Likewise.
2470 (check_goto): Likewise.
2471 (define_label): Likewise.
2473 2006-01-26 Diego Novillo <dnovillo@redhat.com>
2475 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
2477 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
2478 instead of TREE_CODE/TREE_OPERAND.
2479 * semantics.c: Likewise.
2480 * parser.c: Likewise.
2482 2005-11-10 Diego Novillo <dnovillo@redhat.com>
2484 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
2485 target does not support TLS.
2487 2005-11-09 Jakub Jelinek <jakub@redhat.com>
2489 * decl.c (redeclaration_error_message): Don't error about
2490 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
2493 2005-11-08 Jakub Jelinek <jakub@redhat.com>
2496 * semantics.c (finish_omp_barrier, finish_omp_flush): New
2498 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
2499 (cp_parser_omp_flush): Call finish_omp_flush.
2500 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
2504 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
2506 2005-11-03 Jakub Jelinek <jakub@redhat.com>
2508 * semantics.c (finish_omp_threadprivate): Error on class-scope
2511 2005-11-02 Jakub Jelinek <jakub@redhat.com>
2513 * parser.c (cp_parser_omp_all_clauses): If some clause
2514 type is not allowed, don't remove just one of the
2515 clauses, but all clauses added in that loop round.
2517 * semantics.c (finish_omp_clauses): Fix function
2518 comment. Don't handle non-const or mutable specially,
2519 as const and not mutable is predetermined shared and
2520 that leads to double error. Don't ICE if copyin var is
2524 * parser.c (cp_parser_pragma): Diagnose
2525 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
2528 * semantics.c (finish_omp_threadprivate): Error if V
2529 is automatic variable or has incomplete type.
2531 2005-11-01 Diego Novillo <dnovillo@redhat.com>
2533 * parser.c (cp_parser_omp_all_clauses): Use
2534 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
2536 2005-11-01 Diego Novillo <dnovillo@redhat.com>
2538 * parser.c (cp_parser_omp_all_clauses): When emitting an
2539 error message, remove the invalid clause from the list.
2541 2005-10-31 Diego Novillo <dnovillo@redhat.com>
2543 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
2544 combined parallel+workshare directives.
2546 2005-10-31 Richard Henderson <rth@redhat.com>
2548 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
2549 Use cxx_omp_clause_dtor.
2550 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
2551 (cxx_omp_clause_dtor): New.
2552 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
2553 (cxx_omp_clause_default_ctor): Use it.
2554 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
2556 (cxx_omp_clause_dtor): New.
2557 * semantics.c (finish_omp_clauses): Rewrite cdtor
2558 checking to fill in CP_OMP_CLAUSE_INFO. Don't
2559 specialcase LASTPRIVATE for removal.
2560 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
2561 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
2563 2005-10-28 Jakub Jelinek <jakub@redhat.com>
2565 * semantics.c (finish_omp_threadprivate): If
2566 DECL_RTL_SET_P, call make_decl_rtl again so that
2567 encode_section_info can update SYMBOL_REF's flags.
2569 2005-10-26 Jakub Jelinek <jakub@redhat.com>
2571 * semantics.c (finish_omp_for): Don't segfault if COND
2572 or INCR is NULL. If not calling c_finish_omp_for
2573 right away and one of COND and INCR is NULL, issue
2574 error and don't expand anything.
2577 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
2578 * semantics.c (finish_omp_for): Likewise. Set
2579 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
2580 into the current statement list if not processing
2581 template decl or pass it to c_finish_omp_for.
2583 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
2584 into PRE_BODY statement list. Pass it to finish_omp_for.
2585 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
2586 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
2587 finish_omp_for. Put all the statements into sk_omp
2590 2005-10-25 Jakub Jelinek <jakub@redhat.com>
2593 * parser.c (struct cp_parser): Rename in_iteration_statement
2594 field to in_statement.
2595 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2596 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
2597 (cp_parser_new, cp_parser_begin_omp_structured_block,
2598 cp_parser_end_omp_structured_block,
2599 cp_parser_omp_for_loop): Adjust for
2600 in_iteration_statement renaming.
2601 (cp_parser_selection_statement): Save
2602 parser->in_iteration, or it temporarily with
2603 IN_SWITCH_STMT for the
2604 cp_parser_implicitly_scoped_statement call.
2605 (cp_parser_iteration_statement): Adjust for
2606 in_iteration_statement renaming. Use
2607 IN_ITERATION_STMT rather than true.
2608 (cp_parser_jump_statement): Adjust for
2609 in_iteration_statement renaming and new values. Don't
2610 error on break in a switch statement within OMP_FOR or
2611 OpenMP structured block.
2614 * parser.c (cp_parser_cache_group): Don't stop if next
2615 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
2616 well. If current token is CPP_PRAGMA, consume
2617 everything until CPP_PRAGMA_EOL inclusive.
2619 2005-10-24 Jakub Jelinek <jakub@redhat.com>
2622 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
2623 addition to MODIFY_EXPR.
2625 2005-10-23 Richard Henderson <rth@redhat.com>
2627 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
2629 (begin_bc_block, finish_bc_block): Use it.
2630 (push_context, pop_context): Remove.
2631 (cp_genericize): Don't use them. Assert bc_label is null.
2632 * semantics.c (finish_omp_clauses): Create a fake data
2633 element of TYPE for probing ctors.
2635 2005-10-23 Richard Henderson <rth@redhat.com>
2637 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
2638 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
2639 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
2640 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
2641 * semantics.c (finish_omp_clauses): Look through
2642 arrays when looking up special member calls. Also
2643 remove FIRSTPRIVATE when LASTPRIVATE fails.
2644 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
2645 (cxx_omp_clause_assign_op): New.
2646 * cp-tree.h: Declare them.
2648 2005-10-21 Richard Henderson <rth@redhat.com>
2650 * decl.c (check_previous_goto_1): Return false if error.
2651 (check_switch_goto): Likewise.
2652 (finish_case_label): Don't emit the case label on error.
2653 * parser.c (struct cp_parser): Revert
2654 in_switch_statement_p changes.
2655 (cp_parser_labeled_statement,
2656 cp_parser_selection_statement): Likewise.
2657 (cp_parser_begin_omp_structured_block): Don't save...
2658 (cp_parser_end_omp_structured_block): or restore
2659 in_switch_statement_p.
2661 2005-10-21 Richard Henderson <rth@redhat.com>
2663 * semantics.c (finish_omp_threadprivate): Set
2664 decl_flags.u2sel when necessary.
2666 2005-10-21 Richard Henderson <rth@redhat.com>
2668 * decl.c (poplevel_named_label_1): Restore creation of the
2670 (decl_jump_unsafe): Check for error_mark_node types.
2671 (check_goto): Don't check cdtor_label. Don't use identify_goto.
2672 * semantics.c (finish_return_stmt): Do check_omp_return before
2673 converting to cdtor_label goto.
2675 2005-10-21 Richard Henderson <rth@redhat.com>
2678 * decl.c (check_omp_return): Return false on error.
2679 * cp-tree.h (check_omp_return): Update decl.
2680 * semantics.c (finish_return_stmt): Avoid adding
2683 2005-10-21 Richard Henderson <rth@redhat.com>
2685 * cp-tree.h (struct language_function): Remove
2687 Change x_named_labels to a hashtable.
2688 (check_omp_return): Declare.
2689 * decl.c (struct named_label_use_entry): Rename from
2690 named_label_use_list. Remove label_decl.
2691 (struct named_label_entry): Rename from
2692 named_label_list. Remove old_value and next. Change
2693 in_try_scope and in_catch_scope to bool. Add
2695 (pop_labels_1): New.
2696 (pop_labels): Use it.
2697 (pop_local_label, poplevel_named_label_1): New.
2698 (poplevel): Use them.
2699 (named_label_entry_hash, named_label_entry_eq): New.
2700 (make_label_decl): Create named_labels. Move label
2701 creation bits from lookup_label.
2702 (declare_local_label): Tidy.
2703 (identify_goto): Split out from ...
2704 (check_previous_goto_1): Add exited_omp argument.
2707 (use_label): Merge into...
2708 (check_goto): ... here. Handle omp scopes.
2709 (check_omp_return): New.
2710 (check_previous_gotos): Merge into...
2711 (define_label): ... here.
2712 (save_function_data): Remove x_named_label_uses reference.
2713 (finish_function): Likewise.
2714 * name-lookup.h (sk_omp): New.
2715 * name-lookup.c (begin_scope): Handle it.
2716 * parser.c (cp_parser_omp_for): Don't create extra
2719 (cp_parser_omp_sections): Likewise.
2720 * semantics.c (finish_return_stmt): Call check_omp_return.
2721 (begin_omp_structured_block): Use sk_omp.
2722 (finish_omp_structured_block): Use do_poplevel. Don't build a
2723 MUST_NOT_THROW expression here.
2724 (begin_omp_parallel, finish_omp_parallel): Don't create extra
2725 compound statements.
2727 2005-10-21 Diego Novillo <dnovillo@redhat.com>
2730 * cp/cp-tree.h (struct lang_decl_flags): Add field
2732 (CP_DECL_IS_THREADPRIVATE): Define.
2733 * cp/semantics.c (finish_omp_threadprivate): Set. Do
2734 not error out if CP_DECL_IS_THREADPRIVATE is set
2736 * cp/decl.c (duplicate_decls): Merge
2737 CP_DECL_THREADPRIVATE_P.
2739 2005-10-20 Richard Henderson <rth@redhat.com>
2741 * cp-gimplify.c (cp_gimplify_omp_for): New.
2742 (cp_gimplify_expr): Call it.
2743 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
2744 * parser.c (struct cp_parser): Rename
2745 in_iteration_statement_p to in_iteration_statement and
2746 change to unsigned char. Similarly with
2747 in_switch_statement. Update all users.
2748 (IN_OMP_BLOCK, IN_OMP_FOR): New.
2749 (cp_parser_labeled_statement): Diagnose case labels
2750 binding closer to an openmp block nested than the
2752 (cp_parser_jump_statement): Diagnose break and
2753 continue labels binding closer to an openmp block than
2754 an iteration or switch.
2755 (cp_parser_omp_for_loop): Mark in_iteration_statement
2757 (cp_parser_begin_omp_structured_block): New.
2758 (cp_parser_end_omp_structured_block): New.
2759 (cp_parser_omp_structured_block): Use them.
2760 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
2761 (cp_parser_omp_parallel): Likewise.
2763 2005-10-20 Richard Henderson <rth@redhat.com>
2765 * semantics.c (begin_omp_structured_block): New.
2766 (finish_omp_structured_block): New.
2767 (begin_omp_parallel, finish_omp_parallel): Use them.
2768 * parser.c (cp_parser_omp_structured_block): Likewise.
2769 (cp_parser_omp_for): Likewise.
2770 (cp_parser_omp_sections_scope): Likewise.
2771 * cp-tree.h: Declare them.
2773 2005-10-20 Richard Henderson <rth@redhat.com>
2775 * parser.c (cp_parser_omp_master): Return the statement.
2776 (cp_parser_omp_ordered): Likewise.
2777 (cp_parser_omp_construct): Set the locus for them.
2779 2005-10-19 Richard Henderson <rth@redhat.com>
2781 * semantics.c (finish_omp_atomic): Revert to
2782 uses_template_parms.
2784 2005-10-19 Richard Henderson <rth@redhat.com>
2786 * semantics.c (finish_omp_clauses): Avoid
2787 DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some
2788 stub asserts guaranteed to fail.
2790 2005-10-19 Richard Henderson <rth@redhat.com>
2792 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
2793 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
2794 * parser.c (cp_parser_omp_clause_copyin): Remove.
2795 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
2796 Call finish_omp_clauses.
2797 (cp_parser_omp_clause_if): Don't do error checking here.
2798 (cp_parser_omp_clause_num_threads): Likewise.
2799 (cp_parser_omp_clause_schedule): Likewise.
2800 (cp_parser_omp_atomic): Use finish_omp_atomic.
2801 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
2802 Don't decompose assignment statment here. Use
2805 * pt.c (tsubst_omp_clauses): New.
2806 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
2807 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
2808 * semantics.c (finish_omp_clauses): New.
2809 (begin_omp_parallel, finish_omp_parallel): Know Less about the
2810 internals of the stmt_list stack.
2811 (finish_omp_for, finish_omp_atomic): New.
2813 2005-10-18 Jakub Jelinek <jakub@redhat.com>
2815 * semantics.c (cxx_omp_predetermined_sharing): New function.
2816 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
2818 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
2820 2005-10-18 Richard Henderson <rth@redhat.com>
2822 * parser.c (cp_parser_omp_single): Use make_node and accessors
2825 2005-10-17 Richard Henderson <rth@redhat.com>
2827 * parser.c (cp_parser_omp_for_loop): Handle declarations.
2829 2005-10-12 Richard Henderson <rth@redhat.com>
2831 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
2832 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
2833 (finish_omp_threadprivate): Declare.
2834 * parser.c (struct cp_lexer): Add in_pragma.
2835 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
2837 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
2838 (cp_parser_skip_to_end_of_statement): Likewise.
2839 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2840 (cp_parser_skip_to_closing_brace): Likewise.
2841 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
2842 (cp_parser_require_pragma_eol): New.
2843 (cp_parser_statement): Add in_compound argument;
2845 Restart if a non-statement pragma seen outside a
2847 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
2848 (cp_parser_declaration_seq_opt): Likewise.
2849 (cp_parser_member_specification_opt): Likewise.
2850 (cp_parser_function_definition_after_decl): Likewise.
2851 (cp_parser_skip_until_found): Likewise.
2852 (cp_parser_cache_group): Likewise.
2853 (enum pragma_omp_clause, cp_parser_omp_clause_name,
2854 check_no_duplicate_clause,
2855 cp_parser_omp_var_list_no_open,
2856 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
2857 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
2858 cp_parser_omp_clause_nowait,
2859 cp_parser_omp_clause_num_threads,
2860 cp_parser_omp_clause_ordered,
2861 cp_parser_omp_clause_reduction,
2862 cp_parser_omp_clause_schedule,
2863 cp_parser_omp_all_clauses,
2864 cp_parser_omp_structured_block, cp_parser_omp_atomic,
2865 cp_parser_omp_barrier, cp_parser_omp_critical,
2866 cp_parser_omp_flush, cp_parser_omp_for_loop,
2867 cp_parser_omp_for, cp_parser_omp_master,
2868 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
2869 cp_parser_omp_sections, cp_parser_omp_parallel,
2870 cp_parser_omp_single, cp_parser_omp_threadprivate,
2871 cp_parser_omp_construct): New.
2872 (cp_parser_pragma): Handle OpenMP pragmas.
2873 * semantics.c (finish_omp_threadprivate): New.
2874 (begin_omp_parallel, finish_omp_parallel): New.
2876 2005-10-11 Richard Henderson <rth@redhat.com>
2878 * parser.c (struct cp_token): Add pragma_kind.
2879 (eof_token): Initialize it.
2880 (cp_lexer_handle_pragma): Remove.
2881 (cp_parser_initial_pragma): New.
2882 (cp_lexer_new_main): Use it.
2883 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
2884 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
2885 (cp_parser_skip_to_pragma_eol): New.
2886 (cp_parser_error): Use it.
2889 2005-10-09 Richard Henderson <rth@redhat.com>
2891 * lex.c (parse_strconst_pragma): Update for c_lex name change.
2892 (handle_pragma_java_exceptions): Likewise.
2893 * parser.c (cp_lexer_new_main): Likewise.
2895 2005-10-06 Richard Henderson <rth@redhat.com>
2897 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
2898 (cp_lexer_handle_pragma): Comment out
2899 cpp_handle_deferred_pragma.
2901 2005-10-01 Richard Henderson <rth@redhat.com>
2903 * name-lookup.c (lookup_name): Remove prefer_type argument.
2904 (lookup_name_prefer_type): New function.
2905 * name-lookup.h (lookup_name_prefer_type): Declare it.
2906 * decl.c (lookup_and_check_tag): Use it.
2907 * pt.c (tsubst_friend_class): Likewise. Update for
2909 (lookup_template_class, tsubst_copy_and_build): Likewise.
2911 2006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2914 * tree.c (bot_manip): Don't call mark_used.
2916 2006-03-02 Mike Stump <mrs@apple.com>
2918 * decl2.c (import_export_decl): Remove redundant call to
2919 targetm.cxx.key_method_may_be_inline ().
2921 2006-03-02 Richard Sandiford <richard@codesourcery.com>
2923 * decl.c (start_decl): Use have_global_bss_p when deciding
2924 whether to make the decl common.
2926 2006-03-01 Mike Stump <mrs@apple.com>
2929 * decl2.c (import_export_decl): Fix ABI breakage on darwin.
2931 2006-02-24 Geoffrey Keating <geoffk@apple.com>
2933 * except.c (expand_start_catch_block): Handle
2934 flag_use_cxa_get_exception_ptr.
2936 2006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2939 * decl.c (grok_op_properties): Check for ellipsis in arguments of
2942 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2944 * Make-lang.in (C++): Remove.
2945 (.PHONY): Remove C++.
2947 2006-02-18 Mark Mitchell <mark@codesourcery.com>
2950 * cp-tree.h (cp_finish_decl): Adjust declaration.
2951 (grokbitfield): Likewise.
2952 (finish_static_data_member_decl): Likewise.
2953 * init.c (constant_value_1): Ensure processing_template_decl when
2954 folding non-dependent initializers for static data members of
2955 dependent types. Return error_mark_node for erroneous
2957 * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
2958 * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
2959 (cp_finish_decl): Add init_const_expr_p parameter. Set
2960 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2961 (finish_decl): Adjust call to cp_finish_decl.
2962 (compute_array_index_type): Robustify.
2963 (start_method): Use finish_decl, not cp_finish_decl.
2964 * rtti.c (emit_tinfo_decl): Likewise.
2965 * except.c (initialize_handler_parm): Adjust call to
2967 (expand_start_catch_block): Likewise.
2968 * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
2969 * pt.c (instantiate_class_template): Adjust call to
2970 finish_static_data_member_decl.
2971 (tsubst_expr): Use finish_decl, not cp_finish_decl.
2972 (instantiate_decl): Adjust call to cp_finish_decl.
2973 * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
2975 * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
2977 (grokfield): Likewise.
2978 * parser.c (cp_parser_condition): Check for constant initializers.
2979 (cp_parser_init_declarator): Adjust calls to grokfield and
2980 cp_finish_decl. Don't set
2981 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2982 (cp_parser_member_declaration): Likewise.
2983 (cp_parser_objc_class_ivars): Likewise.
2985 2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2987 * call.c (standard_conversion): Return NULL instead of 0.
2988 (build_user_type_conversion_1): Likewise.
2989 (tourney): Likewise.
2990 * decl.c (redeclaration_error_message): Likewise.
2991 * error.c (language_to_string): Likewise.
2993 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2995 * cp-tree.h (warn_hidden): Remove prototype.
2996 * class.c (warn_hidden): Make static.
2998 * cp-tree.h (build_type_conversion): Remove prototype.
2999 * cvt.c (build_type_conversion): Add prototype, make static.
3001 * cp-tree.h (push_tinst_level): Remove prototype.
3002 (pop_tinst_level): Likewise.
3003 * pt.c (push_tinst_level): Add prototype, make static.
3004 (pop_tinst_level): Likewise.
3006 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3008 * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
3009 * typeck.c (unary_complex_lvalue): Likewise.
3011 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3013 * lex.c (parse_strconst_pragma): Return error_mark_node instead of
3014 "(tree)-1" to indicate failure. Simplify.
3015 (handle_pragma_interface): Test for error_mark_node instead of
3017 (handle_pragma_implementation): Likewise.
3019 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3022 * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
3023 decl-specifiers. Remove extra check for duplicate 'friend'.
3024 * decl.c (grokdeclarator): Remove check for duplicate
3025 decl-specifiers. Set longlong together with long_p.
3027 2006-02-12 Jason Merrill <jason@redhat.com>
3030 * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
3031 TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
3033 2006-02-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3035 * class.c (debug_class): Remove extern.
3036 (debug_thunks): Likewise.
3038 2006-02-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
3040 * typeck.c (string_conv_p): Don't test for flag_const_strings.
3042 2006-02-08 Jason Merrill <jason@redhat.com>
3045 * cp-gimplify.c (cp_gimplify_expr): Don't call
3046 cp_gimplify_init_expr for MODIFY_EXPRs.
3047 * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
3049 2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3052 * decl.c (grokdeclarator): Set dname also for destructor.
3055 * decl.c (grokdeclarator): Clear storage_class together with staticp.
3057 2006-02-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3059 * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
3060 (cp_build_qualified_type): Propogate renaming.
3061 * call.c (convert_like_real): Likewise.
3062 * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
3063 * decl.c (make_typename_type, grokdeclarator): Likewise.
3064 * pt.c (tsubst_friend_function, instantiate_class_template,
3065 tsubst_default_argument, instantiate_decl,
3066 tsubst_initializer_list, tsubst_enum): Likewise.
3067 * semantics.c (finish_template_type): Likewise.
3068 * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
3070 2006-02-07 Dirk Mueller <dmueller@suse.com>
3072 * typeck.c (build_binary_op): Annotate div-by-zero
3073 warnings to make -Wno-div-by-zero have an effect.
3075 2006-02-07 Mark Mitchell <mark@codesourcery.com>
3078 * pt.c (coerce_template_template_parms): Do not templates with
3079 excess default arguments to match template template parameters
3080 with fewer parameters.
3081 (coerce_template_parms): Add use_default_args parameter; use
3082 default arguments only when true.
3083 (lookup_template_class): Adjust call to coerce_template_parms.
3084 (fn_type_unification): Likewise.
3086 (get_bindings): Likewise.
3087 (dependent_type_p): Add assertions.
3089 2006-02-06 Roger Sayle <roger@eyesopen.com>
3091 * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
3092 * rtti.c (typeinfo_in_lib_p): Likewise.
3093 * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
3094 * name-lookup.c (arg_assoc_type): Likewise.
3096 2006-02-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3098 * cp-tree.h (tf_warn_or_error): New substituion flag.
3099 (cp_build_qualified_type): Use it.
3100 * call.c (convert_like_real): Likewise.
3101 * cvt.c (cp_convert_to_pointer): Likewise.
3102 (convert_to_reference): Likewise.
3103 * decl.c (make_typename_type): Likewise.
3104 (grokdeclarator): Likewise.
3105 * pt.c (tsubst_friend_function): Likewise.
3106 (tsubst_friend_class): Likewise.
3107 (instantiate_class_template): Likewise.
3108 (tsubst_default_argument): Likewise.
3109 (instantiate_decl): Likewise.
3110 (tsubst_initializer_list): Likewise.
3111 (tsubst_enum): Likewise.
3112 * semantics.c (finish_template_type): Likewise.
3113 * typeck.c (build_ptrmemfunc): Likewise.
3114 (convert_for_assignment): Likewise.
3116 2006-02-03 Lee Millward <lee.millward@gmail.com>
3118 * typeck.c (string_conv_p): Pass appropiate
3119 OPT_Wxxxx values when calling warning().
3120 (build_array_ref, cxx_mark_addressable): Likewise.
3121 (check_return_expr): Likewise.
3123 * init.c (perform_member_init): Likewise.
3124 (sort_mem_initializers, emit_mem_initializers): Likewise.
3126 * class.c (check_field_decls): Likewise.
3127 (warn_about_ambiguous_bases): Likewise.
3129 * decl.c (pop_label, poplevel): Likewise.
3130 (duplicate_decls, grok_op_properties): Likewise.
3131 (start_preparsed_function, finish_function): Likewise.
3133 * name-lookup.c (pushdecl_maybe_friend): Likewise.
3134 (pushdecl_maybe_friend): Likewise.
3136 * parser.c (cp_parser_warn_min_max): Likewise.
3137 (cp_parser_cast_expression): Likewise.
3139 * method.c (lazily_declare_fn): Likewise.
3140 * cvt.c (convert_to_void): Likewise.
3141 * mangle.c (finish_mangling): Likewise.
3142 * cp-gimplify.c (gimplify_expr_stmt): Likewise.
3144 2006-02-03 Mark Mitchell <mark@codesourcery.com>
3146 * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
3147 not IDENTIFIER_OPNAME_P.
3149 2006-01-31 Mark Mitchell <mark@codesourcery.com>
3152 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
3154 * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
3156 (instantiate_class_template): Simplify.
3157 (verify_class_unification): Remove.
3158 (unify): Document parameters. Use INNERMOST_TEMPLATE_ARGS to
3159 permit multiple levels of template arguments.
3160 (more_specialized_class): Simplify.
3161 (get_class_bindings): Pass full arguments to unify. Fold
3162 verify_class_unification into this function. Return full
3164 (most_specialized_class): Adjust for changes to
3165 get_class_bindings. Issue errors here for ambiguity. Return the
3166 fully deduced arguments for the most specialized class, in
3167 addition to the partial specialization.
3169 2006-01-31 Ben Elliston <bje@au.ibm.com>
3171 * mangle.c: Comment fix.
3173 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3175 * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
3176 * repo.c (extract_string, afgets): Use cast when converting from
3179 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3181 * call.c (alloc_conversion): Use cast when converting from void *.
3182 (alloc_conversions): Likewise.
3183 (add_candidate): Likewise.
3184 (print_z_candidates): Likewise.
3185 (add_warning): Likewise.
3186 * pt.c (retrieve_local_specialization): Likewise.
3187 (process_partial_specialization): Likewise.
3188 (mangle_class_name_for_template): Likewise.
3189 (tsubst_template_args): Likewise.
3190 * typeck2.c (pat_calc_hash): Likewise.
3191 (pat_compare): Likewise.
3192 (abstract_virtuals_error): Likewise.
3193 * class.c (method_name_cmp): Likewise.
3194 (resort_method_name_cmp): Likewise.
3195 (get_vfield_name): Likewise.
3196 * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
3197 * lex.c (init_reswords): Likewise.
3198 * rtti.c (create_pseudo_type_info): Likewise.
3199 * search.c (dfs_lookup_base): Likewise.
3200 (dfs_dcast_hint_pre): Likewise.
3201 (dfs_dcast_hint_post): Likewise.
3202 * tree.c (hash_tree_cons): Likewise.
3203 * repo.c (extract_string): Likewise.
3205 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
3206 * g++spec.c (lang_specific_driver): Likewise.
3208 2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3210 * call.c (joust): Pass option code to warning. Use inform for
3212 * class.c (check_bases): Likewise.
3213 (maybe_warn_about_overly_private_class): Likewise.
3214 (check_field_decls): Likewise.
3215 (layout_empty_base): Likewise.
3216 (layout_virtual_bases): Likewise.
3217 (layout_class_type): Likewise.
3219 2006-01-28 Mark Mitchell <mark@codesourcery.com>
3222 * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
3224 (start_function): ... here.
3226 2006-01-28 Mark Mitchell <mark@codesourcery.com>
3229 * class.c (resolve_address_of_overloaded_function): Adjust use of
3230 return value from most_specialized_instantiation.
3231 * pt.c (determine_specialization): Avoid multiple calls to
3233 (most_specialized_instantiation): When a tie occurs, set the
3234 current presumed champion to the next template. Return the
3235 TREE_LIST node containing the template, rather than the template
3237 (most_specialized): Remove.
3238 * name-lookup.c (push_overloaded_decl): When duplicate_decls
3239 indicates a failed redeclaration, report that to callers.
3241 2006-01-26 Jason Merrill <jason@redhat.com>
3244 * name-lookup.c (parse_using_directive): Require strong using to
3245 name a nested namespace.
3247 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3250 * cp-tree.h (do_poplevel): Remove prototype.
3251 * semantics.c (do_poplevel): Add prototype. Make static.
3254 * cp-tree.h (default_conversion): Remove prototype.
3255 * typeck.c (default_conversion): Make static.
3257 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3259 * cp-tree.h (get_primary_binfo): Remove prototype.
3260 (push_using_decl): Likewise.
3261 (current_template_args): Likewise.
3262 (more_specialized_class): Likewise.
3263 (mark_class_instantiated): Likewise.
3264 (default_conversion): Likewise.
3265 (pfn_from_ptrmemfunc): Likewise.
3266 * class.c (get_primary_binfo): Add prototype, make static, simplify.
3267 * name-lookup.c (push_using_decl): Make static.
3268 * pt.c (current_template_args): Likewise.
3269 (more_specialized_class): Likewise.
3270 (mark_class_instantiated): Likewise.
3271 * typeck.c (default_conversion): Make static.
3272 (pfn_from_ptrmemfunc): Add prototype, make static.
3274 2006-01-24 Dirk Mueller <dmueller@suse.de>
3276 * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
3278 2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3281 * parser.c (cp_parser_unqualified_id): Check that destructor name
3283 * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
3284 Adjust comment. Return early if possible.
3285 Use same_type_p to compare types.
3286 * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
3288 2006-01-24 Mark Mitchell <mark@codesourcery.com>
3290 * semantics.c: Remove outdated comment.
3292 2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3294 * cp-tree.h (do_poplevel): Remove prototype.
3295 * semantics.c (do_poplevel): Add prototype. Make static.
3297 * cp-tree.h (original_type): Remove prototype.
3298 * typeck.c (original_type): Make static.
3300 * cp-tree.h (declare_global_var): Remove prototype.
3301 * decl.c (declare_global_var): Make static.
3303 * cp-tree.h (implicitly_declare_fn): Remove prototype.
3304 * method.c (implicitly_declare_fn): Make static.
3306 * cp-tree.h (fold_decl_constant_value): Remove prototype.
3307 * pt.c (fold_decl_constant_value): Make static.
3309 * cp-tree.h (build_x_delete): Remove prototype.
3310 * init.c (build_vec_delete_1): Call build_op_delete_call directly
3311 and not via build_x_delete.
3312 (build_x_delete): Remove.
3314 * cp-tree.h (get_vtt_name): Remove prototype.
3315 * class.c (get_vtt_name): Remove.
3316 (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
3318 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3320 * rtti.c (build_dynamic_cast): Fix comment.
3322 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3325 * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
3328 2006-01-21 Mark Mitchell <mark@codesourcery.com>
3331 * class.c (build_base_path): Generate a NOP_EXPR instead of a
3332 COMPONENT_REF if the base and derived classes are at the same
3336 * decl.c (begin_destructor_body): Robustify.
3339 * parser.c (cp_parser_direct_declarator): Robustify.
3341 2006-01-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3343 * parser.c (cp_lexer_next_token_is_keyword): Simplify.
3345 * parser.c (clear_decl_specs): Remove prototype.
3347 * parser.c (cp_parser_expression_fn): Remove.
3349 * call.c (add_builtin_candidates): Remove superfluous return.
3350 * name-lookup.c (do_toplevel_using_decl): Likewise.
3351 * parser.c (cp_parser_type_specifier_seq): Likewise.
3352 (cp_parser_save_default_args): Likewise.
3354 2006-01-20 Dirk Mueller <dmueller@suse.com>
3357 * semantics.c (finish_if_stmt): Call empty_body_warning.
3358 * parser.c (cp_parser_implicitly_scoped_statement):
3359 Mark empty statement with an empty stmt.
3361 2006-01-19 Mark Mitchell <mark@codesourcery.com>
3364 * name-lookup.c (do_class_using_decl): Don't try to look up base
3365 classes in templates with dependent base types.
3367 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3370 * pt.c (maybe_process_partial_specialization): Return early on
3373 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3376 * decl.c (start_preparsed_function): Check default arguments
3378 * name-lookup.c (pushdecl_maybe_friend): Check default arguments
3379 of all functions and function templates.
3380 * parser.c (cp_parser_late_parsing_default_args): Check default
3382 * decl2.c (check_default_args): Set missing default arguments to
3385 2006-01-18 Mark Mitchell <mark@codesourcery.com>
3388 * cp-tree.h (push_class_stack): New function.
3389 (pop_class_stack): Likewise.
3390 * class.c (class_stack_node): Add hidden field.
3391 (pushclass): Clear it.
3392 (push_class_stack): New function.
3393 (pop_class_stack): Likewise.
3394 (currently_open_class): Ignore hidden classes.
3395 (currently_open_derived_class): Likewise.
3396 * name-lookup.c (push_to_top_level): Call push_class_stack.
3397 (pop_from_top_level): Call pop_class_stack.
3399 2006-01-18 Kazu Hirata <kazu@codesourcery.com>
3401 * tree.c (find_tree_t, find_tree): Remove.
3402 * cp-tree.h: Remove the prototype for find_tree.
3404 2006-01-18 Jakub Jelinek <jakub@redhat.com>
3406 * search.c (lookup_conversions_r): Fix a pasto.
3408 2006-01-17 Eric Christopher <echristo@apple.com>
3410 * call.c (convert_like_real): When issuing conversion
3411 warnings, depend on OPT_Wconversion.
3412 * cvt.c (build_expr_type_conversion): Ditto.
3414 2006-01-17 Kazu Hirata <kazu@codesourcery.com>
3416 * name-lookup.c (lookup_namespace_name): Remove.
3417 * name-lookup.h: Remove the prototype for
3418 lookup_namespace_name.
3420 2006-01-17 Jakub Jelinek <jakub@redhat.com>
3423 * decl.c (compute_array_index_type): After issuing not an integral
3424 constant-expression error, set size to 1 to avoid ICEs later on.
3426 2006-01-16 Ian Lance Taylor <ian@airs.com>
3428 * parser.c: Include "cgraph.h".
3429 (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
3432 2006-01-16 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3434 * g++spec.c (lang_specific_spec_functions): Remove.
3436 2006-01-15 Gabriel Dos Reis <gdr@integrable-solutions.net>