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