OSDN Git Service

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