]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
1 2024-01-09 Tamar Christina <tamar.christina@arm.com>
2
3 PR c/113267
4 * c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
5
6 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
7
8 * c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
9 clause to correspond to alphabetical order.
10
11 2023-12-30 Martin Uecker <uecker@tugraz.at>
12
13 * c-typeck.cc (tagged_types_tu_compatible_p): Revise.
14
15 2023-12-22 Martin Uecker <uecker@tugraz.at>
16
17 * c-typeck.cc (composite_type_internal): Adapted from
18 composite_type to support structs and unions.
19 (composite_type): New wrapper function.
20 (build_conditional_operator): Return composite type.
21 * c-decl.cc (finish_struct): Allow NULL for
22 enclosing_struct_parse_info.
23
24 2023-12-21 Martin Uecker <uecker@tugraz.at>
25
26 * c-decl.cc (c_struct_hasher): Hash stable for struct
27 types.
28 (c_struct_hasher::hash, c_struct_hasher::equal): New
29 functions.
30 (finish_struct): Set TYPE_CANONICAL to first struct in
31 equivalence class.
32 * c-objc-common.cc (c_get_alias_set): Let structs or
33 unions with variable size alias anything.
34 * c-tree.h (comptypes_equiv): New prototype.
35 * c-typeck.cc (comptypes_equiv): New function.
36 (comptypes_internal): Implement equivalence mode.
37 (tagged_types_tu_compatible): Implement equivalence mode.
38
39 2023-12-21 Martin Uecker <uecker@tugraz.at>
40
41 * c-tree.h (c_parser_enum_specifier): Add parameter.
42 * c-decl.cc (start_enum): Allow redefinition.
43 (finish_enum): Diagnose conflicts.
44 (build_enumerator): Set context.
45 (diagnose_mismatched_decls): Diagnose conflicting enumerators.
46 (push_decl): Preserve context for enumerators.
47 * c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
48 * c-parser.cc (c_parser_enum_specifier): Remember when
49 seen is from an enum type which is not yet defined.
50
51 2023-12-21 Martin Uecker <uecker@tugraz.at>
52
53 * c-decl.cc (previous_tag): New function.
54 (parser_xref_tag): Find earlier definition.
55 (get_parm_info): Turn off warning for C23.
56 (start_struct): Allow redefinitons.
57 (finish_struct): Diagnose conflicts.
58 * c-tree.h (comptypes_same_p): Add prototype.
59 * c-typeck.cc (comptypes_same_p): New function.
60 (comptypes_internal): Activate comparison of tagged types.
61 (convert_for_assignment): Ignore qualifiers.
62 (digest_init): Add error.
63 (initialized_elementwise_p): Allow compatible types.
64
65 2023-12-20 Jakub Jelinek <jakub@redhat.com>
66
67 * c-parser.cc (c_parser_postfix_expression_after_primary): Grow
68 sizeof_arg and sizeof_arg_loc arrays to 6 elements. Call
69 warn_for_calloc if warn_calloc_transposed_args for functions with
70 alloc_size type attribute with 2 arguments.
71 (c_parser_expr_list): Use 6 instead of 3.
72 * c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
73 of calls to functions with alloc_size type attribute.
74 (convert_for_assignment): Likewise.
75
76 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
77
78 * c-parser.cc (omp_construct_selectors): Delete.
79 (omp_device_selectors): Delete.
80 (omp_implementation_selectors): Delete.
81 (omp_user_selectors): Delete.
82 (c_parser_omp_context_selector): Adjust for new representations
83 and simplify dispatch logic. Uniformly warn instead of sometimes
84 error when an unknown selector is found. Adjust error messages
85 for extraneous/incorrect score.
86 (c_parser_omp_context_selector_specification): Likewise.
87 (c_finish_omp_declare_variant): Adjust for new representations.
88
89 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
90
91 * c-parser.cc (c_parser_omp_context_selector): Adjust for new
92 namelist property representation.
93
94 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
95
96 * c-parser.cc (c_parser_omp_context_selector): Use new constructors.
97
98 2023-12-18 Richard Biener <rguenther@suse.de>
99
100 PR c/111975
101 * gimple-parser.cc (c_parser_gimple_postfix_expression):
102 Parse TARGET_MEM_REF extended operands for __MEM.
103
104 2023-12-13 Jason Merrill <jason@redhat.com>
105
106 * c-typeck.cc (convert_for_assignment): Adjust call to
107 warn_for_address_of_packed_member.
108
109 2023-12-13 Julian Brown <julian@codesourcery.com>
110
111 * c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
112 to select region type for c_finish_omp_clauses call.
113 (c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
114 (c_parser_oacc_compute): Likewise.
115 (c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
116 ATTACH kind.
117 (c_parser_omp_target_exit_data): Support DETACH kind.
118 (check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
119 * c-typeck.cc (handle_omp_array_sections_1,
120 handle_omp_array_sections, c_finish_omp_clauses): Use
121 c_omp_address_inspector class and OMP address tokenizer to analyze and
122 expand map clause expressions. Fix some diagnostics. Fix "is OpenACC"
123 condition for C_ORT_ACC_TARGET addition.
124
125 2023-12-13 Julian Brown <julian@codesourcery.com>
126
127 * c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
128 OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
129
130 2023-12-11 Martin Uecker <uecker@tugraz.at>
131
132 PR c/112488
133 * c-decl.cc (add_decl_expr): Revise.
134 (finish_struct): Create DECL_EXPR.
135 * c-parser.cc (c_parser_struct_or_union_specifier): Call
136 finish_struct with expression for VLA sizes.
137 * c-tree.h (finish_struct): Add argument.
138
139 2023-12-11 Tobias Burnus <tobias@codesourcery.com>
140
141 * c-parser.cc (c_parser_omp_requires): Handle acquires/release
142 in atomic_default_mem_order clause.
143 (c_parser_omp_atomic): Update.
144
145 2023-12-05 Richard Sandiford <richard.sandiford@arm.com>
146
147 * c-decl.cc (std_attribute_table): Add extra braces to work
148 around PR 16333 in older compilers.
149
150 2023-12-05 Richard Biener <rguenther@suse.de>
151
152 PR c/86869
153 * c-typeck.cc (c_build_qualified_type): Preserve address-space
154 info for ARRAY_TYPE.
155
156 2023-12-02 Richard Sandiford <richard.sandiford@arm.com>
157
158 * c-tree.h (std_attribute_table): Declare.
159 * c-decl.cc (std_attribute_table): Change type to
160 scoped_attribute_specs, using...
161 (std_attributes): ...this as the underlying array.
162 (c_init_decl_processing): Remove call to register_scoped_attributes.
163 * c-objc-common.h (c_objc_attribute_table): New global.
164 (LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
165 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
166 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
167
168 2023-12-01 Florian Weimer <fweimer@redhat.com>
169
170 PR other/44209
171 * c-decl.cc (grokparms): Issue permerror for
172 OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
173
174 2023-12-01 Florian Weimer <fweimer@redhat.com>
175
176 PR c/96284
177 * c-typeck.cc (build_conditional_expr): Upgrade most pointer
178 type mismatches to a permerror.
179 (convert_for_assignment): Use permerror_opt and
180 permerror_init for OPT_Wincompatible_pointer_types warnings.
181
182 2023-12-01 Florian Weimer <fweimer@redhat.com>
183
184 PR c/96284
185 * c-typeck.cc (c_finish_return): Use permerrors
186 for OPT_Wreturn_mismatch diagnostics.
187
188 2023-12-01 Florian Weimer <fweimer@redhat.com>
189
190 * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
191 warnings or errors in system headers.
192
193 2023-12-01 Florian Weimer <fweimer@redhat.com>
194
195 * c-decl.cc (warn_defaults_to): Remove.
196 (grok_declarator, start_function): Call permerror_opt
197 instead of warn_defaults_to.
198 (store_parm_decls_oldstyle): Call permerror_opt for
199 OPT_Wimplicit_int.
200
201 2023-12-01 Florian Weimer <fweimer@redhat.com>
202
203 PR c/91092
204 PR c/96284
205 * c-decl.cc (implicit_decl_permerror): Rename from
206 implicit_decl_warning. Call permerror_opt instead of
207 pedwarn and warning_at.
208 (implicitly_declare): Adjust callers.
209
210 2023-12-01 Florian Weimer <fweimer@redhat.com>
211
212 PR c/96284
213 PR c/106416
214 * c-typeck.cc (build_conditional_expr): Use permerror_opt for
215 pointer/integer type mismatches, based on -Wint-conversion.
216 (pedwarn_permerror_init, permerror_init): New function.
217 (pedwarn_init): Call pedwarn_permerror_init.
218 (convert_for_assignment): Use permerror_opt and
219 permerror_init for -Wint-conversion warnings.
220
221 2023-11-29 Alexandre Oliva <oliva@adacore.com>
222
223 * c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
224 * c-convert.cc (convert): Convert to hardbool through
225 truthvalue.
226 * c-decl.cc (check_bitfield_type_and_width): Skip enumeral
227 truncation warnings for hardbool.
228 (finish_struct): Propagate hardbool attribute to bitfield
229 types.
230 (digest_init): Convert to hardbool.
231
232 2023-11-28 Jason Merrill <jason@redhat.com>
233
234 PR c++/94264
235 PR c++/53220
236 * c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
237 diagnostic.
238
239 2023-11-28 Richard Biener <rguenther@suse.de>
240
241 PR middle-end/112741
242 * gimple-parser.cc (c_parser_parse_gimple_body): Also
243 set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
244
245 2023-11-27 Alex Coplan <alex.coplan@arm.com>
246 Iain Sandoe <iain@sandoe.co.uk>
247
248 PR c++/60512
249 * c-lang.cc (c_family_register_lang_features): New.
250 * c-objc-common.cc (struct c_feature_info): New.
251 (c_register_features): New.
252 * c-objc-common.h (c_register_features): New.
253
254 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
255
256 * c-parser.cc (c_parser_omp_clause_num_threads,
257 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
258 c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
259 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
260 c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
261 c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
262 Add OPT_Wopenmp to warning_at.
263
264 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
265
266 * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
267 to the destroy clause.
268
269 2023-11-23 Jakub Jelinek <jakub@redhat.com>
270
271 * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
272 * c-decl.cc (names_builtin_p): Likewise.
273
274 2023-11-14 Jakub Jelinek <jakub@redhat.com>
275
276 PR c/111309
277 * c-typeck.cc (convert_arguments): Don't promote first argument
278 of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
279
280 2023-11-10 Martin Uecker <uecker@tugraz.at>
281
282 * c-typeck.cc (struct comptypes_data): Add anon_field flag.
283 (comptypes, comptypes_check_unum_int,
284 comptypes_check_different_types): Remove old cache.
285 (tagged_tu_types_compatible_p): Rewrite.
286
287 2023-11-09 Florian Weimer <fweimer@redhat.com>
288
289 * c-typeck.cc (c_finish_return): Use pedwarn with
290 OPT_Wreturn_mismatch for missing/extra return expressions.
291
292 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
293
294 * c-decl.cc (c_decl_attributes): Add attribute for indirect
295 functions.
296 * c-lang.h (c_omp_declare_target_attr): Add indirect field.
297 * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
298 (c_parser_omp_clause_indirect): New.
299 (c_parser_omp_all_clauses): Handle indirect clause.
300 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
301 (c_parser_omp_declare_target): Handle indirect clause. Emit error
302 message if device_type or indirect clauses used alone. Emit error
303 if indirect clause used with device_type that is not 'any'.
304 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
305 (c_parser_omp_begin): Handle indirect clause.
306 * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
307
308 2023-11-07 Joseph Myers <joseph@codesourcery.com>
309
310 * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
311 instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
312 and comments.
313 * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
314 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
315 instead of C2X in comments.
316 * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
317 warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
318 instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
319 instead of C2X in diagnostics and comments.
320 * c-tree.h: Refer to C23 instead of C2X in comments.
321 (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
322 * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
323 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
324 instead of C2X in diagnostics and comments.
325
326 2023-11-06 Joseph Myers <joseph@codesourcery.com>
327
328 PR c/107954
329 * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
330 OPT_Wc11_c2x_compat.
331 * c-typeck.cc (build_conditional_expr, convert_for_assignment):
332 Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
333
334 2023-11-04 Jakub Jelinek <jakub@redhat.com>
335
336 * c-parser.h (c_maybe_parse_omp_decl): Declare.
337 * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
338 (c_parser_std_attribute): Uncoment omp::decl handling.
339 (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
340 don't expect any arguments, instead create clause or TREE_LIST for
341 that decl.
342 (c_maybe_parse_omp_decl): New function.
343 (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
344 first token isn't name or comma invoke c_parser_omp_var_list_parens.
345 * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
346 use *node rather than non-existing *decl.
347
348 2023-11-04 Jakub Jelinek <jakub@redhat.com>
349
350 * c-tree.def: New file.
351 * c-tree.h (struct c_tree_token_vec): Forward declare.
352 (c_tree_size): Declare.
353 * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
354 (struct c_omp_begin_assumes_data): New type.
355 (current_omp_begin_assumes): Change type from int to
356 vec<c_omp_begin_assumes_data, va_gc> *.
357 * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
358 * c-parser.h (struct c_tree_token_vec_struct): New type.
359 (C_TOKEN_VEC_TOKENS): New macro.
360 * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
361 in_omp_attribute_pragma members.
362 (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
363 parser->in_omp_attribute_pragma.
364 (c_parser_skip_to_pragma_eol): Likewise.
365 (c_parser_translation_unit): Adjust for current_omp_begin_assumes
366 being a vector rather than counter.
367 (c_parser_declaration_or_fndef): Handle omp::directive and
368 omp::sequence attributes on attribute declaration and declare simd
369 or declare variant directives in those on function declarations.
370 (c_parser_check_balanced_raw_token_sequence): Forward declare.
371 (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
372 functions.
373 (c_parser_std_attribute): Handle omp::directive and omp::sequence
374 attributes.
375 (struct c_omp_attribute_data): New type.
376 (c_parser_handle_statement_omp_attributes,
377 c_parser_handle_directive_omp_attributes): New functions.
378 (c_parser_compound_statement_nostart): Handle omp::directive and
379 omp::sequence attributes on statements. Formatting fix.
380 (c_parser_all_labels): Handle omp::directive and omp::sequence
381 attributes on statements.
382 (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
383 (c_parser_omp_variable_list): Handle parser->tokens
384 != &parser->tokens_buf[0] by saving/restoring it.
385 (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
386 (c_parser_omp_section_scan): New function.
387 (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
388 Use it.
389 (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
390 (c_parser_omp_task): Likewise.
391 (c_parser_omp_declare_simd): Handle function declaration after
392 std attributes.
393 (c_finish_omp_declare_simd): Don't assert all kinds are the same.
394 (c_parser_omp_declare_target): Also push attr_syntax flag.
395 (c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
396 type change.
397 (c_parser_omp_end): Adjust for current_omp_begin_assumes type
398 change. Diagnose mixing of attribute vs. pragma syntax on end assumes
399 or end declare target.
400 (c_parser_omp_declare_reduction): Handle parser->tokens
401 != &parser->tokens_buf[0] by saving/restoring it.
402 * c-decl.cc: Include c-parser.h.
403 (current_omp_begin_assumes): Change type from int to
404 vec<c_omp_begin_assumes_data, va_gc> *.
405 (struct c_tree_token_vec): New type. Add static assertions
406 for sizeof and offsetof.
407 (union lang_tree_node): Add c_token_vec member and adjust GTY
408 desc for it.
409 (c_tree_size): New function.
410 (c_decl_attributes): Diagnose invalid omp::directive attribute
411 uses.
412 * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
413
414 2023-11-02 Martin Uecker <uecker@tugraz.at>
415
416 PR c/112347
417 * c-typeck.cc (convert_for_assignment): Add missing check.
418
419 2023-11-01 Martin Uecker <uecker@tugraz.at>
420
421 PR c/71219
422 * c-typeck.cc (convert_for_assignment): Add warning.
423
424 2023-10-26 liuhongt <hongtao.liu@intel.com>
425
426 * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
427 truth_type_for.
428
429 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
430
431 * c-parser.cc (c_parser_omp_clause_name): Return
432 'PRAGMA_OACC_CLAUSE_SELF' for "self".
433 (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
434 (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
435 parameter, and instead locally determine whether we're called for
436 an OpenACC compute construct or OpenACC 'update' directive.
437 (c_parser_oacc_compute): Adjust.
438
439 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
440
441 * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
442 (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
443 parameter, add parsing of self clause when compute_p is true.
444 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
445 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
446 (OACC_SERIAL_CLAUSE_MASK): Likewise.
447 (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
448 set compute_p argument to true.
449 * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
450
451 2023-10-20 Florian Weimer <fweimer@redhat.com>
452
453 PR c/109827
454 PR other/44209
455 * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
456 for pointer/integer mismatch warnings.
457
458 2023-10-20 Florian Weimer <fweimer@redhat.com>
459
460 PR c/109826
461 PR other/44209
462 * c-typeck.cc (build_conditional_expr): Use
463 OPT_Wincompatible_pointer_types for pointer mismatches.
464 Emit location information for the operand.
465
466 2023-10-19 Andrew Pinski <pinskia@gmail.com>
467
468 PR c/100532
469 * c-typeck.cc (convert_argument): After erroring out
470 about an incomplete type return error_mark_node.
471
472 2023-10-19 Andrew Pinski <pinskia@gmail.com>
473
474 PR c/104822
475 * c-typeck.cc (convert_for_assignment): Check for null pointer
476 before warning about an incompatible scalar storage order.
477
478 2023-10-18 Andrew Pinski <pinskia@gmail.com>
479
480 PR c/101364
481 * c-decl.cc (diagnose_arglist_conflict): Test for
482 error mark before calling of c_type_promotes_to.
483
484 2023-10-18 Andrew Pinski <pinskia@gmail.com>
485
486 PR c/101285
487 * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
488 operands early.
489
490 2023-10-17 Martin Uecker <uecker@tugraz.at>
491
492 PR c/111708
493 * c-decl.cc (grokdeclarator): Add error.
494
495 2023-10-03 David Malcolm <dmalcolm@redhat.com>
496
497 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
498 text_info fields.
499
500 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
501
502 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
503
504 2023-09-20 Jakub Jelinek <jakub@redhat.com>
505
506 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
507 __builtin_classify_type call with typename as argument.
508
509 2023-09-19 Richard Biener <rguenther@suse.de>
510
511 PR c/111468
512 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
513
514 2023-09-19 Richard Biener <rguenther@suse.de>
515
516 PR c/111468
517 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
518 return type argument.
519 (c_parser_gimple_statement): Adjust.
520 (c_parser_gimple_paren_condition): Likewise.
521 (c_parser_gimple_binary_expression): Use passed in return type,
522 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
523 __UNORDERED and __ORDERED.
524
525 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
526
527 * c-parser.cc (struct c_omp_loc_tree): New.
528 (c_check_omp_allocate_allocator_r): New; checking moved from ...
529 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
530 ICE with tree_to_shwi for invalid too-large value.
531
532 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
533
534 * c-parser.cc (c_parser_omp_construct): Move call to
535 c_parser_omp_allocate to ...
536 (c_parser_pragma): ... here.
537 (c_parser_omp_allocate): Avoid ICE is allocator could not be
538 parsed; set 'omp allocate' attribute for stack/automatic variables
539 and only reject static variables; add several additional
540 restriction checks.
541 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
542 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
543 (c_mark_decl_jump_unsafe_in_current_scope): New.
544 (warn_about_goto, c_check_switch_jump_warnings): Add error for
545 omp-allocated decls.
546
547 2023-09-12 Martin Uecker <uecker@tugraz.at>
548
549 * c-typeck.cc (struct comptypes_data): Add structure.
550 (tagged_types_tu_compatible_p,
551 function_types_compatible_p, type_lists_compatible_p,
552 comptypes_internal): Add structure to interface, change
553 return type to bool, and adapt calls.
554 (comptarget_types): Change return type too bool.
555 (comptypes, comptypes_check_enum_int,
556 comptypes_check_different_types): Adapt calls.
557
558 2023-09-06 Jakub Jelinek <jakub@redhat.com>
559
560 PR c/102989
561 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
562 * c-typeck.cc (c_common_type): Emit sorry for common type between
563 _Complex integer and larger _BitInt and return the _Complex integer.
564
565 2023-09-06 Jakub Jelinek <jakub@redhat.com>
566
567 PR c/102989
568 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
569 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
570 bit-fields.
571 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
572 if possible.
573 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
574 for added union in *specs. Handle RID_BITINT.
575 (finish_declspecs): Handle cts_bitint. Adjust for added union
576 in *specs.
577 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
578 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
579 RID_BITINT.
580 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
581 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
582 Add cts_bitint enumerator.
583 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
584 and add bitint_prec there as well.
585 * c-typeck.cc (c_common_type, comptypes_internal):
586 Handle BITINT_TYPE.
587 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
588 their declared type.
589 (build_array_ref, build_unary_op, build_conditional_expr,
590 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
591 Handle BITINT_TYPE.
592 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
593 INTEGER_TYPE.
594 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
595
596 2023-09-06 Jakub Jelinek <jakub@redhat.com>
597
598 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
599 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
600 text.
601
602 2023-09-05 Tobias Burnus <tobias@codesourcery.com>
603
604 * c-parser.cc (c_parser_omp_clause_allocate): Handle
605 error_mark_node.
606
607 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
608
609 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
610 (struct omp_for_parse_data): New.
611 (check_omp_intervening_code): New.
612 (add_structured_block_stmt): New.
613 (c_parser_compound_statement_nostart): Recognize intervening code,
614 nested loops, and other things that need special handling in
615 OpenMP loop constructs.
616 (c_parser_while_statement): Error on loop in intervening code.
617 (c_parser_do_statement): Likewise.
618 (c_parser_for_statement): Likewise.
619 (c_parser_postfix_expression_after_primary): Error on calls to
620 the OpenMP runtime in intervening code.
621 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
622 (c_parser_omp_loop_nest): New.
623 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
624 c_parser_omp_loop_nest to do the heavy lifting.
625
626 2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
627
628 * c-parser.cc (c_parser_std_attribute): Conditionally allow
629 two colons to be used in place of ::.
630 (c_parser_std_attribute_list): New function, split out from...
631 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
632 to start with __extension__. When it does, also allow two colons
633 to be used in place of ::.
634
635 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
636
637 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
638 'all' as category.
639
640 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
641
642 PR c/106537
643 * c-typeck.cc (build_binary_op): Warning on comparing distinct
644 pointer types only when -Wcompare-distinct-pointer-types.
645
646 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
647 Thomas Schwinge <thomas@codesourcery.com>
648
649 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
650
651 2023-08-11 Jakub Jelinek <jakub@redhat.com>
652
653 * c-parser.cc (c_parser_typeof_specifier): Handle
654 __typeof_unqual and __typeof_unqual__ as !is_std.
655
656 2023-08-11 Martin Uecker <uecker@tugraz.at>
657
658 PR c/84510
659 * c-typeck.cc (build_c_cast): Add warning.
660
661 2023-08-05 Martin Uecker <uecker@tugraz.at>
662
663 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
664 warnings branches that are known not be taken during parsing.
665
666 2023-08-04 Tamar Christina <tamar.christina@arm.com>
667
668 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
669 c_parser_for_statement, c_parser_statement_after_labels,
670 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
671 default to false.
672
673 2023-08-02 Eric Feng <ef2648@columbia.edu>
674
675 PR analyzer/107646
676 * c-parser.cc: New functions on stashing values for the
677 analyzer.
678
679 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
680
681 * c-parser.cc (pragma_lex_discard_to_eol): New function.
682 (c_init_preprocess): New function.
683
684 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
685
686 PR c/65213
687 * c-decl.cc (start_decl): Handle
688 -Wmissing-variable-declarations.
689
690 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
691
692 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
693 host_data construct to have an use_device clause.
694
695 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
696
697 PR c/77650
698 * c-decl.cc (finish_struct): Issue warnings for new option.
699
700 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
701
702 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
703 struct/union type.
704
705 2023-06-29 Richard Biener <rguenther@suse.de>
706
707 PR c/110454
708 * c-typeck.cc (convert_argument): Sink formal_prec compute
709 to where TYPE_PRECISION is valid to use.
710
711 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
712
713 * Make-lang.in: Pass correct stage cc1 when processing
714 profile data collected while building target libraries
715
716 2023-06-16 David Malcolm <dmalcolm@redhat.com>
717
718 PR c/107583
719 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
720 name" error.
721
722 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
723
724 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
725 clearness especially with 'omp target (enter/exit) data.'
726
727 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
728 Tobias Burnus <tobias@codesourcery.com>
729
730 * c-parser.cc (c_parser_omp_clause_defaultmap,
731 c_parser_omp_clause_map): Parse 'present'.
732 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
733 (c_parser_omp_clause_from_to): New; parse to/from clauses with
734 optional present modifer.
735 (c_parser_omp_all_clauses): Update call.
736 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
737 c_parser_omp_target_exit_data): Handle new map enum values
738 for 'present' mapping.
739
740 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
741
742 PR c/109999
743 * c-parser.cc (c_parser_oacc_all_clauses,
744 c_parser_omp_all_clauses): Improve error wording.
745
746 2023-05-23 Martin Uecker <uecker@tugraz.at>
747
748 PR c/109450
749 * c-decl.cc (add_decl_expr): New function.
750 (grokdeclarator): Add decl expr for size expression in
751 types pointed to by parameters declared as arrays.
752
753 2023-05-23 Martin Uecker <uecker@tugraz.at>
754
755 PR c/70418
756 PR c/106465
757 PR c/107557
758 PR c/108423
759 * c-decl.cc (start_decl): Make sure size expression are
760 evaluated only in correct context.
761 (grokdeclarator): Size expression in fields may need a bind
762 expression, make sure DECL_EXPR is always created.
763 (grokfield, declspecs_add_type): Pass along size expressions.
764 (finish_struct): Remove unneeded DECL_EXPR.
765 (start_function): Evaluate size expressions for nested functions.
766 * c-parser.cc (c_parser_struct_declarations,
767 c_parser_struct_or_union_specifier): Pass along size expressions.
768 (c_parser_declaration_or_fndef): Evaluate size expression.
769 (c_parser_objc_at_property_declaration,
770 c_parser_objc_class_instance_variables): Adapt.
771 * c-tree.h (grokfield): Adapt declaration.
772
773 2023-05-19 Martin Uecker <uecker@tugraz.at>
774
775 * c-decl.cc (set_type_context): Remove.
776 (pop_scope, diagnose_mismatched_decls, pushdecl):
777 Remove dead code.
778 * c-typeck.cc (comptypes_internal): Remove dead code.
779 (same_translation_unit_p): Remove.
780 (tagged_types_tu_compatible_p): Some fixes.
781
782 2023-05-19 Joseph Myers <joseph@codesourcery.com>
783
784 * c-decl.cc (diagnose_mismatched_decls): Do not handle
785 thread-local declarations as tentative definitions for C2x.
786 (finish_decl): Do not allow thread-local definition with
787 incomplete type for C2x.
788
789 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
790
791 * c-convert.cc (c_convert): Ditto.
792 * c-decl.cc (merge_decls): Ditto.
793 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
794 (c_parser_omp_declare_reduction): Ditto.
795 * c-typeck.cc (build_component_ref): Ditto.
796 (convert_argument): Ditto.
797 (pointer_diff): Ditto.
798 (build_unary_op): Ditto.
799 (build_c_cast): Ditto.
800 (build_modify_expr): Ditto.
801 (store_init_value): Ditto.
802 (constexpr_init_fits_real_type): Ditto.
803 (check_constexpr_init): Ditto.
804 (c_finish_return): Ditto.
805 (handle_omp_array_sections_1): Ditto.
806 (c_finish_omp_clauses): Ditto.
807 * gimple-parser.cc (c_finish_gimple_return): Ditto.
808
809 2023-05-16 Joseph Myers <joseph@codesourcery.com>
810
811 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
812 diagnostics.
813
814 2023-05-15 Joseph Myers <joseph@codesourcery.com>
815
816 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
817 type for C2x.
818
819 2023-04-30 Andrew Pinski <apinski@marvell.com>
820
821 * c-typeck.cc (process_init_element): Print out array type
822 for excessive elements.
823
824 2023-04-30 Andrew Pinski <apinski@marvell.com>
825
826 PR c/107926
827 * c-typeck.cc (process_init_element): Move the check
828 for string cst until after the error message.
829
830 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
831
832 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
833
834 2023-04-27 Jakub Jelinek <jakub@redhat.com>
835
836 PR c/109409
837 * c-parser.cc (c_parser_initializer): Move diagnostics about
838 initialization of variable sized object with non-empty initializer
839 after c_parser_expr_no_commas call and ret.set_error (); after it.
840
841 2023-04-27 Jakub Jelinek <jakub@redhat.com>
842
843 PR c/107682
844 PR c/109412
845 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
846 reject empty initializer as invalid.
847
848 2023-04-26 Richard Biener <rguenther@suse.de>
849
850 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
851 last_stmt.
852
853 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
854
855 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
856 zero exec statements before/after 'omp scan'.
857
858 2023-04-20 Jakub Jelinek <jakub@redhat.com>
859
860 PR c/107041
861 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
862 warning on acc_on_device declaration.
863
864 2023-03-28 David Malcolm <dmalcolm@redhat.com>
865
866 PR c/107002
867 * c-typeck.cc (parser_build_binary_op): Update for new param of
868 check_for_xor_used_as_pow.
869
870 2023-03-10 Jakub Jelinek <jakub@redhat.com>
871
872 PR c/108079
873 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
874 after diagnosing it.
875
876 2023-02-28 Jakub Jelinek <jakub@redhat.com>
877
878 PR sanitizer/108894
879 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
880 and rename to c_strict_flex_array_level_of.
881 (is_flexible_array_member_p): Adjust caller.
882
883 2023-02-18 Martin Uecker <uecker@tugraz.at>
884
885 PR c/108375
886 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
887 (diagnose_mismatched_decl): Dito.
888 (warn_about_goto): Dito:
889 (c_check_switch_jump_warnings): Dito.
890 (finish_decl): Dito.
891 (finish_struct): Dito.
892 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
893 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
894 * c-objc-common.cc (c_var_mod_p): New function.
895 (c_var_unspec_p): Remove.
896 * c-objc-common.h: Set lang hook.
897 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
898 (c_parser_typeof_specifier): Dito.
899 (c_parser_has_attribute_expression): Dito.
900 (c_parser_generic_selection): Dito.
901 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
902 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
903
904 2023-02-16 Patrick Palka <ppalka@redhat.com>
905
906 * c-parser.h: Mechanically drop static from static inline
907 functions via s/^static inline/inline/g.
908
909 2023-02-10 Joseph Myers <joseph@codesourcery.com>
910
911 * c-convert.cc (c_convert): Allow conversion of a null pointer
912 constant to nullptr_t.
913 * c-typeck.cc (null_pointer_constant_p): Remove static.
914 (convert_for_assignment): Allow conversion of a null pointer
915 constant to nullptr_t.
916 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
917 * c-tree.h (null_pointer_constant_p): Declare.
918
919 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
920
921 * c-parser.cc (c_parser_omp_allocate): Parse align
922 clause and check for restrictions.
923
924 2023-02-08 Joseph Myers <joseph@codesourcery.com>
925
926 * c-typeck.cc (check_constexpr_init): Remove argument
927 null_pointer_constant. Only check pointer initializers for being
928 null.
929 (digest_init): Update calls to check_constexpr_init.
930
931 2023-02-02 Joseph Myers <joseph@codesourcery.com>
932
933 * c-typeck.cc (build_binary_op): Allow comparisons between
934 pointers and nullptr_t values that are not null pointer constants.
935
936 2023-02-02 Joseph Myers <joseph@codesourcery.com>
937
938 * c-typeck.cc: Include "realmpfr.h".
939 (constexpr_init_fits_real_type): Do not allow signaling NaN
940 conversions to different types with the same mode. Handle
941 conversions from binary to decimal types.
942 (check_constexpr_init): Do not disallow real initializers for
943 complex types. Do not disallow binary initializers for decimal
944 floating types.
945
946 2023-01-31 Marek Polacek <polacek@redhat.com>
947
948 PR c++/107593
949 PR c++/108597
950 * c-objc-common.cc (instantiation_dependent_expression_p): New.
951
952 2023-01-27 Joseph Myers <joseph@codesourcery.com>
953
954 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
955 around auto initializer.
956
957 2023-01-16 Jakub Jelinek <jakub@redhat.com>
958
959 PR c++/105593
960 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
961 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
962 of warn_init_self.
963
964 2023-01-14 Jakub Jelinek <jakub@redhat.com>
965
966 PR c++/108365
967 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
968 division or modulo.
969
970 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
971
972 * c-decl.cc (strict_flex_array_level_of): ... here.
973
974 2023-01-11 Jakub Jelinek <jakub@redhat.com>
975
976 PR c/105972
977 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
978 markers for K&R function parameter declarations of nested functions.
979
980 2023-01-09 Joseph Myers <joseph@codesourcery.com>
981
982 * c-decl.cc (build_compound_literal): Call record_inline_static.
983
984 2023-01-06 Joseph Myers <joseph@codesourcery.com>
985
986 * c-parser.cc (c_parser_postfix_expression): Handle integer
987 generic arguments to functions passed to __builtin_tgmath as
988 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
989 Do not handle integer arguments to some narrowing functions as
990 _Float64.
991
992 2022-12-19 Jakub Jelinek <jakub@redhat.com>
993
994 PR c/108043
995 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
996 compound literals with function type.
997
998 2022-12-07 Joseph Myers <joseph@codesourcery.com>
999
1000 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
1001 auto, constexpr and a type used together.
1002
1003 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
1004
1005 * c-decl.cc (is_flexible_array_member_p): Call new function
1006 strict_flex_array_level_of.
1007
1008 2022-11-24 Florian Weimer <fweimer@redhat.com>
1009
1010 PR c/107805
1011 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
1012 from type to specs.
1013
1014 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1015
1016 * c-decl.cc (start_function): Set the result decl source
1017 location to the location of the typespec.
1018
1019 2022-11-17 David Malcolm <dmalcolm@redhat.com>
1020
1021 PR analyzer/107711
1022 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
1023 to cpp_create_reader, rather than ident_hash, so that the new
1024 reader gets its own hash table.
1025
1026 2022-11-15 David Malcolm <dmalcolm@redhat.com>
1027
1028 PR analyzer/106302
1029 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
1030 (class ana::c_translation_unit): New.
1031 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
1032
1033 2022-11-12 Joseph Myers <joseph@codesourcery.com>
1034
1035 * c-decl.cc (start_underspecified_init)
1036 (finish_underspecified_init): Handle name == NULL_TREE for
1037 compound literals.
1038 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
1039 (shadow_tag_warned): Check for constexpr.
1040 (start_decl): Add parameter do_push.
1041 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
1042 (grokdeclarator): Handle constexpr.
1043 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
1044 (declspecs_add_scspec): Handle constexpr.
1045 * c-parser.cc (c_token_starts_compound_literal)
1046 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
1047 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
1048 (c_parser_compound_literal_scspecs)
1049 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
1050 Update calls to start_init.
1051 (c_parser_declaration_or_fndef, c_parser_initializer)
1052 (c_parser_initval): Pass true for new argument of
1053 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
1054 constexpr compound literals.
1055 (c_parser_static_assert_declaration_no_semi)
1056 (c_parser_enum_specifier, c_parser_struct_declaration)
1057 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
1058 Call convert_lvalue_to_rvalue on expressions required to be
1059 integer constant expressions.
1060 (c_parser_omp_declare_reduction): Update call to start_init.
1061 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
1062 (C_DECL_DECLARED_CONSTEXPR): New macros.
1063 (struct c_declspecs): Add constexpr_p.
1064 (start_decl, convert_lvalue_to_rvalue, start_init): Update
1065 prototypes.
1066 * c-typeck.cc (require_constant_value, require_constant_elements):
1067 Change to bool.
1068 (require_constexpr_value, maybe_get_constexpr_init)
1069 (constexpr_init_fits_real_type, check_constexpr_init): New.
1070 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
1071 maybe_get_constexpr_init.
1072 (store_init_value): Update call to digest_init.
1073 (digest_init): Add parameters int_const_expr, arith_const_expr and
1074 require_constexpr. Check constexpr initializers.
1075 (constructor_top_level): Remove.
1076 (struct initializer_stack): Remove top_level. Add
1077 require_constexpr_value.
1078 (start_init): Remove parameter top_level. Add parameters
1079 init_require_constant and init_require_constexpr. Save
1080 require_constexpr_value on stack.
1081 (pop_init_level): Use a null pointer constant for zero initializer
1082 of pointer initialized with {}.
1083 (output_init_element): Update call to digest_init. Avoid passing
1084 null pointer constants of pointer type through digest_init a
1085 second time when initializing a constexpr object.
1086
1087 2022-11-03 Joseph Myers <joseph@codesourcery.com>
1088
1089 * c-decl.cc (in_underspecified_init, start_underspecified_init)
1090 (finish_underspecified_init): New.
1091 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
1092 Give errors inside initializers of underspecified declarations.
1093 (grokdeclarator): Handle (erroneous) case of C2X auto on a
1094 parameter.
1095 (declspecs_add_type): Handle c2x_auto_p case.
1096 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
1097 C2X mode.
1098 (finish_declspecs): Handle c2x_auto_p.
1099 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
1100 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
1101 (struct c_declspecs): Add c2x_auto_p.
1102 (start_underspecified_init, finish_underspecified_init): New
1103 prototypes.
1104 * c-typeck.cc (build_external_ref): Give error for underspecified
1105 declaration referenced in its initializer.
1106
1107 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1108
1109 * c-decl.cc (grokdeclarator): Pass
1110 arg_info->no_named_args_stdarg_p to build_function_type.
1111 (grokparms): Check arg_info->no_named_args_stdarg_p before
1112 converting () to (void).
1113 (build_arg_info): Initialize no_named_args_stdarg_p.
1114 (get_parm_info): Set no_named_args_stdarg_p.
1115 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
1116 build_function_type.
1117 (store_parm_decls): Count (...) functions as prototyped.
1118 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
1119 parenthesis to start parameter list.
1120 (c_parser_parms_list_declarator): Always allow '...' with no
1121 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
1122 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
1123 * c-typeck.cc (composite_type): Handle
1124 TYPE_NO_NAMED_ARGS_STDARG_P.
1125 (function_types_compatible_p): Compare
1126 TYPE_NO_NAMED_ARGS_STDARG_P.
1127
1128 2022-10-28 Jakub Jelinek <jakub@redhat.com>
1129
1130 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
1131 comma before the first clause.
1132 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
1133 c_parser_omp_flush, c_parser_omp_scan_loop_body,
1134 c_parser_omp_ordered, c_finish_omp_declare_variant,
1135 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
1136 c_parser_omp_requires, c_parser_omp_error,
1137 c_parser_omp_assumption_clauses): Likewise.
1138
1139 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1140
1141 PR c/61469
1142 * c-convert.cc (c_convert): Handle enums with underlying boolean
1143 type like bool.
1144 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
1145 enums with enum type specifier, but give errors for storage class
1146 specifiers, qualifiers or alignment specifiers in non-definition
1147 declarations of such enums.
1148 (grokdeclarator): Give error for non-definition use of type
1149 specifier with an enum type specifier.
1150 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
1151 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
1152 (xref_tag): Update call to parser_xref_tag.
1153 (start_enum): Add argument fixed_underlying_type. Complete enum
1154 type with a fixed underlying type given in the definition. Give
1155 error for defining without a fixed underlying type in the
1156 definition if one was given in a prior declaration. Do not mark
1157 enums with fixed underlying type as packed for -fshort-enums.
1158 Store the enum type in the_enum.
1159 (finish_enum): Do not adjust types of values or check their range
1160 for an enum with a fixed underlying type. Set underlying type of
1161 enum and variants.
1162 (build_enumerator): Check enumeration constants for enum with
1163 fixed underlying type against that type and convert to that type.
1164 Increment in the underlying integer type, with handling for bool.
1165 (c_simulate_enum_decl): Update call to start_enum.
1166 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
1167 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
1168 rather than recomputing an underlying type based on size.
1169 * c-parser.cc (c_parser_declspecs)
1170 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
1171 Set has_enum_type_specifier for type specifiers.
1172 (c_parser_enum_specifier): Handle enum type specifiers.
1173 (c_parser_struct_or_union_specifier): Update call to
1174 parser_xref_tag.
1175 (c_parser_omp_atomic): Check for boolean increment or decrement
1176 using C_BOOLEAN_TYPE_P.
1177 * c-tree.h (C_BOOLEAN_TYPE_P): New.
1178 (struct c_typespec): Add has_enum_type_specifier.
1179 (struct c_declspecs): Add enum_type_specifier_ref_p.
1180 (struct c_enum_contents): Add enum_type.
1181 (start_enum, parser_xref_tag): Update prototypes.
1182 * c-typeck.cc (composite_type): Allow for enumerated types
1183 compatible with bool.
1184 (common_type, comptypes_internal, perform_integral_promotions):
1185 Use ENUM_UNDERLYING_TYPE.
1186 (parser_build_binary_op, build_unary_op, convert_for_assignment)
1187 (c_finish_return, c_start_switch, build_binary_op): Check for
1188 boolean types using C_BOOLEAN_TYPE_P.
1189
1190 2022-10-24 Jakub Jelinek <jakub@redhat.com>
1191
1192 PR c++/107358
1193 * c-typeck.cc (build_binary_op): Pass operands before excess precision
1194 promotions to scalar_to_vector call.
1195
1196 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
1197
1198 * c-decl.cc (finish_function): Ignore hosted when deciding
1199 whether to implicitly return zero, but check noreturn.
1200 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
1201 requirements to just MAIN_NAME_P when hosted, or `int main'
1202 otherwise.
1203
1204 2022-10-20 Richard Biener <rguenther@suse.de>
1205
1206 PR c/107305
1207 PR c/107306
1208 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
1209 the parsed IL and zap the body on error.
1210
1211 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1212
1213 PR c/107164
1214 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
1215 with previous declaration visible.
1216
1217 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1218
1219 PR c/36113
1220 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
1221 convert all to the type of the enumeration. pedwarn if no integer
1222 type fits all enumerators and default to
1223 widest_integer_literal_type_node in that case. Otherwise pedwarn
1224 for type wider than intmax_t.
1225 (build_enumerator): pedwarn for enumerators outside the range of
1226 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
1227 enumerators outside the range of int. On overflow, attempt to
1228 find a wider type that can hold the value of the next enumerator.
1229 Do not convert value to type determined with
1230 c_common_type_for_size.
1231
1232 2022-10-14 Jakub Jelinek <jakub@redhat.com>
1233
1234 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
1235 double.
1236
1237 2022-10-14 Joseph Myers <joseph@codesourcery.com>
1238
1239 * c-decl.cc (build_compound_literal): Add parameter scspecs.
1240 Handle storage class specifiers.
1241 * c-parser.cc (c_token_starts_compound_literal)
1242 (c_parser_compound_literal_scspecs): New.
1243 (c_parser_postfix_expression_after_paren_type): Add parameter
1244 scspecs. Call pedwarn_c11 for use of storage class specifiers.
1245 Update call to build_compound_literal.
1246 (c_parser_cast_expression, c_parser_sizeof_expression)
1247 (c_parser_alignof_expression): Handle storage class specifiers for
1248 compound literals. Update calls to
1249 c_parser_postfix_expression_after_paren_type.
1250 (c_parser_postfix_expression): Update syntax comment.
1251 * c-tree.h (build_compound_literal): Update prototype.
1252 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
1253 register compound literal.
1254
1255 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
1256
1257 * c-decl.cc (flexible_array_member_type_p): New function.
1258 (one_element_array_type_p): Likewise.
1259 (zero_length_array_type_p): Likewise.
1260 (add_flexible_array_elts_to_size): Call new utility
1261 routine flexible_array_member_type_p.
1262 (is_flexible_array_member_p): New function.
1263 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
1264
1265 2022-10-06 Joseph Myers <joseph@codesourcery.com>
1266
1267 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1268 and not C2x.
1269 (c_keyword_starts_typename, c_token_starts_declspecs)
1270 (c_parser_declspecs, c_parser_objc_selector): Handle
1271 RID_TYPEOF_UNQUAL.
1272 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1273 Distinguish typeof for C2x from __typeof__ for all standard
1274 versions and typeof before C2x.
1275 * c-typeck.cc (build_function_call_vec): Use unqualified version
1276 of non-void return type.
1277 (build_unary_op): Use unqualified type for increment and
1278 decrement.
1279
1280 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1281
1282 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1283 call for holds clause on assume construct.
1284
1285 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1286
1287 PR c++/106654
1288 * c-parser.cc (handle_assume_attribute): New function.
1289 (c_parser_declaration_or_fndef): Handle assume attribute.
1290 (c_parser_attribute_arguments): Add assume_attr argument,
1291 if true, parse first argument as conditional expression.
1292 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1293 c_parser_attribute_arguments callers.
1294 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1295 assume attribute.
1296
1297 2022-10-04 Jakub Jelinek <jakub@redhat.com>
1298
1299 * c-lang.h (struct c_omp_declare_target_attr): New type.
1300 (current_omp_declare_target_attribute): Change type from
1301 int to vec<c_omp_declare_target_attr, va_gc> *.
1302 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1303 If last pushed directive was begin declare target, use different
1304 wording and simplify format strings for easier translations.
1305 (c_parser_omp_clause_device_type): Uncomment
1306 check_no_duplicate_clause call.
1307 (c_parser_omp_declare_target): Adjust for the
1308 current_omp_declare_target_attribute type change, push { -1 }.
1309 Use error_at rather than warning_at for declare target with
1310 only device_type clauses.
1311 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1312 (c_parser_omp_begin): Add begin declare target support.
1313 (c_parser_omp_end): Adjust for the
1314 current_omp_declare_target_attribute type change, adjust
1315 diagnostics wording and simplify format strings for easier
1316 translations.
1317 * c-decl.cc (current_omp_declare_target_attribute): Change type from
1318 int to vec<c_omp_declare_target_attr, va_gc> *.
1319 (c_decl_attributes): Adjust for the
1320 current_omp_declare_target_attribute type change. If device_type
1321 was present on begin declare target, add "omp declare target host"
1322 and/or "omp declare target nohost" attributes.
1323
1324 2022-09-29 Joseph Myers <joseph@codesourcery.com>
1325
1326 * c-decl.cc (handle_std_noreturn_attribute): New function.
1327 (std_attribute_table): Add _Noreturn and noreturn.
1328
1329 2022-09-27 Jakub Jelinek <jakub@redhat.com>
1330
1331 * c-lang.h (current_omp_begin_assumes): Declare.
1332 * c-parser.cc: Include bitmap.h.
1333 (c_parser_omp_end_declare_target): Rename to ...
1334 (c_parser_omp_end): ... this. Handle also end assumes.
1335 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1336 c_parser_omp_assumes, c_parser_omp_assume): New functions.
1337 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1338 without corresponding #pragma omp end assumes.
1339 (c_parser_pragma): Use %s in may only be used at file scope
1340 diagnostics to decrease number of translatable messages. Handle
1341 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
1342 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1343 for it rather than c_parser_omp_end_declare_target.
1344 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1345 * c-decl.cc (current_omp_begin_assumes): Define.
1346
1347 2022-09-24 Jakub Jelinek <jakub@redhat.com>
1348
1349 PR c/106981
1350 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1351 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1352 t2 have different types.
1353
1354 2022-09-22 David Malcolm <dmalcolm@redhat.com>
1355
1356 PR c/106830
1357 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1358 (c_parser_cast_expression): Likewise.
1359 (c_parser_alignof_expression): Likewise.
1360 (c_parser_postfix_expression_after_paren_type): Likewise.
1361 (c_parser_postfix_expression_after_primary): Likewise.
1362 (c_parser_expression): Likewise.
1363 (c_parser_omp_variable_list): Likewise.
1364 (c_parser_transaction_expression): Likewise.
1365 * c-tree.h (c_expr::set_error): Likewise.
1366 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1367 (parser_build_unary_op): Likewise.
1368 (parser_build_binary_op): Likewise.
1369 (digest_init): Likewise.
1370 (pop_init_level): Likewise.
1371 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1372
1373 2022-09-19 Marek Polacek <polacek@redhat.com>
1374
1375 PR c/106947
1376 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1377 notes.
1378
1379 2022-09-15 Richard Biener <rguenther@suse.de>
1380
1381 * c-decl.cc (build_void_list_node): Remove.
1382
1383 2022-09-14 Julian Brown <julian@codesourcery.com>
1384
1385 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1386 on error.
1387
1388 2022-09-07 Joseph Myers <joseph@codesourcery.com>
1389
1390 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1391 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1392 for C2x spellings of keywords.
1393 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1394
1395 2022-09-06 Jakub Jelinek <jakub@redhat.com>
1396
1397 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1398 in omp_cur_iteration - 1 has integer_type_node type.
1399
1400 2022-09-03 Jakub Jelinek <jakub@redhat.com>
1401
1402 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1403 (c_parser_omp_clause_depend_sink): Renamed to ...
1404 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
1405 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
1406 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1407 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1408 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1409 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1410 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1411 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1412 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1413 (c_parser_omp_clause_doacross): New function.
1414 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1415 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1416 OMP_CLAUSE_DEPEND_SOURCE.
1417 (c_parser_omp_for_loop): Don't diagnose here linear clause together
1418 with ordered with argument.
1419 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1420 for simd.
1421 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1422 (c_parser_omp_ordered): Handle also doacross and adjust for it
1423 diagnostic wording.
1424 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1425 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1426
1427 2022-09-02 David Malcolm <dmalcolm@redhat.com>
1428
1429 PR c/90885
1430 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1431 (c_parser_expr_no_commas): Likewise.
1432 (c_parser_conditional_expression): Likewise.
1433 (c_parser_binary_expression): Clear m_decimal when popping the
1434 stack.
1435 (c_parser_unary_expression): Clear ret.m_decimal.
1436 (c_parser_has_attribute_expression): Likewise for result.
1437 (c_parser_predefined_identifier): Likewise for expr.
1438 (c_parser_postfix_expression): Likewise for expr.
1439 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1440 token.
1441 * c-tree.h (c_expr::m_decimal): New bitfield.
1442 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1443 (parser_build_binary_op): Call check_for_xor_used_as_pow.
1444
1445 2022-09-01 Joseph Myers <joseph@codesourcery.com>
1446
1447 * c-decl.cc (grokparms): Handle () in a function declaration the
1448 same as (void) for C2X.
1449
1450 2022-08-31 Joseph Myers <joseph@codesourcery.com>
1451
1452 * c-parser.cc (c_parser_label): Pass attributes to do_case.
1453 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
1454 c_add_case_label.
1455
1456 2022-08-26 Jakub Jelinek <jakub@redhat.com>
1457
1458 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1459
1460 2022-08-25 Marek Polacek <polacek@redhat.com>
1461
1462 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1463 Give a better diagnostic when converting to nullptr_t.
1464 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1465 initialization.
1466 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1467 (c_parser_postfix_expression): Handle RID_NULLPTR.
1468 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1469 nullptr_node.
1470 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1471 (build_conditional_expr): Handle the case when the second/third operand
1472 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1473 (convert_for_assignment): Handle converting an expression of type
1474 nullptr_t to pointer/bool.
1475 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1476 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1477
1478 2022-08-25 Joseph Myers <joseph@codesourcery.com>
1479
1480 * c-decl.cc (start_decl): Do not diagnose initialization of
1481 variable-sized objects here.
1482 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
1483 callers changed.
1484 (c_parser_initializer): Diagnose initialization of variable-sized
1485 objects other than with braced initializer.
1486 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1487 braces and update diagnostic text. Diagnose initialization of
1488 variable-sized objects with nonempty braces.
1489 * c-typeck.cc (digest_init): Update diagnostic for initialization
1490 of variable-sized objects.
1491 (really_start_incremental_init, set_designator)
1492 (process_init_element): Update comments.
1493 (pop_init_level): Allow scalar empty initializers.
1494
1495 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
1496 Chung-Lin Tang <cltang@codesourcery.com>
1497
1498 PR c++/104493
1499 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1500 instead of removed langhook.
1501 * c-typeck.cc (c_finish_omp_clauses): Likewise.
1502
1503 2022-08-11 Marek Polacek <polacek@redhat.com>
1504
1505 PR middle-end/102633
1506 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
1507 Call suppress_warning.
1508 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1509 (c_parser_omp_declare_reduction): Pass omp_priv down to
1510 c_parser_initializer.
1511
1512 2022-08-08 Tom Honermann <tom@honermann.net>
1513
1514 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1515 of CPP_UTF8STRING when char8_t support is enabled.
1516 * c-typeck.cc (digest_init): Allow initialization of an array
1517 of character type by a string literal with type array of
1518 char8_t.
1519
1520 2022-08-01 David Malcolm <dmalcolm@redhat.com>
1521
1522 * c-typeck.cc (build_c_cast): Quote names of address spaces in
1523 diagnostics.
1524 (convert_for_assignment): Add a note to address space mismatch
1525 diagnostics, specifying the expected and actual types.
1526
1527 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
1528
1529 PR preprocessor/97498
1530 * c-parser.cc (c_parser_pragma): Set input_location to the
1531 location of the pragma, rather than the start of the line.
1532
1533 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
1534 Chung-Lin Tang <cltang@codesourcery.com>
1535 Thomas Schwinge <thomas@codesourcery.com>
1536
1537 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1538 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1539 OMP_REQUIRES_TARGET_USED.
1540 (c_parser_omp_requires): Remove sorry.
1541
1542 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
1543
1544 * c-parser.cc (c_parser_omp_target_enter_data,
1545 c_parser_omp_target_exit_data): Accept tofrom
1546 map-type modifier but use 'to' / 'from' internally.
1547
1548 2022-06-16 David Malcolm <dmalcolm@redhat.com>
1549
1550 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1551 group the warning with any note.
1552 (warn_about_goto): Likewise to group error or warning with note.
1553 Bail out if the warning wasn't emitted, to avoid emitting orphan
1554 notes.
1555 (lookup_label_for_goto): Add auto_diagnostic_group to
1556 group the error with the note.
1557 (check_earlier_gotos): Likewise.
1558 (c_check_switch_jump_warnings): Likewise for any error/warning.
1559 Conditionalize emission of the notes.
1560 (diagnose_uninitialized_cst_member): Likewise for warning,
1561 conditionalizing emission of the note.
1562 (grokdeclarator): Add auto_diagnostic_group to group the "array
1563 type has incomplete element type" error with any note.
1564 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1565 with their notes. Conditionalize emission of notes.
1566 (start_struct): Add auto_diagnostic_group to group the
1567 "redefinition of" errors with any note.
1568 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1569 (check_for_loop_decls): Likewise for pre-C99 error.
1570
1571 2022-06-07 Jakub Jelinek <jakub@redhat.com>
1572
1573 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1574 style linear clause modifiers. Set
1575 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1576 old style modifiers are used.
1577 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1578 with val modifier on simd or for if the old style modifiers are
1579 used.
1580
1581 2022-06-02 David Malcolm <dmalcolm@redhat.com>
1582
1583 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1584 (c_get_sarif_source_language): New.
1585 * c-tree.h (c_get_sarif_source_language): New decl.
1586
1587 2022-05-31 Jason Merrill <jason@redhat.com>
1588
1589 * Make-lang.in (c.tags): Look at *.cc.
1590
1591 2022-05-31 Jakub Jelinek <jakub@redhat.com>
1592
1593 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1594 clauses.
1595
1596 2022-05-28 Jakub Jelinek <jakub@redhat.com>
1597
1598 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1599 seen first, use "%<to%>" or "%<enter%>" depending on
1600 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1601 "%<to%> or %<enter%>" wording.
1602
1603 2022-05-27 Jakub Jelinek <jakub@redhat.com>
1604
1605 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1606 (c_parser_omp_all_clauses): For to clause on declare target, use
1607 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1608 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1609 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1610 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1611 OMP_CLAUSE_TO_DECLARE.
1612 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1613 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1614 name in diagnostics instead of
1615 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1616
1617 2022-05-25 Jakub Jelinek <jakub@redhat.com>
1618
1619 PR c/91134
1620 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1621 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1622 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1623 diagnostic and fixit hint if DATUM has pointer type.
1624 * c-parser.cc (c_parser_postfix_expression,
1625 c_parser_omp_variable_list): Adjust build_component_ref callers.
1626 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1627 Likewise.
1628
1629 2022-05-24 Jakub Jelinek <jakub@redhat.com>
1630
1631 PR c/105378
1632 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1633
1634 2022-05-18 Marek Polacek <polacek@redhat.com>
1635
1636 PR c/105131
1637 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1638 mismatches.
1639 * c-tree.h (comptypes_check_enum_int): Declare.
1640 * c-typeck.cc (comptypes): No longer static.
1641
1642 2022-05-17 Marek Polacek <polacek@redhat.com>
1643
1644 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1645 its value.
1646
1647 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1648
1649 * c-parser.cc (c_parser_omp_clause_depend): Parse
1650 inoutset depend-kind.
1651 (c_parser_omp_depobj): Likewise.
1652
1653 2022-05-16 Martin Liska <mliska@suse.cz>
1654
1655 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1656
1657 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1658
1659 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1660 if flag_openmp.
1661 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1662 in postfix expressions.
1663 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1664 clause.
1665 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1666 keyword in depend clause as null_pointer_node, diagnose invalid
1667 uses.
1668
1669 2022-05-09 Martin Liska <mliska@suse.cz>
1670
1671 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1672 macros.
1673 (c_parser_binary_expression): Likewise.
1674
1675 2022-05-07 Marek Polacek <polacek@redhat.com>
1676
1677 PR c++/101833
1678 PR c++/47634
1679 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1680
1681 2022-04-08 Jakub Jelinek <jakub@redhat.com>
1682
1683 PR c/105149
1684 * c-typeck.cc (c_build_va_arg): Reject function types.
1685
1686 2022-03-22 Marek Polacek <polacek@redhat.com>
1687
1688 PR c/82283
1689 PR c/84685
1690 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1691 (start_init): Set it.
1692 (finish_init): Restore constructor_designated.
1693 (push_init_level): Set constructor_designated to the value of
1694 constructor_designated in the upper constructor_stack.
1695
1696 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1697
1698 PR other/65095
1699 * c-typeck.cc (handle_omp_array_sections_1)
1700 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1701 instead of 'c_omp_map_clause_name'.
1702
1703 2022-03-09 Joseph Myers <joseph@codesourcery.com>
1704
1705 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1706 differently from earlier standards for unprototyped function type
1707 compatibility.
1708
1709 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1710
1711 PR c/104711
1712 * c-fold.cc (c_fully_fold_internal): Don't emit
1713 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1714 * c-typeck.cc (build_binary_op): Likewise.
1715
1716 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1717
1718 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1719 literal.
1720
1721 2022-02-23 Richard Biener <rguenther@suse.de>
1722
1723 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1724 SSA names without definition.
1725 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1726
1727 2022-02-17 Jakub Jelinek <jakub@redhat.com>
1728
1729 PR c/104532
1730 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1731 convert_lvalue_to_rvalue and build_indirect_ref instead of
1732 build_simple_mem_ref.
1733
1734 2022-02-11 Richard Biener <rguenther@suse.de>
1735
1736 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1737 VEC_COND_EXPRs.
1738
1739 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1740
1741 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1742 clause.
1743 (c_parser_omp_variable_list): Handle array sections.
1744 (c_parser_omp_clause_has_device_addr): Added.
1745 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1746 case.
1747 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1748 OMP_CLAUSE_MASK.
1749 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1750 (c_finish_omp_clauses): Handle array sections.
1751
1752 2022-02-09 Jakub Jelinek <jakub@redhat.com>
1753
1754 PR c/104427
1755 * c-parser.cc (c_parser_postfix_expression)
1756 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1757 instead of build1_loc to build PAREN_EXPR.
1758 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1759 * c-fold.cc (c_fully_fold_internal): Likewise.
1760
1761 2022-01-17 Martin Liska <mliska@suse.cz>
1762
1763 * Make-lang.in: Rename .c names to .cc.
1764 * c-convert.cc: Likewise.
1765 * c-decl.cc (struct lang_identifier): Likewise.
1766 (pop_scope): Likewise.
1767 (finish_decl): Likewise.
1768 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1769 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1770 * c-parser.h (GCC_C_PARSER_H): Likewise.
1771 * c-tree.h (c_keyword_starts_typename): Likewise.
1772 (finish_declspecs): Likewise.
1773 (c_get_alias_set): Likewise.
1774 (enum c_oracle_request): Likewise.
1775 (tag_exists_p): Likewise.
1776 (set_c_expr_source_range): Likewise.
1777 * c-typeck.cc (c_common_type): Likewise.
1778 (c_finish_omp_clauses): Likewise.
1779 * config-lang.in: Likewise.
1780
1781 2022-01-17 Martin Liska <mliska@suse.cz>
1782
1783 * c-aux-info.c: Moved to...
1784 * c-aux-info.cc: ...here.
1785 * c-convert.c: Moved to...
1786 * c-convert.cc: ...here.
1787 * c-decl.c: Moved to...
1788 * c-decl.cc: ...here.
1789 * c-errors.c: Moved to...
1790 * c-errors.cc: ...here.
1791 * c-fold.c: Moved to...
1792 * c-fold.cc: ...here.
1793 * c-lang.c: Moved to...
1794 * c-lang.cc: ...here.
1795 * c-objc-common.c: Moved to...
1796 * c-objc-common.cc: ...here.
1797 * c-parser.c: Moved to...
1798 * c-parser.cc: ...here.
1799 * c-typeck.c: Moved to...
1800 * c-typeck.cc: ...here.
1801 * gccspec.c: Moved to...
1802 * gccspec.cc: ...here.
1803 * gimple-parser.c: Moved to...
1804 * gimple-parser.cc: ...here.
1805
1806 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
1807
1808 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1809
1810 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1811
1812 PR c++/103705
1813 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1814 outer node for ARRAY_REFs.
1815
1816 2022-01-01 Jakub Jelinek <jakub@redhat.com>
1817
1818 PR objc/103639
1819 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1820 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1821
1822 2021-12-17 Marek Polacek <polacek@redhat.com>
1823
1824 PR c/103649
1825 * c-decl.c (c_warn_unused_attributes): Don't warn for
1826 attribute_ignored_p.
1827 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1828 arguments when the attribute is ignored.
1829
1830 2021-12-14 Jakub Jelinek <jakub@redhat.com>
1831
1832 PR c/103587
1833 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1834 consume the pragma and silently skip to the pragma eol.
1835
1836 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1837
1838 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1839 * c-parser.c: Likewise.
1840
1841 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1842
1843 PR pch/71934
1844 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1845 to resort_data.new_value.
1846
1847 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1848
1849 * c-parser.c (struct omp_dim): New struct type for use inside
1850 c_parser_omp_variable_list.
1851 (c_parser_omp_variable_list): Allow multiple levels of array and
1852 component accesses in array section base-pointer expression.
1853 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1854 c_parser_omp_var_list_parens.
1855 (c_parser_omp_clause_from): Likewise.
1856 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1857 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1858 POINTER_PLUS_EXPR.
1859 (c_finish_omp_clauses): Extend allowed ranged of expressions
1860 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1861
1862 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1863
1864 PR middle-end/92120
1865 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1866 call to c_parser_omp_variable_list to 'true'.
1867 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1868 array base handling.
1869 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1870
1871 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1872
1873 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1874 orphan loop" checking.
1875
1876 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1877 Thomas Schwinge <thomas@codesourcery.com>
1878
1879 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1880 OpenACC gang reductions.
1881
1882 2021-11-30 Richard Biener <rguenther@suse.de>
1883
1884 * gimple-parser.c (c_parser_gimple_postfix_expression):
1885 avoid unreachable code after break.
1886
1887 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1888
1889 PR other/103021
1890 * Make-lang.in: Use ETAGS variable in TAGS target.
1891
1892 2021-11-29 Richard Biener <rguenther@suse.de>
1893
1894 * c-typeck.c (c_tree_equal): Remove unreachable return.
1895 * c-parser.c (get_matching_symbol): Likewise.
1896
1897 2021-11-23 Jakub Jelinek <jakub@redhat.com>
1898
1899 * c-typeck.c (c_clone_omp_udr): Don't initialize
1900 id.transform_lang_insert_block.
1901
1902 2021-11-19 Martin Sebor <msebor@redhat.com>
1903
1904 PR c++/33925
1905 PR c/102867
1906 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1907 code resulting from macro expansion.
1908
1909 2021-11-19 Martin Liska <mliska@suse.cz>
1910
1911 Revert:
1912 2021-11-19 Martin Liska <mliska@suse.cz>
1913
1914 * c-parser.c (add_debug_begin_stmt): Use option directly.
1915
1916 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1917
1918 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1919 * c-parser.c (c_parser_postfix_expression): Likewise.
1920
1921 2021-11-18 Martin Liska <mliska@suse.cz>
1922
1923 * c-parser.c (add_debug_begin_stmt): Use option directly.
1924
1925 2021-11-17 Martin Sebor <msebor@redhat.com>
1926
1927 PR c/101702
1928 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1929 bounds before deciding if they're constant.
1930
1931 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1932
1933 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1934 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1935
1936 2021-11-11 Jakub Jelinek <jakub@redhat.com>
1937
1938 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1939 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1940 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1941 OMP_CLAUSE_NUM_TEAMS_EXPR.
1942 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1943 combined target teams even lower-bound expression.
1944
1945 2021-11-11 Richard Biener <rguenther@suse.de>
1946
1947 * gimple-parser.c: Shuffle bitmap.h include.
1948
1949 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1950
1951 PR c/103031
1952 * c-convert.c (c_convert): New function, based on convert.
1953 (convert): Make into wrapper of c_convert.
1954 (convert_init): New function.
1955 * c-typeck.c (enum impl_conv): Add ic_init_const.
1956 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1957 new argument to convert_and_check call.
1958 (digest_init): Pass ic_init_const to convert_for_assignment for
1959 initializers required to be constant.
1960
1961 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1962
1963 * c-tree.h (c_simulate_record_decl): Declare.
1964 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1965 * c-decl.c (c_simulate_record_decl): New function.
1966
1967 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1968
1969 PR other/102663
1970 * Make-lang.in: Add dummy c.install-dvi target.
1971
1972 2021-10-15 Richard Biener <rguenther@suse.de>
1973
1974 PR c/102763
1975 * gimple-parser.c
1976 (c_parser_gimple_postfix_expression_after_primary): Check
1977 for a pointer do be dereferenced by ->.
1978
1979 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1980
1981 * c-parser.c (c_finish_omp_declare_variant): Change call from
1982 c_omp_check_context_selector to omp_check_context_selector. Change
1983 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1984
1985 2021-10-09 Jakub Jelinek <jakub@redhat.com>
1986
1987 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1988 (c_parser_omp_scan_loop_body): Use it.
1989 (c_parser_omp_sections_scope): Likewise.
1990
1991 2021-10-07 Richard Biener <rguenther@suse.de>
1992
1993 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1994
1995 2021-10-05 Richard Biener <rguenther@suse.de>
1996
1997 PR c/102605
1998 * gimple-parser.c (c_parser_gimple_postfix_expression):
1999 Accept more address _Literals.
2000
2001 2021-10-04 Marek Polacek <polacek@redhat.com>
2002
2003 PR c++/97573
2004 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
2005
2006 2021-10-01 Martin Sebor <msebor@redhat.com>
2007
2008 PR c/102103
2009 * c-typeck.c (maybe_warn_for_null_address): New function.
2010 (build_binary_op): Call it.
2011
2012 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2013 Richard Biener <rguenther@suse.de>
2014
2015 PR sanitizer/102515
2016 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2017 for division even for SANITIZE_SI_OVERFLOW.
2018
2019 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2020
2021 * c-parser.c (c_parser_omp_clause_order): Set
2022 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
2023
2024 2021-09-28 Andrew Pinski <apinski@marvell.com>
2025
2026 PR c/32122
2027 * c-parser.c (c_parser_statement_after_labels): Pass
2028 the c_expr instead of the tree to c_finish_goto_ptr.
2029 * c-typeck.c (c_finish_goto_ptr): Change the second
2030 argument type to c_expr.
2031 * c-tree.h (c_finish_goto_ptr): Likewise.
2032 Error out if the expression was not of a pointer type.
2033
2034 2021-09-22 Jakub Jelinek <jakub@redhat.com>
2035
2036 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
2037 modifiers.
2038
2039 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2040
2041 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
2042 and reproducible modifiers.
2043 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
2044
2045 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2046
2047 * c-parser.c (c_parser_omp_clause_default): Handle private and
2048 firstprivate arguments, adjust diagnostics on unknown argument.
2049
2050 2021-09-17 Jakub Jelinek <jakub@redhat.com>
2051
2052 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
2053 is true.
2054
2055 2021-09-10 Jakub Jelinek <jakub@redhat.com>
2056
2057 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
2058 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
2059 don't call build_conditional_expr, instead build a COND_EXPR directly.
2060 (c_parser_binary_expression): Avoid calling parser_build_binary_op
2061 if omp_atomic_lhs even in more cases for >, < or ==.
2062 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
2063 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
2064 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
2065 * c-typeck.c (build_binary_op): For flag_openmp only handle
2066 MIN_EXPR/MAX_EXPR.
2067
2068 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
2069
2070 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
2071 directive.
2072
2073 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
2074
2075 * c-decl.c (enum deprecated_states): Add unavailable state.
2076 (merge_decls): Copy unavailability.
2077 (quals_from_declspecs): Handle unavailable case.
2078 (start_decl): Amend the logic handling suppression of nested
2079 deprecation states to include unavailability.
2080 (smallest_type_quals_location): Amend comment.
2081 (grokdeclarator): Handle the unavailable deprecation state.
2082 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
2083 * c-tree.h (struct c_declspecs): Add unavailable_p.
2084 * c-typeck.c (build_component_ref): Handle unavailability.
2085 (build_external_ref): Likewise.
2086
2087 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
2088 Joseph Myers <joseph@codesourcery.com>
2089
2090 PR c/79412
2091 * c-decl.c (duplicate_decls): On significant mismatches, mark the
2092 types of both (non-function) decls as error_mark_node, so that the
2093 middle-end can see the code is malformed.
2094 (free_attr_access_data): Don't process if the type has been set to
2095 error_mark_node.
2096
2097 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
2098
2099 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
2100 and 'ancestor' in 'target device' clauses.
2101
2102 2021-08-23 Jakub Jelinek <jakub@redhat.com>
2103
2104 * c-parser.c (c_parser_omp_clause_num_tasks,
2105 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
2106
2107 2021-08-22 Martin Uecker <muecker@gwdg.de>
2108
2109 PR c/98397
2110 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
2111 for pointers to arrays with qualifiers.
2112 (build_conditional_expr): For C23 don't lose qualifiers for pointers
2113 to arrays when the other pointer is a void pointer. Update warnings.
2114 (convert_for_assignment): Update warnings for C2X when converting from
2115 void* with qualifiers to a pointer to array with the same qualifiers.
2116
2117 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2118
2119 * c-parser.c (c_parser_omp_error): New function.
2120 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
2121
2122 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2123
2124 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
2125 comma at the end of list.
2126 (c_parser_omp_requires): Likewise.
2127
2128 2021-08-19 Jakub Jelinek <jakub@redhat.com>
2129
2130 * c-parser.c (c_parser_omp_requires): Don't call
2131 c_parser_peek_2nd_token and optionally consume token if current
2132 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
2133
2134 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2135
2136 * c-parser.c (c_parser_omp_nothing): New function.
2137 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
2138
2139 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2140
2141 * c-parser.c (c_parser_statement_after_labels): Add restart label
2142 near the start of the function. If c_parser_pragma returns false,
2143 goto restart.
2144 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
2145 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
2146 return what c_parser_omp_declare returned. Return true instead of
2147 false after emitting errors that the directive is not allowed in
2148 pragma_stmt context.
2149 (c_parser_omp_ordered): Return true instead of
2150 false after emitting errors that the directive is not allowed in
2151 pragma_stmt context.
2152 (c_parser_omp_target_update): Likewise.
2153 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
2154 Change return type from tree to bool, return false if the
2155 directive should be ignored in pragma_stmt contexts.
2156 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
2157 return their result directly.
2158 (c_parser_omp_cancellation_point): Change return type from void to
2159 bool, return false if the directive should be ignored in pragma_stmt
2160 contexts.
2161 (c_parser_omp_declare): Likewise.
2162
2163 2021-08-17 Jakub Jelinek <jakub@redhat.com>
2164
2165 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
2166 (c_parser_omp_scope): New function.
2167 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
2168
2169 2021-08-12 Jakub Jelinek <jakub@redhat.com>
2170
2171 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
2172 (c_parser_omp_clause_filter): New function.
2173 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
2174 (OMP_MASKED_CLAUSE_MASK): Define.
2175 (c_parser_omp_masked): New function.
2176 (c_parser_omp_parallel): Handle parallel masked.
2177 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
2178 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
2179
2180 2021-08-12 Martin Uecker <muecker@gwdg.de>
2181
2182 PR c/101838
2183 PR c/29970
2184 * c-typeck.c (c_expr_sizeof_type): Evaluate
2185 size expressions for structs of variable size.
2186
2187 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
2188
2189 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
2190 'primary' as alias for 'master'.
2191
2192 2021-08-10 Martin Uecker <muecker@gwdg.de>
2193
2194 PR c/29970
2195 * c-typeck.c (c_expr_sizeof_expr): Evaluate
2196 size expressions for structs of variable size.
2197
2198 2021-08-06 Tamar Christina <tamar.christina@arm.com>
2199
2200 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
2201 * c-tree.h (c_simulate_enum_decl): Likewise.
2202
2203 2021-08-06 Martin Sebor <msebor@redhat.com>
2204
2205 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
2206 vec arguments to by-reference.
2207 (c_finish_omp_declare_simd): Same.
2208 (c_parser_compound_statement_nostart): Same.
2209 (c_parser_for_statement): Same.
2210 (c_parser_objc_methodprotolist): Same.
2211 (c_parser_oacc_routine): Same.
2212 (c_parser_omp_for_loop): Same.
2213 (c_parser_omp_declare_simd): Same.
2214
2215 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
2216 Joseph Myers <joseph@codesourcery.com>
2217 Cesar Philippidis <cesar@codesourcery.com>
2218
2219 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
2220 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
2221 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2222 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
2223
2224 2021-07-20 Martin Sebor <msebor@redhat.com>
2225
2226 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
2227 by-const-reference.
2228 * c-typeck.c (c_build_function_call_vec): Same.
2229
2230 2021-07-15 Martin Sebor <msebor@redhat.com>
2231
2232 PR c/101289
2233 PR c/97548
2234 * c-decl.c (get_parm_array_spec): Strip nops.
2235
2236 2021-07-06 Martin Sebor <msebor@redhat.com>
2237
2238 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
2239
2240 2021-07-02 Jakub Jelinek <jakub@redhat.com>
2241
2242 PR c/101297
2243 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
2244 appears before a CPP_NAME.
2245
2246 2021-06-25 Martin Sebor <msebor@redhat.com>
2247
2248 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
2249 warning_suppressed_p, suppress_warning, and copy_no_warning.
2250 (diagnose_mismatched_decls): Same.
2251 (duplicate_decls): Same.
2252 (grokdeclarator): Same.
2253 (finish_function): Same.
2254 (c_write_global_declarations_1): Same.
2255 * c-fold.c (c_fully_fold_internal): Same.
2256 * c-parser.c (c_parser_expr_no_commas): Same.
2257 (c_parser_postfix_expression): Same.
2258 * c-typeck.c (array_to_pointer_conversion): Same.
2259 (function_to_pointer_conversion): Same.
2260 (default_function_array_conversion): Same.
2261 (convert_lvalue_to_rvalue): Same.
2262 (default_conversion): Same.
2263 (build_indirect_ref): Same.
2264 (build_function_call_vec): Same.
2265 (build_atomic_assign): Same.
2266 (build_unary_op): Same.
2267 (c_finish_return): Same.
2268 (emit_side_effect_warnings): Same.
2269 (c_finish_stmt_expr): Same.
2270 (c_omp_clause_copy_ctor): Same.
2271
2272 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2273
2274 PR c/101176
2275 * c-parser.c (c_parser_has_attribute_expression): Set source range for
2276 the result.
2277
2278 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2279
2280 PR c/101171
2281 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2282 error_mark_node.
2283
2284 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2285
2286 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2287 C_ORT_OMP for clauses on target construct.
2288 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2289 (c_parser_omp_target): For non-combined target add
2290 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
2291 C_ORT_OMP_TARGET to c_finish_omp_clauses.
2292 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2293 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2294 never present on C_ORT_*DECLARE_SIMD.
2295 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
2296 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2297 corresponding map clauses.
2298
2299 2021-06-21 Jakub Jelinek <jakub@redhat.com>
2300
2301 PR inline-asm/100785
2302 * c-typeck.c (c_mark_addressable): Diagnose trying to make
2303 bit-fields addressable.
2304
2305 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2306
2307 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2308 similar.
2309
2310 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
2311
2312 PR c/100913
2313 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2314 var in the error case.
2315
2316 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
2317
2318 PR c/100920
2319 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2320 spot built-in functions.
2321
2322 2021-06-06 Jakub Jelinek <jakub@redhat.com>
2323
2324 PR c/100902
2325 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2326 even when target is combined with other constructs.
2327
2328 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
2329
2330 PR c/100920
2331 * c-decl.c (finish_struct): Fix thinko in previous change.
2332 * c-typeck.c (convert_for_assignment): Do not warn on pointer
2333 assignment and initialization for storage order purposes if the
2334 RHS is a call to a DECL_IS_MALLOC function.
2335
2336 2021-06-04 Martin Sebor <msebor@redhat.com>
2337
2338 PR c/100783
2339 * c-objc-common.c (print_type): Handle erroneous types.
2340
2341 2021-06-03 Jakub Jelinek <jakub@redhat.com>
2342
2343 PR c++/100859
2344 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2345 after depend only cases.
2346
2347 2021-05-31 Richard Biener <rguenther@suse.de>
2348
2349 PR c++/88601
2350 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2351 * c-parser.c (c_parser_postfix_expression): Likewise.
2352
2353 2021-05-28 Richard Biener <rguenther@suse.de>
2354
2355 PR c/100803
2356 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2357 invalid if conditions.
2358
2359 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2360
2361 PR middle-end/99928
2362 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2363 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2364 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
2365 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2366 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2367 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2368 if present in map_head, map_field_head or map_firstprivate_head
2369 bitmaps.
2370
2371 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2372
2373 * c-parser.c (c_parser_omp_clause_affinity): New.
2374 (c_parser_omp_clause_name, c_parser_omp_variable_list,
2375 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2376 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2377 c_finish_omp_clauses): Likewise.
2378
2379 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
2380
2381 PR c/100653
2382 * c-decl.c (finish_struct): Warn for a union containing an aggregate
2383 field with a differing scalar storage order.
2384
2385 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2386
2387 PR middle-end/99928
2388 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2389 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
2390 if a decl is mentioned both in map clause and in such firstprivate
2391 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2392
2393 2021-05-19 Jakub Jelinek <jakub@redhat.com>
2394
2395 PR middle-end/99928
2396 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2397 master when combined with taskloop.
2398 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2399 parallel master when not combined with taskloop.
2400
2401 2021-05-18 Richard Biener <rguenther@suse.de>
2402
2403 PR c/100522
2404 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2405 Diagnose calls to non-functions.
2406 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2407
2408 2021-05-17 Richard Biener <rguenther@suse.de>
2409
2410 PR c/100625
2411 * gimple-parser.c (c_parser_gimple_label): Avoid building
2412 a GIMPLE label with NULL label decl.
2413
2414 2021-05-13 Martin Sebor <msebor@redhat.com>
2415
2416 PR c/100550
2417 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2418
2419 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
2420
2421 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2422 'close'.
2423
2424 2021-05-10 Martin Liska <mliska@suse.cz>
2425
2426 * c-aux-info.c (affix_data_type): Use startswith
2427 function instead of strncmp.
2428 * c-typeck.c (build_function_call_vec): Likewise.
2429 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2430
2431 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
2432
2433 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2434 on the address of a pointer field in a record with reverse SSO.
2435
2436 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
2437
2438 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2439 for || and && reductions.
2440
2441 2021-04-29 Joseph Myers <joseph@codesourcery.com>
2442
2443 * c-typeck.c (function_types_compatible_p): For C2X, treat
2444 unprototyped function as compatible with non-variadic prototyped
2445 function even if some argument types are changed by the default
2446 argument promotions.
2447
2448 2021-04-15 Martin Sebor <msebor@redhat.com>
2449
2450 PR c/99420
2451 PR c/99972
2452 * c-decl.c (pushdecl): Always propagate type attribute.
2453
2454 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
2455
2456 PR c/98852
2457 * c-typeck.c (c_common_type): Do not drop attributes that
2458 affect type identity.
2459
2460 2021-04-10 Jakub Jelinek <jakub@redhat.com>
2461
2462 PR c/99990
2463 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2464 error_mark_node.
2465
2466 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2467
2468 PR c++/99565
2469 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2470 to operand_equal_p.
2471
2472 2021-03-19 Jakub Jelinek <jakub@redhat.com>
2473
2474 PR c/99588
2475 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2476 with modifycode NOP_EXPR produces and mark the _Atomic var as read
2477 if found.
2478 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2479 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
2480 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2481
2482 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
2483
2484 PR c++/99509
2485 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2486 ensure that the varpool node is marked as offloadable.
2487
2488 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
2489
2490 PR c/99137
2491 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2492
2493 2021-02-24 Martin Sebor <msebor@redhat.com>
2494
2495 PR middle-end/97172
2496 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2497
2498 2021-02-18 Jakub Jelinek <jakub@redhat.com>
2499
2500 PR c/99136
2501 * c-typeck.c (c_finish_return): Don't wrap retval into
2502 EXCESS_PRECISION_EXPR in functions that return void.
2503
2504 2021-02-11 Marek Polacek <polacek@redhat.com>
2505
2506 * c-parser.c (c_parser_if_statement): Use vec_free.
2507
2508 2021-02-04 Martin Sebor <msebor@redhat.com>
2509
2510 PR c/97882
2511 * c-decl.c (locate_old_decl): Add type to diagnostic output.
2512 (diagnose_mismatched_decls): Same.
2513 (start_function): Introduce temporaries for better readability.
2514 * c-typeck.c (comptypes_internal): Only consider complete enum
2515 types in comparisons with integers.
2516
2517 2021-02-01 Martin Sebor <msebor@redhat.com>
2518
2519 PR middle-end/97172
2520 * c-decl.c (free_attr_access_data): New function.
2521 (c_parse_final_cleanups): Call free_attr_access_data.
2522
2523 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2524
2525 * c-parser.c (c_parser_omp_clause_detach): New.
2526 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2527 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2528 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2529 clause. Prevent use of detach with mergeable and overriding the
2530 data sharing mode of the event handle.
2531
2532 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2533
2534 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2535 unqualified element type and then call c_build_qualified_type on the
2536 ARRAY_TYPE.
2537
2538 2021-01-07 Richard Biener <rguenther@suse.de>
2539
2540 * gimple-parser.c (c_parser_gimple_compound_statement): Only
2541 reallocate loop array if it is too small.
2542
2543 2020-12-16 Martin Uecker <muecker@gwdg.de>
2544
2545 PR c/98047
2546 * c-typeck.c (build_modify_expr): Drop qualifiers.
2547
2548 2020-12-16 Martin Uecker <muecker@gwdg.de>
2549
2550 PR c/98260
2551 * c-parser.c (c_parser_expression): Look into
2552 nop expression when marking expressions as read.
2553
2554 2020-12-14 Martin Liska <mliska@suse.cz>
2555
2556 PR sanitizer/98204
2557 * c-typeck.c (pointer_diff): Do not emit a top-level
2558 sanitization.
2559 (build_binary_op): Likewise.
2560
2561 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2562
2563 * c-parser.c (c_parser_omp_allocate): New.
2564 (c_parser_omp_construct): Call it.
2565
2566 2020-12-09 Richard Biener <rguenther@suse.de>
2567
2568 PR c/98200
2569 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2570 early on error.
2571
2572 2020-12-07 Martin Uecker <muecker@gwdg.de>
2573
2574 PR c/97981
2575 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2576 that drops qualifiers to the end of the function.
2577
2578 2020-11-26 Martin Uecker <muecker@gwdg.de>
2579
2580 PR c/65455
2581 PR c/92935
2582 * c-parser.c (c_parser_declaration_or_fndef): Remove
2583 redundant code to drop qualifiers of _Atomic types for __auto_type.
2584 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2585 types for __typeof__.
2586
2587 2020-11-24 Jakub Jelinek <jakub@redhat.com>
2588
2589 PR c/97958
2590 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2591 expressions, use make_node instead of build2 to avoid checking build2
2592 performs.
2593
2594 2020-11-23 Joseph Myers <joseph@codesourcery.com>
2595
2596 PR c/95630
2597 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2598 for comparisons of complete and incomplete pointers.
2599
2600 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2601
2602 * c-aux-info.c (gen_type): Support opaque types.
2603
2604 2020-11-20 Martin Sebor <msebor@redhat.com>
2605
2606 PR middle-end/97879
2607 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2608
2609 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2610
2611 PR other/97911
2612 * Make-lang.in (c.serial): Change from goal to a variable.
2613 (.PHONY): Drop c.serial.
2614
2615 2020-11-20 Martin Uecker <muecker@gwdg.de>
2616
2617 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2618
2619 2020-11-19 Jakub Jelinek <jakub@redhat.com>
2620
2621 PR c/97860
2622 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2623 error_operand_p.
2624
2625 2020-11-18 Jakub Jelinek <jakub@redhat.com>
2626
2627 * Make-lang.in (c.serial): New goal.
2628 (.PHONY): Add c.serial c.prev.
2629 (cc1$(exeext)): Call LINK_PROGRESS.
2630
2631 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2632
2633 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2634 goto too.
2635 * c-typeck.c (build_asm_expr): Remove an assert checking output
2636 absence for asm goto.
2637
2638 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2639
2640 * c-typeck.c (c_finish_omp_clauses): Don't clear
2641 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2642
2643 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2644
2645 PR objc/77404
2646 * c-parser.c (c_parser_objc_class_definition): Pass the
2647 location of the class name to the interface declaration.
2648
2649 2020-11-10 Strager Neds <strager.nds@gmail.com>
2650
2651 * c-decl.c (merge_decls): Use new overload of
2652 set_decl_section_name.
2653
2654 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2655
2656 * c-parser.c (c_parser_omp_target_data): Add use of
2657 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2658 handled map clause kind.
2659 (c_parser_omp_target_enter_data): Likewise.
2660 (c_parser_omp_target_exit_data): Likewise.
2661 (c_parser_omp_target): Likewise.
2662 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2663 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2664 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2665 same struct field access to co-exist on OpenMP construct.
2666
2667 2020-11-07 Martin Uecker <muecker@gwdg.de>
2668
2669 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2670 (c_parser_all_labels): Likewise.
2671
2672 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2673
2674 * c-parser.c (c_parser_objc_at_property_declaration):
2675 Improve parsing fidelity. Associate better location info
2676 with @property attributes. Clean up the interface to
2677 objc_add_property_declaration ().
2678
2679 2020-11-06 Nathan Sidwell <nathan@acm.org>
2680
2681 * c-decl.c (diagnose_mismatched_decls): Rename
2682 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2683 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2684 (collect_source_refs): Likewise.
2685 * c-typeck.c (inform_declaration, inform_for_arg)
2686 (convert_for_assignment): Likewise.
2687
2688 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
2689
2690 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2691 OpenACC matching.
2692 (c_parser_omp_construct): Update call.
2693
2694 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2695
2696 PR c++/97670
2697 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2698 find underlying decl to clear in the aligned_head bitmap.
2699
2700 2020-11-04 Joseph Myers <joseph@codesourcery.com>
2701
2702 * c-decl.c (handle_nodiscard_attribute): New.
2703 (std_attribute_table): Add nodiscard.
2704 * c-parser.c (c_parser_std_attribute): Expect argument to
2705 nodiscard attribute to be a string. Do not special-case ignoring
2706 nodiscard.
2707 * c-typeck.c (maybe_warn_nodiscard): New.
2708 (build_compound_expr, emit_side_effect_warnings): Call
2709 maybe_warn_nodiscard.
2710 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2711 emit_side_effect_warnings if warn_unused_result.
2712
2713 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
2714
2715 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2716 with XDELETE.
2717 (finish_init): Likewise.
2718 (pop_init_level): Likewise.
2719
2720 2020-10-28 Joseph Myers <joseph@codesourcery.com>
2721
2722 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2723 error_at for omitted parameter name.
2724
2725 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2726
2727 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2728 (c_parser_omp_clause_allocate): New function.
2729 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2730 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2731 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2732 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2733 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2734 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2735 PRAGMA_OMP_CLAUSE_ALLOCATE.
2736 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2737
2738 2020-10-27 Joseph Myers <joseph@codesourcery.com>
2739
2740 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2741 standard attributes.
2742
2743 2020-10-23 Marek Polacek <polacek@redhat.com>
2744
2745 PR c++/91741
2746 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2747 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2748 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2749 * c-tree.h (char_type_p): Declare.
2750 * c-typeck.c (char_type_p): No longer static.
2751
2752 2020-10-23 Martin Sebor <msebor@redhat.com>
2753
2754 PR middle-end/97552
2755 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2756
2757 2020-09-19 Martin Sebor <msebor@redhat.com>
2758
2759 PR c/50584
2760 * c-decl.c (lookup_last_decl): Define new function.
2761 (c_decl_attributes): Call it.
2762 (start_decl): Add argument and use it.
2763 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2764 (get_parm_array_spec): Define new function.
2765 (push_parm_decl): Call get_parm_array_spec.
2766 (start_function): Call warn_parm_array_mismatch. Build attribute
2767 access and add it to current function.
2768 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2769 in forms of array parameters.
2770 * c-tree.h (start_decl): Add argument.
2771
2772 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2773
2774 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2775 with...
2776 (in_statement): New.
2777 (start_function): Adjust for above change.
2778 (c_push_function_context, c_pop_function_context): Likewise.
2779 * c-lang.h (struct language_function): Likewise.
2780 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2781 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2782 New.
2783 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2784 (c_parser_switch_statement): Adjust break/switch context handling
2785 and calls to renamed functions.
2786 (c_parser_while_statement): Adjust break/switch context handling and
2787 build a WHILE_STMT.
2788 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2789 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2790 (c_parser_omp_for_loop): Adjust break/switch context handling.
2791 * c-tree.h (c_break_label, c_cont_label): Delete.
2792 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2793 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2794 (in_statement, switch_statement_break_seen_p): Declare.
2795 (c_start_case, c_finish_case): Renamed to...
2796 (c_start_switch, c_finish_switch).
2797 (c_finish_bc_stmt): Adjust arguments.
2798 * c-typeck.c (build_function_call_vec): Don't try to print
2799 statements with %qE format.
2800 (struct c_switch): Rename switch_expr field to switch_stmt.
2801 Add break_stmt_seen_p field.
2802 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2803 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2804 (do_case): Update for changes to struct c_switch.
2805 (c_finish_case): Rename to c_finish_switch. Update for changes to
2806 struct c_switch and change of representation from SWITCH_EXPR to
2807 SWITCH_STMT.
2808 (c_finish_loop): Delete.
2809 (c_finish_bc_stmt): Update to reflect changes to break/continue
2810 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2811 of a GOTO_EXPR except for objc foreach loops.
2812
2813 2020-09-01 Jakub Jelinek <jakub@redhat.com>
2814
2815 PR c++/96867
2816 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2817 only on PARM_DECLs.
2818
2819 2020-08-28 Martin Sebor <msebor@redhat.com>
2820
2821 PR c/96596
2822 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2823 argument type.
2824
2825 2020-08-27 Martin Liska <mliska@suse.cz>
2826
2827 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2828 growth function to true.
2829
2830 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
2831
2832 PR c/96678
2833 * c-typeck.c (handle_omp_array_sections_1): Talk about
2834 array function parameter in the error message.
2835
2836 2020-08-18 Jakub Jelinek <jakub@redhat.com>
2837
2838 PR c/96571
2839 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2840 to int, holding index of the match. Call mark_exp_read on the selector
2841 expression and on expressions other than the selected one.
2842
2843 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2844
2845 PR c/96377
2846 * c-typeck.c (process_init_element): Split test for whether to
2847 recurse into a record, union or array into...
2848 (initialize_elementwise_p): ...this new function. Don't recurse
2849 into a vector type if the initialization value is also a vector.
2850
2851 2020-07-31 Richard Biener <rguenther@suse.de>
2852
2853 PR debug/96383
2854 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2855 Define to c_common_finalize_early_debug.
2856
2857 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2858
2859 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2860 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2861 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2862
2863 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2864
2865 PR target/95237
2866 * c-decl.c (finish_decl): Call target hook
2867 lower_local_decl_alignment to lower local decl alignment.
2868
2869 2020-07-09 Julian Brown <julian@codesourcery.com>
2870 Thomas Schwinge <thomas@codesourcery.com>
2871
2872 PR middle-end/95270
2873 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2874 for standalone attach/detach clauses.
2875
2876 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2877
2878 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2879 set, warn for conversion between pointers that point to incompatible
2880 scalar storage orders.
2881
2882 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2883
2884 * c-parser.c (c_parser_statement_after_labels): Pass correct
2885 parameters to c_parser_do_statement.
2886
2887 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2888
2889 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2890 c_in_omp_for.
2891 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2892 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2893 c_finish_omp_for.
2894 * c-tree.h (c_in_omp_for): Declare.
2895 * c-typeck.c (c_in_omp_for): Define.
2896 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2897 (digest_init): Likewise.
2898 (build_binary_op): Likewise.
2899
2900 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2901
2902 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2903 from kind by comma rather than colon.
2904
2905 2020-06-05 Mark Wielaard <mark@klomp.org>
2906
2907 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2908 an undeclared builtin, then add a fixit header hint, if found.
2909 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2910 warning_at about implicit builtin declaration type mismatch.
2911
2912 2020-06-03 Mark Wielaard <mark@klomp.org>
2913
2914 * c-parser.c (struct c_parser): Add seen_string_literal
2915 bitfield.
2916 (c_parser_consume_token): Reset seen_string_literal.
2917 (c_parser_error_richloc): Add name_hint if seen_string_literal
2918 and next token is a CPP_NAME and we have a missing header
2919 suggestion for the name.
2920 (c_parser_string_literal): Set seen_string_literal.
2921
2922 2020-06-03 Mark Wielaard <mark@klomp.org>
2923
2924 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2925 scope with matching_parens after CPP_OPEN_PAREN.
2926
2927 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2928
2929 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2930
2931 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2932
2933 * Make-lang.in: Remove extra slash.
2934
2935 2020-05-19 Martin Liska <mliska@suse.cz>
2936
2937 * c-parser.c: Fix typo.
2938
2939 2020-05-14 Jakub Jelinek <jakub@redhat.com>
2940
2941 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2942
2943 2020-05-07 Richard Biener <rguenther@suse.de>
2944
2945 PR middle-end/94703
2946 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2947 DECL_GIMPLE_REG_P.
2948
2949 2020-04-30 Jakub Jelinek <jakub@redhat.com>
2950
2951 PR c/94842
2952 * c-decl.c (set_labels_context_r): In addition to context-less
2953 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2954 parent function if any.
2955 (store_parm_decls): Adjust comment.
2956
2957 2020-04-19 Jakub Jelinek <jakub@redhat.com>
2958
2959 PR objc/94637
2960 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2961 two CPP_COLON tokens.
2962
2963 2020-04-17 Jakub Jelinek <jakub@redhat.com>
2964
2965 PR other/94629
2966 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2967 to data.clauses.
2968
2969 2020-04-15 Jakub Jelinek <jakub@redhat.com>
2970
2971 PR c/94593
2972 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2973 requires directive when not at file scope.
2974
2975 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
2976
2977 PR middle-end/94120
2978 * c-decl.c (c_check_in_current_scope): New function.
2979 * c-tree.h (c_check_in_current_scope): Declare it.
2980 * c-parser.c (c_parser_oacc_declare): Add check that variables
2981 are declared in the same scope as the directive. Fix handling
2982 of namespace vars.
2983
2984 2020-04-07 Jakub Jelinek <jakub@redhat.com>
2985
2986 PR c++/94512
2987 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2988 if c_parser_omp_master succeeded.
2989
2990 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2991
2992 PR gcov-profile/94029
2993 PR c/94239
2994 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2995 the function_start_locus location. Don't do that afterwards for the
2996 __GIMPLE body parsing.
2997
2998 2020-03-19 Jakub Jelinek <jakub@redhat.com>
2999
3000 PR gcov-profile/94029
3001 * c-tree.h (finish_function): Add location_t argument defaulted to
3002 input_location.
3003 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
3004 set it to the locus of closing } if non-NULL.
3005 (c_parser_compound_statement_nostart): Return locus of closing }.
3006 (c_parser_parse_rtl_body): Likewise.
3007 (c_parser_declaration_or_fndef): Propagate locus of closing } to
3008 finish_function.
3009 * c-decl.c (finish_function): Add end_loc argument, use it instead of
3010 input_location to set function_end_locus.
3011
3012 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3013
3014 PR c/94172
3015 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
3016 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
3017 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
3018 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
3019 ENUMERAL_TYPEs.
3020 (finish_incomplete_vars): New function, moved from finish_struct. Use
3021 relayout_decl instead of layout_decl.
3022 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
3023 being TYPE_VFIELD. Use finish_incomplete_vars.
3024 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
3025 finish_incomplete_vars.
3026 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3027 also on ENUMERAL_TYPEs.
3028
3029 2020-03-16 Jakub Jelinek <jakub@redhat.com>
3030
3031 PR c/94179
3032 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
3033
3034 2020-03-13 Martin Sebor <msebor@redhat.com>
3035
3036 PR c/94040
3037 * c-decl.c (builtin_structptr_type_count): New constant.
3038 (match_builtin_function_types): Reject decls that are incompatible
3039 in types pointed to by pointers.
3040 (diagnose_mismatched_decls): Adjust comments.
3041
3042 2020-03-05 Joseph Myers <joseph@codesourcery.com>
3043
3044 PR c/93577
3045 * c-typeck.c (pop_init_level): Do not diagnose initializers as
3046 empty when initialized type is error_mark_node.
3047 (set_designator, process_init_element): Ignore initializers for
3048 elements of a variable-size type or of error_mark_node.
3049
3050 2020-03-01 Martin Sebor <msebor@redhat.com>
3051
3052 PR middle-end/93926
3053 * c-decl.c (types_close_enough_to_match): New function.
3054 (match_builtin_function_types):
3055 (diagnose_mismatched_decls): Add missing inform call to a warning.
3056
3057 2020-03-01 Martin Sebor <msebor@redhat.com>
3058
3059 PR c/93812
3060 * c-typeck.c (build_functype_attribute_variant): New function.
3061 (composite_type): Call it.
3062
3063 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3064
3065 PR other/93912
3066 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
3067 Rename last argument from probablity to probability.
3068
3069 2020-02-13 Jakub Jelinek <jakub@redhat.com>
3070
3071 PR c/93576
3072 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
3073 *expr if it has side effects.
3074
3075 2020-01-30 Jeff Law <law@redhat.com>
3076
3077 PR c/88660
3078 * c-parser.c (c_parser_switch_statement): Make sure to request
3079 marking the switch expr as used.
3080
3081 2020-01-22 Joseph Myers <joseph@codesourcery.com>
3082
3083 PR c/93348
3084 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
3085 argument with integer operands.
3086
3087 2020-01-16 Kerem Kat <keremkat@gmail.com>
3088
3089 PR c/92833
3090 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
3091 to support 4 available tokens.
3092
3093 2020-01-15 Joseph Myers <joseph@codesourcery.com>
3094
3095 PR c/93072
3096 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
3097 determine whether to set DECL_CONTEXT.
3098
3099 2020-01-13 Joseph Myers <joseph@codesourcery.com>
3100
3101 PR c/93241
3102 * c-typeck.c (build_c_cast): Check for expressions with integer
3103 operands that can occur in an unevaluated part of an integer
3104 constant expression and call note_integer_operands as needed.
3105
3106 2019-01-08 Richard Biener <rguenther@suse.de>
3107
3108 PR middle-end/93199
3109 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
3110 permanently.
3111
3112 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3113
3114 Update copyright years.
3115
3116 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3117
3118 * c-decl.c (collect_source_ref_cb): Delete.
3119 (for_each_global_decl): Rename into...
3120 (collect_source_refs): ...this. Call collect_source_ref directly.
3121 (c_parse_final_cleanups): Always call collect_source_ref on the main
3122 input filename.
3123
3124 2019-12-19 Julian Brown <julian@codesourcery.com>
3125 Cesar Philippidis <cesar@codesourcery.com>
3126
3127 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
3128 detach clauses.
3129 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
3130 Allow deref (->) in variable lists if true.
3131 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
3132 Pass to c_parser_omp_variable_list.
3133 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
3134 call to c_parser_omp_variable_list.
3135 (c_parser_oacc_all_clauses): Support attach and detach clauses.
3136 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
3137 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
3138 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
3139 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
3140 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
3141 and detach. Support deref.
3142 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
3143 GOMP_MAP_ALWAYS_POINTER for OpenACC.
3144 (c_oacc_check_attachments): New function.
3145 (c_finish_omp_clauses): Check attach/detach arguments for being
3146 pointers using above. Support deref.
3147
3148 2019-12-19 Julian Brown <julian@codesourcery.com>
3149 Maciej W. Rozycki <macro@codesourcery.com>
3150 Tobias Burnus <tobias@codesourcery.com>
3151 Thomas Schwinge <thomas@codesourcery.com>
3152
3153 * c-parser.c (c_parser_omp_clause_name): Support no_create.
3154 (c_parser_oacc_data_clause): Likewise.
3155 (c_parser_oacc_all_clauses): Likewise.
3156 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3157 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
3158 PRAGMA_OACC_CLAUSE_NO_CREATE.
3159 * c-typeck.c (handle_omp_array_sections): Support
3160 GOMP_MAP_NO_ALLOC.
3161
3162 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3163
3164 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3165 Replace label_text ctor calls.
3166
3167 2019-12-04 Joseph Myers <joseph@codesourcery.com>
3168
3169 PR c/36941
3170 PR c/88827
3171 * c-typeck.c (convert_lvalue_to_rvalue): Call
3172 require_complete_type for arguments not of void types.
3173 (build_indirect_ref): Do not diagnose dereferencing pointers to
3174 incomplete types.
3175 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
3176
3177 2019-12-03 Joseph Myers <joseph@codesourcery.com>
3178
3179 PR c/88704
3180 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
3181 old-style parameter definitions.
3182
3183 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
3184
3185 PR target/92499
3186
3187 * c-decl.c (flexible_array_type_p): Move to common code.
3188
3189 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3190
3191 * c-decl.c (start_decl): Allow initialization of variables whose
3192 size is a POLY_INT_CST.
3193 (finish_decl): Use verify_type_context to check whether the target
3194 allows variables with a particular type to have static or thread-local
3195 storage duration. Don't raise a second error if such variables do
3196 not have a constant size.
3197 (grokdeclarator): Use verify_type_context to check whether the
3198 target allows fields or array elements to have a particular type.
3199 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
3200 the target allows pointer difference for the types involved.
3201 (build_unary_op): Likewise for pointer increment and decrement.
3202
3203 2019-11-29 Joseph Myers <joseph@codesourcery.com>
3204
3205 * c-parser.c (struct c_parser): Add members raw_tokens and
3206 raw_tokens_used.
3207 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
3208 using previously-lexed raw tokens.
3209 (c_parser_peek_nth_token_raw)
3210 (c_parser_check_balanced_raw_token_sequence): New functions.
3211 (c_parser_nth_token_starts_std_attributes): Use
3212 c_parser_check_balanced_raw_token_sequence for Objective-C.
3213
3214 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3215
3216 PR c/91985
3217 * c-decl.c (finish_declspecs): Use int instead of decimal
3218 floating-point types if decimal floating-point not supported.
3219
3220 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3221
3222 * c-tree.h (struct c_declarator): Use a structure for id member.
3223 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
3224 declarators at the start, not when handling individual declarators
3225 later. Use u.id.id instead of u.id.
3226 (grokfield): Use u.id.id instead of u.id.
3227 (build_id_declarator): Set u.id.id and u.id.attrs.
3228 (finish_declspecs): Handle postfix attributes in case of typedef
3229 name or typeof used.
3230 * c-parser.c (c_parser_direct_declarator)
3231 (c_parser_direct_declarator_inner): Place declarator for
3232 attributes inside that for function or array, not outside. Set
3233 u.id.attrs for identifiers.
3234 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
3235 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
3236 instead of u.id.
3237
3238 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3239
3240 PR c/90677
3241 * c-decl.c (identifier_global_tag): Define.
3242
3243 2019-11-20 Richard Biener <rguenther@suse.de>
3244
3245 PR c/92088
3246 * c-decl.c (grokdeclarator): Prevent inlining of nested
3247 function with VLA arguments.
3248
3249 2019-11-20 Joseph Myers <joseph@codesourcery.com>
3250
3251 * c-decl.c (c_warn_type_attributes): New function.
3252 (groktypename, grokdeclarator, finish_declspecs): Call
3253 c_warn_type_attributes before applying attributes to types.
3254 * c-tree.h (c_warn_type_attributes): Declare.
3255
3256 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3257
3258 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
3259 standard attributes.
3260 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
3261 pedwarn for unknown standard attributes and return error_mark_node
3262 for them.
3263
3264 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
3265
3266 * c-parser.c (c_parser_parse_rtl_body): Always call
3267 run_rtl_passes, even if startwith pass is not provided.
3268
3269 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3270
3271 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3272 duplicate standard attributes.
3273
3274 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3275
3276 * c-decl.c (std_attribute_table): Add maybe_unused.
3277
3278 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3279
3280 * c-decl.c (std_attribute_table): Add fallthrough.
3281 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3282 attribute at top level.
3283
3284 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3285
3286 * c-decl.c (std_attribute_table): New.
3287 (c_init_decl_processing): Register attributes from
3288 std_attribute_table.
3289 * c-parser.c (c_parser_attribute_arguments): Add arguments
3290 require_string and allow_empty_args. All callers changed.
3291 (c_parser_std_attribute): Set require_string argument for
3292 "deprecated" attribute.
3293
3294 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3295
3296 * c-parser.c (c_parser_postfix_expression)
3297 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3298 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3299
3300 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
3301
3302 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3303 of build_same_sized_truth_vector_type.
3304 (build_vec_cmp): Likewise.
3305
3306 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3307
3308 * c-parser.c (c_parser_omp_context_selector): Don't require score
3309 argument to fit into shwi, just to be INTEGER_CST. Diagnose
3310 negative score.
3311
3312 * c-parser.c (c_parser_omp_context_selector): Rename
3313 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3314 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3315 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
3316 and string literals.
3317
3318 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3319
3320 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3321 ctsk_tagfirstref_attrs.
3322 (struct c_declspecs): Update description of attrs. Add
3323 postfix_attrs and non_std_attrs_seen_p. Increase size of
3324 typespec_kind bit-field.
3325 (c_warn_unused_attributes): New declaration.
3326 (parser_xref_tag): Update prototype.
3327 * c-decl.c (c_warn_unused_attributes): New function.
3328 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3329 ctsk_tagref_attrs. Handle attribute declarations.
3330 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3331 (grokdeclarator): Handle standard attributes.
3332 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
3333 attributes to incomplete type reference.
3334 (xref_tag): Update call to parser_xref_tag.
3335 (declspecs_add_addrspace, declspecs_add_type)
3336 (declspecs_add_scspec, declspecs_add_attrs): Set
3337 non_std_attrs_seen_p.
3338 (finish_declspecs): Apply postfix standard attributes to type.
3339 * c-parser.c (c_token_starts_declspecs)
3340 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3341 (c_parser_next_tokens_start_declaration): Update comments.
3342 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3343 parser->tokens[2] to parser->tokens[1].
3344 (c_parser_nth_token_starts_std_attributes)
3345 (c_parser_std_attribute_specifier_sequence): New functions.
3346 (c_parser_declaration_or_fndef): Add arguments have_attrs and
3347 attrs. All callers changed. Handle standard attributes.
3348 (c_parser_parms_declarator, c_parser_parms_list_declarator)
3349 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3350 All callers changed.
3351 (c_parser_declspecs): Add arguments start_std_attr_ok and
3352 end_std_attr_ok. All callers changed. Handle standard
3353 attributes.
3354 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3355 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3356 (c_parser_compound_statement_nostart, c_parser_all_labels)
3357 (c_parser_label, c_parser_statement, c_parser_for_statement):
3358 Handle standard attributes.
3359 * c-parser.h (c_parser_declspecs): Update prototype.
3360 * gimple-parser.c (c_parser_gimple_declaration): Update call to
3361 c_parser_declspecs.
3362
3363 2019-11-12 Martin Liska <mliska@suse.cz>
3364
3365 * gimple-parser.c: Do not include params.h.
3366
3367 2019-11-12 Martin Liska <mliska@suse.cz>
3368
3369 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3370 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
3371 macro.
3372
3373 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3374 Frederik Harwath <frederik@codesourcery.com>
3375
3376 gcc/c/
3377 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3378 (c_parser_oacc_kernels_parallel): Rename function to...
3379 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
3380 (c_parser_omp_construct): Update accordingly.
3381
3382
3383 2019-11-11 Jakub Jelinek <jakub@redhat.com>
3384
3385 * c-parser.c (c_parser_translation_unit): Diagnose declare target
3386 without corresponding end declare target.
3387
3388 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3389
3390 * c-convert.c (convert): Only handle vector conversions if one of
3391 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3392 allows it.
3393 * c-typeck.c (build_array_ref): Only allow vector indexing if the
3394 vectors satisfy gnu_vector_type_p.
3395 (build_unary_op): Only allow unary operators to be applied to
3396 vectors if they satisfy gnu_vector_type_p.
3397 (digest_init): Only allow by-element initialization of vectors
3398 if they satisfy gnu_vector_type_p.
3399 (really_start_incremental_init): Likewise.
3400 (push_init_level): Likewise.
3401 (pop_init_level): Likewise.
3402 (process_init_element): Likewise.
3403 (build_binary_op): Only allow binary operators to be applied to
3404 vectors if they satisfy gnu_vector_type_p.
3405
3406 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3407
3408 * c-decl.c (grokparms): Convert () in a function definition to
3409 (void) for C2x.
3410 (store_parm_decls_oldstyle): Pedwarn for C2x.
3411 (store_parm_decls): Update comment about () not generating a
3412 prototype.
3413
3414 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3415
3416 * c-parser.c (c_parser_attribute_arguments): New function.
3417 Factored out of c_parser_gnu_attribute.
3418 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3419 (c_parser_balanced_token_sequence, c_parser_std_attribute)
3420 (c_parser_std_attribute_specifier): New functions.
3421 (c_parser_transaction_attributes): Use
3422 c_parser_std_attribute_specifier.
3423
3424 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3425
3426 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
3427 lex_joined_string and translate_strings_p.
3428 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3429 c_lex_with_flags.
3430 (c_parser_string_literal): New function.
3431 (c_parser_static_assert_declaration_no_semi): Use
3432 c_parser_string_literal. Do not set lex_untranslated_string.
3433 (c_parser_asm_string_literal): Use c_parser_string_literal.
3434 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3435 (c_parser_gnu_attributes): Set and restore translate_strings_p
3436 instead of lex_untranslated_string.
3437 (c_parser_asm_statement): Do not set lex_untranslated_string.
3438 (c_parser_asm_operands): Likewise.
3439 (c_parser_has_attribute_expression): Set and restore
3440 translate_strings_p instead of lex_untranslated_string.
3441 (c_parser_postfix_expression): Use c_parser_string_literal.
3442 (pragma_lex): Likewise.
3443 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3444 (c_parse_file): Set translate_strings_p.
3445 * gimple-parser.c (c_parser_gimple_postfix_expression)
3446 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3447 * c-parser.c (c_parser_string_literal): Declare function.
3448
3449 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3450
3451 * c-parser.c (c_finish_omp_declare_variant): Use
3452 omp_get_context_selector instead of c_omp_get_context_selector.
3453
3454 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3455
3456 * c-tree.h (c_simulate_enum_decl): Declare.
3457 * c-decl.c (c_simulate_enum_decl): New function.
3458 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3459
3460 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3461
3462 * c-tree.h (c_simulate_builtin_function_decl): Declare.
3463 * c-decl.c (c_simulate_builtin_function_decl): New function.
3464 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3465 to the above.
3466
3467 2019-10-28 Martin Sebor <msebor@redhat.com>
3468
3469 PR c/66970
3470 * c-decl.c (names_builtin_p): Define a new function.
3471
3472 2019-10-28 Richard Biener <rguenther@suse.de>
3473
3474 PR c/92249
3475 * gimple-parser.c (c_parser_parse_gimple_body): Make
3476 current_bb the entry block initially to easier recover
3477 from errors.
3478 (c_parser_gimple_compound_statement): Adjust.
3479
3480 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3481
3482 * c-parser.c (c_finish_omp_declare_variant): Use
3483 omp_context_selector_matches instead of
3484 c_omp_context_selector_matches.
3485 * c-decl.c (c_decl_attributes): Add "omp declare target block"
3486 attribute in between declare target and end declare target
3487 pragmas.
3488
3489 2019-10-15 Joseph Myers <joseph@codesourcery.com>
3490
3491 * c-parser.c (c_parser_attribute_any_word): Rename to
3492 c_parser_gnu_attribute_any_word. All callers changed.
3493 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
3494 callers changed.
3495 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
3496 callers changed.
3497 (c_parser_declaration_or_fndef, c_parser_declspecs)
3498 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3499 (c_parser_struct_declaration, c_parser_declarator)
3500 (c_parser_gnu_attribute, c_parser_compound_statement)
3501 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3502 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3503 attribute-related syntax productions.
3504
3505 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3506
3507 * c-objc-common.c (useful_aka_type_p): Replace with...
3508 (get_aka_type): ...this new function. Given the original type,
3509 decide which aka type to print (if any). Only look through typedefs
3510 if user_facing_original_type_p.
3511 (print_type): Update accordingly.
3512
3513 2019-10-14 Jakub Jelinek <jakub@redhat.com>
3514
3515 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3516 into int NESTED, if it is 2, diagnose missing commas in between
3517 clauses.
3518 (c_parser_omp_context_selector): Pass 2 as last argument to
3519 c_parser_omp_all_clauses.
3520
3521 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3522
3523 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3524 For simd properties, put them directly into TREE_VALUE.
3525 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3526 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3527 add "omp declare variant base" attribute rather than
3528 "omp declare variant".
3529
3530 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3531
3532 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3533
3534 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3535
3536 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3537 true, terminate processing on closing paren and don't skip to end of
3538 pragma line.
3539 (c_parser_omp_declare_simd): Handle also declare variant.
3540 (omp_construct_selectors, omp_device_selectors,
3541 omp_implementation_selectors, omp_user_selectors): New variables.
3542 (c_parser_omp_context_selector,
3543 c_parser_omp_context_selector_specification,
3544 c_finish_omp_declare_variant): New functions.
3545 (c_finish_omp_declare_simd): Handle both declare simd and
3546 declare variant.
3547 (c_parser_omp_declare): Handle declare variant.
3548
3549 2019-10-02 Joseph Myers <joseph@codesourcery.com>
3550
3551 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3552 CPP_COLON tokens.
3553
3554 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3555
3556 * c-objc-common.c (useful_aka_type_p): New function.
3557 (print_type): Use it to decide whether an aka type is worth printing.
3558
3559 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3560
3561 PR c++/88203
3562 * c-parser.c (c_parser_predefined_identifier): New function.
3563 (c_parser_postfix_expression): Use it.
3564 (c_parser_omp_variable_list): Parse predefined identifiers.
3565 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3566 in shared and firstprivate clauses, even when they are predetermined
3567 shared.
3568
3569 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3570
3571 * c-typeck.c (build_function_call_vec): Take the original function
3572 decl as an optional final parameter. Pass all built-in calls to
3573 check_builtin_function_arguments.
3574
3575 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3576
3577 PR c/91815
3578 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3579 of identifiers in the external scope only for variables and functions.
3580
3581 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3582
3583 PR c/78736
3584 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3585
3586 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3587
3588 PR pch/61250
3589 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3590 after determining that the first token is not
3591 PRAGMA_GCC_PCH_PREPROCESS.
3592
3593 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3594
3595 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3596 FUNCTION_DECL to the right value in the presence of nested declarators.
3597
3598 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3599
3600 PR middle-end/91421
3601 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3602
3603 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3604
3605 PR middle-end/91421
3606 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3607 of a built_in_function.
3608 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3609
3610 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3611
3612 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3613 (c_parser_omp_clause_device_type): New function.
3614 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3615 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3616 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3617 diagnostics for declare target with clauses nested in clause-less
3618 declare target declaration-definition-seq.
3619 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3620
3621 2019-08-09 Jakub Jelinek <jakub@redhat.com>
3622
3623 * c-parser.c (check_no_duplicate_clause): Simplify using
3624 omp_find_clause.
3625 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3626 directive name modifiers.
3627 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3628
3629 PR c/91401
3630 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3631 check_no_duplicate_clause call. Comment it out, instead emit a
3632 warning for duplicate dist_schedule clauses.
3633
3634 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3635
3636 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3637
3638 2019-08-08 Jakub Jelinek <jakub@redhat.com>
3639
3640 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3641 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3642 instead of generic_head to track duplicates.
3643
3644 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3645
3646 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3647 (c_parser_omp_clause_use_device_addr): New function.
3648 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3649 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3650 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3651 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3652 map or use_device_* clauses.
3653 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3654 in OpenMP, require pointer type rather than pointer or array type.
3655 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3656
3657 2019-07-31 Jakub Jelinek <jakub@redhat.com>
3658
3659 PR c/91192
3660 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3661 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3662 case.
3663
3664 2019-07-25 Martin Liska <mliska@suse.cz>
3665 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3666
3667 PR c++/23383
3668 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3669
3670 2019-07-25 Martin Liska <mliska@suse.cz>
3671
3672 * c-decl.c (merge_decls): Use new macros
3673 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3674
3675 2019-07-23 Richard Biener <rguenther@suse.de>
3676
3677 PR tree-optimization/83518
3678 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3679 a CFG also rebuild cgraph edges.
3680
3681 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3682
3683 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3684 (c_parser_omp_clause_bind): New function.
3685 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3686 (OMP_LOOP_CLAUSE_MASK): Define.
3687 (c_parser_omp_loop): New function.
3688 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3689 loop combined with parallel or teams.
3690 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3691 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3692
3693 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3694
3695 PR c/53633
3696 * c-decl.c (finish_function): Check targetm.warn_func_return
3697 before issuing a -Wreturn-type warning.
3698
3699 2019-07-12 Alexandre Oliva <oliva@adacore.com>
3700
3701 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3702 (c_parser_compound_statement): Call it.
3703
3704 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3705
3706 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3707 (c_parser_omp_clause_order): New function.
3708 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3709 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3710 PRAGMA_OMP_CLAUSE_ORDER.
3711 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3712
3713 2019-07-10 Richard Biener <rguenther@suse.de>
3714
3715 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3716 _Literal (int *) &x for address literals.
3717
3718 2019-07-09 Martin Sebor <msebor@redhat.com>
3719
3720 PR c++/61339
3721 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3722 to class.
3723 (field_decl_cmp): Same.
3724 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3725 * c-tree.h: Same.
3726 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3727
3728 2019-07-09 Martin Sebor <msebor@redhat.com>
3729
3730 PR c++/61339
3731 * c-decl.c: Change class-key from class to struct and vice versa
3732 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3733 * gimple-parser.c: Same.
3734
3735 2019-07-01 Richard Biener <rguenther@suse.de>
3736
3737 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3738 _Literal (char *) &"foo" for address literals pointing to
3739 STRING_CSTs.
3740
3741 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3742
3743 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3744 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3745 C incompatibility if alternate "__intN__" form is used.
3746
3747 2019-06-24 Martin Sebor <msebor@redhat.com>
3748
3749 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3750
3751 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3752
3753 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3754 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3755 (c_parser_omp_scan_loop_body): New function.
3756 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3757 inscan reduction clauses.
3758 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3759 non-inscan reductions on the same construct, or inscan reductions with
3760 ordered or schedule clauses, or inscan array reductions.
3761
3762 2019-06-05 Martin Sebor <msebor@redhat.com>
3763
3764 PR c/90737
3765 * c-typeck.c (c_finish_return): Only consider functions returning
3766 pointers as candidates for -Wreturn-local-addr.
3767
3768 2019-06-05 Martin Sebor <msebor@redhat.com>
3769
3770 * c-decl.c (start_decl): Adjust quoting and hyphenation
3771 in diagnostics.
3772 (finish_decl): Same.
3773 (finish_enum): Same.
3774 (start_function): Same.
3775 (declspecs_add_type): Same.
3776 * c-parser.c (warn_for_abs): Same.
3777 * c-typeck.c (build_binary_op): Same.
3778
3779 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3780
3781 PR c/89433
3782 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3783 marked with an OpenACC 'routine' directive.
3784
3785 PR c/89433
3786 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3787 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3788
3789 PR c/89433
3790 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3791 clauses from "omp declare target" attribute.
3792
3793 2019-05-16 Martin Sebor <msebor@redhat.com>
3794
3795 * c-decl.c (start_decl): Quote keywords, operators, and
3796 types in diagnostics.
3797 (finish_decl): Same.
3798 * c-parser.c (c_parser_asm_statement): Same.
3799 (c_parser_conditional_expression): Same.
3800 (c_parser_transaction_cancel): Same.
3801 * c-typeck.c (c_common_type): Same.
3802 (build_conditional_expr): Same.
3803 (digest_init): Same.
3804 (process_init_element): Same.
3805 (build_binary_op): Same.
3806
3807 2019-05-17 Richard Biener <rguenther@suse.de>
3808
3809 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3810 (c_parser_gimple_unary_expression): Likewise.
3811 (c_parser_gimple_parentized_ternary_expression): New function.
3812
3813 2019-05-16 Richard Biener <rguenther@suse.de>
3814
3815 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3816 (c_parser_gimple_unary_expression): Likewise.
3817
3818 2019-05-15 Richard Biener <rguenther@suse.de>
3819
3820 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3821 __BIT_FIELD_REF.
3822
3823 2019-05-14 Richard Biener <rguenther@suse.de>
3824
3825 * gimple-parser.c (c_parser_gimple_statement): Remove
3826 questionable auto-promotion to VIEW_CONVERT_EXPR.
3827 (c_parser_gimple_typespec): Split out from __MEM parsing.
3828 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3829 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3830 as __VIEW_CONVERT with -gimple.
3831
3832 2019-05-09 Martin Liska <mliska@suse.cz>
3833
3834 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3835 __MAX.
3836 (c_parser_gimple_unary_expression): Parse also binary expression
3837 __MIN and __MAX.
3838 (c_parser_gimple_parentized_binary_expression): New function.
3839
3840 2019-05-09 Martin Liska <mliska@suse.cz>
3841
3842 * gimple-parser.c (struct gimple_parser): Add probability.
3843 for gimple_parser_edge.
3844 (gimple_parser::push_edge): Add new argument probability.
3845 (c_parser_gimple_parse_bb_spec): Parse also probability
3846 if present.
3847 (c_parser_parse_gimple_body): Set edge probability.
3848 (c_parser_gimple_compound_statement): Consume token
3849 before calling c_parser_gimple_goto_stmt.
3850 Parse BB counts.
3851 (c_parser_gimple_statement): Pass new argument.
3852 (c_parser_gimple_goto_stmt): Likewise.
3853 (c_parser_gimple_if_stmt): Likewise.
3854 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3855 * c-parser.c (c_parser_declaration_or_fndef): Pass
3856 hot_bb_threshold argument.
3857 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3858 field.
3859 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3860
3861 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3862
3863 PR debug/90197
3864 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3865 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3866 (c_parser_do_statement): Likewise.
3867 (c_parser_for_statement): Likewise. Formatting fixes.
3868 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3869 emit DEBUG_BEGIN_STMTs if needed.
3870
3871 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3872
3873 PR c/89888
3874 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3875 (c_start_case): Don't clear it.
3876 (do_case): Adjust c_add_case_label caller.
3877 (c_finish_case): Adjust c_do_switch_warnings caller.
3878
3879 PR c++/90108
3880 * c-decl.c (merge_decls): If remove is main variant and
3881 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3882 variant that has newdecl as TYPE_NAME if any.
3883
3884 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3885
3886 PR c/89933
3887 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3888 don't try to remove it from the variant list, but instead assert
3889 it has no variants.
3890
3891 2019-04-01 Richard Biener <rguenther@suse.de>
3892
3893 PR c/71598
3894 * c-tree.h (c_get_alias_set): Declare.
3895 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3896 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3897 as the underlying integer type.
3898
3899 2019-03-19 Martin Sebor <msebor@redhat.com>
3900
3901 PR tree-optimization/89688
3902 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3903 kinds of initializers.
3904
3905 2019-03-19 Jakub Jelinek <jakub@redhat.com>
3906
3907 PR c/89734
3908 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3909 return type even if quals_used is 0. Formatting fixes.
3910
3911 2019-03-14 Richard Biener <rguenther@suse.de>
3912
3913 * c-tree.h (enum c_declspec_il): New.
3914 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3915 enum bitfield.
3916 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3917 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3918 (c_parser_declspecs): Adjust.
3919 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3920 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3921 and bitmap.h.
3922 (struct gimple_parser): New.
3923 (gimple_parser::push_edge): New method.
3924 (c_parser_gimple_parse_bb_spec): New helper.
3925 (c_parser_parse_gimple_body): Get start pass and IL specification.
3926 Initialize SSA and CFG.
3927 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3928 Build a gimple_parser parsing state and pass it along.
3929 (c_parser_gimple_statement): Change intermittend __PHI internal
3930 function argument for the edge.
3931 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3932 (c_parser_gimple_goto_stmt): Record edges to build.
3933 (c_parser_gimple_if_stmt): Likewise.
3934 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3935 (c_parser_gimple_or_rtl_pass_list): Likewise.
3936
3937 2019-03-11 Martin Liska <mliska@suse.cz>
3938
3939 * c-decl.c (check_for_loop_decls): Wrap an option name
3940 in a string format message and fix GNU coding style.
3941 * c-parser.c (c_parser_declspecs): Likewise.
3942
3943 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3944
3945 PR tree-optimization/89550
3946 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3947 returned true.
3948 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3949 or warning returned true.
3950
3951 2019-02-28 Jakub Jelinek <jakub@redhat.com>
3952
3953 PR c/89525
3954 * c-typeck.c (convert_arguments): Call inform_declaration only if
3955 the previous warning_at call returned true.
3956
3957 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3958
3959 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3960 parameter. Adjust all users.
3961 (c_parser_oacc_simple_clause): Replace parser with loc formal
3962 parameter. Adjust all users.
3963
3964 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
3965
3966 PR c/87924
3967 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3968 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3969
3970 2019-02-15 Jakub Jelinek <jakub@redhat.com>
3971
3972 PR c/89340
3973 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3974 before c_decl_attributes rather than after it.
3975
3976 2019-02-06 Jakub Jelinek <jakub@redhat.com>
3977
3978 PR c/89211
3979 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3980 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3981 instead of 3 nested ifs.
3982
3983 2019-02-06 Joseph Myers <joseph@codesourcery.com>
3984
3985 PR c/88584
3986 * c-decl.c (finish_decl): Do not complete array types for arrays
3987 with external linkage not at file scope.
3988
3989 2019-02-05 Richard Biener <rguenther@suse.de>
3990
3991 PR c/88606
3992 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3993 all type variants when not supported.
3994
3995 2019-01-30 Jakub Jelinek <jakub@redhat.com>
3996
3997 PR c/89061
3998 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3999 * c-decl.c (decl_jump_unsafe): Return false for
4000 C_DECL_COMPOUND_LITERAL_P decls.
4001 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
4002
4003 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4004
4005 PR c/89045
4006 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
4007 scope.
4008
4009 PR c/86125
4010 * c-decl.c (last_fileptr_type): Remove.
4011 (last_structptr_types): New variable.
4012 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
4013 {old,new}rettype instead of the types themselves. Assert
4014 last_structptr_types array has the same number of elements
4015 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
4016 argument oldtype and newtype. Instead of handling
4017 just fileptr_type_node specially, handle all builtin_structptr_types
4018 pointer nodes. Formatting fix.
4019
4020 2019-01-24 Martin Sebor <msebor@redhat.com>
4021
4022 PR c/86125
4023 PR c/88886
4024 PR middle-end/86308
4025 * c-decl.c (match_builtin_function_types): Add arguments.
4026 (diagnose_mismatched_decls): Diagnose mismatched declarations
4027 of built-ins more strictly.
4028
4029 2019-01-24 Jakub Jelinek <jakub@redhat.com>
4030
4031 PR c++/88976
4032 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
4033 on #pragma omp cancel with different modifiers.
4034
4035 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4036
4037 PR c/51628
4038 PR c/88664
4039 * c-typeck.c (convert_for_assignment): Upate the
4040 warn_for_address_or_pointer_of_packed_member call.
4041
4042 2019-01-16 Tom Honermann <tom@honermann.net>
4043 Jason Merrill <jason@redhat.com>
4044
4045 * c-typeck.c (digest_init): Revised the error message produced for
4046 ill-formed cases of array initialization with a string literal.
4047 (error_init): Make variadic.
4048
4049 2019-01-12 Jakub Jelinek <jakub@redhat.com>
4050
4051 * c-typeck.c (convert_for_assignment): Fix a comment typo.
4052
4053 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4054
4055 PR c/88701
4056 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
4057 if current_function_decl is non-NULL.
4058
4059 2019-01-07 Joseph Myers <joseph@codesourcery.com>
4060
4061 PR c/88720
4062 PR c/88726
4063 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
4064 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
4065 functions declared but never defined only for external scope, not
4066 for other scopes.
4067
4068 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4069
4070 PR c++/85052
4071 * c-parser.c (c_parser_postfix_expression): Parse
4072 __builtin_convertvector.
4073
4074 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4075
4076 Update copyright years.
4077
4078 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4079
4080 PR c/51628
4081 * c-typeck.c (convert_for_assignment): Call
4082 warn_for_address_or_pointer_of_packed_member.
4083
4084 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4085
4086 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
4087 a more specific error message (instead of just falling through).
4088
4089 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4090
4091 * c-parser.c (c_parser_asm_statement): Keep track of the location each
4092 asm qualifier is first seen; use that to give nicer "duplicate asm
4093 qualifier" messages. Delete 'quals" variable, instead pass the
4094 "is_volatile_ flag to build_asm_stmt directly.
4095 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
4096 * c-typeck.c (build_asm_stmt): Ditto; adjust.
4097
4098 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4099
4100 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
4101 "done" boolean variable.
4102
4103 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4104
4105 PR c++/87504
4106 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
4107 Move from here to gcc-rich-location.h and gcc-rich-location.c.
4108 (build_binary_op): Use struct op_location_t and
4109 class binary_op_rich_location.
4110
4111 2018-12-11 Jakub Jelinek <jakub@redhat.com>
4112
4113 PR sanitizer/88426
4114 * c-convert.c (convert): Call c_fully_fold before calling
4115 ubsan_instrument_float_cast.
4116
4117 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
4118
4119 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
4120 setting "quals".
4121
4122 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4123
4124 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
4125 after asm. Pass a flag for it to build_asm_expr.
4126 * c-tree.h (build_asm_expr): Update declaration.
4127 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
4128 set ASM_INLINE_P.
4129
4130 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4131
4132 PR inline-asm/55681
4133 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
4134 combination of volatile and goto, in any order, without repetitions.
4135
4136 2018-12-04 James Norris <jnorris@codesourcery.com>
4137 Cesar Philippidis <cesar@codesourcery.com>
4138 Julian Brown <julian@codesourcery.com>
4139
4140 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
4141 code.
4142
4143 2018-11-30 Richard Biener <rguenther@suse.de>
4144
4145 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4146 _Literal (type) { ... } as empty aggregate or vector constructor.
4147
4148 2018-11-29 Martin Sebor <msebor@redhat.com>
4149
4150 PR c/88091
4151 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
4152 (convert_arguments): Add comments. Pass additional argument to
4153 the function above.
4154
4155 2018-11-29 Martin Sebor <msebor@redhat.com>
4156
4157 PR c/88172
4158 PR testsuite/88208
4159 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
4160
4161 2018-11-23 Martin Sebor <msebor@redhat.com>
4162
4163 PR testsuite/88098
4164 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
4165 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
4166
4167 2018-11-20 Martin Sebor <msebor@redhat.com>
4168
4169 * c-parser.c (c_parser_has_attribute_expression): New function.
4170 (c_parser_attribute): New function.
4171 (c_parser_attributes): Move code into c_parser_attribute.
4172 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
4173
4174 2018-11-15 Martin Sebor <msebor@redhat.com>
4175
4176 PR c/83656
4177 * c-decl.c (header_for_builtin_fn): Declare.
4178 (diagnose_mismatched_decls): Diagnose declarations of built-in
4179 functions without a prototype.
4180 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
4181 (convert_argument): Same.
4182 (convert_arguments): Factor code out into convert_argument.
4183 Detect mismatches between built-in formal arguments in calls
4184 to built-in without prototype.
4185 (build_conditional_expr): Same.
4186 (type_or_builtin_type): New function.
4187 (convert_for_assignment): Add argument. Conditionally issue
4188 warnings instead of errors for mismatches.
4189
4190 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4191
4192 * c-decl.c: Replace "source_location" with "location_t".
4193 * c-tree.h: Likewise.
4194 * c-typeck.c: Likewise.
4195 * gimple-parser.c: Likewise.
4196
4197 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4198
4199 * c-parser.c (c_parser_omp_clause_final): Use
4200 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
4201 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
4202 parsing instead of c_parser_paren_condition.
4203 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
4204 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
4205 c_fully_fold instead of c_parser_condition.
4206 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
4207 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
4208 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
4209 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
4210 c_parser_expr_no_commas instead of c_parser_expression.
4211
4212 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
4213 reduction clause with inscan modifier.
4214
4215 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
4216 clauses other than atomic_default_mem_order.
4217
4218 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4219
4220 * c-parser.c: Include memmode.h.
4221 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
4222 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
4223 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
4224 task_reduction clauses.
4225 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
4226 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
4227 section, or lvalue assignment expression.
4228 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
4229 (c_parser_omp_clause_lastprivate): Parse optional
4230 conditional: modifier.
4231 (c_parser_omp_clause_hint): Require constant integer expression rather
4232 than just integer expression.
4233 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
4234 clause.
4235 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
4236 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
4237 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
4238 functions.
4239 (c_parser_omp_clause_depend): Parse iterator modifier and handle
4240 iterators. Parse mutexinoutset and depobj kinds.
4241 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
4242 callers.
4243 (c_parser_omp_all_clauses): Likewise. Handle
4244 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
4245 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4246 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
4247 default memory order from requires directive if any. Adjust
4248 c_finish_omp_atomic caller.
4249 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
4250 (c_parser_omp_flush): Parse flush with memory-order-clause.
4251 (c_parser_omp_for_loop): Allow NE_EXPR even in
4252 OpenMP loops, adjust c_finish_omp_for caller.
4253 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
4254 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
4255 Allow to be called while parsing combined parallel master.
4256 Parse combined master taskloop{, simd}.
4257 (c_parser_omp_parallel): Parse combined
4258 parallel master{, taskloop{, simd}} constructs.
4259 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
4260 (OMP_TASKGROUP_CLAUSE_MASK): Define.
4261 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
4262 (OMP_TASKWAIT_CLAUSE_MASK): Define.
4263 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
4264 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
4265 around teams body. Use SET_EXPR_LOCATION.
4266 (c_parser_omp_target_data): Allow target data
4267 with only use_device_ptr clauses.
4268 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
4269 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4270 (c_parser_omp_requires): New function.
4271 (c_finish_taskloop_clauses): New function.
4272 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4273 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
4274 declaration. Disallow in_reduction clause when combined with parallel
4275 master.
4276 (c_parser_omp_construct): Adjust c_parser_omp_master and
4277 c_parser_omp_taskgroup callers.
4278 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4279 other than cancel.
4280 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4281 like OMP_CLAUSE_REDUCTION.
4282 (handle_omp_array_sections): Likewise. Call save_expr on array
4283 reductions before calling build_index_type. Handle depend clauses
4284 with iterators.
4285 (struct c_find_omp_var_s): New type.
4286 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4287 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4288 with static, runtime or auto schedule kinds. Call save_expr for whole
4289 array reduction sizes. Diagnose reductions with zero sized elements
4290 or variable length structures. Diagnose nogroup clause used with
4291 reduction clause(s). Handle depend clause with
4292 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
4293 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4294 some different type for other kinds. Use build_unary_op with
4295 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4296 Handle depend clauses with iterators. Remove no longer needed special
4297 case that predetermined const qualified vars may be specified in
4298 firstprivate clause. Complain if const qualified vars are mentioned
4299 in data-sharing clauses other than firstprivate or shared. Use
4300 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4301 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
4302 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
4303 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4304
4305 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4306
4307 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4308 logic for change to name_hint::operator bool.
4309 (undeclared_variable): Likewise.
4310 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4311 (c_parser_parameter_declaration): Likewise.
4312
4313 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4314
4315 * c-errors.c (pedwarn_c11): New function.
4316 * c-parser.c (disable_extension_diagnostics): Save
4317 warn_c11_c2x_compat and set it to 0.
4318 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4319 (c_parser_static_assert_declaration_no_semi): Handle
4320 _Static_assert without string constant.
4321 * c-tree.h (pedwarn_c11): New prototype.
4322
4323 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4324
4325 * Make-lang.in (selftest-c): New.
4326 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4327 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4328 from gcc/Makefile.in.
4329
4330 2018-10-02 Richard Biener <rguenther@suse.de>
4331
4332 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4333
4334 2018-09-26 Joseph Myers <joseph@codesourcery.com>
4335
4336 PR c/87390
4337 * c-typeck.c (build_binary_op): Use excess precision for
4338 comparisons of integers and floating-point for C11 and later.
4339
4340 2018-09-26 Martin Jambor <mjambor@suse.cz>
4341
4342 PR c/87347
4343 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
4344 comment.
4345
4346 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4347
4348 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4349 Update for new param.
4350 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4351 Likewise.
4352
4353 2018-09-17 Martin Jambor <mjambor@suse.cz>
4354
4355 PR c/63886
4356 * c-parser.c: (warn_for_abs): New function.
4357 (c_parser_postfix_expression_after_primary): Call it.
4358
4359 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4360
4361 * c-typeck.c (digest_init): Shorten overlength strings.
4362
4363 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4364
4365 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4366
4367 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4368
4369 * c-decl.c (finish_decl): Call braced_list_to_string here ...
4370 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4371
4372 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
4373
4374 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4375 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4376
4377 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4378
4379 PR 87091
4380 * c-decl.c (implicitly_declare): Update call to
4381 maybe_add_include_fixit to suggest overriding the location, as it
4382 is for a note.
4383 * c-objc-common.c (c_tree_printer): Update for conversion of
4384 show_caret_p to a tri-state.
4385
4386 2018-08-27 Martin Liska <mliska@suse.cz>
4387
4388 * c-decl.c (locate_old_decl): Use new function
4389 fndecl_built_in_p and remove check for FUNCTION_DECL if
4390 possible.
4391 (diagnose_mismatched_decls): Likewise.
4392 (merge_decls): Likewise.
4393 (warn_if_shadowing): Likewise.
4394 (pushdecl): Likewise.
4395 (implicitly_declare): Likewise.
4396 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4397 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4398 * c-typeck.c (build_function_call_vec): Likewise.
4399 (convert_arguments): Likewise.
4400
4401 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4402
4403 PR other/84889
4404 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4405 (diagnose_mismatched_decls): Likewise, in various places.
4406 (warn_if_shadowing): Likewise.
4407 (implicit_decl_warning): Likewise.
4408 (implicitly_declare): Likewise.
4409 (undeclared_variable): Likewise.
4410 (declare_label): Likewise.
4411 (grokdeclarator): Likewise.
4412 (start_function): Likewise.
4413 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4414 (c_parser_parameter_declaration): Likewise.
4415 (c_parser_binary_expression): Likewise.
4416 * c-typeck.c (c_expr_sizeof_expr): Likewise.
4417 (parser_build_binary_op): Likewise.
4418 (build_unary_op): Likewise.
4419 (error_init): Likewise.
4420 (pedwarn_init): Likewise.
4421 (warning_init): Likewise.
4422 (convert_for_assignment): Likewise.
4423
4424 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4425
4426 * c-objc-common.c: Include "gcc-rich-location.h".
4427 (c_tree_printer): Move implemenation of '%T' to...
4428 (print_type): ...this new function.
4429 (range_label_for_type_mismatch::get_text): New function.
4430 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4431 range for the various ic_argpass cases.
4432 (class maybe_range_label_for_tree_type_mismatch): New class.
4433 (build_binary_op): Use it when calling binary_op_error.
4434
4435 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4436
4437 * c-decl.c (start_decl): Do not warn if variables is named as main
4438 and is a local variable.
4439
4440 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4441
4442 PR c/19315
4443 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4444 objects of unknown size.
4445
4446 2018-08-13 Martin Sebor <msebor@redhat.com>
4447
4448 PR tree-optimization/71625
4449 * c-parser.c (c_parser_declaration_or_fndef): Call
4450 braced_list_to_string.
4451
4452 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
4453
4454 PR c/86690
4455 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4456 errors.
4457
4458 2018-08-01 Martin Sebor <msebor@redhat.com>
4459
4460 PR tree-optimization/86650
4461 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4462 and TREE_BLOCK (t) from within percent_K_format to this callsite.
4463
4464 2018-08-01 Jakub Jelinek <jakub@redhat.com>
4465
4466 PR c/85704
4467 * c-typeck.c (init_field_decl_cmp): New function.
4468 (output_pending_init_elements): Use it for field comparisons
4469 instead of pure bit_position comparisons.
4470
4471 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4472
4473 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4474 type here, instead add "omp declare target implicit" attribute.
4475 (finish_decl): Diagnose vars without mappable type here.
4476
4477 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4478 Thomas Schwinge <thomas@codesourcery.com>
4479 Cesar Philippidis <cesar@codesourcery.com>
4480
4481 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4482 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4483 to their non-present_or_* counterparts. Make 'self' an alias to
4484 PRAGMA_OACC_CLAUSE_HOST.
4485 (c_parser_oacc_data_clause): Update GOMP mappings for
4486 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4487 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4488 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4489 Remove support for present_or_* clauses.
4490 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4491 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4492 (OACC_DECLARE_CLAUSE_MASK): Likewise.
4493 (OACC_DATA_CLAUSE_MASK): Likewise.
4494 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4495 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4496 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4497 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4498 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4499
4500 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4501
4502 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4503 * gimple-parser.c (c_parser_gimple_statement): Likewise.
4504 (c_parser_gimple_unary_expression): Likewise.
4505
4506 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4507
4508 PR c/86093
4509 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4510 before doing POINTER_DIFF_EXPR.
4511
4512 2018-06-07 Marek Polacek <polacek@redhat.com>
4513
4514 PR c/85318
4515 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4516 for loop initial declarations.
4517
4518 2018-05-30 David Pagan <dave.pagan@oracle.com>
4519
4520 PR c/55976
4521 * c-decl.c (grokdeclarator): Update check for return type warnings.
4522 (start_function): Likewise.
4523 (finish_function): Likewise.
4524 * c-typeck.c (c_finish_return): Update check for return type warnings.
4525 Pass OPT_Wreturn_type to pedwarn when appropriate.
4526
4527 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4528
4529 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4530 __FMA_EXPR handlng.
4531
4532 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4533
4534 * gimple-parser.c: Include internal-fn.h.
4535 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4536 (c_parser_gimple_call_internal): New function.
4537 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4538 Fix typos in comment.
4539
4540 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4541
4542 PR c++/85662
4543 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4544 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4545 fold_convert_loc.
4546 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4547 fold_offsetof_1, pass argtype as TYPE to it and drop the
4548 fold_convert_loc.
4549
4550 2018-05-02 David Pagan <dave.pagan@oracle.com>
4551
4552 PR c/30552
4553 * c-decl.c (old_style_parameter_scope): New function.
4554 * c-parser.c (c_parser_postfix_expression): Check for statement
4555 expressions in old-style function parameter list declarations.
4556 * c-parser.h (old_style_parameter_scope): New extern declaration.
4557
4558 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4559
4560 PR sanitizer/84307
4561 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4562 it is not TREE_STATIC.
4563 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4564 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4565 its COMPOUND_LITERAL_EXPR_DECL.
4566
4567 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4568
4569 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4570 where all functions return the same _FloatN or _FloatNx type,
4571 treat integer types as _Float64 instead of double.
4572
4573 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4574
4575 PR c/84999
4576 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4577 building vector comparison, diagnose it and return error_mark_node.
4578
4579 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4580
4581 PR c/84853
4582 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4583 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4584 INTEGER_TYPE element type.
4585
4586 2018-03-13 David Pagan <dave.pagan@oracle.com>
4587
4588 PR c/46921
4589 * c-typeck.c (output_init_element): Ensure field initializer
4590 expression is always evaluated if there are side effects.
4591
4592 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4593
4594 PR c/84721
4595 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4596 !building_stmt_list_p ().
4597
4598 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4599
4600 PR c/84305
4601 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4602 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4603 and include the BIND_EXPR in the list of things that need to be
4604 pre-evaluated.
4605
4606 2018-02-09 Nathan Sidwell <nathan@acm.org>
4607
4608 PR c/84293
4609 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4610 to strict_aliasing_warning.
4611
4612 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4613
4614 * c-typeck.c (really_start_incremental_init, push_init_level,
4615 set_nonincremental_init, output_init_element, process_init_element):
4616 Use DECL_UNNAMED_BIT_FIELD.
4617
4618 2018-01-31 Marek Polacek <polacek@redhat.com>
4619
4620 PR c/81779
4621 * c-parser.c (c_parser_compound_statement_nostart): Call
4622 expansion_point_location_if_in_system_header.
4623
4624 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4625
4626 PR c++/83814
4627 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4628 the C part.
4629
4630 2018-01-13 Jakub Jelinek <jakub@redhat.com>
4631
4632 PR c/83801
4633 * c-tree.h (decl_constant_value_1): Add a bool argument.
4634 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4635 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4636 (decl_constant_value): Adjust caller.
4637 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4638 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4639 decl_constant_value returns initializer that has BLKmode or
4640 array type.
4641 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4642
4643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4644 Alan Hayward <alan.hayward@arm.com>
4645 David Sherwood <david.sherwood@arm.com>
4646
4647 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4648 TYPE_VECTOR_SUBPARTS.
4649
4650 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4651
4652 Update copyright years.
4653
4654 2018-01-01 Jakub Jelinek <jakub@redhat.com>
4655
4656 PR c/83595
4657 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4658 c_parser_conditional_expression, c_parser_cast_expression,
4659 c_parser_sizeof_expression, c_parser_alignof_expression,
4660 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4661 c_parser_transaction_expression): Use set_error () method instead
4662 of setting value member to error_mark_node.
4663
4664 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4665
4666 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4667 and _Float<N>X built-in functions.
4668
4669 2017-12-22 Jakub Jelinek <jakub@redhat.com>
4670
4671 PR debug/83550
4672 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4673 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4674 incomplete vars rather than after it.
4675
4676 PR debug/83547
4677 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4678 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4679 and consider empty ones if there are no other stmts. For
4680 -Wunused-value walk all statements before the one only followed by
4681 DEBUG_BEGIN_STMTs.
4682
4683 2017-12-22 Mike Stump <mikestump@comcast.net>
4684 Eric Botcazou <ebotcazou@adacore.com>
4685
4686 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4687 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4688 (c_parser_do_statement): Likewise.
4689 (c_parser_for_statement): Likewise.
4690 (c_parser_statement_after_labels): Adjust calls to above.
4691 (c_parse_pragma_ivdep): New static function.
4692 (c_parser_pragma_unroll): Likewise.
4693 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4694 <PRAGMA_UNROLL>: New case.
4695
4696 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4697
4698 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4699 perform_integral_promotions, digest_init): Replace Yoda conditions
4700 with typical order conditions.
4701 * c-decl.c (check_bitfield_type_and_width): Likewise.
4702
4703 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4704
4705 * c-typeck.c (c_safe_arg_type_equiv_p,
4706 c_safe_function_type_cast_p): New function.
4707 (build_c_cast): Implement -Wcast-function-type.
4708
4709 2017-12-14 Richard Biener <rguenther@suse.de>
4710
4711 PR c/83415
4712 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4713 like REALPART_EXPR for the behavior of whether its operand
4714 is an lvalue.
4715
4716 2017-12-12 Marek Polacek <polacek@redhat.com>
4717
4718 PR c/82679
4719 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4720
4721 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4722
4723 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4724 * c-parser.c (add_debug_begin_stmt): New.
4725 (c_parser_declaration_or_fndef): Call it.
4726 (c_parser_compound_statement_nostart): Likewise.
4727 (c_parser_statement_after_labels): Likewise.
4728 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4729
4730 2017-12-07 Joseph Myers <joseph@codesourcery.com>
4731
4732 * c-decl.c (build_compound_literal): Add parameter alignas_align
4733 and set alignment of decl if nonzero.
4734 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4735 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4736 qualifier.
4737 (c_parser_struct_declaration): Update syntax comment.
4738 (c_parser_type_name): Add alignas_ok argument and pass it to
4739 c_parser_declspecs.
4740 (c_parser_cast_expression): Pass true to c_parser_type_name and
4741 give error if a cast used an _Alignas specifier.
4742 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4743 give error if sizeof (type-name) used an _Alignas specifier.
4744 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4745 give error if _Alignof (type-name) used an _Alignas specifier.
4746 (c_parser_postfix_expression_after_paren_type): Check specified
4747 alignment for a compound literal and pass it to
4748 build_compound_literal.
4749 * c-parser.h (c_parser_type_name): Update prototype.
4750 * c-tree.h (build_compound_literal): Update prototype.
4751
4752 2017-12-07 Martin Sebor <msebor@redhat.com>
4753
4754 PR c/81544
4755 * c-decl.c (c_decl_attributes): Look up existing declaration and
4756 pass it to decl_attributes.
4757
4758 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4759
4760 PR c/83236
4761 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4762 reserved for use by the implementation.
4763
4764 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4765
4766 * c-decl.c: Include "c-family/c-spellcheck.h".
4767
4768 2017-12-05 Martin Liska <mliska@suse.cz>
4769 Jakub Jelinek <jakub@redhat.com>
4770
4771 * c-typeck.c (pointer_diff): Add new argument and instrument
4772 pointer subtraction.
4773 (build_binary_op): Similar for pointer comparison.
4774
4775 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4776
4777 PR c/79153
4778 * c-parser.c: Include tree-iterator.h.
4779 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4780 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4781 on it.
4782
4783 PR c/83222
4784 * c-tree.h (decl_constant_value_1): Declare.
4785 * c-typeck.c (decl_constant_value_1): New function.
4786 (decl_constant_value): Use it.
4787 * c-fold.c (c_fully_fold_internal): If in_init, use
4788 decl_constant_value_1 instead of decl_constant_value.
4789
4790 2017-11-30 Jakub Jelinek <jakub@redhat.com>
4791
4792 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4793
4794 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4795
4796 PR sanitizer/81275
4797 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4798 c_switch_covers_all_cases_p returns true.
4799
4800 2017-11-28 Julia Koval <julia.koval@intel.com>
4801 Sebastian Peryt <sebastian.peryt@intel.com>
4802
4803 * Make-lang.in (c/c-array-notation.o): Remove.
4804 * c-array-notation.c: Delete.
4805 * c-decl.c: Remove cilkplus condition.
4806 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4807 c_parser_cilk_verify_simd, c_parser_array_notation,
4808 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4809 c_parser_cilk_simd_fn_vector_attrs,
4810 c_finish_cilk_simd_fn_tokens): Delete.
4811 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4812 (c_parser_direct_declarator_inner): Ditto.
4813 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4814 (c_parser_attributes, c_parser_compound_statement,
4815 c_parser_statement_after_labels, c_parser_if_statement,
4816 c_parser_switch_statement, c_parser_while_statement,
4817 c_parser_do_statement, c_parser_for_statement,
4818 c_parser_unary_expression, c_parser_postfix_expression,
4819 c_parser_postfix_expression_after_primary,
4820 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4821 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4822 support.
4823 * c-typeck.c (build_array_ref, build_function_call_vec,
4824 convert_arguments,
4825 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4826 c_finish_loop, build_binary_op): Remove cilkplus support.
4827
4828 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4829
4830 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4831 of build3.
4832
4833 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
4834
4835 * Make-lang.in (c.install-plugin): Install backend import library.
4836
4837 2017-11-23 Jakub Jelinek <jakub@redhat.com>
4838
4839 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4840 pragma_stmt context.
4841
4842 2017-11-23 Mike Stump <mikestump@comcast.net>
4843 Eric Botcazou <ebotcazou@adacore.com>
4844
4845 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4846 ANNOTATE_EXPR.
4847 (c_parser_do_statement): Likewise.
4848 (c_parser_for_statement): Likewise.
4849
4850 2017-11-22 David Malcolm <dmalcolm@redhat.com>
4851
4852 PR c++/62170
4853 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4854 bool to bool *. Within '%T' handling, if showing an "aka", use
4855 "quoted" param to add appropriate quoting.
4856
4857 2017-11-22 Marek Polacek <polacek@redhat.com>
4858
4859 PR c++/60336
4860 PR middle-end/67239
4861 PR target/68355
4862 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4863
4864 2017-11-21 David Malcolm <dmalcolm@redhat.com>
4865
4866 PR c/83056
4867 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4868 earlier failed lookups.
4869
4870 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4871
4872 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4873 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4874
4875 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4876
4877 PR c/81404
4878 * c-decl.c: Include "c-family/known-headers.h".
4879 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4880 to known-headers.cc.
4881 (class suggest_missing_header): Move to known-header.h.
4882 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4883 than get_c_name_hint.
4884
4885 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4886
4887 * c-decl.c (get_c_name_hint): New function.
4888 (class suggest_missing_header): New class.
4889 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4890 suggest missing headers to the user.
4891
4892 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4893
4894 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4895 Include "c-family/name-hint.h"
4896 (implicit_decl_warning): Convert "hint" from
4897 const char * to name_hint. Pass location to
4898 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4899 warning was not printed.
4900 (undeclared_variable): Likewise for "guessed_id".
4901 (lookup_name_fuzzy): Convert return type from const char *
4902 to name_hint. Add location_t param.
4903 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4904 Include "c-family/name-hint.h"
4905 (c_parser_declaration_or_fndef): Convert "hint" from
4906 const char * to name_hint. Pass location to lookup_name_fuzzy.
4907 (c_parser_parameter_declaration): Likewise.
4908
4909 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4910
4911 PR c/66618
4912 PR c/69960
4913 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4914 where needed.
4915 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4916 handle_omp_array_sections): Likewise.
4917 (digest_init): Don't call decl_constant_value_for_optimization.
4918 * c-tree.h (decl_constant_value_for_optimization): Removed.
4919 * c-fold.c (c_fold_array_ref): New function.
4920 (c_fully_fold_internal): Add LVAL argument, propagate it through
4921 recursive calls. For VAR_P call decl_constant_value and
4922 unshare if not LVAL and either optimizing or IN_INIT. Remove
4923 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4924 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4925 (c_fully_fold): Add LVAL argument, pass it through to
4926 c_fully_fold_internal.
4927 (decl_constant_value_for_optimization): Removed.
4928
4929 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4930
4931 PR c/81156
4932 * c-parser.c (check_tgmath_function): New function.
4933 (enum tgmath_parm_kind): New enum.
4934 (c_parser_postfix_expression): Handle __builtin_tgmath.
4935
4936 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4937
4938 * c-decl.c (implicit_decl_warning): Update for renaming of
4939 pedwarn_at_rich_loc and warning_at_rich_loc.
4940 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4941 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4942 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4943 (c_parser_struct_or_union_specifier): Likewise for renaming of
4944 pedwarn_at_rich_loc.
4945 (c_parser_parameter_declaration): Likewise for renaming of
4946 error_at_rich_loc.
4947 * c-typeck.c (build_component_ref): Likewise.
4948 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4949 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4950 (set_init_label): Likewise for renaming of error_at_rich_loc.
4951
4952 2017-10-30 Richard Biener <rguenther@suse.de>
4953
4954 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4955 stmts.
4956
4957 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4958
4959 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4960 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4961
4962 2017-10-25 David Malcolm <dmalcolm@redhat.com>
4963
4964 PR c/7356
4965 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4966 semicolons.
4967
4968 2017-10-25 Jakub Jelinek <jakub@redhat.com>
4969
4970 PR libstdc++/81706
4971 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4972 newdecl to corresponding __builtin_ if any.
4973
4974 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4975
4976 PR c++/82466
4977 * c-decl.c (diagnose_mismatched_decls): Use
4978 OPT_Wbuiltin_declaration_mismatch.
4979
4980 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4981
4982 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4983 use it to guard calls to maybe_suggest_missing_token_insertion.
4984 (c_parser_parms_list_declarator): Override default value of new
4985 "type_is_unique" param to c_parser_require.
4986 (c_parser_asm_statement): Likewise.
4987 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4988 defaulting to true.
4989
4990 2017-10-11 Nathan Sidwell <nathan@acm.org>
4991
4992 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4993
4994 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4995
4996 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4997 operating on trees as wide_ints.
4998 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4999 (c_tree_equal): Likewise.
5000
5001 2017-10-04 David Malcolm <dmalcolm@redhat.com>
5002
5003 * c-decl.c (push_parm_decl): Store c_parm's location into the
5004 PARAM_DECL.
5005 (build_c_parm): Add "loc" param and store it within the c_parm.
5006 * c-parser.c (struct c_parser): Add "last_token_location" field.
5007 (c_parser_consume_token): Store location of the token into the
5008 new field.
5009 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
5010 when handling a FUNCTION_DECL, if it doesn't already have them.
5011 (c_parser_parameter_declaration): Generate a location for the
5012 parameter, and pass it to the call to build_c_parm.
5013 * c-tree.h (struct c_parm): Add field "loc".
5014 (build_c_parm): Add location_t param.
5015 * c-typeck.c (get_fndecl_argument_location): New function.
5016 (inform_for_arg): New function.
5017 (convert_for_assignment): Use inform_for_arg when dealing with
5018 ic_argpass.
5019
5020 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5021
5022 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
5023 width is non-NULL.
5024 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
5025 don't SET_DECL_C_BIT_FIELD here.
5026
5027 PR c/82340
5028 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
5029 instead of trying to set just TREE_READONLY manually.
5030
5031 2017-09-16 Tom de Vries <tom@codesourcery.com>
5032
5033 PR c/81875
5034 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
5035 cond itself.
5036
5037 2017-09-15 Joseph Myers <joseph@codesourcery.com>
5038
5039 PR c/82071
5040 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
5041 for C11.
5042 (build_conditional_expr): For C11, generate result with excess
5043 precision when one argument is an integer and the other is of a
5044 type using excess precision.
5045
5046 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5047
5048 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
5049
5050 2017-09-13 Marek Polacek <polacek@redhat.com>
5051
5052 PR c/82167
5053 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
5054 than expr.original_type.
5055
5056 2017-09-12 Nathan Sidwell <nathan@acm.org>
5057
5058 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5059 resort_sorted_fields): Moved from c-family/c-common.c.
5060 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
5061
5062 2017-09-01 Joseph Myers <joseph@codesourcery.com>
5063
5064 PR c/82071
5065 * c-typeck.c (build_atomic_assign): Handle argument with excess
5066 precision. Ensure any EXCESS_PRECISION_EXPR is present in
5067 argument passed to build_binary_op and convert_for_assignment but
5068 not for call to c_fully_fold.
5069 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
5070 Ensure build_binary_op is called with argument with original
5071 semantic type. Avoid calling c_fully_fold with an
5072 EXCESS_PRECISION_EXPR from build_binary_op.
5073
5074 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5075
5076 PR c/81887
5077 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
5078
5079 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5080 Alan Hayward <alan.hayward@arm.com>
5081 David Sherwood <david.sherwood@arm.com>
5082
5083 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
5084 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
5085 m1 and m2 to the signed equivalent of a fixed-point
5086 SCALAR_TYPE_MODE.
5087
5088 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5089
5090 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
5091 than CAN_HAVE_LOCATION_P when determining whether to use the
5092 location_t value within "value".
5093
5094 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5095
5096 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
5097 rather than peeking the location of the first token.
5098 * c-tree.h (c_expr::get_location): New method.
5099
5100 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5101
5102 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
5103 to check_function_arguments.
5104
5105 2017-08-18 Marek Polacek <polacek@redhat.com>
5106
5107 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
5108 commentary.
5109
5110 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5111
5112 PR c/53037
5113 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
5114 (check_bitfield_type_and_width): Don't allow bit-field with
5115 warn_if_not_aligned type.
5116
5117 2017-08-14 Martin Sebor <msebor@redhat.com>
5118
5119 PR c/81117
5120 * c-objc-common.c (c_objc_common_init): Handle 'G'.
5121
5122 2017-08-11 Marek Polacek <polacek@redhat.com>
5123
5124 PR c/81795
5125 * c-decl.c (pushtag): Only print inform if the warning was printed.
5126 (grokdeclarator): Likewise.
5127
5128 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5129
5130 * c-parser.c (c_parser_error): Rename to...
5131 (c_parser_error_richloc): ...this, making static, and adding
5132 "richloc" parameter, passing it to the c_parse_error call,
5133 rather than calling c_parser_set_source_position_from_token.
5134 (c_parser_error): Reintroduce, reimplementing in terms of the
5135 above, converting return type from void to bool.
5136 (class token_pair): New class.
5137 (struct matching_paren_traits): New struct.
5138 (matching_parens): New typedef.
5139 (struct matching_brace_traits): New struct.
5140 (matching_braces): New typedef.
5141 (get_matching_symbol): New function.
5142 (c_parser_require): Add param MATCHING_LOCATION, using it to
5143 highlight matching "opening" tokens for missing "closing" tokens.
5144 (c_parser_skip_until_found): Likewise.
5145 (c_parser_static_assert_declaration_no_semi): Convert explicit
5146 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
5147 class matching_parens, so that the pertinent open parenthesis is
5148 highlighted when there are problems locating the close
5149 parenthesis.
5150 (c_parser_struct_or_union_specifier): Likewise.
5151 (c_parser_typeof_specifier): Likewise.
5152 (c_parser_alignas_specifier): Likewise.
5153 (c_parser_simple_asm_expr): Likewise.
5154 (c_parser_braced_init): Likewise, for matching_braces.
5155 (c_parser_paren_condition): Likewise, for matching_parens.
5156 (c_parser_switch_statement): Likewise.
5157 (c_parser_for_statement): Likewise.
5158 (c_parser_asm_statement): Likewise.
5159 (c_parser_asm_operands): Likewise.
5160 (c_parser_cast_expression): Likewise.
5161 (c_parser_sizeof_expression): Likewise.
5162 (c_parser_alignof_expression): Likewise.
5163 (c_parser_generic_selection): Likewise.
5164 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
5165 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
5166 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
5167 In case CPP_OPEN_PAREN, pass loc_open_paren to the
5168 c_parser_skip_until_found call.
5169 (c_parser_objc_class_definition): Use class matching_parens as
5170 above.
5171 (c_parser_objc_method_decl): Likewise.
5172 (c_parser_objc_try_catch_finally_statement): Likewise.
5173 (c_parser_objc_synchronized_statement): Likewise.
5174 (c_parser_objc_at_property_declaration): Likewise.
5175 (c_parser_oacc_wait_list): Likewise.
5176 (c_parser_omp_var_list_parens): Likewise.
5177 (c_parser_omp_clause_collapse): Likewise.
5178 (c_parser_omp_clause_default): Likewise.
5179 (c_parser_omp_clause_if): Likewise.
5180 (c_parser_omp_clause_num_threads): Likewise.
5181 (c_parser_omp_clause_num_tasks): Likewise.
5182 (c_parser_omp_clause_grainsize): Likewise.
5183 (c_parser_omp_clause_priority): Likewise.
5184 (c_parser_omp_clause_hint): Likewise.
5185 (c_parser_omp_clause_defaultmap): Likewise.
5186 (c_parser_oacc_single_int_clause): Likewise.
5187 (c_parser_omp_clause_ordered): Likewise.
5188 (c_parser_omp_clause_reduction): Likewise.
5189 (c_parser_omp_clause_schedule): Likewise.
5190 (c_parser_omp_clause_num_teams): Likewise.
5191 (c_parser_omp_clause_thread_limit): Likewise.
5192 (c_parser_omp_clause_aligned): Likewise.
5193 (c_parser_omp_clause_linear): Likewise.
5194 (c_parser_omp_clause_safelen): Likewise.
5195 (c_parser_omp_clause_simdlen): Likewise.
5196 (c_parser_omp_clause_depend): Likewise.
5197 (c_parser_omp_clause_map): Likewise.
5198 (c_parser_omp_clause_device): Likewise.
5199 (c_parser_omp_clause_dist_schedule): Likewise.
5200 (c_parser_omp_clause_proc_bind): Likewise.
5201 (c_parser_omp_clause_uniform): Likewise.
5202 (c_parser_omp_for_loop): Likewise.
5203 (c_parser_cilk_clause_vectorlength): Likewise.
5204 (c_parser_cilk_clause_linear): Likewise.
5205 (c_parser_transaction_expression): Likewise.
5206 * c-parser.h (c_parser_require): Add param matching_location with
5207 default UNKNOWN_LOCATION.
5208 (c_parser_error): Convert return type from void to bool.
5209 (c_parser_skip_until_found): Add param matching_location with
5210 default UNKNOWN_LOCATION.
5211
5212 2017-08-09 Marek Polacek <polacek@redhat.com>
5213
5214 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
5215 * c-tree.h (build_external_ref): Update declaration.
5216 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
5217 (build_external_ref): Change the type of a parameter to bool.
5218 (parser_build_binary_op): Use true/false instead of 1/0.
5219 (pointer_diff): Likewise.
5220 (build_modify_expr): Likewise.
5221 (set_designator): Change the type of a parameter to bool.
5222 (set_init_index): Use true/false instead of 1/0.
5223 (set_init_label): Likewise.
5224 (output_init_element): Change the type of a parameter to bool.
5225 (output_pending_init_elements): Use true/false instead of 1/0.
5226 (process_init_element): Likewise.
5227 (build_binary_op): Change the type of a parameter to bool.
5228
5229 2017-08-09 Marek Polacek <polacek@redhat.com>
5230
5231 PR c/81233
5232 * c-typeck.c (pedwarn_init): Make the function take a variable list.
5233 Call emit_diagnostic_valist instead of pedwarn.
5234 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
5235 Print the relevant types in diagnostics.
5236
5237 2017-08-09 Marek Polacek <polacek@redhat.com>
5238
5239 PR c/81417
5240 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
5241 build_conditional_expr.
5242 * c-parser.c (c_parser_conditional_expression): Create locations for
5243 EXP1 and EXP2 from their source ranges. Pass the locations down to
5244 build_conditional_expr.
5245 * c-tree.h (build_conditional_expr): Update declaration.
5246 * c-typeck.c (build_conditional_expr): Add location_t parameters.
5247 For -Wsign-compare, also print the types.
5248
5249 2017-08-08 Martin Liska <mliska@suse.cz>
5250
5251 * c-convert.c: Include header files.
5252 * c-typeck.c: Likewise.
5253
5254 2017-08-07 Martin Liska <mliska@suse.cz>
5255
5256 * c-parser.c (c_parser_attributes): Canonicalize name of an
5257 attribute.
5258
5259 2017-08-02 Marek Polacek <polacek@redhat.com>
5260
5261 PR c/81289
5262 * c-parser.c (c_parser_unary_expression): Use set_error.
5263
5264 PR c/81448
5265 PR c/81306
5266 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
5267 warnings. Avoid walking MACRO_MAP_LOCATIONS.
5268
5269 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
5270 Martin Liska <mliska@suse.cz>
5271
5272 * c-typeck.c (c_finish_goto_label): Build gimple predict
5273 statement.
5274
5275 2017-07-31 Martin Liska <mliska@suse.cz>
5276
5277 PR sanitize/81530
5278 * c-convert.c (convert): Guard condition with flag_sanitize_p
5279 also with current_function_decl non-null equality.
5280 * c-decl.c (grokdeclarator): Likewise.
5281 * c-typeck.c (build_binary_op): Likewise.
5282
5283 2017-07-25 Marek Polacek <polacek@redhat.com>
5284
5285 * c-decl.c (grokfield): Remove local variable.
5286
5287 2017-07-25 Marek Polacek <polacek@redhat.com>
5288
5289 PR c/81364
5290 * c-parser.c (c_parser_else_body): Don't warn about multistatement
5291 macro expansion if the body is in { }.
5292 (c_parser_while_statement): Likewise.
5293 (c_parser_for_statement): Likewise.
5294
5295 2017-07-18 Nathan Sidwell <nathan@acm.org>
5296
5297 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5298
5299 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5300
5301 * c-decl.c (implicitly_declare): When suggesting a missing
5302 #include, provide a fix-it hint.
5303
5304 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5305
5306 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5307 and call that instead.
5308 * c-tree.h (selftest::run_c_tests): New decl.
5309
5310 2017-06-26 Marek Polacek <polacek@redhat.com>
5311
5312 PR c/80116
5313 * c-parser.c (c_parser_if_body): Set the location of the
5314 body of the conditional after parsing all the labels. Call
5315 warn_for_multistatement_macros.
5316 (c_parser_else_body): Likewise.
5317 (c_parser_switch_statement): Likewise.
5318 (c_parser_while_statement): Likewise.
5319 (c_parser_for_statement): Likewise.
5320 (c_parser_statement): Add a default argument. Save the location
5321 after labels have been parsed.
5322 (c_parser_c99_block_statement): Likewise.
5323
5324 2017-06-19 Richard Biener <rguenther@suse.de>
5325
5326 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5327 negated _Literals to parse _Literal (int) -1.
5328
5329 2017-06-13 Martin Liska <mliska@suse.cz>
5330
5331 PR sanitize/78204
5332 * c-convert.c (convert): Use sanitize_flags_p.
5333 * c-decl.c (grokdeclarator): Likewise.
5334 * c-typeck.c (convert_for_assignment): Likewise.
5335 (c_finish_return): Likewise.
5336 (build_binary_op): Likewise.
5337
5338 2017-06-08 Jakub Jelinek <jakub@redhat.com>
5339
5340 PR c/81006
5341 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5342 to sizetype before size_binop.
5343
5344 2017-06-07 Jakub Jelinek <jakub@redhat.com>
5345
5346 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5347 of TDI_generic.
5348
5349 2017-06-06 Marek Polacek <polacek@redhat.com>
5350
5351 PR c/79983
5352 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5353 ref.
5354 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5355
5356 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5357
5358 * c-parser.c (c_parser_binary_expression): Implement the
5359 -Wsizeof_pointer_div warning.
5360 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5361 from a parenthesized expression.
5362 (c_parser_expr_list): Use c_last_sizeof_loc.
5363 * c-tree.h (c_last_sizeof_loc): New external.
5364 * c-typeck.c (c_last_sizeof_loc): New variable.
5365 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5366
5367 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
5368
5369 PR testsuite/80580
5370 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5371
5372 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5373
5374 * c-objc-common.c (c_tree_printer): Gain bool and const char **
5375 parameters.
5376
5377 2017-05-24 Martin Sebor <msebor@redhat.com>
5378
5379 PR c/80731
5380 * c-fold.c (c_fully_fold_internal): Adjust.
5381 * c-typeck.c (parser_build_unary_op): Adjust.
5382
5383 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
5384
5385 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5386 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5387 "VECTOR_LENGTH".
5388
5389 2017-05-23 Marek Polacek <polacek@redhat.com>
5390
5391 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5392 quotes.
5393
5394 2017-05-22 Jakub Jelinek <jakub@redhat.com>
5395
5396 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5397 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5398 it returned invariant. Call tree_invariant_p unconditionally
5399 afterwards to decide whether to return expr or op0.
5400
5401 2017-05-22 Nathan Sidwell <nathan@acm.org>
5402
5403 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5404
5405 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
5406
5407 * c-parser.c (c_parser_omp_clause_default): Handle
5408 "OMP_CLAUSE_DEFAULT_PRESENT".
5409
5410 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5411
5412 * config-lang.in (gtfiles): Add c-family/c-format.c.
5413
5414 2017-05-18 Nathan Sidwell <nathan@acm.org>
5415
5416 * c-decl.c (pushdecl_top_level): Delete unused function.
5417
5418 2017-05-18 Marek Polacek <polacek@redhat.com>
5419
5420 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5421 (check_earlier_gotos): Likewise.
5422 (define_label): Likewise.
5423 (pending_xref_error): Likewise.
5424 (smallest_type_quals_location): Likewise.
5425 (grokdeclarator): Likewise.
5426 (grokparms): Likewise.
5427 (identifier_global_value): Likewise.
5428 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5429 (find_init_member): Likewise.
5430
5431 2017-05-18 Marek Polacek <polacek@redhat.com>
5432
5433 * c-decl.c (start_decl): Use false/true instead of 0/1.
5434 (grokdeclarator): Likewise.
5435 (finish_struct): Likewise.
5436 (start_function): Change the return type to bool. Use false/true
5437 instead of 0/1.
5438 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5439 * c-tree.h (start_function): Update.
5440 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5441 (set_designator): Change the return type to bool. Use false/true
5442 instead of 0/1.
5443
5444 2017-05-17 Marek Polacek <polacek@redhat.com>
5445
5446 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5447 * c-typeck.c: Likewise.
5448
5449 2017-05-17 Marek Polacek <polacek@redhat.com>
5450
5451 PR sanitizer/80659
5452 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5453 DECL_IGNORED_P even for non-static compound literals.
5454
5455 2017-05-17 Martin Liska <mliska@suse.cz>
5456
5457 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5458 use it instead of int type.
5459
5460 2017-05-17 Marek Polacek <polacek@redhat.com>
5461
5462 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
5463 call c_fully_fold.
5464 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
5465 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
5466 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5467 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5468 save_expr.
5469 (c_parser_conditional_expression): Likewise.
5470 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5471 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5472 (process_init_element): Likewise.
5473 (build_binary_op): Likewise.
5474 (handle_omp_array_sections_1): Likewise.
5475
5476 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
5477
5478 * c-parser.c (c_parser_omp_clause_num_gangs)
5479 (c_parser_omp_clause_num_workers)
5480 (c_parser_omp_clause_vector_length): Merge functions into...
5481 (c_parser_oacc_single_int_clause): ... this new function. Adjust
5482 all users.
5483
5484 2017-05-11 Nathan Sidwell <nathan@acm.org>
5485
5486 * gimple-parser.c: Don't #include tree-dump.h.
5487
5488 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5489
5490 PR testsuite/80580
5491 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5492
5493 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5494
5495 PR testsuite/80580
5496 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5497 incorrect __MEM syntax.
5498
5499 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5500
5501 PR testsuite/80580
5502 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5503 type of unary '*'.
5504
5505 2017-05-09 Nathan Sidwell <nathan@acm.org>
5506
5507 * c-tree.h (pushdecl): Declare.
5508
5509 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5510
5511 * c-decl.c (warn_defaults_to): Replace report_diagnostic
5512 with diagnostic_report_diagnostic.
5513 * c-errors.c (pedwarn_c99): Likewise.
5514 (pedwarn_c90): Likewise.
5515
5516 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5517
5518 PR c++/80038
5519 * c-gimplify.c (c_gimplify_expr): Remove calls to
5520 cilk_gimplifY_call_params_in_spawned_fn.
5521
5522 2017-04-25 David Malcolm <dmalcolm@redhat.com>
5523
5524 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5525 hint for removing extra semicolon.
5526
5527 2017-04-21 Jakub Jelinek <jakub@redhat.com>
5528
5529 PR c/80468
5530 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5531 enabled, set specs->type to integer_type_node.
5532
5533 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5534
5535 * c-array-notation.c: Fix typo in comment.
5536
5537 2017-03-29 Marek Polacek <polacek@redhat.com>
5538
5539 PR c/79730
5540 * c-decl.c (finish_decl): Check VAR_P.
5541
5542 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5543
5544 PR middle-end/80162
5545 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5546 * c-typeck.c (c_mark_addressable): Likewise. Look through
5547 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5548 to ARRAY_TYPE.
5549 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5550
5551 2017-03-23 Marek Polacek <polacek@redhat.com>
5552
5553 * c-tree.h: Remove a C_RID_YYCODE reference.
5554
5555 2017-03-21 Jakub Jelinek <jakub@redhat.com>
5556
5557 PR c/80097
5558 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5559 optional COMPOUND_EXPR with ubsan instrumentation.
5560
5561 2017-03-17 Marek Polacek <polacek@redhat.com>
5562
5563 * c-parser.c: Add C11 references.
5564
5565 2017-03-15 Marek Polacek <polacek@redhat.com>
5566
5567 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5568
5569 2017-03-11 Marek Polacek <polacek@redhat.com>
5570
5571 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5572
5573 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5574
5575 PR translation/79848
5576 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5577 "%qs".
5578 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5579
5580 2017-03-09 Marek Polacek <polacek@redhat.com>
5581
5582 PR sanitizer/79757
5583 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5584 parameter declarations with initializers.
5585
5586 2017-03-09 Jakub Jelinek <jakub@redhat.com>
5587
5588 PR c/79969
5589 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5590 TYPE_STUB_DECL.
5591
5592 2017-03-07 Jakub Jelinek <jakub@redhat.com>
5593
5594 PR c/79834
5595 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5596 for "may only be used in compound statements" diagnostics, change it
5597 such that the same translatable string is used for all pragmas. For
5598 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5599 diagnostics.
5600 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5601 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5602 "may only be used in compound statements" diagnostics, such that the
5603 same translatable string is used for all pragmas.
5604
5605 2017-03-04 Marek Polacek <polacek@redhat.com>
5606
5607 PR c/79847
5608 * c-decl.c (implicit_decl_warning): Add missing space.
5609
5610 2017-03-03 Marek Polacek <polacek@redhat.com>
5611
5612 PR c/79758
5613 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5614 current_function_prototype_arg_types is error_mark_node. Fix
5615 formatting. Use TREE_VALUE instead of TREE_TYPE.
5616
5617 2017-03-03 Jakub Jelinek <jakub@redhat.com>
5618
5619 PR c/79837
5620 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5621 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5622 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5623 diagnostics.
5624
5625 PR c/79836
5626 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5627 instead of %<_Generic>.
5628 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5629 (c_parser_omp_target_exit_data): Use %<release%> instead of
5630 %<release>.
5631
5632 2017-02-28 Jakub Jelinek <jakub@redhat.com>
5633
5634 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5635 instead of just cond ? "..." : "...".
5636 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5637 for "enter"/"exit" keyword.
5638 (c_finish_oacc_routine): Don't use %s to supply portions of the
5639 message.
5640
5641 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5642
5643 PR c++/79588
5644 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5645 handle -Wrestrict here.
5646 * c-typeck.c (build_function_call_vec): Adjust
5647 check_function_arguments caller.
5648
5649 2017-02-23 Richard Biener <rguenther@suse.de>
5650
5651 PR c/79684
5652 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5653 to initialize c_exprs to return.
5654 (c_parser_gimple_binary_expression): Likewise.
5655 (c_parser_gimple_unary_expression): Likewise.
5656 (c_parser_gimple_postfix_expression): Likewise.
5657
5658 2017-02-22 Marek Polacek <polacek@redhat.com>
5659
5660 PR c/79662
5661 * c-typeck.c (convert_arguments): Handle error_mark_node.
5662
5663 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5664
5665 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5666 value of c_parser_parse_ssa_name against error_mark_node and emit
5667 error if ssa name is anonymous and written as default definition.
5668
5669 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5670
5671 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5672 FMA_EXPR.
5673
5674 2017-02-16 Jakub Jelinek <jakub@redhat.com>
5675
5676 PR c++/79512
5677 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5678 ignore #pragma omp target even when not followed by identifier.
5679
5680 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5681
5682 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5683 (c_parser_gimple_unary_expression): Likewise.
5684
5685 2017-02-13 Jakub Jelinek <jakub@redhat.com>
5686
5687 * c-parser.c (c_parser_oacc_declare): Add missing space in
5688 diagnostics.
5689
5690 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5691
5692 PR c/79478
5693 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5694 set_c_expr_source_range when parsing ssa-name.
5695
5696 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
5697 Richard Biener <rguenther@suse.de>
5698
5699 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5700 building IL when arguments are error_mark_node.
5701 (c_parser_gimple_unary_expression): Likewise.
5702 (c_parser_gimple_if_stmt): Likewise.
5703 (c_parser_gimple_switch_stmt): Likewise.
5704 (c_parser_gimple_return_stmt): Likewise.
5705 (c_parser_parse_ssa_name): When name lookup fails do not build
5706 an SSA name. Use undeclared rather than not declared in error
5707 reporting.
5708
5709 2017-02-09 Marek Polacek <polacek@redhat.com>
5710
5711 PR c/79428
5712 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5713 instead of c_parser_skip_until_found.
5714
5715 2017-02-09 Jakub Jelinek <jakub@redhat.com>
5716
5717 PR c/79431
5718 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5719 symtab_node::get on automatic variables.
5720
5721 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5722 Chung-Lin Tang <cltang@codesourcery.com>
5723
5724 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5725 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5726 semantic checking.
5727 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5728
5729 2017-02-07 Richard Biener <rguenther@suse.de>
5730
5731 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5732 (c_parser_gimple_postfix_expression_after_primary):
5733 Do not use c_build_function_call_vec to avoid folding and promotion.
5734 Simplify.
5735
5736 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5737
5738 PR lto/79061
5739 * c-decl.c (pop_scope): Pass main_input_filename to
5740 build_translation_unit_decl.
5741
5742 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5743
5744 * c-parser.c: Include "read-rtl-function.h" and
5745 "run-rtl-passes.h".
5746 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5747 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5748 production. Update for renaming of field "gimple_pass" to
5749 "gimple_or_rtl_pass". If __RTL was seen, call
5750 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5751 to an auto_timevar, to cope with early exit.
5752 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5753 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5754 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5755 Handle RID_RTL.
5756 (c_parser_parse_rtl_body): New function.
5757 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5758 (struct c_declspecs): Rename field "gimple_pass" to
5759 "gimple_or_rtl_pass". Add field "rtl_p".
5760 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5761 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5762 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5763 (c_parser_gimple_or_rtl_pass_list): ...this.
5764
5765 2017-01-20 Marek Polacek <polacek@redhat.com>
5766
5767 PR c/64279
5768 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5769
5770 2017-01-13 Richard Biener <rguenther@suse.de>
5771
5772 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5773 nops.
5774
5775 2017-01-13 Richard Biener <rguenther@suse.de>
5776
5777 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5778 _Literal ( type-name ) number.
5779
5780 2017-01-12 Richard Biener <rguenther@suse.de>
5781
5782 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5783 __MEM.
5784
5785 2017-01-11 Jakub Jelinek <jakub@redhat.com>
5786
5787 PR c++/72813
5788 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5789 PCH file.
5790
5791 2017-01-11 Richard Biener <rguenther@suse.de>
5792
5793 PR bootstrap/79052
5794 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5795 returns on parse errors.
5796
5797 2017-01-04 Marek Polacek <polacek@redhat.com>
5798
5799 PR c++/64767
5800 * c-parser.c (c_parser_postfix_expression): Mark zero character
5801 constants by setting original_type in c_expr.
5802 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5803 with a zero character constant.
5804 (char_type_p): New function.
5805
5806 2017-01-04 David Malcolm <dmalcolm@redhat.com>
5807
5808 * c-parser.c (c_parser_declaration_or_fndef): Create a
5809 rich_location at init_loc and parse it to start_init.
5810 (last_init_list_comma): New global.
5811 (c_parser_braced_init): Update last_init_list_comma when parsing
5812 commas. Pass it to pop_init_level. Pass location of closing
5813 brace to pop_init_level.
5814 (c_parser_postfix_expression_after_paren_type): Create a
5815 rich_location at type_loc and parse it to start_init.
5816 (c_parser_omp_declare_reduction): Likewise for loc.
5817 * c-tree.h (start_init): Add rich_location * param.
5818 (pop_init_level): Add location_t param.
5819 * c-typeck.c (struct initializer_stack): Add field
5820 "missing_brace_richloc".
5821 (start_init): Add richloc param, use it to initialize
5822 the stack node's missing_brace_richloc.
5823 (last_init_list_comma): New decl.
5824 (finish_implicit_inits): Pass last_init_list_comma to
5825 pop_init_level.
5826 (push_init_level): When finding missing open braces, add fix-it
5827 hints to the richloc.
5828 (pop_init_level): Add "insert_before" param and pass it
5829 when calling pop_init_level. Add fixits about missing
5830 close braces to any richloc. Use the richloc for the
5831 -Wmissing-braces warning.
5832 (set_designator): Pass last_init_list_comma to pop_init_level.
5833 (process_init_element): Likewise.
5834
5835 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5836
5837 Update copyright years.
5838
5839 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5840
5841 PR bootstrap/78817
5842 * c-typeck.c (build_function_call_vec): If check_function_arguments
5843 returns true, set TREE_NO_WARNING on CALL_EXPR.
5844
5845 PR c/77767
5846 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5847 to *expr instead of overwriting it.
5848
5849 2016-12-20 Richard Biener <rguenther@suse.de>
5850
5851 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5852 error recovery.
5853 (c_parser_gimple_statement): Only build assigns for non-error
5854 stmts.
5855 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5856
5857 2016-12-14 Martin Jambor <mjambor@suse.cz>
5858
5859 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5860 omp-low.h.
5861 (c_finish_oacc_routine): Adjusted call to
5862 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5863 to use their new names.
5864 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5865 use its new name.
5866 (c_parser_oacc_update): Likewise.
5867 (c_parser_omp_simd): Likewise.
5868 (c_parser_omp_target_update): Likewise.
5869 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5870 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5871 name.
5872 (c_finish_omp_cancellation_point): Likewise.
5873 * gimple-parser.c: Do not include omp-low.h
5874
5875 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5876 James Norris <jnorris@codesourcery.com>
5877
5878 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5879 EXIT_DATA,WAIT} are not used in compound statements.
5880 (c_parser_oacc_enter_exit_data): Update diagnostics.
5881
5882 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5883
5884 PR c++/71973
5885 * c-decl.c (diagnose_mismatched_decls): Use
5886 OPT_Wbuiltin_declaration_mismatch here too.
5887
5888 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
5889 Alan Hayward <alan.hayward@arm.com>
5890 David Sherwood <david.sherwood@arm.com>
5891
5892 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5893 (make_label, finish_struct): Likewise.
5894
5895 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5896 Richard Biener <rguenther@suse.de>
5897
5898 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5899 * config-lang.in (gtfiles): Add c/c-parser.h.
5900 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5901 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5902 * c-parser.c (enum c_id_kind, struct c_token,
5903 c_parser_next_token_is, c_parser_next_token_is_not,
5904 c_parser_next_token_is_keyword,
5905 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5906 Split out to ...
5907 * c-parser.h: ... new header.
5908 * c-parser.c: Include c-parser.h and gimple-parser.h.
5909 (c_parser_peek_token, c_parser_peek_2nd_token,
5910 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5911 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5912 c_parser_error, c_parser_require, c_parser_skip_until_found,
5913 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5914 c_parser_type_name): Export.
5915 (c_parser_tokens_buf): New function.
5916 (c_parser_error): Likewise.
5917 (c_parser_set_error): Likewise.
5918 (c_parser_declspecs): Handle RID_GIMPLE.
5919 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5920 via c_parser_parse_gimple_body.
5921 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5922 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5923 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5924 c_parser_error, c_parser_require, c_parser_skip_until_found,
5925 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5926 c_parser_type_name): Declare.
5927 (struct c_parser): Declare forward.
5928 (c_parser_tokens_buf): Declare.
5929 (c_parser_error): Likewise.
5930 (c_parser_set_error): Likewise.
5931 * gimple-parser.c: New file.
5932 * gimple-parser.h: Likewise.
5933
5934 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5935
5936 PR c/35503
5937 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5938 warn_for_restrict.
5939
5940 2016-09-11 Le-Chun Wu <lcwu@google.com>
5941 Mark Wielaard <mjw@redhat.com>
5942
5943 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5944 to the given -Wshadow= variant.
5945
5946 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5947
5948 * c-typeck.c: Include memmodel.h.
5949
5950 2016-10-13 Jakub Jelinek <jakub@redhat.com>
5951
5952 PR target/77957
5953 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5954 instead of lhd_return_null_tree_v.
5955
5956 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5957
5958 PR c++/69733
5959 * c-decl.c (smallest_type_quals_location): New static function.
5960 (grokdeclarator): Try to find the correct location for an ignored
5961 qualifier.
5962
5963 2016-09-26 Marek Polacek <polacek@redhat.com>
5964
5965 PR c/7652
5966 * c-decl.c (pop_scope): Add gcc_fallthrough.
5967
5968 2016-09-26 Marek Polacek <polacek@redhat.com>
5969
5970 PR c/7652
5971 * c-parser.c (struct c_token): Add flags field.
5972 (c_lex_one_token): Pass it to c_lex_with_flags.
5973 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5974 into IFN_FALLTHROUGH.
5975 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5976 attribute fallthrough after a case label or default label.
5977 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5978
5979 2016-09-24 Marek Polacek <polacek@redhat.com>
5980
5981 PR c/77490
5982 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5983 have boolean value. Warn about ++/-- on booleans.
5984
5985 2016-09-23 Jakub Jelinek <jakub@redhat.com>
5986
5987 * c-parser.c (incomplete_record_decls): Remove unnecessary
5988 = vNULL initialization of file scope vec.
5989
5990 2016-09-16 Marek Polacek <polacek@redhat.com>
5991
5992 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5993
5994 2016-09-14 Marek Polacek <polacek@redhat.com>
5995
5996 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5997 (fix_array_notation_expr): Likewise.
5998 * c-decl.c (finish_decl): Likewise.
5999 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6000 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
6001 (function_to_pointer_conversion): Use false instead of 0.
6002 (convert_lvalue_to_rvalue): Likewise.
6003 (parser_build_unary_op): Likewise.
6004 (build_atomic_assign): Likewise.
6005 (build_unary_op): Change nonconvert parameter type to bool, use
6006 true/false instead of 1/0.
6007 (build_binary_op): Use true instead of 1.
6008
6009 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6010
6011 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
6012 of add_fixit_insert to add_fixit_insert_before.
6013
6014 2016-09-13 Marek Polacek <polacek@redhat.com>
6015
6016 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
6017 it.
6018
6019 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6020
6021 PR c++/77496
6022 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
6023 COMPOUND_EXPR to warn_for_omitted_condop.
6024
6025 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6026
6027 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
6028 c_get_substring_location for this new langhook.
6029
6030 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6031
6032 PR c/65467
6033 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
6034 flag_openmp.
6035 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
6036 instead of mark_exp_read on low_bound/length expression.
6037 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
6038 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6039 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6040 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
6041 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
6042 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
6043 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
6044 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
6045 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
6046 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
6047 instead of mark_expr_read.
6048 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
6049 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
6050 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
6051 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
6052 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
6053 array section bases outside of depend clause, for depend clause
6054 use convert_lvalue_to_rvalue on the base.
6055 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
6056 linear, aligned, map, to and from clauses.
6057 (c_omp_clause_copy_ctor): New function.
6058
6059 2016-09-01 Marek Polacek <polacek@redhat.com>
6060
6061 PR c/7652
6062 * c-typeck.c (composite_type): Add FALLTHRU comment.
6063
6064 2016-08-31 David Malcolm <dmalcolm@redhat.com>
6065
6066 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
6067 to the insertion fixits for "struct", "union", and "enum".
6068
6069 2016-08-30 David Malcolm <dmalcolm@redhat.com>
6070
6071 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
6072 rather than add_fixit_misspelled_id.
6073 (undeclared_variable): Likewise.
6074 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
6075 now-redundant "here" params from add_fixit_insert method calls.
6076 (c_parser_parameter_declaration): Likewise.
6077 * c-typeck.c (build_component_ref): Remove now-redundant range
6078 param from add_fixit_replace method calls.
6079
6080 2016-08-25 Marek Polacek <polacek@redhat.com>
6081
6082 * c-typeck.c (parser_build_binary_op): Pass LHS to
6083 warn_logical_not_parentheses.
6084
6085 2016-08-25 Marek Polacek <polacek@redhat.com>
6086
6087 PR c/77323
6088 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
6089 or _FloatN or _FloatNx is not supported.
6090 (finish_declspecs): Set type to integer_type_node when _FloatN or
6091 _FloatNx is not supported.
6092
6093 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6094
6095 PR c/32187
6096 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
6097 (struct c_declspecs): Add field floatn_nx_idx.
6098 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
6099 and _FloatNx type specifiers.
6100 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
6101 (c_parser_declspecs, c_parser_attribute_any_word)
6102 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
6103 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
6104 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
6105 narrower than double.
6106
6107 2016-08-12 Jakub Jelinek <jakub@redhat.com>
6108 Martin Liska <mliska@suse.cz>
6109
6110 PR c/67410
6111 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
6112 % to determine val element to change. Assert that
6113 wchar_bytes * charwidth fits into val array.
6114
6115 2016-08-12 Marek Polacek <polacek@redhat.com>
6116
6117 PR c/7652
6118 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
6119 (c_parser_postfix_expression): Likewise.
6120 * c-typeck.c (build_unary_op): Adjust fall through comment.
6121 (c_mark_addressable): Likewise.
6122
6123 2016-08-11 Jakub Jelinek <jakub@redhat.com>
6124
6125 PR c/72816
6126 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
6127 array member through typedef, for orig_qual_indirect == 0 clear
6128 orig_qual_type.
6129
6130 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6131
6132 PR c/64955
6133 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
6134 this up to selftest::run_c_tests.
6135 (selftest::run_c_tests): New function.
6136
6137 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
6138
6139 * c-parser.c (struct oacc_routine_data): Add error_seen and
6140 fndecl_seen members.
6141 (c_finish_oacc_routine): Use these.
6142 (c_parser_declaration_or_fndef): Adjust.
6143 (c_parser_oacc_routine): Likewise. Support more C language
6144 constructs, and improve diagnostics. Move pragma context
6145 checking...
6146 (c_parser_pragma): ... here.
6147
6148 * c-parser.c (struct oacc_routine_data): New.
6149 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
6150 Simplify code.
6151 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
6152 declare target" attribute.
6153
6154 2016-08-01 Jan Beulich <jbeulich@suse.com>
6155
6156 * c-fold.c (c_fully_fold_internal): Also emit shift count
6157 warnings for vector types.
6158 * c-typeck.c (build_binary_op): Likewise.
6159
6160 2016-07-29 Marek Polacek <polacek@redhat.com>
6161
6162 PR c/71742
6163 * c-decl.c (finish_struct): Rephrase an error message.
6164
6165 PR c/71853
6166 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
6167 to error node for invalid code.
6168
6169 PR c/71573
6170 * c-decl.c (implicitly_declare): Return decl early not only for
6171 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
6172
6173 2016-07-29 Jakub Jelinek <jakub@redhat.com>
6174
6175 PR c/71969
6176 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
6177 on GNU extern inline functions.
6178
6179 2016-07-29 Marek Polacek <polacek@redhat.com>
6180
6181 PR c/71583
6182 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
6183 check expr.value.
6184
6185 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6186
6187 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
6188
6189 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6190
6191 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
6192 spellcheck-tree.h
6193 (best_macro_match): Likewise, converting from a typedef to a
6194 subclass.
6195 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
6196 (lookup_name_fuzzy): Update for change of best_macro_match to a
6197 subclass with a ctor that calls cpp_forall_identifiers.
6198
6199 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6200
6201 * c-decl.c (implicit_decl_warning): Update for conversion of
6202 return type of lookup_name_fuzzy to const char *.
6203 (undeclared_variable): Likewise.
6204 (lookup_name_fuzzy): Convert return type from tree to
6205 const char *.
6206 * c-parser.c (c_parser_declaration_or_fndef): Update for
6207 conversion of return type of lookup_name_fuzzy to const char *.
6208 (c_parser_parameter_declaration): Likewise.
6209
6210 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
6211
6212 * c-parser.c (c_parser_oacc_declare): Don't scan for
6213 GOMP_MAP_POINTER.
6214 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
6215 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
6216 zero-length subarrays.
6217
6218 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6219
6220 PR c/71858
6221 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
6222 instead of FUZZY_LOOKUP_NAME.
6223 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
6224 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
6225
6226 2016-07-14 Jakub Jelinek <jakub@redhat.com>
6227
6228 PR c/71858
6229 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
6230
6231 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6232
6233 * c-parser.c (c_parser_generic_selection): Make type of variable
6234 auto_vec.
6235 (c_parser_omp_declare_simd): Likewise.
6236
6237 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6238
6239 * c-decl.c (struct c_struct_parse_info): Change member types
6240 from vec to auto_vec.
6241 (start_struct): Adjust.
6242 (finish_struct): Likewise.
6243
6244 2016-07-02 Jakub Jelinek <jakub@redhat.com>
6245
6246 PR c/71719
6247 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
6248
6249 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6250
6251 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
6252 Move pragma context checking into...
6253 (c_parser_omp_cancellation_point): ... here, and improve
6254 diagnostic messages.
6255 * c-typeck.c (c_finish_omp_cancel)
6256 (c_finish_omp_cancellation_point): Improve diagnostic messages.
6257
6258 2016-06-29 Jakub Jelinek <jakub@redhat.com>
6259
6260 PR c/71685
6261 * c-typeck.c (c_build_qualified_type): Don't clear
6262 C_TYPE_INCOMPLETE_VARS for the main variant.
6263
6264 2016-06-28 Martin Sebor <msebor@redhat.com>
6265
6266 PR c/71552
6267 * c-typeck.c (output_init_element): Diagnose incompatible types
6268 before non-constant initializers.
6269
6270 2016-06-28 Jakub Jelinek <jakub@redhat.com>
6271
6272 * Make-lang.in: Don't cat ../stage_current if it does not exist.
6273
6274 2016-06-23 Andi Kleen <ak@linux.intel.com>
6275
6276 * Make-lang.in: Add support for autofdo.
6277
6278 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6279
6280 PR c/70339
6281 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6282 (implicit_decl_warning): When issuing warnings for implicit
6283 declarations, attempt to provide a suggestion via
6284 lookup_name_fuzzy.
6285 (undeclared_variable): Likewise when issuing errors.
6286 (lookup_name_in_scope): Likewise.
6287 (struct edit_distance_traits<cpp_hashnode *>): New struct.
6288 (best_macro_match): New typedef.
6289 (find_closest_macro_cpp_cb): New function.
6290 (lookup_name_fuzzy): New function.
6291 * c-parser.c: Include gcc-rich-location.h.
6292 (c_token_starts_typename): Split out case CPP_KEYWORD into...
6293 (c_keyword_starts_typename): ...this new function.
6294 (c_parser_declaration_or_fndef): When issuing errors about
6295 missing "struct" etc, add a fixit. For other kinds of errors,
6296 attempt to provide a suggestion via lookup_name_fuzzy.
6297 (c_parser_parms_declarator): When looking ahead to detect typos in
6298 type names, also reject CPP_KEYWORD.
6299 (c_parser_parameter_declaration): When issuing errors about
6300 unknown type names, attempt to provide a suggestion via
6301 lookup_name_fuzzy.
6302 * c-tree.h (c_keyword_starts_typename): New prototype.
6303
6304 2016-06-20 Joseph Myers <joseph@codesourcery.com>
6305
6306 PR c/71601
6307 * c-typeck.c (build_conditional_expr): Return error_mark_node if
6308 c_common_type returns error_mark_node.
6309
6310 2016-06-19 Martin Sebor <msebor@redhat.com>
6311
6312 PR c/69507
6313 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6314 __alignof__ (expression).
6315
6316 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6317
6318 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6319
6320 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6321
6322 * c-typeck.c (build_component_ref): Simplify fixit code by
6323 using gcc_rich_location::add_fixit_misspelled_id.
6324 (set_init_label): Likewise.
6325
6326 2016-06-13 David Malcolm <dmalcolm@redhat.com>
6327
6328 * c-parser.c (c_parser_initelt): Provide location of name for new
6329 location_t param of set_init_label.
6330 * c-tree.h (set_init_label): Add location_t param.
6331 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6332 param and use it when issuing error messages about unrecognized
6333 field names. Attempt to provide a fixit hint if appropriate,
6334 otherwise update the error message to provide the type name.
6335
6336 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
6337
6338 PR c/71381
6339 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6340 Loosen checking.
6341
6342 2016-06-08 Martin Sebor <msebor@redhat.com>
6343 Jakub Jelinek <jakub@redhat.com>
6344
6345 PR c++/70507
6346 PR c/68120
6347 * c-typeck.c (convert_arguments): Don't promote last argument
6348 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6349
6350 2016-06-08 Marek Polacek <polacek@redhat.com>
6351
6352 PR c/71418
6353 * c-decl.c (grokdeclarator): Check TYPE_P.
6354
6355 PR c/71426
6356 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6357 code.
6358
6359 2016-06-07 David Malcolm <dmalcolm@redhat.com>
6360
6361 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6362 and structure element reference, capture the location of the
6363 element name token and pass it to build_component_ref.
6364 (c_parser_postfix_expression_after_primary): Likewise for
6365 structure element dereference.
6366 (c_parser_omp_variable_list): Likewise for
6367 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6368 * c-tree.h (build_component_ref): Add location_t param.
6369 * c-typeck.c (build_component_ref): Add location_t param
6370 COMPONENT_LOC. Use it, if available, when issuing hints about
6371 mispelled member names to provide a fixit replacement hint.
6372
6373 2016-06-06 Marek Polacek <polacek@redhat.com>
6374
6375 PR c/71362
6376 * c-parser.c (c_parser_direct_declarator): Set location.
6377
6378 2016-06-06 Marek Polacek <polacek@redhat.com>
6379
6380 * c-typeck.c (comptypes_internal): Handle comparisons of
6381 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
6382 TYPE_REF_CAN_ALIAS_ALL.
6383
6384 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
6385
6386 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6387 arguments as addressable when async clause exists.
6388
6389 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6390
6391 PR c++/71349
6392 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6393 when combined with target construct.
6394
6395 2016-05-26 Jakub Jelinek <jakub@redhat.com>
6396
6397 * c-parser.c (c_parser_omp_clause_schedule): Warn if
6398 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6399
6400 2016-05-25 Marek Polacek <polacek@redhat.com>
6401
6402 PR c/71265
6403 * c-decl.c (c_make_fname_decl): Don't check seen_error.
6404
6405 PR c/71266
6406 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6407
6408 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
6409
6410 * c-parser.c (c_parser_oacc_declare): Add support for
6411 GOMP_MAP_FIRSTPRIVATE_POINTER.
6412 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6413 argument with enum c_omp_region_type ort.
6414 (handle_omp_array_sections): Likewise. Update call to
6415 handle_omp_array_sections_1.
6416 (c_finish_omp_clauses): Add specific errors and warning messages for
6417 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
6418 call to handle_omp_array_sections.
6419
6420 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
6421
6422 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6423
6424 2016-05-24 Richard Biener <rguenther@suse.de>
6425
6426 PR middle-end/70434
6427 PR c/69504
6428 * c-typeck.c (build_array_ref): Do not complain about indexing
6429 non-lvalue vectors. Adjust for function name change.
6430
6431 2016-05-20 Martin Sebor <msebor@redhat.com>
6432
6433 PR c/71115
6434 * c-typeck.c (error_init): Use
6435 expansion_point_location_if_in_system_header.
6436 (warning_init): Same.
6437
6438 2016-05-19 David Malcolm <dmalcolm@redhat.com>
6439
6440 PR c/71171
6441 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6442 in error-handling.
6443 (c_parser_postfix_expression): Likewise.
6444 * c-tree.h (c_expr::set_error): New method.
6445 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6446 that result's range is initialized.
6447
6448 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6449
6450 * c-typeck.c (parser_build_unary_op): Fix formatting.
6451
6452 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
6453
6454 * c-decl.c (grokdeclarator): Remove errmsg and use of
6455 targetm.invalid_return_type.
6456 (grokparms): Remove errmsg and use of
6457 targetm.invalid_parameter_type.
6458
6459 2016-05-13 Joseph Myers <joseph@codesourcery.com>
6460
6461 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6462 function return type.
6463
6464 2016-05-12 Marek Polacek <polacek@redhat.com>
6465
6466 PR c/70756
6467 * c-decl.c (build_compound_literal): Pass LOC down to
6468 c_incomplete_type_error.
6469 * c-tree.h (require_complete_type): Adjust declaration.
6470 (c_incomplete_type_error): Likewise.
6471 * c-typeck.c (require_complete_type): Add location parameter, pass it
6472 down to c_incomplete_type_error.
6473 (c_incomplete_type_error): Add location parameter, pass it down to
6474 error_at.
6475 (build_component_ref): Pass location down to c_incomplete_type_error.
6476 (default_conversion): Pass location down to require_complete_type.
6477 (build_array_ref): Likewise.
6478 (build_function_call_vec): Likewise.
6479 (convert_arguments): Likewise.
6480 (build_unary_op): Likewise.
6481 (build_c_cast): Likewise.
6482 (build_modify_expr): Likewise.
6483 (convert_for_assignment): Likewise.
6484 (c_finish_omp_clauses): Likewise.
6485
6486 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6487
6488 PR c/43651
6489 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6490 is enabled.
6491 * c-errors.c (pedwarn_c90): Return true if warned.
6492 * c-tree.h (pedwarn_c90): Change return type to bool.
6493 (enum c_declspec_word): Add new enumerator cdw_atomic.
6494
6495 2016-05-11 Marek Polacek <polacek@redhat.com>
6496
6497 PR c++/71024
6498 * c-decl.c (diagnose_mismatched_decls): Factor out code to
6499 diagnose_mismatched_attributes and call it.
6500
6501 2016-05-10 Marek Polacek <polacek@redhat.com>
6502
6503 PR c/70255
6504 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6505 on a declaration following the definition.
6506
6507 2016-05-05 Jakub Jelinek <jakub@redhat.com>
6508
6509 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6510 parse it through to c_parser_c99_block_statement.
6511 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6512 caller.
6513
6514 2016-05-04 Marek Polacek <polacek@redhat.com>
6515
6516 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6517 OPT_Wdangling_else.
6518
6519 2016-05-04 Marek Polacek <polacek@redhat.com>
6520
6521 PR c/48778
6522 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6523 for macro expansions.
6524
6525 2016-05-03 Marek Polacek <polacek@redhat.com>
6526
6527 PR c/70859
6528 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6529 check_builtin_function_arguments.
6530
6531 2016-05-03 Richard Biener <rguenther@suse.de>
6532
6533 * Make-lang.in (cc1-checksum.c): For stage-final re-use
6534 the checksum from the previous stage.
6535
6536 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6537
6538 * c-parser.c (c_parser_oacc_all_clauses): Update call to
6539 c_finish_omp_clauses.
6540 (c_parser_omp_all_clauses): Likewise.
6541 (c_parser_oacc_cache): Likewise.
6542 (c_parser_oacc_loop): Likewise.
6543 (omp_split_clauses): Likewise.
6544 (c_parser_omp_declare_target): Likewise.
6545 (c_parser_cilk_all_clauses): Likewise.
6546 (c_parser_cilk_for): Likewise.
6547 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6548 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6549
6550 2016-05-02 Marek Polacek <polacek@redhat.com>
6551
6552 PR c/70851
6553 * c-decl.c (grokdeclarator): Diagnose when array's size has an
6554 incomplete type.
6555
6556 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6557
6558 PR middle-end/70626
6559 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6560 OACC_LOOP_CLAUSE_MASK.
6561 (c_parser_oacc_kernels_parallel): Update call to
6562 c_oacc_split_loop_clauses.
6563
6564 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
6565
6566 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6567 argument to build_modify_expr in two cases.
6568
6569 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6570
6571 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6572 warn_for_memset instead of warning directly here.
6573
6574 2016-04-26 Marek Polacek <polacek@redhat.com>
6575
6576 PR c/67784
6577 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6578 out of ...
6579 (c_parser_for_statement): ... here.
6580 (c_parser_if_statement): Use it.
6581 (c_parser_switch_statement): Use it.
6582 (c_parser_while_statement): Use it.
6583
6584 PR c/70791
6585 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6586
6587 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6588
6589 PR c++/69363
6590 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6591 instead of c_finish_cilk_clauses.
6592 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6593 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6594 floating-point variables in the linear clause for Cilk Plus.
6595
6596 2016-04-18 Michael Matz <matz@suse.de>
6597
6598 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6599 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6600
6601 2016-04-15 Marek Polacek <polacek@redhat.com>
6602
6603 PR c/70671
6604 * c-typeck.c (build_unary_op): Pass location down to error and
6605 warning call.
6606
6607 2016-04-15 Jakub Jelinek <jakub@redhat.com>
6608
6609 PR c/70436
6610 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6611 where needed.
6612 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6613 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6614 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6615 Adjust c_parser_pragma callers.
6616 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6617 caller.
6618 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6619 c_parser_statement.
6620 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6621 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6622 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6623 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6624 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6625 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6626 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6627 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6628 down where needed.
6629 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6630 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6631 calls.
6632
6633 2016-04-13 Marek Polacek <polacek@redhat.com>
6634
6635 PR c/70436
6636 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6637 adjust callers.
6638 (c_parser_statement): Likewise.
6639 (c_parser_c99_block_statement): Likewise.
6640 (c_parser_while_statement): Likewise.
6641 (c_parser_for_statement): Likewise.
6642 (c_parser_if_body): Don't set IF_P here.
6643 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6644 about dangling else here.
6645 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6646 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6647 warn about dangling else here.
6648
6649 2016-04-04 Marek Polacek <polacek@redhat.com>
6650
6651 PR c/70307
6652 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6653
6654 2016-03-31 Marek Polacek <polacek@redhat.com>
6655
6656 PR c/70297
6657 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6658
6659 2016-03-18 David Malcolm <dmalcolm@redhat.com>
6660
6661 PR c/70281
6662 * c-parser.c (c_parser_postfix_expression): Set the source range
6663 for uses of "__builtin_types_compatible_p".
6664
6665 2016-03-17 Jakub Jelinek <jakub@redhat.com>
6666
6667 PR c/70280
6668 * c-typeck.c (composite_type): Don't count void_list_node
6669 into len, if the list is terminated by void_list_node, start
6670 with void_list_node instead of NULL for newargs. Stop
6671 at void_list_node.
6672
6673 2016-03-16 Marek Polacek <polacek@redhat.com>
6674
6675 PR c/70093
6676 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6677 nested functions returning VM types.
6678
6679 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6680
6681 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6682 when calling c_finish_omp_clauses.
6683
6684 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6685
6686 PR c/69824
6687 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6688 for later.
6689
6690 2016-03-04 Marek Polacek <polacek@redhat.com>
6691
6692 PR c/69798
6693 * c-parser.c (c_parser_postfix_expression): Call
6694 c_parser_cast_expression rather than c_parser_postfix_expression.
6695
6696 2016-03-01 Jakub Jelinek <jakub@redhat.com>
6697
6698 PR c/69796
6699 PR c/69974
6700 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6701 of incomplete decls to error_mark_node.
6702
6703 2016-02-24 Marek Polacek <polacek@redhat.com>
6704
6705 PR c/69819
6706 * c-decl.c (finish_decl): Don't update the copy of the type of a
6707 different decl type.
6708
6709 2016-02-23 Jakub Jelinek <jakub@redhat.com>
6710
6711 PR objc/69844
6712 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6713 in id_kind reclassification.
6714
6715 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6716
6717 PR c/69835
6718 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6719
6720 2016-02-16 James Norris <jnorris@codesourcery.com>
6721
6722 PR c/64748
6723 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6724
6725 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6726
6727 * c-decl.c (build_null_declspecs): Zero the entire struct.
6728
6729 PR c/69522
6730 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6731 callers changed. If nested_p is true, use it to call
6732 finish_implicit_inits.
6733 * c-tree.h (finish_implicit_inits): Declare.
6734 * c-typeck.c (finish_implicit_inits): New function. Move code
6735 from ...
6736 (push_init_level): ... here.
6737 (set_designator, process_init_element): Call finish_implicit_inits.
6738
6739 2016-02-11 Jakub Jelinek <jakub@redhat.com>
6740
6741 PR c/69768
6742 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6743 arguments for -Waddress warning.
6744
6745 2016-02-04 Jakub Jelinek <jakub@redhat.com>
6746
6747 PR c/69669
6748 * c-decl.c (finish_enum): When honoring mode attribute,
6749 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6750
6751 2016-01-29 Jakub Jelinek <jakub@redhat.com>
6752
6753 PR debug/69518
6754 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6755 all type variants, not just TYPE_MAIN_VARIANT.
6756
6757 2016-01-27 Jakub Jelinek <jakub@redhat.com>
6758
6759 PR debug/66869
6760 * c-decl.c (c_write_global_declarations_1): Warn with
6761 warn_unused_function if static prototype without definition
6762 is not C_DECL_USED.
6763
6764 2016-01-27 Marek Polacek <polacek@redhat.com>
6765
6766 PR c/68062
6767 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6768 to unsigned, if needed. Add -Wsign-compare warning.
6769
6770 2016-01-26 Jakub Jelinek <jakub@redhat.com>
6771
6772 PR tree-optimization/69483
6773 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6774
6775 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6776
6777 PR c/24293
6778 * c-tree.h (incomplete_record_decls): Declare.
6779 * c-parser.c (incomplete_record_decls): Define.
6780 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6781 report error if any decl has zero size.
6782 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6783 or enum type to incomplete_record_decls.
6784
6785 2016-01-14 Tom de Vries <tom@codesourcery.com>
6786
6787 PR tree-optimization/68773
6788 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6789 set force_output.
6790
6791 2016-01-14 Marek Polacek <polacek@redhat.com>
6792
6793 PR c/69262
6794 * c-decl.c (grokdeclarator): Provide more information for invalid
6795 array declarations.
6796
6797 2016-01-06 David Malcolm <dmalcolm@redhat.com>
6798
6799 * c-parser.c (c_parser_unary_expression): For dereferences, build
6800 a combined location before calling build_indirect_ref, so that
6801 error reports cover the full range, manually updating the c_expr
6802 src_range.
6803
6804 2016-01-06 Marek Polacek <polacek@redhat.com>
6805
6806 PR sanitizer/69099
6807 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6808 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6809 NULL.
6810
6811 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6812
6813 Update copyright years.
6814
6815 2016-01-04 Marek Polacek <polacek@redhat.com>
6816
6817 PR c/68908
6818 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6819 optimization to use __atomic_fetch_* built-in if possible.
6820
6821 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6822
6823 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6824 into...
6825 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6826 all users.
6827
6828 2015-12-22 Marek Polacek <polacek@redhat.com>
6829
6830 PR c/69002
6831 * c-typeck.c (build_component_ref): Warn when acessing elements of
6832 atomic structures or unions.
6833
6834 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6835
6836 * c-typeck.c: Include "gcc-rich-location.h".
6837 (build_binary_op): In the two places that call binary_op_error,
6838 create a gcc_rich_location and populate it with the location of
6839 the binary op and its two operands.
6840
6841 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6842
6843 * c-parser.c (c_parser_statement_after_labels): When calling
6844 c_finish_return, Use the return expression's location if it has
6845 one, falling back to the location of the first token within it.
6846 * c-typeck.c (c_finish_return): When issuing warnings about
6847 the incorrect presence/absence of a return value, issue a note
6848 showing the declaration of the function.
6849
6850 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6851
6852 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6853 to 4.
6854 (c_parser_peek_nth_token): New function.
6855 (c_parser_peek_conflict_marker): New function.
6856 (c_parser_error): Detect conflict markers and report them as such.
6857
6858 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6859
6860 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6861 to preserve range information for the primary expression
6862 in the call to c_parser_postfix_expression_after_primary.
6863
6864 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6865
6866 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6867 expression location, falling back on the first token location,
6868 rather than always using the latter.
6869
6870 2015-12-16 Marek Polacek <polacek@redhat.com>
6871
6872 PR c/64637
6873 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6874 available.
6875
6876 2015-12-15 Marek Polacek <polacek@redhat.com>
6877
6878 PR c/68907
6879 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6880 artificial decl.
6881
6882 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6883
6884 * c-parser.c (c_parser_alignof_expression): Capture location of
6885 closing parenthesis (if any), or of end of unary expression, and
6886 use it to build a src_range for the expression.
6887
6888 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6889
6890 PR c/68757
6891 * c-parser.c (c_parser_get_builtin_args): Add
6892 "out_close_paren_loc" param, and write back to it.
6893 (c_parser_postfix_expression): Capture the closing
6894 parenthesis location for RID_CHOOSE_EXPR,
6895 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6896 RID_BUILTIN_SHUFFLE and use it to set the source range
6897 for such expressions; within RID_BUILTIN_COMPLEX set
6898 the underlying location.
6899
6900 2015-12-07 Marek Polacek <polacek@redhat.com>
6901
6902 PR c/68668
6903 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6904 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6905
6906 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6907
6908 * c-tree.h (c_build_va_arg): Adjust prototype.
6909 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6910 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6911 parameter, adjust throughout and issue an error if EXPR is a component
6912 with reverse storage order.
6913
6914 2015-12-02 Jason Merrill <jason@redhat.com>
6915
6916 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6917 (c_fully_fold_internal, decl_constant_value_for_optimization):
6918 Move from c-common.c.
6919 * c-tree.h: Declare decl_constant_value_for_optimization.
6920 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6921
6922 2015-12-02 Joseph Myers <joseph@codesourcery.com>
6923
6924 PR c/68162
6925 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6926 following link from declarator to next declarator. Track original
6927 qualified type and pass it to c_build_qualified_type.
6928 * c-typeck.c (c_build_qualified_type): Add arguments
6929 orig_qual_type and orig_qual_indirect.
6930
6931 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6932
6933 * c-parser.c (c_parser_omp_clause_name)
6934 (c_parser_oacc_all_clauses): Alphabetical sorting.
6935
6936 2015-12-02 Jakub Jelinek <jakub@redhat.com>
6937
6938 PR c/68533
6939 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6940 for diagnostics.
6941
6942 2015-12-01 Julian Brown <julian@codesourcery.com>
6943 Cesar Philippidis <cesar@codesourcery.com>
6944 James Norris <James_Norris@mentor.com>
6945
6946 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6947 (c_parser_oacc_clause_use_device): New function.
6948 (c_parser_oacc_all_clauses): Add use_device support.
6949 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6950 (c_parser_oacc_host_data): New function.
6951 (c_parser_omp_construct): Add host_data support.
6952 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6953 * c-typeck.c (c_finish_oacc_host_data): New function.
6954 (c_finish_omp_clauses): Add use_device support.
6955
6956 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
6957
6958 PR c/67106
6959 * c-decl.c: Set TYPE_PACKED in variants.
6960
6961 2015-11-27 Martin Liska <mliska@suse.cz>
6962
6963 PR c++/68312
6964 * c-array-notation.c (fix_builtin_array_notation_fn):
6965 Use release_vec_vec instead of vec::release.
6966 (build_array_notation_expr): Likewise.
6967 (fix_conditional_array_notations_1): Likewise.
6968 (fix_array_notation_expr): Likewise.
6969 (fix_array_notation_call_expr): Likewise.
6970
6971 2015-11-27 Jakub Jelinek <jakub@redhat.com>
6972
6973 PR c/63326
6974 * c-parser.c (c_parser_compound_statement_nostart): If
6975 last_label is true, use pragma_stmt instead of pragma_compound
6976 as second c_parser_pragma argument.
6977 (c_parser_omp_ordered, c_parser_omp_target_update,
6978 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6979 false as second argument to c_parser_skip_to_pragma_eol after
6980 diagnosing standalone directives used in pragma_stmt context.
6981
6982 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6983
6984 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6985 with "if (ENABLE_OFFLOADING)".
6986
6987 2015-11-23 David Malcolm <dmalcolm@redhat.com>
6988
6989 PR objc/68438
6990 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6991 for various Objective-C constructs: Class.name syntax,
6992 @selector(), @protocol(), @encode(), and [] message syntax.
6993
6994 2015-11-20 David Malcolm <dmalcolm@redhat.com>
6995
6996 PR 62314
6997 * c-typeck.c (should_suggest_deref_p): New function.
6998 (build_component_ref): Special-case POINTER_TYPE when
6999 generating a "not a structure of union" error message, and
7000 suggest a "->" rather than a ".", providing a fix-it hint.
7001
7002 2015-11-19 David Malcolm <dmalcolm@redhat.com>
7003
7004 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
7005 candidate into a new function, find_closest_identifier.
7006
7007 2015-11-19 Marek Polacek <polacek@redhat.com>
7008
7009 PR c/68412
7010 * c-typeck.c (parser_build_binary_op): Properly handle
7011 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
7012
7013 2015-11-17 David Malcolm <dmalcolm@redhat.com>
7014
7015 * c-parser.c (set_c_expr_source_range): Bulletproof both
7016 overloaded implementations against NULL expr->value.
7017 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
7018 values.
7019 (c_parser_unary_expression): Likewise when handling addresses of
7020 labels.
7021 (c_parser_postfix_expression): Likewise for statement expressions,
7022 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
7023 __builtin_va_arg, and for __builtin_offset_of.
7024 (c_parser_postfix_expression_after_paren_type): Initialize expr's
7025 src_range using the range of the braced initializer.
7026 (c_parser_transaction_expression): Set src_range for "ret" to a
7027 sane pair of values.
7028
7029 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7030
7031 * c-parser.c (c_finish_omp_declare_simd): Look for
7032 "simd" attribute as well. Update error message.
7033
7034 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7035
7036 * c-parser.c (c_parser_omp_declare_target): Adjust.
7037
7038 2015-11-14 Jakub Jelinek <jakub@redhat.com>
7039
7040 * c-typeck.c (c_finish_omp_clauses): Don't mark
7041 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
7042
7043 2015-11-14 Marek Polacek <polacek@redhat.com>
7044
7045 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
7046 * c-typeck.c: Likewise.
7047
7048 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7049
7050 * c-decl.c (warn_defaults_to): Pass line_table to
7051 rich_location ctor.
7052 * c-errors.c (pedwarn_c99): Likewise.
7053 (pedwarn_c90): Likewise.
7054 * c-parser.c (set_c_expr_source_range): New functions.
7055 (c_token::get_range): New method.
7056 (c_token::get_finish): New method.
7057 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
7058 based on the range from the start of the LHS to the end of the
7059 RHS.
7060 (c_parser_conditional_expression): Likewise, based on the range
7061 from the start of the cond.value to the end of exp2.value.
7062 (c_parser_binary_expression): Call set_c_expr_source_range on
7063 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
7064 (c_parser_cast_expression): Call set_c_expr_source_range on ret
7065 based on the cast_loc through to the end of the expr.
7066 (c_parser_unary_expression): Likewise, based on the
7067 op_loc through to the end of op.
7068 (c_parser_sizeof_expression) Likewise, based on the start of the
7069 sizeof token through to either the closing paren or the end of
7070 expr.
7071 (c_parser_postfix_expression): Likewise, using the token range,
7072 or from the open paren through to the close paren for
7073 parenthesized expressions.
7074 (c_parser_postfix_expression_after_primary): Likewise, for
7075 various kinds of expression.
7076 * c-tree.h (struct c_expr): Add field "src_range".
7077 (c_expr::get_start): New method.
7078 (c_expr::get_finish): New method.
7079 (set_c_expr_source_range): New decls.
7080 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
7081 on ret for prefix unary ops.
7082 (parser_build_binary_op): Likewise, running from the start of
7083 arg1.value through to the end of arg2.value.
7084
7085 2015-11-13 Marek Polacek <polacek@redhat.com>
7086
7087 PR c/68320
7088 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
7089
7090 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7091
7092 * c-typeck.c: Include spellcheck.h.
7093 (lookup_field_fuzzy_find_candidates): New function.
7094 (lookup_field_fuzzy): New function.
7095 (build_component_ref): If the field was not found, try using
7096 lookup_field_fuzzy and potentially offer a suggestion.
7097
7098 2015-11-12 James Norris <jnorris@codesourcery.com>
7099 Joseph Myers <joseph@codesourcery.com>
7100
7101 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
7102 (c_parser_omp_clause_name): Handle 'device_resident' clause.
7103 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7104 and PRAGMA_OMP_CLAUSE_LINK.
7105 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7106 and PRAGMA_OACC_CLAUSE_LINK.
7107 (OACC_DECLARE_CLAUSE_MASK): New definition.
7108 (c_parser_oacc_declare): New function.
7109
7110 2015-11-12 Marek Polacek <polacek@redhat.com>
7111
7112 PR c/67784
7113 * c-parser.c (c_parser_for_statement): Reclassify the token in
7114 a correct scope.
7115
7116 2015-11-11 Marek Polacek <polacek@redhat.com>
7117
7118 PR c/68107
7119 PR c++/68266
7120 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
7121 checking the size of an array.
7122
7123 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7124
7125 * c-array-notation.c: Remove unused header files.
7126 * c-aux-info.c: Likewise.
7127 * c-convert.c: Likewise.
7128 * c-decl.c: Likewise.
7129 * c-errors.c: Likewise.
7130 * c-lang.c: Likewise.
7131 * c-objc-common.c: Likewise.
7132 * c-parser.c: Likewise.
7133 * c-typeck.c: Likewise.
7134 * gccspec.c: Likewise.
7135
7136 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7137 Cesar Philippidis <cesar@codesourcery.com>
7138 James Norris <jnorris@codesourcery.com>
7139 Julian Brown <julian@codesourcery.com>
7140 Nathan Sidwell <nathan@codesourcery.com>
7141
7142 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
7143 routine arg.
7144 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
7145 (c_parser_pragma): Parse 'acc routine'.
7146 (OACC_ROUTINE_CLAUSE_MARK): Define.
7147 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
7148
7149 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7150
7151 PR debug/67192
7152 * c-typeck.c (c_finish_loop): For unconditional loops, set the
7153 location of the backward-goto to the start of the loop body.
7154
7155 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7156
7157 PR debug/67192
7158 * c-parser.c (c_parser_while_statement): Finish the loop before
7159 parsing ahead for misleading indentation.
7160 (c_parser_for_statement): Likewise.
7161
7162 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7163
7164 * c-decl.c (finish_struct): If the structure has reverse storage
7165 order, rewrite the type of array fields with scalar component. Call
7166 maybe_apply_pragma_scalar_storage_order on entry.
7167 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
7168 errors on bit-fields and reverse SSO here and not...
7169 (c_mark_addressable): ...here.
7170 (output_init_element): Adjust call to initializer_constant_valid_p.
7171 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
7172
7173 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7174
7175 * c-decl.c (warn_defaults_to): Update for change in signature
7176 of diagnostic_set_info.
7177 * c-errors.c (pedwarn_c99): Likewise.
7178 (pedwarn_c90): Likewise.
7179 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
7180 for textinfo::set_location.
7181
7182 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7183 Thomas Schwinge <thomas@codesourcery.com>
7184 James Norris <jnorris@codesourcery.com>
7185
7186 * c-parser.c (c_parser_omp_clause_name): Add support for
7187 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
7188 (c_parser_omp_clause_default): Add is_oacc argument. Handle
7189 default(none) in OpenACC.
7190 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
7191 arguments.
7192 (c_parser_oacc_clause_tile): New function.
7193 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
7194 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
7195 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
7196 TILE}.
7197 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
7198 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
7199 FIRSTPRIVATE}.
7200 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
7201 (c_parser_oacc_update): Update the error message for missing clauses.
7202 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
7203 and OMP_CLAUSE_INDEPENDENT.
7204
7205 2015-11-05 Marek Polacek <polacek@redhat.com>
7206
7207 PR c/68090
7208 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
7209 deal with pre-evaluation on invalid types.
7210
7211 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7212 Ilya Verbin <ilya.verbin@intel.com>
7213
7214 * c-parser.c: Include context.h and gimple-expr.h.
7215 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
7216 monotonic together with nonmonotonic.
7217 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
7218 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
7219 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
7220 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
7221 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
7222 expressions on combined target teams before the target.
7223 (c_parser_omp_declare_target): If decl has "omp declare target" or
7224 "omp declare target link" attribute, and cgraph or varpool node already
7225 exists, then set corresponding flags. Call c_finish_omp_clauses
7226 in the parenthesized extended-list syntax case.
7227 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
7228 declare target.
7229 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
7230 on OMP_CLAUSE_REDUCTION array sections.
7231 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
7232 into the constant offset, or for variable low-bound using
7233 POINTER_PLUS_EXPR. For structure element based array sections use
7234 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
7235 (c_finish_omp_clauses): Drop generic_field_head, structure
7236 elements are now always mapped even as array section bases,
7237 diagnose same var in data sharing and mapping clauses. Diagnose if
7238 linear step on declare simd is neither a constant nor a uniform
7239 parameter. Look through POINTER_PLUS_EXPR for array section
7240 reductions. Diagnose the same var or function appearing multiple
7241 times on the same directive. Fix up wording for the to clause if t
7242 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
7243 modifier on kinds other than dynamic or guided or nonmonotonic
7244 modifier together with ordered clause.
7245
7246 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7247 Chung-Lin Tang <cltang@codesourcery.com>
7248
7249 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
7250
7251 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7252
7253 * c-array-notation.c: Reorder #include's and remove duplicates.
7254 * c-aux-info.c: Likewise.
7255 * c-convert.c: Likewise.
7256 * c-decl.c: Likewise.
7257 * c-errors.c: Likewise.
7258 * c-lang.c: Likewise.
7259 * c-objc-common.c: Likewise.
7260 * c-parser.c: Likewise.
7261 * c-typeck.c: Likewise.
7262
7263 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
7264
7265 PR debug/66068
7266 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
7267 after calling build_qualified_type.
7268
7269 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
7270 Thomas Schwinge <thomas@codesourcery.com>
7271 James Norris <jnorris@codesourcery.com>
7272 Joseph Myers <joseph@codesourcery.com>
7273 Julian Brown <julian@codesourcery.com>
7274 Bernd Schmidt <bschmidt@redhat.com>
7275
7276 * c-parser.c (c_parser_oacc_shape_clause): New.
7277 (c_parser_oacc_simple_clause): New.
7278 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7279 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7280
7281 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7282 James Norris <jnorris@codesourcery.com>
7283 Cesar Philippidis <cesar@codesourcery.com>
7284
7285 PR c/64765
7286 PR c/64880
7287 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7288 parameters, and handle these. Adjust all users.
7289 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7290 into...
7291 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
7292 all users.
7293 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7294 declare functions.
7295 (c_finish_omp_construct): Declare function.
7296 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7297 Merge functions into...
7298 (c_finish_omp_construct): ... this new function.
7299
7300 2015-10-22 Richard Biener <rguenther@suse.de>
7301
7302 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7303 before folding a MINUS_EXPR.
7304
7305 2015-10-21 Marek Polacek <polacek@redhat.com>
7306
7307 PR c/68024
7308 * c-decl.c (start_function): Warn about vararg functions without
7309 a prototype.
7310
7311 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
7312
7313 * c-typeck.c (build_conditional_expr): Use boolean vector
7314 type for vector comparison.
7315 (build_vec_cmp): New.
7316 (build_binary_op): Use build_vec_cmp for comparison.
7317
7318 2015-10-20 Marek Polacek <polacek@redhat.com>
7319
7320 * c-parser.c (is_cilkplus_vector_p): Don't define here.
7321
7322 2015-10-20 Marek Polacek <polacek@redhat.com>
7323
7324 PR c/67964
7325 * c-parser.c (c_parser_attributes): Break out of the loop if the
7326 token after an attribute isn't a comma.
7327
7328 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7329 Aldy Hernandez <aldyh@redhat.com>
7330
7331 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7332 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7333 (c_parser_omp_variable_list): Handle structure elements for
7334 map, to and from clauses. Handle array sections in reduction
7335 clause. Formatting fixes.
7336 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7337 if clause modifiers.
7338 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7339 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7340 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7341 c_parser_omp_clause_is_device_ptr): New functions.
7342 (c_parser_omp_clause_ordered): Parse optional parameter.
7343 (c_parser_omp_clause_reduction): Handle array reductions.
7344 (c_parser_omp_clause_schedule): Parse optional simd modifier.
7345 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7346 functions.
7347 (c_parser_omp_clause_linear): Parse linear clause modifiers.
7348 (c_parser_omp_clause_depend_sink): New function.
7349 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7350 (c_parser_omp_clause_map): Parse release/delete map kinds and
7351 optional always modifier.
7352 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7353 and c_finish_omp_clauses callers.
7354 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
7355 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7356 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7357 (OMP_CRITICAL_CLAUSE_MASK): Define.
7358 (c_parser_omp_critical): Parse critical clauses.
7359 (c_parser_omp_for_loop): Handle doacross loops, adjust
7360 c_finish_omp_for and c_finish_omp_clauses callers.
7361 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7362 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7363 (OMP_FOR_CLAUSE_MASK): Add linear clause.
7364 (c_parser_omp_for): Disallow ordered clause when combined with
7365 distribute. Disallow linear clause when combined with distribute
7366 and not combined with simd.
7367 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7368 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7369 parse clauses and if depend clause is found, don't parse a body.
7370 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7371 Allow target parallel without for after it.
7372 (OMP_TASK_CLAUSE_MASK): Add priority clause.
7373 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7374 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7375 invalid kinds.
7376 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7377 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7378 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7379 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7380 functions.
7381 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7382 defaultmap and is_device_ptr clauses.
7383 (c_parser_omp_target): Parse target parallel and target simd. Set
7384 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
7385 and target exit data. Diagnose invalid map kinds.
7386 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7387 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7388 construct.
7389 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7390 &omp_priv.
7391 (OMP_TASKLOOP_CLAUSE_MASK): Define.
7392 (c_parser_omp_taskloop): New function.
7393 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7394 handle PRAGMA_OMP_TASKLOOP.
7395 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7396 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7397 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7398 Add IS_OMP argument, handle structure element bases, diagnose
7399 bitfields, pass IS_OMP recursively, diagnose known zero length
7400 array sections in depend clauses, handle array sections in reduction
7401 clause, diagnose negative length even for pointers.
7402 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7403 types, pass IS_OMP down to handle_omp_array_sections_1, handle
7404 array sections in reduction clause, set
7405 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7406 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7407 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7408 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7409
7410 2015-10-06 Marek Polacek <polacek@redhat.com>
7411
7412 * c-parser.c (c_parser_statement_after_labels): Use
7413 protected_set_expr_location.
7414 (c_parser_omp_clause_num_gangs): Likewise.
7415 (c_parser_omp_clause_num_threads): Likewise.
7416 (c_parser_omp_clause_num_workers): Likewise.
7417 (c_parser_omp_clause_vector_length): Likewise.
7418 (c_parser_omp_clause_num_teams): Likewise.
7419 (c_parser_omp_clause_thread_limit): Likewise.
7420 * c-typeck.c (build_c_cast): Likewise.
7421 (c_cast_expr): Likewise.
7422
7423 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7424
7425 * c-typeck.c (c_tree_equal): Use real_equal instead of
7426 REAL_VALUES_EQUAL.
7427
7428 2015-10-04 Jason Merrill <jason@redhat.com>
7429
7430 * c-parser.c (c_lex_one_token): Handle @synchronized.
7431 * c-decl.c (match_builtin_function_types): A declaration of a built-in
7432 can change whether the function is transaction_safe.
7433
7434 2015-10-02 Marek Polacek <polacek@redhat.com>
7435
7436 PR c/67730
7437 * c-typeck.c (convert_for_assignment): Use the expansion point
7438 location throughout.
7439
7440 2015-10-02 Marek Polacek <polacek@redhat.com>
7441
7442 PR c/64249
7443 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7444 and pass it down to c_parser_if_statement.
7445 (c_parser_else_body): Add CHAIN parameter and pass it down to
7446 c_parser_statement_after_labels.
7447 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
7448 duplicated if-else-if conditions.
7449
7450 2015-10-01 Marek Polacek <polacek@redhat.com>
7451
7452 * c-typeck.c (convert_for_assignment): Improve commentary.
7453
7454 2015-09-30 Marek Polacek <polacek@redhat.com>
7455
7456 PR c/67730
7457 * c-typeck.c (c_finish_return): Use the expansion point location for
7458 certain "return with value" warnings.
7459
7460 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7461
7462 * c-parser.c (pragma_lex): Add loc argument.
7463
7464 2015-09-15 Marek Polacek <polacek@redhat.com>
7465
7466 PR c/67580
7467 * c-decl.c (tag_exists_p): New function.
7468 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7469 struct/union/enum keywords are missing.
7470 * c-tree.h (tag_exists_p): Declare.
7471
7472 2015-09-15 Marek Polacek <polacek@redhat.com>
7473
7474 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7475 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7476 Return NULL_TREE instead of 0.
7477 (lookup_name): Return NULL_TREE instead of 0.
7478 (lookup_name_in_scope): Likewise.
7479 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7480 (parser_xref_tag): Use false instead of 0.
7481 (start_struct): Use true instead of 1.
7482 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7483
7484 2015-09-14 Marek Polacek <polacek@redhat.com>
7485
7486 * c-typeck.c (set_nonincremental_init_from_string): Use
7487 HOST_WIDE_INT_M1U when shifting a negative value.
7488
7489 2015-09-09 Mark Wielaard <mjw@redhat.com>
7490
7491 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7492 parm against NULL.
7493
7494 2015-09-10 Jakub Jelinek <jakub@redhat.com>
7495
7496 PR c/67502
7497 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7498 into OMP_FOR_PRE_BODY rather than before the loop.
7499
7500 2015-09-09 Jakub Jelinek <jakub@redhat.com>
7501
7502 PR c/67501
7503 * c-parser.c (c_parser_oacc_all_clauses,
7504 c_parser_omp_all_clauses): Remove invalid clause from
7505 list of clauses even if parser->error is set.
7506
7507 PR c/67500
7508 * c-parser.c (c_parser_omp_clause_aligned,
7509 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7510 test for errors.
7511 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7512 error_mark_node.
7513
7514 PR c/67495
7515 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7516 instead of c_parser_unary_expression. If the result is !lvalue_p,
7517 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7518
7519 2015-09-04 Marek Polacek <polacek@redhat.com>
7520
7521 PR sanitizer/67279
7522 * c-typeck.c (build_binary_op): Don't instrument static initializers.
7523
7524 2015-09-03 Martin Sebor <msebor@redhat.com>
7525
7526 PR c/66516
7527 * c-typeck.c (convert_arguments, parser_build_unary_op,
7528 build_conditional_expr, c_cast_expr, convert_for_assignment,
7529 build_binary_op, _objc_common_truthvalue_conversion): Call
7530 reject_gcc_builtin.
7531 (c_decl_implicit): Define.
7532
7533 2015-09-02 Marek Polacek <polacek@redhat.com>
7534
7535 PR c/67432
7536 * c-parser.c (c_parser_enum_specifier): Give a better error for
7537 an empty enum.
7538
7539 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7540
7541 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7542
7543 2015-08-12 Marek Polacek <polacek@redhat.com>
7544
7545 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7546 LOC to it.
7547
7548 2015-08-03 Marek Polacek <polacek@redhat.com>
7549
7550 PR c/67088
7551 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7552 Use it.
7553 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7554
7555 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7556
7557 * c-parser.c (c_parser_if_body): Take token_indent_info
7558 argument. Call warn_for_misleading_indentation even when the
7559 body is a semicolon. Extract token_indent_infos corresponding
7560 to the guard, body and next tokens. Adjust call to
7561 warn_for_misleading_indentation accordingly.
7562 (c_parser_else_body): Likewise.
7563 (c_parser_if_statement): Likewise.
7564 (c_parser_while_statement): Likewise.
7565 (c_parser_for_statement): Likewise.
7566
7567 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7568 Manuel López-Ibáñez <manu@gcc.gnu.org>
7569
7570 * c-decl.c (get_parm_info): Remove static var. Update warning
7571 message.
7572
7573 2015-07-27 Marek Polacek <polacek@redhat.com>
7574
7575 PR c++/66555
7576 PR c/54979
7577 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7578
7579 2015-07-20 Marek Polacek <polacek@redhat.com>
7580
7581 PR c++/55095
7582 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7583 (build_binary_op): Warn about left shift overflows.
7584
7585 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7586
7587 * c-array-notation.c: Adjust includes for flags.h changes.
7588 * c-objc-common.c: Likewise.
7589
7590 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7591
7592 * c-array-notation.c: Adjust includes.
7593 * c-aux-info.c: Likewise.
7594 * c-convert.c: Likewise.
7595 * c-decl.c: Likewise.
7596 * c-errors.c: Likewise.
7597 * c-lang.c: Likewise.
7598 * c-objc-common.c: Likewise.
7599 * c-parser.c: Likewise.
7600 * c-typeck.c: Likewise.
7601
7602 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7603
7604 PR fortran/66605
7605 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7606
7607 2015-06-29 Marek Polacek <polacek@redhat.com>
7608
7609 PR c/66322
7610 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7611 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7612 about -Wswitch-bool here.
7613 (do_case): Update c_add_case_label call.
7614 (c_finish_case): Update c_do_switch_warnings call.
7615
7616 2015-06-27 Marek Polacek <polacek@redhat.com>
7617
7618 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7619
7620 2015-06-26 Marek Polacek <polacek@redhat.com>
7621
7622 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7623 INDIRECT_REF_P.
7624 * c-typeck.c (array_to_pointer_conversion): Likewise.
7625 (build_unary_op): Likewise.
7626 (c_finish_return): Likewise.
7627
7628 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7629
7630 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7631 * c-parser.c: Likewise.
7632
7633 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7634
7635 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7636 instead of pointer_hash.
7637 (detect_field_duplicates): Likewise.
7638
7639 2015-06-25 Marek Polacek <polacek@redhat.com>
7640
7641 * c-array-notation.c: Use VAR_P throughout.
7642 * c-decl.c: Likewise.
7643 * c-objc-common.c: Likewise.
7644 * c-parser.c: Likewise.
7645 * c-typeck.c: Likewise.
7646
7647 2015-06-25 Marek Polacek <polacek@redhat.com>
7648
7649 * c-decl.c: Use is_global_var throughout.
7650 * c-parser.c: Likewise.
7651 * c-typeck.c: Likewise.
7652
7653 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7654
7655 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7656 * c-aux-info.c: Likewise.
7657 * c-convert.c: Likewise.
7658 * c-decl.c: Likewise.
7659 * c-errors.c: Likewise.
7660 * c-lang.c: Likewise.
7661 * c-objc-common.c: Likewise.
7662 * c-parser.c: Likewise.
7663 * c-typeck.c: Likewise.
7664
7665 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
7666
7667 PR middle-end/66325
7668 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7669 variants.
7670
7671 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7672
7673 * c-decl.c (pop_scope): Register the main translation unit
7674 through the new debug hook.
7675
7676 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7677
7678 * c-array-notation.c : Adjust include files.
7679 * c-aux-info.c : Likewise.
7680 * c-convert.c : Likewise.
7681 * c-decl.c : Likewise.
7682 * c-errors.c : Likewise.
7683 * c-lang.c : Likewise.
7684 * c-lang.h : Likewise.
7685 * c-objc-common.c : Likewise.
7686 * c-parser.c : Likewise.
7687 * c-typeck.c : Likewise.
7688
7689 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7690
7691 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7692 immediately clobber it.
7693 (c_write_global_declarations_1): Remove call to
7694 check_global_declaration_1.
7695 (c_write_global_declarations_2): Remove.
7696 (c_write_final_cleanups): Rename from c_write_global_declarations.
7697 Remove call to finalize_compilation_unit.
7698 Remove calls to debugging hooks.
7699 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7700 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7701 * c-tree.h: Remove c_write_global_declarations.
7702
7703 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7704
7705 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7706 * c-aux-info.c: Likewise.
7707 * c-convert.c: Likewise.
7708 * c-decl.c: Likewise.
7709 * c-errors.c: Likewise.
7710 * c-lang.c: Likewise.
7711 * c-objc-common.c: Likewise.
7712 * c-parser.c: Likewise.
7713 * c-typeck.c: Likewise.
7714
7715 2015-06-04 Marek Polacek <polacek@redhat.com>
7716
7717 PR c/66341
7718 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7719 it is a lvalue.
7720
7721 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7722
7723 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7724 Warn for empty struct.
7725 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7726
7727 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7728
7729 * c-decl.c (start_function): Call plugin before parsing.
7730 (finish_function): Call plugin after parsing.
7731
7732 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7733
7734 PR c/49551
7735 * c-decl.c (merge_decls): Merge DECL_COMMON.
7736
7737 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
7738
7739 * Make-lang.in (check_gcc_pallelize): Define.
7740
7741 2015-05-22 Marek Polacek <polacek@redhat.com>
7742
7743 PR c/47043
7744 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7745 attributes.
7746
7747 2015-05-21 Marek Polacek <polacek@redhat.com>
7748
7749 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7750 DECL_BUILT_IN.
7751
7752 2015-05-20 Marek Polacek <polacek@redhat.com>
7753
7754 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7755 * c-typeck.c: Likewise.
7756
7757 2015-05-19 Marek Polacek <polacek@redhat.com>
7758
7759 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7760
7761 2015-05-19 Jakub Jelinek <jakub@redhat.com>
7762
7763 PR middle-end/66199
7764 * c-parser.c (c_parser_omp_for_loop): Don't add
7765 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7766 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7767 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7768 constructs.
7769
7770 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7771
7772 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7773 swaps.
7774
7775 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7776
7777 PR fortran/44054
7778 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7779 accessor function.
7780
7781 2015-05-14 Marek Polacek <polacek@redhat.com>
7782
7783 PR c/66066
7784 PR c/66127
7785 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7786 rather than with 0.
7787
7788 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7789
7790 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7791 to add a call to warn_for_misleading_indentation.
7792 (c_parser_else_body): Likewise, adding param "else_loc".
7793 (c_parser_if_statement): Check for misleading indentation.
7794 (c_parser_while_statement): Likewise.
7795 (c_parser_for_statement): Likewise.
7796
7797 2015-05-08 Marek Polacek <polacek@redhat.com>
7798
7799 PR c/64918
7800 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7801 (output_init_element): Likewise.
7802
7803 2015-05-07 Marek Polacek <polacek@redhat.com>
7804
7805 PR c/65179
7806 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7807 value.
7808
7809 2015-04-30 Marek Polacek <polacek@redhat.com>
7810
7811 * c-typeck.c (set_init_label): Call error_at instead of error and
7812 pass LOC to it.
7813
7814 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7815 the type of a decl.
7816
7817 * c-typeck.c (c_build_va_arg): Clarify the error message.
7818
7819 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7820
7821 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7822 OMP_STANDALONE_CLAUSES.
7823
7824 2015-04-28 Marek Polacek <polacek@redhat.com>
7825
7826 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7827
7828 2015-04-28 Marek Polacek <polacek@redhat.com>
7829
7830 PR c/65901
7831 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7832
7833 2015-04-25 Marek Polacek <polacek@redhat.com>
7834
7835 PR c/52085
7836 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7837 attribute.
7838
7839 2015-04-23 Marek Polacek <polacek@redhat.com>
7840
7841 PR c/65345
7842 * c-decl.c (set_labels_context_r): New function.
7843 (store_parm_decls): Call it via walk_tree_without_duplicates.
7844 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7845 instead of create_tmp_var. Build TARGET_EXPR instead of
7846 COMPOUND_EXPR.
7847 (build_atomic_assign): Use create_tmp_var_raw instead of
7848 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7849
7850 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7851
7852 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7853 (c_parser_omp_target_update): Add missed %> to error_at ().
7854
7855 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7856
7857 PR target/55143
7858 * c-decl.c (c_default_pointer_mode): Remove definition.
7859 * c-tree.h (c_default_pointer_mode): Remove declaration.
7860
7861 2015-03-27 Tobias Burnus <burnus@net-b.de>
7862
7863 PR c/65586
7864 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7865 error out.
7866 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7867 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7868 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7869
7870 2015-03-19 Jakub Jelinek <jakub@redhat.com>
7871
7872 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7873 attribute for DECL_EXTERNAL VAR_DECLs.
7874
7875 2015-03-11 Jakub Jelinek <jakub@redhat.com>
7876
7877 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7878 argument.
7879
7880 2015-03-10 Jakub Jelinek <jakub@redhat.com>
7881
7882 PR c/65120
7883 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7884 before preparing arguments to warn_logical_not_parentheses.
7885
7886 2015-03-09 Jakub Jelinek <jakub@redhat.com>
7887
7888 PR c/65120
7889 * c-typeck.c (parser_build_binary_op): Don't warn for
7890 !!x == y or !b == y where b is _Bool.
7891
7892 2015-03-09 Marek Polacek <polacek@redhat.com>
7893
7894 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7895 * c-decl.c (grokdeclarator): Likewise.
7896 * c-typeck.c (build_binary_op): Likewise.
7897
7898 2015-02-27 Marek Polacek <polacek@redhat.com>
7899
7900 PR c/65228
7901 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7902
7903 2015-02-14 Marek Polacek <polacek@redhat.com>
7904
7905 PR c/64768
7906 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7907 declared through a typedef name.
7908
7909 2015-02-13 Marek Polacek <polacek@redhat.com>
7910
7911 PR c/65050
7912 * c-decl.c (grokdeclarator): Print also the type when giving
7913 the error message about array's incomplete element type.
7914
7915 2015-02-11 Jakub Jelinek <jakub@redhat.com>
7916
7917 PR c/64824
7918 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7919 check in the POP macro.
7920
7921 2015-02-09 Marek Polacek <polacek@redhat.com>
7922
7923 PR c/64856
7924 * c-typeck.c (process_init_element): Don't always wrap
7925 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7926 initializing a range of elements.
7927
7928 2015-02-04 Jakub Jelinek <jakub@redhat.com>
7929
7930 PR c/64824
7931 PR c/64868
7932 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7933
7934 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
7935
7936 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7937 processing enum declaration.
7938
7939 2015-01-29 Marek Polacek <polacek@redhat.com>
7940
7941 PR c/64709
7942 * c-typeck.c (pop_init_level): If constructor_elements has
7943 exactly one element with integer_zerop value, set constructor_zeroinit
7944 to 1. Remove braces around warning_init call.
7945
7946 2015-01-27 Jakub Jelinek <jakub@redhat.com>
7947
7948 PR c/64766
7949 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7950 of FUNCTION_DECLs with error_mark_node.
7951
7952 2015-01-26 Jakub Jelinek <jakub@redhat.com>
7953
7954 PR c/64778
7955 * c-typeck.c (convert_arguments): Return -1 if there are
7956 error_args, even if we've diagnosed too many arguments.
7957
7958 2015-01-21 Richard Biener <rguenther@suse.de>
7959
7960 PR middle-end/64313
7961 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7962 for builtins the user declared correctly.
7963
7964 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7965 Bernd Schmidt <bernds@codesourcery.com>
7966 Cesar Philippidis <cesar@codesourcery.com>
7967 James Norris <jnorris@codesourcery.com>
7968 Jakub Jelinek <jakub@redhat.com>
7969 Ilmir Usmanov <i.usmanov@samsung.com>
7970
7971 * c-parser.c: Include "gomp-constants.h".
7972 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7973 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7974 Use OMP_CLAUSE_SET_MAP_KIND.
7975 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7976 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7977 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7978 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7979 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7980 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7981 "copyout", "create", "delete", "deviceptr", "gang", "host",
7982 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7983 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7984 "present_or_create", "pcreate", "seq", "self", "vector",
7985 "vector_length", "wait", "worker".
7986 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7987 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7988 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7989 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7990 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7991 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7992 (c_parser_oacc_data_clause_deviceptr)
7993 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7994 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7995 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7996 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7997 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7998 (c_parser_oacc_parallel, c_parser_oacc_update)
7999 (c_parser_oacc_wait): New functions.
8000 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
8001 (c_finish_oacc_data): New prototypes.
8002 * c-typeck.c: Include "gomp-constants.h".
8003 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
8004 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
8005 OMP_CLAUSE_SET_MAP_KIND.
8006 (c_finish_oacc_parallel, c_finish_oacc_kernels)
8007 (c_finish_oacc_data): New functions.
8008 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
8009 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
8010 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
8011 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
8012 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
8013 GOMP_MAP_FORCE_DEVICEPTR.
8014
8015 2015-01-09 Michael Collison <michael.collison@linaro.org>
8016
8017 * c-array-notation.c: Include hash-set.h, machmode.h,
8018 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8019 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8020 * c-aux-info.c: Ditto.
8021 * c-convert.c: Ditto.
8022 * c-decl.c: Ditto.
8023 * c-errors.c: Ditto.
8024 * c-lang.c: Dittoxs.
8025 * c-objc-common.c: Ditto.
8026 * c-parser.c: Ditto.
8027 * c-typeck.c: Include hash-set.h, machmode.h,
8028 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8029 fold-const.h, wide-int.h, inchash.h, real.h and
8030 fixed-value.h due to flattening of tree.h.
8031
8032 2015-01-07 Marek Polacek <polacek@redhat.com>
8033
8034 PR c/64417
8035 * c-typeck.c (process_init_element): Disallow initialization of
8036 a flexible array member with a string constant if the structure
8037 is in an array.
8038
8039 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8040
8041 PR sanitizer/64344
8042 * c-typeck.c (convert_for_assignment, c_finish_return): For
8043 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
8044 types also set in_late_binary_op around convert call.
8045 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
8046 to integral type casts, if not in_late_binary_op, pass c_fully_fold
8047 result on expr as last argument to ubsan_instrument_float_cast,
8048 if in_late_binary_op, don't use c_save_expr but save_expr.
8049
8050 Update copyright years.
8051
8052 2015-01-05 Marek Polacek <polacek@redhat.com>
8053
8054 PR c/64423
8055 * c-typeck.c (build_array_ref): Pass loc down to
8056 warn_array_subscript_with_type_char.
8057
8058 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8059
8060 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8061 (common-pointer-type): For pointers to arrays take qualifiers from
8062 element type.
8063 (build_conditional_expr): Add warnings for lost qualifiers.
8064 (comp-target-types): Allow pointers to arrays with different qualifiers.
8065 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8066 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8067 to PEDWARN_FOR_QUALIFIERS.
8068
8069 2014-12-17 Jakub Jelinek <jakub@redhat.com>
8070
8071 PR sanitizer/64289
8072 * c-convert.c: Include ubsan.h.
8073 (convert): For real -> integral casts and
8074 -fsanitize=float-cast-overflow don't call convert_to_integer, but
8075 instead instrument the float cast directly.
8076
8077 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8078
8079 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
8080 c_finish_stmt_expr): Remove NULL last argument from
8081 create_tmp_var_raw and create_tmp_var calls.
8082 * c-array-notation.c (fix_builtin_array_notation_fn,
8083 build_array_notation_expr, fix_conditional_array_notations_1,
8084 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
8085
8086 2014-11-28 Marek Polacek <polacek@redhat.com>
8087
8088 PR c/63862
8089 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
8090 convert the right operand to integer type.
8091
8092 2014-11-25 Marek Polacek <polacek@redhat.com>
8093
8094 PR c/63877
8095 * c-decl.c (start_function): Disable -Wmissing-declarations warning
8096 for inline functions.
8097
8098 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8099
8100 PR target/63764
8101 * c-typeck.c (build_array_ref): Adjust
8102 convert_vector_to_pointer_for_subscript caller. If it returns true,
8103 call non_lvalue_loc on the result.
8104
8105 2014-11-11 Richard Biener <rguenther@suse.de>
8106
8107 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
8108 to true.
8109
8110 2014-11-10 Andi Kleen <ak@linux.intel.com>
8111
8112 PR c/60804
8113 * c-parser.c (c_parser_statement_after_labels): Call
8114 check_no_cilk.
8115 (c_parser_if_statement): Dito.
8116 (c_parser_switch_statement): Dito.
8117 (c_parser_while_statement): Dito.
8118 (c_parser_do_statement): Dito.
8119 (c_parser_for_statement): Dito.
8120 * c-typeck.c (c_finish_loop): Dito.
8121
8122 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8123
8124 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
8125 OPT_Wshift_count_overflow in the warnings.
8126
8127 2014-10-30 Marek Polacek <polacek@redhat.com>
8128
8129 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
8130 print the stripped version as well, if they're not the same.
8131
8132 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8133
8134 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
8135 machine_mode.
8136
8137 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8138
8139 * c-decl.c: Adjust include files.
8140 * c-parser.c: Ditto.
8141
8142 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
8143 Tom Tromey <tromey@redhat.com>
8144
8145 * c-tree.h (enum c_oracle_request): New.
8146 (c_binding_oracle_function): New typedef.
8147 (c_binding_oracle, c_pushtag, c_bind): Declare.
8148 * c-decl.c (c_binding_oracle): New global.
8149 (I_SYMBOL_CHECKED): New macro.
8150 (i_symbol_binding): New function.
8151 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
8152 (I_TAG_CHECKED): New macro.
8153 (i_tag_binding): New function.
8154 (I_TAG_BINDING, I_TAG_DECL): Redefine.
8155 (I_LABEL_CHECKED): New macro.
8156 (i_label_binding): New function.
8157 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
8158 (c_print_identifier): Save and restore c_binding_oracle.
8159 (c_pushtag, c_bind): New functions.
8160
8161 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8162
8163 * c-typeck.c: Adjust include files.
8164
8165 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8166
8167 PR c++/53061
8168 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
8169 initialization here...
8170 (c_initialize_diagnostics): ... but here. Set defaults after
8171 building pretty-printer.
8172
8173 2014-10-23 Marek Polacek <polacek@redhat.com>
8174
8175 PR c/63626
8176 * c-decl.c (pop_scope): Don't print warning in external_scope.
8177
8178 2014-10-19 Marek Polacek <polacek@redhat.com>
8179
8180 PR c/63567
8181 * c-typeck.c (output_init_element): Allow initializing objects with
8182 static storage duration with compound literals even in C99 and add
8183 pedwarn for it.
8184
8185 2014-10-17 Marek Polacek <polacek@redhat.com>
8186
8187 PR c/63567
8188 * c-typeck.c (digest_init): Allow initializing objects with static
8189 storage duration with compound literals even in C99 and add pedwarn
8190 for it.
8191
8192 2014-10-17 Marek Polacek <polacek@redhat.com>
8193
8194 PR c/63543
8195 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
8196 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
8197 error multiple times. Print the type.
8198
8199 2014-10-17 Marek Polacek <polacek@redhat.com>
8200
8201 PR c/63549
8202 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
8203 type.
8204
8205 2014-10-17 Marek Polacek <polacek@redhat.com>
8206
8207 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
8208 (start_function): Use OPT_Wimplicit_int instead of 0.
8209 (store_parm_decls_oldstyle): Likewise.
8210
8211 2014-10-17 Alan Modra <amodra@gmail.com>
8212
8213 PR middle-end/61848
8214 * c-decl.c (merge_decls): Don't merge section name or tls model
8215 to newdecl symtab node, instead merge to olddecl. Override
8216 existing olddecl section name. Set tls_model for all thread-local
8217 vars, not just OMP thread-private ones. Remove incorrect comment.
8218
8219 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8220
8221 * c-decl.c: Adjust include files.
8222
8223 2014-10-14 DJ Delorie <dj@redhat.com>
8224
8225 * c-parser.c (c_parse_init): Add RID entries for each __intN.
8226 (c_token_starts_typename): Check all __intN, not just __int128.
8227 (c_token_starts_declspecs): Likewise.
8228 (c_parser_declspecs): Likewise.
8229 (c_parser_attribute_any_word): Likewise.
8230 (c_parser_objc_selector): Likewise.
8231 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
8232 (struct c_declspecs): Add int_n_idx field to record *which* __intN
8233 is specified.
8234 * c-decl.c (declspecs_add_type): Check for all __intN, not just
8235 __int128.
8236 (finish_declspecs): Likewise.
8237
8238 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
8239
8240 * c-parser.c (c_parser_all_labels): New function to replace
8241 the duplicate code.
8242 (c_parser_statement): Call the new function.
8243
8244 2014-10-09 Marek Polacek <polacek@redhat.com>
8245
8246 PR c/63480
8247 * c-typeck.c (pop_init_level): Don't warn about initializing
8248 with { }.
8249
8250 2014-10-07 Marek Polacek <polacek@redhat.com>
8251
8252 PR c/59717
8253 * c-decl.c (header_for_builtin_fn): New function.
8254 (implicitly_declare): Suggest which header to include.
8255
8256 2014-10-07 Marek Polacek <polacek@redhat.com>
8257
8258 * c-convert.c (convert): Use error_operand_p.
8259 * c-typeck.c (require_complete_type): Likewise.
8260 (really_atomic_lvalue): Likewise.
8261 (digest_init): Likewise.
8262 (handle_omp_array_sections_1): Likewise.
8263
8264 2014-10-03 Marek Polacek <polacek@redhat.com>
8265
8266 PR c/63453
8267 * c-decl.c (pop_scope): Don't warn about "inline function declared
8268 but never defined" for functions marked with gnu_inline attribute.
8269
8270 2014-09-25 Jakub Jelinek <jakub@redhat.com>
8271
8272 PR c++/63249
8273 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8274 on low_bound and length.
8275
8276 2014-09-24 Marek Polacek <polacek@redhat.com>
8277
8278 PR c/61405
8279 PR c/53874
8280 * c-parser.c: Don't define CPP_KEYWORD.
8281 (c_parser_switch_statement): Pass original type to c_finish_case.
8282 * c-tree.h (c_finish_case): Update declaration.
8283 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
8284 conditionally to c_do_switch_warnings.
8285
8286 2014-09-03 Marek Polacek <polacek@redhat.com>
8287
8288 PR c/62024
8289 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8290 conversions.
8291
8292 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8293 Balaji V. Iyer <balaji.v.iyer@intel.com>
8294 Igor Zamyatin <igor.zamyatin@intel.com>
8295
8296 * c-parser.c (c_parser_cilk_for): New function.
8297 (c_parser_cilk_grainsize): Likewise.
8298 (c_get_temp_regvar): Likewise.
8299 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8300 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8301 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8302 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8303 case.
8304
8305 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
8306
8307 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8308 with using HOST_WIDE_INT without truncation to 'int'
8309
8310 2014-08-22 Marek Polacek <polacek@redhat.com>
8311
8312 PR c++/62199
8313 * c-typeck.c (parser_build_binary_op): Adjust call to
8314 warn_logical_not_parentheses.
8315
8316 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
8317
8318 PR other/62008
8319 * c-parser.c (c_parser_array_notation): Check for correct
8320 type of an array added.
8321
8322 2014-08-19 Marek Polacek <polacek@redhat.com>
8323
8324 PR c++/62153
8325 * c-typeck.c (build_binary_op): If either operand of a comparison
8326 is a boolean expression, call maybe_warn_bool_compare.
8327
8328 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
8329
8330 PR c/45584
8331 * c-typeck.c (build_c_cast): Do a conversion even when the
8332 TYPE_MAIN_VARIANTs are the same.
8333
8334 2014-08-19 Marek Polacek <polacek@redhat.com>
8335
8336 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8337 pedwarn_c99 instead of pedwarn.
8338 (grokfield): Likewise.
8339 (warn_defaults_to): New function.
8340 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8341 Unconditionally call pedwarn_c99 instead of pedwarn.
8342 (start_function): Call warn_defaults_to instead of pedwarn_c99.
8343 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8344 check flag_isoc11 before.
8345 * c-errors.c (pedwarn_c99): Change the return type to bool.
8346 Handle -Wc99-c11-compat.
8347 * c-parser.c (disable_extension_diagnostics): Handle
8348 warn_c99_c11_compat.
8349 (restore_extension_diagnostics): Likewise.
8350 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8351 instead of pedwarn, don't check flag_isoc11 before.
8352 (c_parser_declspecs): Likewise.
8353 (c_parser_alignas_specifier): Likewise.
8354 (c_parser_alignof_expression): Likewise.
8355 (c_parser_generic_selection): Likewise.
8356 * c-tree.h (pedwarn_c99): Update declaration.
8357 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8358 of pedwarn_c99.
8359
8360 2014-08-19 Marek Polacek <polacek@redhat.com>
8361
8362 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8363 to pedwarn_c90.
8364 * c-errors.c: Include "opts.h".
8365 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8366 * c-parser.c (disable_extension_diagnostics): Handle negative value
8367 of warn_c90_c99_compat, too.
8368 (restore_extension_diagnostics): Likewise.
8369 (c_parser_compound_statement_nostart): Pass
8370 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8371
8372 2014-08-12 Marek Polacek <polacek@redhat.com>
8373
8374 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8375 Add pedwarn.
8376 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8377 Likewise.
8378 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8379
8380 2014-08-10 Marek Polacek <polacek@redhat.com>
8381
8382 PR c/51849
8383 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8384 Call pedwarn_c90 instead of pedwarn.
8385 (check_bitfield_type_and_width): Likewise.
8386 (declspecs_add_qual): Likewise.
8387 (declspecs_add_type): Likewise.
8388 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8389 Adjust to only call pedwarn_c90.
8390 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
8391 pedwarn_c90 instead of pedwarn.
8392 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8393 * c-parser.c (disable_extension_diagnostics): Handle
8394 warn_c90_c99_compat.
8395 (restore_extension_diagnostics): Likewise.
8396 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
8397 pedwarn_c90 instead of pedwarn.
8398 (c_parser_initelt): Likewise.
8399 (c_parser_postfix_expression): Likewise.
8400 (c_parser_postfix_expression_after_paren_type): Likewise.
8401 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8402 * c-tree.h: Fix formatting.
8403 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
8404 pedwarn_c90 instead of pedwarn.
8405
8406 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8407
8408 * c-typeck.c: Remove include of pointer-set.h.
8409
8410 2014-08-07 Marek Polacek <polacek@redhat.com>
8411
8412 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8413
8414 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8415
8416 * c-typeck.c: Use hash_map instead of pointer_map.
8417
8418 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8419
8420 * c-decl.c: Use hash_set instead of pointer_set.
8421
8422 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8423
8424 PR middle-end/61455
8425 * c-array-notation.c (expand_array_notations): Handling
8426 of DECL_EXPR added.
8427
8428 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8429
8430 PR c++/60517
8431 * c-typeck.c (c_finish_return): Return 0 instead of the address of
8432 a local variable.
8433
8434 2014-07-30 Tom Tromey <tromey@redhat.com>
8435
8436 * c-typeck.c (struct constructor_stack) <designator_depth>: New
8437 field.
8438 (really_start_incremental_init, push_init_level): Initialize
8439 designator_depth.
8440 (pop_init_level): Set global designator_depth.
8441 (process_init_element): Check for designated_init attribute.
8442
8443 2014-07-20 Marek Polacek <polacek@redhat.com>
8444
8445 PR c/61852
8446 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
8447 (implicitly_declare): Pass location to implicit_decl_warning.
8448
8449 2014-07-14 Jakub Jelinek <jakub@redhat.com>
8450
8451 PR middle-end/61294
8452 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8453 If non-NULL, call c_parser_check_literal_zero.
8454 (c_parser_check_literal_zero): New function.
8455 (c_parser_postfix_expression_after_primary): Adjust
8456 c_parser_expr_list caller, handle -Wmemset-transposed-args.
8457
8458 2014-07-06 Marek Polacek <polacek@redhat.com>
8459
8460 PR c/6940
8461 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8462 * c-tree.h (C_ARRAY_PARAMETER): Define.
8463 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8464 function parameter.
8465
8466 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
8467 Chen Gang <gang.chen.5i5j@gmail.com>
8468
8469 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8470 releasing symbol.
8471
8472 2014-07-01 Marek Polacek <polacek@redhat.com>
8473
8474 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8475 instead of 0 to WARN_FOR_ASSIGNMENT.
8476
8477 2014-07-01 Marek Polacek <polacek@redhat.com>
8478
8479 PR c/58286
8480 * c-typeck.c (convert_for_assignment): Pass
8481 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8482
8483 2014-06-30 Marek Polacek <polacek@redhat.com>
8484
8485 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8486 has no_sanitize_undefined attribute.
8487
8488 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
8489
8490 PR middle-end/57541
8491 * c-array-notation.c (fix_builtin_array_notation_fn):
8492 Check for 0 arguments in builtin call. Check that bultin argument is
8493 correct.
8494 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8495 index.
8496
8497 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
8498
8499 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8500 qualifiers in __auto_type for atomic types.
8501 (c_parser_typeof_specifier): Discard all type qualifiers in
8502 __typeof__ for atomic types.
8503
8504 2014-06-25 Marek Polacek <polacek@redhat.com>
8505
8506 PR c/61162
8507 * c-parser.c (c_parser_statement_after_labels): Pass the location of
8508 the return expression to c_finish_return.
8509
8510 2014-06-25 Jakub Jelinek <jakub@redhat.com>
8511
8512 * c-typeck.c (c_finish_omp_clauses): Make sure
8513 OMP_CLAUSE_LINEAR_STEP has correct type.
8514
8515 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8516
8517 * c-decl.c: Adjust.
8518
8519 2014-06-24 Jakub Jelinek <jakub@redhat.com>
8520
8521 * c-parser.c (c_parser_omp_for_loop): For
8522 #pragma omp parallel for simd move lastprivate clause from parallel
8523 to for rather than simd.
8524
8525 2014-06-23 Marek Polacek <polacek@redhat.com>
8526
8527 * c-typeck.c (parser_build_binary_op): Don't call
8528 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8529
8530 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8531
8532 * c-parser.c (c_parser_omp_threadprivate): Likewise.
8533 * c-decl.c (merge_decls): Likewise.
8534
8535 2014-06-09 Marek Polacek <polacek@redhat.com>
8536
8537 PR c/36446
8538 * c-typeck.c (error_init): Call inform instead of error_at.
8539 (pedwarn_init): Call inform instead of pedwarn.
8540 (warning_init): Call inform instead of warning_at.
8541
8542 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
8543
8544 * c-decl.c (merge_decls): Use set_decl_section_name.
8545 (duplicate_decls): Remove node if it exists.
8546
8547 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
8548
8549 PR c/53119
8550 * c-typeck.c (push_init_level, process_init_element,
8551 pop_init_level): Correct check for zero initialization, move
8552 missing brace warning to respect zero initialization.
8553
8554 2014-06-05 Marek Polacek <polacek@redhat.com>
8555
8556 PR c/56724
8557 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8558
8559 2014-06-05 Marek Polacek <polacek@redhat.com>
8560
8561 PR c/49706
8562 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8563 on the left hand side operand of a comparison.
8564
8565 2014-06-05 Marek Polacek <polacek@redhat.com>
8566
8567 PR c/48062
8568 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8569 Print note only if the warning was printed.
8570
8571 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8572
8573 PR c/58942
8574 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8575 with a pointer.
8576
8577 2014-06-03 Marek Polacek <polacek@redhat.com>
8578
8579 PR c/60439
8580 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8581 c_start_case.
8582 * c-tree.h (c_start_case): Update.
8583 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8584 switch condition has boolean value.
8585
8586 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
8587
8588 * c-decl.c: Include builtins.h.
8589 * c-parser.c: Likewise.
8590
8591 2014-05-27 Marek Polacek <polacek@redhat.com>
8592
8593 PR c/56724
8594 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8595 error and warning calls to error_at and warning_at. Pass location of
8596 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8597 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8598 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8599
8600 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8601
8602 PR c/61191
8603 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8604 function parameters.
8605
8606 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
8607
8608 * c-decl.c (merge_decls): Preserve symtab node pointers.
8609 (duplicate_decls): Free new decl.
8610
8611 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8612
8613 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8614 initialization.
8615
8616 * c-parser.c (c_parser_omp_target): Return bool values.
8617
8618 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8619
8620 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8621 num_teams_loc variable to num_thread_limit_loc.
8622
8623 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8624
8625 * c-array-notation.c (expand_array_notations): Use void_node
8626 instead of void_zero_node.
8627
8628 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8629
8630 * c-decl.c (finish_struct): Adjust.
8631 (finish_enum): Likewise.
8632 (bind): Adjust.
8633 (record_inline_static): Likewise.
8634 (push_scope): Likewise.
8635 (make_label): Likewise.
8636 (lookup_label_for_goto): Likewise.
8637 (finish_struct): Likewise.
8638 (finish_enum): Likewise.
8639 (store_parm_decls): Likewise.
8640 (c_push_function_context): Likewise.
8641 * c-lang.h: Remove usage of variable_size gty attribute.
8642 * c-parser.c (c_parse_init): Adjust.
8643 (c_parse_file): Likewise.
8644
8645 2014-05-13 Marek Polacek <polacek@redhat.com>
8646
8647 PR c/61162
8648 * c-typeck.c (convert_for_assignment): Pass location to
8649 WARN_FOR_ASSIGNMENT instead of input_location.
8650
8651 2014-05-10 Marek Polacek <polacek@redhat.com>
8652
8653 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8654 maybe_warn_string_init.
8655 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8656 maybe_warn_string_init.
8657 * c-tree.h (maybe_warn_string_init): Update declaration.
8658 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8659 Call pedwarn_init with loc instead of with input_location.
8660 (digest_init): Pass init_loc to maybe_warn_string_init.
8661 (pop_init_level): Call pedwarn_init with loc instead of with
8662 input_location.
8663 (set_init_index): Likewise.
8664 (process_init_element): Likewise.
8665
8666 2014-05-09 Marek Polacek <polacek@redhat.com>
8667
8668 PR c/61096
8669 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8670 (c_parser_initelt): Pass location to set_init_label. Pass array index
8671 location to set_init_index.
8672 * c-tree.h (push_init_level): Update declaration.
8673 (pop_init_level): Likewise.
8674 (set_init_index): Likewise.
8675 (set_init_label): Likewise.
8676 * c-typeck.c (error_init): Add location parameter. Call error_at
8677 instead of error.
8678 (digest_init): Pass init_loc to error_init.
8679 (really_start_incremental_init):
8680 (push_init_level): Add location parameter. Pass loc to pop_init_level
8681 and error_init.
8682 (pop_init_level): Likewise.
8683 (set_designator): Add location parameter. Pass loc to pop_init_level,
8684 push_init_level, and error_init.
8685 (set_init_index): Add location parameter. Pass loc to error_init and
8686 set_designator.
8687 (set_init_label): Likewise.
8688 (output_init_element): Pass loc to error_init.
8689 (process_init_element): Pass loc to error_init, pop_init_level,
8690 pedwarn_init, and push_init_level.
8691
8692 2014-05-09 Marek Polacek <polacek@redhat.com>
8693
8694 PR c/50459
8695 * c-parser.c (c_parser_attributes): Parse the arguments as an
8696 expression-list if the attribute takes identifier.
8697
8698 2014-05-08 Marek Polacek <polacek@redhat.com>
8699
8700 PR c/61053
8701 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8702 TYPE_ALIGN_UNIT.
8703
8704 2014-05-08 Marek Polacek <polacek@redhat.com>
8705
8706 PR c/61077
8707 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8708 of main.
8709
8710 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8711 Mike Stump <mikestump@comcast.net>
8712 Richard Sandiford <rdsandiford@googlemail.com>
8713
8714 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8715 (finish_enum): Use wide-int interfaces.
8716 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8717 * c-typeck.c (build_c_cast): Likewise.
8718 (set_nonincremental_init_from_string): Likewise.
8719 (c_tree_equal): Likewise.
8720
8721 2014-05-02 Marek Polacek <polacek@redhat.com>
8722
8723 PR c/25801
8724 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8725 Return size_one_node when the type is not complete.
8726 (pointer_diff): Remove comment.
8727 (build_unary_op): Improve error messages.
8728
8729 2014-05-02 Marek Polacek <polacek@redhat.com>
8730
8731 * c-typeck.c (c_finish_return): Separate warning_at calls.
8732
8733 2014-05-02 Marek Polacek <polacek@redhat.com>
8734
8735 * c-tree.h (error_init): Remove declaration.
8736 (pedwarn_init): Likewise.
8737 * c-typeck.c (error_init): Make static and move above.
8738 (pedwarn_init): Likewise.
8739 (warning_init): Move above.
8740 (maybe_warn_string_init): Likewise.
8741
8742 2014-05-01 Jeff Law <law@redhat.com>
8743
8744 Revert:
8745
8746 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8747 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8748 avoid goto.
8749
8750 2014-05-02 Marek Polacek <polacek@redhat.com>
8751
8752 PR c/60784
8753 * c-typeck.c (push_init_level): Set constructor_designated to
8754 p->designated for structures.
8755
8756 2014-05-01 Marek Polacek <polacek@redhat.com>
8757
8758 PR c/60915
8759 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8760 function-definition has an attribute after the declarator.
8761
8762 2014-05-01 Marek Polacek <polacek@redhat.com>
8763
8764 PR c/60257
8765 * c-typeck.c (warning_init): Add location_t parameter. Call
8766 warning_at instead of warning.
8767 (push_init_level): Pass input_location to warning_init.
8768 (add_pending_init): Add location_t parameter. Pass loc to
8769 warning_init.
8770 (set_nonincremental_init): Pass input_location to add_pending_init.
8771 (set_nonincremental_init_from_string): Likewise.
8772 (output_init_element): Pass loc to warning_init and to
8773 add_pending_init.
8774
8775 2014-05-01 Marek Polacek <polacek@redhat.com>
8776
8777 PR c/43395
8778 * c-typeck.c (c_finish_return): Distinguish between label and variable
8779 when warning about returning local address.
8780
8781 2014-05-01 Marek Polacek <polacek@redhat.com>
8782
8783 PR c/29467
8784 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8785 in C89 mode.
8786
8787 2014-05-01 Marek Polacek <polacek@redhat.com>
8788
8789 PR c/43245
8790 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8791 instead of 0 to WARN_FOR_QUALIFIERS.
8792
8793 2014-05-01 Marek Polacek <polacek@redhat.com>
8794
8795 PR c/56989
8796 * c-typeck.c (default_conversion): Use better location for
8797 error call.
8798
8799 2014-04-30 Marek Polacek <polacek@redhat.com>
8800
8801 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8802 also when SANITIZE_FLOAT_DIVIDE is on.
8803
8804 2014-04-30 Marek Polacek <polacek@redhat.com>
8805
8806 PR c/60139
8807 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8808 and pedwarn_init. Use loc insted of input_location.
8809
8810 2014-04-30 Marek Polacek <polacek@redhat.com>
8811
8812 PR c/60351
8813 * c-typeck.c (build_binary_op): Use location when warning about
8814 shift count.
8815
8816 2014-04-25 Marek Polacek <polacek@redhat.com>
8817
8818 PR c/18079
8819 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8820 always_inline/noinline and hot/cold attributes.
8821
8822 2014-04-25 Marek Polacek <polacek@redhat.com>
8823
8824 PR c/60114
8825 * c-parser.c (c_parser_initelt): Pass input_location to
8826 process_init_element.
8827 (c_parser_initval): Pass loc to process_init_element.
8828 * c-tree.h (process_init_element): Adjust declaration.
8829 * c-typeck.c (push_init_level): Pass input_location to
8830 process_init_element.
8831 (pop_init_level): Likewise.
8832 (set_designator): Likewise.
8833 (output_init_element): Add location_t parameter. Pass loc to
8834 digest_init.
8835 (output_pending_init_elements): Pass input_location to
8836 output_init_element.
8837 (process_init_element): Add location_t parameter. Pass loc to
8838 output_init_element.
8839
8840 2014-04-24 Jakub Jelinek <jakub@redhat.com>
8841
8842 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8843 atomic-clause, allow comma in between atomic-clause and
8844 seq_cst.
8845
8846 2014-04-22 Jakub Jelinek <jakub@redhat.com>
8847
8848 PR c/59073
8849 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8850 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8851
8852 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8853
8854 PR middle-end/60469
8855 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8856 create_tmp_var instead build_decl for creating temps.
8857 (build_array_notation_expr): Likewise.
8858 (fix_conditional_array_notations_1): Likewise.
8859 (fix_array_notation_expr): Likewise.
8860 (fix_array_notation_call_expr): Likewise.
8861
8862 2014-03-28 Jakub Jelinek <jakub@redhat.com>
8863
8864 PR c++/60689
8865 * c-tree.h (c_build_function_call_vec): New prototype.
8866 * c-typeck.c (build_function_call_vec): Don't call
8867 resolve_overloaded_builtin here.
8868 (c_build_function_call_vec): New wrapper function around
8869 build_function_call_vec. Call resolve_overloaded_builtin here.
8870 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8871 Call c_build_function_call_vec instead of build_function_call_vec.
8872 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8873 * c-decl.c (finish_decl): Likewise.
8874
8875 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8876
8877 PR c/55383
8878 * c-typeck.c: Use correct format string in cast-qual warning
8879
8880 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8881
8882 * c-decl.c (c_decl_attributes): Use
8883 lang_hooks.types.omp_mappable_type.
8884 * c-typeck.c (c_finish_omp_clauses): Likewise.
8885
8886 2014-03-06 Marek Polacek <polacek@redhat.com>
8887
8888 PR c/60197
8889 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8890 of checking tree code.
8891
8892 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8893
8894 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8895 (c_parser_parameter_declaration): Likewise.
8896
8897 2014-02-19 Marek Polacek <polacek@redhat.com>
8898
8899 PR c/60195
8900 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8901 Call mark_exp_read on exp.value.
8902 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8903 TREE_ADDRESSABLE on old instead of val.
8904 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8905
8906 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8907
8908 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8909 C_EXPR_APPEND by vec_safe_push.
8910 * c-tree.h (C_EXPR_APPEND): Remove.
8911
8912 2014-01-31 Marek Polacek <polacek@redhat.com>
8913
8914 PR c/59963
8915 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8916 build_function_call_vec.
8917 (build_function_call): Likewise.
8918 (build_atomic_assign): Likewise.
8919 (build_function_call_vec): Add arg_loc parameter. Use it.
8920 (convert_arguments): Likewise.
8921 (convert_for_assignment): Rename rhs_loc to expr_loc.
8922 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8923 (c_parser_objc_keywordexpr): Likewise.
8924 (c_parser_postfix_expression_after_primary): Call
8925 build_function_call_vec with expr_loc rather than op_loc.
8926 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8927 build_function_call_vec.
8928 (c_parser_expr_list): Add locations parameter. Fill it with locations
8929 of function arguments.
8930 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8931
8932 2014-01-30 Marek Polacek <polacek@redhat.com>
8933
8934 PR c/59940
8935 * c-typeck.c (build_function_call_vec): Use loc parameter.
8936 (convert_arguments): Add location parameter. Use it.
8937 (ep_convert_and_check): Likewise.
8938 (build_atomic_assign): Adjust convert_for_assignment call.
8939 (build_modify_expr): Likewise.
8940 (digest_init): Likewise.
8941 (c_finish_return): Likewise.
8942 (build_conditional_expr): Adjust ep_convert_and_check calls.
8943 (convert_for_assignment): Add rhs_loc parameter. Use it.
8944 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8945 calls.
8946
8947 2014-01-30 Richard Biener <rguenther@suse.de>
8948
8949 PR c/59905
8950 * c-typeck.c (build_function_call_vec): Do not replace calls
8951 to a function via an incompatible type with a runtime abort.
8952
8953 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8954
8955 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8956 flag_enable_cilkplus with flag_cilkplus.
8957 (c_parser_direct_declarator_inner): Likewise.
8958 (c_parser_attribute_any_word): Likewise.
8959 (c_parser_attributes): Likewise.
8960 (c_parser_compound_statement): Likewise.
8961 (c_parser_statement_after_labels): Likewise.
8962 (c_parser_if_statement): Likewise.
8963 (c_parser_switch_statement): Likewise.
8964 (c_parser_do_statement): Likewise.
8965 (c_parser_for_statement): Likewise.
8966 (c_parser_unary_expression): Likewise.
8967 (c_parser_postfix_expression): Likewise.
8968 (c_parser_postfix_expression_after_primary): Likewise.
8969 (c_parser_postfix_expression_after_primary): Likewise.
8970 (c_parser_omp_clause_name): Likewise.
8971 (c_finish_omp_declare_simd): Likewise.
8972 (c_parser_cilk_verify_simd): Likewise.
8973 * c-typeck.c (build_array_ref): Likewise.
8974 (build_function_call_vec): Likewise.
8975 (convert_arguments): Likewise.
8976 (build_compound_expr): Likewise.
8977 (c_finish_return): Likewise.
8978 (c_finish_if_stmt): Likewise.
8979 (c_finish_loop): Likewise.
8980 (build_binary_op): Likewise.
8981
8982 2014-01-23 Marek Polacek <polacek@redhat.com>
8983
8984 PR c/59846
8985 * c-typeck.c (parser_build_binary_op): Use location instead of
8986 input_location.
8987 (build_binary_op): Pass location to shorten_compare.
8988
8989 2014-01-23 Marek Polacek <polacek@redhat.com>
8990
8991 PR c/58346
8992 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8993 an empty aggregate.
8994
8995 2014-01-23 Marek Polacek <polacek@redhat.com>
8996
8997 PR c/59871
8998 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8999 of a comma expression.
9000 (emit_side_effect_warnings): Likewise.
9001
9002 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9003
9004 PR c/59825
9005 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
9006 function to use walk_tree and moved a lot of its functionality to
9007 expand_array_notations.
9008 (expand_array_notations): New function.
9009
9010 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9011
9012 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
9013 attribute an attribute without value.
9014
9015 2014-01-23 Jakub Jelinek <jakub@redhat.com>
9016
9017 PR middle-end/58809
9018 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
9019 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
9020
9021 2014-01-22 Marek Polacek <polacek@redhat.com>
9022
9023 PR c/59891
9024 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
9025 of remove_c_maybe_const_expr on op1 and op2.
9026
9027 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9028
9029 PR c/58943
9030 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
9031 effects, preevaluate rhs using SAVE_EXPR first.
9032
9033 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
9034
9035 PR c++/59631
9036 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
9037 statements with if-elseif statements.
9038
9039 2014-01-06 Marek Polacek <polacek@redhat.com>
9040
9041 PR c/57773
9042 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
9043 defined bit-field types only in ISO C.
9044
9045 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9046
9047 Update copyright years
9048
9049 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9050
9051 * c-array-notation.c: Use the standard form for the copyright notice.
9052
9053 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9054
9055 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
9056 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
9057 field in parser is not empty. If not-empty, call the function
9058 c_parser_finish_omp_declare_simd.
9059 (c_parser_cilk_clause_vectorlength): Modified function to be shared
9060 between SIMD-enabled functions and #pragma simd. Added new parameter.
9061 (c_parser_cilk_all_clauses): Modified the usage of the function
9062 c_parser_cilk_clause_vectorlength as mentioned above.
9063 (c_parser_cilk_simd_fn_vector_attrs): New function.
9064 (c_finish_cilk_simd_fn_tokens): Likewise.
9065 (is_cilkplus_vector_p): Likewise.
9066 (c_parser_omp_clause_name): Added checking for "vectorlength,"
9067 "nomask," and "mask" strings in clause name.
9068 (c_parser_omp_all_clauses): Added 3 new case statements:
9069 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
9070 PRAGMA_CILK_CLAUSE_NOMASK.
9071 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
9072 check for vector attribute and if so call the function
9073 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
9074 called the function c_finish_cilk_simd_fn_tokens.
9075 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
9076 parser field is non-empty. If so, parse them as you would parse
9077 the omp declare simd pragma.
9078 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
9079 Added a check when step is a parameter and flag it as error.
9080 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
9081 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
9082 pragma_omp_clause.
9083
9084 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
9085
9086 * c-parser.c (c_parser_omp_parallel): Fix description.
9087
9088 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9089
9090 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
9091 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9092 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
9093 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
9094
9095 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9096
9097 PR c/52023
9098 * c-parser.c (c_parser_alignas_specifier): Use
9099 c_sizeof_or_alignof_type instead of c_alignof.
9100 (c_parser_alignof_expression): Likewise, with min_alignof
9101 parameter depending on alignof spelling used.
9102
9103 2013-12-04 Marek Polacek <polacek@redhat.com>
9104
9105 PR c/54113
9106 * c-decl.c (start_function): Don't warn for missing prototype for
9107 inline functions.
9108
9109 2013-12-03 Marek Polacek <polacek@redhat.com>
9110
9111 PR c/59351
9112 * c-decl.c (build_compound_literal): Allow compound literals with
9113 empty initial value.
9114
9115 2013-12-02 Joseph Myers <joseph@codesourcery.com>
9116
9117 PR c/58235
9118 * c-typeck.c (build_modify_expr): Diagnose assignment to
9119 expression with array type.
9120
9121 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9122
9123 PR c/42262
9124 * c-typeck.c (process_init_element): Do not treat a string as
9125 initializing a whole array when used with a designator for an
9126 individual element.
9127
9128 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9129
9130 PR c/57574
9131 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
9132 an inline function following a static declaration.
9133
9134 2013-11-28 Jakub Jelinek <jakub@redhat.com>
9135
9136 PR c/59310
9137 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
9138 to p_name before calling c_parser_omp_teams instead of after.
9139 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
9140 argument. Remove unused p_name variable.
9141
9142 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
9143 Jakub Jelinek <jakub@redhat.com>
9144
9145 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
9146 external_scope is NULL.
9147
9148 2013-11-27 Tom de Vries <tom@codesourcery.com>
9149 Marc Glisse <marc.glisse@inria.fr>
9150
9151 PR c++/59032
9152 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
9153
9154 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9155
9156 * c-typeck.c: Add required include files from gimple.h.
9157
9158 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9159
9160 * c-decl.c (define_label, shadow_tag_warned)
9161 (check_bitfield_type_and_width, grokdeclarator, grokparms,
9162 store_parm_decls_newstyle, store_parm_decls_oldstyle)
9163 (declspecs_add_type): Remove use of in_system_header macro.
9164 * c-parser.c (c_parser_unary_expression): Likewise.
9165 * c-typeck.c (store_init_value, process_init_element)
9166 (c_start_case): Likewise.
9167
9168 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
9169 macro.
9170
9171 * c-parser.c (c_parser_set_source_position_from_token): Remove
9172 reference to in_system_header from comment.
9173
9174 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9175
9176 * c-decl.c (grokdeclarator): Update comment to refer to
9177 tree_to_[su]hwi rather than tree_low_cst.
9178
9179 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9180
9181 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
9182 tree_to_uhwi throughout.
9183
9184 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9185
9186 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
9187 throughout.
9188
9189 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9190
9191 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
9192 throughout.
9193
9194 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9195
9196 * c-parser.c (c_parser_cilk_simd): New.
9197 (c_parser_cilk_verify_simd): New.
9198 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
9199 (c_parser_omp_for_loop): Add case for NE_EXPR.
9200 Set c_break_label for CILK_SIMD.
9201 (c_parser_cilk_clause_vectorlength): New.
9202 (c_parser_cilk_clause_linear): New.
9203 (c_parser_cilk_clause_name): New.
9204 (c_parser_cilk_all_clauses): New.
9205 * c-typeck.c (build_unary_op): Pass location argument to
9206 readonly_error.
9207 (build_modify_expr): Same.
9208 (build_asm_expr): Same.
9209 (c_finish_bc_stmt): Error on break/continue in loops.
9210
9211 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9212
9213 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
9214
9215 2013-11-14 Diego Novillo <dnovillo@google.com>
9216
9217 * c-decl.c: Include print-tree.h.
9218 Include stor-layout.h.
9219 Include varasm.h.
9220 Include attribs.h.
9221 Include stringpool.h.
9222 * c-lang.c: Include fold-const.h.
9223 * c-parser.c: Include stringpool.h.
9224 Include attribs.h.
9225 Include stor-layout.h.
9226 Include varasm.h.
9227 Include trans-mem.h.
9228 * c-typeck.c: Include stor-layout.h.
9229 Include trans-mem.h.
9230 Include varasm.h.
9231 Include stmt.h.
9232
9233 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9234
9235 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
9236 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
9237 __auto_type.
9238 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
9239 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
9240 RID_AUTO_TYPE.
9241 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
9242 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
9243 (c_parser_declarator, c_parser_direct_declarator_inner)
9244 (c_parser_parameter_declaration, c_parser_type_name): All callers
9245 changed.
9246 (c_parser_declaration_or_fndef): Handle declarations with type
9247 determined from the initializer.
9248
9249 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9250
9251 * c-typeck.c: Include gimplify.h.
9252
9253 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9254
9255 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
9256 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
9257 comment.
9258 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
9259 or _Thread_local as appropriate in diagnostics.
9260 (build_null_declspecs): Initialize ret->thread_gnu_p.
9261 (declspecs_add_scspec): Handle either __thread or _Thread_local
9262 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
9263 pedantic. Do not disallow _Thread_local extern and _Thread_local
9264 static.
9265
9266 2013-11-07 Joseph Myers <joseph@codesourcery.com>
9267 Andrew MacLeod <amacleod@redhat.com>
9268
9269 * c-aux-info.c (gen_type): Handle atomic qualifier.
9270 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9271 qualifiers when compating types.
9272 (shadow_tag_warned): Handle atomic_p in declspecs.
9273 (quals_from_declspecs): Likewise.
9274 (start_decl): Use c_type_promotes_to when promoting argument
9275 types.
9276 (grokdeclarator): Handle _Atomic.
9277 (get_parm_info): Diagnose any qualifier on "void" as only
9278 parameter.
9279 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9280 comparing types. Use c_type_promotes_to when promoting argument
9281 types.
9282 (finish_function): Use c_type_promotes_to when promoting argument
9283 types.
9284 (build_null_declspecs): Handle atomic_p in declspecs.
9285 (declspecs_add_qual): Handle RID_ATOMIC.
9286 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9287 (c_token_starts_declspecs): Handle RID_ATOMIC.
9288 (c_parser_declspecs): Handle atomic type specifiers and
9289 qualifiers.
9290 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9291 from types of expressions with atomic type.
9292 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9293 (c_parser_attribute_any_word): Handle RID_ATOMIC.
9294 (c_parser_initializer, c_parser_initelt, c_parser_initval)
9295 (c_parser_statement_after_labels, c_parser_switch_statement)
9296 (c_parser_for_statement, c_parser_expr_no_commas)
9297 (c_parser_conditional_expression, c_parser_binary_expression)
9298 (c_parser_cast_expression, c_parser_unary_expression)
9299 (c_parser_postfix_expression)
9300 (c_parser_postfix_expression_after_primary, c_parser_expression):
9301 Use convert_lvalue_to_rvalue.
9302 (c_parser_expression_conv, c_parser_expr_list): Document
9303 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
9304 (c_parser_objc_synchronized_statement): Use
9305 convert_lvalue_to_rvalue.
9306 (c_parser_objc_selector): Handle RID_ATOMIC.
9307 (c_parser_objc_receiver, c_parser_array_notation): Use
9308 convert_lvalue_to_rvalue.
9309 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9310 _Atomic (type-name).
9311 (struct c_declspecs): Add atomic_p field.
9312 (convert_lvalue_to_rvalue): Declare.
9313 * c-typeck.c (c_type_promotes_to): Promote atomic types to
9314 corresponding atomic types.
9315 (qualify_type): Don't add _Atomic qualifiers from second argument.
9316 (comp_target_types): Do not allow _Atomic mismatches.
9317 (type_lists_compatible_p): Do not remove atomic qualifiers when
9318 comparing types.
9319 (really_atomic_lvalue, convert_lvalue_to_rvalue)
9320 (build_atomic_assign): New functions.
9321 (build_unary_op): Use build_atomic_assign for atomic increment and
9322 decrement.
9323 (build_conditional_expr): Do not treat _Atomic void as a qualified
9324 version of void.
9325 (build_modify_expr): Use build_atomic_assign for atomic LHS.
9326 (find_anonymous_field_with_type, convert_to_anonymous_field)
9327 (convert_for_assignment): Do not remove atomic qualifiers when
9328 comparing types.
9329 (digest_init): Do not accept initialization of arrays of atomic
9330 elements by string constants.
9331 (build_asm_expr): Use convert_lvalue_to_rvalue.
9332 (build_binary_op): Do not treat _Atomic void as a qualified
9333 version of void.
9334
9335 2013-11-06 DJ Delorie <dj@redhat.com>
9336
9337 * c-decl.c (locate_old_decl): If a previous conflicting decl is
9338 both explicit and builtin, print the location of the explicit one.
9339
9340 2013-11-05 Tobias Burnus <burnus@net-b.de>
9341
9342 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9343 c_parser_omp_distribute, c_parser_omp_teams,
9344 c_parser_omp_target, c_parser_omp_declare): Handle
9345 -fopenmp-simd.
9346
9347 2013-11-03 Marek Polacek <polacek@redhat.com>
9348
9349 * c-decl.c (grokdeclarator): Add VLA instrumentation.
9350
9351 2013-11-01 Jakub Jelinek <jakub@redhat.com>
9352
9353 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9354 check_dup_generic at the end, unless remove is true.
9355 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9356 remove = true;.
9357 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9358
9359 2013-10-31 Jakub Jelinek <jakub@redhat.com>
9360
9361 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9362 with decl that is not pointer nor array.
9363
9364 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9365
9366 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9367 a spawning function is found.
9368 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9369 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9370 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9371 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9372 case.
9373 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9374 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9375 expr.
9376 (c_finish_return): Added a check to reject _Cilk_spawn in return
9377 expression.
9378 (build_cilk_spawn): New function.
9379 (build_cilk_sync): Likewise.
9380 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
9381
9382 2013-10-27 Tobias Burnus <burnus@net-b.de>
9383
9384 PR other/33426
9385 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9386 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9387 (c_parser_statement_after_labels): Update calls.
9388
9389 2013-10-24 Tobias Burnus <burnus@net-b.de>
9390
9391 PR other/33426
9392 * c-parser.c (c_parser_pragma, c_parser_for_statement):
9393 Handle PRAGMA_IVDEP.
9394 (c_parser_statement_after_labels): Update call.
9395
9396 2013-10-24 Marek Polacek <polacek@redhat.com>
9397
9398 * c-parser.c (c_parser_struct_declaration): Add a comment.
9399 (c_parser_declarator): Don't allow _Alignas here.
9400
9401 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
9402
9403 * c-parser.c: Include omp-low.h.
9404 * c-typeck.c: Likewise.
9405
9406 2013-10-17 Marek Polacek <polacek@redhat.com>
9407
9408 PR c/58267
9409 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9410 Document syntax of the array-declarator.
9411 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9412 are not permitted.
9413 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9414 (c_parser_struct_declaration): Likewise.
9415 (c_parser_declarator): Likewise.
9416 (c_parser_direct_declarator_inner): Likewise.
9417 (c_parser_parameter_declaration): Likewise.
9418 (c_parser_type_name): Likewise.
9419
9420 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9421
9422 * c-lang.h (current_omp_declare_target_attribute): New extern
9423 decl.
9424 * c-parser.c: Include c-lang.h.
9425 (struct c_parser): Change tokens to c_token *.
9426 Add tokens_buf field. Change tokens_avail type to unsigned int.
9427 (c_parser_consume_token): If parser->tokens isn't
9428 &parser->tokens_buf[0], increment parser->tokens.
9429 (c_parser_consume_pragma): Likewise.
9430 (enum pragma_context): Add pragma_struct and pragma_param.
9431 (c_parser_external_declaration): Adjust
9432 c_parser_declaration_or_fndef caller.
9433 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9434 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9435 Adjust recursive call.
9436 (c_parser_struct_or_union_specifier): Use pragma_struct instead
9437 of pragma_external.
9438 (c_parser_parameter_declaration): Use pragma_param instead of
9439 pragma_external.
9440 (c_parser_compound_statement_nostart, c_parser_label,
9441 c_parser_for_statement): Adjust
9442 c_parser_declaration_or_fndef callers.
9443 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9444 it through to c_parser_conditional_expression.
9445 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9446 pass it through to c_parser_binary_expression. Adjust recursive
9447 call.
9448 (c_parser_binary_expression): Remove prec argument, add
9449 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
9450 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9451 binop matches it, use build2 instead of parser_build_binary_op.
9452 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9453 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9454 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9455 Handle pragma_struct and pragma_param the same as pragma_external.
9456 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9457 (c_parser_omp_variable_list): Parse array sections for
9458 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9459 (c_parser_omp_clause_collapse): Fully fold collapse expression.
9460 (c_parser_omp_clause_reduction): Handle user defined reductions.
9461 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9462 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9463 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9464 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9465 c_parser_omp_clause_depend, c_parser_omp_clause_map,
9466 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9467 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9468 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9469 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
9470 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
9471 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9472 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
9473 (c_parser_omp_for_loop): Add CODE argument, pass it through
9474 to c_finish_omp_for. Change last argument to cclauses,
9475 and adjust uses to grab parallel clauses from the array of all
9476 the split clauses. Adjust c_parser_binary_expression,
9477 c_parser_declaration_or_fndef and c_finish_omp_for callers.
9478 (omp_split_clauses): New function.
9479 (c_parser_omp_simd): New function.
9480 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9481 Allow the function to be called also when parsing combined constructs,
9482 and call c_parser_omp_simd when parsing for simd.
9483 (c_parser_omp_sections_scope): If section-sequence doesn't start with
9484 #pragma omp section, require exactly one structured-block instead of
9485 sequence of statements.
9486 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9487 Allow the function to be called also when parsing combined constructs.
9488 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9489 Allow the function to be called also when parsing combined
9490 constructs.
9491 (c_parser_omp_taskgroup, c_parser_omp_cancel,
9492 c_parser_omp_cancellation_point, c_parser_omp_distribute,
9493 c_parser_omp_teams, c_parser_omp_target_data,
9494 c_parser_omp_target_update, c_parser_omp_target,
9495 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9496 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9497 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9498 (c_parser_omp_construct): Add p_name and mask vars. Handle
9499 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9500 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
9501 and c_parser_omp_sections callers.
9502 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9503 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9504 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9505 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
9506 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
9507 OMP_CLAUSE_DEPEND.
9508 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9509 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9510 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9511 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9512 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9513 * c-typeck.c: Include tree-inline.h.
9514 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9515 handle_omp_array_sections_1, handle_omp_array_sections,
9516 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9517 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9518 user defined reductions.
9519 (c_tree_equal): New function.
9520 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9521 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9522 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9523 c_check_omp_declare_reduction_r): New prototypes.
9524 * c-decl.c (current_omp_declare_target_attribute): New variable.
9525 (c_decl_attributes): New function.
9526 (start_decl, start_function): Use it instead of decl_attributes.
9527 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9528 c_omp_reduction_decl, c_omp_reduction_lookup,
9529 c_check_omp_declare_reduction_r): New functions.
9530
9531 2013-09-25 Tom Tromey <tromey@redhat.com>
9532
9533 * Make-lang.in (c/gccspec.o): Remove.
9534 (CFLAGS-c/gccspec.o): New variable.
9535 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9536 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9537 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9538
9539 2013-09-25 Tom Tromey <tromey@redhat.com>
9540
9541 * Make-lang.in (c/gccspec.o): Don't use subshell.
9542
9543 2013-09-18 Marek Polacek <polacek@redhat.com>
9544
9545 PR sanitize/58443
9546 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9547 Remove unnecessary check.
9548
9549 2013-09-18 Marek Polacek <polacek@redhat.com>
9550
9551 PR sanitizer/58411
9552 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9553 no_sanitize_undefined attribute.
9554
9555 2013-09-13 Kai Tietz <ktietz@redhat.com>
9556
9557 PR target/57848
9558 * c-decl.c (c_builtin_function_ext_scope): Remove
9559 wrong assumption that it is never called on prexisting
9560 symbol.
9561
9562 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9563
9564 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9565
9566 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9567
9568 * c-objc-common.c (c_tree_printer): Tidy.
9569
9570 2013-08-30 Marek Polacek <polacek@redhat.com>
9571
9572 * c-typeck.c (build_binary_op): Add division by zero and shift
9573 instrumentation.
9574
9575 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
9576 Joseph Myers <joseph@codesourcery.com>
9577
9578 PR c/35649
9579 * c-typeck.c (c_common_type): Prefer double_type_node over
9580 other REAL_TYPE types with the same precision.
9581 (convert_arguments): Likewise.
9582
9583 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9584
9585 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9586 (c_initialize_diagnostics): Call a destructor for the early printer.
9587
9588 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9589
9590 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9591 printer initialization.
9592
9593 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
9594
9595 PR c/57490
9596 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9597 check for truth values.
9598 (expand_array_notation_exprs): Added truth values case. Removed an
9599 unwanted else. Added for-loop to walk through subtrees in default
9600 case.
9601
9602 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9603
9604 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9605
9606 2013-07-23 Joseph Myers <joseph@codesourcery.com>
9607
9608 * c-parser.c (struct c_generic_association): Fix typo.
9609
9610 2013-07-23 Tom Tromey <tromey@redhat.com>
9611 Joseph Myers <joseph@codesourcery.com>
9612
9613 * c-parser.c (struct c_generic_association): New.
9614 (c_generic_association_d): New typedef.
9615 (c_parser_generic_selection): New function.
9616 (c_parser_postfix_expression): Handle RID_GENERIC.
9617
9618 2013-07-13 Jason Merrill <jason@redhat.com>
9619
9620 PR c++/57793
9621 * c-decl.c (finish_struct): Check for too-large class.
9622
9623 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
9624
9625 PR c/57821
9626 * c-typeck.c (set_init_index): When folding, check for index overflow.
9627
9628 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9629
9630 * c-parser.c (c_parser_array_notation): Removed rejection of array
9631 notations in an array of function pointers.
9632
9633 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9634
9635 * c-array-notation.c (make_triplet_val_inv): New function.
9636 (create_cmp_incr): Likewise.
9637 (create_array_refs): Likewise.
9638 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9639 Also modularized common parts between functions and called the function.
9640 (build_array_notation_expr): Likewise.
9641 (fix_conditional_array_notations_1): Likewise.
9642 (fix_array_notation_expr): Likewise.
9643 (fix_array_notation_call_expr): Likewise.
9644
9645 2013-06-18 Marek Polacek <polacek@redhat.com>
9646
9647 PR c/57630
9648 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9649
9650 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9651
9652 * c-array-notation.c (build_array_notation_expr): Reject array notation
9653 mismatch between LHS and RHS even inside a call_expr. Also, removed
9654 a couple while statements that were dead code.
9655
9656 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9657
9658 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9659 excessive precision expressions in function parameters. Also removed
9660 couple unwanted while statements.
9661
9662 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9663
9664 * c-array-notation.c (expand_array_notation_exprs): Added
9665 ARRAY_NOTATION_REF case.
9666
9667 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9668
9669 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9670 function to c-family/array-notation-common.c.
9671 (is_cilkplus_reduce_builtin): Likewise.
9672 (find_rank): Likewise.
9673 (extract_array_notation_exprs): Likewise.
9674 (replace_array_notations): Likewise.
9675 (find_inv_trees): Likewise.
9676 (replace_inv_trees): Likewise.
9677 (contains_array_notation_expr): Likewise.
9678 (find_correct_array_notation_type): Likewise.
9679 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9680 (struct inv_list): Moved this to c-family/array-notation-common.c.
9681 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9682
9683 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9684
9685 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9686 reduction functions outside the for-loop. Added a check if the fundecl
9687 is non-NULL. Finally, removed an unwanted if-statement, and made the
9688 body unconditional.
9689
9690 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9691
9692 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9693 condition of the if-statement matches the rank of else-block and then-
9694 block when array notations are used.
9695 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9696 expression after the entire function body is parsed.
9697 (c_parser_expr_no_commas): Delayed creating array notation expressions
9698 to the end of function parsing.
9699 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9700 whole if-statement instead of just the condition.
9701 (expand_array_notation_exprs): Added MODIFY_EXPR case.
9702
9703 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9704
9705 PR c/57474
9706 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9707 array to NULL_TREE if they are unused. Also added a check for the
9708 field to be NULL before its fields are used in future.
9709
9710 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9711
9712 PR bootstrap/57450
9713 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9714 (build_array_notation_expr): Likewise.
9715
9716 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9717
9718 * c-typeck.c (build_array_ref): Added a check to see if array's
9719 index is greater than one. If true, then emit an error.
9720 (build_function_call_vec): Exclude error reporting and checking
9721 for builtin array-notation functions.
9722 (convert_arguments): Likewise.
9723 (c_finish_return): Added a check for array notations as a return
9724 expression. If true, then emit an error.
9725 (c_finish_loop): Added a check for array notations in a loop
9726 condition. If true then emit an error.
9727 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9728 (build_binary_op): Added a check for array notation expr inside
9729 op1 and op0. If present, we call another function to find correct
9730 type.
9731 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9732 * c-parser.c (c_parser_compound_statement): Check if array
9733 notation code is used in tree, if so, then transform them into
9734 appropriate C code.
9735 (c_parser_expr_no_commas): Check if array notation is used in LHS
9736 or RHS, if so, then build array notation expression instead of
9737 regular modify.
9738 (c_parser_postfix_expression_after_primary): Added a check for
9739 colon(s) after square braces, if so then handle it like an array
9740 notation. Also, break up array notations in unary op if found.
9741 (c_parser_direct_declarator_inner): Added a check for array
9742 notation.
9743 (c_parser_compound_statement): Added a check for array notation in
9744 a stmt. If one is present, then expand array notation expr.
9745 (c_parser_if_statement): Likewise.
9746 (c_parser_switch_statement): Added a check for array notations in
9747 a switch statement's condition. If true, then output an error.
9748 (c_parser_while_statement): Similarly, but for a while.
9749 (c_parser_do_statement): Similarly, but for a do-while.
9750 (c_parser_for_statement): Similarly, but for a for-loop.
9751 (c_parser_unary_expression): Check if array notation is used in a
9752 pre-increment or pre-decrement expression. If true, then expand
9753 them.
9754 (c_parser_array_notation): New function.
9755 * c-array-notation.c: New file.
9756 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9757
9758 2013-05-23 Mike Stump <mikestump@comcast.net>
9759
9760 * c-typeck.c (convert_for_assignment): Handle references to memory
9761 spaces better.
9762
9763 2013-05-16 Jason Merrill <jason@redhat.com>
9764
9765 * Make-lang.in (cc1$(exeext)): Use link mutex.
9766
9767 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9768
9769 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9770 to simply use OPT_Wpointer_arith.
9771 (build_unary_op): Likewise.
9772
9773 2013-04-03 Jakub Jelinek <jakub@redhat.com>
9774
9775 PR c/19449
9776 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9777 argument. If set, or it temporarily for parsing of the first
9778 argument into force_folding_builtin_constant_p.
9779 (c_parser_postfix_expression): Adjust callers.
9780
9781 2013-03-21 Richard Biener <rguenther@suse.de>
9782
9783 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9784 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9785
9786 2013-02-12 Marek Polacek <polacek@redhat.com>
9787
9788 PR c/44938
9789 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9790 origtypes to NULL.
9791
9792 2013-01-24 Jakub Jelinek <jakub@redhat.com>
9793
9794 PR c/56078
9795 * c-typeck.c (set_nonincremental_init_from_string): If
9796 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9797 returned false.
9798 (process_init_element): Likewise.
9799
9800 2012-12-20 Jakub Jelinek <jakub@redhat.com>
9801
9802 PR c++/55619
9803 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9804 argument, don't call default_function_array_conversion
9805 nor c_fully_fold here.
9806 (c_parser_asm_statement): Adjust callers.
9807 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9808 and outputs here, and call default_function_array_conversion
9809 on inputs that don't need to be addressable.
9810
9811 2012-12-18 Jakub Jelinek <jakub@redhat.com>
9812
9813 PR c/39464
9814 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9815 warning require that both c_common_unsigned_type as well as
9816 c_common_signed_type is the same for both mvl and mvr types.
9817
9818 2012-11-16 Diego Novillo <dnovillo@google.com>
9819
9820 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9821
9822 * c-common.c: Use new vec API in vec.h.
9823 * c-common.h: Likewise.
9824 * c-gimplify.c: Likewise.
9825 * c-pragma.c: Likewise.
9826 * c-pretty-print.c: Likewise.
9827 * c-pretty-print.h: Likewise.
9828 * c-semantics.c: Likewise.
9829 * c-decl.c: Likewise.
9830 * c-parser.c: Likewise.
9831 * c-tree.h: Likewise.
9832 * c-typeck.c: Likewise.
9833
9834 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9835
9836 PR c++/54930
9837 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9838
9839 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9840
9841 PR c/53066
9842 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9843 shadows a function, unless the variable is a function or a
9844 pointer-to-function.
9845
9846 2012-10-12 Jakub Jelinek <jakub@redhat.com>
9847
9848 PR c/54381
9849 * c-parser.c (struct c_tree_loc_pair): Removed.
9850 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9851 add location_t * and tree * arguments, fill in array of 3
9852 sizeof_arg trees and corresponding locs.
9853 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9854 c_parser_expr_list callers.
9855 (c_parser_postfix_expression_after_primary): Likewise. Pass
9856 array of 3 sizeof_arg trees and locs (corresponding to first
9857 3 arguments) to sizeof_pointer_memaccess_warning.
9858
9859 2012-10-09 Lawrence Crowl <crowl@google.com>
9860
9861 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9862 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9863 hash table.
9864
9865 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9866
9867 PR c++/54194
9868 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9869 call.
9870
9871 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
9872
9873 PR c++/54427
9874 * c-typeck.c: Include c-common.h.
9875 (enum stv_conv): Moved to c-common.h.
9876 (scalar_to_vector): Moved to c-common.c.
9877 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9878 * Make-lang.in: c-typeck.c depends on c-common.h.
9879
9880 2012-10-04 Arnaud Charlet <charlet@adacore.com>
9881
9882 * c-decl.c (c_write_global_declarations): Fix handling of
9883 -fdump-ada-spec*.
9884
9885 2012-09-30 Sharad Singhai <singhai@google.com>
9886
9887 * c-decl.c (c_write_global_declarations): Use a different method
9888 to determine if the dump has ben initialized.
9889
9890 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9891
9892 PR c/54552
9893 * c-typeck.c (c_cast_expr): When casting to a type requiring
9894 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9895 c_fully_fold first.
9896
9897 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9898
9899 PR c/54103
9900 * c-typeck.c (build_unary_op): Pass original argument of
9901 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9902 any C_MAYBE_CONST_EXPR, if it has integer operands.
9903 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9904 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9905 to c_objc_common_truthvalue_conversion, then remove any
9906 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9907 c_objc_common_truthvalue_conversion not
9908 c_common_truthvalue_conversion.
9909 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9910 call note_integer_operands for arguments with integer operands
9911 that are not integer constants.
9912
9913 2012-09-13 Jakub Jelinek <jakub@redhat.com>
9914
9915 PR c/54559
9916 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9917 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9918
9919 2012-08-31 Jakub Jelinek <jakub@redhat.com>
9920
9921 PR c/54428
9922 * c-convert.c (convert): Don't call fold_convert_loc if
9923 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9924 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9925 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9926
9927 2012-08-24 Jakub Jelinek <jakub@redhat.com>
9928
9929 PR c/54355
9930 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9931 for nested and empty_ok arguments in the call to
9932 c_parser_declaration_or_fndef.
9933
9934 2012-08-17 Jakub Jelinek <jakub@redhat.com>
9935
9936 * c-tree.h (c_last_sizeof_arg): Declare.
9937 * c-parser.c (struct c_tree_loc_pair): New type.
9938 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9939 non-NULL.
9940 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9941 (c_parser_postfix_expression_after_primary): Likewise. Call
9942 sizeof_pointer_memaccess_warning if needed.
9943 (sizeof_ptr_memacc_comptypes): New function.
9944 * c-typeck.c (c_last_sizeof_arg): New global variable.
9945 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9946
9947 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
9948
9949 * c-lang.h (lang_decl): Add variable_size GTY option.
9950
9951 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9952
9953 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9954 * Make-lang.in: Fix dependencies.
9955
9956 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9957
9958 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9959 and add language Makefile hooks.
9960 * config-lang.in: New file.
9961 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9962 add the required "normal" config-lang.in rules.
9963 * c-lang.h: Moved from gcc/ to here.
9964 * c-tree.h: Likewise.
9965 * c-objc-common.c: Likewise.
9966 * c-objc-common.h: Likewise.
9967 * c-typeck.c: Likewise.
9968 * c-convert.c: Likewise.
9969 * c-lang.c: Likewise.
9970 * c-aux-info.c: Likewise.
9971 * c-errors.c: Likewise.
9972 * gccspec.c: Likewise.
9973 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9974 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9975 \f
9976 Copyright (C) 2012-2024 Free Software Foundation, Inc.
9977
9978 Copying and distribution of this file, with or without modification,
9979 are permitted in any medium without royalty provided the copyright
9980 notice and this notice are preserved.