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