Debian Codegraph @

gcc/c/ChangeLog

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