]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
* decl.c (grokdeclarator): Fix line-wrapping.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
ebbc3ce1
DM
12006-10-30 Dirk Mueller <dmueller@suse.de>
2
3 PR c++/28704
4 * decl.c (grokdeclarator): Duplicate diagnostic message
5 for easier translation.
f88d05c0 6 * decl.c (grokdeclarator): Fix line-wrapping.
ebbc3ce1 7
a1e45ff0
DM
82006-10-30 Dirk Mueller <dmueller@suse.de>
9
10 PR c++/6321
11 * decl.c (grokfndecl): Use check_main_parameter_types.
12
e7c41c99
DM
132006-10-30 Dirk Mueller <dmueller@suse.de>
14
15 PR c++/28669
16 * decl.c (grokfndecl): Duplicate warning message for
17 easier translation.
18
ff84991f
DM
192006-10-30 Dirk Mueller <dmueller@suse.de>
20
21 * typeck.c (build_unary_op): Fix indenting. Use G_().
22
153ae66a
DM
232006-10-29 Dirk Mueller <dmueller@suse.de>
24
25 PR c++/29089
26 * typeck.c (build_unary_op): Duplicate warning message
27 for easier translation.
28
0958b0d3
DM
292006-10-29 Dirk Mueller <dmueller@suse.de>
30
31 PR c++/16307
32 * typeck.c (build_array_ref): Warn for char subscriptions
33 on pointers.
34
bd6f7848
KH
352006-10-29 Kazu Hirata <kazu@codesourcery.com>
36
37 * decl.c: Fix a comment typo.
38
857d325a
AP
392006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
40
41 PR C++/29295
42 * typeck.c (build_unary_op): Use same_type_p when comparing to
43 boolean type.
44
85f37826
DM
452006-10-29 Dirk Mueller <dmueller@suse.de>
46
47 PR c++/29033
48 * typeck.c (build_binary_op): Duplicate warning message
49 for better translation.
50
512006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
c79efc4d
RÁE
52
53 * decl.c (builtin_function_1): Move common code to
54 add_builtin_function.
55 (builtin_function): Rename to cxx_builtin_function.
56 Change the signature.
57 * call.c: Include langhooks.h.
58 (build_java_interface_fn_ref): Replace calls to
59 builtin_function with add_builtin_function.
60 * Make-lang.in (cp/call.o): Depend on langhooks.h.
61 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
62 cxx_builtin_function.
63 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
64 Change the signature.
65
6e4be1fa
NS
662006-10-22 Nathan Sidwell <nathan@codesourcery.com>
67
68 PR c++/20647
69 * rtti.c (tinfo_base_init): The type info string is always global.
70
4c9fb870
LM
712006-10-20 Lee Millward <lee.millward@codesourcery.com>
72 Mark Mitchell <mark@codesourcery.com>
73
74 PR c++/28053
75 * decl2.c (grokbitfield): Detect invalid non-integral
76 types earlier when possible.
77
8e76c2bf
MS
782006-10-18 Mark Shinwell <shinwell@codesourcery.com>
79
80 PR c++/26884
81 * typeck2.c (digest_init): Raise error upon attempts to
82 initialize arrays with variables.
83
72f8fc59
LM
842006-10-17 Lee Millward <lee.millward@codesourcery.com>
85
86 PR c++/27952
87 * cp-tree.h (xref_basetypes): Return bool instead of void.
88 * decl.c (xref_basetypes): Adjust definition. Return false
89 if the class bases are invalid.
90 * parser.c (cp_parser_class_head): Check the return value
91 from xref_basetypes.
92
d19b84e9
MM
932006-10-17 Mark Mitchell <mark@codesourcery.com>
94
4ac6f4c5
MM
95 PR c++/28261
96 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
97 comment.
98
d19b84e9
MM
99 PR c++/28261
100 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
101 function.
102 (cp_parser_constructor_declarator_p): Use it.
103 (cp_parser_check_type_definition): Return a value indicating
104 whether or not the definition is valid.
105 (cp_parser_enum_specifier): Skip invalid enum definitions.
106
c7b0e027
MM
1072006-10-17 Mark Mitchell <mark@codesourcery.com>
108
109 PR c++/29039
110 * typeck2.c (build_functional_cast): Don't zero-initialize
111 non-PODs; instead, call their constructors.
112 * method.c (synthesize_method): Always build mem-initializers, if
113 we're synthesizing the default constructor.
114
05b22df9
MM
1152006-10-17 Mark Mitchell <mark@codesourcery.com>
116
117 PR c++/27270
118 * decl.c (reshape_init_class): Move check for designated
119 to ...
120 * parser.c (cp_parser_initializer_list): ... here.
121 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
122
1082fd10
MM
1232006-10-16 Mark Mitchell <mark@codesourcery.com>
124
fb8549a1
MM
125 PR c++/27270
126 * typeck2.c (process_init_constructor_array): Reword comment.
127 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
128 digest_init.
129
21864445
MM
130 PR c++/29408
131 * parser.c (cp_parser_using_declaration): Stop parsing when
132 something goes wrong with an access declaration.
133
b4c74ba2
MM
134 PR c++/29435
135 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
136 types when their sizes are required. Refine test for VLAs.
137
1082fd10
MM
138 PR c++/28211
139 * parser.c (cp_parser_template_argument): Don't consider "&var" a
140 possible constant-expression.
141 * pt.c (convert_nontype_argument): Refine handling of arguments of
142 pointer type.
143
0b45aedd
MM
1442006-10-13 Mark Mitchell <mark@codesourcery.com>
145
146 PR c++/28506
147 * parser.c (function_declarator_p): New function.
148 (cp_parser_init_declarator): Use it.
149 (cp_parser_member_declaration): Likewise.
150
f19218e5
MM
1512006-10-12 Mark Mitchell <mark@codesourcery.com>
152
153 PR c++/29318
154 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
155 variably modified types.
156
650fcd07
LM
1572006-10-12 Lee Millward <lee.millward@codesourcery.com>
158
159 PR c++/27961
160 * decl.c (start_decl): Return error_mark_node if a
161 function is initialized like a variable.
162 (check_var_type): If a variable of field is declared void,
163 set the type to error_mark_node.
164 (grokdeclarator): Check the return type of check_var_type.
165 * class.c (finish_struct_1): Robustify.
166
f724eac4
MM
1672006-10-11 Mark Mitchell <mark@codesourcery.com>
168
169 PR c++/29175
170 * decl.c (check_initializer): Issue errors about trying to
171 initialize arrays whose elements have variable size.
172
26106542
LM
1732006-10-11 Lee Millward <lee.millward@codesourcery.com>
174
175 PR c++/29024
176 * cp-tree (struct cp_decl_specifier_seq): Rename to
177 conflicting_specifiers_p
178 * parser.c (cp_parser_set_storage_class): Set
179 conflicting_specifiers_p for the input decl specifier
180 if a typedef specifier is present. Rename uses of
181 multiple_specifiers_p to conflicting_specifiers_p.
182 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
183 class specifier has already been set for this declaration,
184 set conflicting_specifiers_p to true on the decl_specs.
185 * decl.c (grokdeclarator): Rename uses of
186 multiple_specifiers_p to conflicting_specifiers_p.
187
b5422ad7
BM
1882006-10-10 Brooks Moses <bmoses@stanford.edu>
189
190 * Make-lang.in: Added "c++.pdf" target support.
191
be0436d7
RG
1922006-10-10 Richard Guenther <rguenther@suse.de>
193
194 PR rtl-optimization/29323
195 * decl.c (finish_function): Set TREE_NOTHROW only for
196 functions that bind local.
197
a98d4769
RH
1982006-10-09 Richard Henderson <rth@redhat.com>
199
200 Revert emutls patch.
201
e701a32a
RH
2022006-10-04 Richard Henderson <rth@redhat.com>
203 Jakub Jelinek <jakub@redhat.com>
204
205 * decl.c (grokvardecl): Don't error if !have_tls.
206 (grokdeclarator): Likewise.
207 * parser.c (cp_parser_omp_threadprivate): Likewise.
208
981114e1
MM
2092006-10-03 Mark Mitchell <mark@codesourcery.com>
210
1cd7d7bf
MM
211 PR c++/29020
212 * friend.c (do_friend): Improve comments; add assertion.
213 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
214 typenames for qualified names used in declarations, even when
215 caching qualified name lookup.
216
981114e1
MM
217 PR c++/29138
218 * decl2.c (grokfield): Don't handle access declarations here.
219 * parser.c (cp_parser_using_declaration): Handle access
220 declarations too.
221 (cp_parser_block_declaration): Adjust calls to
222 cp_parser_using_declaration.
223 (cp_parser_member_declaration): Likewise. Use
224 cp_parser_using_declaration to look for access_declarations.
225
95fb85c6
VR
2262006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
227
228 PR c++/29291
229 * init.c (build_new): Check for invalid init.
230
3c17e16e
MM
2312006-10-02 Mark Mitchell <mark@codesourcery.com>
232
233 PR c++/29226
234 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
235 not try to actually evaluate sizeof for a VLA type.
236
297d4105
MM
2372006-10-01 Mark Mitchell <mark@codesourcery.com>
238
239 PR c++/29105
240 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
241 * semantics.c (baselink_for_fns): Build a baselink, even when
242 processing a template.
243
244 PR c++/29080
245 * parser.c (cp_parser_postfix_dot_deref_expression): Use
246 BASELINK_ACCESS_BINFO as the qualifying scope when calling
247 adjust_result_of_qualified_name_lookup.
248
60feef2c
LM
2492006-09-25 Lee Millward <lee.millward@codesourcery.com>
250
251 PR c++/27329
252 PR c++/26938
253 * cp-tree.h (redeclare_class_template): Adjust declaration
254 to return bool instead of void.
255 * pt.c (redeclare_class_template): Update definition.
256 Return false on error.
257 * decl.c (xref_tag): Return error_mark_node if
258 redeclare_class_template returned false.
9b910171
LM
259
260 PR c++/27667
261 * cp-tree.h (begin_specialization): Return bool
262 instead of void.
263 * pt.c (check_specialization_scope): Likwise.
264 Adjust comment. Return false if a specialization
265 isn't permitted in the current scope.
266 (begin_specialization): Use the return value of
267 check_specialization_scope.
268 * parser.c (cp_parser_explicit_specialization): If
269 begin_specialization returned false, skip the rest
270 of the specialization.
60feef2c 271
b76d34e9
MM
2722006-09-21 Mark Mitchell <mark@codesourcery.com>
273
274 PR c++/29016
275 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
276 BASELINK.
277
d2a8ac2c
LM
2782006-09-21 Lee Millward <lee.millward@codesourcery.com>
279
280 PR c++/28861
281 * decl.c (shadow_tag): Return error_mark_node
282 if maybe_process_partial_specialization failed.
32273f9f
LM
283
284 PR c++/28303
285 * decl.c (grokdeclarator): Return error_mark_node on
286 declaration with two or more data types.
d2a8ac2c 287
756ccd2a
DS
2882006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
289
290 PR target/27650
291 * class.c (check_for_override): Remove dllimport from virtual
292 methods.
293
ddd039d5
SB
2942006-09-18 Steven Bosscher <steven@gcc.gnu.org>
295
296 PR c++/29087
297 * parser.c (cp_parser_labeled_statement): Return nothing. Do
298 not take in_statement_expr and in_compound as arguments. Rename
299 to cp_parser_label_for_labeled_statement. Parse only the label,
300 not the statement.
301 (cp_parser_statement): Parse the statement of a labeled-statement
302 from here, using tail recursion.
303
9bdb04a2
AP
3042006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
305
306 PR C++/29002
307 * init.c (build_zero_init): If we have an error mark node for
308 the array size, return.
309
bc70af52
MM
3102006-09-10 Mark Mitchell <mark@codesourcery.com>
311
312 PR c++/28991
313 * cp-objcp-common.c (cxx_staticp): New function.
314 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
315 * cp-tree.h (cxx_staticp): New function.
316
05f8c2d5
JM
3172006-09-09 Jason Merrill <jason@redhat.com>
318
319 PR c++/28996
320 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
321
a7b9d08c
VR
3222006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
323
324 PR c++/28858
325 * parser.c (cp_parser_skip_until_found): Rename to
326 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
327 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
328 Reorganize. Adjust comment.
329 (cp_parser_template_declaration_after_export): Adjust call.
330 (cp_parser_enclosed_template_argument_list): Likewise.
331
158d56c4
AP
3322006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
333
334 PR C++/28906
335 * init.c (build_new_1): Build a distinct type copy
336 for the array type that was returned from
337 build_cplus_array_type.
338
dbb87a8a
JM
3392006-09-07 Jason Merrill <jason@redhat.com>
340
5de1a1eb
JM
341 PR c++/27371
342 * cvt.c (convert_to_void): Enable previous change.
343
dbb87a8a
JM
344 PR c++/26957
345 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
346 parms.
347
d4a200d3
SM
3482006-09-07 Simon Martin <simartin@users.sourceforge.net>
349
350 PR c++/28284
dbb87a8a
JM
351 * pt.c (fold_non_dependent_expr): Make sure expr is not
352 dereferenced if it is NULL.
d4a200d3 353
c533e34d
ZK
3542006-09-06 Zak Kipling <zak@transversal.com>
355
158d56c4 356 PR c++/26195
c533e34d
ZK
357 * decl.c (make_rtl_for_nonlocal_decl),
358 (start_preparsed_function): Don't use lbasename on
359 input_filename when calling get_fileinfo.
360 * semantics.c (begin_class_definition): Likewise.
361 * lex.c (cxx_make_type): Likewise.
362 (handle_pragma_interface): Call get_fileinfo on input_filename,
363 not on the parameter to the directive.
364
6ee3ffe8
MM
3652006-09-06 Mark Mitchell <mark@codesourcery.com>
366
367 PR c++/28903
368 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
369 dimensions.
370
371 PR c++/28886
372 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
373 dimensions.
374
ccbe00a4
JM
3752006-09-06 Jason Merrill <jason@redhat.com>
376
c08cd4c1
JM
377 PR c++/27371
378 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
379 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
380 * tree.c (build_cplus_new): Set it.
381
ccbe00a4
JM
382 PR c++/26696
383 * cvt.c (convert_to_void): Replace a subexpression with no side
384 effects with void_zero_node.
385 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
386 (get_first_fn): Ditto.
387 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
388
99818a52
JM
3892006-09-05 Jason Merrill <jason@redhat.com>
390
5df1740d
JM
391 PR c++/26571
392 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
393 where the name is a type used incorrectly.
394
a1a95249
JM
395 PR c++/26671
396 * typeck.c (maybe_warn_about_returning_address_of_local): Look
397 through COMPONENT_REF and ARRAY_REF.
398
99818a52
JM
399 PR c++/26102
400 * name-lookup.c (do_class_using_decl): Try to find the base even
401 if bases_dependent_p.
402 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
403
404 PR c++/19809
405 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
406
88525e1b
NS
4072006-09-04 Nathan Sidwell <nathan@codesourcery.com>
408
409 PR 23287 Revert my 2006-09-01 patch.
410 * parser.c: Reverted.
411 * pt.c: Reverted.
412
b89c561c
LM
4132006-09-02 Lee Millward <lee.millward@codesourcery.com>
414
88525e1b
NS
415 PR c++/27670
416 PR c++/27493
417 PR c++/27494
418 PR c++/27397
419 * parser.c (cp_parser_template_parameter_list): Add
420 invalid template parameters to the parameter list as
421 error_mark_node.
b89c561c 422
b2a06efa
JJ
4232006-09-02 Jakub Jelinek <jakub@redhat.com>
424
07515729
JJ
425 PR c++/28878
426 * except.c (build_throw): Only set current_function_returns_abnormally
427 if cfun is not NULL.
428
b2a06efa
JJ
429 PR c++/26917
430 * repo.c (repo_file): Remove.
431 (open_repo_file, reopen_repo_file_for_write): Return fopened
432 FILE * instead of setting global repo_file variable.
433 (init_repo): Adjust caller.
434 (finish_repo): Likewise. Return instead of goto out before
435 reopen_repo_file_for_write has been called.
436
429b876b
NS
4372006-09-01 Nathan Sidwell <nathan@codesourcery.com>
438
4860b874
NS
439 PR c++/28705
440 * semantics.c (finish_call_expr): Add assert.
441 * name-lookup.c (lookup_arg_dependent): Check we found an overload
442 or an object.
443
429b876b
NS
444 PR c++/23287
445 * parser.c (cp_parser_id_expression): Add member_p
446 argument. Update all callers.
447 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
448 the object's scope, if valid.
449 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
450 callers.
451 (cp_parser_postfix_dot_deref_expression): Set object_scope.
452 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
453
22002050
JM
4542006-08-30 Jason Merrill <jason@redhat.com>
455
456 PR c++/26670
457 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
458 the fields have been processed.
459
a2ef0979
AP
4602006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
461
462 PR C++/28349
463 * call.c (build_x_va_arg): Remove the reference type
464 from the type before creating the pointer type.
465
2de9107a
R
4662006-08-29 J"orn Rennecke <joern.rennecke@st.com>
467
468 PR c++/28139
469 * except.c (expand_start_catch_block): Use correct types for bitwise
470 copy.
471
bed02d89
JM
4722006-08-28 Jason Merrill <jason@redhat.com>
473
e883464c
JM
474 PR c++/26670
475 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
476 fields can't be packed.
477
bed02d89
JM
478 PR c++/26577
479 * cvt.c (convert_to_void): Don't automatically load from volatiles
480 of TREE_ADDRESSABLE type.
481
9ce387d9
VR
4822006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
483
484 PR c++/28860
485 * cp-tree.h (maybe_process_partial_specialization): Return
486 tree instead of void.
487 * parser.c (cp_parser_class_head): Use return value of
488 maybe_process_partial_specialization.
489 * pt.c (maybe_process_partial_specialization): Return error_mark_node
490 for broken specializations, TYPE otherwise. Check for template
491 template parameters.
492
99f4234a
MM
4932006-08-27 Mark Mitchell <mark@codesourcery.com>
494
495 PR c++/28058
496 * pt.c (register_specialization): Return error_mark_node for
497 specialization-after-instantiation.
498 * decl2.c (mark_used): Mark the main function used when one of its
499 clones is used.
500
bf87e098
LM
5012006-08-27 Lee Millward <lee.millward@codesourcery.com>
502
e753d130
AP
503 PR c++/26573
504 * class.c (check_field_decls): Don't issue error about
505 local classes containing static data members.
bf87e098 506
02ec74b9
JM
5072006-08-26 Joseph S. Myers <joseph@codesourcery.com>
508
509 PR c++/24009
510 * parser.c (struct cp_token): Add input_file_stack_index.
511 (eof_token): Update.
512 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
513 (cp_lexer_set_source_position_from_token): Restore input file
514 stack.
515
0f67a82f
LM
5162006-08-26 Lee Millward <lee.millward@codesourcery.com>
517
e753d130
AP
518 PR c++/28736
519 PR c++/28737
520 PR c++/28738
521 * pt.c (process_template_parm): Store invalid template
522 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
523 (push_inline_template_parms_recursive): Check for template
524 parameters having a TREE_VALUE of error_mark_node rather than
525 check the parameter itself.
526 (mangle_class_name_for_template): Likewise.
527 (comp_template_parms): When comparing the individual template
528 parameters, return 1 if either is error_mark_node.
529 (current_template_args): Robustify.
530 (redeclare_class_template): Likewise.
0f67a82f 531
eff3a276
MM
5322006-08-26 Mark Mitchell <mark@codesourcery.com>
533
534 PR c++/28588
535 * class.c (resolve_address_of_overloaded_function): Add
536 access_path parameter. Perform access checks.
537 (instantiate_type): Adjust call to
538 resolve_address_of_overloaded_function. Remove unnecessary code.
539 * tree.c (is_overloaded_fn): Document. Return 2 when there are
540 acutally multiple functions.
541 (really_overloaded_fn): Use is_overloaded_fn.
542 * mangle.c (write_expression): Handle BASELINKs.
543 * cp-tree.h (really_overloaded_fn): Return bool.
544 (baselink_for_fns): Declare.
545 * search.c (lookup_member): Check access for single static
546 functions here.
547 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
548 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
549 * semantics.c (finish_call_expr): Use baselink_for_fns.
550 (baselink_for_fns): New function.
551 (finish_id_expression): Use it.
552 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
553
554 PR c++/28595
555 * pt.c (tsubst): Issue errors about attempts to create VLAs at
556 template-instantiation time.
557
398cd199
VR
5582006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
559
7acf7efa
VR
560 PR c++/28853
561 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
562 template parameters. Improve error message for template type
563 parameters.
564
398cd199
VR
565 PR c++/28852
566 * cp-tree.h (grok_op_properties): Return bool instead of void.
567 * decl.c (grokfndecl): Discard invalid operator declarations.
568 (copy_fn_p): Revert change for PR 27547.
569 (grok_op_properties): Return error status (true on success).
570 * pt.c (tsubst_decl): Discard invalid operator declarations.
571
2884e22c
MM
5722006-08-25 Mark Mitchell <mark@codesourcery.com>
573
574 PR c++/28056
575 * decl.c (grokdeclarator): Disallow declarations with qualified
576 names in local scopes.
577
7d3bec9d
NS
5782006-08-25 Nathan Sidwell <nathan@codesourcery.com>
579
580 PR c++/27787
581 * decl.c (make_typename_type): Only try and resolve it when
582 context is not dependent. Refactor.
583 * decl2.c (check_classfn): Push to class scope before looking for
584 the function.
585
a073516d
DS
5862006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
587
588 PR driver/28528
589 * g++spec.c (lang_specific_driver): Always check if we need to
590 swallow a space-separated arg to '-x'.
591 * lang-specs.h: Don't create ouput files for '-xc++-header'
592 if -fsyntax-only.
593
c9cbfca6
JM
5942006-08-23 Jason Merrill <jason@redhat.com>
595
596 PR c++/27714
597 * pt.c (push_template_decl_real): A friend template with class
598 scope isn't primary.
599
6002006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
6c9384c3
BS
601
602 PR c++/28687
603 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
604 Move -fno-rtti check to be more specific.
605
a5c42740
JM
6062006-08-22 Jason Merrill <jason@redhat.com>
607
608 PR c++/23372
609 * call.c (build_over_call): Don't make a copy here if build_call
610 will make one too.
611
c846e8cd
AP
6122006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
613
614 PR C++/28450
615 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
616 COMPLEX_TYPEs.
617
5e8c38c2
SM
6182006-08-22 Simon Martin <simartin@users.sourceforge.net>
619
620 PR c++/28420
621 * parser.c (cp_parser_postfix_expression): Make sure that the
622 saved value for parser->type_definition_forbidden_message is
623 restored before returning to avoid an invalid free().
624
8e30dcf3
JM
6252006-08-22 Jason Merrill <jason@redhat.com>
626
627 PR c++/28659
628 * typeck.c (merge_types): If either of the types have the right
629 attributes, return that one.
630
631 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
632 doing this to class types.
633 * typeck.c (original_type): Deal with type quals properly.
634
c6c7698d
JM
6352006-08-21 Jason Merrill <jason@redhat.com>
636
637 PR c++/27115
638 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
639 just leave the expression as it is.
640 (finish_stmt_expr): If the statement-expression has class type,
641 wrap it in a TARGET_EXPR.
642 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
643 CLEANUP_POINT_EXPR.
644 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
645
18ff35c6
LM
6462006-08-21 Lee Millward <lee.millward@codesourcery.com>
647
648 PR c++/26269
c6c7698d
JM
649 * decl.c (duplicate_decls): Return early if either
650 newdecl or olddecl is error_mark_node.
623c65f1
LM
651
652 PR c++/28505
c6c7698d
JM
653 * decl.c (grokdeclarator): Return early after
654 issuing diagnostic about an incomplete type.
653109bd
LM
655
656 PR c++/28741
c6c7698d
JM
657 * tree.c (decl_anon_ns_mem_p): Robustify.
658 * decl2.c (determine_visibility): Likewise.
18ff35c6 659
015c2c66
MM
6602006-08-20 Mark Mitchell <mark@codesourcery.com>
661
662 PR c++/28341
663 * tree.c (cast_valid_in_integral_constant_expression_p): New
664 function.
665 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
666 * pt.c (tsubst_expr): Add integral_constant_expression_p
667 parameter.
668 (fold_non_dependent_expr): Adjust callers of
669 tsubst_{expr,copy_and_build}.
670 (tsubst_friend_function): Likewise.
671 (tsubst_template_arg): Likewise.
672 (tsubst_default_argument): Likewise.
673 (tsubst_decl): Likewise.
674 (tsubst): Likewise.
675 (tsubst_omp_clasuses): Likewise.
676 (regenerate_decl_fromp_template): Likewise.
677 (instantiate_decl): Likewise.
678 (tsubst_initializer_list): Likewise.
679 (tsubst_enum): Likewise.
680 (tsubst_expr): Use RECUR throughout.
681 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
682 invalid casts in integral constant expressions.
683 * parser.c (cp_parser_postfix_expression): Use
684 cast_valid_in_integral_constant_expression_p.
685 (cp_parser_cast_expression): Likewise.
686 (cp_parser_functional_cast): Likewise.
687
688 PR c++/28346
689 * pt.c (tsubst_qualified_id): Do not strip references from
690 OFFSET_REFs.
691
a97728cf
VR
6922006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
693
04499540
VR
694 PR c++/28606
695 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
696 Fix formatting.
697 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
698 for valid type-names.
699 (cp_parser_unqualified_id): Fix error handling for destructors.
700
b646edb8
VR
701 PR c++/28710
702 * decl.c (xref_tag): Improve error message. Return early on error.
703
a97728cf
VR
704 PR c++/28711
705 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
706
6d4d7b0e
PB
7072006-08-17 Paolo Bonzini <bonzini@gnu.org>
708
709 PR c++/28573
710 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
711
bd289f54
AP
7122006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
713
714 PR c++/28302
715 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
6d4d7b0e 716 perform_integral_promotions for non integral type.
bd289f54 717
9180c238
JM
7182006-08-16 Jason Merrill <jason@redhat.com>
719
720 PR c++/28385
721 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
722 if arg is a function.
723
d5d1d256
VR
7242006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
725
726 PR c++/28593
727 * init.c (build_new): Return early on invalid placement.
728
d47e3adf
LM
7292006-08-15 Lee Millward <lee.millward@codesourcery.com>
730
731 PR c++/28594
732 * pt.c (process_template_parm): Robustify.
733
b52dbbf8
SE
7342006-08-14 Steve Ellcey <sje@cup.hp.com>
735
736 PR c++/28288
737 PR c++/14556
738 * operators.def: Remove <?, ?>, <?=, and >?= operators.
739 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
740 (cp_parser_warn_min_max): Remove.
741
abab4604
JM
7422006-08-11 Jason Merrill <jason@redhat.com>
743
744 PR c++/28559
745 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
746 attributes applied to a TYPENAME_TYPE.
747
2d8ba2c7
LM
7482006-08-09 Lee Millward <lee.millward@codesourcery.com>
749
abab4604
JM
750 PR c++/28637
751 * pt.c (coerce_template_parms): Copy across the
752 invalid template arguments to the new template inner arguments.
753 (retrieve_specialization): Robustify.
2d8ba2c7 754
abab4604
JM
755 PR c++/28638
756 * pt.c (coerce_template_template_parms): Robustify.
2d8ba2c7 757
abab4604
JM
758 PR c++/28639
759 * error.c (dump_template_parms): Robustify.
2d8ba2c7 760
abab4604
JM
761 PR c++/28640
762 * pt.c (redeclare_class_template): Robustify.
2d8ba2c7 763
abab4604
JM
764 PR c++/28641
765 * pt.c (type_unification_real): Robustify.
2d8ba2c7 766
cc011e7f
LM
7672006-08-03 Lee Millward <lee.millward@codesourcery.com>
768
abab4604
JM
769 PR c++/28347
770 * decl.c (start_decl): Return error_mark_node if a
771 diagnostic was issed for an invalid typedef initialization.
cc011e7f 772
4a2f6dc0
VR
7732006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
774
c0dc47a8
VR
775 PR c++/27508
776 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
777 when parsing destructor names.
778
4a2f6dc0
VR
779 PR c++/28274
780 * decl.c (duplicate_decls): Call check_default_args here.
781 (start_preparsed_function): Do not call check_default_args.
782 * name-lookup.c (pushdecl_maybe_friend): Only call
783 check_default_args if duplicate_decls got bypassed.
784
cfc581fe
RG
7852006-08-02 Richard Guenther <rguenther@suse.de>
786
787 PR c++/28479
788 Revert
789 2006-07-05 Richard Guenther <rguenther@suse.de>
790 Andrew Pinski <pinskia@gcc.gnu.org>
791
792 PR c++/27084
793 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
794 top level qualifiers for pointer type comparisons.
795
6f67f000
MM
7962006-08-02 Mark Mitchell <mark@codesourcery.com>
797
798 PR c++/28557
799 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
800
9beafc83
MM
8012006-07-31 Mark Mitchell <mark@codesourcery.com>
802
803 PR c++/28523
804 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
805 (stabilize_call): Tweak documentation.
806 (stabilize_init): Only call stabilize_call for calls.
807
a82f93ac
SE
8082006-08-01 Steve Ellcey <sje@cup.hp.com>
809
810 PR c++/28432
811 * decl2.c (check_classfn): Remove early return.
812 * search.c (lookup_member): Return NULL with bad type.
813
f47165c9
SE
8142006-08-01 Steve Ellcey <sje@cup.hp.com>
815
816 PR c++/28256
817 * decl.c (check_initializer): Check for 1 initializer on scalar types.
818
6193b8b7
DJ
8192006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
820
821 PR debug/23336
822 * pt.c (tsubst_copy_and_build): Mark used enum types.
823 * semantics.c (finish_id_expression): Likewise.
824
5d48268f
VR
8252006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
826
827 PR c++/6634
828 * decl.c (grokdeclarator): Check whether "long" or "short" was
829 specified for non-integral types.
830
48779194
VR
8312006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
832
833 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
834
42b304f1
LM
8352006-07-28 Lee Millward <lee.millward@codesourcery.com>
836
c6c7698d
JM
837 PR c++/27668
838 PR c++/27962
839 * pt.c (process_template_parm) Store invalid template
840 parameters as error_mark_node in the paramater list.
841 (push_inline_template_parms_recursive): Handle invalid
842 template parameters.
843 (comp_template_parms): Likewise.
844 (check_default_tmpl_arg): Likewise.
845 (coerce_template_template_parms): Likewise.
846 (mangle_class_name_for_template): Likewise.
847 (tsubst_template_parms): Likewise.
848 * error.c (dump_template_argument_list): Likewise.
42b304f1 849
85661c41
KH
8502006-07-28 Kazu Hirata <kazu@codesourcery.com>
851
852 * cp-tree.h: Fix a comment typo.
853
709f9dcf
VR
8542006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
855
856 PR c++/27572
857 * decl.c (grokdeclarator): Return error_mark_node after invalid
858 typedef.
859
74b0d490
DJ
8602006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
861
862 PR c++/28460
863 * decl.c (grokvardecl): Use FROB_CONTEXT.
864 * pt.c (register_specialization): Likewise.
865
105d72c5
MM
8662006-07-23 Mark Mitchell <mark@codesourcery.com>
867
868 PR c++/28025
869 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
870 * name-lookup.c (unqualified_namespace_lookup): There is no way to
871 have a hidden name in non-namespace scopes.
872 * pt.c (tsubst_friend_class): Look for hidden names.
873 * decl.c (lookup_and_check_tag): Fix typo in comment.
874
875 * semantics.c (finish_compound_literal): Fix typo in comment.
876
bd741f34
JM
8772006-07-21 Jason Merrill <jason@redhat.com>
878
879 * decl2.c (determine_visibility): Don't propagate visibility from
880 type to decl.
881 (constrain_class_visibility): Don't warn in system headers.
882 Don't warn about pointer fields.
883
dfb84d62
MS
8842006-07-20 Mike Stump <mrs@apple.com>
885
886 * decl2.c (determine_visibility_from_class): Don't use hidden
887 visibility for explicit instantiations.
888
e488a090
VR
8892006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
890
3a2419a7
VR
891 PR c++/28250
892 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
893 valid decls. Cleanup.
894
e488a090
VR
895 PR c++/28363
896 * semantics.c (check_template_template_default_arg): Simplify
897 error handling.
898
b70f0f48
JM
8992006-07-20 Jason Merrill <jason@redhat.com>
900
901 PR c++/28407
902 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
903 const variables with implicit internal linkage.
904 * tree.c (decl_linkage): Only return lk_external if it's set.
905
906 PR c++/28409
907 * decl2.c (constrain_visibility): Ignore the anonymous namespace
908 for extern "C" decls.
909 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
910
911 * decl2.c (constrain_visibility): Remove specified and reason
912 parameters. Don't touch decls that already have explicit visibility.
913 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
914 template.
915 (determine_visibility_from_class): Reverse sense of
916 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
917 (constrain_class_visibility): Only complain about member visibility
918 if the member type is another class. Don't change visibility of the
919 current class.
920
d23f3d60
MM
9212006-07-19 Mark Mitchell <mark@codesourcery.com>
922
923 PR c++/28338
924 * decl.c (layout_var_decl): Don't call push_local_name here.
925 (initialize_artificial_var): Assert artificiality.
926 (cp_finish_decl): Call push_local_name here.
927
0225a19d
MM
9282006-07-18 Mark Mitchell <mark@codesourcery.com>
929
930 PR c++/28337
931 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
932 templates.
933
f604fc3b
MM
9342006-07-18 Mark Mitchell <mark@codesourcery.com>
935
fc429748
MM
936 PR c++/28048
937 * semantics.c (check_accessibility_of_qualified_id): Robustify.
938
f604fc3b
MM
939 PR c++/28235
940 * pt.c (tsubst_decl): Handling substitutions into a static data
941 member from within the scope of the tempalte itself.
942
492b73bd
LM
9432006-07-18 Lee Millward <lee.millward@gmail.com>
944
945 PR c++/28258
946 * method.c (locate_copy): Check for non_reference
947 returning error_mark_node.
948
e753d130 949 PR c++/28260
492b73bd
LM
950 * decl.c (duplicate_decls): Return error_mark_node
951 on ambiguous declaration.
952
9c23e505
SE
9532006-07-18 Steve Ellcey <sje@cup.hp.com>
954
955 PR c++/27495
956 * search.c (adjust_result_of_qualified_name_lookup): Change
957 assert to part of if statement.
958
77bffd4c
SE
9592006-07-17 Steve Ellcey <sje@cup.hp.com>
960
961 PR c++/28291
962 * decl.c (reshape_init_class): Return error_mark_node on error.
963
f566cc1b
SE
9642006-07-17 Steve Ellcey <sje@cup.hp.com>
965
966 PR c++/28304
967 * decl2.c (check_classfn): Return NULL_TREE on error.
968
2a50edcd
VR
9692006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
970
971 PR c++/28250
972 * name-lookup.c (pushdecl_maybe_friend): Return early on
973 error_mark_node.
974 * except.c (expand_start_catch_block): Use error_mark_node instead
975 of NULL_TREE for invalid decls.
976 * parser.c (cp_parser_exception_declaration): Return error_mark_node
977 on invalid catch parameter. Simplify.
978
42ccbf3d
JJ
9792006-07-16 Jakub Jelinek <jakub@redhat.com>
980
981 PR c++/28370
982 * decl2.c (note_vague_linkage_var): Removed.
983 (finish_static_data_member_decl): Add decl to pending_statics vector
984 directly. Do it even for non-public decls.
985
662c2e83
LM
9862006-07-15 Lee Millward <lee.millward@gmail.com>
987
988 PR c++/28292
989 * decl2.c (acceptable_java_type): Robustify. Use
990 proper Boolean return type instead of return 1.
991 (check_java_method): Don't issue error about
992 type not being an acceptable Java parameter if
993 it's error_mark_node.
994
31b29c62
LM
995 PR c++/28269
996 * parser.c (cp_parser_elaborated_type_specifier):
997 Return early if an invalid type was detected.
998
6ae9b875
VR
9992006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1000
856367df
VR
1001 PR c++/28249
1002 * parser.c (cp_parser_check_decl_spec): New function.
1003 (cp_parser_decl_specifier_seq): Factor out check for repeated
1004 decl-specifiers into cp_parser_check_decl_spec. Use it.
e3beea68 1005 (cp_parser_type_specifier_seq): Use it.
856367df 1006
0a9367cb
VR
1007 PR c++/28294
1008 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
1009 only.
1010
6ae9b875
VR
1011 PR c++/28387
1012 * decl2.c (cplus_decl_attributes): Check for invalid decls.
1013
4f543d15
VR
10142006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1015
1016 PR c++/28343
1017 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
1018 * decl2.c (grokfield): Likewise.
1019
7c0de6a5
GK
10202006-07-12 Geoffrey Keating <geoffk@apple.com>
1021
1022 * decl2.c (determine_visibility): Don't change visibility of
1023 function locals because of -fvisibility-inlines-hidden.
1024
ec0897de
JM
10252006-07-12 Jason Merrill <jason@redhat.com>
1026
1027 PR c++/28217
1028 * semantics.c (note_decl_for_pch): Don't premangle templates.
1029
4b641750
MM
10302006-07-12 Martin Michlmayr <tbm@cyrius.com>
1031
1032 * typeck.c (string_conv_p): Remove spurious quotation mark in
1033 warning.
1034
e6044ece 10352006-07-07 Lee Millward <lee.millward@gmail.com>
417fa55b
LM
1036 Andrew Pinski <pinskia@gmail.com>
1037
1038 PR c++/27820
1039 * decl.c (define_label): Return error_mark_node on error.
1040 * semantics.c (finish_label_stmt): Don't call
1041 add_stmt for invalid labels.
1042
1f0b926a
JM
10432006-07-06 Jason Merrill <jason@redhat.com>
1044
1045 PR c++/28279
1046 * decl2.c (finish_static_data_member_decl): Don't assert
1047 TREE_PUBLIC.
1048
03b1c206
JM
10492006-07-05 Jason Merrill <jason@redhat.com>
1050
1937f939
JM
1051 PR c++/13983
1052 PR c++/17519
1053 * class.c (check_field_decls): Check TYPE_PACKED after
1054 stripping array types.
1055 (finish_struct_bits): Don't copy TYPE_SIZE here.
1056
03b1c206
JM
1057 PR c++/18681
1058 * friend.c (is_friend): Fix DR 45 implementation.
1059
09b86855
RG
10602006-07-05 Richard Guenther <rguenther@suse.de>
1061 Andrew Pinski <pinskia@gcc.gnu.org>
1062
1063 PR c++/27084
1064 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1065 top level qualifiers for pointer type comparisons.
1066
cf5131b4
JM
10672006-07-01 Jason Merrill <jason@redhat.com>
1068
1069 PR c++/28215
1070 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
1071 DECL_TEMPLATE_INFO.
1072
481ac1e9
JM
10732006-06-30 Jason Merrill <jason@redhat.com>
1074
1075 PR c++/26577
1076 * call.c (build_new_method_call): Force evaluation of the
1077 instance pointer, not the object.
1078
e7d35a88
KH
10792006-06-30 Kazu Hirata <kazu@codesourcery.com>
1080
1081 * decl2.c: Fix a comment typo.
1082
444762df
JM
10832006-06-30 Jason Merrill <jason@redhat.com>
1084
1085 PR c++/18698
1086 * decl2.c (grokfield): Only try to treat the decl as an access
1087 declaration if the scope is a class.
1088
b9e75696
JM
10892006-06-29 Jason Merrill <jason@redhat.com>
1090
1091 PR c++/26905
1092 PR c++/26612
1093 PR c++/27000
1094 PR c++/26984
1095 PR c++/19134
1096 * decl2.c (determine_visibility): Overhaul.
1097 (determine_visibility_from_class): Likewise.
1098 (min_vis_r, type_visibility, constrain_visibility): New fns.
1099 (constrain_visibility_for_template): Likewise.
1100 (constrain_class_visibility): Likewise.
1101 * decl.c (cp_finish_decl): Call determine_visibility for function
1102 decls, too.
1103 * name-lookup.c (pushtag): Call determine_visibility.
1104 * decl.c (duplicate_decls): Don't copy visibility from template to
1105 specialization.
1106 * pt.c (check_explicit_specialization): Likewise.
1107 (lookup_template_class, tsubst_decl): Call determine_visibility.
1108 * class.c (finish_struct_1): Call constrain_class_visibility.
1109
1110 PR c++/26905
1111 PR c++/21675
1112 PR c++/17470
1113 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
1114 to grokdeclarator.
1115 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
1116 (cp_parser_enum_specifier): Likewise.
1117 (cp_parser_elaborated_type_specifier): Apply attributes if this
1118 declares only the class.
1119 (cp_parser_class_specifier): Apply leading attributes immediately.
1120 * semantics.c (begin_class_definition): Add attributes parameter,
1121 apply them to the type.
1122
1123 PR c++/21581
1124 PR c++/25915
1125 * tree.c (decl_anon_ns_mem_p): New function.
1126 * cp-tree.h: Declare it.
1127 * decl2.c (determine_visibility): Make anonymous namespace
1128 members static.
1129 (min_vis_r, constrain_visibility): Likewise.
1130 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
1131 pseudo-types.
1132 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
1133 global_namespace.
1134 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
1135 on anonymous namespaces.
1136
6150b602
JM
11372006-06-28 Jason Merrill <jason@redhat.com>
1138
1139 PR c++/27424
1140 * pt.c (convert_template_argument): Pass all template arguments
1141 on to coerce_template_template_parms.
1142
344f237b
LM
11432006-06-25 Lee Millward <lee.millward@gmail.com>
1144 Mark Mitchell <mark@codesuorcery.com>
1145
1146 PR c++/28054
1147 * decl2.c (grokbitfied): Remove check for grokdeclarator
1148 returning NULL_TREE, instead check for error_mark_node
1149 to indicate failure.
1150 * decl.c (grokdeclarator): Adjust block comment.
1151
0fdc23b9
LM
11522006-06-25 Lee Millward <lee.millward@gmail.com>
1153
1154 PR c++/28051
1155 * mangle.c (mangle_conv_op_name_for_type): Check for
1156 invalid types.
1157 * name-lookup.c (push_class_level_binding): Robustify.
1158 (do_class_using_decl): Return early if name is error_mark_node.
1159
c5f8391c
SE
11602006-06-23 Steve Ellcey <sje@cup.hp.com>
1161
1162 PR c++/28114
1163 * name-lookup.c (pushtag): Return if we have error_mark_node.
1164
e135a637
SE
11652006-06-23 Steve Ellcey <sje@cup.hp.com>
1166
1167 PR c++/27019
1168 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
1169
a3d536f1
VR
11702006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1171
0b9cb8c2
VR
1172 PR c++/28112
1173 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
1174 arguments. Fix comment.
1175
a3d536f1
VR
1176 PR c++/11468
1177 * init.c (build_new_1): Handle error_mark_nodes returned by
1178 build_java_class_ref.
1179 (build_java_class_ref): Do not abort compilation, but return
1180 error_mark_node. Improve error message. Fix indentation.
1181
4e2bb0a4
DS
11822006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
1183
1184 PR target/27789
1185 * decl.c (start_decl): Check that dllimports are not initialized.
1186
a8fe5a30
LM
11872006-06-22 Lee Millward <lee.millward@gmail.com>
1188
1189 PR c++/27805
1190 * typeck2.c (build_m_component_ref): Use error_operand_p.
9a171ca4
LM
1191
1192 PR c++/27821
1193 * decl.c (grokdeclarator): Return error_mark_node on
1194 invalid uses of the scope resolution operator.
a8fe5a30 1195
717f8053
VR
11962006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1197
728da672
VR
1198 PR c++/28111
1199 * pt.c (determine_specialization): Check for invalid decls.
1200
3e9ac7e5
VR
1201 PR c++/28110
1202 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
1203 parameters.
1204
717f8053
VR
1205 PR c++/28109
1206 * rtti.c (get_tinfo_decl_dynamic): Robustify.
1207
2e5d2970
VR
12082006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1209
1210 PR c++/28052
1211 * init.c (push_base_cleanups): Skip members with invalid types.
1212 * typeck.c (build_class_member_access_expr): Robustify.
1213
a1d08991
MM
12142006-06-19 Mark Mitchell <mark@codesourcery.com>
1215
1216 * pt.c (instantiate_template): Fix typo in comment.
1217
5ff5e6c8
RG
12182006-06-19 Richard Guenther <rguenther@suse.de>
1219
1220 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
1221 power-of-two token vector size.
1222
75a82978
MM
12232006-06-16 Mark Mitchell <mark@codesourcery.com>
1224
da71e18c
MM
1225 PR c++/28016
1226 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
1227 members.
1228
80eb9ddd
MM
1229 PR c++/27979
1230 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
1231 types.
1232
75a82978
MM
1233 PR c++/27884
1234 * decl.c (have_extern_spec): Remove.
1235 (start_decl): Do not check have_extern_spec.
1236 (start_function): Likewise.
1237 * cp-tree.h (have_extern_spec): Remove.
1238 * parser.c (cp_parser_linkage_specification): Don't set
1239 have_extern_spec.
1240 (cp_parser_init_declarator): Likewise.
1241 (cp_parser_parameter_declaration): Do not treat parameters as
1242 within the scope of an unbraced linkage specification.
1243
a95799ec
MM
12442006-06-15 Mark Mitchell <mark@codesourcery.com>
1245
4e95268d
MM
1246 PR c++/27689
1247 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
1248 macro.
1249 * pt.c (unify): Use it.
1250
2954333a
MM
1251 PR c++/27666
1252 * call.c (build_conditional_expr): Robustify.
1253
a95799ec
MM
1254 PR c++/27640
1255 * pt.c (instantiate_template): Set processing_template_decl to
1256 zero while performing substitutions.
1257
cf24598a
MM
12582006-06-14 Mark Mitchell <mark@codesourcery.com>
1259
4c4e648c
MM
1260 PR c++/27665
1261 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
1262 identify destructors.
1263 (cp_parser_nested_name_specifier_opt): Remove invalid
1264 optimization.
1265 (cp_parser_template_id): Refine heuristic for determining whether
1266 we are entering a scope.
1267
0c926bff 1268 PR c++/27648
84019f23
MM
1269 * parser.c (cp_parser_declarator): Robustify.
1270
fe89d797
MM
1271 PR c++/26559
1272 * pt.c (tsubst_expr): Use finish_omp_atomic.
1273 (value_dependent_expression_p): All CALL_EXPRs are dependent.
1274 * semantics.c (finish_omp_atomic): Rework to use standard
1275 paradigms for handling non-dependent expressions.
1276
070809e3
MM
12772006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1278
1279 * typeck.c (build_modify_expr): Tidy diagnostic message.
1280
12812006-06-14 Mark Mitchell <mark@codesourcery.com>
1282
cf24598a
MM
1283 PR c++/28018
1284 * typeck.c (build_modify_expr): Disallow array assignment.
1285
438d94ed
GDR
12862006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1287
1288 * cp-tree.def: Fix typo.
1289
ace4831d
MM
12902006-06-13 Mark Mitchell <mark@codesourcery.com>
1291
1292 PR c++/27227
1293 * decl.c (decls_match): Allow an extern "C" variable declarations
1294 from different namespaces to match.
1295 (duplicate_decls): Disallow redeclaring a variable with a
1296 different linkage specification.
1297
10827cd8
JJ
12982006-06-13 Jakub Jelinek <jakub@redhat.com>
1299
1300 PR middle-end/27793
1301 * cp-tree.h (cxx_int_tree_map): New struct.
1302 (struct language_function): Add extern_decl_map field.
1303 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
1304 to cp_function_chain->extern_decl_map hash table instead of
1305 copying over DECL_UID.
1306 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
1307 functions.
1308 (cp_genericize_r): Remap DECL_EXTERN local decls using
1309 cp_function_chain->extern_decl_map hash table.
1310 * decl.c (finish_function): Clear extern_decl_map.
1311
8bdb09cb
VR
13122006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1313
4c65a534
VR
1314 PR c++/27601
1315 * semantics.c (finish_offsetof): Handle pseudo-destructors.
1316
ff8fe3e0
VR
1317 PR c++/27933
1318 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
1319 if lookup fails.
1320
8bdb09cb
VR
1321 PR c++/27951
1322 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
1323 fails.
1324
f0b99d6c
RS
13252006-06-12 Roger Sayle <roger@eyesopen.com>
1326
1327 PR c++/21210
1328 * typeck2.c (build_functional_cast): Use cp_convert to construct
1329 non-aggregate initializers instead of the user-level build_c_cast.
1330
c291f8b1
VR
13312006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1332
1333 PR c++/27601
1334 * cp-tree.h (finish_offsetof): Add prototype.
1335 * semantics.c (finish_offsetof): New function.
1336 * parser.c (cp_parser_builtin_offsetof): Call it instead of
1337 fold_offsetof.
1338 * pt.c (tsubst_copy_and_build): Likewise.
1339
b6ca28e6
MM
13402006-06-06 Mark Mitchell <mark@codesourcery.com>
1341
1342 PR c++/27177
1343 * call.c (standard_conversion): Require that the derived type be
1344 complete when performing a derived-to-base conversion.
1345
2b643eda
MM
13462006-06-04 Mark Mitchell <mark@codesourcery.com>
1347
1348 PR c++/27819
1349 * decl.c (cp_finish_decl): Process initializers for static data
1350 members with non-dependent initializers, even in templates.
1351
1352 PR c++/27722
1353 * decl.c (maybe_deduce_size_from_array_init): If the declaration
1354 is erroneous, give it an erroneous type.
1355 (layout_var_decl): If the type is erroneous, give up.
1356 (check_initializer): Likewise.
1357
1358 PR c++/27807
1359 * cp-tree.h (TYPE_OBJ_P): New macro.
1360 (TYPE_PTROB_P): Use it.
1361 (TYPE_REF_OBJ_P): Likewise.
1362 * semantics.c (finish_compound_literal): Do not permit compound
1363 literals of non-object types.
1364
1365 PR c++/27806
1366 * typeck.c (original_type): Robustify.
1367
1ac8104c
VR
13682006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1369
1370 PR c++/27804
1371 * init.c (constant_value_1): Return decl instead of error_mark_node
1372 for invalid initializers.
1373
a0c04f8e
AP
13742006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1375
1376 PR c++/27592
1377 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
1378 on operand of the COND_EXPR for the null pointer check.
1379
5c147e22
AP
13802006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1381
1382 PR c++/26740
1383 * typeck.c (build_unary_op): Mark the function as being used.
1384
f3d5aeeb
AO
13852006-06-01 Alexandre Oliva <aoliva@redhat.com>
1386
1387 PR c++/26660
1388 * parser.c (cp_parser_initial_pragma): Read one more token for
1389 caller after reading PCH file in.
1390
07471dfb
MM
13912006-05-31 Mark Mitchell <mark@codesourcery.com>
1392
1393 PR c++/27801
1394 * call.c (perform_implicit_conversion): Do not actually perform
1395 conversions in templates.
1396
1397 PR c++/26496
1398 * call.c (resolve_args): Check for invalid uses of bound
1399 non-static member functions.
1400 * init.c (build_offset_ref): Return error_mark_node for errors.
1401
1402 PR c++/27385
1403 * decl.c (reshape_init): Robustify.
1404 (reshape_init_array_1): Likewise.
1405
606791f6
MM
14062006-05-30 Mark Mitchell <mark@codesourcery.com>
1407
c7baf9e9
MM
1408 PR c++/27808
1409 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
1410 "friend" specifiers that do not appear in class scopes.
1411
606791f6
MM
1412 PR c++/27803
1413 * class.c (check_bitfield_decl): Ensure that all bitfields have
1414 integral type.
1415
944fd207
KH
14162006-05-29 Kazu Hirata <kazu@codesourcery.com>
1417
1418 * pt.c (convert_nontype_argument): Fix a typo in an error
1419 message.
1420
ddd0b831
KH
14212006-05-28 Kazu Hirata <kazu@codesourcery.com>
1422
1423 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
1424 spelling conventions.
1425
e92fb501
MM
14262006-05-24 Mark Mitchell <mark@codesourcery.com>
1427
1428 PR c++/20103
1429 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
1430 error_mark_node to indicate an initialization is OK.
1431 (start_decl): Likewise. Adjust call to start_decl_1.
1432 (start_decl_1): Add initialized parameter. Simplify.
1433 * except.c (initialize_handler_parm): Adjust call to
1434 setart_decl_1.
1435 (expand_start_catch_block): Let cp_finish_decl initialize catch
1436 parameters.
1437 * cp-tree.h (start_decl_1): Adjust prototype.
1438 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
1439 (instantiate_decl): Let cp_finish_decl handle initialization.
1440 * semantics.c (finish_compound_literal): Create a temporary
1441 variable for the literal.
1442 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
1443 cases.
1444 * decl2.c (finish_static_data_member_decl): Don't set
1445 DECL_INITIAL.
1446 (grokfield): Do not try to initialize functions.
1447
29a1da1c
MM
14482006-05-23 Mark Mitchell <mark@codesourcery.com>
1449
1450 PR c++/20173
1451 * pt.c (determine_specialization): Disallow partial
1452 specializations of templates.
1453
ba5719d9
VR
14542006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1455
1bd229b7
VR
1456 PR c++/27716
1457 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
1458
ba5719d9
VR
1459 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
1460
b655f214
MM
14612006-05-21 Mark Mitchell <mark@codesourcery.com>
1462
1463 PR c++/27210
1464 * cp-tree.h (cp_save_expr): New function.
1465 * init.c (build_new): Correct logic for zero-element array
1466 warning. Use cp_save_expr.
1467 * tree.c (cp_save_expr): New function.
1468
13dbe691
VR
14692006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1470
1471 PR c++/27398
1472 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
1473 or void_type_node.
1474
d593cb3d
MS
14752006-05-19 Mike Stump <mrs@apple.com>
1476
1477 * typeck.c (default_conversion): Remove static.
1478
eaf6fb90
MM
14792006-05-19 Mark Mitchell <mark@codesourcery.com>
1480
1481 PR c++/26433
1482 * cp-tree.h (begin_function_try_block): Change prototype.
1483 (finish_function_handler_sequence): Likewise.
1484 * parser.c (cp_parser_function_try_block): Adjust calls.
1485 * pt.c (tsubst_expr): Adjust calls.
1486 * semantics.c (begin_function_try_block): Create an artificial
1487 outer scope.
1488 (finish_function_handler_sequence): Close it.
1489
41990f96
MM
14902006-05-18 Mark Mitchell <mark@codesourcery.com>
1491
1492 PR c++/27471
1493 PR c++/27506
1494 * typeck.c (decay_conversion): Convert bitfields to their declared
1495 types here. Improve documentation. Avoid use of cp_convert.
1496 (default_conversion): Make it static. Perform integral promotions
1497 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
1498 conversions.
1499 * init.c (build_init): Remove.
1500 (expand_default_init): Do not call rvalue.
1501 * call.c (null_ptr_cst_p): Robustify.
1502 (build_conditional_expr): Tidy.
1503 * except.c (build_throw): Do not perform lvalue-to-rvalue
1504 conversion on operand before initializing temporary.
1505 * tree.c (convert.h): Include it.
1506 (convert_bitfield_to_declared_type): Use convert_to_integer, not
1507 cp_convert.
1508 (rvalue): Don't convert bitfields to their declared type here.
1509 * cp-tree.h (build_init): Remove.
1510 (default_conversion): Likewise.
1511 * typeck2.c (build_m_component_ref): Do not perform
1512 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
1513 conversions here. Correct error message.
1514
bfce0853
MM
15152006-05-17 Mark Mitchell <mark@codesourcery.com>
1516
ceacde63
MM
1517 PR c++/26122
1518 * decl2.c (check_member_template): Remove checks for virtual
1519 functions.
1520 * parser.c (cp_parser_function_specifier_opt): Complain about
1521 virtual templates.
1522 (cp_parser_pure_specifier): Likewise.
1523
bfce0853 1524 PR c++/26068
3db45ab5 1525 * parser.c (cp_parser_set_storage_class): Check for
bfce0853
MM
1526 invalid uses of storage classes on unbraced linkage
1527 specifications.
1528 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
1529 to cp_parser_set_storage_class.
1530
761041be
JJ
15312006-05-17 Jakub Jelinek <jakub@redhat.com>
1532
aa0e52db
JJ
1533 PR c++/27491
1534 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
1535 on CONSTRUCTORs.
1536
761041be
JJ
1537 PR middle-end/27415
1538 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1539 on combined parallel workshare constructs.
1540 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
1541
14c7833c
L
15422006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1543
1544 PR driver/26885
1545 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
1546
e1039697
MM
15472006-05-15 Mark Mitchell <mark@codesourcery.com>
1548
6b648482
MM
1549 PR c++/27339
1550 * cp-tree.h (perform_access_checks): New function.
1551 * semantics.c (perform_access_checks): New function.
1552 (perform_deferred_access_checks): Use it.
1553 * parser.c (cp_parser_simple_declaration): Adjust call to
1554 cp_parser_init_declarator.
1555 (cp_parser_type_parameter): Do not defer checks in default
1556 arguments.
1557 (cp_parser_explicit_specialization): Adjust call to
1558 cp_parser_single_declaration.
1559 (cp_parser_init_declarator): Perform template-parameter access
3db45ab5 1560 checks.
6b648482
MM
1561 (cp_parser_parameter_declaration): Do not defer checks for
1562 template parameter default arguments.
1563 (cp_parser_template_declaration_after_export): Gather access
1564 checks for template parameters, and pass them to
1565 cp_parser_single_declaration.
1566 (cp_parser_template_parameter_access_checks): New function.
1567 (cp_parser_single_declaration): Add checks parameter.
1568
e1039697
MM
1569 PR c++/27505
1570 * call.c (convert_like_real): Convert bitfields to their declared
1571 types when forming an rvalue.
1572 * tree.c (convert_bitfield_to_declared_type): New function.
1573 (rvalue): Use it.
1574 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
1575
dca56f77
VR
15762006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1577
7e497d0c
VR
1578 PR c++/27582
1579 * pt.c (any_dependent_template_arguments_p): Return early on invalid
1580 argument list.
1581
0616700c
VR
1582 PR c++/27581
1583 * search.c (adjust_result_of_qualified_name_lookup): Skip on
1584 invalid context_class.
1585
ad47b891
VR
1586 PR c++/27315
1587 * pt.c (do_decl_instantiation): Return early on invalid decl.
1588
7c60008e
VR
1589 PR c++/27559
1590 * pt.c (push_template_decl_real): Return error_mark_node instead
1591 of broken decl.
1592
dca56f77
VR
1593 PR c++/27496
1594 * pt.c (tsubst_friend_class): Return early on invalid friend
1595 declarations.
1596
05b44921
L
15972006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
1600 (cp/decl2.o): Likewise.
1601 (cp/typeck.o): Likewise.
1602 (cp/cvt.o): Likewise.
1603 (cp/parser.o): Likewise.
1604 (cp/call.o): Replace target.h with $(TARGET_H).
1605
c497db75
AO
16062006-05-14 Alexandre Oliva <aoliva@redhat.com>
1607
1608 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
1609 COMPONENT_REF alone.
1610
80cdd94a
VR
16112006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1612
1613 PR c++/27547
1614 * decl.c (copy_fn_p): Return early on non-member functions.
1615
15218346
VR
16162006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1617
1618 PR c++/27447
1619 * decl2.c (build_memfn_type): Skip invalid functions and class types.
1620
6af455d7
VR
16212006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1622
b166a559
VR
1623 PR c++/27427
1624 * pt.c (convert_nontype_argument): Return early on invalid arguments.
1625
a14de1af
VR
1626 * pt.c (process_template_parm): Remove superfluous temporary.
1627
620188c9
VR
1628 PR c++/27430
1629 * pt.c (process_template_parm): Handle erroneous non-type parameters.
1630
57b52959
VR
1631 PR c++/27423
1632 * typeck.c (convert_for_initialization): Skip erroneous types.
1633
6af455d7
VR
1634 PR c++/27422
1635 * typeck.c (convert_arguments): Return early on args with
1636 invalid types.
1637
8d8d1a28
AH
16382006-05-03 Aldy Hernandez <aldyh@redhat.com>
1639
1640 PR/21391
1641 * typeck.c (build_static_cast_1): Save casted types in used types
1642 hash table.
1643 (build_reinterpret_cast_1): Same.
1644 * rtti.c (build_dynamic_cast_1): Same.
1645
76c5e6e0
JJ
16462006-05-04 Jakub Jelinek <jakub@redhat.com>
1647
1648 PR c++/27359
1649 * parser.c (cp_parser_omp_for_loop): Only call
1650 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
1651 called.
1652
7137605e
MM
16532006-05-02 Mark Mitchell <mark@codesourcery.com>
1654
cc328145
MM
1655 PR c++/27102
1656 * decl.c (grokdeclarator): Robustify checks for defining members
1657 of incomplete types.
1658
7137605e
MM
1659 PR c++/27309
1660 * class.c (add_method): Call grok_special_member_properties.
1661 * decl.c (grokdeclarator): Don't call it here.
1662 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
1663 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
1664 constructor.
1665 (start_method): Don't call grok_special_member_properties.
1666 * method.c (implicitly_declare_fn): Likewise.
1667 * pt.c (instantiate_class_template): Likewise.
1668 * decl2.c (grokfield): Likewise.
1669
077b0dfb
JJ
16702006-05-02 Jakub Jelinek <jakub@redhat.com>
1671
1672 PR middle-end/27337
1673 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
1674 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
1675 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
1676
5a8613b2
MM
16772006-04-30 Mark Mitchell <mark@codesourcery.com>
1678
1679 PR c++/27094
1680 * pt.c (tsubst_default_argument): Increment function_depth around
1681 call to tsubst_expr.
1682 * parser.c (cp_parser_parameter_declaration): Likewise.
1683 * decl2.c (mark_used): Tidy.
1684
85990800
VR
16852006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1686
1687 PR c++/27278
1688 * decl.c (grok_op_properties): Skip operators with invalid args
1689 when checking for class-type or enum-type args.
1690
139a78c7
VR
16912006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1692
1693 PR c++/27279
1694 * decl.c (copy_fn_p): Skip functions with invalid first arg.
1695
8fcd79cb
MM
16962006-04-27 Mark Mitchell <mark@codesourcery.com>
1697
33a1b314
MM
1698 PR c++/27292
1699 * tree.c (rvalue): Convert bitfields to their declared types.
1700
8fcd79cb
MM
1701 PR c++/27102
1702 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
1703 TYPENAME_TYPE.
1704
efe1ad46
MM
17052006-04-24 Mark Mitchell <mark@codesourcery.com>
1706
1707 PR c++/27292
1708 * typeck.c (decay_conversion): Don't adjust bitfield types.
1709 (perform_integral_promotions): Treat bitfield enums as enums, not
1710 as short integer types.
1711 * tree.c (rvalue): Convert bitfields to their correct types.
1712
4e3bd7d5
VR
17132006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1714
1715 PR c++/19963
1716 * class.c (layout_class_type): Skip fields with invalid types.
1717
38a4afee
MM
17182006-04-23 Mark Mitchell <mark@codesourcery.com>
1719
e2537f2c
MM
1720 PR c++/26912
1721 * cp-tree.h (build_this_parm): Declare.
1722 (grok_method_quals): Remove.
1723 (build_memfn_type): Declare.
1724 (build_artificial_parm): Declare.
1725 (do_friend): Remove quals parameter.
1726 * decl.c (build_this_parm): New function.
1727 (grokfndecl): Use it. Do not pass quals to grokclassfn.
1728 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
1729 unnecessary TYPE_DECLs. Correct qualification of member function
1730 types. Tidy.
1731 * method.c (implicitly_declare_fn): Use build_this_parm.
1732 * friend.c (do_friend): Remove quals parameter.
1733 * decl2.c (grok_method_quals): Remove.
1734 (build_memfn_type): New function.
1735 (build_artificial_parm): Give it external linkage.
1736 (grokclassfn): Remove quals parameter. Do not build "this"
1737 PARM_DECL here.
1738
38a4afee
MM
1739 PR c++/26534
1740 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
1741 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
1742 (decay_conversion): Convert bitfield expressions to the correct
1743 type.
1744 (build_modify_expr): Remove spurious conversions.
1745 * class.c (layout_class_type): Modify the type of bitfields to
3db45ab5 1746 indicate a limited range.
38a4afee
MM
1747 * call.c (standard_conversion): Adjust the type of bitfield
1748 expressions used in an rvalue context.
1749 (build_conditional_expr): Likewise.
3db45ab5 1750
9f9a713e
KH
17512006-04-22 Kazu Hirata <kazu@codesourcery.com>
1752
1753 * decl.c: Fix comment typos.
1754
7a0b46c9
EC
17552006-04-21 Eric Christopher <echristo@apple.com>
1756
1757 * decl.c: Fix typo in function name.
1758
d149fba0
VR
17592006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1760
94d285a5
VR
1761 PR c++/26558
1762 * parser.c (cp_parser_class_name): Check for invalid typenames.
1763 Rearrange code.
1764
0014c247
VR
1765 PR c++/26739
1766 * pt.c (tsubst_friend_function): Return early if
1767 pushdecl_namespace_level fails.
1768
b815a631
VR
1769 PR c++/26036
1770 * typeck.c (convert_arguments): Return error_mark_node instead of
1771 error_mark_list.
1772 * cp-tree.h (error_mark_list): Remove declaration.
1773 * decl.c (error_mark_list): Remove definition.
1774 (cxx_init_decl_processing): Do not initialize error_mark_list.
1775
d149fba0
VR
1776 PR c++/10385
1777 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
1778 before calling convert_to_reference.
1779 * cvt.c (convert_to_reference): Assert that reftype is a
1780 REFERENCE_TYPE.
1781
fa6098f8
MM
17822006-04-19 Mark Mitchell <mark@codesourcery.com>
1783
1784 PR c++/27102
1785 * class.c (currently_open_class): Tidy.
1786 * decl.c (grokdeclarator): If we encounter an erroneous
1787 declarator, assume that we have already issued an error message
1788 and return. Return error_mark_node instead of NULL_TREE in more
1789 places. Issue errors about function definitions that do not have
1790 a function declarator. Check for complete types for all function
7a0b46c9 1791 definitions.
fa6098f8
MM
1792 * cp-tree.h (cp_error_declarator): Remove.
1793 (currently_open_class): Change return type.
1794 * parser.c (cp_parser_id_expression): Add optional_p parameter.
1795 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
1796 (cp_parser_id_expression): Likewise.
1797 (cp_parser_unqualified_id): If the name is optional, return
1798 NULL_TREE.
1799 (cp_parser_postfix_dot_deref_expression): Adjust calls.
1800 (cp_parser_type_parameter): Likewise.
1801 (cp_parser_unqualified_id): Likewise.
1802 (cp_parser_direct_declarator): Likewise.
1803 (cp_parser_declarator_id): Add optional_p parameter.
1804 (cp_parser_function_definition_from_specifiers_and_declarator):
1805 Assume that start_function indicates failure only if it has issued
1806 an error.
1807 (cp_parser_omp_var_list_no_open): Adjust calls.
7a0b46c9 1808
778f6a08
JJ
18092006-04-17 Janis Johnson <janis187@us.ibm.com>
1810
1811 PR c++/26114, c++/26115
1812 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
1813 * class.c (check_field_decls): Ditto.
1814
7304fcb4
VR
18152006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1816
1817 * init.c (build_offset_ref): Remove superfluous temporary.
1818
e13d2b4e
MM
18192006-04-16 Mark Mitchell <mark@codesourcery.com>
1820
1821 PR c++/26365
1822 * typeck.c (finish_class_member_access_expr): Robustify
1823
53824026
KH
18242006-04-15 Kazu Hirata <kazu@codesourcery.com>
1825
1826 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
1827 * pt.c: Include vecprim.h.
1828 (inline_parm_levels): Change the type to VEC(int,heap) *.
1829 (inline_parm_levels_used): Remove.
1830 (maybe_begin_member_template_processing,
1831 maybe_end_member_template_processing): Use VEC instead of
1832 VARRAY.
1833
e69460b6
KH
1834 * cp/call.c: Fix comment typos.
1835
aa9d194e
MM
18362006-04-12 Mark Mitchell <mark@codesourcery.com>
1837
1838 * parser.c (cp_parser_init_declarator): Initialize local variables
1839 aggressively.
1840
21137095
RS
18412006-04-12 Roger Sayle <roger@eyesopen.com>
1842
1843 * parser.c (cp_parser_init_declarator): Initialise
1844 is_parenthesized_init to false to avoid compiler warning.
1845
63c9a190
MM
18462006-04-11 Mark Mitchell <mark@codesourcery.com>
1847
1848 * cp-tree.h (build_operator_new_call): Adjust prototype.
1849 (build_new_method_call): Likewise.
1850 (build_op_delete_call): Likewise.
1851 * init.c (build_raw_new_expr): New function.
1852 (build_new_1): Pass information as parameters, rather than
1853 bundling it into a NEW_EXPR.
1854 (build_new): Adjust accordingly.
1855 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
1856 (build_delete): Likewise.
1857 * decl.c (finish_destructor_body): Likewise.
1858 * call.c (build_operator_new_call): Return the allocation function
1859 used.
1860 (build_op_delete_call): Take allocation function as parameter.
1861 (build_special_member_call): Adjust call to build_new_method_call.
1862 (build_new_method_call): Return function called.
1863 * pt.c (tsubst_copy_and_build): Adjust call to
1864 build_new_method_call.
1865 * semantics.c (finish_call_expr): Likewise.
1866 * parser.c (cp_parser_postfix_expression): Likewise.
1867 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
7a0b46c9 1868 "incomplete", not "undefined", types.
63c9a190
MM
1869
1870 PR c++/26295
1871 * decl.c (grokdeclarator): Remove namespace-handling code for
7a0b46c9 1872 pointers-to-members.
63c9a190
MM
1873 * parser.c (cp_parser_ptr_operator): Check for qualified names
1874 using namespaces.
1875
1876 PR c++/26122
1877 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
1878 whether or not to look for a pure-specifier.
1879 (cp_parser_member_declaration): Likewise.
1880
84dc00e8
KH
18812006-04-08 Kazu Hirata <kazu@codesourcery.com>
1882
1883 * decl2.c, pt.c, semantics.c: Fix comment typos.
1884
4b91b67b
RS
18852006-04-06 Roger Sayle <roger@eyesopen.com>
1886
1887 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
1888
0b1307e5
JM
18892006-04-05 Jason Merrill <jason@redhat.com>
1890
1891 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
1892 default hidden visibility for anonymous namespace.
1893
5cd88d68
RS
18942006-03-29 Roger Sayle <roger@eyesopen.com>
1895
1896 PR c++/22494
1897 * init.c (build_vec_delete_1): Convert BASE pointer's type to
1898 the base pointer type to avoid a type mismatch in the EQ_EXPR.
1899
e713adf6
CD
19002006-03-24 Carlos O'Donell <carlos@codesourcery.com>
1901
1902 * search.c (maybe_suppress_debug_info): If
1903 flag_emit_class_debug_always then don't suppress.
1904
61edcf65
JM
19052006-03-22 Jason Merrill <jason@redhat.com>
1906
e753d130
AP
1907 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
1908 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
61edcf65 1909
fae2b46b
JJ
19102006-03-21 Jakub Jelinek <jakub@redhat.com>
1911
1912 PR c++/26691
1913 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
1914
aa09f986
JM
19152006-03-21 Jason Merrill <jason@redhat.com>
1916
1917 PR c++/21581
1918 * parser.c (cp_parser_declaration): Support attributes on
1919 anonymous namespaces.
7a0b46c9 1920 * name-lookup.c (push_namespace_with_attribs): Anonymous
aa09f986
JM
1921 namespaces default to hidden visibility.
1922
0ed5edac
JM
19232006-03-20 Jason Merrill <jason@redhat.com>
1924
1925 PR c++/21764, c++/19238
1926 * decl.c (cp_finish_decl): Call determine_visibility later.
1927 (start_preparsed_function): Likewise.
1928 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
1929 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
7a0b46c9 1930 * name-lookup.h (struct cp_binding_level): Add has_visibility
0ed5edac
JM
1931 bitfield.
1932 * name-lookup.c: Include c-pragma.h.
1933 (push_namespace_with_attribs): Split out from push_namespace.
1934 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
1935 (leave_scope): Pop visibility if appropriate.
1936 * decl2.c (determine_visibility_from_class): Split out from...
7a0b46c9 1937 (determine_visibility): ...here. Handle function scope and
0ed5edac 1938 nested classes.
7a0b46c9 1939 (import_export_decl): Move visibility handling to
0ed5edac
JM
1940 determine_visibility_from_class.
1941 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
1942 attributes on namespace declarations.
1943
3cc189f5
VR
19442006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1945
1946 PR c++/6634
0ed5edac 1947 * decl.c (grokdeclarator): Do not accept long long double.
3cc189f5
VR
1948 Reorganize checks for invalid (combinations of) type modifiers.
1949 Quote modifiers in messages.
1950
229970c4
JM
19512006-03-09 Jason Merrill <jason@redhat.com>
1952
1953 PR c++/16387, c++/16389
1954 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
1955 (cxx_sizeof_or_alignof_expr): Split out from here.
1956
1799e5d5
RH
19572006-03-09 Diego Novillo <dnovillo@redhat.com>
1958
1959 Merge from gomp-20050608-branch
1960
1961 2006-02-02 Diego Novillo <dnovillo@redhat.com>
1962
1963 * decl.c (pop_labels_1): Use appropriate pointer casting.
1964 (poplevel_named_label_1): Likewise.
1965 (named_label_entry_hash): Likewise.
1966 (named_label_entry_eq): Likewise.
1967 (check_goto): Likewise.
1968 (define_label): Likewise.
1969
1970 2006-01-26 Diego Novillo <dnovillo@redhat.com>
1971
1972 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
1973 of TREE_BLOCK.
1974 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
1975 instead of TREE_CODE/TREE_OPERAND.
1976 * semantics.c: Likewise.
1977 * parser.c: Likewise.
1978
1979 2005-11-10 Diego Novillo <dnovillo@redhat.com>
1980
1981 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
1982 target does not support TLS.
1983
1984 2005-11-09 Jakub Jelinek <jakub@redhat.com>
1985
1986 * decl.c (redeclaration_error_message): Don't error about
1987 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
1988 (olddecl).
1989
1990 2005-11-08 Jakub Jelinek <jakub@redhat.com>
1991
1992 PR c++/24735
1993 * semantics.c (finish_omp_barrier, finish_omp_flush): New
1994 functions.
1995 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
1996 (cp_parser_omp_flush): Call finish_omp_flush.
1997 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
1998 prototypes.
1999
2000 PR c++/24734
2001 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
2002
2003 2005-11-03 Jakub Jelinek <jakub@redhat.com>
2004
2005 * semantics.c (finish_omp_threadprivate): Error on class-scope
2006 variables.
2007
2008 2005-11-02 Jakub Jelinek <jakub@redhat.com>
2009
2010 * parser.c (cp_parser_omp_all_clauses): If some clause
2011 type is not allowed, don't remove just one of the
2012 clauses, but all clauses added in that loop round.
2013
2014 * semantics.c (finish_omp_clauses): Fix function
2015 comment. Don't handle non-const or mutable specially,
2016 as const and not mutable is predetermined shared and
2017 that leads to double error. Don't ICE if copyin var is
2018 PARM_DECL.
2019
2020 PR c++/24613
2021 * parser.c (cp_parser_pragma): Diagnose
2022 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
2023 construct.
2024
2025 * semantics.c (finish_omp_threadprivate): Error if V
2026 is automatic variable or has incomplete type.
2027
2028 2005-11-01 Diego Novillo <dnovillo@redhat.com>
2029
2030 * parser.c (cp_parser_omp_all_clauses): Use
2031 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
2032
2033 2005-11-01 Diego Novillo <dnovillo@redhat.com>
2034
2035 * parser.c (cp_parser_omp_all_clauses): When emitting an
2036 error message, remove the invalid clause from the list.
2037
2038 2005-10-31 Diego Novillo <dnovillo@redhat.com>
2039
2040 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
2041 combined parallel+workshare directives.
2042
2043 2005-10-31 Richard Henderson <rth@redhat.com>
2044
2045 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
2046 Use cxx_omp_clause_dtor.
2047 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
2048 (cxx_omp_clause_dtor): New.
2049 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
2050 (cxx_omp_clause_default_ctor): Use it.
2051 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
2052 Likewise.
2053 (cxx_omp_clause_dtor): New.
2054 * semantics.c (finish_omp_clauses): Rewrite cdtor
2055 checking to fill in CP_OMP_CLAUSE_INFO. Don't
2056 specialcase LASTPRIVATE for removal.
2057 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
2058 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
2059
2060 2005-10-28 Jakub Jelinek <jakub@redhat.com>
2061
2062 * semantics.c (finish_omp_threadprivate): If
2063 DECL_RTL_SET_P, call make_decl_rtl again so that
2064 encode_section_info can update SYMBOL_REF's flags.
2065
2066 2005-10-26 Jakub Jelinek <jakub@redhat.com>
2067
2068 * semantics.c (finish_omp_for): Don't segfault if COND
2069 or INCR is NULL. If not calling c_finish_omp_for
2070 right away and one of COND and INCR is NULL, issue
2071 error and don't expand anything.
2072
2073 PR c++/24512
2074 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
2075 * semantics.c (finish_omp_for): Likewise. Set
2076 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
2077 into the current statement list if not processing
2078 template decl or pass it to c_finish_omp_for.
2079
2080 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
2081 into PRE_BODY statement list. Pass it to finish_omp_for.
2082 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
2083 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
2084 finish_omp_for. Put all the statements into sk_omp
2085 scope.
2086
2087 2005-10-25 Jakub Jelinek <jakub@redhat.com>
2088
2089 PR c++/24516
2090 * parser.c (struct cp_parser): Rename in_iteration_statement
2091 field to in_statement.
2092 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2093 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
2094 (cp_parser_new, cp_parser_begin_omp_structured_block,
2095 cp_parser_end_omp_structured_block,
2096 cp_parser_omp_for_loop): Adjust for
2097 in_iteration_statement renaming.
2098 (cp_parser_selection_statement): Save
2099 parser->in_iteration, or it temporarily with
2100 IN_SWITCH_STMT for the
2101 cp_parser_implicitly_scoped_statement call.
2102 (cp_parser_iteration_statement): Adjust for
2103 in_iteration_statement renaming. Use
2104 IN_ITERATION_STMT rather than true.
2105 (cp_parser_jump_statement): Adjust for
2106 in_iteration_statement renaming and new values. Don't
2107 error on break in a switch statement within OMP_FOR or
2108 OpenMP structured block.
2109
2110 PR c++/24513
2111 * parser.c (cp_parser_cache_group): Don't stop if next
2112 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
2113 well. If current token is CPP_PRAGMA, consume
2114 everything until CPP_PRAGMA_EOL inclusive.
2115
2116 2005-10-24 Jakub Jelinek <jakub@redhat.com>
2117
2118 PR c++/24502
2119 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
2120 addition to MODIFY_EXPR.
2121
2122 2005-10-23 Richard Henderson <rth@redhat.com>
2123
2124 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
2125 (bc_label): New.
2126 (begin_bc_block, finish_bc_block): Use it.
2127 (push_context, pop_context): Remove.
2128 (cp_genericize): Don't use them. Assert bc_label is null.
2129 * semantics.c (finish_omp_clauses): Create a fake data
2130 element of TYPE for probing ctors.
2131
2132 2005-10-23 Richard Henderson <rth@redhat.com>
2133
2134 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
2135 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
2136 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
2137 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
2138 * semantics.c (finish_omp_clauses): Look through
2139 arrays when looking up special member calls. Also
2140 remove FIRSTPRIVATE when LASTPRIVATE fails.
2141 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
2142 (cxx_omp_clause_assign_op): New.
2143 * cp-tree.h: Declare them.
2144
2145 2005-10-21 Richard Henderson <rth@redhat.com>
2146
2147 * decl.c (check_previous_goto_1): Return false if error.
2148 (check_switch_goto): Likewise.
2149 (finish_case_label): Don't emit the case label on error.
2150 * parser.c (struct cp_parser): Revert
2151 in_switch_statement_p changes.
2152 (cp_parser_labeled_statement,
2153 cp_parser_selection_statement): Likewise.
2154 (cp_parser_begin_omp_structured_block): Don't save...
2155 (cp_parser_end_omp_structured_block): or restore
2156 in_switch_statement_p.
2157
2158 2005-10-21 Richard Henderson <rth@redhat.com>
2159
2160 * semantics.c (finish_omp_threadprivate): Set
2161 decl_flags.u2sel when necessary.
2162
2163 2005-10-21 Richard Henderson <rth@redhat.com>
2164
2165 * decl.c (poplevel_named_label_1): Restore creation of the
2166 bad_decls list.
2167 (decl_jump_unsafe): Check for error_mark_node types.
229970c4 2168 (check_goto): Don't check cdtor_label. Don't use identify_goto.
e753d130 2169 * semantics.c (finish_return_stmt): Do check_omp_return before
1799e5d5
RH
2170 converting to cdtor_label goto.
2171
2172 2005-10-21 Richard Henderson <rth@redhat.com>
2173
2174 PR c++/24451
2175 * decl.c (check_omp_return): Return false on error.
2176 * cp-tree.h (check_omp_return): Update decl.
2177 * semantics.c (finish_return_stmt): Avoid adding
2178 return on error.
2179
2180 2005-10-21 Richard Henderson <rth@redhat.com>
2181
2182 * cp-tree.h (struct language_function): Remove
2183 x_named_label_uses.
2184 Change x_named_labels to a hashtable.
2185 (check_omp_return): Declare.
2186 * decl.c (struct named_label_use_entry): Rename from
2187 named_label_use_list. Remove label_decl.
2188 (struct named_label_entry): Rename from
2189 named_label_list. Remove old_value and next. Change
2190 in_try_scope and in_catch_scope to bool. Add
2191 in_omp_scope.
2192 (pop_labels_1): New.
2193 (pop_labels): Use it.
2194 (pop_local_label, poplevel_named_label_1): New.
2195 (poplevel): Use them.
2196 (named_label_entry_hash, named_label_entry_eq): New.
2197 (make_label_decl): Create named_labels. Move label
2198 creation bits from lookup_label.
2199 (declare_local_label): Tidy.
2200 (identify_goto): Split out from ...
2201 (check_previous_goto_1): Add exited_omp argument.
2202 Handle omp scopes.
2203
2204 (use_label): Merge into...
2205 (check_goto): ... here. Handle omp scopes.
2206 (check_omp_return): New.
2207 (check_previous_gotos): Merge into...
2208 (define_label): ... here.
2209 (save_function_data): Remove x_named_label_uses reference.
2210 (finish_function): Likewise.
2211 * name-lookup.h (sk_omp): New.
2212 * name-lookup.c (begin_scope): Handle it.
2213 * parser.c (cp_parser_omp_for): Don't create extra
2214 compound stmt.
2215
2216 (cp_parser_omp_sections): Likewise.
2217 * semantics.c (finish_return_stmt): Call check_omp_return.
2218 (begin_omp_structured_block): Use sk_omp.
2219 (finish_omp_structured_block): Use do_poplevel. Don't build a
2220 MUST_NOT_THROW expression here.
2221 (begin_omp_parallel, finish_omp_parallel): Don't create extra
2222 compound statements.
2223
2224 2005-10-21 Diego Novillo <dnovillo@redhat.com>
2225
2226 PR 24455
2227 * cp/cp-tree.h (struct lang_decl_flags): Add field
2228 threadprivate_p.
2229 (CP_DECL_IS_THREADPRIVATE): Define.
2230 * cp/semantics.c (finish_omp_threadprivate): Set. Do
2231 not error out if CP_DECL_IS_THREADPRIVATE is set
2232 already.
2233 * cp/decl.c (duplicate_decls): Merge
2234 CP_DECL_THREADPRIVATE_P.
2235
2236 2005-10-20 Richard Henderson <rth@redhat.com>
2237
2238 * cp-gimplify.c (cp_gimplify_omp_for): New.
2239 (cp_gimplify_expr): Call it.
2240 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
2241 * parser.c (struct cp_parser): Rename
2242 in_iteration_statement_p to in_iteration_statement and
2243 change to unsigned char. Similarly with
2244 in_switch_statement. Update all users.
2245 (IN_OMP_BLOCK, IN_OMP_FOR): New.
2246 (cp_parser_labeled_statement): Diagnose case labels
2247 binding closer to an openmp block nested than the
2248 switch.
2249 (cp_parser_jump_statement): Diagnose break and
2250 continue labels binding closer to an openmp block than
2251 an iteration or switch.
2252 (cp_parser_omp_for_loop): Mark in_iteration_statement
2253 for an omp for.
2254 (cp_parser_begin_omp_structured_block): New.
2255 (cp_parser_end_omp_structured_block): New.
2256 (cp_parser_omp_structured_block): Use them.
2257 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
2258 (cp_parser_omp_parallel): Likewise.
2259
2260 2005-10-20 Richard Henderson <rth@redhat.com>
2261
2262 * semantics.c (begin_omp_structured_block): New.
2263 (finish_omp_structured_block): New.
2264 (begin_omp_parallel, finish_omp_parallel): Use them.
2265 * parser.c (cp_parser_omp_structured_block): Likewise.
2266 (cp_parser_omp_for): Likewise.
2267 (cp_parser_omp_sections_scope): Likewise.
2268 * cp-tree.h: Declare them.
2269
2270 2005-10-20 Richard Henderson <rth@redhat.com>
2271
2272 * parser.c (cp_parser_omp_master): Return the statement.
2273 (cp_parser_omp_ordered): Likewise.
2274 (cp_parser_omp_construct): Set the locus for them.
2275
2276 2005-10-19 Richard Henderson <rth@redhat.com>
2277
2278 * semantics.c (finish_omp_atomic): Revert to
2279 uses_template_parms.
2280
2281 2005-10-19 Richard Henderson <rth@redhat.com>
2282
2283 * semantics.c (finish_omp_clauses): Avoid
2284 DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some
2285 stub asserts guaranteed to fail.
2286
2287 2005-10-19 Richard Henderson <rth@redhat.com>
2288
2289 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
2290 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
2291 * parser.c (cp_parser_omp_clause_copyin): Remove.
e753d130
AP
2292 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
2293 Call finish_omp_clauses.
1799e5d5
RH
2294 (cp_parser_omp_clause_if): Don't do error checking here.
2295 (cp_parser_omp_clause_num_threads): Likewise.
2296 (cp_parser_omp_clause_schedule): Likewise.
2297 (cp_parser_omp_atomic): Use finish_omp_atomic.
2298 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
2299 Don't decompose assignment statment here. Use
2300 finish_omp_for.
2301
2302 * pt.c (tsubst_omp_clauses): New.
2303 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
2304 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
2305 * semantics.c (finish_omp_clauses): New.
2306 (begin_omp_parallel, finish_omp_parallel): Know Less about the
2307 internals of the stmt_list stack.
2308 (finish_omp_for, finish_omp_atomic): New.
2309
2310 2005-10-18 Jakub Jelinek <jakub@redhat.com>
2311
2312 * semantics.c (cxx_omp_predetermined_sharing): New function.
2313 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
2314 * cp-objcp-common.h
2315 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
2316
2317 2005-10-18 Richard Henderson <rth@redhat.com>
2318
2319 * parser.c (cp_parser_omp_single): Use make_node and accessors
2320 instead of build.
2321
2322 2005-10-17 Richard Henderson <rth@redhat.com>
2323
2324 * parser.c (cp_parser_omp_for_loop): Handle declarations.
2325
2326 2005-10-12 Richard Henderson <rth@redhat.com>
2327
2328 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
2329 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
2330 (finish_omp_threadprivate): Declare.
2331 * parser.c (struct cp_lexer): Add in_pragma.
2332 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
2333 when in_pragma.
2334 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
2335 (cp_parser_skip_to_end_of_statement): Likewise.
2336 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2337 (cp_parser_skip_to_closing_brace): Likewise.
2338 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
2339 (cp_parser_require_pragma_eol): New.
2340 (cp_parser_statement): Add in_compound argument;
2341 update all callers.
2342 Restart if a non-statement pragma seen outside a
2343 compound.
2344 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
2345 (cp_parser_declaration_seq_opt): Likewise.
2346 (cp_parser_member_specification_opt): Likewise.
2347 (cp_parser_function_definition_after_decl): Likewise.
2348 (cp_parser_skip_until_found): Likewise.
2349 (cp_parser_cache_group): Likewise.
2350 (enum pragma_omp_clause, cp_parser_omp_clause_name,
2351 check_no_duplicate_clause,
2352 cp_parser_omp_var_list_no_open,
2353 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
2354 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
2355 cp_parser_omp_clause_nowait,
2356 cp_parser_omp_clause_num_threads,
2357 cp_parser_omp_clause_ordered,
2358 cp_parser_omp_clause_reduction,
2359 cp_parser_omp_clause_schedule,
2360 cp_parser_omp_all_clauses,
2361 cp_parser_omp_structured_block, cp_parser_omp_atomic,
2362 cp_parser_omp_barrier, cp_parser_omp_critical,
2363 cp_parser_omp_flush, cp_parser_omp_for_loop,
2364 cp_parser_omp_for, cp_parser_omp_master,
2365 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
2366 cp_parser_omp_sections, cp_parser_omp_parallel,
2367 cp_parser_omp_single, cp_parser_omp_threadprivate,
2368 cp_parser_omp_construct): New.
2369 (cp_parser_pragma): Handle OpenMP pragmas.
2370 * semantics.c (finish_omp_threadprivate): New.
2371 (begin_omp_parallel, finish_omp_parallel): New.
2372
2373 2005-10-11 Richard Henderson <rth@redhat.com>
2374
2375 * parser.c (struct cp_token): Add pragma_kind.
2376 (eof_token): Initialize it.
2377 (cp_lexer_handle_pragma): Remove.
2378 (cp_parser_initial_pragma): New.
2379 (cp_lexer_new_main): Use it.
2380 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
2381 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
2382 (cp_parser_skip_to_pragma_eol): New.
2383 (cp_parser_error): Use it.
2384 (pragma_lex): New.
2385
2386 2005-10-09 Richard Henderson <rth@redhat.com>
2387
2388 * lex.c (parse_strconst_pragma): Update for c_lex name change.
2389 (handle_pragma_java_exceptions): Likewise.
2390 * parser.c (cp_lexer_new_main): Likewise.
2391
2392 2005-10-06 Richard Henderson <rth@redhat.com>
2393
2394 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
2395 (cp_lexer_handle_pragma): Comment out
2396 cpp_handle_deferred_pragma.
2397
2398 2005-10-01 Richard Henderson <rth@redhat.com>
2399
2400 * name-lookup.c (lookup_name): Remove prefer_type argument.
2401 (lookup_name_prefer_type): New function.
2402 * name-lookup.h (lookup_name_prefer_type): Declare it.
2403 * decl.c (lookup_and_check_tag): Use it.
2404 * pt.c (tsubst_friend_class): Likewise. Update for
2405 lookup_name change.
2406 (lookup_template_class, tsubst_copy_and_build): Likewise.
2407
a3c5267c
VR
24082006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2409
2410 PR c++/15759
2411 * tree.c (bot_manip): Don't call mark_used.
2412
67a70df6
MS
24132006-03-02 Mike Stump <mrs@apple.com>
2414
2415 * decl2.c (import_export_decl): Remove redundant call to
2416 targetm.cxx.key_method_may_be_inline ().
2417
434aeebb
RS
24182006-03-02 Richard Sandiford <richard@codesourcery.com>
2419
2420 * decl.c (start_decl): Use have_global_bss_p when deciding
2421 whether to make the decl common.
2422
1a1d0917
MS
24232006-03-01 Mike Stump <mrs@apple.com>
2424
2425 PR darwin/25908
2426 * decl2.c (import_export_decl): Fix ABI breakage on darwin.
2427
c7b5e395
GK
24282006-02-24 Geoffrey Keating <geoffk@apple.com>
2429
2430 * except.c (expand_start_catch_block): Handle
2431 flag_use_cxa_get_exception_ptr.
2432
64844139
VR
24332006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2434
2435 PR c++/26291
2436 * decl.c (grok_op_properties): Check for ellipsis in arguments of
1799e5d5 2437 operators.
64844139
VR
2438
2439