1 2007-01-28 Andrew Pinski <pinskia@gmail.com>
4 * semantics.c (finish_pseudo_destructor_expr): Check the
5 destrutor name by calling check_dtor_name.
7 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
9 * lex.c (D_CPP0X): Rename.
11 (reswords): D_CPP0X -> D_CXX0X.
12 (init_reswords): Ditto.
13 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
14 of C++0x keywords as identifiers.
16 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
19 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
22 2007-01-23 Ian Lance Taylor <iant@google.com>
24 * typeck.c (convert_for_assignment): Only warn about a = b = c
25 when converting to bool.
27 2007-01-23 Roger Sayle <roger@eyesopen.com>
29 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
31 * typeck.c (ignore_overflows): Remove the remaining uses of
32 TREE_CONSTANT_OVERFLOW.
34 2007-01-20 Jan Hubicka <jh@suse.cz>
36 * decl2.c (start_objects, start_static_storage_duration_function):
37 Do not make the functions uninlinable.
39 2007-01-17 Ian Lance Taylor <iant@google.com>
41 * class.c (add_method): Call VEC_reserve_exact rather than passing
42 a negative size to VEC_reserve.
44 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
47 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
49 2007-01-10 Mark Mitchell <mark@codesourcery.com>
52 * decl.c (make_typename_type): If the qualified name is not a
54 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
57 2007-01-08 Geoffrey Keating <geoffk@apple.com>
59 * rtti.c: Include target.h.
60 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
61 don't emit typeinfo for fundamental types as weak.
62 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
64 2007-01-08 Richard Guenther <rguenther@suse.de>
66 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
68 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
70 * call.c (standard_conversion): Pass flag to
71 vector_types_convertible_p to disallow emission of note.
72 * typeck.c (convert_for_assignment): Pass flag to
73 vector_types_convertible_p to allow emission of note.
74 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
75 to disallow emission of note.
77 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
80 * typeck.c (build_binary_op): Call overflow_warning if
81 TREE_OVERFLOW_P is true for the result and not for any of the
84 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
87 * class.c (add_method): Don't wait until template
88 instantiation time to complain about duplicate methods.
90 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
93 * semantics.c (finish_unary_op_expr): Warn only if result
94 overflowed and operands did not.
96 2007-01-05 Ian Lance Taylor <iant@google.com>
98 * typeck.c (build_binary_op): Warn about comparing a non-weak
101 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
103 * pt.c (tsubst): Propagate the need for structural equality checks
104 when reducing the level of template parameters.
106 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
108 * pt.c: Fix a comment typo.
110 2006-01-02 Ian Lance Taylor <iant@google.com>
112 * semantics.c (maybe_convert_cond): Optionally warn when using an
113 assignment as a condition.
114 * typeck.c (convert_for_assignment): Optionally warn about
115 assigning the result of an assignment to a bool.
117 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
119 * pt.c (canonical_template_parms): Correct typo in comment.
121 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
123 * typeck.c (structural_comptypes): Renamed from "comptypes".
124 (comptypes): Use canonical type information to perform fast type
125 comparison. When VERIFY_CANONICAL_TYPES, verify that the
126 canonical type comparison returns the same results as we would see
127 from the current, structural check. Support COMPARE_STRUCTURAL
128 when we need structural checks.
129 * decl.c (typename_compare): Fix comment.
130 (build_typename_type): TYPENAME_TYPE nodes require structural
131 equality checks, because they resolve different based on the
133 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
134 require structural equality checks (for now).
135 (build_ptrmemfunc_type): Build the canonical pointer to member
137 (compute_array_index_type): Whenever we build a new index type
138 to represent the size of an array in a template, we need to mark
139 this index type as requiring structural equality. This goes for
140 arrays with value-dependent sizes with the current ABI, or all
142 * tree.c (cplus_array_hash): New.
143 (struct cplus_array_info): New.
144 (cplus_array_compare): New.
145 (cplus_array_htab): New.
146 (build_cplus_array_type_1): Use a hash table to cache the array
147 types we build. Build the canonical array type for each array
149 (cp_build_qualified_type_real): When building a cv-qualified array
150 type, use the hash table of array types and build canonical array
152 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
153 use structural equality (for now).
154 * cp-tree.h (COMPARE_STRUCTURAL): New.
155 * pt.c (canonical_template_parms): New.
156 (canonical_type_parameter): New.
157 (process_template_parm): Find the canonical type parameter.
158 (lookup_template_class): When we have named the primary template
159 type, set the canonical type for our template class to the primary
160 template type. If any of the template arguments need structural
161 equality checks, the template class needs structural equality
163 (tsubst): When reducing the level of a template template
164 parameter, we require structural equality tests for the resulting
165 parameter because its template parameters have not had their types
166 canonicalized. When reducing a template type parameter, find the
167 canonical reduced type parameter.
168 (any_template_arguments_need_structural_equality_p): New.
170 2006-12-31 Simon Martin <simartin@users.sourceforge.net>
173 * parser.c (cp_parser_primary_expression): Return error_mark_node when
174 a statement-expression is found outside of a function body.
176 2006-12-28 Kazu Hirata <kazu@codesourcery.com>
178 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P, TYPE_FUNCTION_SCOPE_P):
181 * decl2.c: Fix a comment typo.
183 2006-12-21 Andrew Pinski <pinskia@gmail.com>
186 * decl.c (cxx_builtin_function): Only copy the decl if adding
187 it to the std namespace.
189 2006-12-21 Andrew Pinski <pinskia@gmail.com>
192 * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
194 2006-12-22 Kazu Hirata <kazu@codesourcery.com>
196 * decl.c: Fix a coment typo.
198 2006-12-18 Ian Lance Taylor <iant@google.com>
200 * decl.c (start_preparsed_function): Add support for
201 -Wmissing-declarations.
203 2006-12-16 Simon Martin <simartin@users.sourceforge.net>
206 * cp-tree.h (struct deferred_access_check): New structure to represent a
207 deferred access check. It replaces the previous representation as a tree.
208 (get_deferred_access_checks): Return a vector of struct
209 deferred_access_check instead of a tree list.
210 (perform_access_checks): Take a vector of struct deferred_access_check
211 instead of a tree list.
212 * semantics.c (struct deferred_access): Store the deferred access checks
213 as a vector of struct deferred_access_check instead of a tree list.
214 (push_deferring_access_checks): Handle the change in struct
216 (get_deferred_access_checks): Likewise.
217 (pop_to_parent_deferring_access_checks): Likewise.
218 (perform_or_defer_access_check): Likewise.
219 (perform_access_checks): Take a vector of struct deferred_access_check
220 instead of a tree list.
221 * parser.c (struct tree_check): New structure to store various data
222 associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
223 (struct cp_token): Changed the value field to be a union with a pointer to
224 a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
225 tokens and a tree field for all other tokens.
226 (eof_token): Adjusted due to the change in struct cp_token.
227 (cp_lexer_get_preprocessor_token): Likewise.
228 (cp_lexer_purge_token): Likewise.
229 (cp_lexer_purge_tokens_after): Likewise.
230 (cp_lexer_print_token): Likewise.
231 (cp_parser_error): Likewise.
232 (cp_parser_identifier): Likewise.
233 (cp_parser_string_literal): Likewise.
234 (cp_parser_primary_expression): Likewise.
235 (cp_parser_unqualified_id): Likewise.
236 (cp_parser_parenthesized_expression_list): Likewise.
237 (cp_parser_storage_class_specifier_opt): Likewise.
238 (cp_parser_function_specifier_opt): Likewise.
239 (cp_parser_type_specifier): Likewise.
240 (cp_parser_simple_type_specifier): Likewise.
241 (cp_parser_initializer_list): Likewise.
242 (cp_parser_member_specification_opt): Likewise.
243 (cp_parser_attribute_list): Likewise.
244 (cp_parser_objc_expression): Likewise.
245 (cp_parser_objc_protocol_qualifiers): Likewise.
246 (cp_parser_objc_selector): Likewise.
247 (cp_parser_objc_declaration): Likewise.
248 (cp_parser_objc_statement): Likewise.
249 (cp_parser_omp_clause_name): Likewise.
250 (cp_parser_omp_clause_default): Likewise.
251 (cp_parser_omp_clause_schedule): Likewise.
252 (cp_parser_omp_parallel): Likewise.
253 (cp_parser_initial_pragma): Likewise.
254 (pragma_lex): Likewise.
255 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
256 (cp_parser_nested_name_specifier_opt): Likewise.
257 Use cp_token::u::tree_check_value to save the token's value, the
258 associated deferred checks and its qualifying scope.
259 (cp_parser_template_id): Likewise.
260 (cp_parser_template_declaration_after_export): Adjusted the call to
261 get_deferred_access_checks.
262 (cp_parser_init_declarator): Take the access checks as a vector of struct
263 deferred_access_check instead of a tree list.
264 (cp_parser_single_declaration): Likewise.
265 (cp_parser_perform_template_parameter_access_checks): Likewise.
266 (cp_parser_simple_declaration): Adjusted the call to
267 cp_parser_init_declarator.
268 (cp_parser_explicit_specialization): Adjusted the call to
269 cp_parser_single_declaration.
271 2006-12-13 Ian Lance Taylor <iant@google.com>
275 * parser.c (cp_parser_expression_stack_entry): Add field
277 (cp_parser_binary_expression): Track tree code of left hand side
278 of expression. Use it when calling build_x_binary_op.
279 (cp_parser_selection_statement): Add if_p parameter. Change all
280 callers. Warn about ambiguous else.
281 (cp_parser_statement): Add if_p parameter. Change all callers.
282 (cp_parser_implicitly_scoped_statement): Likewise.
283 * typeck.c (build_x_binary_op): Add parameters arg1_code and
284 arg2_code. Change all callers. Call warn_about_parentheses.
285 * cp-tree.h (build_x_binary_op): Update declaration.
287 2006-12-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
289 * decl.c (build_enumerator): Update error message to match C
292 2006-12-11 Jan Hubicka <jh@suse.cz>
294 * decl2.c (var_finalized_p): Update for renamed varpool functions.
296 2006-12-09 Zack Weinberg <zackw@panix.com>
298 * parser.c (yydebug, enum pragma_omp_clause): Delete.
300 2006-12-07 Mark Mitchell <mark@codesourcery.com>
303 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
304 (explicit_class_specialization_p): Declare.
305 * pt.c (explicit_class_specialization_p): New function.
306 * parser.c (cp_parser_init_declarator): Check correct number of
307 template parameters for in-class function definitions.
308 (cp_parser_check_declrator_template_parameters): Stop looking for
309 template classes when we find an explicit specialization.
311 2006-12-07 Lee Millward <lee.millward@codesourcery.com>
314 * cp_parser_elaborated_type_specifier: Check
315 the return value of check_elaborated_type_specifier.
317 2006-12-06 Mark Mitchell <mark@codesourcery.com>
320 * parser.c (cp_parser_init_declarator): Reject initialization of
323 2006-12-05 Mark Mitchell <mark@codesourcery.com>
326 * decl2.c (check_member_template): Move check for member
327 templates in local classes to ...
328 * parser.c (cp_parser_template_declaration_after_export):
332 * decl.c (check_array_designated_initializer): New function.
333 (maybe_deduce_size_from_array_init): Use it.
334 (reshape_init_array): Likewise.
336 2006-12-05 Aldy Hernandez <aldyh@redhat.com>
338 Merge from gimple-tuples-branch.
340 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
342 * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
343 (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
344 (cxx_omp_clause_copy_ctor): Same.
345 (cxx_omp_clause_assign_op): Same.
347 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
349 * cp-tree.h (union lang_tree_node): Gimple statements do not
351 (TREE_INDIRECT_USING): Look in base.
353 2006-12-04 Jan Hubicka <jh@suse.cz>
355 * cp-objcp-common.c (cp_expr_size): Return NULL in the case
358 2006-12-04 Mark Mitchell <mark@codesourcery.com>
361 * pt.c (tsubst_decl): Disallow variables of function type.
364 * call.c (add_builtin_candidate): Do not permit NULL pointer
365 constants to be compared with template parameters.
367 2006-12-04 Eric Botcazou <ebotcazou@adacore.com>
369 * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
370 Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
372 2006-12-03 Richard Henderson <rth@redhat.com>
373 Andrew Pinski <pinskia@gmail.com>
376 * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
378 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
381 * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
383 2006-12-02 Kazu Hirata <kazu@codesourcery.com>
385 * name-lookup.c: Follow spelling conventions.
387 2006-12-01 Geoffrey Keating <geoffk@apple.com>
389 * decl.c (poplevel): Check DECL_INITIAL invariant.
390 (duplicate_decls): Preserve DECL_INITIAL when eliminating
391 a new definition in favour of an old declaration.
392 (start_preparsed_function): Define and document value of
393 DECL_INITIAL before and after routine.
394 (finish_function): Check DECL_INITIAL invariant.
396 (cp_parser_function_definition_from_specifiers_and_declarator):
397 Skip duplicate function definitions.
399 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
402 * typeck.c (type_after_usual_arithmetic_conversions):
403 Fix assertion for vector types.
404 (build_binary_op): Use temporary for inner type of vector types.
406 2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
409 * typeck.c (build_binary_op): Fix pointer to member function
410 comparison for ptrmemfunc_vbit_in_delta targets.
412 2006-12-01 Dirk Mueller <dmueller@suse.de>
415 * decl.c (grokdeclarator): Warn for type qualifiers on return
416 type for non-dependent types.
417 * pt.c (tsubst_function_type): Warn for type qualifiers on
418 return type for dependent types.
420 2006-11-30 Geoffrey Keating <geoffk@apple.com>
422 * rtti.c (get_tinfo_decl): Handle return value from
423 pushdecl_top_level_and_finish.
425 2006-11-29 Lee Millward <lee.millward@codesourcery.com>
428 * parser.c (cp_parser_class_head): Move processing
429 of any base classes to...
430 (cp_parser_class_specifier) ...here. Take an extra
431 tree* parameter for any base classes. Only process
432 them if the opening brace was found.
434 2006-11-28 Jakub Jelinek <jakub@redhat.com>
437 * decl.c (grokfndecl): Check main's type after applying
438 attributes, not before.
440 2006-11-27 Mark Mitchell <mark@codesourcery.com>
442 * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
443 entries for a primary construction virtual table.
445 2006-11-26 Mark Mitchell <mark@codesourcery.com>
448 * parser.c (cp_parser): Add in_function_body.
449 (cp_parser_new): Initialize it.
450 (cp_parser_primary_expression): Use parser->in_function_body
451 instead of at_function_scope_p.
452 (cp_parser_asm_definition): Likewise.
453 (cp_parser_direct_declarator): Likewise.
454 (cp_parser_class_specifier): Clear parser->in_function_body.
455 (cp_parser_constructor_declarator_p): Use parser->in_function_body
456 instead of at_function_scope_p.
457 (cp_parser_function_body_after_declarator): Set
458 parser->in_function_body.
460 2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
462 * cp-tree.def (STATIC_ASSERT): New.
463 * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
464 * error.c (dump_decl): Handle STATIC_ASSERT.
465 * cp-tree.h (STATIC_ASSERT_CONDITION): New.
466 (STATIC_ASSERT_MESSAGE): New.
467 (STATIC_ASSERT_SOURCE_LOCATION): New.
468 (struct tree_static_assert): New.
469 (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
470 (union lang_tree_node): Add static_assertion.
471 (finish_static_assert): Declare.
472 * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
473 (pp_cxx_declaration): Handle STATIC_ASSERT.
474 * pt.c (instantiate_class_template): Handle
475 STATIC_ASSERT members.
476 (tsubst_expr): Handle STATIC_ASSERT statements.
477 * semantics.c (finish_static_assert): New.
478 * lex.c (D_CPP0X): New.
479 (reswords): Add static_assert keyword.
480 (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
481 * parser.c (cp_parser_block_declaration): Parse static
483 (cp_parser_static_assert): New.
484 (cp_parser_member_declaration): Parse static assertions.
486 2006-11-21 Jakub Jelinek <jakub@redhat.com>
489 * decl.c (cp_finish_decl): Check for value dependent brace enclosed
493 * cp-tree.h (WANT_VECTOR): Define.
494 (WANT_ARITH): Add WANT_VECTOR.
495 * cvt.c (build_expr_type_conversion): Handle vector types.
496 * typeck.c (build_unary_op): Add WANT_VECTOR to
497 build_expr_type_conversion flags.
499 2006-11-20 Simon Martin <simartin@users.sourceforge.net>
502 * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
503 extra argument that represents the declaration to use to print
504 potential error messages.
505 * init.c (build_offset_ref): Adjusted the call to
506 perform_or_defer_access_check.
507 * class.c (alter_access, resolve_address_of_overloaded_function):
509 * decl.c (make_typename_type, make_unbound_class_template): Likewise.
510 * search.c (lookup_member): Likewise.
511 * friend.c (add_friend): Likewise.
512 * parser.c (cp_parser_template_id,
513 cp_parser_pre_parsed_nested_name_specifier): Likewise.
514 * semantics.c (finish_non_static_data_member,
515 check_accessibility_of_qualified_id, finish_id_expression): Likewise.
516 (pop_to_parent_deferring_access_checks, perform_access_checks,
517 perform_or_defer_access_check): Adjusted the call to enforce_access.
518 * call.c (enforce_access): Use the new extra argument to build the
520 (build_op_delete_call): Adjusted the call to
521 perform_or_defer_access_check.
522 (build_over_call): Likewise.
524 2006-11-16 Dirk Mueller <dmueller@suse.de>
526 * name-lookup.c (begin_scope): Use GGC_CNEW instead of
529 2006-11-13 Roger Sayle <roger@eyesopen.com>
531 * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
532 base type info initializer has the correct type.
534 2006-11-13 Mark Mitchell <mark@codesourcery.com>
537 * pt.c (coerce_template_parms): Do not skip_evaluation while
538 substituting template arguments.
540 2006-11-11 Richard Guenther <rguenther@suse.de>
542 * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
543 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
545 2006-11-03 Roger Sayle <roger@eyesopen.com>
547 * call.c (build_op_delete_call): Test user-visible type against
548 size_type_node, instead of against the internal type, sizetype.
549 * class.c (type_requires_array_cookie): Likewise.
550 * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
551 handling of TYPE_IS_SIZETYPE.
552 * typeck.c (type_after_usual_arithmetic_conversions): Remove
553 special case handling of TYPE_IS_SIZETYPE.
554 (comptypes): Likewise.
556 2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
558 * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
559 if targetm.cxx.use_atexit_for cxa_atexit.
560 (start_cleanup_fn): Likewise.
561 (register_dtor_fn): Likewise.
563 2006-09-25 Geoffrey Keating <geoffk@apple.com>
565 * decl2.c (cp_write_global_declarations): Rename from
567 * cp-lang.c (finish_file): Don't call cp_finish_file.
568 * cp-tree.h (cp_write_global_declarations): Rename from
570 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
571 cp_write_global_declarations.
573 2006-10-31 Geoffrey Keating <geoffk@apple.com>
575 * name-lookup.c (get_anonymous_namespace_name): New.
576 (push_namespace_with_attribs): Use get_anonymous_namespace_name.
577 * decl2.c (start_objects): Update for rename of
578 get_file_function_name_long.
580 2006-10-30 Dirk Mueller <dmueller@suse.de>
583 * decl.c (grokdeclarator): Duplicate diagnostic message
584 for easier translation.
585 * decl.c (grokdeclarator): Fix line-wrapping.
587 2006-10-30 Dirk Mueller <dmueller@suse.de>
590 * decl.c (grokfndecl): Use check_main_parameter_types.
592 2006-10-30 Dirk Mueller <dmueller@suse.de>
595 * decl.c (grokfndecl): Duplicate warning message for
598 2006-10-30 Dirk Mueller <dmueller@suse.de>
600 * typeck.c (build_unary_op): Fix indenting. Use G_().
602 2006-10-29 Dirk Mueller <dmueller@suse.de>
605 * typeck.c (build_unary_op): Duplicate warning message
606 for easier translation.
608 2006-10-29 Dirk Mueller <dmueller@suse.de>
611 * typeck.c (build_array_ref): Warn for char subscriptions
614 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
616 * decl.c: Fix a comment typo.
618 2006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
621 * typeck.c (build_unary_op): Use same_type_p when comparing to
624 2006-10-29 Dirk Mueller <dmueller@suse.de>
627 * typeck.c (build_binary_op): Duplicate warning message
628 for better translation.
630 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
632 * decl.c (builtin_function_1): Move common code to
633 add_builtin_function.
634 (builtin_function): Rename to cxx_builtin_function.
635 Change the signature.
636 * call.c: Include langhooks.h.
637 (build_java_interface_fn_ref): Replace calls to
638 builtin_function with add_builtin_function.
639 * Make-lang.in (cp/call.o): Depend on langhooks.h.
640 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
641 cxx_builtin_function.
642 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
643 Change the signature.
645 2006-10-22 Nathan Sidwell <nathan@codesourcery.com>
648 * rtti.c (tinfo_base_init): The type info string is always global.
650 2006-10-20 Lee Millward <lee.millward@codesourcery.com>
651 Mark Mitchell <mark@codesourcery.com>
654 * decl2.c (grokbitfield): Detect invalid non-integral
655 types earlier when possible.
657 2006-10-18 Mark Shinwell <shinwell@codesourcery.com>
660 * typeck2.c (digest_init): Raise error upon attempts to
661 initialize arrays with variables.
663 2006-10-17 Lee Millward <lee.millward@codesourcery.com>
666 * cp-tree.h (xref_basetypes): Return bool instead of void.
667 * decl.c (xref_basetypes): Adjust definition. Return false
668 if the class bases are invalid.
669 * parser.c (cp_parser_class_head): Check the return value
672 2006-10-17 Mark Mitchell <mark@codesourcery.com>
675 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
679 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
681 (cp_parser_constructor_declarator_p): Use it.
682 (cp_parser_check_type_definition): Return a value indicating
683 whether or not the definition is valid.
684 (cp_parser_enum_specifier): Skip invalid enum definitions.
686 2006-10-17 Mark Mitchell <mark@codesourcery.com>
689 * typeck2.c (build_functional_cast): Don't zero-initialize
690 non-PODs; instead, call their constructors.
691 * method.c (synthesize_method): Always build mem-initializers, if
692 we're synthesizing the default constructor.
694 2006-10-17 Mark Mitchell <mark@codesourcery.com>
697 * decl.c (reshape_init_class): Move check for designated
699 * parser.c (cp_parser_initializer_list): ... here.
700 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
702 2006-10-16 Mark Mitchell <mark@codesourcery.com>
705 * typeck2.c (process_init_constructor_array): Reword comment.
706 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
710 * parser.c (cp_parser_using_declaration): Stop parsing when
711 something goes wrong with an access declaration.
714 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
715 types when their sizes are required. Refine test for VLAs.
718 * parser.c (cp_parser_template_argument): Don't consider "&var" a
719 possible constant-expression.
720 * pt.c (convert_nontype_argument): Refine handling of arguments of
723 2006-10-13 Mark Mitchell <mark@codesourcery.com>
726 * parser.c (function_declarator_p): New function.
727 (cp_parser_init_declarator): Use it.
728 (cp_parser_member_declaration): Likewise.
730 2006-10-12 Mark Mitchell <mark@codesourcery.com>
733 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
734 variably modified types.
736 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
739 * decl.c (start_decl): Return error_mark_node if a
740 function is initialized like a variable.
741 (check_var_type): If a variable of field is declared void,
742 set the type to error_mark_node.
743 (grokdeclarator): Check the return type of check_var_type.
744 * class.c (finish_struct_1): Robustify.
746 2006-10-11 Mark Mitchell <mark@codesourcery.com>
749 * decl.c (check_initializer): Issue errors about trying to
750 initialize arrays whose elements have variable size.
752 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
755 * cp-tree (struct cp_decl_specifier_seq): Rename to
756 conflicting_specifiers_p
757 * parser.c (cp_parser_set_storage_class): Set
758 conflicting_specifiers_p for the input decl specifier
759 if a typedef specifier is present. Rename uses of
760 multiple_specifiers_p to conflicting_specifiers_p.
761 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
762 class specifier has already been set for this declaration,
763 set conflicting_specifiers_p to true on the decl_specs.
764 * decl.c (grokdeclarator): Rename uses of
765 multiple_specifiers_p to conflicting_specifiers_p.
767 2006-10-10 Brooks Moses <bmoses@stanford.edu>
769 * Make-lang.in: Added "c++.pdf" target support.
771 2006-10-10 Richard Guenther <rguenther@suse.de>
773 PR rtl-optimization/29323
774 * decl.c (finish_function): Set TREE_NOTHROW only for
775 functions that bind local.
777 2006-10-09 Richard Henderson <rth@redhat.com>
781 2006-10-04 Richard Henderson <rth@redhat.com>
782 Jakub Jelinek <jakub@redhat.com>
784 * decl.c (grokvardecl): Don't error if !have_tls.
785 (grokdeclarator): Likewise.
786 * parser.c (cp_parser_omp_threadprivate): Likewise.
788 2006-10-03 Mark Mitchell <mark@codesourcery.com>
791 * friend.c (do_friend): Improve comments; add assertion.
792 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
793 typenames for qualified names used in declarations, even when
794 caching qualified name lookup.
797 * decl2.c (grokfield): Don't handle access declarations here.
798 * parser.c (cp_parser_using_declaration): Handle access
800 (cp_parser_block_declaration): Adjust calls to
801 cp_parser_using_declaration.
802 (cp_parser_member_declaration): Likewise. Use
803 cp_parser_using_declaration to look for access_declarations.
805 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
808 * init.c (build_new): Check for invalid init.
810 2006-10-02 Mark Mitchell <mark@codesourcery.com>
813 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
814 not try to actually evaluate sizeof for a VLA type.
816 2006-10-01 Mark Mitchell <mark@codesourcery.com>
819 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
820 * semantics.c (baselink_for_fns): Build a baselink, even when
821 processing a template.
824 * parser.c (cp_parser_postfix_dot_deref_expression): Use
825 BASELINK_ACCESS_BINFO as the qualifying scope when calling
826 adjust_result_of_qualified_name_lookup.
828 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
832 * cp-tree.h (redeclare_class_template): Adjust declaration
833 to return bool instead of void.
834 * pt.c (redeclare_class_template): Update definition.
835 Return false on error.
836 * decl.c (xref_tag): Return error_mark_node if
837 redeclare_class_template returned false.
840 * cp-tree.h (begin_specialization): Return bool
842 * pt.c (check_specialization_scope): Likwise.
843 Adjust comment. Return false if a specialization
844 isn't permitted in the current scope.
845 (begin_specialization): Use the return value of
846 check_specialization_scope.
847 * parser.c (cp_parser_explicit_specialization): If
848 begin_specialization returned false, skip the rest
849 of the specialization.
851 2006-09-21 Mark Mitchell <mark@codesourcery.com>
854 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
857 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
860 * decl.c (shadow_tag): Return error_mark_node
861 if maybe_process_partial_specialization failed.
864 * decl.c (grokdeclarator): Return error_mark_node on
865 declaration with two or more data types.
867 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
870 * class.c (check_for_override): Remove dllimport from virtual
873 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
876 * parser.c (cp_parser_labeled_statement): Return nothing. Do
877 not take in_statement_expr and in_compound as arguments. Rename
878 to cp_parser_label_for_labeled_statement. Parse only the label,
880 (cp_parser_statement): Parse the statement of a labeled-statement
881 from here, using tail recursion.
883 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
886 * init.c (build_zero_init): If we have an error mark node for
887 the array size, return.
889 2006-09-10 Mark Mitchell <mark@codesourcery.com>
892 * cp-objcp-common.c (cxx_staticp): New function.
893 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
894 * cp-tree.h (cxx_staticp): New function.
896 2006-09-09 Jason Merrill <jason@redhat.com>
899 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
901 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
904 * parser.c (cp_parser_skip_until_found): Rename to
905 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
906 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
907 Reorganize. Adjust comment.
908 (cp_parser_template_declaration_after_export): Adjust call.
909 (cp_parser_enclosed_template_argument_list): Likewise.
911 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
914 * init.c (build_new_1): Build a distinct type copy
915 for the array type that was returned from
916 build_cplus_array_type.
918 2006-09-07 Jason Merrill <jason@redhat.com>
921 * cvt.c (convert_to_void): Enable previous change.
924 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
927 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
930 * pt.c (fold_non_dependent_expr): Make sure expr is not
931 dereferenced if it is NULL.
933 2006-09-06 Zak Kipling <zak@transversal.com>
936 * decl.c (make_rtl_for_nonlocal_decl),
937 (start_preparsed_function): Don't use lbasename on
938 input_filename when calling get_fileinfo.
939 * semantics.c (begin_class_definition): Likewise.
940 * lex.c (cxx_make_type): Likewise.
941 (handle_pragma_interface): Call get_fileinfo on input_filename,
942 not on the parameter to the directive.
944 2006-09-06 Mark Mitchell <mark@codesourcery.com>
947 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
951 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
954 2006-09-06 Jason Merrill <jason@redhat.com>
957 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
958 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
959 * tree.c (build_cplus_new): Set it.
962 * cvt.c (convert_to_void): Replace a subexpression with no side
963 effects with void_zero_node.
964 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
965 (get_first_fn): Ditto.
966 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
968 2006-09-05 Jason Merrill <jason@redhat.com>
971 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
972 where the name is a type used incorrectly.
975 * typeck.c (maybe_warn_about_returning_address_of_local): Look
976 through COMPONENT_REF and ARRAY_REF.
979 * name-lookup.c (do_class_using_decl): Try to find the base even
980 if bases_dependent_p.
981 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
984 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
986 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
988 PR 23287 Revert my 2006-09-01 patch.
989 * parser.c: Reverted.
992 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
998 * parser.c (cp_parser_template_parameter_list): Add
999 invalid template parameters to the parameter list as
1002 2006-09-02 Jakub Jelinek <jakub@redhat.com>
1005 * except.c (build_throw): Only set current_function_returns_abnormally
1006 if cfun is not NULL.
1009 * repo.c (repo_file): Remove.
1010 (open_repo_file, reopen_repo_file_for_write): Return fopened
1011 FILE * instead of setting global repo_file variable.
1012 (init_repo): Adjust caller.
1013 (finish_repo): Likewise. Return instead of goto out before
1014 reopen_repo_file_for_write has been called.
1016 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
1019 * semantics.c (finish_call_expr): Add assert.
1020 * name-lookup.c (lookup_arg_dependent): Check we found an overload
1024 * parser.c (cp_parser_id_expression): Add member_p
1025 argument. Update all callers.
1026 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
1027 the object's scope, if valid.
1028 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
1030 (cp_parser_postfix_dot_deref_expression): Set object_scope.
1031 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
1033 2006-08-30 Jason Merrill <jason@redhat.com>
1036 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
1037 the fields have been processed.
1039 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
1042 * call.c (build_x_va_arg): Remove the reference type
1043 from the type before creating the pointer type.
1045 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
1048 * except.c (expand_start_catch_block): Use correct types for bitwise
1051 2006-08-28 Jason Merrill <jason@redhat.com>
1054 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
1055 fields can't be packed.
1058 * cvt.c (convert_to_void): Don't automatically load from volatiles
1059 of TREE_ADDRESSABLE type.
1061 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1064 * cp-tree.h (maybe_process_partial_specialization): Return
1065 tree instead of void.
1066 * parser.c (cp_parser_class_head): Use return value of
1067 maybe_process_partial_specialization.
1068 * pt.c (maybe_process_partial_specialization): Return error_mark_node
1069 for broken specializations, TYPE otherwise. Check for template
1070 template parameters.
1072 2006-08-27 Mark Mitchell <mark@codesourcery.com>
1075 * pt.c (register_specialization): Return error_mark_node for
1076 specialization-after-instantiation.
1077 * decl2.c (mark_used): Mark the main function used when one of its
1080 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
1083 * class.c (check_field_decls): Don't issue error about
1084 local classes containing static data members.
1086 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
1089 * parser.c (struct cp_token): Add input_file_stack_index.
1090 (eof_token): Update.
1091 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
1092 (cp_lexer_set_source_position_from_token): Restore input file
1095 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
1100 * pt.c (process_template_parm): Store invalid template
1101 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
1102 (push_inline_template_parms_recursive): Check for template
1103 parameters having a TREE_VALUE of error_mark_node rather than
1104 check the parameter itself.
1105 (mangle_class_name_for_template): Likewise.
1106 (comp_template_parms): When comparing the individual template
1107 parameters, return 1 if either is error_mark_node.
1108 (current_template_args): Robustify.
1109 (redeclare_class_template): Likewise.
1111 2006-08-26 Mark Mitchell <mark@codesourcery.com>
1114 * class.c (resolve_address_of_overloaded_function): Add
1115 access_path parameter. Perform access checks.
1116 (instantiate_type): Adjust call to
1117 resolve_address_of_overloaded_function. Remove unnecessary code.
1118 * tree.c (is_overloaded_fn): Document. Return 2 when there are
1119 acutally multiple functions.
1120 (really_overloaded_fn): Use is_overloaded_fn.
1121 * mangle.c (write_expression): Handle BASELINKs.
1122 * cp-tree.h (really_overloaded_fn): Return bool.
1123 (baselink_for_fns): Declare.
1124 * search.c (lookup_member): Check access for single static
1126 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
1127 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
1128 * semantics.c (finish_call_expr): Use baselink_for_fns.
1129 (baselink_for_fns): New function.
1130 (finish_id_expression): Use it.
1131 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
1134 * pt.c (tsubst): Issue errors about attempts to create VLAs at
1135 template-instantiation time.
1137 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1140 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
1141 template parameters. Improve error message for template type
1145 * cp-tree.h (grok_op_properties): Return bool instead of void.
1146 * decl.c (grokfndecl): Discard invalid operator declarations.
1147 (copy_fn_p): Revert change for PR 27547.
1148 (grok_op_properties): Return error status (true on success).
1149 * pt.c (tsubst_decl): Discard invalid operator declarations.
1151 2006-08-25 Mark Mitchell <mark@codesourcery.com>
1154 * decl.c (grokdeclarator): Disallow declarations with qualified
1155 names in local scopes.
1157 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
1160 * decl.c (make_typename_type): Only try and resolve it when
1161 context is not dependent. Refactor.
1162 * decl2.c (check_classfn): Push to class scope before looking for
1165 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
1168 * g++spec.c (lang_specific_driver): Always check if we need to
1169 swallow a space-separated arg to '-x'.
1170 * lang-specs.h: Don't create ouput files for '-xc++-header'
1173 2006-08-23 Jason Merrill <jason@redhat.com>
1176 * pt.c (push_template_decl_real): A friend template with class
1177 scope isn't primary.
1179 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
1182 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
1183 Move -fno-rtti check to be more specific.
1185 2006-08-22 Jason Merrill <jason@redhat.com>
1188 * call.c (build_over_call): Don't make a copy here if build_call
1191 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
1194 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
1197 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
1200 * parser.c (cp_parser_postfix_expression): Make sure that the
1201 saved value for parser->type_definition_forbidden_message is
1202 restored before returning to avoid an invalid free().
1204 2006-08-22 Jason Merrill <jason@redhat.com>
1207 * typeck.c (merge_types): If either of the types have the right
1208 attributes, return that one.
1210 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
1211 doing this to class types.
1212 * typeck.c (original_type): Deal with type quals properly.
1214 2006-08-21 Jason Merrill <jason@redhat.com>
1217 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
1218 just leave the expression as it is.
1219 (finish_stmt_expr): If the statement-expression has class type,
1220 wrap it in a TARGET_EXPR.
1221 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
1223 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
1225 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
1228 * decl.c (duplicate_decls): Return early if either
1229 newdecl or olddecl is error_mark_node.
1232 * decl.c (grokdeclarator): Return early after
1233 issuing diagnostic about an incomplete type.
1236 * tree.c (decl_anon_ns_mem_p): Robustify.
1237 * decl2.c (determine_visibility): Likewise.
1239 2006-08-20 Mark Mitchell <mark@codesourcery.com>
1242 * tree.c (cast_valid_in_integral_constant_expression_p): New
1244 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
1245 * pt.c (tsubst_expr): Add integral_constant_expression_p
1247 (fold_non_dependent_expr): Adjust callers of
1248 tsubst_{expr,copy_and_build}.
1249 (tsubst_friend_function): Likewise.
1250 (tsubst_template_arg): Likewise.
1251 (tsubst_default_argument): Likewise.
1252 (tsubst_decl): Likewise.
1254 (tsubst_omp_clasuses): Likewise.
1255 (regenerate_decl_fromp_template): Likewise.
1256 (instantiate_decl): Likewise.
1257 (tsubst_initializer_list): Likewise.
1258 (tsubst_enum): Likewise.
1259 (tsubst_expr): Use RECUR throughout.
1260 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
1261 invalid casts in integral constant expressions.
1262 * parser.c (cp_parser_postfix_expression): Use
1263 cast_valid_in_integral_constant_expression_p.
1264 (cp_parser_cast_expression): Likewise.
1265 (cp_parser_functional_cast): Likewise.
1268 * pt.c (tsubst_qualified_id): Do not strip references from
1271 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1274 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
1276 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
1277 for valid type-names.
1278 (cp_parser_unqualified_id): Fix error handling for destructors.
1281 * decl.c (xref_tag): Improve error message. Return early on error.
1284 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
1286 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
1289 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
1291 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
1294 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
1295 perform_integral_promotions for non integral type.
1297 2006-08-16 Jason Merrill <jason@redhat.com>
1300 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
1301 if arg is a function.
1303 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1306 * init.c (build_new): Return early on invalid placement.
1308 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
1311 * pt.c (process_template_parm): Robustify.
1313 2006-08-14 Steve Ellcey <sje@cup.hp.com>
1317 * operators.def: Remove <?, ?>, <?=, and >?= operators.
1318 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
1319 (cp_parser_warn_min_max): Remove.
1321 2006-08-11 Jason Merrill <jason@redhat.com>
1324 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
1325 attributes applied to a TYPENAME_TYPE.
1327 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
1330 * pt.c (coerce_template_parms): Copy across the
1331 invalid template arguments to the new template inner arguments.
1332 (retrieve_specialization): Robustify.
1335 * pt.c (coerce_template_template_parms): Robustify.
1338 * error.c (dump_template_parms): Robustify.
1341 * pt.c (redeclare_class_template): Robustify.
1344 * pt.c (type_unification_real): Robustify.
1346 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
1349 * decl.c (start_decl): Return error_mark_node if a
1350 diagnostic was issed for an invalid typedef initialization.
1352 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1355 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
1356 when parsing destructor names.
1359 * decl.c (duplicate_decls): Call check_default_args here.
1360 (start_preparsed_function): Do not call check_default_args.
1361 * name-lookup.c (pushdecl_maybe_friend): Only call
1362 check_default_args if duplicate_decls got bypassed.
1364 2006-08-02 Richard Guenther <rguenther@suse.de>
1368 2006-07-05 Richard Guenther <rguenther@suse.de>
1369 Andrew Pinski <pinskia@gcc.gnu.org>
1372 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1373 top level qualifiers for pointer type comparisons.
1375 2006-08-02 Mark Mitchell <mark@codesourcery.com>
1378 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
1380 2006-07-31 Mark Mitchell <mark@codesourcery.com>
1383 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
1384 (stabilize_call): Tweak documentation.
1385 (stabilize_init): Only call stabilize_call for calls.
1387 2006-08-01 Steve Ellcey <sje@cup.hp.com>
1390 * decl2.c (check_classfn): Remove early return.
1391 * search.c (lookup_member): Return NULL with bad type.
1393 2006-08-01 Steve Ellcey <sje@cup.hp.com>
1396 * decl.c (check_initializer): Check for 1 initializer on scalar types.
1398 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
1401 * pt.c (tsubst_copy_and_build): Mark used enum types.
1402 * semantics.c (finish_id_expression): Likewise.
1404 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1407 * decl.c (grokdeclarator): Check whether "long" or "short" was
1408 specified for non-integral types.
1410 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1412 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1414 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
1418 * pt.c (process_template_parm) Store invalid template
1419 parameters as error_mark_node in the paramater list.
1420 (push_inline_template_parms_recursive): Handle invalid
1421 template parameters.
1422 (comp_template_parms): Likewise.
1423 (check_default_tmpl_arg): Likewise.
1424 (coerce_template_template_parms): Likewise.
1425 (mangle_class_name_for_template): Likewise.
1426 (tsubst_template_parms): Likewise.
1427 * error.c (dump_template_argument_list): Likewise.
1429 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
1431 * cp-tree.h: Fix a comment typo.
1433 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1436 * decl.c (grokdeclarator): Return error_mark_node after invalid
1439 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
1442 * decl.c (grokvardecl): Use FROB_CONTEXT.
1443 * pt.c (register_specialization): Likewise.
1445 2006-07-23 Mark Mitchell <mark@codesourcery.com>
1448 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
1449 * name-lookup.c (unqualified_namespace_lookup): There is no way to
1450 have a hidden name in non-namespace scopes.
1451 * pt.c (tsubst_friend_class): Look for hidden names.
1452 * decl.c (lookup_and_check_tag): Fix typo in comment.
1454 * semantics.c (finish_compound_literal): Fix typo in comment.
1456 2006-07-21 Jason Merrill <jason@redhat.com>
1458 * decl2.c (determine_visibility): Don't propagate visibility from
1460 (constrain_class_visibility): Don't warn in system headers.
1461 Don't warn about pointer fields.
1463 2006-07-20 Mike Stump <mrs@apple.com>
1465 * decl2.c (determine_visibility_from_class): Don't use hidden
1466 visibility for explicit instantiations.
1468 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1471 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
1472 valid decls. Cleanup.
1475 * semantics.c (check_template_template_default_arg): Simplify
1478 2006-07-20 Jason Merrill <jason@redhat.com>
1481 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
1482 const variables with implicit internal linkage.
1483 * tree.c (decl_linkage): Only return lk_external if it's set.
1486 * decl2.c (constrain_visibility): Ignore the anonymous namespace
1487 for extern "C" decls.
1488 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
1490 * decl2.c (constrain_visibility): Remove specified and reason
1491 parameters. Don't touch decls that already have explicit visibility.
1492 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
1494 (determine_visibility_from_class): Reverse sense of
1495 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
1496 (constrain_class_visibility): Only complain about member visibility
1497 if the member type is another class. Don't change visibility of the
1500 2006-07-19 Mark Mitchell <mark@codesourcery.com>
1503 * decl.c (layout_var_decl): Don't call push_local_name here.
1504 (initialize_artificial_var): Assert artificiality.
1505 (cp_finish_decl): Call push_local_name here.
1507 2006-07-18 Mark Mitchell <mark@codesourcery.com>
1510 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
1513 2006-07-18 Mark Mitchell <mark@codesourcery.com>
1516 * semantics.c (check_accessibility_of_qualified_id): Robustify.
1519 * pt.c (tsubst_decl): Handling substitutions into a static data
1520 member from within the scope of the tempalte itself.
1522 2006-07-18 Lee Millward <lee.millward@gmail.com>
1525 * method.c (locate_copy): Check for non_reference
1526 returning error_mark_node.
1529 * decl.c (duplicate_decls): Return error_mark_node
1530 on ambiguous declaration.
1532 2006-07-18 Steve Ellcey <sje@cup.hp.com>
1535 * search.c (adjust_result_of_qualified_name_lookup): Change
1536 assert to part of if statement.
1538 2006-07-17 Steve Ellcey <sje@cup.hp.com>
1541 * decl.c (reshape_init_class): Return error_mark_node on error.
1543 2006-07-17 Steve Ellcey <sje@cup.hp.com>
1546 * decl2.c (check_classfn): Return NULL_TREE on error.
1548 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1551 * name-lookup.c (pushdecl_maybe_friend): Return early on
1553 * except.c (expand_start_catch_block): Use error_mark_node instead
1554 of NULL_TREE for invalid decls.
1555 * parser.c (cp_parser_exception_declaration): Return error_mark_node
1556 on invalid catch parameter. Simplify.
1558 2006-07-16 Jakub Jelinek <jakub@redhat.com>
1561 * decl2.c (note_vague_linkage_var): Removed.
1562 (finish_static_data_member_decl): Add decl to pending_statics vector
1563 directly. Do it even for non-public decls.
1565 2006-07-15 Lee Millward <lee.millward@gmail.com>
1568 * decl2.c (acceptable_java_type): Robustify. Use
1569 proper Boolean return type instead of return 1.
1570 (check_java_method): Don't issue error about
1571 type not being an acceptable Java parameter if
1572 it's error_mark_node.
1575 * parser.c (cp_parser_elaborated_type_specifier):
1576 Return early if an invalid type was detected.
1578 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1581 * parser.c (cp_parser_check_decl_spec): New function.
1582 (cp_parser_decl_specifier_seq): Factor out check for repeated
1583 decl-specifiers into cp_parser_check_decl_spec. Use it.
1584 (cp_parser_type_specifier_seq): Use it.
1587 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
1591 * decl2.c (cplus_decl_attributes): Check for invalid decls.
1593 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1596 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
1597 * decl2.c (grokfield): Likewise.
1599 2006-07-12 Geoffrey Keating <geoffk@apple.com>
1601 * decl2.c (determine_visibility): Don't change visibility of
1602 function locals because of -fvisibility-inlines-hidden.
1604 2006-07-12 Jason Merrill <jason@redhat.com>
1607 * semantics.c (note_decl_for_pch): Don't premangle templates.
1609 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
1611 * typeck.c (string_conv_p): Remove spurious quotation mark in
1614 2006-07-07 Lee Millward <lee.millward@gmail.com>
1615 Andrew Pinski <pinskia@gmail.com>
1618 * decl.c (define_label): Return error_mark_node on error.
1619 * semantics.c (finish_label_stmt): Don't call
1620 add_stmt for invalid labels.
1622 2006-07-06 Jason Merrill <jason@redhat.com>
1625 * decl2.c (finish_static_data_member_decl): Don't assert
1628 2006-07-05 Jason Merrill <jason@redhat.com>
1632 * class.c (check_field_decls): Check TYPE_PACKED after
1633 stripping array types.
1634 (finish_struct_bits): Don't copy TYPE_SIZE here.
1637 * friend.c (is_friend): Fix DR 45 implementation.
1639 2006-07-05 Richard Guenther <rguenther@suse.de>
1640 Andrew Pinski <pinskia@gcc.gnu.org>
1643 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1644 top level qualifiers for pointer type comparisons.
1646 2006-07-01 Jason Merrill <jason@redhat.com>
1649 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
1652 2006-06-30 Jason Merrill <jason@redhat.com>
1655 * call.c (build_new_method_call): Force evaluation of the
1656 instance pointer, not the object.
1658 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
1660 * decl2.c: Fix a comment typo.
1662 2006-06-30 Jason Merrill <jason@redhat.com>
1665 * decl2.c (grokfield): Only try to treat the decl as an access
1666 declaration if the scope is a class.
1668 2006-06-29 Jason Merrill <jason@redhat.com>
1675 * decl2.c (determine_visibility): Overhaul.
1676 (determine_visibility_from_class): Likewise.
1677 (min_vis_r, type_visibility, constrain_visibility): New fns.
1678 (constrain_visibility_for_template): Likewise.
1679 (constrain_class_visibility): Likewise.
1680 * decl.c (cp_finish_decl): Call determine_visibility for function
1682 * name-lookup.c (pushtag): Call determine_visibility.
1683 * decl.c (duplicate_decls): Don't copy visibility from template to
1685 * pt.c (check_explicit_specialization): Likewise.
1686 (lookup_template_class, tsubst_decl): Call determine_visibility.
1687 * class.c (finish_struct_1): Call constrain_class_visibility.
1692 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
1694 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
1695 (cp_parser_enum_specifier): Likewise.
1696 (cp_parser_elaborated_type_specifier): Apply attributes if this
1697 declares only the class.
1698 (cp_parser_class_specifier): Apply leading attributes immediately.
1699 * semantics.c (begin_class_definition): Add attributes parameter,
1700 apply them to the type.
1704 * tree.c (decl_anon_ns_mem_p): New function.
1705 * cp-tree.h: Declare it.
1706 * decl2.c (determine_visibility): Make anonymous namespace
1708 (min_vis_r, constrain_visibility): Likewise.
1709 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
1711 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
1713 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
1714 on anonymous namespaces.
1716 2006-06-28 Jason Merrill <jason@redhat.com>
1719 * pt.c (convert_template_argument): Pass all template arguments
1720 on to coerce_template_template_parms.
1722 2006-06-25 Lee Millward <lee.millward@gmail.com>
1723 Mark Mitchell <mark@codesuorcery.com>
1726 * decl2.c (grokbitfied): Remove check for grokdeclarator
1727 returning NULL_TREE, instead check for error_mark_node
1728 to indicate failure.
1729 * decl.c (grokdeclarator): Adjust block comment.
1731 2006-06-25 Lee Millward <lee.millward@gmail.com>
1734 * mangle.c (mangle_conv_op_name_for_type): Check for
1736 * name-lookup.c (push_class_level_binding): Robustify.
1737 (do_class_using_decl): Return early if name is error_mark_node.
1739 2006-06-23 Steve Ellcey <sje@cup.hp.com>
1742 * name-lookup.c (pushtag): Return if we have error_mark_node.
1744 2006-06-23 Steve Ellcey <sje@cup.hp.com>
1747 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
1749 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1752 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
1753 arguments. Fix comment.
1756 * init.c (build_new_1): Handle error_mark_nodes returned by
1757 build_java_class_ref.
1758 (build_java_class_ref): Do not abort compilation, but return
1759 error_mark_node. Improve error message. Fix indentation.
1761 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
1764 * decl.c (start_decl): Check that dllimports are not initialized.
1766 2006-06-22 Lee Millward <lee.millward@gmail.com>
1769 * typeck2.c (build_m_component_ref): Use error_operand_p.
1772 * decl.c (grokdeclarator): Return error_mark_node on
1773 invalid uses of the scope resolution operator.
1775 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1778 * pt.c (determine_specialization): Check for invalid decls.
1781 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
1785 * rtti.c (get_tinfo_decl_dynamic): Robustify.
1787 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1790 * init.c (push_base_cleanups): Skip members with invalid types.
1791 * typeck.c (build_class_member_access_expr): Robustify.
1793 2006-06-19 Mark Mitchell <mark@codesourcery.com>
1795 * pt.c (instantiate_template): Fix typo in comment.
1797 2006-06-19 Richard Guenther <rguenther@suse.de>
1799 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
1800 power-of-two token vector size.
1802 2006-06-16 Mark Mitchell <mark@codesourcery.com>
1805 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
1809 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
1813 * decl.c (have_extern_spec): Remove.
1814 (start_decl): Do not check have_extern_spec.
1815 (start_function): Likewise.
1816 * cp-tree.h (have_extern_spec): Remove.
1817 * parser.c (cp_parser_linkage_specification): Don't set
1819 (cp_parser_init_declarator): Likewise.
1820 (cp_parser_parameter_declaration): Do not treat parameters as
1821 within the scope of an unbraced linkage specification.
1823 2006-06-15 Mark Mitchell <mark@codesourcery.com>
1826 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
1828 * pt.c (unify): Use it.
1831 * call.c (build_conditional_expr): Robustify.
1834 * pt.c (instantiate_template): Set processing_template_decl to
1835 zero while performing substitutions.
1837 2006-06-14 Mark Mitchell <mark@codesourcery.com>
1840 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
1841 identify destructors.
1842 (cp_parser_nested_name_specifier_opt): Remove invalid
1844 (cp_parser_template_id): Refine heuristic for determining whether
1845 we are entering a scope.
1848 * parser.c (cp_parser_declarator): Robustify.
1851 * pt.c (tsubst_expr): Use finish_omp_atomic.
1852 (value_dependent_expression_p): All CALL_EXPRs are dependent.
1853 * semantics.c (finish_omp_atomic): Rework to use standard
1854 paradigms for handling non-dependent expressions.
1856 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1858 * typeck.c (build_modify_expr): Tidy diagnostic message.
1860 2006-06-14 Mark Mitchell <mark@codesourcery.com>
1863 * typeck.c (build_modify_expr): Disallow array assignment.
1865 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1867 * cp-tree.def: Fix typo.
1869 2006-06-13 Mark Mitchell <mark@codesourcery.com>
1872 * decl.c (decls_match): Allow an extern "C" variable declarations
1873 from different namespaces to match.
1874 (duplicate_decls): Disallow redeclaring a variable with a
1875 different linkage specification.
1877 2006-06-13 Jakub Jelinek <jakub@redhat.com>
1880 * cp-tree.h (cxx_int_tree_map): New struct.
1881 (struct language_function): Add extern_decl_map field.
1882 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
1883 to cp_function_chain->extern_decl_map hash table instead of
1884 copying over DECL_UID.
1885 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
1887 (cp_genericize_r): Remap DECL_EXTERN local decls using
1888 cp_function_chain->extern_decl_map hash table.
1889 * decl.c (finish_function): Clear extern_decl_map.
1891 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1894 * semantics.c (finish_offsetof): Handle pseudo-destructors.
1897 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
1901 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
1904 2006-06-12 Roger Sayle <roger@eyesopen.com>
1907 * typeck2.c (build_functional_cast): Use cp_convert to construct
1908 non-aggregate initializers instead of the user-level build_c_cast.
1910 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1913 * cp-tree.h (finish_offsetof): Add prototype.
1914 * semantics.c (finish_offsetof): New function.
1915 * parser.c (cp_parser_builtin_offsetof): Call it instead of
1917 * pt.c (tsubst_copy_and_build): Likewise.
1919 2006-06-06 Mark Mitchell <mark@codesourcery.com>
1922 * call.c (standard_conversion): Require that the derived type be
1923 complete when performing a derived-to-base conversion.
1925 2006-06-04 Mark Mitchell <mark@codesourcery.com>
1928 * decl.c (cp_finish_decl): Process initializers for static data
1929 members with non-dependent initializers, even in templates.
1932 * decl.c (maybe_deduce_size_from_array_init): If the declaration
1933 is erroneous, give it an erroneous type.
1934 (layout_var_decl): If the type is erroneous, give up.
1935 (check_initializer): Likewise.
1938 * cp-tree.h (TYPE_OBJ_P): New macro.
1939 (TYPE_PTROB_P): Use it.
1940 (TYPE_REF_OBJ_P): Likewise.
1941 * semantics.c (finish_compound_literal): Do not permit compound
1942 literals of non-object types.
1945 * typeck.c (original_type): Robustify.
1947 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1950 * init.c (constant_value_1): Return decl instead of error_mark_node
1951 for invalid initializers.
1953 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1956 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
1957 on operand of the COND_EXPR for the null pointer check.
1959 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1962 * typeck.c (build_unary_op): Mark the function as being used.
1964 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
1967 * parser.c (cp_parser_initial_pragma): Read one more token for
1968 caller after reading PCH file in.
1970 2006-05-31 Mark Mitchell <mark@codesourcery.com>
1973 * call.c (perform_implicit_conversion): Do not actually perform
1974 conversions in templates.
1977 * call.c (resolve_args): Check for invalid uses of bound
1978 non-static member functions.
1979 * init.c (build_offset_ref): Return error_mark_node for errors.
1982 * decl.c (reshape_init): Robustify.
1983 (reshape_init_array_1): Likewise.
1985 2006-05-30 Mark Mitchell <mark@codesourcery.com>
1988 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
1989 "friend" specifiers that do not appear in class scopes.
1992 * class.c (check_bitfield_decl): Ensure that all bitfields have
1995 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
1997 * pt.c (convert_nontype_argument): Fix a typo in an error
2000 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2002 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
2003 spelling conventions.
2005 2006-05-24 Mark Mitchell <mark@codesourcery.com>
2008 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
2009 error_mark_node to indicate an initialization is OK.
2010 (start_decl): Likewise. Adjust call to start_decl_1.
2011 (start_decl_1): Add initialized parameter. Simplify.
2012 * except.c (initialize_handler_parm): Adjust call to
2014 (expand_start_catch_block): Let cp_finish_decl initialize catch
2016 * cp-tree.h (start_decl_1): Adjust prototype.
2017 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
2018 (instantiate_decl): Let cp_finish_decl handle initialization.
2019 * semantics.c (finish_compound_literal): Create a temporary
2020 variable for the literal.
2021 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
2023 * decl2.c (finish_static_data_member_decl): Don't set
2025 (grokfield): Do not try to initialize functions.
2027 2006-05-23 Mark Mitchell <mark@codesourcery.com>
2030 * pt.c (determine_specialization): Disallow partial
2031 specializations of templates.
2033 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2036 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
2038 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
2040 2006-05-21 Mark Mitchell <mark@codesourcery.com>
2043 * cp-tree.h (cp_save_expr): New function.
2044 * init.c (build_new): Correct logic for zero-element array
2045 warning. Use cp_save_expr.
2046 * tree.c (cp_save_expr): New function.
2048 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2051 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
2054 2006-05-19 Mike Stump <mrs@apple.com>
2056 * typeck.c (default_conversion): Remove static.
2058 2006-05-19 Mark Mitchell <mark@codesourcery.com>
2061 * cp-tree.h (begin_function_try_block): Change prototype.
2062 (finish_function_handler_sequence): Likewise.
2063 * parser.c (cp_parser_function_try_block): Adjust calls.
2064 * pt.c (tsubst_expr): Adjust calls.
2065 * semantics.c (begin_function_try_block): Create an artificial
2067 (finish_function_handler_sequence): Close it.
2069 2006-05-18 Mark Mitchell <mark@codesourcery.com>
2073 * typeck.c (decay_conversion): Convert bitfields to their declared
2074 types here. Improve documentation. Avoid use of cp_convert.
2075 (default_conversion): Make it static. Perform integral promotions
2076 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
2078 * init.c (build_init): Remove.
2079 (expand_default_init): Do not call rvalue.
2080 * call.c (null_ptr_cst_p): Robustify.
2081 (build_conditional_expr): Tidy.
2082 * except.c (build_throw): Do not perform lvalue-to-rvalue
2083 conversion on operand before initializing temporary.
2084 * tree.c (convert.h): Include it.
2085 (convert_bitfield_to_declared_type): Use convert_to_integer, not
2087 (rvalue): Don't convert bitfields to their declared type here.
2088 * cp-tree.h (build_init): Remove.
2089 (default_conversion): Likewise.
2090 * typeck2.c (build_m_component_ref): Do not perform
2091 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
2092 conversions here. Correct error message.
2094 2006-05-17 Mark Mitchell <mark@codesourcery.com>
2097 * decl2.c (check_member_template): Remove checks for virtual
2099 * parser.c (cp_parser_function_specifier_opt): Complain about
2101 (cp_parser_pure_specifier): Likewise.
2104 * parser.c (cp_parser_set_storage_class): Check for
2105 invalid uses of storage classes on unbraced linkage
2107 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
2108 to cp_parser_set_storage_class.
2110 2006-05-17 Jakub Jelinek <jakub@redhat.com>
2113 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
2117 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2118 on combined parallel workshare constructs.
2119 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
2121 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2124 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
2126 2006-05-15 Mark Mitchell <mark@codesourcery.com>
2129 * cp-tree.h (perform_access_checks): New function.
2130 * semantics.c (perform_access_checks): New function.
2131 (perform_deferred_access_checks): Use it.
2132 * parser.c (cp_parser_simple_declaration): Adjust call to
2133 cp_parser_init_declarator.
2134 (cp_parser_type_parameter): Do not defer checks in default
2136 (cp_parser_explicit_specialization): Adjust call to
2137 cp_parser_single_declaration.
2138 (cp_parser_init_declarator): Perform template-parameter access
2140 (cp_parser_parameter_declaration): Do not defer checks for
2141 template parameter default arguments.
2142 (cp_parser_template_declaration_after_export): Gather access
2143 checks for template parameters, and pass them to
2144 cp_parser_single_declaration.
2145 (cp_parser_template_parameter_access_checks): New function.
2146 (cp_parser_single_declaration): Add checks parameter.
2149 * call.c (convert_like_real): Convert bitfields to their declared
2150 types when forming an rvalue.
2151 * tree.c (convert_bitfield_to_declared_type): New function.
2153 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
2155 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2158 * pt.c (any_dependent_template_arguments_p): Return early on invalid
2162 * search.c (adjust_result_of_qualified_name_lookup): Skip on
2163 invalid context_class.
2166 * pt.c (do_decl_instantiation): Return early on invalid decl.
2169 * pt.c (push_template_decl_real): Return error_mark_node instead
2173 * pt.c (tsubst_friend_class): Return early on invalid friend
2176 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
2178 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
2179 (cp/decl2.o): Likewise.
2180 (cp/typeck.o): Likewise.
2181 (cp/cvt.o): Likewise.
2182 (cp/parser.o): Likewise.
2183 (cp/call.o): Replace target.h with $(TARGET_H).
2185 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
2187 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
2188 COMPONENT_REF alone.
2190 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2193 * decl.c (copy_fn_p): Return early on non-member functions.
2195 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2198 * decl2.c (build_memfn_type): Skip invalid functions and class types.
2200 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2203 * pt.c (convert_nontype_argument): Return early on invalid arguments.
2205 * pt.c (process_template_parm): Remove superfluous temporary.
2208 * pt.c (process_template_parm): Handle erroneous non-type parameters.
2211 * typeck.c (convert_for_initialization): Skip erroneous types.
2214 * typeck.c (convert_arguments): Return early on args with
2217 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
2220 * typeck.c (build_static_cast_1): Save casted types in used types
2222 (build_reinterpret_cast_1): Same.
2223 * rtti.c (build_dynamic_cast_1): Same.
2225 2006-05-04 Jakub Jelinek <jakub@redhat.com>
2228 * parser.c (cp_parser_omp_for_loop): Only call
2229 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
2232 2006-05-02 Mark Mitchell <mark@codesourcery.com>
2235 * decl.c (grokdeclarator): Robustify checks for defining members
2236 of incomplete types.
2239 * class.c (add_method): Call grok_special_member_properties.
2240 * decl.c (grokdeclarator): Don't call it here.
2241 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
2242 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
2244 (start_method): Don't call grok_special_member_properties.
2245 * method.c (implicitly_declare_fn): Likewise.
2246 * pt.c (instantiate_class_template): Likewise.
2247 * decl2.c (grokfield): Likewise.
2249 2006-05-02 Jakub Jelinek <jakub@redhat.com>
2252 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
2253 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
2254 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
2256 2006-04-30 Mark Mitchell <mark@codesourcery.com>
2259 * pt.c (tsubst_default_argument): Increment function_depth around
2260 call to tsubst_expr.
2261 * parser.c (cp_parser_parameter_declaration): Likewise.
2262 * decl2.c (mark_used): Tidy.
2264 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2267 * decl.c (grok_op_properties): Skip operators with invalid args
2268 when checking for class-type or enum-type args.
2270 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2273 * decl.c (copy_fn_p): Skip functions with invalid first arg.
2275 2006-04-27 Mark Mitchell <mark@codesourcery.com>
2278 * tree.c (rvalue): Convert bitfields to their declared types.
2281 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
2284 2006-04-24 Mark Mitchell <mark@codesourcery.com>
2287 * typeck.c (decay_conversion): Don't adjust bitfield types.
2288 (perform_integral_promotions): Treat bitfield enums as enums, not
2289 as short integer types.
2290 * tree.c (rvalue): Convert bitfields to their correct types.
2292 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2295 * class.c (layout_class_type): Skip fields with invalid types.
2297 2006-04-23 Mark Mitchell <mark@codesourcery.com>
2300 * cp-tree.h (build_this_parm): Declare.
2301 (grok_method_quals): Remove.
2302 (build_memfn_type): Declare.
2303 (build_artificial_parm): Declare.
2304 (do_friend): Remove quals parameter.
2305 * decl.c (build_this_parm): New function.
2306 (grokfndecl): Use it. Do not pass quals to grokclassfn.
2307 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
2308 unnecessary TYPE_DECLs. Correct qualification of member function
2310 * method.c (implicitly_declare_fn): Use build_this_parm.
2311 * friend.c (do_friend): Remove quals parameter.
2312 * decl2.c (grok_method_quals): Remove.
2313 (build_memfn_type): New function.
2314 (build_artificial_parm): Give it external linkage.
2315 (grokclassfn): Remove quals parameter. Do not build "this"
2319 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
2320 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
2321 (decay_conversion): Convert bitfield expressions to the correct
2323 (build_modify_expr): Remove spurious conversions.
2324 * class.c (layout_class_type): Modify the type of bitfields to
2325 indicate a limited range.
2326 * call.c (standard_conversion): Adjust the type of bitfield
2327 expressions used in an rvalue context.
2328 (build_conditional_expr): Likewise.
2330 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
2332 * decl.c: Fix comment typos.
2334 2006-04-21 Eric Christopher <echristo@apple.com>
2336 * decl.c: Fix typo in function name.
2338 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2341 * parser.c (cp_parser_class_name): Check for invalid typenames.
2345 * pt.c (tsubst_friend_function): Return early if
2346 pushdecl_namespace_level fails.
2349 * typeck.c (convert_arguments): Return error_mark_node instead of
2351 * cp-tree.h (error_mark_list): Remove declaration.
2352 * decl.c (error_mark_list): Remove definition.
2353 (cxx_init_decl_processing): Do not initialize error_mark_list.
2356 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
2357 before calling convert_to_reference.
2358 * cvt.c (convert_to_reference): Assert that reftype is a
2361 2006-04-19 Mark Mitchell <mark@codesourcery.com>
2364 * class.c (currently_open_class): Tidy.
2365 * decl.c (grokdeclarator): If we encounter an erroneous
2366 declarator, assume that we have already issued an error message
2367 and return. Return error_mark_node instead of NULL_TREE in more
2368 places. Issue errors about function definitions that do not have
2369 a function declarator. Check for complete types for all function
2371 * cp-tree.h (cp_error_declarator): Remove.
2372 (currently_open_class): Change return type.
2373 * parser.c (cp_parser_id_expression): Add optional_p parameter.
2374 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
2375 (cp_parser_id_expression): Likewise.
2376 (cp_parser_unqualified_id): If the name is optional, return
2378 (cp_parser_postfix_dot_deref_expression): Adjust calls.
2379 (cp_parser_type_parameter): Likewise.
2380 (cp_parser_unqualified_id): Likewise.
2381 (cp_parser_direct_declarator): Likewise.
2382 (cp_parser_declarator_id): Add optional_p parameter.
2383 (cp_parser_function_definition_from_specifiers_and_declarator):
2384 Assume that start_function indicates failure only if it has issued
2386 (cp_parser_omp_var_list_no_open): Adjust calls.
2388 2006-04-17 Janis Johnson <janis187@us.ibm.com>
2390 PR c++/26114, c++/26115
2391 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
2392 * class.c (check_field_decls): Ditto.
2394 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2396 * init.c (build_offset_ref): Remove superfluous temporary.
2398 2006-04-16 Mark Mitchell <mark@codesourcery.com>
2401 * typeck.c (finish_class_member_access_expr): Robustify
2403 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
2405 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
2406 * pt.c: Include vecprim.h.
2407 (inline_parm_levels): Change the type to VEC(int,heap) *.
2408 (inline_parm_levels_used): Remove.
2409 (maybe_begin_member_template_processing,
2410 maybe_end_member_template_processing): Use VEC instead of
2413 * cp/call.c: Fix comment typos.
2415 2006-04-12 Mark Mitchell <mark@codesourcery.com>
2417 * parser.c (cp_parser_init_declarator): Initialize local variables
2420 2006-04-12 Roger Sayle <roger@eyesopen.com>
2422 * parser.c (cp_parser_init_declarator): Initialise
2423 is_parenthesized_init to false to avoid compiler warning.
2425 2006-04-11 Mark Mitchell <mark@codesourcery.com>
2427 * cp-tree.h (build_operator_new_call): Adjust prototype.
2428 (build_new_method_call): Likewise.
2429 (build_op_delete_call): Likewise.
2430 * init.c (build_raw_new_expr): New function.
2431 (build_new_1): Pass information as parameters, rather than
2432 bundling it into a NEW_EXPR.
2433 (build_new): Adjust accordingly.
2434 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
2435 (build_delete): Likewise.
2436 * decl.c (finish_destructor_body): Likewise.
2437 * call.c (build_operator_new_call): Return the allocation function
2439 (build_op_delete_call): Take allocation function as parameter.
2440 (build_special_member_call): Adjust call to build_new_method_call.
2441 (build_new_method_call): Return function called.
2442 * pt.c (tsubst_copy_and_build): Adjust call to
2443 build_new_method_call.
2444 * semantics.c (finish_call_expr): Likewise.
2445 * parser.c (cp_parser_postfix_expression): Likewise.
2446 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
2447 "incomplete", not "undefined", types.
2450 * decl.c (grokdeclarator): Remove namespace-handling code for
2451 pointers-to-members.
2452 * parser.c (cp_parser_ptr_operator): Check for qualified names
2456 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
2457 whether or not to look for a pure-specifier.
2458 (cp_parser_member_declaration): Likewise.
2460 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
2462 * decl2.c, pt.c, semantics.c: Fix comment typos.
2464 2006-04-06 Roger Sayle <roger@eyesopen.com>
2466 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
2468 2006-04-05 Jason Merrill <jason@redhat.com>
2470 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
2471 default hidden visibility for anonymous namespace.
2473 2006-03-29 Roger Sayle <roger@eyesopen.com>
2476 * init.c (build_vec_delete_1): Convert BASE pointer's type to
2477 the base pointer type to avoid a type mismatch in the EQ_EXPR.
2479 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
2481 * search.c (maybe_suppress_debug_info): If
2482 flag_emit_class_debug_always then don't suppress.
2484 2006-03-22 Jason Merrill <jason@redhat.com>
2486 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
2487 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
2489 2006-03-21 Jakub Jelinek <jakub@redhat.com>
2492 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
2494 2006-03-21 Jason Merrill <jason@redhat.com>
2497 * parser.c (cp_parser_declaration): Support attributes on
2498 anonymous namespaces.
2499 * name-lookup.c (push_namespace_with_attribs): Anonymous
2500 namespaces default to hidden visibility.
2502 2006-03-20 Jason Merrill <jason@redhat.com>
2504 PR c++/21764, c++/19238
2505 * decl.c (cp_finish_decl): Call determine_visibility later.
2506 (start_preparsed_function): Likewise.
2507 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
2508 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
2509 * name-lookup.h (struct cp_binding_level): Add has_visibility
2511 * name-lookup.c: Include c-pragma.h.
2512 (push_namespace_with_attribs): Split out from push_namespace.
2513 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
2514 (leave_scope): Pop visibility if appropriate.
2515 * decl2.c (determine_visibility_from_class): Split out from...
2516 (determine_visibility): ...here. Handle function scope and
2518 (import_export_decl): Move visibility handling to
2519 determine_visibility_from_class.
2520 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
2521 attributes on namespace declarations.
2523 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2526 * decl.c (grokdeclarator): Do not accept long long double.
2527 Reorganize checks for invalid (combinations of) type modifiers.
2528 Quote modifiers in messages.
2530 2006-03-09 Jason Merrill <jason@redhat.com>
2532 PR c++/16387, c++/16389
2533 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
2534 (cxx_sizeof_or_alignof_expr): Split out from here.
2536 2006-03-09 Diego Novillo <dnovillo@redhat.com>
2538 Merge from gomp-20050608-branch
2540 2006-02-02 Diego Novillo <dnovillo@redhat.com>
2542 * decl.c (pop_labels_1): Use appropriate pointer casting.
2543 (poplevel_named_label_1): Likewise.
2544 (named_label_entry_hash): Likewise.
2545 (named_label_entry_eq): Likewise.
2546 (check_goto): Likewise.
2547 (define_label): Likewise.
2549 2006-01-26 Diego Novillo <dnovillo@redhat.com>
2551 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
2553 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
2554 instead of TREE_CODE/TREE_OPERAND.
2555 * semantics.c: Likewise.
2556 * parser.c: Likewise.
2558 2005-11-10 Diego Novillo <dnovillo@redhat.com>
2560 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
2561 target does not support TLS.
2563 2005-11-09 Jakub Jelinek <jakub@redhat.com>
2565 * decl.c (redeclaration_error_message): Don't error about
2566 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
2569 2005-11-08 Jakub Jelinek <jakub@redhat.com>
2572 * semantics.c (finish_omp_barrier, finish_omp_flush): New
2574 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
2575 (cp_parser_omp_flush): Call finish_omp_flush.
2576 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
2580 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
2582 2005-11-03 Jakub Jelinek <jakub@redhat.com>
2584 * semantics.c (finish_omp_threadprivate): Error on class-scope
2587 2005-11-02 Jakub Jelinek <jakub@redhat.com>
2589 * parser.c (cp_parser_omp_all_clauses): If some clause
2590 type is not allowed, don't remove just one of the
2591 clauses, but all clauses added in that loop round.
2593 * semantics.c (finish_omp_clauses): Fix function
2594 comment. Don't handle non-const or mutable specially,
2595 as const and not mutable is predetermined shared and
2596 that leads to double error. Don't ICE if copyin var is
2600 * parser.c (cp_parser_pragma): Diagnose
2601 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
2604 * semantics.c (finish_omp_threadprivate): Error if V
2605 is automatic variable or has incomplete type.
2607 2005-11-01 Diego Novillo <dnovillo@redhat.com>
2609 * parser.c (cp_parser_omp_all_clauses): Use
2610 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
2612 2005-11-01 Diego Novillo <dnovillo@redhat.com>
2614 * parser.c (cp_parser_omp_all_clauses): When emitting an
2615 error message, remove the invalid clause from the list.
2617 2005-10-31 Diego Novillo <dnovillo@redhat.com>
2619 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
2620 combined parallel+workshare directives.
2622 2005-10-31 Richard Henderson <rth@redhat.com>
2624 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
2625 Use cxx_omp_clause_dtor.
2626 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
2627 (cxx_omp_clause_dtor): New.
2628 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
2629 (cxx_omp_clause_default_ctor): Use it.
2630 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
2632 (cxx_omp_clause_dtor): New.
2633 * semantics.c (finish_omp_clauses): Rewrite cdtor
2634 checking to fill in CP_OMP_CLAUSE_INFO. Don't
2635 specialcase LASTPRIVATE for removal.
2636 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
2637 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
2639 2005-10-28 Jakub Jelinek <jakub@redhat.com>
2641 * semantics.c (finish_omp_threadprivate): If
2642 DECL_RTL_SET_P, call make_decl_rtl again so that
2643 encode_section_info can update SYMBOL_REF's flags.
2645 2005-10-26 Jakub Jelinek <jakub@redhat.com>
2647 * semantics.c (finish_omp_for): Don't segfault if COND
2648 or INCR is NULL. If not calling c_finish_omp_for
2649 right away and one of COND and INCR is NULL, issue
2650 error and don't expand anything.
2653 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
2654 * semantics.c (finish_omp_for): Likewise. Set
2655 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
2656 into the current statement list if not processing
2657 template decl or pass it to c_finish_omp_for.
2659 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
2660 into PRE_BODY statement list. Pass it to finish_omp_for.
2661 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
2662 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
2663 finish_omp_for. Put all the statements into sk_omp
2666 2005-10-25 Jakub Jelinek <jakub@redhat.com>
2669 * parser.c (struct cp_parser): Rename in_iteration_statement
2670 field to in_statement.
2671 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2672 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
2673 (cp_parser_new, cp_parser_begin_omp_structured_block,
2674 cp_parser_end_omp_structured_block,
2675 cp_parser_omp_for_loop): Adjust for
2676 in_iteration_statement renaming.
2677 (cp_parser_selection_statement): Save
2678 parser->in_iteration, or it temporarily with
2679 IN_SWITCH_STMT for the
2680 cp_parser_implicitly_scoped_statement call.
2681 (cp_parser_iteration_statement): Adjust for
2682 in_iteration_statement renaming. Use
2683 IN_ITERATION_STMT rather than true.
2684 (cp_parser_jump_statement): Adjust for
2685 in_iteration_statement renaming and new values. Don't
2686 error on break in a switch statement within OMP_FOR or
2687 OpenMP structured block.
2690 * parser.c (cp_parser_cache_group): Don't stop if next
2691 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
2692 well. If current token is CPP_PRAGMA, consume
2693 everything until CPP_PRAGMA_EOL inclusive.
2695 2005-10-24 Jakub Jelinek <jakub@redhat.com>
2698 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
2699 addition to MODIFY_EXPR.
2701 2005-10-23 Richard Henderson <rth@redhat.com>
2703 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
2705 (begin_bc_block, finish_bc_block): Use it.
2706 (push_context, pop_context): Remove.
2707 (cp_genericize): Don't use them. Assert bc_label is null.
2708 * semantics.c (finish_omp_clauses): Create a fake data
2709 element of TYPE for probing ctors.
2711 2005-10-23 Richard Henderson <rth@redhat.com>
2713 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
2714 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
2715 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
2716 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
2717 * semantics.c (finish_omp_clauses): Look through
2718 arrays when looking up special member calls. Also
2719 remove FIRSTPRIVATE when LASTPRIVATE fails.
2720 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
2721 (cxx_omp_clause_assign_op): New.
2722 * cp-tree.h: Declare them.
2724 2005-10-21 Richard Henderson <rth@redhat.com>
2726 * decl.c (check_previous_goto_1): Return false if error.
2727 (check_switch_goto): Likewise.
2728 (finish_case_label): Don't emit the case label on error.
2729 * parser.c (struct cp_parser): Revert
2730 in_switch_statement_p changes.
2731 (cp_parser_labeled_statement,
2732 cp_parser_selection_statement): Likewise.
2733 (cp_parser_begin_omp_structured_block): Don't save...
2734 (cp_parser_end_omp_structured_block): or restore
2735 in_switch_statement_p.
2737 2005-10-21 Richard Henderson <rth@redhat.com>
2739 * semantics.c (finish_omp_threadprivate): Set
2740 decl_flags.u2sel when necessary.
2742 2005-10-21 Richard Henderson <rth@redhat.com>
2744 * decl.c (poplevel_named_label_1): Restore creation of the
2746 (decl_jump_unsafe): Check for error_mark_node types.
2747 (check_goto): Don't check cdtor_label. Don't use identify_goto.
2748 * semantics.c (finish_return_stmt): Do check_omp_return before
2749 converting to cdtor_label goto.
2751 2005-10-21 Richard Henderson <rth@redhat.com>
2754 * decl.c (check_omp_return): Return false on error.
2755 * cp-tree.h (check_omp_return): Update decl.
2756 * semantics.c (finish_return_stmt): Avoid adding
2759 2005-10-21 Richard Henderson <rth@redhat.com>
2761 * cp-tree.h (struct language_function): Remove
2763 Change x_named_labels to a hashtable.
2764 (check_omp_return): Declare.
2765 * decl.c (struct named_label_use_entry): Rename from
2766 named_label_use_list. Remove label_decl.
2767 (struct named_label_entry): Rename from
2768 named_label_list. Remove old_value and next. Change
2769 in_try_scope and in_catch_scope to bool. Add
2771 (pop_labels_1): New.
2772 (pop_labels): Use it.
2773 (pop_local_label, poplevel_named_label_1): New.
2774 (poplevel): Use them.
2775 (named_label_entry_hash, named_label_entry_eq): New.
2776 (make_label_decl): Create named_labels. Move label
2777 creation bits from lookup_label.
2778 (declare_local_label): Tidy.
2779 (identify_goto): Split out from ...
2780 (check_previous_goto_1): Add exited_omp argument.
2783 (use_label): Merge into...
2784 (check_goto): ... here. Handle omp scopes.
2785 (check_omp_return): New.
2786 (check_previous_gotos): Merge into...
2787 (define_label): ... here.
2788 (save_function_data): Remove x_named_label_uses reference.
2789 (finish_function): Likewise.
2790 * name-lookup.h (sk_omp): New.
2791 * name-lookup.c (begin_scope): Handle it.
2792 * parser.c (cp_parser_omp_for): Don't create extra
2795 (cp_parser_omp_sections): Likewise.
2796 * semantics.c (finish_return_stmt): Call check_omp_return.
2797 (begin_omp_structured_block): Use sk_omp.
2798 (finish_omp_structured_block): Use do_poplevel. Don't build a
2799 MUST_NOT_THROW expression here.
2800 (begin_omp_parallel, finish_omp_parallel): Don't create extra
2801 compound statements.
2803 2005-10-21 Diego Novillo <dnovillo@redhat.com>
2806 * cp/cp-tree.h (struct lang_decl_flags): Add field
2808 (CP_DECL_IS_THREADPRIVATE): Define.
2809 * cp/semantics.c (finish_omp_threadprivate): Set. Do
2810 not error out if CP_DECL_IS_THREADPRIVATE is set
2812 * cp/decl.c (duplicate_decls): Merge
2813 CP_DECL_THREADPRIVATE_P.
2815 2005-10-20 Richard Henderson <rth@redhat.com>
2817 * cp-gimplify.c (cp_gimplify_omp_for): New.
2818 (cp_gimplify_expr): Call it.
2819 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
2820 * parser.c (struct cp_parser): Rename
2821 in_iteration_statement_p to in_iteration_statement and
2822 change to unsigned char. Similarly with
2823 in_switch_statement. Update all users.
2824 (IN_OMP_BLOCK, IN_OMP_FOR): New.
2825 (cp_parser_labeled_statement): Diagnose case labels
2826 binding closer to an openmp block nested than the
2828 (cp_parser_jump_statement): Diagnose break and
2829 continue labels binding closer to an openmp block than
2830 an iteration or switch.
2831 (cp_parser_omp_for_loop): Mark in_iteration_statement
2833 (cp_parser_begin_omp_structured_block): New.
2834 (cp_parser_end_omp_structured_block): New.
2835 (cp_parser_omp_structured_block): Use them.
2836 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
2837 (cp_parser_omp_parallel): Likewise.
2839 2005-10-20 Richard Henderson <rth@redhat.com>
2841 * semantics.c (begin_omp_structured_block): New.
2842 (finish_omp_structured_block): New.
2843 (begin_omp_parallel, finish_omp_parallel): Use them.
2844 * parser.c (cp_parser_omp_structured_block): Likewise.
2845 (cp_parser_omp_for): Likewise.
2846 (cp_parser_omp_sections_scope): Likewise.
2847 * cp-tree.h: Declare them.
2849 2005-10-20 Richard Henderson <rth@redhat.com>
2851 * parser.c (cp_parser_omp_master): Return the statement.
2852 (cp_parser_omp_ordered): Likewise.
2853 (cp_parser_omp_construct): Set the locus for them.
2855 2005-10-19 Richard Henderson <rth@redhat.com>
2857 * semantics.c (finish_omp_atomic): Revert to
2858 uses_template_parms.
2860 2005-10-19 Richard Henderson <rth@redhat.com>
2862 * semantics.c (finish_omp_clauses): Avoid
2863 DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some
2864 stub asserts guaranteed to fail.
2866 2005-10-19 Richard Henderson <rth@redhat.com>
2868 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
2869 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
2870 * parser.c (cp_parser_omp_clause_copyin): Remove.
2871 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
2872 Call finish_omp_clauses.
2873 (cp_parser_omp_clause_if): Don't do error checking here.
2874 (cp_parser_omp_clause_num_threads): Likewise.
2875 (cp_parser_omp_clause_schedule): Likewise.
2876 (cp_parser_omp_atomic): Use finish_omp_atomic.
2877 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
2878 Don't decompose assignment statment here. Use
2881 * pt.c (tsubst_omp_clauses): New.
2882 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
2883 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
2884 * semantics.c (finish_omp_clauses): New.
2885 (begin_omp_parallel, finish_omp_parallel): Know Less about the
2886 internals of the stmt_list stack.
2887 (finish_omp_for, finish_omp_atomic): New.
2889 2005-10-18 Jakub Jelinek <jakub@redhat.com>
2891 * semantics.c (cxx_omp_predetermined_sharing): New function.
2892 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
2894 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
2896 2005-10-18 Richard Henderson <rth@redhat.com>
2898 * parser.c (cp_parser_omp_single): Use make_node and accessors
2901 2005-10-17 Richard Henderson <rth@redhat.com>
2903 * parser.c (cp_parser_omp_for_loop): Handle declarations.
2905 2005-10-12 Richard Henderson <rth@redhat.com>
2907 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
2908 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
2909 (finish_omp_threadprivate): Declare.
2910 * parser.c (struct cp_lexer): Add in_pragma.
2911 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
2913 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
2914 (cp_parser_skip_to_end_of_statement): Likewise.
2915 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2916 (cp_parser_skip_to_closing_brace): Likewise.
2917 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
2918 (cp_parser_require_pragma_eol): New.
2919 (cp_parser_statement): Add in_compound argument;
2921 Restart if a non-statement pragma seen outside a
2923 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
2924 (cp_parser_declaration_seq_opt): Likewise.
2925 (cp_parser_member_specification_opt): Likewise.
2926 (cp_parser_function_definition_after_decl): Likewise.
2927 (cp_parser_skip_until_found): Likewise.
2928 (cp_parser_cache_group): Likewise.
2929 (enum pragma_omp_clause, cp_parser_omp_clause_name,
2930 check_no_duplicate_clause,
2931 cp_parser_omp_var_list_no_open,
2932 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
2933 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
2934 cp_parser_omp_clause_nowait,
2935 cp_parser_omp_clause_num_threads,
2936 cp_parser_omp_clause_ordered,
2937 cp_parser_omp_clause_reduction,
2938 cp_parser_omp_clause_schedule,
2939 cp_parser_omp_all_clauses,
2940 cp_parser_omp_structured_block, cp_parser_omp_atomic,
2941 cp_parser_omp_barrier, cp_parser_omp_critical,
2942 cp_parser_omp_flush, cp_parser_omp_for_loop,
2943 cp_parser_omp_for, cp_parser_omp_master,
2944 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
2945 cp_parser_omp_sections, cp_parser_omp_parallel,
2946 cp_parser_omp_single, cp_parser_omp_threadprivate,
2947 cp_parser_omp_construct): New.
2948 (cp_parser_pragma): Handle OpenMP pragmas.
2949 * semantics.c (finish_omp_threadprivate): New.
2950 (begin_omp_parallel, finish_omp_parallel): New.
2952 2005-10-11 Richard Henderson <rth@redhat.com>
2954 * parser.c (struct cp_token): Add pragma_kind.
2955 (eof_token): Initialize it.
2956 (cp_lexer_handle_pragma): Remove.
2957 (cp_parser_initial_pragma): New.
2958 (cp_lexer_new_main): Use it.
2959 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
2960 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
2961 (cp_parser_skip_to_pragma_eol): New.
2962 (cp_parser_error): Use it.
2965 2005-10-09 Richard Henderson <rth@redhat.com>
2967 * lex.c (parse_strconst_pragma): Update for c_lex name change.
2968 (handle_pragma_java_exceptions): Likewise.
2969 * parser.c (cp_lexer_new_main): Likewise.
2971 2005-10-06 Richard Henderson <rth@redhat.com>
2973 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
2974 (cp_lexer_handle_pragma): Comment out
2975 cpp_handle_deferred_pragma.
2977 2005-10-01 Richard Henderson <rth@redhat.com>
2979 * name-lookup.c (lookup_name): Remove prefer_type argument.
2980 (lookup_name_prefer_type): New function.
2981 * name-lookup.h (lookup_name_prefer_type): Declare it.
2982 * decl.c (lookup_and_check_tag): Use it.
2983 * pt.c (tsubst_friend_class): Likewise. Update for
2985 (lookup_template_class, tsubst_copy_and_build): Likewise.
2987 2006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2990 * tree.c (bot_manip): Don't call mark_used.
2992 2006-03-02 Mike Stump <mrs@apple.com>
2994 * decl2.c (import_export_decl): Remove redundant call to
2995 targetm.cxx.key_method_may_be_inline ().
2997 2006-03-02 Richard Sandiford <richard@codesourcery.com>
2999 * decl.c (start_decl): Use have_global_bss_p when deciding
3000 whether to make the decl common.
3002 2006-03-01 Mike Stump <mrs@apple.com>
3005 * decl2.c (import_export_decl): Fix ABI breakage on darwin.
3007 2006-02-24 Geoffrey Keating <geoffk@apple.com>
3009 * except.c (expand_start_catch_block): Handle
3010 flag_use_cxa_get_exception_ptr.
3012 2006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3015 * decl.c (grok_op_properties): Check for ellipsis in arguments of
3018 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3020 * Make-lang.in (C++): Remove.
3021 (.PHONY): Remove C++.
3023 2006-02-18 Mark Mitchell <mark@codesourcery.com>
3026 * cp-tree.h (cp_finish_decl): Adjust declaration.
3027 (grokbitfield): Likewise.
3028 (finish_static_data_member_decl): Likewise.
3029 * init.c (constant_value_1): Ensure processing_template_decl when
3030 folding non-dependent initializers for static data members of
3031 dependent types. Return error_mark_node for erroneous
3033 * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
3034 * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
3035 (cp_finish_decl): Add init_const_expr_p parameter. Set
3036 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
3037 (finish_decl): Adjust call to cp_finish_decl.
3038 (compute_array_index_type): Robustify.
3039 (start_method): Use finish_decl, not cp_finish_decl.
3040 * rtti.c (emit_tinfo_decl): Likewise.
3041 * except.c (initialize_handler_parm): Adjust call to
3043 (expand_start_catch_block): Likewise.
3044 * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
3045 * pt.c (instantiate_class_template): Adjust call to
3046 finish_static_data_member_decl.
3047 (tsubst_expr): Use finish_decl, not cp_finish_decl.
3048 (instantiate_decl): Adjust call to cp_finish_decl.
3049 * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
3051 * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
3053 (grokfield): Likewise.
3054 * parser.c (cp_parser_condition): Check for constant initializers.
3055 (cp_parser_init_declarator): Adjust calls to grokfield and
3056 cp_finish_decl. Don't set
3057 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
3058 (cp_parser_member_declaration): Likewise.
3059 (cp_parser_objc_class_ivars): Likewise.
3061 2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3063 * call.c (standard_conversion): Return NULL instead of 0.
3064 (build_user_type_conversion_1): Likewise.
3065 (tourney): Likewise.
3066 * decl.c (redeclaration_error_message): Likewise.
3067 * error.c (language_to_string): Likewise.
3069 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3071 * cp-tree.h (warn_hidden): Remove prototype.
3072 * class.c (warn_hidden): Make static.
3074 * cp-tree.h (build_type_conversion): Remove prototype.
3075 * cvt.c (build_type_conversion): Add prototype, make static.
3077 * cp-tree.h (push_tinst_level): Remove prototype.
3078 (pop_tinst_level): Likewise.
3079 * pt.c (push_tinst_level): Add prototype, make static.
3080 (pop_tinst_level): Likewise.
3082 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3084 * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
3085 * typeck.c (unary_complex_lvalue): Likewise.
3087 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3089 * lex.c (parse_strconst_pragma): Return error_mark_node instead of
3090 "(tree)-1" to indicate failure. Simplify.
3091 (handle_pragma_interface): Test for error_mark_node instead of
3093 (handle_pragma_implementation): Likewise.
3095 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3098 * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
3099 decl-specifiers. Remove extra check for duplicate 'friend'.
3100 * decl.c (grokdeclarator): Remove check for duplicate
3101 decl-specifiers. Set longlong together with long_p.
3103 2006-02-12 Jason Merrill <jason@redhat.com>
3106 * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
3107 TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
3109 2006-02-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3111 * class.c (debug_class): Remove extern.
3112 (debug_thunks): Likewise.
3114 2006-02-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
3116 * typeck.c (string_conv_p): Don't test for flag_const_strings.
3118 2006-02-08 Jason Merrill <jason@redhat.com>
3121 * cp-gimplify.c (cp_gimplify_expr): Don't call
3122 cp_gimplify_init_expr for MODIFY_EXPRs.
3123 * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
3125 2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3128 * decl.c (grokdeclarator): Set dname also for destructor.
3131 * decl.c (grokdeclarator): Clear storage_class together with staticp.
3133 2006-02-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3135 * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
3136 (cp_build_qualified_type): Propogate renaming.
3137 * call.c (convert_like_real): Likewise.
3138 * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
3139 * decl.c (make_typename_type, grokdeclarator): Likewise.
3140 * pt.c (tsubst_friend_function, instantiate_class_template,
3141 tsubst_default_argument, instantiate_decl,
3142 tsubst_initializer_list, tsubst_enum): Likewise.
3143 * semantics.c (finish_template_type): Likewise.
3144 * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
3146 2006-02-07 Dirk Mueller <dmueller@suse.com>
3148 * typeck.c (build_binary_op): Annotate div-by-zero
3149 warnings to make -Wno-div-by-zero have an effect.
3151 2006-02-07 Mark Mitchell <mark@codesourcery.com>
3154 * pt.c (coerce_template_template_parms): Do not templates with
3155 excess default arguments to match template template parameters
3156 with fewer parameters.
3157 (coerce_template_parms): Add use_default_args parameter; use
3158 default arguments only when true.
3159 (lookup_template_class): Adjust call to coerce_template_parms.
3160 (fn_type_unification): Likewise.
3162 (get_bindings): Likewise.
3163 (dependent_type_p): Add assertions.
3165 2006-02-06 Roger Sayle <roger@eyesopen.com>
3167 * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
3168 * rtti.c (typeinfo_in_lib_p): Likewise.
3169 * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
3170 * name-lookup.c (arg_assoc_type): Likewise.
3172 2006-02-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3174 * cp-tree.h (tf_warn_or_error): New substituion flag.
3175 (cp_build_qualified_type): Use it.
3176 * call.c (convert_like_real): Likewise.
3177 * cvt.c (cp_convert_to_pointer): Likewise.
3178 (convert_to_reference): Likewise.
3179 * decl.c (make_typename_type): Likewise.
3180 (grokdeclarator): Likewise.
3181 * pt.c (tsubst_friend_function): Likewise.
3182 (tsubst_friend_class): Likewise.
3183 (instantiate_class_template): Likewise.
3184 (tsubst_default_argument): Likewise.
3185 (instantiate_decl): Likewise.
3186 (tsubst_initializer_list): Likewise.
3187 (tsubst_enum): Likewise.
3188 * semantics.c (finish_template_type): Likewise.
3189 * typeck.c (build_ptrmemfunc): Likewise.
3190 (convert_for_assignment): Likewise.
3192 2006-02-03 Lee Millward <lee.millward@gmail.com>
3194 * typeck.c (string_conv_p): Pass appropiate
3195 OPT_Wxxxx values when calling warning().
3196 (build_array_ref, cxx_mark_addressable): Likewise.
3197 (check_return_expr): Likewise.
3199 * init.c (perform_member_init): Likewise.
3200 (sort_mem_initializers, emit_mem_initializers): Likewise.
3202 * class.c (check_field_decls): Likewise.
3203 (warn_about_ambiguous_bases): Likewise.
3205 * decl.c (pop_label, poplevel): Likewise.
3206 (duplicate_decls, grok_op_properties): Likewise.
3207 (start_preparsed_function, finish_function): Likewise.
3209 * name-lookup.c (pushdecl_maybe_friend): Likewise.
3210 (pushdecl_maybe_friend): Likewise.
3212 * parser.c (cp_parser_warn_min_max): Likewise.
3213 (cp_parser_cast_expression): Likewise.
3215 * method.c (lazily_declare_fn): Likewise.
3216 * cvt.c (convert_to_void): Likewise.
3217 * mangle.c (finish_mangling): Likewise.
3218 * cp-gimplify.c (gimplify_expr_stmt): Likewise.
3220 2006-02-03 Mark Mitchell <mark@codesourcery.com>
3222 * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
3223 not IDENTIFIER_OPNAME_P.
3225 2006-01-31 Mark Mitchell <mark@codesourcery.com>
3228 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
3230 * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
3232 (instantiate_class_template): Simplify.
3233 (verify_class_unification): Remove.
3234 (unify): Document parameters. Use INNERMOST_TEMPLATE_ARGS to
3235 permit multiple levels of template arguments.
3236 (more_specialized_class): Simplify.
3237 (get_class_bindings): Pass full arguments to unify. Fold
3238 verify_class_unification into this function. Return full
3240 (most_specialized_class): Adjust for changes to
3241 get_class_bindings. Issue errors here for ambiguity. Return the
3242 fully deduced arguments for the most specialized class, in
3243 addition to the partial specialization.
3245 2006-01-31 Ben Elliston <bje@au.ibm.com>
3247 * mangle.c: Comment fix.
3249 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3251 * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
3252 * repo.c (extract_string, afgets): Use cast when converting from
3255 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3257 * call.c (alloc_conversion): Use cast when converting from void *.
3258 (alloc_conversions): Likewise.
3259 (add_candidate): Likewise.
3260 (print_z_candidates): Likewise.
3261 (add_warning): Likewise.
3262 * pt.c (retrieve_local_specialization): Likewise.
3263 (process_partial_specialization): Likewise.
3264 (mangle_class_name_for_template): Likewise.
3265 (tsubst_template_args): Likewise.
3266 * typeck2.c (pat_calc_hash): Likewise.
3267 (pat_compare): Likewise.
3268 (abstract_virtuals_error): Likewise.
3269 * class.c (method_name_cmp): Likewise.
3270 (resort_method_name_cmp): Likewise.
3271 (get_vfield_name): Likewise.
3272 * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
3273 * lex.c (init_reswords): Likewise.
3274 * rtti.c (create_pseudo_type_info): Likewise.
3275 * search.c (dfs_lookup_base): Likewise.
3276 (dfs_dcast_hint_pre): Likewise.
3277 (dfs_dcast_hint_post): Likewise.
3278 * tree.c (hash_tree_cons): Likewise.
3279 * repo.c (extract_string): Likewise.
3281 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
3282 * g++spec.c (lang_specific_driver): Likewise.
3284 2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3286 * call.c (joust): Pass option code to warning. Use inform for
3288 * class.c (check_bases): Likewise.
3289 (maybe_warn_about_overly_private_class): Likewise.
3290 (check_field_decls): Likewise.
3291 (layout_empty_base): Likewise.
3292 (layout_virtual_bases): Likewise.
3293 (layout_class_type): Likewise.
3295 2006-01-28 Mark Mitchell <mark@codesourcery.com>
3298 * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
3300 (start_function): ... here.
3302 2006-01-28 Mark Mitchell <mark@codesourcery.com>
3305 * class.c (resolve_address_of_overloaded_function): Adjust use of
3306 return value from most_specialized_instantiation.
3307 * pt.c (determine_specialization): Avoid multiple calls to
3309 (most_specialized_instantiation): When a tie occurs, set the
3310 current presumed champion to the next template. Return the
3311 TREE_LIST node containing the template, rather than the template
3313 (most_specialized): Remove.
3314 * name-lookup.c (push_overloaded_decl): When duplicate_decls
3315 indicates a failed redeclaration, report that to callers.
3317 2006-01-26 Jason Merrill <jason@redhat.com>
3320 * name-lookup.c (parse_using_directive): Require strong using to
3321 name a nested namespace.
3323 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3326 * cp-tree.h (do_poplevel): Remove prototype.
3327 * semantics.c (do_poplevel): Add prototype. Make static.
3330 * cp-tree.h (default_conversion): Remove prototype.
3331 * typeck.c (default_conversion): Make static.
3333 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3335 * cp-tree.h (get_primary_binfo): Remove prototype.
3336 (push_using_decl): Likewise.
3337 (current_template_args): Likewise.
3338 (more_specialized_class): Likewise.
3339 (mark_class_instantiated): Likewise.
3340 (default_conversion): Likewise.
3341 (pfn_from_ptrmemfunc): Likewise.
3342 * class.c (get_primary_binfo): Add prototype, make static, simplify.
3343 * name-lookup.c (push_using_decl): Make static.
3344 * pt.c (current_template_args): Likewise.
3345 (more_specialized_class): Likewise.
3346 (mark_class_instantiated): Likewise.
3347 * typeck.c (default_conversion): Make static.
3348 (pfn_from_ptrmemfunc): Add prototype, make static.
3350 2006-01-24 Dirk Mueller <dmueller@suse.de>
3352 * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
3354 2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3357 * parser.c (cp_parser_unqualified_id): Check that destructor name
3359 * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
3360 Adjust comment. Return early if possible.
3361 Use same_type_p to compare types.
3362 * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
3364 2006-01-24 Mark Mitchell <mark@codesourcery.com>
3366 * semantics.c: Remove outdated comment.
3368 2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3370 * cp-tree.h (do_poplevel): Remove prototype.
3371 * semantics.c (do_poplevel): Add prototype. Make static.
3373 * cp-tree.h (original_type): Remove prototype.
3374 * typeck.c (original_type): Make static.
3376 * cp-tree.h (declare_global_var): Remove prototype.
3377 * decl.c (declare_global_var): Make static.
3379 * cp-tree.h (implicitly_declare_fn): Remove prototype.
3380 * method.c (implicitly_declare_fn): Make static.
3382 * cp-tree.h (fold_decl_constant_value): Remove prototype.
3383 * pt.c (fold_decl_constant_value): Make static.
3385 * cp-tree.h (build_x_delete): Remove prototype.
3386 * init.c (build_vec_delete_1): Call build_op_delete_call directly
3387 and not via build_x_delete.
3388 (build_x_delete): Remove.
3390 * cp-tree.h (get_vtt_name): Remove prototype.
3391 * class.c (get_vtt_name): Remove.
3392 (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
3394 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3396 * rtti.c (build_dynamic_cast): Fix comment.
3398 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3401 * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
3404 2006-01-21 Mark Mitchell <mark@codesourcery.com>
3407 * class.c (build_base_path): Generate a NOP_EXPR instead of a
3408 COMPONENT_REF if the base and derived classes are at the same
3412 * decl.c (begin_destructor_body): Robustify.
3415 * parser.c (cp_parser_direct_declarator): Robustify.
3417 2006-01-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3419 * parser.c (cp_lexer_next_token_is_keyword): Simplify.
3421 * parser.c (clear_decl_specs): Remove prototype.
3423 * parser.c (cp_parser_expression_fn): Remove.
3425 * call.c (add_builtin_candidates): Remove superfluous return.
3426 * name-lookup.c (do_toplevel_using_decl): Likewise.
3427 * parser.c (cp_parser_type_specifier_seq): Likewise.
3428 (cp_parser_save_default_args): Likewise.
3430 2006-01-20 Dirk Mueller <dmueller@suse.com>
3433 * semantics.c (finish_if_stmt): Call empty_body_warning.
3434 * parser.c (cp_parser_implicitly_scoped_statement):
3435 Mark empty statement with an empty stmt.
3437 2006-01-19 Mark Mitchell <mark@codesourcery.com>
3440 * name-lookup.c (do_class_using_decl): Don't try to look up base
3441 classes in templates with dependent base types.
3443 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3446 * pt.c (maybe_process_partial_specialization): Return early on
3449 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3452 * decl.c (start_preparsed_function): Check default arguments
3454 * name-lookup.c (pushdecl_maybe_friend): Check default arguments
3455 of all functions and function templates.
3456 * parser.c (cp_parser_late_parsing_default_args): Check default
3458 * decl2.c (check_default_args): Set missing default arguments to
3461 2006-01-18 Mark Mitchell <mark@codesourcery.com>
3464 * cp-tree.h (push_class_stack): New function.
3465 (pop_class_stack): Likewise.
3466 * class.c (class_stack_node): Add hidden field.
3467 (pushclass): Clear it.
3468 (push_class_stack): New function.
3469 (pop_class_stack): Likewise.
3470 (currently_open_class): Ignore hidden classes.
3471 (currently_open_derived_class): Likewise.
3472 * name-lookup.c (push_to_top_level): Call push_class_stack.
3473 (pop_from_top_level): Call pop_class_stack.
3475 2006-01-18 Kazu Hirata <kazu@codesourcery.com>
3477 * tree.c (find_tree_t, find_tree): Remove.
3478 * cp-tree.h: Remove the prototype for find_tree.
3480 2006-01-18 Jakub Jelinek <jakub@redhat.com>
3482 * search.c (lookup_conversions_r): Fix a pasto.
3484 2006-01-17 Eric Christopher <echristo@apple.com>
3486 * call.c (convert_like_real): When issuing conversion
3487 warnings, depend on OPT_Wconversion.
3488 * cvt.c (build_expr_type_conversion): Ditto.
3490 2006-01-17 Kazu Hirata <kazu@codesourcery.com>
3492 * name-lookup.c (lookup_namespace_name): Remove.
3493 * name-lookup.h: Remove the prototype for
3494 lookup_namespace_name.
3496 2006-01-17 Jakub Jelinek <jakub@redhat.com>
3499 * decl.c (compute_array_index_type): After issuing not an integral
3500 constant-expression error, set size to 1 to avoid ICEs later on.
3502 2006-01-16 Ian Lance Taylor <ian@airs.com>
3504 * parser.c: Include "cgraph.h".
3505 (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
3508 2006-01-16 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3510 * g++spec.c (lang_specific_spec_functions): Remove.
3512 2006-01-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3514 * decl.c (check_initializer): Fix thinko.
3516 2006-01-14 Mark Mitchell <mark@codesourcery.com>
3519 * parser.c (cp_parser_direct_declarator): Use cp_parser_error
3522 2006-01-13 Jason Merrill <jason@redhat.com>
3524 * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
3526 * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
3527 * pt.c (check_explicit_specialization): Likewise.
3529 2006-01-12 Jason Merrill <jason@redhat.com>
3532 * pt.c (check_explicit_specialization): Handle namespace
3534 * name-lookup.c (set_decl_namespace): Likewise.
3536 2006-01-12 Nathan Sidwell <nathan@codesourcery.com>
3539 * class.c (handle_using_decl): Pass correct scope to
3540 cp_emit_debug_info_for_using.
3542 2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
3545 * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
3548 2006-01-06 Gabriel Dos Reis <gdr@integrablesolutions.net>
3550 * parser.c (cp_parser_primary_expression): Document the grammar
3551 for the built-in offsetof, a GNU extension.
3553 2006-01-04 Zdenek Dvorak <dvorakz@suse.cz>
3556 * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo
3559 2006-01-04 Chris Lattner <sabre@gnu.org>
3561 * typeck2.c: update copyright to 2006
3562 (split_nonconstant_init_1): Set TREE_CONSTANT to true.
3564 2006-01-04 Mark Mitchell <mark@codesourcery.com>
3567 * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
3568 checks, even when parsing tentatively.
3570 2006-01-04 Richard Henderson <rth@redhat.com>
3572 Merge from gomp branch.
3573 * lex.c (handle_pragma_java_exceptions): Fix whitespace.
3574 * parser.c (struct cp_token): Add pragma_kind.
3575 (eof_token): Update to match.
3576 (struct cp_lexer): Add in_pragma; rearrange next for better packing.
3577 (cp_parser_initial_pragma): New.
3578 (cp_lexer_new_main): Use it. Don't bother clearing
3579 c_lex_return_raw_strings.
3580 (cp_lexer_get_preprocessor_token): Always initialize keyword
3581 and pragma_kind fields. Handle CPP_PRAGMA.
3582 (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
3584 (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma.
3585 (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
3586 (cp_parser_skip_to_pragma_eol): New.
3587 (cp_parser_error): Use it.
3588 (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
3589 rearrange with switch statement.
3590 (cp_parser_skip_to_end_of_statement): Likewise.
3591 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
3592 (cp_parser_skip_to_closing_brace): Likewise.
3593 (cp_parser_skip_until_found): Likewise.
3594 (cp_parser_statement): Add in_compound argument; update callers.
3595 Use it to decide how to handle pragma parsing.
3596 (cp_parser_labeled_statement): Add in_compound argument; pass
3597 it on to cp_parser_statement.
3598 (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
3599 (cp_parser_declaration_seq_opt): Likewise.
3600 (cp_parser_parameter_declaration): Likewise.
3601 (cp_parser_member_specification_opt): Likewise.
3602 (cp_parser_function_definition_after_decl): Likewise.
3603 (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
3604 (cp_parser_pragma): New.
3607 2006-01-04 Dirk Mueller <dmueller@suse.com>
3609 * decl.c (finish_constructor_body): create simple
3610 compound stmt instead of a if(1) { } construct.
3612 2006-01-03 Mark Mitchell <mark@codesourcery.com>
3615 * name-lookup.c (push_class_level_binding): When a derived class
3616 provides a type binding, eliminate any type binding from a base
3620 * repo.c (repo_emit_p): Always instantiate static data members
3621 initialized by constant expressions, so that there values are
3624 2006-01-02 Mark Mitchell <mark@codesourcery.com>
3627 * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
3628 conversion operator.
3629 * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
3632 * class.c (add_method): Never associate more than one destructor
3633 with a single class.
3636 * cp-tree.h (do_friend): Adjust prototype.
3637 * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
3638 (grokdeclarator): Likewise. Refine check for invalid
3639 declarations/definitions of member functions outside of their own
3641 * friend.c (do_friend): Make funcdef_flag a bool, not an int.
3644 * parser.c (cp_parser_mem_initializer_list): Check result of
3645 cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
3646 (cp_parser_mem_initializer): Return error_mark_node for failure.
3649 * parser.c (cp_parser_template_parameter_list): Call
3650 begin_template_parm_list and end_template_parm_list here.
3651 (cp_parser_type_parameter): Not here.
3652 (cp_parser_template_declaration_after_export): Or here.
3653 (cp_parser_elaborated_type_specifier): Call
3654 cp_parser_check_template_parameters.
3656 * tree.c (build_target_expr_with_type): Use force_target_expr.
3658 * decl2.c (mark_used): Fix typo in comment.
3660 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3662 * parser.c (cp_parser_using_declaration): Skip name-lookup on
3665 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3667 * cxx-pretty-print.c (pp_cxx_constant): New. Print
3668 string-literal in parens if input program says so.
3669 (pp_cxx_primary_expression): Hand off constant printing to
3671 (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
3672 (pp_cxx_expression): Use pp_cxx_constant for literals.
3673 * error.c (dump_expr): Use pp_constant for literals.
3675 2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
3677 * method.c (make_thunk): Don't set comdat_linkage here.
3678 (use_thunk): Make thunk one only here, if thunk target is
3681 2005-12-26 Mark Mitchell <mark@codesourcery.com>
3684 * decl.c (grokdeclarator): Remove dead code.
3685 * ptree.c (cxx_print_xnode): Handle BASELINK.
3686 * parser.c (make_id_declarator): Add sfk parameter.
3687 (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
3689 (cp_parser_declarator_id): Simplify BASELINKs here.
3690 (cp_parser_member_declaration): Adjust calls to
3693 2005-12-26 Mark Mitchell <mark@codesourcery.com>
3695 PR c++/23171, c++/23172, c++/25417.
3696 * typeck.c (build_unary_op): Create temporary variables for
3697 compound literals whose addresses are taken.
3698 * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
3699 * decl.c (reshape_init_vector): Likewise.
3700 (reshape_init): Give it external linkage.
3701 (check_initializer): Use COMPOUND_LITERAL_P.
3702 (initialize_artificial_var): Allow the initializer to be a
3704 * call.c (make_temporary_var_for_ref_to_temp): Use
3705 create_temporary_var.
3706 * cp-tree.h (COMPOUND_LITERAL_P): New macro.
3707 (rehape_init): Declare.
3708 * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
3709 * semantics.c (finish_compound_literal): Use reshape_init.
3711 2005-12-23 Mark Mitchell <mark@codesourcery.com>
3714 * pt.c (instantiate_template): Handle SFINAE.
3716 2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3718 * decl.c (grokdeclarator): Improve diagnostic for friend
3719 declarations of class members.
3721 2005-12-22 Mark Mitchell <mark@codesourcery.com>
3724 * tree.c (really_overloaded_fn): Tweak comment.
3725 * pt.c (tsubst_call_declarator_parms): Remove.
3726 (tsubst_copy): Call mark_used on the member referenced by an
3728 * semantics.c (finish_qualified_id_expr): Simplify.
3729 * decl2.c (mark_used): Accept BASELINKs.
3732 * typeck.c (build_unary_op): Pass DECLs not names to
3734 * init.c (build_offset_ref): Do not do name lookup. Do not call
3736 * call.c (build_call): Simplify and tidy.
3737 * semantics.c (finish_qualified_id_expr): Call mark_used.
3739 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3742 * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
3743 identify a single '0'.
3745 2005-12-20 Mark Mitchell <mark@codesourcery.com>
3748 * decl.c (use_eh_spec_block): New function.
3749 (store_parm_decls): Use it.
3750 (finish_function): Likewise.
3752 2005-12-19 Mark Mitchell <mark@codesourcery.com>
3755 * init.c (expand_member_init): Print messages about baseclasses
3756 using %T rather than %D.
3759 * class.c (add_method): Do not treat templates as identical unless
3760 their return types are the same.
3762 2005-12-12 Mark Mitchell <mark@codesourcery.com>
3765 * tree.c (build_qualified_name): Return error_mark_node for
3768 2005-12-10 Mark Mitchell <mark@codesourcery.com>
3771 * pt.c (tsubst_copy_and_build): Permit dependent types for the
3772 object in a class member access expression.
3774 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3777 * mangle.c (write_bare_function_type): Mangle return type for
3778 methods of Java classes
3780 2005-12-08 Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3782 * call.c (build_conditional_expr): Print types in error messages.
3784 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3786 * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
3788 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3790 * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
3792 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3794 * Make-lang.in (c++.all.build, c++.install-normal): Remove.
3796 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3798 * Make-lang.in: Remove all dependencies on s-gtype.
3800 2005-12-06 Aldy Hernandez <aldyh@redhat.com>
3803 * decl.c (reshape_init_array_1): Handle max_index of -1.
3805 2005-12-06 Roger Sayle <roger@eyesopen.com>
3807 * typeck.c (build_binary_op): Issue warning if either operand of a
3808 comparison operator is a string literal, except for testing equality
3809 or inequality against NULL.
3811 2005-12-06 Roger Sayle <roger@eyesopen.com>
3814 * decl.c (compute_array_index_type): Check that itype is an
3815 INTEGER_CST node before testing/clearing TREE_OVERFLOW.
3817 2005-12-05 Daniel Berlin <dberlin@dberlin.org>
3819 * ptree.c (cxx_print_decl): Update to check for decl_common
3822 2005-12-02 Mark Mitchell <mark@codesourcery.com>
3825 * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
3828 2005-12-02 Richard Guenther <rguenther@suse.de>
3830 * semantics.c (simplify_aggr_init_expr): Use buildN instead
3833 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
3835 * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
3837 (cp_parser_template_argument_list): Use XRESIZEVEC instead of
3839 * class.c (pushclass): Likewise.
3841 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
3843 * decl2.c (get_priority_info): Use XNEW, not xmalloc.
3844 * decl.c (push_switch): Likewise.
3845 * lex.c (handle_pragma_implementation): Likewise.
3846 * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
3848 (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
3849 * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
3850 * g++spec.c (lang_specific_driver): Likewise.
3851 * mangle.c (save_partially_mangled_name): Likewise.
3852 * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
3853 (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
3854 (cp_parser_sizeof_operand): Likewise.
3855 * repo.c (open_repo_file, open_repo_file): Likewise.
3857 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3859 * parser.c (cp_parser_make_typename_type): Call make_typename_type
3860 with tf_none instead of magic value 0.
3861 (cp_parser_explicit_instantiation): Call do_type_instantiation
3862 with tf_error instead of magic value 1.
3863 (cp_parser_elaborated_type_specifier): Call make_typename_type
3864 with tf_error instead of magic value 1.
3865 (cp_parser_class_name): Likewise.
3866 (cp_parser_lookup_name): Likewise.
3868 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3870 * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
3873 2005-11-30 Jason Merrill <jason@redhat.com>
3876 * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
3879 2005-11-30 Ben Elliston <bje@au.ibm.com>
3881 * typeck.c (build_x_unary_op): Correct spelling in error message.
3883 2005-11-28 Nathan Sidwell <nathan@codesourcery.com>
3886 * class.c (check_field_decls): Only set DECL_PACKED on a field
3887 when its natural alignment is > BITS_PER_UNIT.
3889 2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3892 * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
3894 2005-11-26 Richard Henderson <rth@redhat.com>
3896 * lex.c: Update for pragma_lex rename.
3897 * parser.c: Likewise.
3899 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3902 * decl.c (grokparms): Do not allow typedef-names in a '(void)'
3905 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3907 * typeck2.c (process_init_constructor_union): Remove check for
3908 unnamed union members.
3910 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3912 * name-lookup.c (lookup_name_real): Merge two if's.
3914 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3916 * pt.c (instantiate_class_template): Clean-up.
3918 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3920 * pt.c (template_class_depth_real): Remove. Move functionality to ...
3921 (template_class_depth): ... here, replacing count_specializations
3922 with 0. Adjust comment.
3924 2005-11-24 Richard Guenther <rguenther@suse.de>
3925 Dirk Mueller <dmueller@suse.de>
3928 * typeck.c (build_reinterpret_cast_1): Use
3929 strict_aliasing_warning.
3931 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3934 * pt.c (check_instantiated_args): Reword diagnostic message about
3935 template argument involving local types.
3937 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3940 * typeck.c (build_array_ref): Avoid code duplicate. Use common
3941 C/C++ diagnostic function warn_array_subscript_with_type_char.
3943 2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3946 * error.c (resolve_virtual_fun_from_obj_type_ref): New.
3947 (dump_expr): Use it in <case CALL_EXPR>.
3949 2005-11-21 Richard Henderson <rth@redhat.com>
3951 * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
3953 * name-lookup.c (lookup_name): Remove prefer_type argument.
3954 (lookup_name_prefer_type): New.
3955 * decl.c (lookup_and_check_tag): Use them.
3956 * pt.c (tsubst_friend_class): Likewise.
3957 (lookup_template_class): Likewise.
3958 (tsubst_copy_and_build): Likewise.
3959 * name-lookup.h (lookup_name_prefer_type): New.
3960 (lookup_name): Remove declaration.
3962 2005-11-18 Mark Mitchell <mark@codesourcery.com>
3965 * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
3967 * name-lookup.c (set_decl_namespace):
3969 2005-11-18 Mike Stump <mrs@apple.com>
3971 * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
3972 * name-lookup.c (lookup_name_two): Remove.
3973 (lookup_name_one): Add.
3974 * name-lookup.h (lookup_name_two): Remove.
3975 (lookup_name_one): Add.
3977 2005-11-15 Jason Merrill <jason@redhat.com>
3980 * method.c (locate_copy): Also use skip_artificial_parms here.
3981 (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
3983 (locate_ctor): Abort if we fail to find a default constructor.
3985 2005-11-15 Mike Stump <mrs@apple.com>
3987 * name-lookup.c (lookup_name_two): Add.
3988 * name-lookup.h: Likewise.
3990 2005-11-15 Mark Mitchell <mark@codesourcery.com>
3993 * typeck.c (check_for_casting_away_constness): Use the diag_fn.
3994 (build_const_cast_1): Call it, for C-style casts.
3996 2005-11-14 Mark Mitchell <mark@codesourcery.com>
3999 * pt.c (check_explicit_specialization): Don't check for C linkage.
4000 (push_template_decl_real): Likewise.
4001 * parser.c (cp_parser_explicit_specialization): Check here.
4002 (cp_parser_template_declaration_after_export): And here.
4004 * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
4007 2005-11-14 Jason Merrill <jason@redhat.com>
4010 * method.c (locate_ctor): Skip all artificial parms, not just
4013 2005-11-14 Mark Mitchell <mark@codesourcery.com>
4015 * parser.c (eof_token): Add initializer for ambiguous_p.
4017 2005-11-13 Mark Mitchell <mark@codesourcery.com>
4020 * decl.c (check_redeclaration_exception_specification): New
4022 (duplicate_decls): Use it.
4023 * error.c (fndecl_to_string): Print the template parameter list.
4026 * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
4028 (pp_cxx_original_namespace_definition): Likewise.
4029 * name-lookup.c (ambiguous_decl): Don't issue error messages;
4030 instead return lists of ambiguous candidates.
4031 (select_decl): Handle ambiguous namespace lookups.
4032 * parser.c (cp_token): Add ambiguous_p.
4033 (cp_lexer_get_preprocessor_token): Set it.
4034 (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
4035 when a qualified name uses an invalid scope.
4036 (cp_parser_primary_expression): Print ambiguous candidates.
4037 (cp_parser_type_parameter): Adjust comment to reflect new
4038 parameter name for cp_parser_lookup_name.
4039 (cp_parser_template_argument): Likewise.
4040 (cp_parser_elaborated_type_specifier): Likewise.
4041 (cp_parser_namespace_name): Likewise.
4042 (cp_parser_class_name): Print ambiguous candidates.
4043 (cp_parser_lookup_name): Rename ambiguous_p parameter to