OSDN Git Service

89aedf3e8cf3b1a144f8717746aa896f5a2f7d3f
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2006-04-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2
3         * init.c (build_offset_ref): Remove superfluous temporary.
4
5 2006-04-16  Mark Mitchell  <mark@codesourcery.com>
6
7         PR c++/26365
8         * typeck.c (finish_class_member_access_expr): Robustify
9
10 2006-04-15  Kazu Hirata  <kazu@codesourcery.com>
11
12         * Make-lang.in (cp/pt.o): Depend on vecprim.h.
13         * pt.c: Include vecprim.h.
14         (inline_parm_levels): Change the type to VEC(int,heap) *.
15         (inline_parm_levels_used): Remove.
16         (maybe_begin_member_template_processing,
17         maybe_end_member_template_processing): Use VEC instead of
18         VARRAY.
19
20         * cp/call.c: Fix comment typos.
21
22 2006-04-12  Mark Mitchell  <mark@codesourcery.com>
23
24         * parser.c (cp_parser_init_declarator): Initialize local variables
25         aggressively.
26
27 2006-04-12  Roger Sayle  <roger@eyesopen.com>
28
29         * parser.c (cp_parser_init_declarator): Initialise
30         is_parenthesized_init to false to avoid compiler warning.
31
32 2006-04-11  Mark Mitchell  <mark@codesourcery.com>
33
34         * cp-tree.h (build_operator_new_call): Adjust prototype.
35         (build_new_method_call): Likewise.
36         (build_op_delete_call): Likewise.
37         * init.c (build_raw_new_expr): New function.
38         (build_new_1): Pass information as parameters, rather than
39         bundling it into a NEW_EXPR.
40         (build_new): Adjust accordingly.
41         (build_vec_delete_1): Adjust for changes to build_op_delete_call.
42         (build_delete): Likewise.
43         * decl.c (finish_destructor_body): Likewise.
44         * call.c (build_operator_new_call): Return the allocation function
45         used.
46         (build_op_delete_call): Take allocation function as parameter.
47         (build_special_member_call): Adjust call to build_new_method_call.
48         (build_new_method_call): Return function called.
49         * pt.c (tsubst_copy_and_build): Adjust call to
50         build_new_method_call.
51         * semantics.c (finish_call_expr): Likewise.
52         * parser.c (cp_parser_postfix_expression): Likewise.
53         * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
54         "incomplete", not "undefined", types. 
55
56         PR c++/26295
57         * decl.c (grokdeclarator): Remove namespace-handling code for
58         pointers-to-members.  
59         * parser.c (cp_parser_ptr_operator): Check for qualified names
60         using namespaces.
61
62         PR c++/26122
63         * parser.c (cp_parser_init_declarator): Adjust logic for deciding
64         whether or not to look for a pure-specifier.
65         (cp_parser_member_declaration): Likewise.
66
67 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
68
69         * decl2.c, pt.c, semantics.c: Fix comment typos.
70
71 2006-04-06  Roger Sayle  <roger@eyesopen.com>
72
73         * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
74
75 2006-04-05  Jason Merrill  <jason@redhat.com>
76
77         * name-lookup.c (push_namespace_with_attribs): Temporarily disable
78         default hidden visibility for anonymous namespace.
79
80 2006-03-29  Roger Sayle  <roger@eyesopen.com>
81
82         PR c++/22494
83         * init.c (build_vec_delete_1): Convert BASE pointer's type to
84         the base pointer type to avoid a type mismatch in the EQ_EXPR.
85
86 2006-03-24  Carlos O'Donell  <carlos@codesourcery.com>
87
88         * search.c (maybe_suppress_debug_info): If
89         flag_emit_class_debug_always then don't suppress.
90
91 2006-03-22  Jason Merrill  <jason@redhat.com>
92
93         * name-lookup.c (push_namespace_with_attribs): Only apply hidden
94         visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
95
96 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
97
98         PR c++/26691
99         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
100
101 2006-03-21  Jason Merrill  <jason@redhat.com>
102
103         PR c++/21581
104         * parser.c (cp_parser_declaration): Support attributes on
105         anonymous namespaces.
106         * name-lookup.c (push_namespace_with_attribs): Anonymous 
107         namespaces default to hidden visibility.
108
109 2006-03-20  Jason Merrill  <jason@redhat.com>
110
111         PR c++/21764, c++/19238
112         * decl.c (cp_finish_decl): Call determine_visibility later.
113         (start_preparsed_function): Likewise.
114         * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
115         (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
116         * name-lookup.h (struct cp_binding_level): Add has_visibility 
117         bitfield.
118         * name-lookup.c: Include c-pragma.h.
119         (push_namespace_with_attribs): Split out from push_namespace.
120         Push visibility if appropriate.  Set TREE_PUBLIC on namespaces.
121         (leave_scope): Pop visibility if appropriate.
122         * decl2.c (determine_visibility_from_class): Split out from...
123         (determine_visibility): ...here.  Handle function scope and 
124         nested classes.
125         (import_export_decl): Move visibility handling to 
126         determine_visibility_from_class.
127         * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
128         attributes on namespace declarations.
129
130 2006-03-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
131
132         PR c++/6634
133         * decl.c (grokdeclarator): Do not accept long long double.
134         Reorganize checks for invalid (combinations of) type modifiers.
135         Quote modifiers in messages.
136
137 2006-03-09  Jason Merrill  <jason@redhat.com>
138
139         PR c++/16387, c++/16389
140         * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
141         (cxx_sizeof_or_alignof_expr): Split out from here.
142
143 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
144
145         Merge from gomp-20050608-branch
146
147         2006-02-02  Diego Novillo  <dnovillo@redhat.com>
148
149                 * decl.c (pop_labels_1): Use appropriate pointer casting.
150                 (poplevel_named_label_1): Likewise.
151                 (named_label_entry_hash): Likewise.
152                 (named_label_entry_eq): Likewise.
153                 (check_goto): Likewise.
154                 (define_label): Likewise.
155
156         2006-01-26  Diego Novillo  <dnovillo@redhat.com>
157
158                 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
159                 of TREE_BLOCK.
160                 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
161                 instead of TREE_CODE/TREE_OPERAND.
162                 * semantics.c: Likewise.
163                 * parser.c: Likewise.
164
165         2005-11-10  Diego Novillo  <dnovillo@redhat.com>
166
167                 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
168                 target does not support TLS.
169
170         2005-11-09  Jakub Jelinek  <jakub@redhat.com>
171
172                 * decl.c (redeclaration_error_message): Don't error about
173                 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
174                 (olddecl).
175
176         2005-11-08  Jakub Jelinek  <jakub@redhat.com>
177
178                 PR c++/24735
179                 * semantics.c (finish_omp_barrier, finish_omp_flush): New
180                   functions.
181                 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
182                 (cp_parser_omp_flush): Call finish_omp_flush.
183                 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
184                   prototypes.
185
186                 PR c++/24734
187                 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
188
189         2005-11-03  Jakub Jelinek  <jakub@redhat.com>
190
191                 * semantics.c (finish_omp_threadprivate): Error on class-scope
192                 variables.
193
194         2005-11-02  Jakub Jelinek  <jakub@redhat.com>
195
196                 * parser.c (cp_parser_omp_all_clauses): If some clause
197                 type is not allowed, don't remove just one of the
198                 clauses, but all clauses added in that loop round.
199
200                 * semantics.c (finish_omp_clauses): Fix function
201                 comment. Don't handle non-const or mutable specially,
202                 as const and not mutable is predetermined shared and
203                 that leads to double error. Don't ICE if copyin var is
204                 PARM_DECL.
205
206                 PR c++/24613
207                 * parser.c (cp_parser_pragma): Diagnose
208                 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
209                 construct.
210
211                 * semantics.c (finish_omp_threadprivate): Error if V
212                   is automatic variable or has incomplete type.
213
214         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
215
216                 * parser.c (cp_parser_omp_all_clauses): Use
217                 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
218
219         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
220
221                 * parser.c (cp_parser_omp_all_clauses): When emitting an
222                 error message, remove the invalid clause from the list.
223
224         2005-10-31  Diego Novillo  <dnovillo@redhat.com>
225
226                 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
227                 combined parallel+workshare directives.
228
229         2005-10-31  Richard Henderson  <rth@redhat.com>
230
231                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
232                 Use cxx_omp_clause_dtor.
233                 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
234                 (cxx_omp_clause_dtor): New.
235                 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
236                 (cxx_omp_clause_default_ctor): Use it.
237                 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
238                 Likewise.
239                 (cxx_omp_clause_dtor): New.
240                 * semantics.c (finish_omp_clauses): Rewrite cdtor
241                 checking to fill in CP_OMP_CLAUSE_INFO.  Don't
242                 specialcase LASTPRIVATE for removal.
243                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
244                 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
245
246         2005-10-28  Jakub Jelinek  <jakub@redhat.com>
247
248                 * semantics.c (finish_omp_threadprivate): If
249                   DECL_RTL_SET_P, call make_decl_rtl again so that
250                   encode_section_info can update SYMBOL_REF's flags.
251
252         2005-10-26  Jakub Jelinek  <jakub@redhat.com>
253
254                 * semantics.c (finish_omp_for): Don't segfault if COND
255                 or INCR is NULL.  If not calling c_finish_omp_for
256                 right away and one of COND and INCR is NULL, issue
257                 error and don't expand anything.
258
259                 PR c++/24512
260                 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
261                 * semantics.c (finish_omp_for): Likewise.  Set
262                 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
263                 into the current statement list if not processing
264                 template decl or pass it to c_finish_omp_for.
265
266                 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
267                 into PRE_BODY statement list.  Pass it to finish_omp_for.
268                 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
269                 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
270                 finish_omp_for.  Put all the statements into sk_omp
271                 scope.
272
273         2005-10-25  Jakub Jelinek  <jakub@redhat.com>
274
275                 PR c++/24516
276                 * parser.c (struct cp_parser): Rename in_iteration_statement
277                 field to in_statement.
278                 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
279                 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
280                 (cp_parser_new, cp_parser_begin_omp_structured_block,
281                 cp_parser_end_omp_structured_block,
282                 cp_parser_omp_for_loop): Adjust for
283                 in_iteration_statement renaming.
284                 (cp_parser_selection_statement): Save
285                 parser->in_iteration, or it temporarily with
286                 IN_SWITCH_STMT for the
287                 cp_parser_implicitly_scoped_statement call.
288                 (cp_parser_iteration_statement): Adjust for
289                 in_iteration_statement renaming.  Use
290                 IN_ITERATION_STMT rather than true.
291                 (cp_parser_jump_statement): Adjust for
292                 in_iteration_statement renaming and new values.  Don't
293                 error on break in a switch statement within OMP_FOR or
294                 OpenMP structured block.
295
296                 PR c++/24513
297                 * parser.c (cp_parser_cache_group): Don't stop if next
298                 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
299                 well.  If current token is CPP_PRAGMA, consume
300                 everything until CPP_PRAGMA_EOL inclusive.
301
302         2005-10-24  Jakub Jelinek  <jakub@redhat.com>
303
304                 PR c++/24502
305                 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
306                 addition to MODIFY_EXPR.
307
308         2005-10-23  Richard Henderson  <rth@redhat.com>
309
310                 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
311                 (bc_label): New.
312                 (begin_bc_block, finish_bc_block): Use it.
313                 (push_context, pop_context): Remove.
314                 (cp_genericize): Don't use them.  Assert bc_label is null.
315                 * semantics.c (finish_omp_clauses): Create a fake data
316                 element of TYPE for probing ctors.
317
318         2005-10-23  Richard Henderson  <rth@redhat.com>
319
320                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
321                 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
322                 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
323                 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
324                 * semantics.c (finish_omp_clauses): Look through
325                 arrays when looking up special member calls.  Also
326                 remove FIRSTPRIVATE when LASTPRIVATE fails.
327                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
328                 (cxx_omp_clause_assign_op): New.
329                 * cp-tree.h: Declare them.
330
331         2005-10-21  Richard Henderson  <rth@redhat.com>
332
333                 * decl.c (check_previous_goto_1): Return false if error.
334                 (check_switch_goto): Likewise.
335                 (finish_case_label): Don't emit the case label on error.
336                 * parser.c (struct cp_parser): Revert
337                 in_switch_statement_p changes.
338                 (cp_parser_labeled_statement,
339                 cp_parser_selection_statement): Likewise.
340                 (cp_parser_begin_omp_structured_block): Don't save...
341                 (cp_parser_end_omp_structured_block): or restore
342                 in_switch_statement_p.
343
344         2005-10-21  Richard Henderson  <rth@redhat.com>
345
346                 * semantics.c (finish_omp_threadprivate): Set
347                 decl_flags.u2sel when necessary.
348
349         2005-10-21  Richard Henderson  <rth@redhat.com>
350
351                 * decl.c (poplevel_named_label_1): Restore creation of the
352                 bad_decls list.
353                 (decl_jump_unsafe): Check for error_mark_node types.
354                 (check_goto): Don't check cdtor_label.  Don't use identify_goto.
355                 * semantics.c (finish_return_stmt): Do check_omp_return before
356                 converting to cdtor_label goto.
357
358         2005-10-21  Richard Henderson  <rth@redhat.com>
359
360                 PR c++/24451
361                 * decl.c (check_omp_return): Return false on error.
362                 * cp-tree.h (check_omp_return): Update decl.
363                 * semantics.c (finish_return_stmt): Avoid adding
364                 return on error.
365
366         2005-10-21  Richard Henderson  <rth@redhat.com>
367
368                 * cp-tree.h (struct language_function): Remove
369                 x_named_label_uses.
370                 Change x_named_labels to a hashtable.
371                 (check_omp_return): Declare.
372                 * decl.c (struct named_label_use_entry): Rename from
373                 named_label_use_list.  Remove label_decl.
374                 (struct named_label_entry): Rename from
375                 named_label_list.  Remove old_value and next.  Change
376                 in_try_scope and in_catch_scope to bool. Add
377                 in_omp_scope.
378                 (pop_labels_1): New.
379                 (pop_labels): Use it.
380                 (pop_local_label, poplevel_named_label_1): New.
381                 (poplevel): Use them.
382                 (named_label_entry_hash, named_label_entry_eq): New.
383                 (make_label_decl): Create named_labels.  Move label
384                 creation bits from lookup_label.
385                 (declare_local_label): Tidy.
386                 (identify_goto): Split out from ...
387                 (check_previous_goto_1): Add exited_omp argument.
388                 Handle omp scopes.
389
390                 (use_label): Merge into...
391                 (check_goto): ... here.  Handle omp scopes.
392                 (check_omp_return): New.
393                 (check_previous_gotos): Merge into...
394                 (define_label): ... here.
395                 (save_function_data): Remove x_named_label_uses reference.
396                 (finish_function): Likewise.
397                 * name-lookup.h (sk_omp): New.
398                 * name-lookup.c (begin_scope): Handle it.
399                 * parser.c (cp_parser_omp_for): Don't create extra
400                 compound stmt.
401
402                 (cp_parser_omp_sections): Likewise.
403                 * semantics.c (finish_return_stmt): Call check_omp_return.
404                 (begin_omp_structured_block): Use sk_omp.
405                 (finish_omp_structured_block): Use do_poplevel.  Don't build a
406                 MUST_NOT_THROW expression here.
407                 (begin_omp_parallel, finish_omp_parallel): Don't create extra
408                 compound statements.
409
410         2005-10-21  Diego Novillo  <dnovillo@redhat.com>
411
412                 PR 24455
413                 * cp/cp-tree.h (struct lang_decl_flags): Add field
414                 threadprivate_p.
415                 (CP_DECL_IS_THREADPRIVATE): Define.
416                 * cp/semantics.c (finish_omp_threadprivate): Set.  Do
417                 not error out if CP_DECL_IS_THREADPRIVATE is set
418                 already.
419                 * cp/decl.c (duplicate_decls): Merge
420                 CP_DECL_THREADPRIVATE_P.
421
422         2005-10-20  Richard Henderson  <rth@redhat.com>
423
424                 * cp-gimplify.c (cp_gimplify_omp_for): New.
425                 (cp_gimplify_expr): Call it.
426                 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
427                 * parser.c (struct cp_parser): Rename
428                 in_iteration_statement_p to in_iteration_statement and
429                 change to unsigned char.  Similarly with
430                 in_switch_statement.  Update all users.
431                 (IN_OMP_BLOCK, IN_OMP_FOR): New.
432                 (cp_parser_labeled_statement): Diagnose case labels
433                 binding closer to an openmp block nested than the
434                 switch.
435                 (cp_parser_jump_statement): Diagnose break and
436                 continue labels binding closer to an openmp block than
437                 an iteration or switch.
438                 (cp_parser_omp_for_loop): Mark in_iteration_statement
439                 for an omp for.
440                 (cp_parser_begin_omp_structured_block): New.
441                 (cp_parser_end_omp_structured_block): New.
442                 (cp_parser_omp_structured_block): Use them.
443                 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
444                 (cp_parser_omp_parallel): Likewise.
445
446         2005-10-20  Richard Henderson  <rth@redhat.com>
447
448                 * semantics.c (begin_omp_structured_block): New.
449                 (finish_omp_structured_block): New.
450                 (begin_omp_parallel, finish_omp_parallel): Use them.
451                 * parser.c (cp_parser_omp_structured_block): Likewise.
452                 (cp_parser_omp_for): Likewise.
453                 (cp_parser_omp_sections_scope): Likewise.
454                 * cp-tree.h: Declare them.
455
456         2005-10-20  Richard Henderson  <rth@redhat.com>
457
458                 * parser.c (cp_parser_omp_master): Return the statement.
459                 (cp_parser_omp_ordered): Likewise.
460                 (cp_parser_omp_construct): Set the locus for them.
461
462         2005-10-19  Richard Henderson  <rth@redhat.com>
463
464                 * semantics.c (finish_omp_atomic): Revert to
465                 uses_template_parms.
466
467         2005-10-19  Richard Henderson  <rth@redhat.com>
468
469                 * semantics.c (finish_omp_clauses): Avoid
470                 DECL_THREAD_LOCAL_P on a PARM_DECL.  Remove some
471                 stub asserts guaranteed to fail.
472
473         2005-10-19  Richard Henderson  <rth@redhat.com>
474
475                 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
476                 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
477                 * parser.c (cp_parser_omp_clause_copyin): Remove.
478                 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.                Call finish_omp_clauses.
479                 (cp_parser_omp_clause_if): Don't do error checking here.
480                 (cp_parser_omp_clause_num_threads): Likewise.
481                 (cp_parser_omp_clause_schedule): Likewise.
482                 (cp_parser_omp_atomic): Use finish_omp_atomic.
483                 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
484                 Don't decompose assignment statment here.  Use
485                 finish_omp_for.
486
487                 * pt.c (tsubst_omp_clauses): New.
488                 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
489                 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
490                 * semantics.c (finish_omp_clauses): New.
491                 (begin_omp_parallel, finish_omp_parallel): Know Less about the
492                 internals of the stmt_list stack.
493                 (finish_omp_for, finish_omp_atomic): New.
494
495         2005-10-18  Jakub Jelinek  <jakub@redhat.com>
496
497                 * semantics.c (cxx_omp_predetermined_sharing): New function.
498                 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
499                 * cp-objcp-common.h
500                 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
501
502         2005-10-18  Richard Henderson  <rth@redhat.com>
503
504                 * parser.c (cp_parser_omp_single): Use make_node and accessors
505                 instead of build.
506
507         2005-10-17  Richard Henderson  <rth@redhat.com>
508
509                 * parser.c (cp_parser_omp_for_loop): Handle declarations.
510
511         2005-10-12  Richard Henderson  <rth@redhat.com>
512
513                 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
514                 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
515                 (finish_omp_threadprivate): Declare.
516                 * parser.c (struct cp_lexer): Add in_pragma.
517                 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
518                 when in_pragma.
519                 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
520                 (cp_parser_skip_to_end_of_statement): Likewise.
521                 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
522                 (cp_parser_skip_to_closing_brace): Likewise.
523                 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
524                 (cp_parser_require_pragma_eol): New.
525                 (cp_parser_statement): Add in_compound argument;
526                 update all callers.
527                 Restart if a non-statement pragma seen outside a
528                 compound.
529                 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
530                 (cp_parser_declaration_seq_opt): Likewise.
531                 (cp_parser_member_specification_opt): Likewise.
532                 (cp_parser_function_definition_after_decl): Likewise.
533                 (cp_parser_skip_until_found): Likewise.
534                 (cp_parser_cache_group): Likewise.
535                 (enum pragma_omp_clause, cp_parser_omp_clause_name,
536                 check_no_duplicate_clause,
537                 cp_parser_omp_var_list_no_open,
538                 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
539                 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
540                 cp_parser_omp_clause_nowait,
541                 cp_parser_omp_clause_num_threads,
542                 cp_parser_omp_clause_ordered,
543                 cp_parser_omp_clause_reduction,
544                 cp_parser_omp_clause_schedule,
545                 cp_parser_omp_all_clauses,
546                 cp_parser_omp_structured_block, cp_parser_omp_atomic,
547                 cp_parser_omp_barrier, cp_parser_omp_critical,
548                 cp_parser_omp_flush, cp_parser_omp_for_loop,
549                 cp_parser_omp_for, cp_parser_omp_master,
550                 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
551                 cp_parser_omp_sections, cp_parser_omp_parallel,
552                 cp_parser_omp_single, cp_parser_omp_threadprivate,
553                 cp_parser_omp_construct): New.
554                 (cp_parser_pragma): Handle OpenMP pragmas.
555                 * semantics.c (finish_omp_threadprivate): New.
556                 (begin_omp_parallel, finish_omp_parallel): New.
557
558         2005-10-11  Richard Henderson  <rth@redhat.com>
559
560                 * parser.c (struct cp_token): Add pragma_kind.
561                 (eof_token): Initialize it.
562                 (cp_lexer_handle_pragma): Remove.
563                 (cp_parser_initial_pragma): New.
564                 (cp_lexer_new_main): Use it.
565                 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
566                 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
567                 (cp_parser_skip_to_pragma_eol): New.
568                 (cp_parser_error): Use it.
569                 (pragma_lex): New.
570
571         2005-10-09  Richard Henderson  <rth@redhat.com>
572
573                 * lex.c (parse_strconst_pragma): Update for c_lex name change.
574                 (handle_pragma_java_exceptions): Likewise.
575                 * parser.c (cp_lexer_new_main): Likewise.
576
577         2005-10-06  Richard Henderson  <rth@redhat.com>
578
579                 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
580                 (cp_lexer_handle_pragma): Comment out
581                 cpp_handle_deferred_pragma.
582
583         2005-10-01  Richard Henderson  <rth@redhat.com>
584
585                 * name-lookup.c (lookup_name): Remove prefer_type argument.
586                 (lookup_name_prefer_type): New function.
587                 * name-lookup.h (lookup_name_prefer_type): Declare it.
588                 * decl.c (lookup_and_check_tag): Use it.
589                 * pt.c (tsubst_friend_class): Likewise. Update for
590                 lookup_name change.
591                 (lookup_template_class, tsubst_copy_and_build): Likewise.
592
593 2006-03-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
594
595         PR c++/15759
596         * tree.c (bot_manip): Don't call mark_used.
597
598 2006-03-02  Mike Stump  <mrs@apple.com>
599
600         * decl2.c (import_export_decl): Remove redundant call to
601         targetm.cxx.key_method_may_be_inline ().
602
603 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
604
605         * decl.c (start_decl): Use have_global_bss_p when deciding
606         whether to make the decl common.
607
608 2006-03-01  Mike Stump  <mrs@apple.com>
609
610         PR darwin/25908
611         * decl2.c (import_export_decl): Fix ABI breakage on darwin.
612
613 2006-02-24  Geoffrey Keating  <geoffk@apple.com>
614
615         * except.c (expand_start_catch_block): Handle
616         flag_use_cxa_get_exception_ptr.
617
618 2006-02-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
619
620         PR c++/26291
621         * decl.c (grok_op_properties): Check for ellipsis in arguments of
622         operators.
623
624 2006-02-20  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
625
626         * Make-lang.in (C++): Remove.
627         (.PHONY): Remove C++.
628
629 2006-02-18  Mark Mitchell  <mark@codesourcery.com>
630
631         PR c++/26266
632         * cp-tree.h (cp_finish_decl): Adjust declaration.
633         (grokbitfield): Likewise.
634         (finish_static_data_member_decl): Likewise.
635         * init.c (constant_value_1): Ensure processing_template_decl when
636         folding non-dependent initializers for static data members of
637         dependent types.  Return error_mark_node for erroneous
638         initailizers.
639         * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
640         * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
641         (cp_finish_decl): Add init_const_expr_p parameter.  Set
642         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
643         (finish_decl): Adjust call to cp_finish_decl.
644         (compute_array_index_type): Robustify.
645         (start_method): Use finish_decl, not cp_finish_decl.
646         * rtti.c (emit_tinfo_decl): Likewise.
647         * except.c (initialize_handler_parm): Adjust call to
648         cp_finish_decl.
649         (expand_start_catch_block): Likewise.
650         * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
651         * pt.c (instantiate_class_template): Adjust call to
652         finish_static_data_member_decl.
653         (tsubst_expr): Use finish_decl, not cp_finish_decl.
654         (instantiate_decl): Adjust call to cp_finish_decl.
655         * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
656         cp_finish_decl.
657         * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
658         parameter.
659         (grokfield): Likewise.
660         * parser.c (cp_parser_condition): Check for constant initializers.
661         (cp_parser_init_declarator): Adjust calls to grokfield and
662         cp_finish_decl.  Don't set
663         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
664         (cp_parser_member_declaration): Likewise.
665         (cp_parser_objc_class_ivars): Likewise.
666
667 2006-02-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
668
669         * call.c (standard_conversion): Return NULL instead of 0.
670         (build_user_type_conversion_1): Likewise.
671         (tourney): Likewise.
672         * decl.c (redeclaration_error_message): Likewise.
673         * error.c (language_to_string): Likewise.
674
675 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
676
677         * cp-tree.h (warn_hidden): Remove prototype.
678         * class.c (warn_hidden): Make static.
679
680         * cp-tree.h (build_type_conversion): Remove prototype.
681         * cvt.c (build_type_conversion): Add prototype, make static.
682
683         * cp-tree.h (push_tinst_level): Remove prototype.
684         (pop_tinst_level): Likewise.
685         * pt.c (push_tinst_level): Add prototype, make static.
686         (pop_tinst_level): Likewise.
687
688 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
689
690         * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
691         * typeck.c (unary_complex_lvalue): Likewise.
692
693 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
694
695         * lex.c (parse_strconst_pragma): Return error_mark_node instead of
696         "(tree)-1" to indicate failure.  Simplify.
697         (handle_pragma_interface): Test for error_mark_node instead of
698         "(tree)-1".
699         (handle_pragma_implementation): Likewise.
700
701 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
702
703         PR c++/26151
704         * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
705         decl-specifiers.  Remove extra check for duplicate 'friend'.
706         * decl.c (grokdeclarator): Remove check for duplicate
707         decl-specifiers.  Set longlong together with long_p.
708
709 2006-02-12  Jason Merrill  <jason@redhat.com>
710
711         PR c++/24996
712         * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the 
713         TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
714
715 2006-02-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
716
717         * class.c (debug_class): Remove extern.
718         (debug_thunks): Likewise.
719
720 2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
721
722         * typeck.c (string_conv_p): Don't test for flag_const_strings.
723
724 2006-02-08  Jason Merrill  <jason@redhat.com>
725
726         PR c++/25979
727         * cp-gimplify.c (cp_gimplify_expr): Don't call
728         cp_gimplify_init_expr for MODIFY_EXPRs.
729         * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
730
731 2006-02-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
732
733         PR c++/26071
734         * decl.c (grokdeclarator): Set dname also for destructor.
735
736         PR c++/26070
737         * decl.c (grokdeclarator): Clear storage_class together with staticp.
738
739 2006-02-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
740
741         * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
742         (cp_build_qualified_type): Propogate renaming.
743         * call.c (convert_like_real): Likewise.
744         * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
745         * decl.c (make_typename_type, grokdeclarator): Likewise.
746         * pt.c (tsubst_friend_function, instantiate_class_template,
747         tsubst_default_argument, instantiate_decl,
748         tsubst_initializer_list, tsubst_enum): Likewise.
749         * semantics.c (finish_template_type): Likewise.
750         * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
751
752 2006-02-07  Dirk Mueller  <dmueller@suse.com>
753
754         * typeck.c (build_binary_op): Annotate div-by-zero
755         warnings to make -Wno-div-by-zero have an effect.
756
757 2006-02-07  Mark Mitchell  <mark@codesourcery.com>
758
759         PR c++/9737
760         * pt.c (coerce_template_template_parms): Do not templates with
761         excess default arguments to match template template parameters
762         with fewer parameters.
763         (coerce_template_parms): Add use_default_args parameter; use
764         default arguments only when true.
765         (lookup_template_class): Adjust call to coerce_template_parms.
766         (fn_type_unification): Likewise.
767         (unify): Likewise.
768         (get_bindings): Likewise.
769         (dependent_type_p): Add assertions.
770
771 2006-02-06  Roger Sayle  <roger@eyesopen.com>
772
773         * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
774         * rtti.c (typeinfo_in_lib_p): Likewise.
775         * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
776         * name-lookup.c (arg_assoc_type): Likewise.
777
778 2006-02-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
779
780         * cp-tree.h (tf_warn_or_error): New substituion flag.
781         (cp_build_qualified_type): Use it.
782         * call.c (convert_like_real): Likewise.
783         * cvt.c (cp_convert_to_pointer): Likewise.
784         (convert_to_reference): Likewise.
785         * decl.c (make_typename_type): Likewise.
786         (grokdeclarator): Likewise.
787         * pt.c (tsubst_friend_function): Likewise.
788         (tsubst_friend_class): Likewise.
789         (instantiate_class_template): Likewise.
790         (tsubst_default_argument): Likewise.
791         (instantiate_decl): Likewise.
792         (tsubst_initializer_list): Likewise.
793         (tsubst_enum): Likewise.
794         * semantics.c (finish_template_type): Likewise.
795         * typeck.c (build_ptrmemfunc): Likewise.
796         (convert_for_assignment): Likewise.
797
798 2006-02-03  Lee Millward  <lee.millward@gmail.com>
799
800        * typeck.c (string_conv_p): Pass appropiate
801        OPT_Wxxxx values when calling warning().
802        (build_array_ref, cxx_mark_addressable): Likewise.
803        (check_return_expr): Likewise.
804
805        * init.c (perform_member_init): Likewise.
806        (sort_mem_initializers, emit_mem_initializers): Likewise.
807
808        * class.c (check_field_decls): Likewise.
809        (warn_about_ambiguous_bases): Likewise.
810
811        * decl.c (pop_label, poplevel): Likewise.
812        (duplicate_decls, grok_op_properties): Likewise.
813        (start_preparsed_function, finish_function): Likewise.
814
815        * name-lookup.c (pushdecl_maybe_friend): Likewise.
816        (pushdecl_maybe_friend): Likewise.
817
818        * parser.c (cp_parser_warn_min_max): Likewise.
819        (cp_parser_cast_expression): Likewise.
820
821        * method.c (lazily_declare_fn): Likewise.
822        * cvt.c (convert_to_void): Likewise.
823        * mangle.c (finish_mangling): Likewise.
824        * cp-gimplify.c (gimplify_expr_stmt): Likewise.
825
826 2006-02-03  Mark Mitchell  <mark@codesourcery.com>
827
828         * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
829         not IDENTIFIER_OPNAME_P.
830
831 2006-01-31  Mark Mitchell  <mark@codesourcery.com>
832
833         PR c++/25342
834         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
835         documentation.
836         * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
837         not TREE_VALUE.
838         (instantiate_class_template): Simplify.
839         (verify_class_unification): Remove.
840         (unify): Document parameters.  Use INNERMOST_TEMPLATE_ARGS to
841         permit multiple levels of template arguments.
842         (more_specialized_class): Simplify.
843         (get_class_bindings): Pass full arguments to unify.  Fold
844         verify_class_unification into this function.  Return full
845         arguments.
846         (most_specialized_class): Adjust for changes to
847         get_class_bindings.  Issue errors here for ambiguity.  Return the
848         fully deduced arguments for the most specialized class, in
849         addition to the partial specialization.
850
851 2006-01-31  Ben Elliston  <bje@au.ibm.com>
852
853         * mangle.c: Comment fix.
854
855 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
856
857         * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
858         * repo.c (extract_string, afgets): Use cast when converting from
859         void *. 
860
861 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
862
863         * call.c (alloc_conversion): Use cast when converting from void *.
864         (alloc_conversions): Likewise.
865         (add_candidate): Likewise.
866         (print_z_candidates): Likewise.
867         (add_warning): Likewise.
868         * pt.c (retrieve_local_specialization): Likewise.
869         (process_partial_specialization): Likewise.
870         (mangle_class_name_for_template): Likewise.
871         (tsubst_template_args): Likewise.
872         * typeck2.c (pat_calc_hash): Likewise.
873         (pat_compare): Likewise.
874         (abstract_virtuals_error): Likewise.
875         * class.c (method_name_cmp): Likewise.
876         (resort_method_name_cmp): Likewise.
877         (get_vfield_name): Likewise.
878         * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
879         * lex.c (init_reswords): Likewise.
880         * rtti.c (create_pseudo_type_info): Likewise.
881         * search.c (dfs_lookup_base): Likewise.
882         (dfs_dcast_hint_pre): Likewise.
883         (dfs_dcast_hint_post): Likewise.
884         * tree.c (hash_tree_cons): Likewise.
885         * repo.c (extract_string): Likewise.
886         (afgets): Likewise.
887         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
888         * g++spec.c (lang_specific_driver): Likewise.
889
890 2006-01-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
891
892         * call.c (joust): Pass option code to warning.  Use inform for
893         explanation. 
894         * class.c (check_bases): Likewise.
895         (maybe_warn_about_overly_private_class): Likewise.
896         (check_field_decls): Likewise.
897         (layout_empty_base): Likewise.
898         (layout_virtual_bases): Likewise.
899         (layout_class_type): Likewise.
900
901 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
902
903         PR c++/25999
904         * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
905         here, not ...
906         (start_function): ... here.
907
908 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
909
910         PR c++/25855
911         * class.c (resolve_address_of_overloaded_function): Adjust use of
912         return value from most_specialized_instantiation.
913         * pt.c (determine_specialization): Avoid multiple calls to
914         get_bindings.
915         (most_specialized_instantiation): When a tie occurs, set the
916         current presumed champion to the next template.  Return the
917         TREE_LIST node containing the template, rather than the template
918         itself.
919         (most_specialized): Remove.
920         * name-lookup.c (push_overloaded_decl): When duplicate_decls
921         indicates a failed redeclaration, report that to callers.
922
923 2006-01-26  Jason Merrill  <jason@redhat.com>
924
925         PR c++/16021
926         * name-lookup.c (parse_using_directive): Require strong using to
927         name a nested namespace.
928
929 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
930
931         Revert:
932         * cp-tree.h (do_poplevel): Remove prototype.
933         * semantics.c (do_poplevel): Add prototype.  Make static.
934
935         Revert:
936         * cp-tree.h (default_conversion): Remove prototype.
937         * typeck.c (default_conversion): Make static.
938
939 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
940
941         * cp-tree.h (get_primary_binfo): Remove prototype.
942         (push_using_decl): Likewise.
943         (current_template_args): Likewise.
944         (more_specialized_class): Likewise.
945         (mark_class_instantiated): Likewise.
946         (default_conversion): Likewise.
947         (pfn_from_ptrmemfunc): Likewise.
948         * class.c (get_primary_binfo): Add prototype, make static, simplify.
949         * name-lookup.c (push_using_decl): Make static.
950         * pt.c (current_template_args): Likewise.
951         (more_specialized_class): Likewise.
952         (mark_class_instantiated): Likewise.
953         * typeck.c (default_conversion): Make static.
954         (pfn_from_ptrmemfunc): Add prototype, make static.
955
956 2006-01-24  Dirk Mueller  <dmueller@suse.de>
957         
958         * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
959
960 2006-01-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
961
962         PR c++/25552
963         * parser.c (cp_parser_unqualified_id): Check that destructor name
964         and scope match.
965         * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
966         Adjust comment.  Return early if possible.
967         Use same_type_p to compare types.
968         * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
969
970 2006-01-24  Mark Mitchell  <mark@codesourcery.com>
971
972         * semantics.c: Remove outdated comment.
973
974 2006-01-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
975
976         * cp-tree.h (do_poplevel): Remove prototype.
977         * semantics.c (do_poplevel): Add prototype.  Make static.
978
979         * cp-tree.h (original_type): Remove prototype.
980         * typeck.c (original_type): Make static.
981
982         * cp-tree.h (declare_global_var): Remove prototype.
983         * decl.c (declare_global_var): Make static.
984
985         * cp-tree.h (implicitly_declare_fn): Remove prototype.
986         * method.c (implicitly_declare_fn): Make static.
987
988         * cp-tree.h (fold_decl_constant_value): Remove prototype.
989         * pt.c (fold_decl_constant_value): Make static.
990
991         * cp-tree.h (build_x_delete): Remove prototype.
992         * init.c (build_vec_delete_1): Call build_op_delete_call directly
993         and not via build_x_delete.
994         (build_x_delete): Remove.
995
996         * cp-tree.h (get_vtt_name): Remove prototype.
997         * class.c (get_vtt_name): Remove.
998         (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
999
1000 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1001
1002         * rtti.c (build_dynamic_cast): Fix comment.
1003
1004 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1005
1006         PR c++/10891
1007         * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
1008         -fno-rtti. 
1009
1010 2006-01-21  Mark Mitchell  <mark@codesourcery.com>
1011
1012         PR c++/25895
1013         * class.c (build_base_path): Generate a NOP_EXPR instead of a
1014         COMPONENT_REF if the base and derived classes are at the same
1015         address.
1016
1017         PR c++/25856
1018         * decl.c (begin_destructor_body): Robustify.
1019
1020         PR c++/25858 
1021         * parser.c (cp_parser_direct_declarator): Robustify.
1022         
1023 2006-01-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1024
1025         * parser.c (cp_lexer_next_token_is_keyword): Simplify.
1026
1027         * parser.c (clear_decl_specs): Remove prototype.
1028
1029         * parser.c (cp_parser_expression_fn): Remove.
1030
1031         * call.c (add_builtin_candidates): Remove superfluous return.
1032         * name-lookup.c (do_toplevel_using_decl): Likewise.
1033         * parser.c (cp_parser_type_specifier_seq): Likewise.
1034         (cp_parser_save_default_args): Likewise.
1035
1036 2006-01-20  Dirk Mueller  <dmueller@suse.com>
1037
1038         PR c++/5520
1039         * semantics.c (finish_if_stmt): Call empty_body_warning.
1040         * parser.c (cp_parser_implicitly_scoped_statement):
1041         Mark empty statement with an empty stmt.
1042
1043 2006-01-19  Mark Mitchell  <mark@codesourcery.com>
1044
1045         PR c++/22136
1046         * name-lookup.c (do_class_using_decl): Don't try to look up base
1047         classes in templates with dependent base types.
1048
1049 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1050
1051         PR c++/25854
1052         * pt.c (maybe_process_partial_specialization): Return early on
1053         error_mark_node.
1054
1055 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1056
1057         PR c++/16829
1058         * decl.c (start_preparsed_function): Check default arguments
1059         unconditionally.
1060         * name-lookup.c (pushdecl_maybe_friend): Check default arguments
1061         of all functions and function templates.
1062         * parser.c (cp_parser_late_parsing_default_args): Check default
1063         arguments.
1064         * decl2.c (check_default_args): Set missing default arguments to
1065         error_mark_node.
1066
1067 2006-01-18  Mark Mitchell  <mark@codesourcery.com>
1068
1069         PR c++/25836
1070         * cp-tree.h (push_class_stack): New function.
1071         (pop_class_stack): Likewise.
1072         * class.c (class_stack_node): Add hidden field.
1073         (pushclass): Clear it.
1074         (push_class_stack): New function.
1075         (pop_class_stack): Likewise.
1076         (currently_open_class): Ignore hidden classes.
1077         (currently_open_derived_class): Likewise.
1078         * name-lookup.c (push_to_top_level): Call push_class_stack.
1079         (pop_from_top_level): Call pop_class_stack.
1080
1081 2006-01-18  Kazu Hirata  <kazu@codesourcery.com>
1082
1083         * tree.c (find_tree_t, find_tree): Remove.
1084         * cp-tree.h: Remove the prototype for find_tree.
1085
1086 2006-01-18  Jakub Jelinek  <jakub@redhat.com>
1087
1088         * search.c (lookup_conversions_r): Fix a pasto.
1089
1090 2006-01-17  Eric Christopher  <echristo@apple.com>
1091
1092         * call.c (convert_like_real): When issuing conversion
1093         warnings, depend on OPT_Wconversion.
1094         * cvt.c (build_expr_type_conversion): Ditto.
1095
1096 2006-01-17  Kazu Hirata  <kazu@codesourcery.com>
1097
1098         * name-lookup.c (lookup_namespace_name): Remove.
1099         * name-lookup.h: Remove the prototype for
1100         lookup_namespace_name.
1101
1102 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
1103
1104         PR c/25682
1105         * decl.c (compute_array_index_type): After issuing not an integral
1106         constant-expression error, set size to 1 to avoid ICEs later on.
1107
1108 2006-01-16  Ian Lance Taylor  <ian@airs.com>
1109
1110         * parser.c: Include "cgraph.h".
1111         (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
1112         assemble_asm.
1113
1114 2006-01-16  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
1115
1116         * g++spec.c (lang_specific_spec_functions): Remove.
1117
1118 2006-01-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1119
1120         * decl.c (check_initializer): Fix thinko.
1121
1122 2006-01-14  Mark Mitchell  <mark@codesourcery.com>
1123
1124         PR c++/25663
1125         * parser.c (cp_parser_direct_declarator): Use cp_parser_error
1126         instead of error.
1127
1128 2006-01-13  Jason Merrill  <jason@redhat.com>
1129
1130         * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
1131
1132         * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
1133         * pt.c (check_explicit_specialization): Likewise.
1134
1135 2006-01-12  Jason Merrill  <jason@redhat.com>
1136
1137         PR libstdc++/24660
1138         * pt.c (check_explicit_specialization): Handle namespace
1139         association.
1140         * name-lookup.c (set_decl_namespace): Likewise.
1141
1142 2006-01-12  Nathan Sidwell  <nathan@codesourcery.com>
1143
1144         PR c++/24824
1145         * class.c (handle_using_decl): Pass correct scope to
1146         cp_emit_debug_info_for_using.
1147
1148 2006-01-11  Nathan Sidwell  <nathan@codesourcery.com>
1149
1150         PR c++/25386
1151         * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
1152         packedness.
1153
1154 2006-01-06  Gabriel Dos Reis  <gdr@integrablesolutions.net>
1155
1156         * parser.c (cp_parser_primary_expression): Document the grammar
1157         for the built-in offsetof, a GNU extension.
1158
1159 2006-01-04  Zdenek Dvorak <dvorakz@suse.cz>
1160
1161         PR c++/25632
1162         * init.c (constant_value_1): Unshare use of DECL_INITIAL.  Fix a typo
1163         in condition.
1164
1165 2006-01-04  Chris Lattner  <sabre@gnu.org>
1166
1167         * typeck2.c: update copyright to 2006
1168         (split_nonconstant_init_1):  Set TREE_CONSTANT to true.
1169
1170 2006-01-04  Mark Mitchell  <mark@codesourcery.com>
1171
1172         PR c++/24782
1173         * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
1174         checks, even when parsing tentatively.
1175
1176 2006-01-04  Richard Henderson  <rth@redhat.com>
1177
1178         Merge from gomp branch.
1179         * lex.c (handle_pragma_java_exceptions): Fix whitespace.
1180         * parser.c (struct cp_token): Add pragma_kind.
1181         (eof_token): Update to match.
1182         (struct cp_lexer): Add in_pragma; rearrange next for better packing.
1183         (cp_parser_initial_pragma): New.
1184         (cp_lexer_new_main): Use it.  Don't bother clearing
1185         c_lex_return_raw_strings.
1186         (cp_lexer_get_preprocessor_token): Always initialize keyword
1187         and pragma_kind fields.  Handle CPP_PRAGMA.
1188         (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
1189         in_pragma is set.
1190         (cp_lexer_handle_pragma): Remove.  Update callers to cp_parser_pragma.
1191         (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
1192         (cp_parser_skip_to_pragma_eol): New.
1193         (cp_parser_error): Use it.
1194         (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
1195         rearrange with switch statement.
1196         (cp_parser_skip_to_end_of_statement): Likewise.
1197         (cp_parser_skip_to_end_of_block_or_statement): Likewise.
1198         (cp_parser_skip_to_closing_brace): Likewise.
1199         (cp_parser_skip_until_found): Likewise.
1200         (cp_parser_statement): Add in_compound argument; update callers.
1201         Use it to decide how to handle pragma parsing.
1202         (cp_parser_labeled_statement): Add in_compound argument; pass
1203         it on to cp_parser_statement.
1204         (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
1205         (cp_parser_declaration_seq_opt): Likewise.
1206         (cp_parser_parameter_declaration): Likewise.
1207         (cp_parser_member_specification_opt): Likewise.
1208         (cp_parser_function_definition_after_decl): Likewise.
1209         (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
1210         (cp_parser_pragma): New.
1211         (pragma_lex): New.
1212
1213 2006-01-04  Dirk Mueller <dmueller@suse.com>
1214
1215         * decl.c (finish_constructor_body): create simple
1216         compound stmt instead of a if(1) { } construct.
1217
1218 2006-01-03  Mark Mitchell  <mark@codesourcery.com>
1219
1220         PR c++/25492
1221         * name-lookup.c (push_class_level_binding): When a derived class
1222         provides a type binding, eliminate any type binding from a base
1223         class.
1224
1225         PR c++/25625
1226         * repo.c (repo_emit_p): Always instantiate static data members
1227         initialized by constant expressions, so that there values are
1228         available.
1229
1230 2006-01-02  Mark Mitchell  <mark@codesourcery.com>
1231
1232         PR c++/25635
1233         * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
1234         conversion operator.
1235         * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
1236
1237         PR c++/25638
1238         * class.c (add_method): Never associate more than one destructor
1239         with a single class.
1240
1241         PR c++/25637
1242         * cp-tree.h (do_friend): Adjust prototype.
1243         * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
1244         (grokdeclarator): Likewise.  Refine check for invalid
1245         declarations/definitions of member functions outside of their own
1246         class.
1247         * friend.c (do_friend): Make funcdef_flag a bool, not an int.
1248
1249         PR c++/25633
1250         * parser.c (cp_parser_mem_initializer_list): Check result of
1251         cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
1252         (cp_parser_mem_initializer): Return error_mark_node for failure.
1253
1254         PR c++/25634
1255         * parser.c (cp_parser_template_parameter_list): Call
1256         begin_template_parm_list and end_template_parm_list here.
1257         (cp_parser_type_parameter): Not here.
1258         (cp_parser_template_declaration_after_export): Or here.
1259         (cp_parser_elaborated_type_specifier): Call
1260         cp_parser_check_template_parameters.
1261
1262         * tree.c (build_target_expr_with_type): Use force_target_expr.
1263
1264         * decl2.c (mark_used): Fix typo in comment.
1265
1266 2006-01-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1267
1268         * parser.c (cp_parser_using_declaration): Skip name-lookup on
1269         invalid scope.
1270
1271 2005-12-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1272
1273         * cxx-pretty-print.c (pp_cxx_constant): New.  Print
1274         string-literal in parens if input program says so.
1275         (pp_cxx_primary_expression): Hand off constant printing to
1276         pp_cxx_constant.
1277         (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
1278         (pp_cxx_expression): Use pp_cxx_constant for literals.
1279         * error.c (dump_expr): Use pp_constant for literals.
1280
1281 2005-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1282
1283         * method.c (make_thunk): Don't set comdat_linkage here.
1284         (use_thunk): Make thunk one only here, if thunk target is
1285         DECL_ONE_ONLY.
1286
1287 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
1288
1289         PR c++/25439
1290         * decl.c (grokdeclarator): Remove dead code.
1291         * ptree.c (cxx_print_xnode): Handle BASELINK.
1292         * parser.c (make_id_declarator): Add sfk parameter.
1293         (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
1294         make_id_declarator.
1295         (cp_parser_declarator_id): Simplify BASELINKs here.
1296         (cp_parser_member_declaration): Adjust calls to
1297         make_id_declarator.
1298
1299 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
1300
1301         PR c++/23171, c++/23172, c++/25417.
1302         * typeck.c (build_unary_op): Create temporary variables for
1303         compound literals whose addresses are taken.
1304         * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
1305         * decl.c (reshape_init_vector): Likewise.
1306         (reshape_init): Give it external linkage.
1307         (check_initializer): Use COMPOUND_LITERAL_P.
1308         (initialize_artificial_var): Allow the initializer to be a
1309         CONSTRUCTOR.
1310         * call.c (make_temporary_var_for_ref_to_temp): Use
1311         create_temporary_var.
1312         * cp-tree.h (COMPOUND_LITERAL_P): New macro.
1313         (rehape_init): Declare.
1314         * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
1315         * semantics.c (finish_compound_literal): Use reshape_init.
1316
1317 2005-12-23  Mark Mitchell  <mark@codesourcery.com>
1318
1319         PR c++/24671
1320         * pt.c (instantiate_template): Handle SFINAE.
1321
1322 2005-12-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1323
1324         * decl.c (grokdeclarator): Improve diagnostic for friend
1325         declarations of class members.
1326
1327 2005-12-22  Mark Mitchell  <mark@codesourcery.com>
1328
1329         PR c++/25369
1330         * tree.c (really_overloaded_fn): Tweak comment.
1331         * pt.c (tsubst_call_declarator_parms): Remove.
1332         (tsubst_copy): Call mark_used on the member referenced by an
1333         OFFSET_REF.
1334         * semantics.c (finish_qualified_id_expr): Simplify.
1335         * decl2.c (mark_used): Accept BASELINKs.
1336
1337         PR c++/25364
1338         * typeck.c (build_unary_op): Pass DECLs not names to
1339         build_offset_refs.
1340         * init.c (build_offset_ref): Do not do name lookup.  Do not call
1341         mark_used.
1342         * call.c (build_call): Simplify and tidy.
1343         * semantics.c (finish_qualified_id_expr): Call mark_used.
1344
1345 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1346
1347         PR c++/23333
1348         * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
1349         identify a single '0'.
1350
1351 2005-12-20  Mark Mitchell  <mark@codesourcery.com>
1352
1353         PR c++/21228
1354         * decl.c (use_eh_spec_block): New function.
1355         (store_parm_decls): Use it.
1356         (finish_function): Likewise.
1357
1358 2005-12-19  Mark Mitchell  <mark@codesourcery.com>
1359
1360         PR c++/24278
1361         * init.c (expand_member_init): Print messages about baseclasses
1362         using %T rather than %D.
1363
1364         PR c++/24915
1365         * class.c (add_method): Do not treat templates as identical unless
1366         their return types are the same.
1367
1368 2005-12-12  Mark Mitchell  <mark@codesourcery.com>
1369
1370         PR c++/25300
1371         * tree.c (build_qualified_name): Return error_mark_node for
1372         erroneous input.
1373
1374 2005-12-10  Mark Mitchell  <mark@codesourcery.com>
1375
1376         PR c++/25337
1377         * pt.c (tsubst_copy_and_build): Permit dependent types for the
1378         object in a class member access expression.
1379
1380 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1381
1382         PR java/9861
1383         * mangle.c (write_bare_function_type): Mangle return type for
1384         methods of Java classes
1385
1386 2005-12-08  Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1387
1388         * call.c (build_conditional_expr): Print types in error messages.
1389
1390 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1391
1392         * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
1393
1394 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1395
1396         * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
1397
1398 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
1399
1400         * Make-lang.in (c++.all.build, c++.install-normal): Remove.
1401
1402 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
1403
1404         * Make-lang.in: Remove all dependencies on s-gtype.
1405
1406 2005-12-06  Aldy Hernandez  <aldyh@redhat.com>
1407
1408        PR C++/24138
1409         * decl.c (reshape_init_array_1): Handle max_index of -1.
1410
1411 2005-12-06  Roger Sayle  <roger@eyesopen.com>
1412
1413         * typeck.c (build_binary_op): Issue warning if either operand of a
1414         comparison operator is a string literal, except for testing equality
1415         or inequality against NULL.
1416
1417 2005-12-06  Roger Sayle  <roger@eyesopen.com>
1418
1419         PR c++/25263
1420         * decl.c (compute_array_index_type): Check that itype is an
1421         INTEGER_CST node before testing/clearing TREE_OVERFLOW.
1422
1423 2005-12-05  Daniel Berlin  <dberlin@dberlin.org>
1424
1425         * ptree.c (cxx_print_decl): Update to check for decl_common
1426         structure.
1427
1428 2005-12-02  Mark Mitchell  <mark@codesourcery.com>
1429
1430         PR c++/24173
1431         * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
1432         clobbering newdecl.
1433
1434 2005-12-02  Richard Guenther  <rguenther@suse.de>
1435
1436         * semantics.c (simplify_aggr_init_expr): Use buildN instead
1437         of build.
1438
1439 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1440
1441         * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
1442         ggc_realloc.
1443         (cp_parser_template_argument_list): Use XRESIZEVEC instead of
1444         xrealloc.
1445         * class.c (pushclass): Likewise.
1446
1447 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1448
1449         * decl2.c (get_priority_info): Use XNEW, not xmalloc.
1450         * decl.c (push_switch): Likewise.
1451         * lex.c (handle_pragma_implementation): Likewise.
1452         * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
1453         not ggc_alloc.
1454         (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
1455         * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
1456         * g++spec.c (lang_specific_driver): Likewise.
1457         * mangle.c (save_partially_mangled_name): Likewise.
1458         * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
1459         (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
1460         (cp_parser_sizeof_operand): Likewise.
1461         * repo.c (open_repo_file, open_repo_file): Likewise.
1462
1463 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1464
1465         * parser.c (cp_parser_make_typename_type): Call make_typename_type
1466         with tf_none instead of magic value 0.
1467         (cp_parser_explicit_instantiation): Call do_type_instantiation
1468         with tf_error instead of magic value 1.
1469         (cp_parser_elaborated_type_specifier): Call make_typename_type
1470         with tf_error instead of magic value 1.
1471         (cp_parser_class_name): Likewise.
1472         (cp_parser_lookup_name): Likewise.
1473
1474 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1475
1476         * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
1477         not RID_MAX.
1478
1479 2005-11-30  Jason Merrill  <jason@redhat.com>
1480
1481         PR c++/21123
1482         * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
1483         parms in a thunk.
1484
1485 2005-11-30  Ben Elliston  <bje@au.ibm.com>
1486
1487         * typeck.c (build_x_unary_op): Correct spelling in error message.
1488
1489 2005-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1490
1491         PR c++/21166
1492         * class.c (check_field_decls): Only set DECL_PACKED on a field
1493         when its natural alignment is > BITS_PER_UNIT.
1494
1495 2005-11-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1496
1497         PR c++/24979
1498         * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
1499
1500 2005-11-26  Richard Henderson  <rth@redhat.com>
1501
1502         * lex.c: Update for pragma_lex rename.
1503         * parser.c: Likewise.
1504
1505 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1506
1507         PR c++/9278
1508         * decl.c (grokparms): Do not allow typedef-names in a '(void)'
1509         parmlist.
1510
1511 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1512
1513         * typeck2.c (process_init_constructor_union): Remove check for
1514         unnamed union members.
1515
1516 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1517
1518         * name-lookup.c (lookup_name_real): Merge two if's.
1519
1520 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1521
1522         * pt.c (instantiate_class_template): Clean-up.
1523
1524 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1525
1526         * pt.c (template_class_depth_real): Remove. Move functionality to ...
1527         (template_class_depth): ... here, replacing count_specializations
1528         with 0.  Adjust comment.
1529
1530 2005-11-24  Richard Guenther  <rguenther@suse.de>
1531         Dirk Mueller <dmueller@suse.de>
1532
1533         PR c++/14024
1534         * typeck.c (build_reinterpret_cast_1): Use
1535         strict_aliasing_warning.
1536
1537 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1538
1539         PR c++/24235
1540         * pt.c (check_instantiated_args): Reword diagnostic message about
1541         template argument involving local types.
1542
1543 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1544
1545         PR c++/21667
1546         * typeck.c (build_array_ref): Avoid code duplicate.  Use common
1547         C/C++ diagnostic function warn_array_subscript_with_type_char.
1548
1549 2005-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1550
1551         PR c++/22238
1552         * error.c (resolve_virtual_fun_from_obj_type_ref): New.
1553         (dump_expr): Use it in <case CALL_EXPR>.
1554
1555 2005-11-21  Richard Henderson  <rth@redhat.com>
1556
1557         * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
1558
1559         * name-lookup.c (lookup_name): Remove prefer_type argument.
1560         (lookup_name_prefer_type): New.
1561         * decl.c (lookup_and_check_tag): Use them.
1562         * pt.c (tsubst_friend_class): Likewise.
1563         (lookup_template_class): Likewise.
1564         (tsubst_copy_and_build): Likewise.
1565         * name-lookup.h (lookup_name_prefer_type): New.
1566         (lookup_name): Remove declaration.
1567
1568 2005-11-18  Mark Mitchell  <mark@codesourcery.com>
1569
1570         PR c++/8355
1571         * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
1572         set_decl_namespace.
1573         * name-lookup.c (set_decl_namespace):
1574
1575 2005-11-18  Mike Stump  <mrs@apple.com>
1576
1577         * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
1578         * name-lookup.c (lookup_name_two): Remove.
1579         (lookup_name_one): Add.
1580         * name-lookup.h (lookup_name_two): Remove.
1581         (lookup_name_one): Add.
1582
1583 2005-11-15  Jason Merrill  <jason@redhat.com>
1584
1585         PR c++/24580
1586         * method.c (locate_copy): Also use skip_artificial_parms here.
1587         (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
1588         for RECORD_TYPE.
1589         (locate_ctor): Abort if we fail to find a default constructor.
1590
1591 2005-11-15  Mike Stump  <mrs@apple.com>
1592
1593         * name-lookup.c (lookup_name_two): Add.
1594         * name-lookup.h: Likewise.
1595
1596 2005-11-15  Mark Mitchell  <mark@codesourcery.com>
1597
1598         PR c++/24667
1599         * typeck.c (check_for_casting_away_constness): Use the diag_fn.
1600         (build_const_cast_1): Call it, for C-style casts.
1601
1602 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
1603
1604         PR c++/24687
1605         * pt.c (check_explicit_specialization): Don't check for C linkage.
1606         (push_template_decl_real): Likewise.
1607         * parser.c (cp_parser_explicit_specialization): Check here.
1608         (cp_parser_template_declaration_after_export): And here.
1609
1610         * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
1611         field.
1612
1613 2005-11-14  Jason Merrill  <jason@redhat.com>
1614
1615         PR c++/24580
1616         * method.c (locate_ctor): Skip all artificial parms, not just
1617         'this'.
1618
1619 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
1620
1621         * parser.c (eof_token): Add initializer for ambiguous_p.
1622
1623 2005-11-13  Mark Mitchell  <mark@codesourcery.com>
1624
1625         PR c++/24817
1626         * decl.c (check_redeclaration_exception_specification): New
1627         function.
1628         (duplicate_decls): Use it.
1629         * error.c (fndecl_to_string): Print the template parameter list.
1630
1631         PR c++/20293
1632         * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
1633         for namespaces.
1634         (pp_cxx_original_namespace_definition): Likewise.
1635         * name-lookup.c (ambiguous_decl): Don't issue error messages;
1636         instead return lists of ambiguous candidates.
1637         (select_decl): Handle ambiguous namespace lookups.
1638         * parser.c (cp_token): Add ambiguous_p.
1639         (cp_lexer_get_preprocessor_token): Set it.
1640         (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
1641         when a qualified name uses an invalid scope.
1642         (cp_parser_primary_expression): Print ambiguous candidates.
1643         (cp_parser_type_parameter): Adjust comment to reflect new
1644         parameter name for cp_parser_lookup_name.
1645         (cp_parser_template_argument): Likewise.
1646         (cp_parser_elaborated_type_specifier): Likewise.
1647         (cp_parser_namespace_name): Likewise.
1648         (cp_parser_class_name): Print ambiguous candidates.
1649         (cp_parser_lookup_name): Rename ambiguous_p parameter to
1650         ambiguous_decls.  Use it to return a list of ambiguous candiates
1651         when a lookup is ambiguous.
1652         (cp_parser_lookup_name_simple): Adjust comment to reflect new
1653         parameter name for cp_parser_lookup_name.
1654
1655 2005-11-12  Jakub Jelinek  <jakub@redhat.com>
1656
1657         PR c++/24780
1658         * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
1659         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
1660         of array type.
1661
1662         PR c++/24761
1663         * pt.c (tsubst_copy_asm_operands): New function.
1664         (tsubst_expr) <case ASM_EXPR>: Use it.
1665
1666 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
1667
1668         PR c++/19450
1669         * decl.c (redeclaration_error_message): Issue diagnostics about
1670         olddecl and newdecl disagreement on __thread property.
1671         (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
1672
1673 2005-11-08  Jason Merrill  <jason@redhat.com>
1674
1675         PR c++/21123
1676         * method.c (use_thunk): Use build_cplus_new instead of
1677         force_target_expr.
1678
1679 2005-11-06  Jason Merrill  <jason@redhat.com>
1680             James A. Morrison <phython@gcc.gnu.org>
1681
1682         PR c++/17256
1683         * decl2.c (cp_finish_file): Fix conditions for undefined warning.
1684         Set TREE_NO_WARNING instead of TREE_PUBLIC.
1685         * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
1686         a warning on a function we didn't instantiate because of excessive
1687         recursion.
1688
1689 2005-11-06  Mark Mitchell  <mark@codesourcery.com>
1690
1691         * class.c (record_subobject_offsets): Don't record offsets past
1692         biggest empty class for non-empty base classes.
1693         (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
1694         keeping track of the size of emptyclasses.
1695
1696         PR c++/21308
1697         * class.c (sizeof_biggest_empty_class): New variable.
1698         (record_subobject_offsets): Don't record offsets past biggest
1699         empty class for data members.  Replace vbases_p parameter with
1700         is_data_member parameter.
1701         (build_base_field): Adjust call.
1702         (layout_class_type): Likewise.  Maintain
1703         sizeof_biggest_empty_class.
1704
1705 2005-11-05  Kazu Hirata  <kazu@codesourcery.com>
1706
1707         * decl2.c, init.c, typeck.c: Fix comment typos.
1708
1709 2005-11-04  Richard Guenther  <rguenther@suse.de>
1710
1711         PR c++/22487
1712         * init.c (build_vec_init): Build comparison of matching
1713         types.
1714
1715 2005-11-03  Josh Conner  <jconner@apple.com>
1716
1717         PR c++/19989
1718         pt.c (tsubst): Accept zero-length array if tf_error is set
1719         in complain flags.  Change error message for negative-
1720         length array.
1721
1722 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
1723
1724         * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
1725         parameter.
1726
1727 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
1728
1729         PR c++/17964
1730         * error.c (cp_cpp_error): New function.
1731         * cp-tree.h (cp_cpp_error): Declare.
1732         * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
1733         and error callback after lexing.
1734
1735 2005-11-03  Mark Mitchell  <mark@codesourcery.com>
1736
1737         PR c++/21627
1738         * pt.c (register_specialization): Update inline flags on clones.y
1739
1740 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
1741
1742         PR c++/24582
1743         * decl.c (declare_local_label): Return 0 for variables
1744         with error_mark_node as their types.
1745
1746 2005-11-02  Mark Mitchell  <mark@codesourcery.com>
1747
1748         PR c++/22434
1749         * call.c (build_conditional_expr): Do bad conversions, if there's
1750         no other choice.
1751
1752         PR c++/24560
1753         * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
1754         message for use of overloaded functions on LHS of "." operator.
1755
1756         PR c++/19253
1757         * parser.c (cp_parser_postfix_expression): Use
1758         cp_parser_elaborated_type_specifier to handle typename-types in
1759         functional casts.
1760         (cp_parser_enclosed_argument_list): Skip ahead to the end of the
1761         template argument list if the closing ">" is not found.
1762
1763         PR c++/24569
1764         * pt.c (instantiate_decl): Use cp_finish_decl, not
1765         finish_static_data_member_decl.
1766
1767 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
1768
1769         * decl.c (grokfndecl): Remove the setting
1770         of the return type of the function type
1771         of main after erroring about must returning
1772         int.
1773
1774 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
1775
1776         PR C++/23229
1777         * decl.c (grokfndecl): Create a new function type
1778         after erroring out about main not returning int.
1779
1780 2005-10-28  Josh Conner  <jconner@apple.com>
1781
1782         PR c++/22153
1783         * parser.c (cp_parser_member_declaration): Detect and handle
1784         a template specialization.
1785
1786 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
1787
1788         PR C++/23426
1789         * decl.c (start_decl): Check that the decl is an
1790         error_mark_node before getting the type.
1791         Remove the check for the decl's type being an
1792         error_mark_node.
1793
1794 2005-10-21  Mark Mitchell  <mark@codesourcery.com>
1795
1796         PR c++/24260
1797         * parser.c (cp_parser_init_declarator): Pass attributes to
1798         grokfield.
1799
1800 2005-10-20  Mark Mitchell  <mark@codesourcery.com>
1801
1802         PR c++/22618
1803         * search.c (accessible_p): Check access in the outermost set of
1804         template parameters.
1805
1806 2005-10-20  Richard Guenther  <rguenther@suse.de>
1807
1808         * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
1809
1810 2005-10-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1811
1812         PR c++/22293
1813         * decl.c (grokdeclarator): Reject unqualified destructors in
1814         friend declarations.
1815
1816 2005-10-18  Mark Mitchell  <mark@codesourcery.com>
1817
1818         PR c++/23293
1819         * pt.c (convert_template_argument): Use canonical type variants in
1820         template specializations.
1821
1822 2005-10-18  Nathan Sidwell  <nathan@codesourcery.com>
1823
1824         PR c++/21383
1825         * name-lookup.c (arg_assoc): Template args can be null in a
1826         template-id-expr.
1827
1828         PR c++/22604
1829         * class.c (update_vtable_entry_for_fn): Don't process invalid
1830         covariant overriders.
1831
1832         PR c++/23118
1833         * cp-tree.h (add_method): Add return value.
1834         * class.c (add_method): Return success indicator.
1835         * semantics.c (finish_member_declaration): Don't add an invalid
1836         method to the method list.
1837
1838 2005-10-17  Mark Mitchell  <mark@codesourcery.com>
1839
1840         PR c++/21908
1841         * call.c (build_new_method_call): Do not show VTT parameters to
1842         the user.
1843
1844 2005-10-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1845
1846         PR c++/23440
1847         * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
1848         only complain about missing statement.
1849
1850 2005-10-17  Nathan Sidwell  <nathan@codesourcery.com>
1851
1852         PR c++/24386
1853         * cp-tree.h (BASELINK_QUALIFIED_P): New.
1854         * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
1855         * typeck.c (finish_class_member_access_expr): Set it.
1856
1857         PR c++/21353
1858         * decl.c (check_default_argument): Don't check
1859         processing_template_decl or uses_template_parms here.
1860         (grokparms): Only call check_default_argument when not processing
1861         a template decl.
1862         * parser.c (cp_parser_late_parsing_default_arg): Call
1863         check_default_argument when not processing a template decl.
1864
1865 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
1866
1867         PR c++/24389
1868         * decl2.c (mark_used): Use uses_template_parms instead of
1869         dependent_type_p.
1870         * init.c (constant_value_1): Handle uninstantiated templates
1871         specially.
1872         * pt.c (instantiate_decl): Add sanity check.
1873
1874 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
1875
1876         PR c++/22173
1877         * typeck.c (check_template_keyword): Fix thinko.
1878
1879 2005-10-16  Andrew Pinski  <pinskia@physics.uc.edu>
1880
1881         PR c++/23959
1882         * decl.c (pop_switch): Only call c_do_switch_warnings
1883         when not processing templates.
1884
1885 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
1886
1887         PR c++/22173
1888         * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
1889         (check_template_keyword): New function.
1890         (finish_id_expression): Change prototoype.
1891         (finish_qualified_id_expr): Change prototype.
1892         (build_qualified_name): New function.
1893         (finish_class_member_access_expr): Change prototype.
1894         * init.c (build_offset_ref): Use build_qualified_name.
1895         * mangle.c (write_expression): Likewise.
1896         * parser.c (cp_parser_primary_expression): Remove qualifying_class
1897         parameter.  Add address_p and template_arg_p.  Use
1898         build_qualified_name.
1899         (cp_parser_id_expression): Default *template_p to
1900         template_keyword_p.  Check for invalid uses of the template
1901         keyword.
1902         (cp_parser_postfix_expression): Eliminate special handling for
1903         qualified names.  Adjust call to cp_parser_primary_expression.
1904         (cp_parser_postfix_dot_deref_expression): Adjust call to
1905         cp_parser_id_expression and finish_class_member_access_expr.
1906         (cp_parser_template_argument_list): Add comment.
1907         (cp_parser_template_argument): Adjust use of
1908         cp_parser_primary_expression.  Remove call to
1909         finish_qualified_id_expr.
1910         (cp_parser_lookup_name): Use build_qualified_name.
1911         * pt.c (tsubst): Use build_qualified_name.
1912         (tsubst_qualified_id): Likewise.  Adjust call to
1913         finish_qualified_id_expr.
1914         (tsubst_copy): Use build_qualified_name.
1915         (tsubst_copy_and_build): Adjusts call to finish_id_expression and
1916         finish_class_member_access_expr.
1917         * semantics.c (finish_non_static_data_member): Use
1918         build_qualified_name.
1919         (finish_qualified_id_expr): Add template_p and template_arg_p
1920         parameters.
1921         (finish_id_expression): Remove qualifiying_class parameter.  Add
1922         template_p, done, address_p, and template_arg_p.  Use
1923         build_qualified_name.  Adjust calls to
1924         finish_class_member_acess_expr.
1925         * tree.c (build_qualified_name): New function.
1926         * typeck.c (check_template_keyword): New function.
1927         (finish_class_member_access_expr): Add template_p argument.  Check
1928         for invalid uses of the template keyword.
1929
1930 2005-10-15  Mark Mitchell  <mark@codesourcery.com>
1931
1932         PR c++/21347
1933         * class.c (maybe_warn_about_overly_private_class): Lazy
1934         constructors are public.
1935
1936 2005-10-14  Mark Mitchell  <mark@codesourcery.com>
1937
1938         PR c++/19565
1939         * call.c (convert_like_real): Rely on convert_and_check to issue
1940         warnings about overflow and conversion to unsigned.
1941         * decl.c (finish_enum): Use the location of the enumerators, not
1942         the closing brace of the enumeration, when reporting warnings
1943         about conversions.
1944         (build_enumerator): Use error_mark_node for erroneous values.
1945         * typeck2.c (digest_init): Remove reference to "signature pointer"
1946         from comment.
1947
1948 2005-10-14  Nathan Sidwell  <nathan@codesourcery.com>
1949
1950         PR c++/17796
1951         * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
1952         (maybe_clone_body): Track the first clone.
1953
1954 2005-10-13  Nathan Sidwell  <nathan@codesourcery.com>
1955
1956         PR c++/23984
1957         * class.c (build_base_path): The vtable is always the first thing
1958         in the vtt.
1959
1960 2005-10-13  Mark Mitchell  <mark@codesourcery.com>
1961
1962         PR c++/20721
1963         * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
1964         * decl.c (duplicate_decls): Merge it into new declarations.
1965         (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
1966         (cp_finish_decl): Set it, when appropriate.
1967
1968         PR c++/22180
1969         * call.c (build_new_method_call): Correct pretty-printing of
1970         destructor names.
1971         * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
1972         identifier.
1973
1974         PR c++/23694
1975         * decl.c (start_method): Return error_mark_node for errors.
1976
1977         PR c++/23307
1978         * pt.c (push_template_decl_real): Complain about attempts to
1979         declare template variables.
1980
1981         PR c++/22352
1982         * pt.c (tsubst_template_parms): Set processing_template_decl while
1983         processing the parameters.
1984         (tsubst_decl): Set processing_template_decl when substituting into
1985         a TEMPLATE_DECL.
1986
1987         PR c++/22405
1988         * pt.c (most_specialized_instantiation): Robustify.
1989
1990         PR c++/22464
1991         * semantics.c (finish_id_expression): Issue errors about uses of
1992         local variables in containing functions even in templates.
1993
1994 2005-10-12  Danny Smith  <dannysmith@users.sourceforge.net>
1995
1996         PR target/21801
1997         PR target/23589
1998         * class.c (finish_struct_1): Call
1999         targetm.cxx.adjust_class_at_definition.
2000
2001
2002 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2003
2004         PR c++/21592
2005         * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
2006         with already looked up member functions.  Assert we're not
2007         returning a NON_DEPENDENT_EXPR with unknown type.
2008         * typeck.c (finish_class_member_access_expr):  We can get
2009         non-template-id-expr baselinks.  If the lookup finds a baselink,
2010         remember it even inside templates.
2011
2012         PR c++/23797
2013         * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
2014         TYPE_DECL.  Use dependent_type_p to check type.
2015         * pt.c (uses_template_parms_p): Use dependent_type_p for a
2016         TYPE_DECL.
2017         (type_dependent_expression_p): Assert we've not been given a
2018         TYPE_DECL.
2019
2020         PR c++/21117
2021         * decl.c (check_function_type): Correctly overwrite incomplete
2022         return type with void type.
2023         * typeck.c (check_return_expr): If the function's return type is
2024         void, don't try and convert a return expr.
2025
2026 2005-10-12  David Edelsohn  <edelsohn@gnu.org>
2027
2028         PR c++/23730
2029         * call.c (build_object_call): If BINFO is NULL, bypass
2030         lookup_fnfields and set fns to NULL_TREE.
2031
2032 2005-10-12  Paolo Bonzini  <bonzini@gnu.org>
2033
2034         PR c++/24052
2035         * error.c (dump_expr): Pass LABEL_DECL to dump_decl.  Print
2036         an ADDR_EXPR of a LABEL_DECL as &&.
2037
2038 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2039
2040         PR c++/19964
2041         * class.c (walk_subobject_offsets): Don't walk error_mark_node.
2042
2043 2005-10-11  Ian Lance Taylor  <ian@airs.com>
2044
2045         PR c++/8057
2046         * cvt.c (convert_to_void): Don't warn about unused values when
2047         processing a template declaration.
2048
2049 2005-10-11  Mark Mitchell  <mark@codesourcery.com>
2050
2051         PR c++/21089
2052         * call.c (convert_like_real): Use decl_constant_value, not
2053         integral_constant_value.
2054         * init.c (constant_value_1): New function.
2055         (integral_constant_value): Use it.
2056         (decl_constant_value): Likewise.
2057         * typeck.c (decay_conversion): Use decl_constant_value, not
2058         integral_constant_value.
2059
2060         PR c++/21369
2061         * parser.c (cp_parser_elaborated_type_specifier): Don't treat
2062         class types as templates if the type is not appearing as part of a
2063         type definition or declaration.
2064
2065 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
2066
2067         PR c++/24277
2068         * pt.c (instantiate_decl): Call finish_static_data_member_decl for
2069         static data members.
2070
2071 2005-10-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2072             Mark Mitchell  <mark@codesourcery.com>
2073
2074         PR c++/23437
2075         * parser.c (cp_parser_template_argument_list): Do not treat
2076         contents of argument list as part of a constant expression.
2077
2078 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
2079
2080         PR c++/24139
2081         * decl.c (grokdeclarator): Do not require template parameter lists
2082         for explicitly specialized class.
2083         * error.c (dump_aggr_type): Do not dump template arguments for
2084         non-primary specializations.
2085         (dump_function_name): Likewise.
2086
2087         PR c++/24275
2088         * pt.c (instantiate_decl): Instantiate the initializer of
2089         a static data member in the namespace containing the class
2090         containing the static data member.
2091
2092 2005-10-08  James A. Morrison  <phython@gcc.gnu.org>
2093
2094         PR c++/22172
2095         * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
2096         scopes as nondependent.
2097
2098 2005-10-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2099
2100         * call.c (resolve_args): Remove redundant test.
2101
2102 2005-10-05  Paolo Bonzini  <bonzini@gnu.org>
2103
2104         PR tree-optimization/21419
2105         PR tree-optimization/24146
2106         PR tree-optimization/24151
2107
2108         * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
2109         read-only.  Set ASM_VOLATILE_P for asms without outputs.
2110
2111 2005-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2112
2113         PR c++/23513
2114         * call.c (joust): Adjust length count to more_specialized_fn.
2115         * pt.c (more_specialized_fn): Cope with non-static member vs
2116         non-member.
2117
2118 2005-10-04  Andrew Pinski  <pinskia@physics.uc.edu>
2119
2120         PR middle-end/23125
2121         * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
2122         instead of change_decl_assembler_name.
2123
2124 2005-10-03  Alexandre Oliva  <aoliva@redhat.com>
2125
2126         * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
2127
2128 2005-10-03  Mark Mitchell  <mark@codesourcery.com>
2129
2130         PR c++/17775
2131         * repo.c: Include flags.h.
2132         (finish_repo): Add -frandom-seed to the arguments.
2133
2134 2005-10-02  Mark Mitchell  <mark@codesourcery.com>
2135
2136         PR c++/22621
2137         * parser.c (cp_parser_template_argument): Don't turn "T::f" into
2138         "(*this).T::f".
2139         * pt.c (convert_nontype_argument): Remove ??? comment.
2140
2141         PR c++/23840
2142         * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
2143         when class rvalues are lvalues.
2144
2145 2005-09-28  Mark Mitchell  <mark@codesourcery.com>
2146
2147         PR c++/16782
2148         * decl.c (grokdeclarator): Always pedwarn about overqualified
2149         member names.
2150
2151 2005-09-27  Mark Mitchell  <mark@codesourcery.com>
2152
2153         PR c++/22147
2154         * name-lookup.c (maybe_process_template_type_declaration): Don't
2155         treat forward declarations of classes as templates just because
2156         we're processing_template_decl.
2157         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
2158         functions.
2159
2160 2005-09-26  Jason Merrill  <jason@redhat.com>
2161
2162         PR c++/13764
2163         * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
2164         * name-lookup.c (pushdecl_maybe_friend): Check it.
2165         * decl.c (begin_function_body): Do nothing if it's false.
2166         (finish_function_body): Ditto.
2167         (outer_curly_brace_block): New fn.
2168         (finish_function): Use it.
2169
2170 2005-09-26  Richard Guenther  <rguenther@suse.de>
2171
2172         PR middle-end/15855
2173         * decl2.c (do_static_destruction): Remove.
2174         (finish_static_initialization_or_destruction): Likewise.
2175         (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
2176         (NEEDS_GUARD_P): Likewise.
2177         (do_static_initialization): Rename to
2178         do_static_initialization_or_destruction.  Process all
2179         initializers/destructors and handle common conditionalizing.
2180         (start_static_initialization_or_destruction): Rename to
2181         one_static_initialization_or_destruction.  Handle only
2182         decl-specific conditionalizing.
2183         (cp_finish_file): Call do_static_initialization_or_destruction.
2184
2185 2005-09-22  Jakub Jelinek  <jakub@redhat.com>
2186
2187         PR c++/21983
2188         * class.c (find_final_overrider): Move diagnostic about no unique final
2189         overrider to...
2190         (update_vtable_entry_for_fn): ... here.
2191
2192 2005-09-21  Mark Mitchell  <mark@codesourcery.com>
2193
2194         PR c++/23993
2195         * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
2196
2197 2005-09-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2198
2199         PR c++/23965
2200         * call.c (resolve_args): Return error_mark_node on arguments
2201         whose TREE_TYPE is error_mark_node.
2202
2203 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
2204
2205         PR c++/23947
2206         * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
2207         get_tinfo_ptr calls.
2208
2209 2005-09-16  Mark Mitchell  <mark@codesourcery.com>
2210
2211         PR c++/23914
2212         * parser.c (cp_parser_enclosed_template_argument_list): Make sure
2213         skip_evaluation is false when processing template arguments.
2214
2215         PR c++/21514
2216         * pt.c (check_instantiated_args): Treat uses of anonymous types as
2217         causing type-deduction failure.
2218
2219 2005-09-15  Jason Merrill  <jason@redhat.com>
2220
2221         PR c++/23357
2222         * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
2223         tcc_expression.
2224
2225 2005-09-15  Mark Mitchell  <mark@codesourcery.com>
2226
2227         PR c++/23896
2228         * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
2229         processing template arguments.
2230
2231         * pt.c (check_explicit_instantiation_namespace): Fix typo.
2232
2233         PR c++/13140
2234         * decl.c (check_class_member_definition_namespace): New function.
2235         (grokfndecl): Use it.
2236         (grokvardecl): Likewise.
2237         (grokdecl): Improve documentation.
2238         * pt.c (check_explicit_instantiation_namespace): New function.
2239         (register_specialization): Call check_specialization_namespace
2240         when replacing an implicitly instantiated function.
2241         (check_explicit_specialization): Ensure that DECL_CONTEXT is set
2242         correctly for namespace-scope specializations.
2243         (do_decl_instantiation): Use
2244         check_explicit_instantiation_namespace.
2245         (do_type_instantiation): Likewise.
2246
2247 2005-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2248
2249         PR c++/23725
2250         * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
2251
2252 2005-09-13  Bastian Blank <waldi@debian.org>
2253
2254         PR c++/16171
2255         * mangle.c (find_substitution): Do not use special substitutions
2256         for identifiers not in std::.
2257
2258 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
2259
2260         PR c++/23839
2261         * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
2262         for VAR_DECLs.
2263
2264 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
2265
2266         PR c++/23842
2267         * pt.c (tsubst_default_argument): Do treat default argument
2268         expressions as occurring in the context of the function called.
2269
2270 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
2271
2272         PR c++/23841
2273         * parser.c (cp_parser_primary_expression): Recognize the closing
2274         ">" of a template-argument-list after a floating-point literal as
2275         the end of a cast expression.
2276
2277 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
2278
2279         PR c++/23789
2280         * cvt.c (perform_qualification_conversions): Don't create
2281         unnecessary NOP_EXPRs.
2282         * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
2283
2284 2005-09-12  Ian Lance Taylor  <ian@airs.com>
2285
2286         PR g++/7874
2287         * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
2288         bitfield.  Make dummy bitfield one bit smaller.
2289         (DECL_HIDDEN_FRIEND_P): Define.
2290         (pushdecl_maybe_friend): Declare.
2291         (pushdecl_top_level_maybe_friend): Declare.
2292         * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
2293         Change prototype and all callers.  Add assertion that a
2294         DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P.  Set
2295         DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
2296         appropriate.
2297         * name-lookup.c (supplement_binding): Don't ignore a
2298         DECL_HIDDEN_FRIEND_P.
2299         (pushdecl_maybe_friend): Break out contents of pushdecl.  Add
2300         is_friend parameter.  Set DECL_ANTICIPATED and
2301         DECL_HIDDEN_FRIEND_P for a friend function.
2302         (pushdecl): Just call pushdecl_maybe_friend.
2303         (pushdecl_with_scope): Add is_friend parameter.  Change prototype
2304         and all callers.
2305         (pushdecl_namespace_level): Likewise.
2306         (push_overloaded_decl): Likewise.  Check DECL_HIDDEN_FRIEND_P as
2307         well as DECL_ANTICIPATED when checking for a builtin.
2308         (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
2309         DECL_ANTICIPATED when checking for a builtin.
2310         (do_nonmember_using_decl): Likewise.
2311         (pushdecl_top_level_1): Add is_friend parameter.  Change all
2312         callers.
2313         (pushdecl_top_level_maybe_friend): New function.
2314         (remove_hidden_names): New function.
2315         (struct arg_lookup): Add args field.
2316         (friend_of_associated_class_p): New static function.
2317         (arg_assoc_namespace): Ignore hidden functions which are not
2318         friends of an associated class of some argument.
2319         (lookup_arg_dependent): Remove hidden functions from list passed
2320         in.  Initialize k.args.
2321         * name-lookup.h (remove_hidden_names): Declare.
2322         * friend.c (do_friend): Call pushdecl_maybe_friend instead of
2323         pushdecl.
2324         * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
2325         an assertion, with a check for DECL_HIDDEN_FRIEND_P.
2326         (build_new_function_call): Add koenig_p parameter.  Change
2327         prototype and callers.
2328         * pt.c (register_specialization): Add is_friend parameter.  Change
2329         all callers.
2330         (push_template_decl_real): Change is_friend parameter to bool.
2331         Change prototype and all callers.
2332         (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
2333         instead of pushdecl_top_level.
2334
2335 2005-09-11  Richard Henderson  <rth@redhat.com>
2336
2337         * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
2338         * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
2339
2340 2005-09-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2341
2342         * parser.c (cp_parser_translation_unit): Simplify.  The while-block
2343         was actually executed at most once.
2344
2345 2005-09-09  Richard Henderson  <rth@redhat.com>
2346
2347         PR debug/20998
2348         * cp-tree.def (ALIAS_DECL): Remove.
2349         * cp-lang.c (cp_init_ts): Remove support for it.
2350         * error.c (dump_decl): Likewise.
2351         * name-lookup.c (pushdecl): Likewise.
2352         * semantics.c (finish_id_expression): Likewise.
2353         * decl2.c (build_anon_union_vars): Use a VAR_DECL with
2354         DECL_VALUE_EXPR instead.
2355
2356 2005-09-09  Mark Mitchell  <mark@codesourcery.com>
2357
2358         PR c++/22252
2359         * decl.c (start_preparsed_function): Do not pay attention to
2360         #pragma interface for implicitly-defined methods.
2361         * decl2.c (cp_finish_file): Do not complain about uses of inline
2362         functions that have bodies, even if we decided not to emit the
2363         body in this translation unit.
2364         * semantics.c (note_decl_for_pch): Do not mess with linkage.
2365         (expand_or_defer_fn): Make inline, non-template functions COMDAT
2366         at this point.
2367
2368 2005-09-08  Richard Henderson  <rth@redhat.com>
2369
2370         PR debug/23190
2371         * decl.c (wrapup_globals_for_namespace): Call
2372         emit_debug_global_declarations.
2373         * decl2.c (cp_finish_file): Likewise.
2374
2375 2005-09-08  Mark Mitchell  <mark@codesourcery.com>
2376
2377         PR c++/23691
2378         * decl2.c (mark_used): Instantiate static data members initialized
2379         by constants, even in a template.
2380
2381 2005-09-08  Andrew Pinski  <pinskia@physics.uc.edu>
2382
2383         PR obj-c++/16816
2384         * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
2385         two CPP_COLON.
2386
2387 2005-09-07  Richard Guenther  <rguenther@suse.de>
2388
2389         * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
2390         for EMPTY_CLASS_EXPR.
2391
2392 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
2393
2394         PR c/23075
2395         * typeck.c (check_return_expr): Add no_warning argument.  Set
2396         *no_warning to true if "return-statement with no value, in function
2397         returning" warning has been issued.
2398         * cp-tree.h (check_return_expr): Adjust prototype.
2399         * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
2400         check_return_expr set *no_warning to true.
2401
2402 2005-09-06  Mark Mitchell  <mark@codesourcery.com>
2403
2404         * cp-tree.h (rvalue): New function.
2405         * call.c (build_conditional_expr): Use it.
2406         * init.c (build_new_1): Likewise.
2407         * rtti.c (build_dynamic_cast_1): Likewise.
2408         * tree.c (rvalue): New function.
2409         * typeck.c (build_unary_op): Use it.
2410         (build_static_cast_1): Likewise.
2411
2412         PR c++/9782
2413         * init.c (build_new_1): Make sure the entire array type is
2414         complete, not just its element types.
2415
2416 2005-09-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2417
2418         * decl.c (check_elaborated_type_specifier): Remove redundant check.
2419
2420 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
2421
2422         PR c++/23056
2423         * typeck.c (ignore_overflows): New helper function.
2424         (build_static_cast_1): Use it.
2425
2426 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
2427
2428         * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
2429         Follow spelling conventions.
2430
2431 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
2432
2433         PR c++/23667
2434         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
2435         copying a VAR_DECL.
2436
2437 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
2438
2439         PR c++/21440
2440         * semantics.c (finish_stmt_expr_expr): Add an explicit
2441         initialization to the last statement in the statement-expression.
2442         * (finish_stmt_expr): Adjust accordingly.
2443
2444 2005-09-03  Mark Mitchell  <mark@codesourcery.com>
2445
2446         PR c++/23699
2447         * decl2.c (mark_used): Always instantiate static data members
2448         initialized by constant expressions.
2449         * pt.c (instantiate_decl): Instantiate the initializers for static
2450         data members initialized by constant expressions.
2451
2452         PR c++/21687
2453         * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
2454         finishing processing for a template function in a local class.
2455         Revert:
2456         2005-09-02  Mark Mitchell  <mark@codesourcery.com>
2457         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
2458         around functions in local classes.
2459
2460 2005-09-02  Mark Mitchell  <mark@codesourcery.com>
2461
2462         PR c++/21687
2463         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
2464         around functions in local classes.
2465
2466 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
2467
2468         PR obj-c++/23640
2469         * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
2470         init, call generate_ctor_or_dtor_function.
2471
2472 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2473
2474         PR c++/13377
2475         * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
2476         lookup_name_real on final parse.
2477
2478 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2479
2480         PR c++/23639
2481         * semantics.c (qualified_name_lookup_error): Do not complain again
2482         on invalid scope.
2483
2484 2005-08-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2485
2486         PR c++/23586
2487         * parser.c (cp_parser_namespace_name): Move diagnostic for
2488         invalid namespace-name to here from ...
2489         * name-lookup.c (do_namespace_alias): ... here and ...
2490         (do_using_directive): ... here.  Remove dead code.
2491
2492 2005-08-28  Mark Mitchell  <mark@codesourcery.com>
2493
2494         PR c++/23099
2495         * cp-tree.h (saved_scope): Add skip_evaluation.
2496         * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
2497         DECL_INITIAL, to determine whether or not a static data member was
2498         initialized in the class-specifier.
2499         (cp_finish_decl): Add comment.
2500         * init.c (integral_constant_value): Subtitute into the
2501         initializers for static data members in templates.
2502         * name-lookup.c (push_to_top_level): Save skip_evaluation.
2503         (pop_from_top_level): Restore it.
2504         * pt.c (instantiate_class_template): Do not substitute into the
2505         intializers of static data members when instantiating a class.
2506         (regenerate_decl_from_template): Simplify.
2507         (instantiate_decl): Tidy.  Substitute into the initializer for a
2508         static data member even when the definition of the data member is
2509         not available.
2510
2511 2005-08-26  Mark Mitchell  <mark@codesourcery.com>
2512
2513         PR c++/19004
2514         * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
2515         (type_dependent_expression_p): Allow BASELINKs whose associated
2516         functions are simply a FUNCTION_DECL.
2517
2518         PR c++/23491
2519         * cp-tree.h (build_vec_init): Adjust prototype.
2520         * init.c (perform_member_init): Adjust call to build_vec_init.
2521         (build_aggr_init): Likewise.
2522         (build_new_1): Do not call build_default_init for array types.
2523         (build_vec_init): Add explicit_default_init_p parameter.  Perform
2524         default initialization of vector elements when set.
2525         * typeck.c (build_modify_expr): Adjust call to build_vec_init.
2526
2527 2005-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2528
2529         PR c++/20817
2530         * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
2531         ->*.
2532
2533 2005-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2534
2535         PR c++/22454
2536         * parser.c (cp_lexer_peek_nth_token): Relax assert.
2537
2538 2005-08-23  Nathan Sidwell  <nathan@codesourcery.com>
2539
2540         PR c++/23044
2541         * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
2542
2543 2005-08-22  James E Wilson  <wilson@specifix.com>
2544
2545         PR tree-optimization/23426
2546         * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
2547         array size check.
2548
2549 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2550
2551         PR c++/22233
2552         * pt.c (push_template_decl_real): Return error_mark_node if the
2553         number of template parameters does not match previous definition.
2554
2555 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2556
2557         PR c++/23089
2558         * decl.c (require_complete_types_for_parms): Mark incomplete types
2559         as invalid.
2560
2561 2005-08-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2562
2563         * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
2564         Fix typo in leading comment.
2565
2566 2005-08-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2567
2568         * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
2569
2570 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
2571
2572         * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
2573         * call.c (add_template_candidate_real): Pass down 'flags' to
2574         fn_type_unification.
2575         (can_convert_arg): New 'flags' argument. Pass it to call to
2576         implicit_conversion instead of LOOKUP_NORMAL.
2577         (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
2578         * class.c (resolve_address_of_overloaded_function): Ditto.
2579         (resolve_address_of_overloaded_function): Ditto.
2580         * decl.c (reshape_init, check_default_argument): Ditto.
2581         * typeck.c (build_ptrmemfunc): Ditto.
2582         * pt.c (type_unification_real): Add 'flags' argument.
2583         (fn_type_unification): Pass 'flags' to type_unification_real.
2584         (type_unification_real): Pass new 'flags' argument to call to
2585         can_convert_arg.
2586
2587 2005-08-12  Giovanni Bajo  <giovannibajo@libero.it>
2588             Nathan Sidwell  <nathan@codesourcery.com>
2589
2590         PR c++/21799
2591         PR c++/8271
2592         * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
2593         explicitly.
2594
2595 2005-08-12  Nathan Sidwell  <nathan@codesourcery.com>
2596
2597         PR c++/21799
2598         Revert my 2005-07-08 patch
2599         * pt.c (type_unification_real): Remove is_method_argument and
2600         assoicated checks.
2601         (fn_type_unification, unify): Adjust type_unification_real calls.
2602
2603 2005-08-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2604
2605         PR c++/23266
2606         * decl2.c (grokfield): Check that method is not static before
2607         marking it as pure.
2608
2609 2005-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2610
2611         PR c++/23219
2612         * name-lookup.c (pushtag): Process the template type before
2613         altering the identifier lookup fields.  Remove unreachable code
2614         creating an empty stub decl.
2615
2616 2005-08-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2617
2618         PR c++/20646
2619         * decl.c (grokdeclarator): Reset storage_class after error.
2620
2621 2005-08-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2622
2623         PR c++/22508
2624         * init.c (build_new_1): Check for empty candidate list.
2625
2626 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2627
2628         PR c++/23191
2629         * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
2630         before calling build_exception_variant.
2631
2632 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2633
2634         PR c++/19498
2635         * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
2636         if substitution of template args did not succeed.
2637
2638 2005-08-06  Michael Matz  <matz@suse.de>
2639
2640         * method.c (use_thunk): Call init_insn_lengths.
2641
2642 2005-08-05  James A. Morrison  <phython@gcc.gnu.org>
2643
2644         PR c++/22514
2645         * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
2646         sorrycount or errorcount are nonzero.
2647
2648 2005-08-05  Mark Mitchell  <mark@codesourcery.com>
2649
2650         * name-lookup.c (pushtag): Remove accidental commit from:
2651         2004-12-21  Mark Mitchell  <mark@codesourcery.com>
2652         PR c++/19063
2653         * decl.c (grokdeclarator): Return error_mark_node, not
2654         void_type_node, to indicate errors.
2655         * parser.c (cp_parser_template_parameter_list): Robustify.
2656         (cp_parser_template_parameter): Likewise.
2657
2658 2005-08-01  Kazu Hirata  <kazu@codesourcery.com>
2659
2660         * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
2661         Fix comment typos.
2662
2663 2005-07-29  Kazu Hirata  <kazu@codesourcery.com>
2664
2665         * method.c: Fix a comment typo.
2666
2667 2005-07-28  Mark Mitchell  <mark@codesourcery.com>
2668
2669         PR c++/22545
2670         * call.c (add_builtin_candidate): Adjust for changes in
2671         representation of pointer-to-member types.
2672
2673 2005-07-28  Mike Stump  <mrs@apple.com>
2674
2675         * pt.c (check_explicit_specialization): Add visibility logic.
2676         (lookup_template_class): Likewise.
2677         (instantiate_class_template): Likewise.
2678
2679 2005-07-27  Devang Patel  <dpatel@apple.com>
2680
2681         * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
2682
2683 2005-07-25  Ian Lance Taylor  <ian@airs.com>
2684
2685         * ptree.c (cxx_print_identifier): Print a leading space if the
2686         indent level is 0.
2687
2688 2005-07-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2689
2690         * call.c (convert_for_arg_passing): Check function pointers when
2691         -Wmissing-format-attribute is activated.
2692         * typeck.c (convert_for_assignment): Likewise.
2693
2694 2005-07-22  Manfred Hollstein  <mh@suse.com>
2695
2696         * parser.c (cp_parser_declaration): Fix unitialised warnings.
2697
2698 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
2699
2700         * class.c (build_base_path): Fix typo.
2701
2702 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
2703
2704         PR C++/22358
2705         * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
2706
2707 2005-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2708
2709         * call.c: Fix comment typo(s).
2710         * cxx-pretty-print.h: Likewise.
2711         * name-lookup.c: Likewise.
2712         * parser.c: Likewise.
2713
2714 2005-07-20  Douglas Gregor <doug.gregor@gmail.com>
2715
2716         PR c++/2922
2717         * semantics.c (perform_koenig_lookup): For dependent calls, just
2718         return the set of functions we've found so far. Later, it will be
2719         augmented by those found through argument-dependent lookup.
2720         * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing
2721         the optimization that skips namespaces where the functions were
2722         originally found.
2723
2724 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
2725
2726         Make CONSTRUCTOR use VEC to store initializers.
2727         * call.c (convert_default_arg): Update call to digest_init.
2728         * class.c (dump_class_hierarchy, dump_array): Update to cope with
2729         VEC in CONSTRUCTOR_ELTS.
2730         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
2731         (finish_compound_literal, digest_init): Update declaration.
2732         * decl.c (struct reshape_iter): New data type.
2733         (reshape_init_array): Rename to...
2734         (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
2735         (reshape_init): Rewrite from scratch. Split parts into...
2736         (reshape_init_array, reshape_init_vector, reshape_init_class,
2737         reshape_init_r): New functions.
2738         (check_initializer): Update call to reshape_init. Remove obsolete
2739         code.
2740         (initialize_artificial_var, cp_complete_array_type): Update to cope
2741         with VEC in CONSTRUCTOR_ELTS.
2742         * decl2.c (grokfield): Update calls to digest_init.
2743         (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
2744         * error.c (dump_expr_init_vec): New function.
2745         (dump_expr): Use dump_expr_init_vec.
2746         * init.c (build_zero_init, build_vec_init): Update to cope with VEC
2747         in CONSTRUCTOR_ELTS.
2748         (expand_default_init): Update call to digest_init.
2749         * parser.c  (cp_parser_postfix_expression): Use a VEC for the
2750         initializers.
2751         (cp_parser_initializer_list): Build a VEC of initializers.
2752         * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
2753         in CONSTRUCTOR_ELTS.
2754         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
2755         ptm_initializer, class_initializer, get_pseudo_ti_init): Use
2756         build_constructor_from_list instead of build_constructor.
2757         * semantics.c (finish_compound_literal): Update call to digest_init.
2758         * tree.c (stabilize_init): Update to cope with VEC in
2759         CONSTRUCTOR_ELTS.
2760         * typeck.c (build_ptrmemfunc1): Likewise.
2761         * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
2762         Likewise.
2763         (store_init_value): Use build_constructor_from_list and update call
2764         to digest_init.
2765         (digest_init): Rewrite.
2766         (process_init_constructor): Rewrite from scratch. Split into...
2767         (process_init_constructor_array, picflag_from_initializer,
2768         process_init_constructor_record, process_init_constructor_union):
2769         New functions.
2770         (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
2771         New macros.
2772         (build_functional_cast): Use build_constructor_from_list instead of
2773         build_constructor.
2774
2775 2005-07-18  Mark Mitchell  <mark@codesourcery.com>
2776
2777         PR c++/22263
2778         * cp-tree.h (instantiate_decl): Change prototype.
2779         * decl2.c (mark_used): Adjust accordingly.
2780         * pt.c (do_decl_instantiation): Likewise.
2781         (instantiate_class_member): Likewise.
2782         (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p.
2783         Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template
2784         that has no definition available.
2785         (instantiate_pending_templates): Adjust call to instantiate_decl.
2786
2787 2005-07-17  Mark Mitchell  <mark@codesourcery.com>
2788
2789         PR c++/22139
2790         * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation.
2791         * decl.c (duplicate_decls): Re-register template specializations
2792         for functions that have DECL_TEMLPLATE_INFO, even if they do not
2793         have DECL_TEMPLATE_INSTANTIATION set.
2794
2795 2005-07-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2796
2797         * call.c (diagnostic_fn_t): New.
2798         (build_temp, convert_like_real): Use diagnostic_fn_t.
2799
2800 2005-07-15  Mark Mitchell  <mark@codesourcery.com>
2801
2802         PR c++/22204
2803         * repo.c (repo_emit_p): Robustify.
2804
2805 2005-07-14  Daniel Berlin  <dberlin@dberlin.org>
2806
2807         Fix PR c++/22452
2808         * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
2809
2810 2005-07-15  Mark Mitchell  <mark@codesourcery.com>
2811
2812         PR c++/22132
2813         * call.c (implicit_conversion): Add c_cast_p parameter.
2814         (standard_conversion): Likewise.  Allow conversions between
2815         differently-qualified pointer types when performing a C-style
2816         cast.
2817         (add_function_candidate): Adjust callee.
2818         (build_builtin_candidate): Likewise.
2819         (build_user_type_conversion_1): Likewise.
2820         (conditional_conversion): Likewise.
2821         (can_convert_arg): Likewise.
2822         (can_convert_arg_bad): Likewise.
2823         (perform_implicit_conversion): Likewise.
2824         * cp-tree.h (comp_ptr_ttypes_const): Declare.
2825         * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
2826         Return bool.
2827
2828 2005-07-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2829             Nathan Sidwell  <nathan@codesourcery.com>
2830
2831         PR c++/20172
2832         * pt.c (tsubst_template_parms): Check for invalid non-type
2833         parameters.
2834
2835 2005-07-09  Andrew Pinski  <pinskia@physics.uc.edu>
2836
2837         * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
2838         decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
2839         (cp_init_ts): Call init_shadowed_var_for_decl.
2840         Remove include of gt-cp-cp-lang.h.
2841         * cp-objcp-common.c (shadowed_var_for_decl,
2842         decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
2843         cp-lang.c.
2844         (init_shadowed_var_for_decl): New function to initialize
2845         shadowed_var_for_decl.
2846         Include gt-cp-cp-objcp-common.h.
2847         * Make-lang.in (gt-cp-lang.h): Remove.
2848         (gt-cp-cp-objcp-common.h): Add.
2849         (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
2850         (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
2851         * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
2852         * cp-tree (init_shadowed_var_for_decl): Add prototype.
2853
2854 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2855
2856         * Make-lang.in: Add gt-cp-lang.h.
2857         (cp-lang.o): Ditto.
2858         * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
2859         the field.
2860         * config-lang.in: Add cp-lang.c to gtfiles.
2861         * cp-lang.c: Include hashtab.h.
2862         (cp_init_ts): New function.
2863         (LANG_HOOK_INIT_TS): Use macro.
2864         (decl_shadowed_for_var_lookup): New function.
2865         (decl_shadowed_for_var_insert): Ditto.
2866         * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
2867         (NON_THUNK_FUNCTION_CHECK): Ditto.
2868         (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
2869         (DECL_INIT_PRIORITY): Ditto.
2870         (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
2871         (DECL_SHADOWED_FOR_VAR): Use hashtable.
2872         (SET_DECL_SHADOWED_FOR_VAR): Ditto.
2873         * decl.c (duplicate_decls): Update for new/updated structures.
2874         (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
2875         * decl2.c (start_static_initialization_or_destruction): Deal with
2876         priority.
2877         * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
2878         SET_DECL_RTL.
2879         * tree.c (handle_init_priority_attribute): Handle priority.
2880
2881 2005-07-08  Nathan Sidwell  <nathan@codesourcery.com>
2882
2883         PR c++/21799
2884         * pt.c (type_unification_real): Add is_method argument.  Use it
2885         for this pointer unification.
2886         (fn_type_unification): Adjust type_unification_real call.
2887         (unify): Likewise.
2888
2889 2005-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2890
2891         * pt.c (type_unification_real): Remove allow_incomplete argument.
2892         Remove unreachable code.
2893         (fn_type_unification): Adjust call to type_unification_real.
2894         (unify): Likewise.
2895
2896 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
2897
2898         * Makefile.in (class.o, decl2.o): Adjust dependencies.
2899         * class.c: Include tree-dump.h.
2900         * decl2.c: Include tree-dump.h.
2901
2902 2005-07-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2903
2904         * dump.c: Use dump_string_field.
2905
2906 2005-07-03  Joseph S. Myers  <joseph@codesourcery.com>
2907
2908         * cp-tree.h (GCC_DIAG_STYLE): #undef before defining.  Change
2909         minimum GCC version for format checking to 4.1.
2910
2911 2005-07-02  Kazu Hirata  <kazu@codesourcery.com>
2912
2913         * Make-lang.in (cc1plus-checksum.c): Use
2914         build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
2915
2916 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2917
2918         * name-lookup.c, parser.c: Use %q, %< and %> to quote in
2919         diagnostics.
2920
2921 2005-07-02  Zack Weinberg  <zack@codesourcery.com>
2922             Joseph S. Myers  <joseph@codesourcery.com>
2923
2924         * error.c (location_of): Add comment.
2925         (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
2926         * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
2927         * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
2928         name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
2929         typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
2930         or cp_pedwarn_at.  Mark up some diagnostic strings with N_.
2931
2932 2005-06-30  Daniel Berlin  <dberlin@dberlin.org>
2933
2934         * decl.c (require_complete_types_for_parms): Call relayout_decl
2935         instead of layout_decl.
2936
2937 2005-06-30  Zack Weinberg  <zack@codesourcery.com>
2938             Jakub Jelinek  <jakub@redhat.com>
2939
2940         * cp-lang.c: No need to include cxx-pretty-print.h.
2941         * error.c (cp_printer): Update signature.  No need to process
2942         flags.
2943         (print_instantiation_partial_context): Output last newline
2944         with pp_base_newline.
2945         * Make-lang.in: Update dependencies.
2946
2947 2005-06-30  Steven Bosscher  <stevenb@suse.de>
2948
2949         * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
2950         DECL_THREAD_LOCAL_P.
2951         (cp_finish_decl): Likewise.
2952         (grokvardecl): Set the default DECL_TLS_MODEL here.
2953
2954 2005-06-28  Joseph S. Myers  <joseph@codesourcery.com>
2955
2956         * cvt.c (ocp_convert): Use invalid_conversion hook.
2957         * typeck.c (build_binary_op): Use invalid_binary_op hook.
2958         (build_unary_op): Use invalid_unary_op hook.
2959
2960 2005-06-28  Paul Brook  <paul@codesourcery.com>
2961
2962         * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
2963         * except.c: Include target.h.
2964         (init_exception_processing): Initialize unwind_resume_libfunc.
2965         * doc/tm.texi: Document TARGET_ASM_TTYPE
2966
2967 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2968
2969         * call.c (build_over_call): Pass in named argument list to
2970         `check_function_arguments'.
2971         * typeck.c (build_function_call): Likewise.
2972
2973 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2974
2975         * cp-tree.h (lang_check_failed): Add noreturn attribute.
2976
2977 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
2978
2979         * all files: Update FSF address in copyright headers.
2980
2981 2005-06-23  Jason Merrill  <jason@redhat.com>
2982
2983         PR c++/19317
2984         * semantics.c (simplify_aggr_init_expr): Use
2985         CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2986
2987 2005-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2988
2989         * pt.c (register_specialization): Remove superfluous assertion.
2990
2991 2005-06-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2992
2993         * call.c (convert_like_real): Add format attribute.
2994         * typeck.c (check_for_casting_away_constness,
2995         build_static_cast_1): Likewise.
2996         * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
2997         Likewise.
2998
2999 2005-06-17  Geoffrey Keating  <geoffk@apple.com>
3000
3001         PR c++/17413
3002         * pt.c (type_unification_real): Apply template type deduction even
3003         to procedure parameters that are not dependent on a template
3004         parameter.
3005
3006 2005-06-16  Nathan Sidwell  <nathan@codesourcery.com>
3007
3008         * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
3009         change.
3010         (create_pseudo_type_info): First parameter is an int.
3011
3012 2005-06-15  Nathan Sidwell  <nathan@codesourcery.com>
3013
3014         PR c++/20678
3015         * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
3016         null.
3017
3018         * Make-lang.in: Reformat some long lines.
3019         (gt-cp-rtti.h): New target.
3020         (cp/rtti.o): Add dependency.
3021         * config-lang.in (gtfiles): Add cp/rtti.c.
3022         * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
3023         CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
3024         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
3025         CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
3026         CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
3027         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
3028         ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
3029         class_desc_type_node, si_class_desc_type_node,
3030         vmi_class_desc_type_node, ptm_desc_type_node,
3031         base_desc_type_node): Remove.
3032         * decl.c: Adjust documentation of global trees.
3033         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
3034         TINFO_REAL_NAME): Remove.
3035         (struct tinfo_s): New.
3036         (enum tinfo_kind): New.
3037         (tinfo_descs): New.
3038         (get_tinfo_decl): Adjust use of tinfo descriptor.
3039         (tinfo_base_init, generic_initializer, ptr_initializer,
3040         ptm_initializer, class_initializer): Likewise.
3041         (get_pseudo_ti_init): Take descriptor index. Adjust.
3042         (create_pseudo_type_info): Likewise.
3043         (get_pseudo_ti_desc): Return descriptor index. Adjust.
3044         (create_tinfo_types): Adjust use of create_pseudo_type_info.
3045         (emit_tinfo_decl): Adjust use of tinfo descriptor.
3046
3047 2005-06-14  Roger Sayle  <roger@eyesopen.com>
3048
3049         * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
3050
3051 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3052
3053         * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
3054         (rule for installing g++.1 manpage): Does depend on installdirs.
3055
3056 2005-06-13  Nathan Sidwell  <nathan@codesourcery.com>
3057
3058         PR c++/20789
3059         * decl.c (cp_finish_decl): Clear runtime runtime initialization if
3060         in-class decl's initializer is bad.
3061
3062         PR c++/21929
3063         * parser.c (struct cp_parser): Document that scope could be
3064         error_mark.
3065         (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
3066         scope.
3067         (cp_parser_nested_name_specifier): Return NULL_TREE on error.
3068         (cp_parser_postfix_expression): Deal with null or error_mark
3069         scope.
3070         (cp_parser_elaborated_type_specifier): Adjust
3071         cp_parser_nested_name_specifier call.
3072
3073         * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
3074
3075 2005-06-12  Roger Sayle  <roger@eyesopen.com>
3076
3077         PR c++/21930
3078         * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
3079         Treat CONVERT_EXPR identically to NOP_EXPR.
3080
3081 2005-06-10  Aldy Hernandez  <aldyh@redhat.com>
3082
3083         PR c++/10611
3084         * cvt.c (build_expr_type_conversion): Same.
3085         * typeck.c (build_binary_op): Handle vectors.
3086         (common_type): Same.
3087         (type_after_usual_arithmetic_conversions): Same.
3088
3089 2005-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3090
3091         PR c++/19497
3092         * cp-tree.def (USING_DECL): Update documentation.
3093         * cp-tree.h (DECL_DEPENDENT_P): New.
3094         (USING_DECL_DECLS, USING_DECL_SCOPE): New.
3095         * class.c (handle_using_decl): Move most of the processing to ...
3096         * name-lookup.c (do_class_using_decl): ... here.  Make stricter.
3097         (push_using_decl): Use USING_DECL_SCOPE.
3098         (cp_emit_debug_info_for_using): Make extern.
3099         * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
3100         * name-lookup.h (cp_emit_debug_info_for_using): Declare.
3101         * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
3102         when tsubsting.
3103         (tsubst_expr): Use USING_DECL_SCOPE.
3104         * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
3105         * semantics.c (finish_member_declaration): Likewise.
3106
3107 2005-06-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3108
3109         PR c++/19894
3110         * pt.c (tsubst): Reject pointer-to-member of type void.
3111
3112         PR c++/20563
3113         * parser.c (cp_parser_label_declaration): Deal with invalid/missing
3114         identifiers.
3115
3116 2005-06-07  Nathan Sidwell  <nathan@codesourcery.com>
3117
3118         * cp-tree.def (DEFAULT_ARG): Adjust documentation.
3119         * cp-tree.h (DEFARG_INSTANTIATIONS): New.
3120         (struct tree_default_arg): Add instantiations member.
3121         * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
3122         VEC.
3123         * pt.c (tsubst_arg_types): Likewise.
3124
3125         * parser.c (cp_parser_late_parsing_default_args): Fix overeager
3126         assert in previous patch.
3127
3128 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
3129
3130         * error.c (locate_error): Use gmsgid instead of msgid for argument
3131         name.
3132         (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
3133
3134 2005-06-06  Nathan Sidwell  <nathan@codesourcery.com>
3135
3136         PR 21903
3137         * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
3138         * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
3139         argument to any early instantiations.
3140         * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
3141
3142         PR c++/20637
3143         * cp-tree.h (add_method): Add using_decl parameter.
3144         * class.c (add_method): Add using_decl parameter.  Adjust error
3145         messages.
3146         (handle_using_decl): Pass the using decl to add_method.
3147         (clone_function_decl): Adjust add_member calls.
3148         * decl2.c (check_classfn): Likewise.
3149         * method.c (lazily_declare_fn): Likewise.
3150         * semantics.c (finish_member_declaration): Likewise.
3151
3152         * method.c (synthesize_method): Use inform, not warning.
3153
3154 2005-06-06  Hans-Peter Nilsson  <hp@axis.se>
3155
3156         * config-lang.in (target_libs): Remove target-gperf.
3157
3158 2005-06-05  Mark Mitchell  <mark@codesourcery.com>
3159
3160         PR c++/21619
3161         * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
3162         * parser.c (cp_parser_postfix_expression): Allow non-constant
3163         expressions as arguments to __builtin_constant_p.
3164         * tree.c (builtin_valid_in_constant_expr_p): Use
3165         DECL_IS_BUILTIN_CONSTANT_P.
3166
3167 2005-06-03  Mark Mitchell  <mark@codesourcery.com>
3168
3169         PR c++/21853
3170         * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
3171         the pointed-to type for a pointer-to-member.
3172
3173         PR c++/21336
3174         * cp-tree.h (grok_op_properties): Remove friendp parameter.
3175         * decl.c (grokfndecl): Adjust call.
3176         (grok_op_properties): Determine the class of which the function is
3177         a member by looking at its DECL_CONTEXT, not current_class_type.
3178         * pt.c (tsubst_decl): Adjust call to grok_op_properties.
3179
3180 2005-06-02  Nathan Sidwell  <nathan@codesourcery.com>
3181
3182         * method.c (synthesize_method): Add addtional arg to warning call.
3183
3184         PR c++/21280
3185         * Make-lang.in (method.o): Add diagnostic.h
3186         * decl.c (start_preparsed_function): Use decl's location for file
3187         info.
3188         * decl2.c (cp_finish_file): Set input_location before synthesizing
3189         a function.
3190         (mark_used): When deferring a synthesized function, save current
3191         location.  Do not set function's location when actually
3192         synthesizing it.
3193         * method.c: #include diagnostic.h.
3194         (synthesize_method): Set the functions source location.  Show
3195         needed location if errors are emitted.
3196
3197         * decl.c (start_decl): Simplify specialization handling. Remove
3198         unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
3199         * mangle.c (discriminator_for_local_entity): Use VEC_index.
3200
3201         PR c++/20350
3202         * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
3203
3204         PR c++/21151
3205         * name-lookup.c (pushtag): Push local class even in a template.
3206
3207 2005-05-31  Nathan Sidwell  <nathan@codesourcery.com>
3208
3209         PR c++/21165
3210         * init.c (integral_constant_value): Check the type of the
3211         initializer, not the decl.
3212
3213 2005-05-30  Mark Mitchell  <mark@codesourcery.com>
3214
3215         PR c++/21784
3216         * name-lookup.c (do_nonmember_using_decl): Ignore builtin
3217         functions, even when the used name is not a function.
3218
3219 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
3220
3221         * operators.def, optimize.c: Update copyright.
3222
3223 2005-05-28  Mark Mitchell  <mark@codesourcery.com>
3224
3225         PR c++/21210
3226         * call.c (standard_conversion): Permit conversions to complex
3227         types if conversion to the corresponding scalar type would be
3228         permitted.
3229
3230         PR c++/21340
3231         * method.c (implicitly_declare_fn): Clear processing_template_decl
3232         when generating implicit declaration.
3233
3234 2005-05-27  Mark Mitchell  <mark@codesourcery.com>
3235
3236         PR c++/21614
3237         * typeck.c (get_member_function_from_ptrfunc): Do not attempt
3238         conversions to base classes of incomplete types.
3239
3240 2005-05-27  Ian Lance Taylor  <ian@airs.com>
3241
3242         * semantics.c (add_stmt): Add C++ frontend specific version.
3243         * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
3244         (stmts_are_full_exprs_p): Declare.
3245
3246 2005-05-27  Roger Sayle  <roger@eyesopen.com>
3247             Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3248
3249         * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
3250         * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
3251         of CONVERT_EXPR.
3252         (cp_parser_unary_expression): Likewise.
3253         * typeck.c (build_unary_op): Likewise.
3254         * call.c (add_builtin_candidate, build_new_op): Likewise.
3255         * error.c (dump_expr): Likewise.
3256         * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
3257         * decl.c (ambi_op_p, grok_op_properties): Likewise.
3258         * dump.c (dump_op): Likewise.
3259         * lex.c (init_operators): Likewise.
3260         * operators.def ("+"): Likewise.
3261         * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
3262         conversion, if the result and argument types differ.
3263         * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
3264         like a NOP_EXPR when !processing_template_decl.
3265
3266         * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
3267         (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
3268
3269 2005-05-27  Nathan Sidwell  <nathan@codesourcery.com>
3270
3271         PR c++/21455
3272         * typeck.c (get_delta_difference): Cope with incomplete but equal
3273         classes.  Reorder if.
3274
3275         PR c++/21681
3276         * parser.c (cp_parser_late_parsing_for_member): Disable access
3277         checking for template functions.
3278
3279 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3280
3281         PR c++/21768
3282         * pt.c (redeclare_class_template): Change error message according
3283         to coding conventions.
3284
3285 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3286
3287         * call.c (build_op_delete_call): Fix quoting in error message.
3288
3289 2005-05-25  Richard Henderson  <rth@redhat.com>
3290
3291         PR libgcj/21692
3292         * cp-tree.h (make_alias_for): Declare.
3293         * decl2.c (build_java_method_aliases): New.
3294         (cp_finish_file): Call it.
3295         * method.c (make_alias_for): Split out from ...
3296         (make_alias_for_thunk): ... here.
3297
3298 2005-05-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3299
3300         PR c++/21686
3301         * semantics.c (finish_id_expression): Fix quoting in error message.
3302
3303 2005-05-25  DJ Delorie  <dj@redhat.com>
3304
3305         * decl.c (duplicate_decls): Move warning control from if() to
3306         warning(OPT_*).
3307         * name-lookup.c (parse_using_directive): Likewise.
3308         * parser.c (cp_parser_elaborated_type_specifier): Likewise.
3309         (cp_parser_init_declarator): Likewise.
3310         * tree.c (handle_com_interface_attribute): Likewise.
3311
3312 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
3313
3314         * class.c (layout_class_type): Do not issue C++ ABI warnings
3315         for ObjC structs.
3316         * decl.c (objc_mark_locals_volatile): Streamline by calling
3317         objc_volatilize_decl().
3318         * parser.c (cp_parser_objc_message_expression): Allow simple
3319         type specifiers (instead of merely type names) as message
3320         receivers.
3321         * pt.c (template_args_equal): Do not call objc_comptypes().
3322         * typeck.c (composite_pointer_type): If both pointers are
3323         ObjC-esque, arbitrarily choose the first; do not call
3324         objc_comptypes().
3325         (comptypes): Do not call objc_comptypes().
3326         (convert_for_assignment): Call objc_compare_types().
3327         (comp_ptr_ttypes_real): Call objc_type_quals_match() before
3328         concluding that types do not match.
3329
3330 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
3331
3332         PR C++/21645
3333         * optimize.c (update_cloned_parm): Copy the TYPE also from the
3334         original one.
3335
3336 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
3337
3338         PR c++/21495
3339         * decl.c (grokdeclarator): Fix "storage class specified for"
3340         error reporting.
3341
3342 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
3343
3344         * parser.c: Fix comment typos.
3345
3346 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
3347
3348         * Make-lang.in (cc1plus-dummy): New.
3349         (cc1plus-checksum.c): New.
3350         (cc1plus-checksum.o): New.
3351         (cc1plus): Add cc1plus-checksum.o.
3352
3353 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
3354
3355         PR C++/19664
3356         * decl2.c (determine_visibility): Don't set visibility to
3357         hidden if it has been set explicitly by user.
3358
3359 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
3360             Mike Stump  <mrs@apple.com>
3361
3362         Yet more Objective-C++...
3363
3364         * cp-objcp-common.h (cxx_get_alias_set): Move from
3365         here...
3366         (cxx_warn_unused_global_decl): Likewise.
3367         (cp_expr_size): Likewise.
3368         (cp_tree_size): Likewise.
3369         (cp_var_mod_type_p): Likewise.
3370         (cxx_initialize_diagnostics): Likewise.
3371         (cxx_types_compatible_p): Likewise.
3372         * cp-tree.h: to here.
3373         (do_poplevel): Add.
3374         * lex.c (D_OBJC): Add.
3375         (init_reswords): Add.
3376         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
3377         * parser.c: Add c-common.h include.
3378         * pt.c: Add c-common.h and cp-objcp-common.h includes.
3379         (template_args_equal): Use objc_comptypes as well.
3380         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
3381         * semantics.c (do_poplevel): Remove static.
3382
3383         * decl.c (objc_mark_locals_volatile): Don't change decls that are
3384         already ok.
3385         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
3386         Objective C++ early enough.
3387         * lex.c (struct resword reswords): Add Objective-C++ support.
3388         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
3389         (cp_parser_objc_message_receiver): Add.
3390         (cp_parser_objc_message_args): Likewise.
3391         (cp_parser_objc_message_expression): Likewise.
3392         (cp_parser_objc_encode_expression): Likewise.
3393         (cp_parser_objc_defs_expression): Likewise.
3394         (cp_parser_objc_protocol_expression): Likewise.
3395         (cp_parser_objc_selector_expression): Likewise.
3396         (cp_parser_objc_expression): Likewise.
3397         (cp_parser_objc_visibility_spec): Likewise.
3398         (cp_parser_objc_method_type): Likewise.
3399         (cp_parser_objc_protocol_qualifiers): Likewise.
3400         (cp_parser_objc_typename): Likewise.
3401         (cp_parser_objc_selector_p): Likewise.
3402         (cp_parser_objc_selector): Likewise.
3403         (cp_parser_objc_method_keyword_params): Likewise.
3404         (cp_parser_objc_method_tail_params_opt): Likewise.
3405         (cp_parser_objc_interstitial_code): Likewise.
3406         (cp_parser_objc_method_signature): Likewise.
3407         (cp_parser_objc_method_prototype_list): Likewise.
3408         (cp_parser_objc_method_definition_list): Likewise.
3409         (cp_parser_objc_class_ivars): Likewise.
3410         (cp_parser_objc_identifier_list): Likewise.
3411         (cp_parser_objc_alias_declaration): Likewise.
3412         (cp_parser_objc_class_declaration): Likewise.
3413         (cp_parser_objc_protocol_declaration): Likewise.
3414         (cp_parser_objc_protocol_refs_opt): Likewise.
3415         (cp_parser_objc_superclass_or_category): Likewise.
3416         (cp_parser_objc_class_interface): Likewise.
3417         (cp_parser_objc_class_implementation): Likewise.
3418         (cp_parser_objc_end_implementation): Likewise.
3419         (cp_parser_objc_declaration): Likewise.
3420         (cp_parser_objc_try_catch_finally_statement): Likewise.
3421         (cp_parser_objc_synchronized_statement): Likewise.
3422         (cp_parser_objc_throw_statement): Likewise.
3423         (cp_parser_objc_statement): Likewise.
3424         (cp_parser_primary_expression): Add Objective-C++.
3425         (cp_parser_statement): Likewise.
3426         (cp_parser_declaration): Likewise.
3427         (cp_parser_simple_type_specifier): Likewise.
3428         (cp_parser_type_name): Likewise.
3429         (cp_parser_parameter_declaration_list): Likewise.
3430         (cp_parser_member_declaration) Likewise.
3431         * tree.c: Include debug.h.
3432         * typeck.c (composite_pointer_type): Add Objective-C++ support.
3433         (finish_class_member_access_expr): Likewise.
3434         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
3435         (build_modify_expr): Allow objc to generate write barriers.
3436
3437         * Make-lang.in (cp/tree.o): Add debug.h.
3438         * tree.c (lvalue_p_1, case CONST_DECL): Add.
3439
3440 2005-05-18  Jan Hubicka  <jh@suse.cz>
3441
3442         * method.c: Include tree-pass.h
3443         (use_thunk): Lower body before expanding.
3444
3445 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
3446
3447         PR c++/21454
3448         * decl.c (maybe_deduce_size_from_array_init): Call
3449         cp_apply_type_quals_to_decl after completing array type.
3450
3451 2005-05-16  Richard Henderson  <rth@redhat.com>
3452
3453         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
3454         (build_library_fn): ... here.
3455
3456 2005-05-12  Ian Lance Taylor  <ian@airs.com>
3457
3458         * cp-tree.h (cp_stmt_codes): Don't define.
3459         (statement_code_p): Declare.
3460         (STATEMENT_CODE_P): Define.
3461         * lex.c (statement_code_p): Define.
3462         (cxx_init): Use actual codes in stmt_codes initializer, not
3463         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
3464         than using INIT_STATEMENT_CODES.
3465
3466 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
3467
3468         * typeck.c (build_unary_op): Do not resort to address arithmetic
3469         when taking the address of a COMPONENT_REF.
3470
3471 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
3472
3473         * class.c (vtbl_init_data_s): Change the type of fns to
3474         VEC(tree,gc)*.
3475         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
3476         Use VEC instead of VARRAY.
3477
3478 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
3479
3480         * mangle.c: Remove a reference to the MIPS -mint64 option.
3481
3482 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
3483
3484         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
3485         VARRAY.
3486         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
3487         * name-lookup.h (cp_binding_level): Change the type of
3488         static_decls to VEC(tree,gc)*.
3489
3490         * mangle.c (globals): Change the type of substitutions to
3491         VEC(tree,gc)*.
3492         (dump_substitution_candidates, add_substitution,
3493         find_substitution, finish_mangling, init_mangle): Use VEC
3494         instead of VARRAY.
3495
3496 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
3497
3498         * decl2.c (spew_debug): Remove.
3499
3500         * decl2.c (ssdf_decls, start_static_storage_duration_function,
3501         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
3502
3503         * decl2.c (pending_statics, note_vague_linkage_var,
3504         cp_finish_file): Use VEC instead of VARRAY.
3505         (pending_statics_used): Remove.
3506
3507 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
3508
3509         * decl2.c (deferred_fns, note_vague_linkage_fn,
3510         cp_finish_file): Use VEC instead of VARRAY.
3511
3512 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
3513
3514         PR c++/21352
3515         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
3516
3517 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
3518
3519         * pt.c: Fix a comment typo.
3520
3521 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
3522
3523         * cp-tree.h (language_function): Change the type of
3524         x_local_names to VEC.
3525         * decl.c (push_local_name): Adjust uses of local_names.
3526
3527 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
3528
3529         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
3530
3531 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
3532
3533         * class.c (local_classes, init_class_processing): Use VEC
3534         instead of VARRAY.
3535         * cp-tree.h (local_classes): Likewise.
3536         * mangle.c (discriminator_for_local_entity): Likewise.
3537         * name-lookup.c (pushtag): Likewise.
3538
3539         * class.c (current_lang_depth, push_lang_context,
3540         pop_lang_context): Use VEC instead of VARRAY.
3541         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
3542         VARRAY.
3543         * name-lookup.c (push_to_top_level): Use VEC instead of
3544         VARRAY.
3545
3546 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
3547
3548         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
3549         for BUILT_IN_MD built-ins.
3550
3551 2005-05-02  Michael Matz  <matz@suse.de>
3552
3553         PR c++/19542
3554         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
3555         common frontend.
3556         (null_node): Remove.
3557         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
3558
3559 2005-04-25  Ian Lance Taylor  <ian@airs.com>
3560
3561         * cp-tree.def: Add EXPR_STMT.
3562         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
3563         (EXPR_STMT_EXPR): Define.
3564         * cp-gimplify.c: Include "flags.h".
3565         (gimplify_expr_stmt): New static function.
3566         (cp_gimplify_expr): Handle EXPR_STMT.
3567         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
3568         rather than pp_expression.
3569         (pp_cxx_statement): Handle EXPR_STMT.
3570         * dump.c (cp_dump_tree): Handle EXPR_STMT.
3571         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
3572         initializer.
3573
3574 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
3575
3576         PR C++/21188
3577         * rtti.c (ifnonnull): Cast the zero comparison operand
3578         to the correct type.
3579
3580 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
3581
3582         PR middle-end/20991
3583         * class.c: Include cgraph.h.
3584         (cp_fold_obj_type_ref): Set node->local.vtable_method.
3585         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
3586
3587 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
3588
3589         * mangle.c (write_builtin_type): Handle integer types which are
3590         not one of the shared integer type nodes and emit a "vendor
3591         extended builtin type" with an encoding in the form of "u5int96".
3592
3593 2005-04-24  Ian Lance Taylor  <ian@airs.com>
3594
3595         * cp-tree.def (USING_STMT): Change class to tcc_statement.
3596         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
3597         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
3598         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
3599
3600 2005-04-23  DJ Delorie  <dj@redhat.com>
3601
3602         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
3603         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
3604         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
3605         callers.
3606
3607 2005-04-22  Per Bothner  <per@bothner.com>
3608
3609         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
3610         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
3611
3612 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
3613
3614         PR c++/21087
3615         * name-lookup.c (push_overloaded_decl): Do not overload with
3616         non-duplicate anticipated built-in.
3617
3618 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
3619
3620         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
3621         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
3622
3623 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3624
3625         * cp-tree.h: Adjust for new VEC API.
3626         Define VEC(tree_pair_s,gc).
3627         (struct save_scope): Adjust.
3628         (struct lang_type_class): Adjust.
3629         (unemitted_tinfo_decls): Adjust.
3630         * class.c (add_method, resort_type_method_vec,
3631         finish_struct_methods, struct find_final_overrider_data,
3632         dfs_find_final_overrider_pre, find_final_overrider,
3633         get_vcall_index, warn_hidden, walk_subobject_offsets,
3634         check_methods, fixup_inline_methods, end_of_class,
3635         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
3636         add_vcall_offset): Adjust.
3637         * decl.c (xref_basetypes, finish_method): Adjust.
3638         * decl2.c (check_classfn): Adjust.
3639         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
3640         * method.c (do_build_copy_constructor): Adjust.
3641         * name-lookup.c (new_class_binding, store_binding,
3642         store_bindings, store_class_bindings): Adjust.
3643         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
3644         VEC(cp_class_binding,gc).
3645         (struct cp_binding_level): Adjust.
3646         * parser.c: Define VEC(cp_token_position,heap).
3647         (struct cp_lexer): Adjust.
3648         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
3649         cp_lexer_save_tokens): Adjust.
3650         * pt.c (retrieve_specialization,
3651         check_explicit_specialization): Adjust.
3652         * rtti.c (unemitted_tinfo_decls): Adjust.
3653         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
3654         get_pseudo_ti_desc): Adjust.
3655         * search.c (dfs_access_in_type, lookup_conversion_operator,
3656         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
3657         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
3658         * semantics.c: Define VEC(deferred_access,gc).
3659         (push_deferring_access_checks): Adjust.
3660         * typeck2.c (abstract_virtuals_error): Adjust.
3661
3662 2005-04-20  Ian Lance Taylor  <ian@airs.com>
3663
3664         * cp-tree.def: Add STMT_EXPR.
3665         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
3666         (STMT_EXPR_STMT): Define.
3667         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3668         STMT_EXPR.
3669         (pp_cxx_expression): Likewise.
3670         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
3671         * dump.c (cp_dump_tree): Handle STMT_EXPR.
3672
3673 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
3674
3675         * decl.c (expand_static_init): Call build2 and build3 instead
3676         of build.
3677
3678         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
3679
3680 2005-04-17  Ian Lance Taylor  <ian@airs.com>
3681
3682         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
3683         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
3684         ARROW_EXPR.
3685         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
3686         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
3687         ALIGNOF_EXPR.
3688         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
3689         c_sizeof_or_alignof_type for change in parameter type.
3690
3691 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
3692
3693         PR c++/21025
3694         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
3695         which sizeof/alignof is dependent, rather than just whether we are
3696         processing_template_decl.
3697
3698 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
3699
3700         * cp-tree.h (LOOKUP_GLOBAL): Remove.
3701         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
3702         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
3703         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
3704         their values.
3705
3706 2005-04-15  Richard Henderson  <rth@redhat.com>
3707
3708         PR middle-end/14311
3709         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
3710
3711 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
3712
3713         * cp-tree.h (lang_type_class): Remove redefined.  Move
3714         java_interface into where redefined was.  Increment the width
3715         of dummy.
3716         (TYPE_REDEFINED): Remove.
3717
3718 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
3719
3720         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
3721         CLASSTYPE_TEMPLATE_LEVEL): Remove.
3722
3723 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
3724
3725         * decl2.c (determine_visibility): Don't use export_class_data.
3726         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
3727         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
3728
3729 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
3730
3731         * cp-tree.h (cxx_alignof): Remove.
3732
3733         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
3734
3735         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
3736         CONV_STATIC_CAST): Remove.
3737
3738         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
3739
3740         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
3741
3742         * cp-tree.h (cp_deprecated): Remove.
3743
3744 2005-04-08  Ian Lance Taylor  <ian@airs.com>
3745
3746         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
3747         CONTINUE_STMT, SWITCH_STMT.
3748         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
3749         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
3750         (WHILE_COND, WHILE_BODY): Define.
3751         (DO_COND, DO_BODY): Define.
3752         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
3753         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
3754         * cp-gimplify.c (enum bc_t): Define.
3755         (struct cp_gimplify_ctx, ctxp): Define.
3756         (push_context, pop_context): New static functions.
3757         (begin_bc_block, finish_bc_block): New static functions.
3758         (build_bc_goto): New static function.
3759         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
3760         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
3761         (gimplify_switch_stmt): Likewise.
3762         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
3763         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
3764         (cp_genericize): Call push_context and pop_context.
3765         * semantics.c (finish_break_stmt): Just call build_stmt
3766         (BREAK_STMT) rather than build_break_stmt.
3767         (finish_continue_stmt): Corresponding change.
3768         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
3769         parameters.
3770         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
3771         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
3772         * dump.c (cp_dump_tree): Likewise.
3773
3774 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
3775
3776         PR c++/20905
3777         * parser.c (cp_parser_type_specifier_seq): Add is_condition
3778         parameter.
3779         (cp_parser_new_type_id): Pass it.
3780         (cp_parser_condition): Likewise.
3781         (cp_parser_conversion_type_id): Likewise.
3782         (cp_parser_type_id): Likewise.
3783         (cp_parser_type_specifier_seq): In a condition, do not allow
3784         invalid type-specifier combinations.
3785         (cp_parser_exception_declaration): Adjust call to
3786         cp_parser_type_specifier_seq.
3787
3788         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
3789         * cp-tree.h (struct tinst_level): Add in_system_header_p.
3790         (TINST_IN_SYSTEM_HEADER_P): New macro.
3791         (make_tinst_level): Remove.
3792         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
3793         the instantiated class.
3794         (push_tinst_level): Do not use make_tinst_level.  Set
3795         TINST_IN_SYSTEM_HEADER_P.
3796         (pop_tinst_level): Likewise.
3797         (instantiate_class_template): Set in_system_header.
3798         (instantiate_pending_templates): Likewise.
3799         * tree.c (make_tinst_level): Remove.
3800
3801 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
3802
3803         * decl.c (start_decl): Apply pending #pragma weak regardless of
3804         scope.
3805
3806 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
3807
3808         PR c++/20212
3809         * pt.c (regenerate_decl_from_template): Copy attributes for
3810         parameters from the pattern to the instantiation.
3811
3812 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
3813
3814         PR c++/20734
3815         * cp-tree.def (OFFSET_REF): Correct comments.
3816         * init.c (build_offset_ref): Remove misleading comment.
3817         * typeck.c (build_unary_op): Handle pointer-to-member creation
3818         here, rather than ...
3819         (unary_complex_lvalue): ... here.
3820
3821 2005-04-06  Jason Merrill  <jason@redhat.com>
3822
3823         PR c++/19312
3824         * tree.c (stabilize_init): Don't bother trying to stabilize
3825         something with no side-effects.
3826
3827 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
3828
3829         PR c++/20763
3830         * decl.c (grokdeclarator): Correct attribute handling.
3831
3832 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
3833
3834         PR c++/19159
3835         * decl2.c (import_export_decl): Use non-COMDAT external linkage
3836         for virtual tables, typeinfo, etc. that will be emitted in only
3837         one translation unit on systems without weak symbols.
3838
3839 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
3840
3841         PR c++/20679
3842         * parser.c (cp_parser_template_name): Fix thinko.
3843
3844 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
3845
3846         PR c++/20746
3847         * method.c (use_thunk): Protect covariant pointer return
3848         adjustments from NULL pointers.
3849
3850 2005-04-04  Jan Hubicka  <jh@suse.cz>
3851
3852         * decl2.c (finish_objects): Revert my previous patch.
3853         (cp_finish_file): Likewise.
3854
3855 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
3856
3857         * pt.c: Fix comment typos.
3858
3859 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
3860
3861         PR c++/20723
3862         * pt.c (more_specialized_fn): Member functions are unordered wrt
3863         non-members.  Conversion operators are unordered wrt other
3864         functions.
3865
3866 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
3867
3868         * call.c (add_template_candidates_real): Remove length parameter
3869         from fn_type_unification call.
3870         * class.c (resolve_address_of_overloaded_function): Likewise
3871         * cp-tree.h (fn_type_unification): Remove length parameter.
3872         * pt.c (get_bindings_overload): Remove.
3873         (get_bindings_real): Rename to ...
3874         (get_bindings): ... here.  Remove length and strict
3875         parameters. Change return type flag to boolean.  Remove original
3876         forwarding function.
3877         (determine_specialization): Adjust get_bindings call.
3878         (fn_type_unification): Remove length parameter.  Adjust.
3879         (type_unification_real): Remove length parameter.  Adjust.
3880         (resolve_overloaded_unification): Adjust get_bindings call.
3881         (try_one_overload): Simplify confusing cascaded if control flow.
3882         (unify): Remove length paramter from type_unification_real call.
3883         (most_specialized_instantiation): Adjust get_bindings calls.
3884         (most_specialized): Likewise.
3885
3886 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
3887
3888         PR c++/19203, implement DR 214
3889         * call.c (joust): Use more_specialized_fn.
3890         * cp-tree.h (DEDUCE_ORDER): Remove.
3891         (more_specialized): Replace with ...
3892         (more_specialized_fn): ... this.
3893         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
3894         case.
3895         (type_unification_real): Remove DEDUCE_ORDER case.
3896         (more_specialized): Replace with ...
3897         (more_specialized_fn): ... this.  Implement DR 214.
3898         (most_specialized_instantiation): Use get_bindings_real directly.
3899
3900 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3901
3902         PR c++/18644
3903         * call.c (build_new_op): Remove check for -Wsynth.
3904
3905 2005-03-31  Jan Hubicka  <jh@suse.cz>
3906
3907         * decl2.c (finish_objects): Mark ctor as needed.
3908         (cp_finish_file): Output variables only in nonunit-at-a-time.
3909
3910 2005-03-29  Richard Henderson  <rth@redhat.com>
3911
3912         PR c/20519
3913         * decl.c (cp_complete_array_type): Rename from complete_array_type.
3914         Use the new complete_array_type in c-common.c.  Update all callers.
3915         * cp-tree.h (cp_complete_array_type): Update to match.
3916
3917 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
3918
3919         * typeck.c (build_static_cast_1): Allow scalar_cast between
3920         any integral, floating, or enumeration type.
3921
3922 2005-03-24  Steven Bosscher  <stevenb@suse.de>
3923
3924         * typeck.c (comptypes): First determine if the types are compatible
3925         from a target-independent point of view.  Check target attributes
3926         last.
3927
3928         * class.c (build_base_path):
3929         (build_vbase_offset_vtbl_entries):
3930         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
3931         * error.c (dump_expr): Likewise.
3932         * init.c (build_zero_init, expand_cleanup_for_base,
3933         build_vec_delete_1): Likewise.
3934         * mangle.c (write_integer_cst): Likewise.
3935         * method.c (thunk_adjust): Likewise.
3936         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
3937         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
3938         * typeck.c (build_ptrmemfunc_access_expr,
3939         (get_member_function_from_ptrfunc): Likewise.
3940
3941 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
3942
3943         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3944
3945 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
3946
3947         * cp-tree.h (perform_integral_promotions): Remove.
3948         (default_conversion): Add.
3949
3950 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
3951
3952         * parser.c (cp_parser_warn_min_max): New function.
3953         (cp_parser_binary_expression): Use it.
3954         (cp_parser_assignment_operator_opt): Likewise.
3955         (cp_parser_operator): Likewise.
3956
3957 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3958
3959         PR c++/19980
3960         * decl.c (start_preparsed_function): Robustify.
3961
3962 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3963
3964         PR c++/20499
3965         * parser.c (cp_parser_class_head): Return NULL_TREE when
3966         encountering a redefinition.
3967
3968 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
3969
3970         PR c++/20465
3971         PR c++/20381
3972         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
3973         template.
3974
3975 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
3976
3977         PR c++/20461
3978         PR c++/20536
3979         * init.c (emit_mem_initializers): Don't crash on undefined
3980         types.
3981
3982 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
3983
3984         PR c++/20147
3985         * semantics.c (finish_stmt_expr_expr): Return immediately
3986         if error_operand_p (expr).
3987
3988 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
3989
3990         * cp-tree.h (lvalue_or_else, lvalue_p): New.
3991         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
3992
3993 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3994
3995         PR c++/20240
3996         * decl.c (decls_match): Compare context of VAR_DECL.
3997
3998 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3999
4000         PR c++/20333
4001         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
4002         Check the return value of cp_parser_nested_name_specifier.
4003
4004 2005-03-18  Dale Johannesen <dalej@apple.com>
4005
4006         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
4007
4008 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
4009
4010         PR c++/20463
4011         * parser.c (cp_parser_diagnose_invalid_type_name):
4012         Check TYPE_BINFO (current_class_type) before attempting
4013         to emit inform messages.
4014
4015 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
4016
4017         PR c++/19966
4018         * cp-tree.h (grok_op_properties): Change return type to void.
4019         * decl.c (grok_op_properties): Return early - don't check the
4020         arity - in case of a static member or an operator that cannot
4021         be non-member; tidy a bit.
4022
4023 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
4024
4025         PR c++/20186
4026         * pt.c (contains_dependent_cast_p): Remove.
4027         (fold_non_dependent_expr): Don't use it.
4028         (value_dependent_expression_p): Use a switch statement.