1 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3 * cvt.c (cp_convert_and_check) : Define.
4 * cp-tree.h (cp_convert_and_check): Declare.
5 * call.c (convert_conversion_warnings): Rename to
6 conversion_null_warnings. The warning for floating-point to
7 integer is handled by convert_and_check in convert_like_real.
8 (convert_like_real): convert_conversion_warnings was renamed as
9 conversion_null_warnings.
10 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
11 overflow and changes of value during conversion.
13 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
16 * parser.c (cp_parser_statement): If 'namespace' is found, this
17 only can be a namespace alias definition, so parse it now.
18 (cp_parser_namespace_alias_definition): if we find an open brace
19 instead of '=', then this is actually a misplaced namespace
22 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
25 * decl.c (cxx_init_decl_processing): Move command-line options
26 processing to c-opts.c.
28 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
30 * ptree.c (cxx_print_type): Use formatting markup for integers
31 when printing template parameter index/level/orig level.
32 (cxx_print_xnode): Ditto.
33 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
34 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
35 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
37 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
38 rather than a HOST_WIDE_INT.
39 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
40 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
42 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
43 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
44 IN_BASE_INITIALIZER bool bitfields.
45 (struct cp_declarator): Make KIND a 4-bit field. Make
46 PARAMETER_PACK_P a bool bitfield just after KIND.
47 * pt.c (uses_parameter_packs): Destroy the pointer set.
48 (make_pack_expansion): Ditto.
49 (check_for_bare_parameter_packs): Ditto.
50 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
52 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
55 * call.c (convert_default_arg): Instead of copying the node,
58 2007-03-15 Dirk Mueller <dmueller@suse.de>
61 * call.c (convert_conversion_warnings): New..
62 (convert_like_real): .. factored out from here.
63 (convert_conversion_warnings): Add warning about
64 false being converted to NULL in argument passing.
66 2007-03-14 Dirk Mueller <dmueller@suse.de>
68 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
69 (finish_do_body): Warn about empty body in do/while statement.
71 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
73 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
75 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
78 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
81 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
83 * cp/repo.c (init_repo): Initialize random_seed saved options.
84 (finish_repo): Adjust.
86 2007-03-13 Mark Mitchell <mark@codesourcery.com>
89 * Make-lang.in (doc/g++.1): Use $< to specify the location from
92 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
94 * decl.c (compute_array_index_type): New warning flag warn_vla.
96 2007-03-12 Mark Mitchell <mark@codesourcery.com>
99 * call.c (convert_default_arg): Copy non-constant arguments.
101 2007-03-11 Mark Mitchell <mark@codesourcery.com>
104 * parser.c (cp_parser_postfix_expression): Disallow compound
105 literals in constant expressions.
108 * semantics.c (finish_typeof): Use unlowered_expr_type.
110 2007-03-10 Mark Mitchell <mark@codesourcery.com>
113 * cp-tree.h (unlowered_expr_type): New function.
114 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
115 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
116 (unlowered_expr_type): New function.
117 (build_unary_op): Disallow predecrements of bool bitfields.
118 * call.c (build_conditional_expr): Use unlowered_expr_type.
119 * pt.c (type_unification_real): Likewise.
121 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
124 * typeck.c (check_return_expr): Check for bare parameter packs.
125 (comptypes): Compare template parameter packs and
126 type pack expansions.
127 * decl.c (grokdeclarator): Deal with the declaration of function
129 (grokparms): Verify that the (optional) function parameter pack is
130 at the end of the parameter list.
131 (xref_basetypes): Handle pack expansions in the base class.
132 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
133 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
134 (NONTYPE_ARGUMENT_PACK): New.
135 (TYPE_PACK_EXPANSION): New.
136 (EXPR_PACK_EXPANSION): New.
137 (ARGUMENT_PACK_SELECT): New.
138 * cp-objcp-common.c (cp_tree_size): Compute size of
139 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
140 ARGUMENT_PACK_SELECT.
141 * error.c (dump_template_argument): Print template argument packs.
142 (dump_template_argument_list): Ditto.
143 (dump_template_parameter): Dump `...' for template type parameter
145 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
146 (dump_parameters): Print function parameter packs.
147 (dump_template_parms): Print template argument packs.
148 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
149 (maybe_warn_variadic_templates): New.
150 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
151 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
152 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
154 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
155 (write_template_arg): Write argument packs as separate arguments.
156 * cp-tree.h (struct template_parm_index_s): Add flag that
157 indicates that the template parameter is actually a parameter
159 (struct tree_argument_pack_select): New.
160 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
161 (union lang_tree_node): Add argument_pack_select.
162 (FUNCTION_PARAMETER_PACK_P): New.
163 (PACK_EXPANSION_P): New.
164 (PACK_EXPANSION_PATTERN): New.
165 (SET_PACK_EXPANSION_PATTERN): New.
166 (PACK_EXPANSION_PARAMETER_PACKS): New.
167 (ARGUMENT_PACK_P): New.
168 (ARGUMENT_PACK_ARGS): New.
169 (SET_ARGUMENT_PACK_ARGS): New.
170 (ARGUMENT_PACK_INCOMPLETE_P): New.
171 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
172 (TEMPLATE_PARM_PARAMETER_PACK): New.
173 (TEMPLATE_TYPE_PARAMETER_PACK): New.
174 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
175 (ARGUMENT_PACK_SELECT_INDEX): New.
176 (ARGUMENT_PACK_SELECT_ARG): New.
177 (struct cp_declarator): Add parameter_pack_p flag.
178 (maybe_warn_variadic_templates): Declare.
179 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
180 indicate a template parameter pack.
181 (uses_parameter_packs): Declare.
182 (template_parameter_pack_p): Declare.
183 (template_parms_variadic_p): Declare.
184 (make_pack_expansion): Declare.
185 (check_for_bare_parameter_packs): Declare.
186 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
187 sizeof... expressions.
188 (pp_cxx_expression): Print pack expansions and non-type argument
190 (pp_cxx_exception_specification): Print pack expansions.
191 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
192 (pp_cxx_ctor_initializer): Print pack expansions.
193 (pp_cxx_type_id): Print pack expansions.
194 (pp_cxx_template_argument_list): Print argument packs.
195 (pp_cxx_template_parameter): Print ellipsis for template parameter
197 * pt.c (comp_template_parms): Compare template parameter packs.
198 (template_parameter_pack_p): New.
199 (template_parms_variadic_p): New.
200 (template_args_variadic_p): New.
201 (make_ith_pack_parameter_name): New.
202 (struct find_parameter_pack_data): New.
203 (find_parameter_packs_r): New.
204 (uses_parameter_packs): New.
205 (make_pack_expansion): New.
206 (check_for_bare_parameter_packs): New.
207 (expand_template_argument_pack): New.
208 (reduce_template_parm_level): Propagate parameter pack flag.
209 (process_template_parm): Add is_parameter_pack parameter to state
210 when the parameter is actually a parameter pack. Create template
211 parameter packs when is_parameter_pack is true.
212 (current_template_args): The argument for a template parameter
213 pack is an argument pack containing a single pack expansion.
214 (process_partial_specialization): When checking that non-type
215 argument expressions do not involve template parameters, loop over
216 the arguments in argument packs separately.
217 (push_template_decl_real): Check that the type of the declaration
218 does not have any bare parameter packs. Check that primary
219 templates have no more than one parameter pack, and that it comes
220 at the end of the template parameter list.
221 (convert_template_argument): Handle coercions for pack expansion
222 expressions by coercing the pattern then rebuilding the expansion.
223 (coerce_template_parms): When coercing the arguments for a
224 variadic template, pack "extra" arguments into an argument pack.
225 (coerce_template_template_parms): Cannot coerce between parameter
226 packs and non-pack parameters.
227 (template_args_equal): Compare PACK_EXPANSION_P expressions.
228 (comp_template_args): Expand all template arguments packs before
229 comparing template argument lists.
230 (mangle_class_name_for_template): Make argument packs as separate
232 (for_each_template_parm_r): No need to handle BASELINK.
233 (instantiate_class_template): Handle pack expansions in the base
235 (tsubst_pack_expansion): New.
236 (tsubst_template_args): Handle substitutions of argument packs and
237 pack expansion into template argument lists.
238 (tsubst_decl): Expand function parameter packs into separate
240 (tsubst_arg_types): Expand a type pack expansion into separate
242 (tsubst_exception_specification): Handle pack expansions in
243 exception specifiers.
244 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
245 replacing a template parameter with its argument. If we encounter
246 a substitution for an argument pack, just return the parameter
248 (tsubst_copy): sizeof(X...) returns the number of elements in
249 parameter pack X. See through ARGUMENT_PACK_SELECT when the
250 PARM_DECL is a parameter pack.
251 (tsubst_expr): Expression pack expansions and argument packs
252 cannot show up here; they will all be handled through function
253 calls, sizeof, and template argument lists.
254 (tsubst_copy_and_build): sizeof(X...) returns the number of
255 elements in parameter pack X. Handle pack expansions in TREE_LIST
256 and CONSTRUCTOR nodes.
257 (fn_type_unification): Handle "incomplete" explicit template
258 argument lists that specify some of the arguments for a template
260 (type_unification_real): Unify arguments against pack expansions.
261 (template_parm_level_and_index): New, helper function.
262 (unify_pack_expansion): New.
263 (unify): Unify argument packs on an argument-by-argument basis,
264 handling variadic argument packs as well.
265 (more_specialized_fn): Handle unification of function parameter
266 packs. All things being equal, prefer non-variadic function
267 templates to variadic function templates.
268 (more_specialized_class): Prefer the variadic class template
269 partial specialization that binds fewer arguments to a parameter
271 (regenerate_decl_from_template): Expand function parameter packs
272 into separate parameters.
273 (instantiate_decl): Ditto.
274 (tsubst_initializer_list): Handle pack expansions for base-class
276 (dependent_type_p_r): Determine dependent types in argument packs
278 (value_dependent_expression_p): Determine value-dependence of
279 non-type argument packs.
280 (dependent_template_arg_p): Handle argument packs.
281 * semantics.c (finish_cond): Check for bare parameter packs.
282 (finish_expr_stmt): Ditto.
283 (finish_for_expr): Ditto.
284 (finish_switch_cond): Ditto.
285 (finish_mem_initializers): Ditto.
286 * name-lookup.c (arg_assoc_type): Handle pack expansions and
288 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
289 * parser.c (make_declarator): Declarator is not an expansion.
290 (make_pointer_declarator): Transfer parameter pack flag to outer
292 (make_reference_declarator): Ditto.
293 (make_ptrmem_declarator): Ditto.
294 (make_call_declarator): Ditto.
295 (make_array_declarator): Ditto.
296 (cp_parser_postfix_expression): Allow pack expansion expressions
297 in the argument list for a call expression.
298 (cp_parser_parenthesized_expression_list): Add new parameter
299 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
300 into separate arguments."
301 (cp_parser_new_placement): Allow pack expansion expressions.
302 (cp_parser_new_initializer): Ditto.
303 (cp_parser_mem_initializer_list): Allow ellipsis to create a
304 base-class initializer expansion.
305 (cp_parser_mem_initializer): Ditto.
306 (cp_parser_template_parameter_list): Keep track of whether the
307 template parameter is a template parameter pack.
308 (cp_parser_template_parameter): Parse the ellipsis to indicate a
309 template parameter pack.
310 (cp_parser_type_parameter): Ditto.
311 (cp_parser_template_argument_list): Parse the ellipsis to indicate
313 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
314 this declarator is a parameter pack.
315 (cp_parser_parameter_declaration): The ellipsis does not end the
316 parameter declaration, because it might be a parameter pack. Parse
317 the ellipsis to indicate a parameter pack.
318 (cp_parser_initializer): Allow pack expansions.
319 (cp_parser_initializer_list): Allow ellipsis to create an
320 initializer expansion.
321 (cp_parser_base_clause): Allow ellipsis to create a base specifier
323 (cp_parser_type_id_list): Allow ellipsis to create an exception
325 (cp_parser_attribute_list): Don't allow pack expansions.
326 (cp_parser_functional_cast): Allow pack expansions.
327 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
328 compute the length of a parameter pack.
329 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
330 end a template argument.
331 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
332 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
335 2007-03-09 Dirk Mueller <dmueller@suse.de>
337 * cp/call.c (build_new_op): Call warn_logical_operator.
339 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
342 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
345 * pt.c (any_template_arguments_need_structural_equality_p):
348 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
350 * decl.c (grokdeclarator): Disable warnings for anonymous
353 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
355 * typeck2.c (readonly_error): Always emit a hard error.
356 Remove last argument.
357 * cp-tree.h (readonly_error): Adjust prototype.
358 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
359 * typeck.c (build_unary_op): Likewise.
360 (build_modify_expr): Likewise.
362 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
365 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
367 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
370 * parser.c (struct cp_parser): New IN_IF_STMT.
371 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
372 returning if parsing the body of an 'if' statement or issuing an
373 error and continuing.
374 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
376 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
378 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
381 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
384 2007-03-02 Geoffrey Keating <geoffk@apple.com>
386 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
387 Objective-C++. Don't exit early if -shared-libgcc needs to be
390 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
392 * typeck.c (common_base_type): Delete unused function.
394 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
396 * Make-lang.in: Add dummy lang.install-pdf target.
398 2007-03-01 Simon Baldwin <simonb@google.com>
401 * decl.c (check_tag_decl): Added new warning for typedef ignored
402 when it precedes an otherwise valid non-typedef declaration.
404 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
406 * typeck.c (build_function_call): Store converted arguments
407 in a stack-allocated array instead of building a list.
408 (convert_arguments): Store arguments in the array passed in as an
409 argument, and return the actual number of arguments.
410 * call.c (build_call): Delete, and replace with...
411 (build_call_n, build_call_a): New.
412 (build_op_delete_call): Rewrite to avoid constructing argument lists.
413 (build_over_call): Store converted arguments in a stack-allocated
414 array instead of building a list.
415 (build_cxx_call): Pass arguments in an array instead of as a list.
416 (build_java_interface_fn_ref): Rewrite to avoid constructing
418 * tree.h: Update declarations to reflect above changes.
419 * method.c (use_thunk): Use a stack-allocated array to hold
420 the arguments instead of a list.
421 * rtti.c (throw_bad_cast): Update call to cxx_call.
422 (throw_bad_typeid): Likewise.
423 (build_dynamic_cast_1): Likewise.
424 * init.c (build_builtin_delete_call): Use build_call_n.
425 * decl.c (expand_static_init): Likewise.
426 * except.c (cp_protect_cleanup_actions): Likewise.
427 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
428 (gimplify_must_not_throw_expr): Likewise.
429 (cxx_omp_apply_fn): Use build_call_a.
431 2007-02-26 Mark Mitchell <mark@codesourcery.com>
433 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
434 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
436 2007-02-25 Mark Mitchell <mark@codesourcery.com>
438 * cp-tree.h (static_ctors): Remove.
439 * cp-tree.h (static_dtors): Likewise.
440 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
441 refactoring of tree_map hierarchy.
442 (decl_shadowed_for_var_insert): Likewise.
443 * semantics.c (expand_body): Use c_expand_body.
444 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
445 * decl2.c (static_ctors): Remove.
446 (static_dtors): Likewise.
447 (generate_ctor_or_dtor_function): Pass NULL_TREE to
448 objc_generate_static_init_call. Do not call static_[cd]tors.
449 (generate_ctor_and_dtor_functions_for_priority): Do not check for
451 (cp_write_global_declarations): Likewise.
453 2007-02-23 Richard Guenther <rguenther@suse.de>
455 * class.c (note_name_declared_in_class): Make declaration
456 changes meaning a pedwarn.
458 2007-02-22 Michael Matz <matz@suse.de>
461 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
462 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
463 dump_function_decl): Guard emitting outer scopes by new flag.
464 * cp-lang.c (cxx_dwarf_name): New function.
465 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
466 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
468 (push_template_decl_real, lookup_template_class): Remove calls
471 2007-02-19 Mark Mitchell <mark@codesourcery.com>
473 * call.c (build_new_method_call): Ensure that explicit calls of
474 destructors have type "void".
476 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
478 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
479 and -Walways-true with -Waddress.
480 * cvt.c (convert_to_void): Replace unconditional warning with
483 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
485 * decl.c, tree.c: Fix comment typos.
487 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
490 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
491 statement expression if we had an error mark node.
493 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
494 Brooks Moses <brooks.moses@codesourcery.com>
495 Lee Millward <lee.millward@codesourcery.com>
497 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
498 Change class to tcc_vl_exp.
500 * call.c (build_call): Use build_call_list instead
502 (build_over_call): Likewise.
503 (build_new_method_call): Use build_min_non_dep_call_list
504 instead of build_min_non_dep.
506 * error.c (dump_call_expr_args): New function.
507 (dump_aggr_init_expr_args): New function.
508 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
509 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
511 * cvt.c (convert_to_void): Use build_call_array instead
512 of build3; use new AGGR_INIT_EXPR accessor macros.
514 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
515 instead of TREE_CODE_LENGTH.
517 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
518 AGGR_INIT_EXPR accessor macros.
520 * cp-gimplify.c (cp_gimplify_init_expr): Use
521 AGGR_INIT_EXPR_SLOT to set the slot operand.
523 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
524 (AGGR_INIT_EXPR_SLOT): New macro.
525 (AGGR_INIT_EXPR_ARG): New macro.
526 (aggr_init_expr_nargs): New macro.
527 (AGGR_INIT_EXPR_ARGP): New macro.
528 (aggr_init_expr_arg_iterator): New.
529 (init_aggr_init_expr_arg_iterator): New.
530 (next_aggr_init_expr_arg): New.
531 (first_aggr_init_expr_arg): New.
532 (more_aggr_init_expr_args_p): New.
533 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
534 (stabilize_aggr_init): New declaration.
535 (build_min_non_dep_call_list): Likewise.
537 * tree.c (process_aggr_init_operands): New function.
538 (build_aggr_init_array) New function.
539 (build_cplus_new): Update to use new CALL_EXPR and
540 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
541 build_aggr_init_array.
542 (build_min_non_dep_call_list) New function.
543 (build_min_nt): Assert input code parameter is not a variable
544 length expression class.
545 (build_min, build_min_non_dep): Likewise.
546 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
547 to check for equality instead of recursing. Handle tcc_vl_exp
549 (stabilize_call): Update to only handle CALL_EXPRs, not
550 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
551 (stabilize_aggr_init): New function.
552 (stabilize_init): Use it.
554 * cxx-pretty-print.c (pp_cxx_postfix_expression)
555 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
556 AGGR_INIT_EXPR accessor macros and argument iterators.
558 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
559 build_vl_exp. Iterate through the operands, recursively
561 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
562 CALL_EXPR accessor macros.
563 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
564 tree code classes. Use TREE_OPERAND_LENGTH instead of
567 * semantics.c (finish_call_expr): Use build_nt_call_list
569 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
570 accessor macros. Use build_call_array to construct the
571 CALL_EXPR node instead of build3
573 * decl2.c (build_offset_ref_call_from_tree): Use
574 build_nt_call_list and build_min_non_dep_call_list instead
575 of build_min_nt and build_min_non_dep.
577 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
578 Use build_nt_call_list instead of build_min_nt.
580 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
583 * call.c (build_conditional_expr): Improve error message.
585 2007-02-13 Dirk Mueller <dmueller@suse.de>
587 * friend.c (do_friend): Annotate warning about friend
588 declarations in templates with OPT_Wnon_template_friend.
589 Convert informal message from warning() to inform().
591 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
592 Mark Mitchell <mark@codesourcery.com>
595 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
596 instantiations for variables.
598 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
601 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
602 Check warn_unused_value just once.
604 2007-02-11 Mark Mitchell <mark@codesourcery.com>
607 * pt.c (determine_specialization): Use skip_artificial_parms_for.
608 (fn_type_unificiation): Likewise.
609 (get_bindings): Likewise.
611 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
614 * decl.c (finish_function): Use DECL_REPLACEABLE.
615 * tree.c (cp_cannot_inline_tree_fn): Likewise.
617 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
619 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
621 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
623 * decl.c (grokvardecl): Don't error if !have_tls.
624 (grokdeclarator): Likewise.
625 * parser.c (cp_parser_omp_threadprivate): Likewise.
627 2007-02-07 Jakub Jelinek <jakub@redhat.com>
630 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
631 parameters and result decls in omp clauses.
632 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
635 2007-02-05 Dirk Mueller <dmueller@suse.de>
638 * parser.c (cp_parser_class_specifier): Always initialize bases.
640 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
642 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
643 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
644 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
646 * semantics.c (finish_omp_atomic): Store a whole expression node
647 in operand 1, and integer_zero_node in operand 0, for dependent
648 OMP_ATOMIC. Rewrite to make flow easier to understand.
650 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
652 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
654 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
656 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
657 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
659 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
661 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
662 keyword warning to -Wc++0x-compat.
664 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
666 * decl.c (grokdeclarator): Update documentation.
668 2007-02-02 Jakub Jelinek <jakub@redhat.com>
671 * decl.c (grokdeclarator): If __thread is used together with
672 a storage class other than extern and static, clear thread_p
673 after issuing diagnostics and fall through to checking the
676 2007-01-30 Roger Sayle <roger@eyesopen.com>
678 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
679 calculating the size of an array (to avoid recursive errors).
681 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
684 * typeck.c (build_binary_op): Fix logic for warning. Move warning
686 * call.c (convert_like_real): Don't warn when converting to
689 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
691 * decl.c (pop_label): Replace warning with call to
692 warn_for_unused_label.
694 2007-01-28 Andrew Pinski <pinskia@gmail.com>
697 * semantics.c (finish_pseudo_destructor_expr): Check the
698 destrutor name by calling check_dtor_name.
700 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
702 * lex.c (D_CPP0X): Rename.
704 (reswords): D_CPP0X -> D_CXX0X.
705 (init_reswords): Ditto.
706 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
707 of C++0x keywords as identifiers.
709 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
712 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
715 2007-01-23 Ian Lance Taylor <iant@google.com>
717 * typeck.c (convert_for_assignment): Only warn about a = b = c
718 when converting to bool.
720 2007-01-23 Roger Sayle <roger@eyesopen.com>
722 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
724 * typeck.c (ignore_overflows): Remove the remaining uses of
725 TREE_CONSTANT_OVERFLOW.
727 2007-01-20 Jan Hubicka <jh@suse.cz>
729 * decl2.c (start_objects, start_static_storage_duration_function):
730 Do not make the functions uninlinable.
732 2007-01-17 Ian Lance Taylor <iant@google.com>
734 * class.c (add_method): Call VEC_reserve_exact rather than passing
735 a negative size to VEC_reserve.
737 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
740 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
742 2007-01-10 Mark Mitchell <mark@codesourcery.com>
745 * decl.c (make_typename_type): If the qualified name is not a
746 type, issue an error.
747 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
750 2007-01-08 Geoffrey Keating <geoffk@apple.com>
752 * rtti.c: Include target.h.
753 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
754 don't emit typeinfo for fundamental types as weak.
755 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
757 2007-01-08 Richard Guenther <rguenther@suse.de>
759 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
761 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
763 * call.c (standard_conversion): Pass flag to
764 vector_types_convertible_p to disallow emission of note.
765 * typeck.c (convert_for_assignment): Pass flag to
766 vector_types_convertible_p to allow emission of note.
767 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
768 to disallow emission of note.
770 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
773 * typeck.c (build_binary_op): Call overflow_warning if
774 TREE_OVERFLOW_P is true for the result and not for any of the
777 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
780 * class.c (add_method): Don't wait until template
781 instantiation time to complain about duplicate methods.
783 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
786 * semantics.c (finish_unary_op_expr): Warn only if result
787 overflowed and operands did not.
789 2007-01-05 Ian Lance Taylor <iant@google.com>
791 * typeck.c (build_binary_op): Warn about comparing a non-weak
794 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
796 * pt.c (tsubst): Propagate the need for structural equality checks
797 when reducing the level of template parameters.
799 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
801 * pt.c: Fix a comment typo.
803 2006-01-02 Ian Lance Taylor <iant@google.com>
805 * semantics.c (maybe_convert_cond): Optionally warn when using an
806 assignment as a condition.
807 * typeck.c (convert_for_assignment): Optionally warn about
808 assigning the result of an assignment to a bool.
810 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
812 * pt.c (canonical_template_parms): Correct typo in comment.
814 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
816 * typeck.c (structural_comptypes): Renamed from "comptypes".
817 (comptypes): Use canonical type information to perform fast type
818 comparison. When VERIFY_CANONICAL_TYPES, verify that the
819 canonical type comparison returns the same results as we would see
820 from the current, structural check. Support COMPARE_STRUCTURAL
821 when we need structural checks.
822 * decl.c (typename_compare): Fix comment.
823 (build_typename_type): TYPENAME_TYPE nodes require structural
824 equality checks, because they resolve different based on the
826 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
827 require structural equality checks (for now).
828 (build_ptrmemfunc_type): Build the canonical pointer to member
830 (compute_array_index_type): Whenever we build a new index type
831 to represent the size of an array in a template, we need to mark
832 this index type as requiring structural equality. This goes for
833 arrays with value-dependent sizes with the current ABI, or all
835 * tree.c (cplus_array_hash): New.
836 (struct cplus_array_info): New.
837 (cplus_array_compare): New.
838 (cplus_array_htab): New.
839 (build_cplus_array_type_1): Use a hash table to cache the array
840 types we build. Build the canonical array type for each array
842 (cp_build_qualified_type_real): When building a cv-qualified array
843 type, use the hash table of array types and build canonical array
845 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
846 use structural equality (for now).
847 * cp-tree.h (COMPARE_STRUCTURAL): New.
848 * pt.c (canonical_template_parms): New.
849 (canonical_type_parameter): New.
850 (process_template_parm): Find the canonical type parameter.
851 (lookup_template_class): When we have named the primary template
852 type, set the canonical type for our template class to the primary
853 template type. If any of the template arguments need structural
854 equality checks, the template class needs structural equality
856 (tsubst): When reducing the level of a template template
857 parameter, we require structural equality tests for the resulting
858 parameter because its template parameters have not had their types
859 canonicalized. When reducing a template type parameter, find the
860 canonical reduced type parameter.
861 (any_template_arguments_need_structural_equality_p): New.
863 2006-12-31 Simon Martin <simartin@users.sourceforge.net>
866 * parser.c (cp_parser_primary_expression): Return error_mark_node when
867 a statement-expression is found outside of a function body.
869 2006-12-28 Kazu Hirata <kazu@codesourcery.com>
871 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P, TYPE_FUNCTION_SCOPE_P):
874 * decl2.c: Fix a comment typo.
876 2006-12-21 Andrew Pinski <pinskia@gmail.com>
879 * decl.c (cxx_builtin_function): Only copy the decl if adding
880 it to the std namespace.
882 2006-12-21 Andrew Pinski <pinskia@gmail.com>
885 * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
887 2006-12-22 Kazu Hirata <kazu@codesourcery.com>
889 * decl.c: Fix a coment typo.
891 2006-12-18 Ian Lance Taylor <iant@google.com>
893 * decl.c (start_preparsed_function): Add support for
894 -Wmissing-declarations.
896 2006-12-16 Simon Martin <simartin@users.sourceforge.net>
899 * cp-tree.h (struct deferred_access_check): New structure to represent a
900 deferred access check. It replaces the previous representation as a tree.
901 (get_deferred_access_checks): Return a vector of struct
902 deferred_access_check instead of a tree list.
903 (perform_access_checks): Take a vector of struct deferred_access_check
904 instead of a tree list.
905 * semantics.c (struct deferred_access): Store the deferred access checks
906 as a vector of struct deferred_access_check instead of a tree list.
907 (push_deferring_access_checks): Handle the change in struct
909 (get_deferred_access_checks): Likewise.
910 (pop_to_parent_deferring_access_checks): Likewise.
911 (perform_or_defer_access_check): Likewise.
912 (perform_access_checks): Take a vector of struct deferred_access_check
913 instead of a tree list.
914 * parser.c (struct tree_check): New structure to store various data
915 associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
916 (struct cp_token): Changed the value field to be a union with a pointer to
917 a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
918 tokens and a tree field for all other tokens.
919 (eof_token): Adjusted due to the change in struct cp_token.
920 (cp_lexer_get_preprocessor_token): Likewise.
921 (cp_lexer_purge_token): Likewise.
922 (cp_lexer_purge_tokens_after): Likewise.
923 (cp_lexer_print_token): Likewise.
924 (cp_parser_error): Likewise.
925 (cp_parser_identifier): Likewise.
926 (cp_parser_string_literal): Likewise.
927 (cp_parser_primary_expression): Likewise.
928 (cp_parser_unqualified_id): Likewise.
929 (cp_parser_parenthesized_expression_list): Likewise.
930 (cp_parser_storage_class_specifier_opt): Likewise.
931 (cp_parser_function_specifier_opt): Likewise.
932 (cp_parser_type_specifier): Likewise.
933 (cp_parser_simple_type_specifier): Likewise.
934 (cp_parser_initializer_list): Likewise.
935 (cp_parser_member_specification_opt): Likewise.
936 (cp_parser_attribute_list): Likewise.
937 (cp_parser_objc_expression): Likewise.
938 (cp_parser_objc_protocol_qualifiers): Likewise.
939 (cp_parser_objc_selector): Likewise.
940 (cp_parser_objc_declaration): Likewise.
941 (cp_parser_objc_statement): Likewise.
942 (cp_parser_omp_clause_name): Likewise.
943 (cp_parser_omp_clause_default): Likewise.
944 (cp_parser_omp_clause_schedule): Likewise.
945 (cp_parser_omp_parallel): Likewise.
946 (cp_parser_initial_pragma): Likewise.
947 (pragma_lex): Likewise.
948 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
949 (cp_parser_nested_name_specifier_opt): Likewise.
950 Use cp_token::u::tree_check_value to save the token's value, the
951 associated deferred checks and its qualifying scope.
952 (cp_parser_template_id): Likewise.
953 (cp_parser_template_declaration_after_export): Adjusted the call to
954 get_deferred_access_checks.
955 (cp_parser_init_declarator): Take the access checks as a vector of struct
956 deferred_access_check instead of a tree list.
957 (cp_parser_single_declaration): Likewise.
958 (cp_parser_perform_template_parameter_access_checks): Likewise.
959 (cp_parser_simple_declaration): Adjusted the call to
960 cp_parser_init_declarator.
961 (cp_parser_explicit_specialization): Adjusted the call to
962 cp_parser_single_declaration.
964 2006-12-13 Ian Lance Taylor <iant@google.com>
968 * parser.c (cp_parser_expression_stack_entry): Add field
970 (cp_parser_binary_expression): Track tree code of left hand side
971 of expression. Use it when calling build_x_binary_op.
972 (cp_parser_selection_statement): Add if_p parameter. Change all
973 callers. Warn about ambiguous else.
974 (cp_parser_statement): Add if_p parameter. Change all callers.
975 (cp_parser_implicitly_scoped_statement): Likewise.
976 * typeck.c (build_x_binary_op): Add parameters arg1_code and
977 arg2_code. Change all callers. Call warn_about_parentheses.
978 * cp-tree.h (build_x_binary_op): Update declaration.
980 2006-12-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
982 * decl.c (build_enumerator): Update error message to match C
985 2006-12-11 Jan Hubicka <jh@suse.cz>
987 * decl2.c (var_finalized_p): Update for renamed varpool functions.
989 2006-12-09 Zack Weinberg <zackw@panix.com>
991 * parser.c (yydebug, enum pragma_omp_clause): Delete.
993 2006-12-07 Mark Mitchell <mark@codesourcery.com>
996 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
997 (explicit_class_specialization_p): Declare.
998 * pt.c (explicit_class_specialization_p): New function.
999 * parser.c (cp_parser_init_declarator): Check correct number of
1000 template parameters for in-class function definitions.
1001 (cp_parser_check_declrator_template_parameters): Stop looking for
1002 template classes when we find an explicit specialization.
1004 2006-12-07 Lee Millward <lee.millward@codesourcery.com>
1007 * cp_parser_elaborated_type_specifier: Check
1008 the return value of check_elaborated_type_specifier.
1010 2006-12-06 Mark Mitchell <mark@codesourcery.com>
1013 * parser.c (cp_parser_init_declarator): Reject initialization of
1016 2006-12-05 Mark Mitchell <mark@codesourcery.com>
1019 * decl2.c (check_member_template): Move check for member
1020 templates in local classes to ...
1021 * parser.c (cp_parser_template_declaration_after_export):
1025 * decl.c (check_array_designated_initializer): New function.
1026 (maybe_deduce_size_from_array_init): Use it.
1027 (reshape_init_array): Likewise.
1029 2006-12-05 Aldy Hernandez <aldyh@redhat.com>
1031 Merge from gimple-tuples-branch.
1033 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
1035 * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
1036 (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
1037 (cxx_omp_clause_copy_ctor): Same.
1038 (cxx_omp_clause_assign_op): Same.
1040 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
1042 * cp-tree.h (union lang_tree_node): Gimple statements do not
1044 (TREE_INDIRECT_USING): Look in base.
1046 2006-12-04 Jan Hubicka <jh@suse.cz>
1048 * cp-objcp-common.c (cp_expr_size): Return NULL in the case
1051 2006-12-04 Mark Mitchell <mark@codesourcery.com>
1054 * pt.c (tsubst_decl): Disallow variables of function type.
1057 * call.c (add_builtin_candidate): Do not permit NULL pointer
1058 constants to be compared with template parameters.
1060 2006-12-04 Eric Botcazou <ebotcazou@adacore.com>
1062 * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
1063 Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1065 2006-12-03 Richard Henderson <rth@redhat.com>
1066 Andrew Pinski <pinskia@gmail.com>
1069 * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
1071 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
1074 * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
1076 2006-12-02 Kazu Hirata <kazu@codesourcery.com>
1078 * name-lookup.c: Follow spelling conventions.
1080 2006-12-01 Geoffrey Keating <geoffk@apple.com>
1082 * decl.c (poplevel): Check DECL_INITIAL invariant.
1083 (duplicate_decls): Preserve DECL_INITIAL when eliminating
1084 a new definition in favour of an old declaration.
1085 (start_preparsed_function): Define and document value of
1086 DECL_INITIAL before and after routine.
1087 (finish_function): Check DECL_INITIAL invariant.
1089 (cp_parser_function_definition_from_specifiers_and_declarator):
1090 Skip duplicate function definitions.
1092 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1095 * typeck.c (type_after_usual_arithmetic_conversions):
1096 Fix assertion for vector types.
1097 (build_binary_op): Use temporary for inner type of vector types.
1099 2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
1102 * typeck.c (build_binary_op): Fix pointer to member function
1103 comparison for ptrmemfunc_vbit_in_delta targets.
1105 2006-12-01 Dirk Mueller <dmueller@suse.de>
1108 * decl.c (grokdeclarator): Warn for type qualifiers on return
1109 type for non-dependent types.
1110 * pt.c (tsubst_function_type): Warn for type qualifiers on
1111 return type for dependent types.
1113 2006-11-30 Geoffrey Keating <geoffk@apple.com>
1115 * rtti.c (get_tinfo_decl): Handle return value from
1116 pushdecl_top_level_and_finish.
1118 2006-11-29 Lee Millward <lee.millward@codesourcery.com>
1121 * parser.c (cp_parser_class_head): Move processing
1122 of any base classes to...
1123 (cp_parser_class_specifier) ...here. Take an extra
1124 tree* parameter for any base classes. Only process
1125 them if the opening brace was found.
1127 2006-11-28 Jakub Jelinek <jakub@redhat.com>
1130 * decl.c (grokfndecl): Check main's type after applying
1131 attributes, not before.
1133 2006-11-27 Mark Mitchell <mark@codesourcery.com>
1135 * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
1136 entries for a primary construction virtual table.
1138 2006-11-26 Mark Mitchell <mark@codesourcery.com>
1141 * parser.c (cp_parser): Add in_function_body.
1142 (cp_parser_new): Initialize it.
1143 (cp_parser_primary_expression): Use parser->in_function_body
1144 instead of at_function_scope_p.
1145 (cp_parser_asm_definition): Likewise.
1146 (cp_parser_direct_declarator): Likewise.
1147 (cp_parser_class_specifier): Clear parser->in_function_body.
1148 (cp_parser_constructor_declarator_p): Use parser->in_function_body
1149 instead of at_function_scope_p.
1150 (cp_parser_function_body_after_declarator): Set
1151 parser->in_function_body.
1153 2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
1155 * cp-tree.def (STATIC_ASSERT): New.
1156 * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
1157 * error.c (dump_decl): Handle STATIC_ASSERT.
1158 * cp-tree.h (STATIC_ASSERT_CONDITION): New.
1159 (STATIC_ASSERT_MESSAGE): New.
1160 (STATIC_ASSERT_SOURCE_LOCATION): New.
1161 (struct tree_static_assert): New.
1162 (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
1163 (union lang_tree_node): Add static_assertion.
1164 (finish_static_assert): Declare.
1165 * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
1166 (pp_cxx_declaration): Handle STATIC_ASSERT.
1167 * pt.c (instantiate_class_template): Handle
1168 STATIC_ASSERT members.
1169 (tsubst_expr): Handle STATIC_ASSERT statements.
1170 * semantics.c (finish_static_assert): New.
1171 * lex.c (D_CPP0X): New.
1172 (reswords): Add static_assert keyword.
1173 (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
1174 * parser.c (cp_parser_block_declaration): Parse static
1176 (cp_parser_static_assert): New.
1177 (cp_parser_member_declaration): Parse static assertions.
1179 2006-11-21 Jakub Jelinek <jakub@redhat.com>
1182 * decl.c (cp_finish_decl): Check for value dependent brace enclosed
1186 * cp-tree.h (WANT_VECTOR): Define.
1187 (WANT_ARITH): Add WANT_VECTOR.
1188 * cvt.c (build_expr_type_conversion): Handle vector types.
1189 * typeck.c (build_unary_op): Add WANT_VECTOR to
1190 build_expr_type_conversion flags.
1192 2006-11-20 Simon Martin <simartin@users.sourceforge.net>
1195 * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
1196 extra argument that represents the declaration to use to print
1197 potential error messages.
1198 * init.c (build_offset_ref): Adjusted the call to
1199 perform_or_defer_access_check.
1200 * class.c (alter_access, resolve_address_of_overloaded_function):
1202 * decl.c (make_typename_type, make_unbound_class_template): Likewise.
1203 * search.c (lookup_member): Likewise.
1204 * friend.c (add_friend): Likewise.
1205 * parser.c (cp_parser_template_id,
1206 cp_parser_pre_parsed_nested_name_specifier): Likewise.
1207 * semantics.c (finish_non_static_data_member,
1208 check_accessibility_of_qualified_id, finish_id_expression): Likewise.
1209 (pop_to_parent_deferring_access_checks, perform_access_checks,
1210 perform_or_defer_access_check): Adjusted the call to enforce_access.
1211 * call.c (enforce_access): Use the new extra argument to build the
1213 (build_op_delete_call): Adjusted the call to
1214 perform_or_defer_access_check.
1215 (build_over_call): Likewise.
1217 2006-11-16 Dirk Mueller <dmueller@suse.de>
1219 * name-lookup.c (begin_scope): Use GGC_CNEW instead of
1222 2006-11-13 Roger Sayle <roger@eyesopen.com>
1224 * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
1225 base type info initializer has the correct type.
1227 2006-11-13 Mark Mitchell <mark@codesourcery.com>
1230 * pt.c (coerce_template_parms): Do not skip_evaluation while
1231 substituting template arguments.
1233 2006-11-11 Richard Guenther <rguenther@suse.de>
1235 * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
1236 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1238 2006-11-03 Roger Sayle <roger@eyesopen.com>
1240 * call.c (build_op_delete_call): Test user-visible type against
1241 size_type_node, instead of against the internal type, sizetype.
1242 * class.c (type_requires_array_cookie): Likewise.
1243 * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
1244 handling of TYPE_IS_SIZETYPE.
1245 * typeck.c (type_after_usual_arithmetic_conversions): Remove
1246 special case handling of TYPE_IS_SIZETYPE.
1247 (comptypes): Likewise.
1249 2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
1251 * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
1252 if targetm.cxx.use_atexit_for cxa_atexit.
1253 (start_cleanup_fn): Likewise.
1254 (register_dtor_fn): Likewise.
1256 2006-09-25 Geoffrey Keating <geoffk@apple.com>
1258 * decl2.c (cp_write_global_declarations): Rename from
1260 * cp-lang.c (finish_file): Don't call cp_finish_file.
1261 * cp-tree.h (cp_write_global_declarations): Rename from
1263 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
1264 cp_write_global_declarations.
1266 2006-10-31 Geoffrey Keating <geoffk@apple.com>
1268 * name-lookup.c (get_anonymous_namespace_name): New.
1269 (push_namespace_with_attribs): Use get_anonymous_namespace_name.
1270 * decl2.c (start_objects): Update for rename of
1271 get_file_function_name_long.
1273 2006-10-30 Dirk Mueller <dmueller@suse.de>
1276 * decl.c (grokdeclarator): Duplicate diagnostic message
1277 for easier translation.
1278 * decl.c (grokdeclarator): Fix line-wrapping.
1280 2006-10-30 Dirk Mueller <dmueller@suse.de>
1283 * decl.c (grokfndecl): Use check_main_parameter_types.
1285 2006-10-30 Dirk Mueller <dmueller@suse.de>
1288 * decl.c (grokfndecl): Duplicate warning message for
1291 2006-10-30 Dirk Mueller <dmueller@suse.de>
1293 * typeck.c (build_unary_op): Fix indenting. Use G_().
1295 2006-10-29 Dirk Mueller <dmueller@suse.de>
1298 * typeck.c (build_unary_op): Duplicate warning message
1299 for easier translation.
1301 2006-10-29 Dirk Mueller <dmueller@suse.de>
1304 * typeck.c (build_array_ref): Warn for char subscriptions
1307 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
1309 * decl.c: Fix a comment typo.
1311 2006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1314 * typeck.c (build_unary_op): Use same_type_p when comparing to
1317 2006-10-29 Dirk Mueller <dmueller@suse.de>
1320 * typeck.c (build_binary_op): Duplicate warning message
1321 for better translation.
1323 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
1325 * decl.c (builtin_function_1): Move common code to
1326 add_builtin_function.
1327 (builtin_function): Rename to cxx_builtin_function.
1328 Change the signature.
1329 * call.c: Include langhooks.h.
1330 (build_java_interface_fn_ref): Replace calls to
1331 builtin_function with add_builtin_function.
1332 * Make-lang.in (cp/call.o): Depend on langhooks.h.
1333 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
1334 cxx_builtin_function.
1335 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
1336 Change the signature.
1338 2006-10-22 Nathan Sidwell <nathan@codesourcery.com>
1341 * rtti.c (tinfo_base_init): The type info string is always global.
1343 2006-10-20 Lee Millward <lee.millward@codesourcery.com>
1344 Mark Mitchell <mark@codesourcery.com>
1347 * decl2.c (grokbitfield): Detect invalid non-integral
1348 types earlier when possible.
1350 2006-10-18 Mark Shinwell <shinwell@codesourcery.com>
1353 * typeck2.c (digest_init): Raise error upon attempts to
1354 initialize arrays with variables.
1356 2006-10-17 Lee Millward <lee.millward@codesourcery.com>
1359 * cp-tree.h (xref_basetypes): Return bool instead of void.
1360 * decl.c (xref_basetypes): Adjust definition. Return false
1361 if the class bases are invalid.
1362 * parser.c (cp_parser_class_head): Check the return value
1363 from xref_basetypes.
1365 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1368 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
1372 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
1374 (cp_parser_constructor_declarator_p): Use it.
1375 (cp_parser_check_type_definition): Return a value indicating
1376 whether or not the definition is valid.
1377 (cp_parser_enum_specifier): Skip invalid enum definitions.
1379 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1382 * typeck2.c (build_functional_cast): Don't zero-initialize
1383 non-PODs; instead, call their constructors.
1384 * method.c (synthesize_method): Always build mem-initializers, if
1385 we're synthesizing the default constructor.
1387 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1390 * decl.c (reshape_init_class): Move check for designated
1392 * parser.c (cp_parser_initializer_list): ... here.
1393 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
1395 2006-10-16 Mark Mitchell <mark@codesourcery.com>
1398 * typeck2.c (process_init_constructor_array): Reword comment.
1399 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
1403 * parser.c (cp_parser_using_declaration): Stop parsing when
1404 something goes wrong with an access declaration.
1407 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
1408 types when their sizes are required. Refine test for VLAs.
1411 * parser.c (cp_parser_template_argument): Don't consider "&var" a
1412 possible constant-expression.
1413 * pt.c (convert_nontype_argument): Refine handling of arguments of
1416 2006-10-13 Mark Mitchell <mark@codesourcery.com>
1419 * parser.c (function_declarator_p): New function.
1420 (cp_parser_init_declarator): Use it.
1421 (cp_parser_member_declaration): Likewise.
1423 2006-10-12 Mark Mitchell <mark@codesourcery.com>
1426 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
1427 variably modified types.
1429 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
1432 * decl.c (start_decl): Return error_mark_node if a
1433 function is initialized like a variable.
1434 (check_var_type): If a variable of field is declared void,
1435 set the type to error_mark_node.
1436 (grokdeclarator): Check the return type of check_var_type.
1437 * class.c (finish_struct_1): Robustify.
1439 2006-10-11 Mark Mitchell <mark@codesourcery.com>
1442 * decl.c (check_initializer): Issue errors about trying to
1443 initialize arrays whose elements have variable size.
1445 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
1448 * cp-tree (struct cp_decl_specifier_seq): Rename to
1449 conflicting_specifiers_p
1450 * parser.c (cp_parser_set_storage_class): Set
1451 conflicting_specifiers_p for the input decl specifier
1452 if a typedef specifier is present. Rename uses of
1453 multiple_specifiers_p to conflicting_specifiers_p.
1454 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
1455 class specifier has already been set for this declaration,
1456 set conflicting_specifiers_p to true on the decl_specs.
1457 * decl.c (grokdeclarator): Rename uses of
1458 multiple_specifiers_p to conflicting_specifiers_p.
1460 2006-10-10 Brooks Moses <bmoses@stanford.edu>
1462 * Make-lang.in: Added "c++.pdf" target support.
1464 2006-10-10 Richard Guenther <rguenther@suse.de>
1466 PR rtl-optimization/29323
1467 * decl.c (finish_function): Set TREE_NOTHROW only for
1468 functions that bind local.
1470 2006-10-09 Richard Henderson <rth@redhat.com>
1472 Revert emutls patch.
1474 2006-10-04 Richard Henderson <rth@redhat.com>
1475 Jakub Jelinek <jakub@redhat.com>
1477 * decl.c (grokvardecl): Don't error if !have_tls.
1478 (grokdeclarator): Likewise.
1479 * parser.c (cp_parser_omp_threadprivate): Likewise.
1481 2006-10-03 Mark Mitchell <mark@codesourcery.com>
1484 * friend.c (do_friend): Improve comments; add assertion.
1485 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
1486 typenames for qualified names used in declarations, even when
1487 caching qualified name lookup.
1490 * decl2.c (grokfield): Don't handle access declarations here.
1491 * parser.c (cp_parser_using_declaration): Handle access
1493 (cp_parser_block_declaration): Adjust calls to
1494 cp_parser_using_declaration.
1495 (cp_parser_member_declaration): Likewise. Use
1496 cp_parser_using_declaration to look for access_declarations.
1498 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1501 * init.c (build_new): Check for invalid init.
1503 2006-10-02 Mark Mitchell <mark@codesourcery.com>
1506 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
1507 not try to actually evaluate sizeof for a VLA type.
1509 2006-10-01 Mark Mitchell <mark@codesourcery.com>
1512 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
1513 * semantics.c (baselink_for_fns): Build a baselink, even when
1514 processing a template.
1517 * parser.c (cp_parser_postfix_dot_deref_expression): Use
1518 BASELINK_ACCESS_BINFO as the qualifying scope when calling
1519 adjust_result_of_qualified_name_lookup.
1521 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
1525 * cp-tree.h (redeclare_class_template): Adjust declaration
1526 to return bool instead of void.
1527 * pt.c (redeclare_class_template): Update definition.
1528 Return false on error.
1529 * decl.c (xref_tag): Return error_mark_node if
1530 redeclare_class_template returned false.
1533 * cp-tree.h (begin_specialization): Return bool
1535 * pt.c (check_specialization_scope): Likwise.
1536 Adjust comment. Return false if a specialization
1537 isn't permitted in the current scope.
1538 (begin_specialization): Use the return value of
1539 check_specialization_scope.
1540 * parser.c (cp_parser_explicit_specialization): If
1541 begin_specialization returned false, skip the rest
1542 of the specialization.
1544 2006-09-21 Mark Mitchell <mark@codesourcery.com>
1547 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
1550 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
1553 * decl.c (shadow_tag): Return error_mark_node
1554 if maybe_process_partial_specialization failed.
1557 * decl.c (grokdeclarator): Return error_mark_node on
1558 declaration with two or more data types.
1560 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
1563 * class.c (check_for_override): Remove dllimport from virtual
1566 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
1569 * parser.c (cp_parser_labeled_statement): Return nothing. Do
1570 not take in_statement_expr and in_compound as arguments. Rename
1571 to cp_parser_label_for_labeled_statement. Parse only the label,
1573 (cp_parser_statement): Parse the statement of a labeled-statement
1574 from here, using tail recursion.
1576 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
1579 * init.c (build_zero_init): If we have an error mark node for
1580 the array size, return.
1582 2006-09-10 Mark Mitchell <mark@codesourcery.com>
1585 * cp-objcp-common.c (cxx_staticp): New function.
1586 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
1587 * cp-tree.h (cxx_staticp): New function.
1589 2006-09-09 Jason Merrill <jason@redhat.com>
1592 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
1594 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1597 * parser.c (cp_parser_skip_until_found): Rename to
1598 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
1599 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
1600 Reorganize. Adjust comment.
1601 (cp_parser_template_declaration_after_export): Adjust call.
1602 (cp_parser_enclosed_template_argument_list): Likewise.
1604 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
1607 * init.c (build_new_1): Build a distinct type copy
1608 for the array type that was returned from
1609 build_cplus_array_type.
1611 2006-09-07 Jason Merrill <jason@redhat.com>
1614 * cvt.c (convert_to_void): Enable previous change.
1617 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
1620 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
1623 * pt.c (fold_non_dependent_expr): Make sure expr is not
1624 dereferenced if it is NULL.
1626 2006-09-06 Zak Kipling <zak@transversal.com>
1629 * decl.c (make_rtl_for_nonlocal_decl),
1630 (start_preparsed_function): Don't use lbasename on
1631 input_filename when calling get_fileinfo.
1632 * semantics.c (begin_class_definition): Likewise.
1633 * lex.c (cxx_make_type): Likewise.
1634 (handle_pragma_interface): Call get_fileinfo on input_filename,
1635 not on the parameter to the directive.
1637 2006-09-06 Mark Mitchell <mark@codesourcery.com>
1640 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
1644 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
1647 2006-09-06 Jason Merrill <jason@redhat.com>
1650 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
1651 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
1652 * tree.c (build_cplus_new): Set it.
1655 * cvt.c (convert_to_void): Replace a subexpression with no side
1656 effects with void_zero_node.
1657 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
1658 (get_first_fn): Ditto.
1659 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
1661 2006-09-05 Jason Merrill <jason@redhat.com>
1664 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
1665 where the name is a type used incorrectly.
1668 * typeck.c (maybe_warn_about_returning_address_of_local): Look
1669 through COMPONENT_REF and ARRAY_REF.
1672 * name-lookup.c (do_class_using_decl): Try to find the base even
1673 if bases_dependent_p.
1674 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
1677 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
1679 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
1681 PR 23287 Revert my 2006-09-01 patch.
1682 * parser.c: Reverted.
1685 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
1691 * parser.c (cp_parser_template_parameter_list): Add
1692 invalid template parameters to the parameter list as
1695 2006-09-02 Jakub Jelinek <jakub@redhat.com>
1698 * except.c (build_throw): Only set current_function_returns_abnormally
1699 if cfun is not NULL.
1702 * repo.c (repo_file): Remove.
1703 (open_repo_file, reopen_repo_file_for_write): Return fopened
1704 FILE * instead of setting global repo_file variable.
1705 (init_repo): Adjust caller.
1706 (finish_repo): Likewise. Return instead of goto out before
1707 reopen_repo_file_for_write has been called.
1709 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
1712 * semantics.c (finish_call_expr): Add assert.
1713 * name-lookup.c (lookup_arg_dependent): Check we found an overload
1717 * parser.c (cp_parser_id_expression): Add member_p
1718 argument. Update all callers.
1719 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
1720 the object's scope, if valid.
1721 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
1723 (cp_parser_postfix_dot_deref_expression): Set object_scope.
1724 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
1726 2006-08-30 Jason Merrill <jason@redhat.com>
1729 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
1730 the fields have been processed.
1732 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
1735 * call.c (build_x_va_arg): Remove the reference type
1736 from the type before creating the pointer type.
1738 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
1741 * except.c (expand_start_catch_block): Use correct types for bitwise
1744 2006-08-28 Jason Merrill <jason@redhat.com>
1747 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
1748 fields can't be packed.
1751 * cvt.c (convert_to_void): Don't automatically load from volatiles
1752 of TREE_ADDRESSABLE type.
1754 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1757 * cp-tree.h (maybe_process_partial_specialization): Return
1758 tree instead of void.
1759 * parser.c (cp_parser_class_head): Use return value of
1760 maybe_process_partial_specialization.
1761 * pt.c (maybe_process_partial_specialization): Return error_mark_node
1762 for broken specializations, TYPE otherwise. Check for template
1763 template parameters.
1765 2006-08-27 Mark Mitchell <mark@codesourcery.com>
1768 * pt.c (register_specialization): Return error_mark_node for
1769 specialization-after-instantiation.
1770 * decl2.c (mark_used): Mark the main function used when one of its
1773 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
1776 * class.c (check_field_decls): Don't issue error about
1777 local classes containing static data members.
1779 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
1782 * parser.c (struct cp_token): Add input_file_stack_index.
1783 (eof_token): Update.
1784 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
1785 (cp_lexer_set_source_position_from_token): Restore input file
1788 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
1793 * pt.c (process_template_parm): Store invalid template
1794 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
1795 (push_inline_template_parms_recursive): Check for template
1796 parameters having a TREE_VALUE of error_mark_node rather than
1797 check the parameter itself.
1798 (mangle_class_name_for_template): Likewise.
1799 (comp_template_parms): When comparing the individual template
1800 parameters, return 1 if either is error_mark_node.
1801 (current_template_args): Robustify.
1802 (redeclare_class_template): Likewise.
1804 2006-08-26 Mark Mitchell <mark@codesourcery.com>
1807 * class.c (resolve_address_of_overloaded_function): Add
1808 access_path parameter. Perform access checks.
1809 (instantiate_type): Adjust call to
1810 resolve_address_of_overloaded_function. Remove unnecessary code.
1811 * tree.c (is_overloaded_fn): Document. Return 2 when there are
1812 acutally multiple functions.
1813 (really_overloaded_fn): Use is_overloaded_fn.
1814 * mangle.c (write_expression): Handle BASELINKs.
1815 * cp-tree.h (really_overloaded_fn): Return bool.
1816 (baselink_for_fns): Declare.
1817 * search.c (lookup_member): Check access for single static
1819 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
1820 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
1821 * semantics.c (finish_call_expr): Use baselink_for_fns.
1822 (baselink_for_fns): New function.
1823 (finish_id_expression): Use it.
1824 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
1827 * pt.c (tsubst): Issue errors about attempts to create VLAs at
1828 template-instantiation time.
1830 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1833 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
1834 template parameters. Improve error message for template type
1838 * cp-tree.h (grok_op_properties): Return bool instead of void.
1839 * decl.c (grokfndecl): Discard invalid operator declarations.
1840 (copy_fn_p): Revert change for PR 27547.
1841 (grok_op_properties): Return error status (true on success).
1842 * pt.c (tsubst_decl): Discard invalid operator declarations.
1844 2006-08-25 Mark Mitchell <mark@codesourcery.com>
1847 * decl.c (grokdeclarator): Disallow declarations with qualified
1848 names in local scopes.
1850 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
1853 * decl.c (make_typename_type): Only try and resolve it when
1854 context is not dependent. Refactor.
1855 * decl2.c (check_classfn): Push to class scope before looking for
1858 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
1861 * g++spec.c (lang_specific_driver): Always check if we need to
1862 swallow a space-separated arg to '-x'.
1863 * lang-specs.h: Don't create ouput files for '-xc++-header'
1866 2006-08-23 Jason Merrill <jason@redhat.com>
1869 * pt.c (push_template_decl_real): A friend template with class
1870 scope isn't primary.
1872 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
1875 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
1876 Move -fno-rtti check to be more specific.
1878 2006-08-22 Jason Merrill <jason@redhat.com>
1881 * call.c (build_over_call): Don't make a copy here if build_call
1884 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
1887 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
1890 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
1893 * parser.c (cp_parser_postfix_expression): Make sure that the
1894 saved value for parser->type_definition_forbidden_message is
1895 restored before returning to avoid an invalid free().
1897 2006-08-22 Jason Merrill <jason@redhat.com>
1900 * typeck.c (merge_types): If either of the types have the right
1901 attributes, return that one.
1903 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
1904 doing this to class types.
1905 * typeck.c (original_type): Deal with type quals properly.
1907 2006-08-21 Jason Merrill <jason@redhat.com>
1910 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
1911 just leave the expression as it is.
1912 (finish_stmt_expr): If the statement-expression has class type,
1913 wrap it in a TARGET_EXPR.
1914 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
1916 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
1918 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
1921 * decl.c (duplicate_decls): Return early if either
1922 newdecl or olddecl is error_mark_node.
1925 * decl.c (grokdeclarator): Return early after
1926 issuing diagnostic about an incomplete type.
1929 * tree.c (decl_anon_ns_mem_p): Robustify.
1930 * decl2.c (determine_visibility): Likewise.
1932 2006-08-20 Mark Mitchell <mark@codesourcery.com>
1935 * tree.c (cast_valid_in_integral_constant_expression_p): New
1937 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
1938 * pt.c (tsubst_expr): Add integral_constant_expression_p
1940 (fold_non_dependent_expr): Adjust callers of
1941 tsubst_{expr,copy_and_build}.
1942 (tsubst_friend_function): Likewise.
1943 (tsubst_template_arg): Likewise.
1944 (tsubst_default_argument): Likewise.
1945 (tsubst_decl): Likewise.
1947 (tsubst_omp_clasuses): Likewise.
1948 (regenerate_decl_fromp_template): Likewise.
1949 (instantiate_decl): Likewise.
1950 (tsubst_initializer_list): Likewise.
1951 (tsubst_enum): Likewise.
1952 (tsubst_expr): Use RECUR throughout.
1953 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
1954 invalid casts in integral constant expressions.
1955 * parser.c (cp_parser_postfix_expression): Use
1956 cast_valid_in_integral_constant_expression_p.
1957 (cp_parser_cast_expression): Likewise.
1958 (cp_parser_functional_cast): Likewise.
1961 * pt.c (tsubst_qualified_id): Do not strip references from
1964 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1967 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
1969 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
1970 for valid type-names.
1971 (cp_parser_unqualified_id): Fix error handling for destructors.
1974 * decl.c (xref_tag): Improve error message. Return early on error.
1977 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
1979 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
1982 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
1984 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
1987 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
1988 perform_integral_promotions for non integral type.
1990 2006-08-16 Jason Merrill <jason@redhat.com>
1993 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
1994 if arg is a function.
1996 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1999 * init.c (build_new): Return early on invalid placement.
2001 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
2004 * pt.c (process_template_parm): Robustify.
2006 2006-08-14 Steve Ellcey <sje@cup.hp.com>
2010 * operators.def: Remove <?, ?>, <?=, and >?= operators.
2011 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
2012 (cp_parser_warn_min_max): Remove.
2014 2006-08-11 Jason Merrill <jason@redhat.com>
2017 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
2018 attributes applied to a TYPENAME_TYPE.
2020 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
2023 * pt.c (coerce_template_parms): Copy across the
2024 invalid template arguments to the new template inner arguments.
2025 (retrieve_specialization): Robustify.
2028 * pt.c (coerce_template_template_parms): Robustify.
2031 * error.c (dump_template_parms): Robustify.
2034 * pt.c (redeclare_class_template): Robustify.
2037 * pt.c (type_unification_real): Robustify.
2039 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
2042 * decl.c (start_decl): Return error_mark_node if a
2043 diagnostic was issed for an invalid typedef initialization.
2045 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2048 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
2049 when parsing destructor names.
2052 * decl.c (duplicate_decls): Call check_default_args here.
2053 (start_preparsed_function): Do not call check_default_args.
2054 * name-lookup.c (pushdecl_maybe_friend): Only call
2055 check_default_args if duplicate_decls got bypassed.
2057 2006-08-02 Richard Guenther <rguenther@suse.de>
2061 2006-07-05 Richard Guenther <rguenther@suse.de>
2062 Andrew Pinski <pinskia@gcc.gnu.org>
2065 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2066 top level qualifiers for pointer type comparisons.
2068 2006-08-02 Mark Mitchell <mark@codesourcery.com>
2071 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
2073 2006-07-31 Mark Mitchell <mark@codesourcery.com>
2076 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
2077 (stabilize_call): Tweak documentation.
2078 (stabilize_init): Only call stabilize_call for calls.
2080 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2083 * decl2.c (check_classfn): Remove early return.
2084 * search.c (lookup_member): Return NULL with bad type.
2086 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2089 * decl.c (check_initializer): Check for 1 initializer on scalar types.
2091 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
2094 * pt.c (tsubst_copy_and_build): Mark used enum types.
2095 * semantics.c (finish_id_expression): Likewise.
2097 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2100 * decl.c (grokdeclarator): Check whether "long" or "short" was
2101 specified for non-integral types.
2103 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2105 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2107 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
2111 * pt.c (process_template_parm) Store invalid template
2112 parameters as error_mark_node in the paramater list.
2113 (push_inline_template_parms_recursive): Handle invalid
2114 template parameters.
2115 (comp_template_parms): Likewise.
2116 (check_default_tmpl_arg): Likewise.
2117 (coerce_template_template_parms): Likewise.
2118 (mangle_class_name_for_template): Likewise.
2119 (tsubst_template_parms): Likewise.
2120 * error.c (dump_template_argument_list): Likewise.
2122 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
2124 * cp-tree.h: Fix a comment typo.
2126 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2129 * decl.c (grokdeclarator): Return error_mark_node after invalid
2132 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
2135 * decl.c (grokvardecl): Use FROB_CONTEXT.
2136 * pt.c (register_specialization): Likewise.
2138 2006-07-23 Mark Mitchell <mark@codesourcery.com>
2141 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
2142 * name-lookup.c (unqualified_namespace_lookup): There is no way to
2143 have a hidden name in non-namespace scopes.
2144 * pt.c (tsubst_friend_class): Look for hidden names.
2145 * decl.c (lookup_and_check_tag): Fix typo in comment.
2147 * semantics.c (finish_compound_literal): Fix typo in comment.
2149 2006-07-21 Jason Merrill <jason@redhat.com>
2151 * decl2.c (determine_visibility): Don't propagate visibility from
2153 (constrain_class_visibility): Don't warn in system headers.
2154 Don't warn about pointer fields.
2156 2006-07-20 Mike Stump <mrs@apple.com>
2158 * decl2.c (determine_visibility_from_class): Don't use hidden
2159 visibility for explicit instantiations.
2161 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2164 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
2165 valid decls. Cleanup.
2168 * semantics.c (check_template_template_default_arg): Simplify
2171 2006-07-20 Jason Merrill <jason@redhat.com>
2174 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
2175 const variables with implicit internal linkage.
2176 * tree.c (decl_linkage): Only return lk_external if it's set.
2179 * decl2.c (constrain_visibility): Ignore the anonymous namespace
2180 for extern "C" decls.
2181 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
2183 * decl2.c (constrain_visibility): Remove specified and reason
2184 parameters. Don't touch decls that already have explicit visibility.
2185 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
2187 (determine_visibility_from_class): Reverse sense of
2188 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
2189 (constrain_class_visibility): Only complain about member visibility
2190 if the member type is another class. Don't change visibility of the
2193 2006-07-19 Mark Mitchell <mark@codesourcery.com>
2196 * decl.c (layout_var_decl): Don't call push_local_name here.
2197 (initialize_artificial_var): Assert artificiality.
2198 (cp_finish_decl): Call push_local_name here.
2200 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2203 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
2206 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2209 * semantics.c (check_accessibility_of_qualified_id): Robustify.
2212 * pt.c (tsubst_decl): Handling substitutions into a static data
2213 member from within the scope of the tempalte itself.
2215 2006-07-18 Lee Millward <lee.millward@gmail.com>
2218 * method.c (locate_copy): Check for non_reference
2219 returning error_mark_node.
2222 * decl.c (duplicate_decls): Return error_mark_node
2223 on ambiguous declaration.
2225 2006-07-18 Steve Ellcey <sje@cup.hp.com>
2228 * search.c (adjust_result_of_qualified_name_lookup): Change
2229 assert to part of if statement.
2231 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2234 * decl.c (reshape_init_class): Return error_mark_node on error.
2236 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2239 * decl2.c (check_classfn): Return NULL_TREE on error.
2241 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2244 * name-lookup.c (pushdecl_maybe_friend): Return early on
2246 * except.c (expand_start_catch_block): Use error_mark_node instead
2247 of NULL_TREE for invalid decls.
2248 * parser.c (cp_parser_exception_declaration): Return error_mark_node
2249 on invalid catch parameter. Simplify.
2251 2006-07-16 Jakub Jelinek <jakub@redhat.com>
2254 * decl2.c (note_vague_linkage_var): Removed.
2255 (finish_static_data_member_decl): Add decl to pending_statics vector
2256 directly. Do it even for non-public decls.
2258 2006-07-15 Lee Millward <lee.millward@gmail.com>
2261 * decl2.c (acceptable_java_type): Robustify. Use
2262 proper Boolean return type instead of return 1.
2263 (check_java_method): Don't issue error about
2264 type not being an acceptable Java parameter if
2265 it's error_mark_node.
2268 * parser.c (cp_parser_elaborated_type_specifier):
2269 Return early if an invalid type was detected.
2271 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2274 * parser.c (cp_parser_check_decl_spec): New function.
2275 (cp_parser_decl_specifier_seq): Factor out check for repeated
2276 decl-specifiers into cp_parser_check_decl_spec. Use it.
2277 (cp_parser_type_specifier_seq): Use it.
2280 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
2284 * decl2.c (cplus_decl_attributes): Check for invalid decls.
2286 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2289 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
2290 * decl2.c (grokfield): Likewise.
2292 2006-07-12 Geoffrey Keating <geoffk@apple.com>
2294 * decl2.c (determine_visibility): Don't change visibility of
2295 function locals because of -fvisibility-inlines-hidden.
2297 2006-07-12 Jason Merrill <jason@redhat.com>
2300 * semantics.c (note_decl_for_pch): Don't premangle templates.
2302 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
2304 * typeck.c (string_conv_p): Remove spurious quotation mark in
2307 2006-07-07 Lee Millward <lee.millward@gmail.com>
2308 Andrew Pinski <pinskia@gmail.com>
2311 * decl.c (define_label): Return error_mark_node on error.
2312 * semantics.c (finish_label_stmt): Don't call
2313 add_stmt for invalid labels.
2315 2006-07-06 Jason Merrill <jason@redhat.com>
2318 * decl2.c (finish_static_data_member_decl): Don't assert
2321 2006-07-05 Jason Merrill <jason@redhat.com>
2325 * class.c (check_field_decls): Check TYPE_PACKED after
2326 stripping array types.
2327 (finish_struct_bits): Don't copy TYPE_SIZE here.
2330 * friend.c (is_friend): Fix DR 45 implementation.
2332 2006-07-05 Richard Guenther <rguenther@suse.de>
2333 Andrew Pinski <pinskia@gcc.gnu.org>
2336 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2337 top level qualifiers for pointer type comparisons.
2339 2006-07-01 Jason Merrill <jason@redhat.com>
2342 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
2345 2006-06-30 Jason Merrill <jason@redhat.com>
2348 * call.c (build_new_method_call): Force evaluation of the
2349 instance pointer, not the object.
2351 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
2353 * decl2.c: Fix a comment typo.
2355 2006-06-30 Jason Merrill <jason@redhat.com>
2358 * decl2.c (grokfield): Only try to treat the decl as an access
2359 declaration if the scope is a class.
2361 2006-06-29 Jason Merrill <jason@redhat.com>
2368 * decl2.c (determine_visibility): Overhaul.
2369 (determine_visibility_from_class): Likewise.
2370 (min_vis_r, type_visibility, constrain_visibility): New fns.
2371 (constrain_visibility_for_template): Likewise.
2372 (constrain_class_visibility): Likewise.
2373 * decl.c (cp_finish_decl): Call determine_visibility for function
2375 * name-lookup.c (pushtag): Call determine_visibility.
2376 * decl.c (duplicate_decls): Don't copy visibility from template to
2378 * pt.c (check_explicit_specialization): Likewise.
2379 (lookup_template_class, tsubst_decl): Call determine_visibility.
2380 * class.c (finish_struct_1): Call constrain_class_visibility.
2385 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
2387 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
2388 (cp_parser_enum_specifier): Likewise.
2389 (cp_parser_elaborated_type_specifier): Apply attributes if this
2390 declares only the class.
2391 (cp_parser_class_specifier): Apply leading attributes immediately.
2392 * semantics.c (begin_class_definition): Add attributes parameter,
2393 apply them to the type.
2397 * tree.c (decl_anon_ns_mem_p): New function.
2398 * cp-tree.h: Declare it.
2399 * decl2.c (determine_visibility): Make anonymous namespace
2401 (min_vis_r, constrain_visibility): Likewise.
2402 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
2404 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
2406 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
2407 on anonymous namespaces.
2409 2006-06-28 Jason Merrill <jason@redhat.com>
2412 * pt.c (convert_template_argument): Pass all template arguments
2413 on to coerce_template_template_parms.
2415 2006-06-25 Lee Millward <lee.millward@gmail.com>
2416 Mark Mitchell <mark@codesuorcery.com>
2419 * decl2.c (grokbitfied): Remove check for grokdeclarator
2420 returning NULL_TREE, instead check for error_mark_node
2421 to indicate failure.
2422 * decl.c (grokdeclarator): Adjust block comment.
2424 2006-06-25 Lee Millward <lee.millward@gmail.com>
2427 * mangle.c (mangle_conv_op_name_for_type): Check for
2429 * name-lookup.c (push_class_level_binding): Robustify.
2430 (do_class_using_decl): Return early if name is error_mark_node.
2432 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2435 * name-lookup.c (pushtag): Return if we have error_mark_node.
2437 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2440 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
2442 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2445 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
2446 arguments. Fix comment.
2449 * init.c (build_new_1): Handle error_mark_nodes returned by
2450 build_java_class_ref.
2451 (build_java_class_ref): Do not abort compilation, but return
2452 error_mark_node. Improve error message. Fix indentation.
2454 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
2457 * decl.c (start_decl): Check that dllimports are not initialized.
2459 2006-06-22 Lee Millward <lee.millward@gmail.com>
2462 * typeck2.c (build_m_component_ref): Use error_operand_p.
2465 * decl.c (grokdeclarator): Return error_mark_node on
2466 invalid uses of the scope resolution operator.
2468 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2471 * pt.c (determine_specialization): Check for invalid decls.
2474 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
2478 * rtti.c (get_tinfo_decl_dynamic): Robustify.
2480 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2483 * init.c (push_base_cleanups): Skip members with invalid types.
2484 * typeck.c (build_class_member_access_expr): Robustify.
2486 2006-06-19 Mark Mitchell <mark@codesourcery.com>
2488 * pt.c (instantiate_template): Fix typo in comment.
2490 2006-06-19 Richard Guenther <rguenther@suse.de>
2492 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
2493 power-of-two token vector size.
2495 2006-06-16 Mark Mitchell <mark@codesourcery.com>
2498 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
2502 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
2506 * decl.c (have_extern_spec): Remove.
2507 (start_decl): Do not check have_extern_spec.
2508 (start_function): Likewise.
2509 * cp-tree.h (have_extern_spec): Remove.
2510 * parser.c (cp_parser_linkage_specification): Don't set
2512 (cp_parser_init_declarator): Likewise.
2513 (cp_parser_parameter_declaration): Do not treat parameters as
2514 within the scope of an unbraced linkage specification.
2516 2006-06-15 Mark Mitchell <mark@codesourcery.com>
2519 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
2521 * pt.c (unify): Use it.
2524 * call.c (build_conditional_expr): Robustify.
2527 * pt.c (instantiate_template): Set processing_template_decl to
2528 zero while performing substitutions.
2530 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2533 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
2534 identify destructors.
2535 (cp_parser_nested_name_specifier_opt): Remove invalid
2537 (cp_parser_template_id): Refine heuristic for determining whether
2538 we are entering a scope.
2541 * parser.c (cp_parser_declarator): Robustify.
2544 * pt.c (tsubst_expr): Use finish_omp_atomic.
2545 (value_dependent_expression_p): All CALL_EXPRs are dependent.
2546 * semantics.c (finish_omp_atomic): Rework to use standard
2547 paradigms for handling non-dependent expressions.
2549 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2551 * typeck.c (build_modify_expr): Tidy diagnostic message.
2553 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2556 * typeck.c (build_modify_expr): Disallow array assignment.
2558 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2560 * cp-tree.def: Fix typo.
2562 2006-06-13 Mark Mitchell <mark@codesourcery.com>
2565 * decl.c (decls_match): Allow an extern "C" variable declarations
2566 from different namespaces to match.
2567 (duplicate_decls): Disallow redeclaring a variable with a
2568 different linkage specification.
2570 2006-06-13 Jakub Jelinek <jakub@redhat.com>
2573 * cp-tree.h (cxx_int_tree_map): New struct.
2574 (struct language_function): Add extern_decl_map field.
2575 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
2576 to cp_function_chain->extern_decl_map hash table instead of
2577 copying over DECL_UID.
2578 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
2580 (cp_genericize_r): Remap DECL_EXTERN local decls using
2581 cp_function_chain->extern_decl_map hash table.
2582 * decl.c (finish_function): Clear extern_decl_map.
2584 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2587 * semantics.c (finish_offsetof): Handle pseudo-destructors.
2590 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
2594 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
2597 2006-06-12 Roger Sayle <roger@eyesopen.com>
2600 * typeck2.c (build_functional_cast): Use cp_convert to construct
2601 non-aggregate initializers instead of the user-level build_c_cast.
2603 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2606 * cp-tree.h (finish_offsetof): Add prototype.
2607 * semantics.c (finish_offsetof): New function.
2608 * parser.c (cp_parser_builtin_offsetof): Call it instead of
2610 * pt.c (tsubst_copy_and_build): Likewise.
2612 2006-06-06 Mark Mitchell <mark@codesourcery.com>
2615 * call.c (standard_conversion): Require that the derived type be
2616 complete when performing a derived-to-base conversion.
2618 2006-06-04 Mark Mitchell <mark@codesourcery.com>
2621 * decl.c (cp_finish_decl): Process initializers for static data
2622 members with non-dependent initializers, even in templates.
2625 * decl.c (maybe_deduce_size_from_array_init): If the declaration
2626 is erroneous, give it an erroneous type.
2627 (layout_var_decl): If the type is erroneous, give up.
2628 (check_initializer): Likewise.
2631 * cp-tree.h (TYPE_OBJ_P): New macro.
2632 (TYPE_PTROB_P): Use it.
2633 (TYPE_REF_OBJ_P): Likewise.
2634 * semantics.c (finish_compound_literal): Do not permit compound
2635 literals of non-object types.
2638 * typeck.c (original_type): Robustify.
2640 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2643 * init.c (constant_value_1): Return decl instead of error_mark_node
2644 for invalid initializers.
2646 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2649 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
2650 on operand of the COND_EXPR for the null pointer check.
2652 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2655 * typeck.c (build_unary_op): Mark the function as being used.
2657 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
2660 * parser.c (cp_parser_initial_pragma): Read one more token for
2661 caller after reading PCH file in.
2663 2006-05-31 Mark Mitchell <mark@codesourcery.com>
2666 * call.c (perform_implicit_conversion): Do not actually perform
2667 conversions in templates.
2670 * call.c (resolve_args): Check for invalid uses of bound
2671 non-static member functions.
2672 * init.c (build_offset_ref): Return error_mark_node for errors.
2675 * decl.c (reshape_init): Robustify.
2676 (reshape_init_array_1): Likewise.
2678 2006-05-30 Mark Mitchell <mark@codesourcery.com>
2681 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
2682 "friend" specifiers that do not appear in class scopes.
2685 * class.c (check_bitfield_decl): Ensure that all bitfields have
2688 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
2690 * pt.c (convert_nontype_argument): Fix a typo in an error
2693 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2695 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
2696 spelling conventions.
2698 2006-05-24 Mark Mitchell <mark@codesourcery.com>
2701 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
2702 error_mark_node to indicate an initialization is OK.
2703 (start_decl): Likewise. Adjust call to start_decl_1.
2704 (start_decl_1): Add initialized parameter. Simplify.
2705 * except.c (initialize_handler_parm): Adjust call to
2707 (expand_start_catch_block): Let cp_finish_decl initialize catch
2709 * cp-tree.h (start_decl_1): Adjust prototype.
2710 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
2711 (instantiate_decl): Let cp_finish_decl handle initialization.
2712 * semantics.c (finish_compound_literal): Create a temporary
2713 variable for the literal.
2714 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
2716 * decl2.c (finish_static_data_member_decl): Don't set
2718 (grokfield): Do not try to initialize functions.
2720 2006-05-23 Mark Mitchell <mark@codesourcery.com>
2723 * pt.c (determine_specialization): Disallow partial
2724 specializations of templates.
2726 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2729 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
2731 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
2733 2006-05-21 Mark Mitchell <mark@codesourcery.com>
2736 * cp-tree.h (cp_save_expr): New function.
2737 * init.c (build_new): Correct logic for zero-element array
2738 warning. Use cp_save_expr.
2739 * tree.c (cp_save_expr): New function.
2741 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2744 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
2747 2006-05-19 Mike Stump <mrs@apple.com>
2749 * typeck.c (default_conversion): Remove static.
2751 2006-05-19 Mark Mitchell <mark@codesourcery.com>
2754 * cp-tree.h (begin_function_try_block): Change prototype.
2755 (finish_function_handler_sequence): Likewise.
2756 * parser.c (cp_parser_function_try_block): Adjust calls.
2757 * pt.c (tsubst_expr): Adjust calls.
2758 * semantics.c (begin_function_try_block): Create an artificial
2760 (finish_function_handler_sequence): Close it.
2762 2006-05-18 Mark Mitchell <mark@codesourcery.com>
2766 * typeck.c (decay_conversion): Convert bitfields to their declared
2767 types here. Improve documentation. Avoid use of cp_convert.
2768 (default_conversion): Make it static. Perform integral promotions
2769 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
2771 * init.c (build_init): Remove.
2772 (expand_default_init): Do not call rvalue.
2773 * call.c (null_ptr_cst_p): Robustify.
2774 (build_conditional_expr): Tidy.
2775 * except.c (build_throw): Do not perform lvalue-to-rvalue
2776 conversion on operand before initializing temporary.
2777 * tree.c (convert.h): Include it.
2778 (convert_bitfield_to_declared_type): Use convert_to_integer, not
2780 (rvalue): Don't convert bitfields to their declared type here.
2781 * cp-tree.h (build_init): Remove.
2782 (default_conversion): Likewise.
2783 * typeck2.c (build_m_component_ref): Do not perform
2784 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
2785 conversions here. Correct error message.
2787 2006-05-17 Mark Mitchell <mark@codesourcery.com>
2790 * decl2.c (check_member_template): Remove checks for virtual
2792 * parser.c (cp_parser_function_specifier_opt): Complain about
2794 (cp_parser_pure_specifier): Likewise.
2797 * parser.c (cp_parser_set_storage_class): Check for
2798 invalid uses of storage classes on unbraced linkage
2800 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
2801 to cp_parser_set_storage_class.
2803 2006-05-17 Jakub Jelinek <jakub@redhat.com>
2806 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
2810 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2811 on combined parallel workshare constructs.
2812 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
2814 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2817 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
2819 2006-05-15 Mark Mitchell <mark@codesourcery.com>
2822 * cp-tree.h (perform_access_checks): New function.
2823 * semantics.c (perform_access_checks): New function.
2824 (perform_deferred_access_checks): Use it.
2825 * parser.c (cp_parser_simple_declaration): Adjust call to
2826 cp_parser_init_declarator.
2827 (cp_parser_type_parameter): Do not defer checks in default
2829 (cp_parser_explicit_specialization): Adjust call to
2830 cp_parser_single_declaration.
2831 (cp_parser_init_declarator): Perform template-parameter access
2833 (cp_parser_parameter_declaration): Do not defer checks for
2834 template parameter default arguments.
2835 (cp_parser_template_declaration_after_export): Gather access
2836 checks for template parameters, and pass them to
2837 cp_parser_single_declaration.
2838 (cp_parser_template_parameter_access_checks): New function.
2839 (cp_parser_single_declaration): Add checks parameter.
2842 * call.c (convert_like_real): Convert bitfields to their declared
2843 types when forming an rvalue.
2844 * tree.c (convert_bitfield_to_declared_type): New function.
2846 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
2848 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2851 * pt.c (any_dependent_template_arguments_p): Return early on invalid
2855 * search.c (adjust_result_of_qualified_name_lookup): Skip on
2856 invalid context_class.
2859 * pt.c (do_decl_instantiation): Return early on invalid decl.
2862 * pt.c (push_template_decl_real): Return error_mark_node instead
2866 * pt.c (tsubst_friend_class): Return early on invalid friend
2869 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
2871 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
2872 (cp/decl2.o): Likewise.
2873 (cp/typeck.o): Likewise.
2874 (cp/cvt.o): Likewise.
2875 (cp/parser.o): Likewise.
2876 (cp/call.o): Replace target.h with $(TARGET_H).
2878 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
2880 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
2881 COMPONENT_REF alone.
2883 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2886 * decl.c (copy_fn_p): Return early on non-member functions.
2888 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2891 * decl2.c (build_memfn_type): Skip invalid functions and class types.
2893 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2896 * pt.c (convert_nontype_argument): Return early on invalid arguments.
2898 * pt.c (process_template_parm): Remove superfluous temporary.
2901 * pt.c (process_template_parm): Handle erroneous non-type parameters.
2904 * typeck.c (convert_for_initialization): Skip erroneous types.
2907 * typeck.c (convert_arguments): Return early on args with
2910 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
2913 * typeck.c (build_static_cast_1): Save casted types in used types
2915 (build_reinterpret_cast_1): Same.
2916 * rtti.c (build_dynamic_cast_1): Same.
2918 2006-05-04 Jakub Jelinek <jakub@redhat.com>
2921 * parser.c (cp_parser_omp_for_loop): Only call
2922 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
2925 2006-05-02 Mark Mitchell <mark@codesourcery.com>
2928 * decl.c (grokdeclarator): Robustify checks for defining members
2929 of incomplete types.
2932 * class.c (add_method): Call grok_special_member_properties.
2933 * decl.c (grokdeclarator): Don't call it here.
2934 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
2935 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
2937 (start_method): Don't call grok_special_member_properties.
2938 * method.c (implicitly_declare_fn): Likewise.
2939 * pt.c (instantiate_class_template): Likewise.
2940 * decl2.c (grokfield): Likewise.
2942 2006-05-02 Jakub Jelinek <jakub@redhat.com>
2945 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
2946 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
2947 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
2949 2006-04-30 Mark Mitchell <mark@codesourcery.com>
2952 * pt.c (tsubst_default_argument): Increment function_depth around
2953 call to tsubst_expr.
2954 * parser.c (cp_parser_parameter_declaration): Likewise.
2955 * decl2.c (mark_used): Tidy.
2957 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2960 * decl.c (grok_op_properties): Skip operators with invalid args
2961 when checking for class-type or enum-type args.
2963 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2966 * decl.c (copy_fn_p): Skip functions with invalid first arg.
2968 2006-04-27 Mark Mitchell <mark@codesourcery.com>
2971 * tree.c (rvalue): Convert bitfields to their declared types.
2974 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
2977 2006-04-24 Mark Mitchell <mark@codesourcery.com>
2980 * typeck.c (decay_conversion): Don't adjust bitfield types.
2981 (perform_integral_promotions): Treat bitfield enums as enums, not
2982 as short integer types.
2983 * tree.c (rvalue): Convert bitfields to their correct types.
2985 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2988 * class.c (layout_class_type): Skip fields with invalid types.
2990 2006-04-23 Mark Mitchell <mark@codesourcery.com>
2993 * cp-tree.h (build_this_parm): Declare.
2994 (grok_method_quals): Remove.
2995 (build_memfn_type): Declare.
2996 (build_artificial_parm): Declare.
2997 (do_friend): Remove quals parameter.
2998 * decl.c (build_this_parm): New function.
2999 (grokfndecl): Use it. Do not pass quals to grokclassfn.
3000 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
3001 unnecessary TYPE_DECLs. Correct qualification of member function
3003 * method.c (implicitly_declare_fn): Use build_this_parm.
3004 * friend.c (do_friend): Remove quals parameter.
3005 * decl2.c (grok_method_quals): Remove.
3006 (build_memfn_type): New function.
3007 (build_artificial_parm): Give it external linkage.
3008 (grokclassfn): Remove quals parameter. Do not build "this"
3012 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
3013 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
3014 (decay_conversion): Convert bitfield expressions to the correct
3016 (build_modify_expr): Remove spurious conversions.
3017 * class.c (layout_class_type): Modify the type of bitfields to
3018 indicate a limited range.
3019 * call.c (standard_conversion): Adjust the type of bitfield
3020 expressions used in an rvalue context.
3021 (build_conditional_expr): Likewise.
3023 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
3025 * decl.c: Fix comment typos.
3027 2006-04-21 Eric Christopher <echristo@apple.com>
3029 * decl.c: Fix typo in function name.
3031 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3034 * parser.c (cp_parser_class_name): Check for invalid typenames.
3038 * pt.c (tsubst_friend_function): Return early if
3039 pushdecl_namespace_level fails.
3042 * typeck.c (convert_arguments): Return error_mark_node instead of
3044 * cp-tree.h (error_mark_list): Remove declaration.
3045 * decl.c (error_mark_list): Remove definition.
3046 (cxx_init_decl_processing): Do not initialize error_mark_list.
3049 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
3050 before calling convert_to_reference.
3051 * cvt.c (convert_to_reference): Assert that reftype is a
3054 2006-04-19 Mark Mitchell <mark@codesourcery.com>
3057 * class.c (currently_open_class): Tidy.
3058 * decl.c (grokdeclarator): If we encounter an erroneous
3059 declarator, assume that we have already issued an error message
3060 and return. Return error_mark_node instead of NULL_TREE in more
3061 places. Issue errors about function definitions that do not have
3062 a function declarator. Check for complete types for all function
3064 * cp-tree.h (cp_error_declarator): Remove.
3065 (currently_open_class): Change return type.
3066 * parser.c (cp_parser_id_expression): Add optional_p parameter.
3067 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
3068 (cp_parser_id_expression): Likewise.
3069 (cp_parser_unqualified_id): If the name is optional, return
3071 (cp_parser_postfix_dot_deref_expression): Adjust calls.
3072 (cp_parser_type_parameter): Likewise.
3073 (cp_parser_unqualified_id): Likewise.
3074 (cp_parser_direct_declarator): Likewise.
3075 (cp_parser_declarator_id): Add optional_p parameter.
3076 (cp_parser_function_definition_from_specifiers_and_declarator):
3077 Assume that start_function indicates failure only if it has issued
3079 (cp_parser_omp_var_list_no_open): Adjust calls.
3081 2006-04-17 Janis Johnson <janis187@us.ibm.com>
3083 PR c++/26114, c++/26115
3084 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
3085 * class.c (check_field_decls): Ditto.
3087 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3089 * init.c (build_offset_ref): Remove superfluous temporary.
3091 2006-04-16 Mark Mitchell <mark@codesourcery.com>
3094 * typeck.c (finish_class_member_access_expr): Robustify
3096 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
3098 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
3099 * pt.c: Include vecprim.h.
3100 (inline_parm_levels): Change the type to VEC(int,heap) *.
3101 (inline_parm_levels_used): Remove.
3102 (maybe_begin_member_template_processing,
3103 maybe_end_member_template_processing): Use VEC instead of
3106 * cp/call.c: Fix comment typos.
3108 2006-04-12 Mark Mitchell <mark@codesourcery.com>
3110 * parser.c (cp_parser_init_declarator): Initialize local variables
3113 2006-04-12 Roger Sayle <roger@eyesopen.com>
3115 * parser.c (cp_parser_init_declarator): Initialise
3116 is_parenthesized_init to false to avoid compiler warning.
3118 2006-04-11 Mark Mitchell <mark@codesourcery.com>
3120 * cp-tree.h (build_operator_new_call): Adjust prototype.
3121 (build_new_method_call): Likewise.
3122 (build_op_delete_call): Likewise.
3123 * init.c (build_raw_new_expr): New function.
3124 (build_new_1): Pass information as parameters, rather than
3125 bundling it into a NEW_EXPR.
3126 (build_new): Adjust accordingly.
3127 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
3128 (build_delete): Likewise.
3129 * decl.c (finish_destructor_body): Likewise.
3130 * call.c (build_operator_new_call): Return the allocation function
3132 (build_op_delete_call): Take allocation function as parameter.
3133 (build_special_member_call): Adjust call to build_new_method_call.
3134 (build_new_method_call): Return function called.
3135 * pt.c (tsubst_copy_and_build): Adjust call to
3136 build_new_method_call.
3137 * semantics.c (finish_call_expr): Likewise.
3138 * parser.c (cp_parser_postfix_expression): Likewise.
3139 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
3140 "incomplete", not "undefined", types.
3143 * decl.c (grokdeclarator): Remove namespace-handling code for
3144 pointers-to-members.
3145 * parser.c (cp_parser_ptr_operator): Check for qualified names
3149 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
3150 whether or not to look for a pure-specifier.
3151 (cp_parser_member_declaration): Likewise.
3153 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3155 * decl2.c, pt.c, semantics.c: Fix comment typos.
3157 2006-04-06 Roger Sayle <roger@eyesopen.com>
3159 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
3161 2006-04-05 Jason Merrill <jason@redhat.com>
3163 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
3164 default hidden visibility for anonymous namespace.
3166 2006-03-29 Roger Sayle <roger@eyesopen.com>
3169 * init.c (build_vec_delete_1): Convert BASE pointer's type to
3170 the base pointer type to avoid a type mismatch in the EQ_EXPR.
3172 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
3174 * search.c (maybe_suppress_debug_info): If
3175 flag_emit_class_debug_always then don't suppress.
3177 2006-03-22 Jason Merrill <jason@redhat.com>
3179 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
3180 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
3182 2006-03-21 Jakub Jelinek <jakub@redhat.com>
3185 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
3187 2006-03-21 Jason Merrill <jason@redhat.com>
3190 * parser.c (cp_parser_declaration): Support attributes on
3191 anonymous namespaces.
3192 * name-lookup.c (push_namespace_with_attribs): Anonymous
3193 namespaces default to hidden visibility.
3195 2006-03-20 Jason Merrill <jason@redhat.com>
3197 PR c++/21764, c++/19238
3198 * decl.c (cp_finish_decl): Call determine_visibility later.
3199 (start_preparsed_function): Likewise.
3200 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
3201 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
3202 * name-lookup.h (struct cp_binding_level): Add has_visibility
3204 * name-lookup.c: Include c-pragma.h.
3205 (push_namespace_with_attribs): Split out from push_namespace.
3206 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
3207 (leave_scope): Pop visibility if appropriate.
3208 * decl2.c (determine_visibility_from_class): Split out from...
3209 (determine_visibility): ...here. Handle function scope and
3211 (import_export_decl): Move visibility handling to
3212 determine_visibility_from_class.
3213 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
3214 attributes on namespace declarations.
3216 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3219 * decl.c (grokdeclarator): Do not accept long long double.
3220 Reorganize checks for invalid (combinations of) type modifiers.
3221 Quote modifiers in messages.
3223 2006-03-09 Jason Merrill <jason@redhat.com>
3225 PR c++/16387, c++/16389
3226 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
3227 (cxx_sizeof_or_alignof_expr): Split out from here.
3229 2006-03-09 Diego Novillo <dnovillo@redhat.com>
3231 Merge from gomp-20050608-branch
3233 2006-02-02 Diego Novillo <dnovillo@redhat.com>
3235 * decl.c (pop_labels_1): Use appropriate pointer casting.
3236 (poplevel_named_label_1): Likewise.
3237 (named_label_entry_hash): Likewise.
3238 (named_label_entry_eq): Likewise.
3239 (check_goto): Likewise.
3240 (define_label): Likewise.
3242 2006-01-26 Diego Novillo <dnovillo@redhat.com>
3244 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
3246 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
3247 instead of TREE_CODE/TREE_OPERAND.
3248 * semantics.c: Likewise.
3249 * parser.c: Likewise.
3251 2005-11-10 Diego Novillo <dnovillo@redhat.com>
3253 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
3254 target does not support TLS.
3256 2005-11-09 Jakub Jelinek <jakub@redhat.com>
3258 * decl.c (redeclaration_error_message): Don't error about
3259 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
3262 2005-11-08 Jakub Jelinek <jakub@redhat.com>
3265 * semantics.c (finish_omp_barrier, finish_omp_flush): New
3267 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
3268 (cp_parser_omp_flush): Call finish_omp_flush.
3269 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
3273 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
3275 2005-11-03 Jakub Jelinek <jakub@redhat.com>
3277 * semantics.c (finish_omp_threadprivate): Error on class-scope
3280 2005-11-02 Jakub Jelinek <jakub@redhat.com>
3282 * parser.c (cp_parser_omp_all_clauses): If some clause
3283 type is not allowed, don't remove just one of the
3284 clauses, but all clauses added in that loop round.
3286 * semantics.c (finish_omp_clauses): Fix function
3287 comment. Don't handle non-const or mutable specially,
3288 as const and not mutable is predetermined shared and
3289 that leads to double error. Don't ICE if copyin var is
3293 * parser.c (cp_parser_pragma): Diagnose
3294 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
3297 * semantics.c (finish_omp_threadprivate): Error if V
3298 is automatic variable or has incomplete type.
3300 2005-11-01 Diego Novillo <dnovillo@redhat.com>
3302 * parser.c (cp_parser_omp_all_clauses): Use
3303 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
3305 2005-11-01 Diego Novillo <dnovillo@redhat.com>
3307 * parser.c (cp_parser_omp_all_clauses): When emitting an
3308 error message, remove the invalid clause from the list.
3310 2005-10-31 Diego Novillo <dnovillo@redhat.com>
3312 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
3313 combined parallel+workshare directives.
3315 2005-10-31 Richard Henderson <rth@redhat.com>
3317 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
3318 Use cxx_omp_clause_dtor.
3319 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
3320 (cxx_omp_clause_dtor): New.
3321 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
3322 (cxx_omp_clause_default_ctor): Use it.
3323 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
3325 (cxx_omp_clause_dtor): New.
3326 * semantics.c (finish_omp_clauses): Rewrite cdtor
3327 checking to fill in CP_OMP_CLAUSE_INFO. Don't
3328 specialcase LASTPRIVATE for removal.
3329 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
3330 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
3332 2005-10-28 Jakub Jelinek <jakub@redhat.com>
3334 * semantics.c (finish_omp_threadprivate): If
3335 DECL_RTL_SET_P, call make_decl_rtl again so that
3336 encode_section_info can update SYMBOL_REF's flags.
3338 2005-10-26 Jakub Jelinek <jakub@redhat.com>
3340 * semantics.c (finish_omp_for): Don't segfault if COND
3341 or INCR is NULL. If not calling c_finish_omp_for
3342 right away and one of COND and INCR is NULL, issue
3343 error and don't expand anything.
3346 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
3347 * semantics.c (finish_omp_for): Likewise. Set
3348 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
3349 into the current statement list if not processing
3350 template decl or pass it to c_finish_omp_for.
3352 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
3353 into PRE_BODY statement list. Pass it to finish_omp_for.
3354 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
3355 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
3356 finish_omp_for. Put all the statements into sk_omp
3359 2005-10-25 Jakub Jelinek <jakub@redhat.com>
3362 * parser.c (struct cp_parser): Rename in_iteration_statement
3363 field to in_statement.
3364 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
3365 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
3366 (cp_parser_new, cp_parser_begin_omp_structured_block,
3367 cp_parser_end_omp_structured_block,
3368 cp_parser_omp_for_loop): Adjust for
3369 in_iteration_statement renaming.
3370 (cp_parser_selection_statement): Save
3371 parser->in_iteration, or it temporarily with
3372 IN_SWITCH_STMT for the
3373 cp_parser_implicitly_scoped_statement call.
3374 (cp_parser_iteration_statement): Adjust for
3375 in_iteration_statement renaming. Use
3376 IN_ITERATION_STMT rather than true.
3377 (cp_parser_jump_statement): Adjust for
3378 in_iteration_statement renaming and new values. Don't
3379 error on break in a switch statement within OMP_FOR or
3380 OpenMP structured block.
3383 * parser.c (cp_parser_cache_group): Don't stop if next
3384 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
3385 well. If current token is CPP_PRAGMA, consume
3386 everything until CPP_PRAGMA_EOL inclusive.
3388 2005-10-24 Jakub Jelinek <jakub@redhat.com>
3391 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
3392 addition to MODIFY_EXPR.
3394 2005-10-23 Richard Henderson <rth@redhat.com>
3396 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
3398 (begin_bc_block, finish_bc_block): Use it.
3399 (push_context, pop_context): Remove.
3400 (cp_genericize): Don't use them. Assert bc_label is null.
3401 * semantics.c (finish_omp_clauses): Create a fake data
3402 element of TYPE for probing ctors.
3404 2005-10-23 Richard Henderson <rth@redhat.com>
3406 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
3407 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
3408 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
3409 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
3410 * semantics.c (finish_omp_clauses): Look through
3411 arrays when looking up special member calls. Also
3412 remove FIRSTPRIVATE when LASTPRIVATE fails.
3413 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
3414 (cxx_omp_clause_assign_op): New.
3415 * cp-tree.h: Declare them.
3417 2005-10-21 Richard Henderson <rth@redhat.com>
3419 * decl.c (check_previous_goto_1): Return false if error.
3420 (check_switch_goto): Likewise.
3421 (finish_case_label): Don't emit the case label on error.
3422 * parser.c (struct cp_parser): Revert
3423 in_switch_statement_p changes.
3424 (cp_parser_labeled_statement,
3425 cp_parser_selection_statement): Likewise.
3426 (cp_parser_begin_omp_structured_block): Don't save...
3427 (cp_parser_end_omp_structured_block): or restore
3428 in_switch_statement_p.
3430 2005-10-21 Richard Henderson <rth@redhat.com>
3432 * semantics.c (finish_omp_threadprivate): Set
3433 decl_flags.u2sel when necessary.
3435 2005-10-21 Richard Henderson <rth@redhat.com>
3437 * decl.c (poplevel_named_label_1): Restore creation of the
3439 (decl_jump_unsafe): Check for error_mark_node types.
3440 (check_goto): Don't check cdtor_label. Don't use identify_goto.
3441 * semantics.c (finish_return_stmt): Do check_omp_return before
3442 converting to cdtor_label goto.
3444 2005-10-21 Richard Henderson <rth@redhat.com>