]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
c: Allow duplicate C2x standard attributes
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
efe71fcc
GA
12020-10-23 Marek Polacek <polacek@redhat.com>
2
3 PR c++/91741
4 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
5 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
6 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
7 * c-tree.h (char_type_p): Declare.
8 * c-typeck.c (char_type_p): No longer static.
9
102020-10-23 Martin Sebor <msebor@redhat.com>
11
12 PR middle-end/97552
13 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
14
2fe5b7d1
GA
152020-09-19 Martin Sebor <msebor@redhat.com>
16
17 PR c/50584
18 * c-decl.c (lookup_last_decl): Define new function.
19 (c_decl_attributes): Call it.
20 (start_decl): Add argument and use it.
21 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
22 (get_parm_array_spec): Define new function.
23 (push_parm_decl): Call get_parm_array_spec.
24 (start_function): Call warn_parm_array_mismatch. Build attribute
25 access and add it to current function.
26 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
27 in forms of array parameters.
28 * c-tree.h (start_decl): Add argument.
29
302020-09-19 Sandra Loosemore <sandra@codesourcery.com>
31
32 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
33 with...
34 (in_statement): New.
35 (start_function): Adjust for above change.
36 (c_push_function_context, c_pop_function_context): Likewise.
37 * c-lang.h (struct language_function): Likewise.
38 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
39 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
40 New.
41 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
42 (c_parser_switch_statement): Adjust break/switch context handling
43 and calls to renamed functions.
44 (c_parser_while_statement): Adjust break/switch context handling and
45 build a WHILE_STMT.
46 (c_parser_do_statement): Ditto, with DO_STMT respectively.
47 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
48 (c_parser_omp_for_loop): Adjust break/switch context handling.
49 * c-tree.h (c_break_label, c_cont_label): Delete.
50 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
51 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
52 (in_statement, switch_statement_break_seen_p): Declare.
53 (c_start_case, c_finish_case): Renamed to...
54 (c_start_switch, c_finish_switch).
55 (c_finish_bc_stmt): Adjust arguments.
56 * c-typeck.c (build_function_call_vec): Don't try to print
57 statements with %qE format.
58 (struct c_switch): Rename switch_expr field to switch_stmt.
59 Add break_stmt_seen_p field.
60 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
61 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
62 (do_case): Update for changes to struct c_switch.
63 (c_finish_case): Rename to c_finish_switch. Update for changes to
64 struct c_switch and change of representation from SWITCH_EXPR to
65 SWITCH_STMT.
66 (c_finish_loop): Delete.
67 (c_finish_bc_stmt): Update to reflect changes to break/continue
68 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
69 of a GOTO_EXPR except for objc foreach loops.
70
e1a4a8a0
GA
712020-09-01 Jakub Jelinek <jakub@redhat.com>
72
73 PR c++/96867
74 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
75 only on PARM_DECLs.
76
8f7ea26a
GA
772020-08-28 Martin Sebor <msebor@redhat.com>
78
79 PR c/96596
80 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
81 argument type.
82
8b394f01
GA
832020-08-27 Martin Liska <mliska@suse.cz>
84
85 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
86 growth function to true.
87
db0f6efe
GA
882020-08-25 Tobias Burnus <tobias@codesourcery.com>
89
90 PR c/96678
91 * c-typeck.c (handle_omp_array_sections_1): Talk about
92 array function parameter in the error message.
93
5c265693
GA
942020-08-18 Jakub Jelinek <jakub@redhat.com>
95
96 PR c/96571
97 * c-parser.c (c_parser_generic_selection): Change match_found from bool
98 to int, holding index of the match. Call mark_exp_read on the selector
99 expression and on expressions other than the selected one.
100
4967ca2f
GA
1012020-08-01 Richard Sandiford <richard.sandiford@arm.com>
102
103 PR c/96377
104 * c-typeck.c (process_init_element): Split test for whether to
105 recurse into a record, union or array into...
106 (initialize_elementwise_p): ...this new function. Don't recurse
107 into a vector type if the initialization value is also a vector.
108
48cc2e46
GA
1092020-07-31 Richard Biener <rguenther@suse.de>
110
111 PR debug/96383
112 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
113 Define to c_common_finalize_early_debug.
114
3ea9abca
GA
1152020-07-22 Tobias Burnus <tobias@codesourcery.com>
116
117 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
118 (c_parser_omp_critical): Permit hint(0) clause without named critical.
119 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
120
30430061
GA
1212020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
122
123 PR target/95237
124 * c-decl.c (finish_decl): Call target hook
125 lower_local_decl_alignment to lower local decl alignment.
126
3f8ca9cb
GA
1272020-07-09 Julian Brown <julian@codesourcery.com>
128 Thomas Schwinge <thomas@codesourcery.com>
129
130 PR middle-end/95270
131 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
132 for standalone attach/detach clauses.
133
a82c4c4c 1342020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
135
136 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
137 set, warn for conversion between pointers that point to incompatible
138 scalar storage orders.
139
f60ee68d
GA
1402020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
141
142 * c-parser.c (c_parser_statement_after_labels): Pass correct
143 parameters to c_parser_do_statement.
144
56638b9b
GA
1452020-06-16 Jakub Jelinek <jakub@redhat.com>
146
147 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
148 c_in_omp_for.
149 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
150 premature c_fully_fold. Defer explicit c_fully_fold calls to after
151 c_finish_omp_for.
152 * c-tree.h (c_in_omp_for): Declare.
153 * c-typeck.c (c_in_omp_for): Define.
154 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
155 (digest_init): Likewise.
156 (build_binary_op): Likewise.
157
1582020-06-16 Jakub Jelinek <jakub@redhat.com>
159
160 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
161 from kind by comma rather than colon.
162
1a59f3db
GA
1632020-06-05 Mark Wielaard <mark@klomp.org>
164
165 * c-decl.c (implicit_decl_warning): When warned and olddecl is
166 an undeclared builtin, then add a fixit header hint, if found.
167 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
168 warning_at about implicit builtin declaration type mismatch.
169
9a5b7438
GA
1702020-06-03 Mark Wielaard <mark@klomp.org>
171
172 * c-parser.c (struct c_parser): Add seen_string_literal
173 bitfield.
174 (c_parser_consume_token): Reset seen_string_literal.
175 (c_parser_error_richloc): Add name_hint if seen_string_literal
176 and next token is a CPP_NAME and we have a missing header
177 suggestion for the name.
178 (c_parser_string_literal): Set seen_string_literal.
179
1802020-06-03 Mark Wielaard <mark@klomp.org>
181
182 * c-parser.c (c_parser_postfix_expression_after_primary): Add
183 scope with matching_parens after CPP_OPEN_PAREN.
184
1852020-06-03 Tobias Burnus <tobias@codesourcery.com>
186
187 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
188
53ffb43a
GA
1892020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
190
191 * Make-lang.in: Remove extra slash.
192
8f66f175
ML
1932020-05-19 Martin Liska <mliska@suse.cz>
194
195 * c-parser.c: Fix typo.
196
49ddde69
JJ
1972020-05-14 Jakub Jelinek <jakub@redhat.com>
198
199 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
200
eb72dc66
RB
2012020-05-07 Richard Biener <rguenther@suse.de>
202
203 PR middle-end/94703
204 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
205 DECL_GIMPLE_REG_P.
206
bf915591
JJ
2072020-04-30 Jakub Jelinek <jakub@redhat.com>
208
209 PR c/94842
210 * c-decl.c (set_labels_context_r): In addition to context-less
211 LABEL_DECLs adjust also LABEL_DECLs with context equal to
212 parent function if any.
213 (store_parm_decls): Adjust comment.
214
e1113ffb
JJ
2152020-04-19 Jakub Jelinek <jakub@redhat.com>
216
217 PR objc/94637
218 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
219 two CPP_COLON tokens.
220
2e389749
JJ
2212020-04-17 Jakub Jelinek <jakub@redhat.com>
222
223 PR other/94629
224 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
225 to data.clauses.
226
2dc9294c
JJ
2272020-04-15 Jakub Jelinek <jakub@redhat.com>
228
229 PR c/94593
230 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
231 requires directive when not at file scope.
232
13e41d8b
TB
2332020-04-08 Tobias Burnus <tobias@codesourcery.com>
234
235 PR middle-end/94120
236 * c-decl.c (c_check_in_current_scope): New function.
237 * c-tree.h (c_check_in_current_scope): Declare it.
238 * c-parser.c (c_parser_oacc_declare): Add check that variables
239 are declared in the same scope as the directive. Fix handling
240 of namespace vars.
241
4df50a05
JJ
2422020-04-07 Jakub Jelinek <jakub@redhat.com>
243
244 PR c++/94512
245 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
246 if c_parser_omp_master succeeded.
247
5db9e893
JJ
2482020-03-23 Jakub Jelinek <jakub@redhat.com>
249
250 PR gcov-profile/94029
251 PR c/94239
252 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
253 the function_start_locus location. Don't do that afterwards for the
254 __GIMPLE body parsing.
255
9def91e9
JJ
2562020-03-19 Jakub Jelinek <jakub@redhat.com>
257
258 PR gcov-profile/94029
259 * c-tree.h (finish_function): Add location_t argument defaulted to
260 input_location.
261 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
262 set it to the locus of closing } if non-NULL.
263 (c_parser_compound_statement_nostart): Return locus of closing }.
264 (c_parser_parse_rtl_body): Likewise.
265 (c_parser_declaration_or_fndef): Propagate locus of closing } to
266 finish_function.
267 * c-decl.c (finish_function): Add end_loc argument, use it instead of
268 input_location to set function_end_locus.
269
046c5890
JJ
2702020-03-17 Jakub Jelinek <jakub@redhat.com>
271
272 PR c/94172
273 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
274 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
275 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
276 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
277 ENUMERAL_TYPEs.
278 (finish_incomplete_vars): New function, moved from finish_struct. Use
279 relayout_decl instead of layout_decl.
280 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
281 being TYPE_VFIELD. Use finish_incomplete_vars.
282 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
283 finish_incomplete_vars.
284 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
285 also on ENUMERAL_TYPEs.
286
c015ff8c
JJ
2872020-03-16 Jakub Jelinek <jakub@redhat.com>
288
289 PR c/94179
290 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
291
f2e9fe5f
MS
2922020-03-13 Martin Sebor <msebor@redhat.com>
293
294 PR c/94040
295 * c-decl.c (builtin_structptr_type_count): New constant.
296 (match_builtin_function_types): Reject decls that are incompatible
297 in types pointed to by pointers.
298 (diagnose_mismatched_decls): Adjust comments.
299
c9d70946
JM
3002020-03-05 Joseph Myers <joseph@codesourcery.com>
301
302 PR c/93577
303 * c-typeck.c (pop_init_level): Do not diagnose initializers as
304 empty when initialized type is error_mark_node.
305 (set_designator, process_init_element): Ignore initializers for
306 elements of a variable-size type or of error_mark_node.
307
726e292d
MS
3082020-03-01 Martin Sebor <msebor@redhat.com>
309
310 PR middle-end/93926
311 * c-decl.c (types_close_enough_to_match): New function.
312 (match_builtin_function_types):
313 (diagnose_mismatched_decls): Add missing inform call to a warning.
314
a499c2f8
MS
3152020-03-01 Martin Sebor <msebor@redhat.com>
316
317 PR c/93812
318 * c-typeck.c (build_functype_attribute_variant): New function.
319 (composite_type): Call it.
320
9c3da8cc
JJ
3212020-02-25 Jakub Jelinek <jakub@redhat.com>
322
323 PR other/93912
324 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
325 Rename last argument from probablity to probability.
326
bacdd5e9
JJ
3272020-02-13 Jakub Jelinek <jakub@redhat.com>
328
329 PR c/93576
330 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
331 *expr if it has side effects.
332
f9eb0973
JL
3332020-01-30 Jeff Law <law@redhat.com>
334
335 PR c/88660
336 * c-parser.c (c_parser_switch_statement): Make sure to request
337 marking the switch expr as used.
338
ac68e287
JM
3392020-01-22 Joseph Myers <joseph@codesourcery.com>
340
341 PR c/93348
342 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
343 argument with integer operands.
344
852f0ae8
KK
3452020-01-16 Kerem Kat <keremkat@gmail.com>
346
347 PR c/92833
348 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
349 to support 4 available tokens.
350
e2346a33
JM
3512020-01-15 Joseph Myers <joseph@codesourcery.com>
352
353 PR c/93072
354 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
355 determine whether to set DECL_CONTEXT.
356
3d77686d
JM
3572020-01-13 Joseph Myers <joseph@codesourcery.com>
358
359 PR c/93241
360 * c-typeck.c (build_c_cast): Check for expressions with integer
361 operands that can occur in an unevaluated part of an integer
362 constant expression and call note_integer_operands as needed.
363
f74c4b2c
RB
3642019-01-08 Richard Biener <rguenther@suse.de>
365
366 PR middle-end/93199
367 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
368 permanently.
369
8d9254fc
JJ
3702020-01-01 Jakub Jelinek <jakub@redhat.com>
371
372 Update copyright years.
373
39292e25
EB
3742019-12-20 Eric Botcazou <ebotcazou@adacore.com>
375
376 * c-decl.c (collect_source_ref_cb): Delete.
377 (for_each_global_decl): Rename into...
378 (collect_source_refs): ...this. Call collect_source_ref directly.
379 (c_parse_final_cleanups): Always call collect_source_ref on the main
380 input filename.
381
519d7496
JB
3822019-12-19 Julian Brown <julian@codesourcery.com>
383 Cesar Philippidis <cesar@codesourcery.com>
384
385 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
386 detach clauses.
387 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
388 Allow deref (->) in variable lists if true.
389 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
390 Pass to c_parser_omp_variable_list.
391 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
392 call to c_parser_omp_variable_list.
393 (c_parser_oacc_all_clauses): Support attach and detach clauses.
394 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
395 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
396 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
397 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
398 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
399 and detach. Support deref.
400 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
401 GOMP_MAP_ALWAYS_POINTER for OpenACC.
402 (c_oacc_check_attachments): New function.
403 (c_finish_omp_clauses): Check attach/detach arguments for being
404 pointers using above. Support deref.
405
a6163563
JB
4062019-12-19 Julian Brown <julian@codesourcery.com>
407 Maciej W. Rozycki <macro@codesourcery.com>
408 Tobias Burnus <tobias@codesourcery.com>
409 Thomas Schwinge <thomas@codesourcery.com>
410
411 * c-parser.c (c_parser_omp_clause_name): Support no_create.
412 (c_parser_oacc_data_clause): Likewise.
413 (c_parser_oacc_all_clauses): Likewise.
414 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
415 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
416 PRAGMA_OACC_CLAUSE_NO_CREATE.
417 * c-typeck.c (handle_omp_array_sections): Support
418 GOMP_MAP_NO_ALLOC.
419
d68f5d45
DM
4202019-12-09 David Malcolm <dmalcolm@redhat.com>
421
422 * c-objc-common.c (range_label_for_type_mismatch::get_text):
423 Replace label_text ctor calls.
424
4691bf46
JM
4252019-12-04 Joseph Myers <joseph@codesourcery.com>
426
427 PR c/36941
428 PR c/88827
429 * c-typeck.c (convert_lvalue_to_rvalue): Call
430 require_complete_type for arguments not of void types.
431 (build_indirect_ref): Do not diagnose dereferencing pointers to
432 incomplete types.
433 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
434
85d11957
JM
4352019-12-03 Joseph Myers <joseph@codesourcery.com>
436
437 PR c/88704
438 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
439 old-style parameter definitions.
440
4569f8b3
SL
4412019-12-01 Sandra Loosemore <sandra@codesourcery.com>
442
443 PR target/92499
444
445 * c-decl.c (flexible_array_type_p): Move to common code.
446
65ef05d0
RS
4472019-11-30 Richard Sandiford <richard.sandiford@arm.com>
448
449 * c-decl.c (start_decl): Allow initialization of variables whose
450 size is a POLY_INT_CST.
451 (finish_decl): Use verify_type_context to check whether the target
452 allows variables with a particular type to have static or thread-local
453 storage duration. Don't raise a second error if such variables do
454 not have a constant size.
455 (grokdeclarator): Use verify_type_context to check whether the
456 target allows fields or array elements to have a particular type.
457 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
458 the target allows pointer difference for the types involved.
459 (build_unary_op): Likewise for pointer increment and decrement.
460
34b43828
JM
4612019-11-29 Joseph Myers <joseph@codesourcery.com>
462
463 * c-parser.c (struct c_parser): Add members raw_tokens and
464 raw_tokens_used.
465 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
466 using previously-lexed raw tokens.
467 (c_parser_peek_nth_token_raw)
468 (c_parser_check_balanced_raw_token_sequence): New functions.
469 (c_parser_nth_token_starts_std_attributes): Use
470 c_parser_check_balanced_raw_token_sequence for Objective-C.
471
5b8d9367
JM
4722019-11-25 Joseph Myers <joseph@codesourcery.com>
473
474 PR c/91985
475 * c-decl.c (finish_declspecs): Use int instead of decimal
476 floating-point types if decimal floating-point not supported.
477
1723e1be
JM
4782019-11-25 Joseph Myers <joseph@codesourcery.com>
479
480 * c-tree.h (struct c_declarator): Use a structure for id member.
481 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
482 declarators at the start, not when handling individual declarators
483 later. Use u.id.id instead of u.id.
484 (grokfield): Use u.id.id instead of u.id.
485 (build_id_declarator): Set u.id.id and u.id.attrs.
486 (finish_declspecs): Handle postfix attributes in case of typedef
487 name or typeof used.
488 * c-parser.c (c_parser_direct_declarator)
489 (c_parser_direct_declarator_inner): Place declarator for
490 attributes inside that for function or array, not outside. Set
491 u.id.attrs for identifiers.
492 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
493 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
494 instead of u.id.
495
bdaf8be1
JJ
4962019-11-22 Jakub Jelinek <jakub@redhat.com>
497
498 PR c/90677
499 * c-decl.c (identifier_global_tag): Define.
500
3e00ba47
RB
5012019-11-20 Richard Biener <rguenther@suse.de>
502
503 PR c/92088
504 * c-decl.c (grokdeclarator): Prevent inlining of nested
505 function with VLA arguments.
506
8c5b727a
JM
5072019-11-20 Joseph Myers <joseph@codesourcery.com>
508
509 * c-decl.c (c_warn_type_attributes): New function.
510 (groktypename, grokdeclarator, finish_declspecs): Call
511 c_warn_type_attributes before applying attributes to types.
512 * c-tree.h (c_warn_type_attributes): Declare.
513
192961ff
JM
5142019-11-19 Joseph Myers <joseph@codesourcery.com>
515
516 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
517 standard attributes.
518 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
519 pedwarn for unknown standard attributes and return error_mark_node
520 for them.
521
20a38017
MM
5222019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
523
524 * c-parser.c (c_parser_parse_rtl_body): Always call
525 run_rtl_passes, even if startwith pass is not provided.
526
d5fbe5e0
JM
5272019-11-15 Joseph Myers <joseph@codesourcery.com>
528
529 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
530 duplicate standard attributes.
531
97cc1187
JM
5322019-11-15 Joseph Myers <joseph@codesourcery.com>
533
534 * c-decl.c (std_attribute_table): Add maybe_unused.
535
f8aea5e3
JM
5362019-11-15 Joseph Myers <joseph@codesourcery.com>
537
538 * c-decl.c (std_attribute_table): Add fallthrough.
539 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
540 attribute at top level.
541
2cc94aa8
JM
5422019-11-15 Joseph Myers <joseph@codesourcery.com>
543
544 * c-decl.c (std_attribute_table): New.
545 (c_init_decl_processing): Register attributes from
546 std_attribute_table.
547 * c-parser.c (c_parser_attribute_arguments): Add arguments
548 require_string and allow_empty_args. All callers changed.
549 (c_parser_std_attribute): Set require_string argument for
550 "deprecated" attribute.
551
7c5890cc
JM
5522019-11-14 Joseph Myers <joseph@codesourcery.com>
553
554 * c-parser.c (c_parser_postfix_expression)
555 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
556 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
557
e8738f4e
RS
5582019-11-14 Richard Sandiford <richard.sandiford@arm.com>
559
560 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
561 of build_same_sized_truth_vector_type.
562 (build_vec_cmp): Likewise.
563
b2417b59
JJ
5642019-11-14 Jakub Jelinek <jakub@redhat.com>
565
bedb7f04
JJ
566 * c-parser.c (c_parser_omp_context_selector): Don't require score
567 argument to fit into shwi, just to be INTEGER_CST. Diagnose
568 negative score.
569
b2417b59
JJ
570 * c-parser.c (c_parser_omp_context_selector): Rename
571 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
572 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
573 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
574 and string literals.
575
4e03c3a7
JM
5762019-11-14 Joseph Myers <joseph@codesourcery.com>
577
578 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
579 ctsk_tagfirstref_attrs.
580 (struct c_declspecs): Update description of attrs. Add
581 postfix_attrs and non_std_attrs_seen_p. Increase size of
582 typespec_kind bit-field.
583 (c_warn_unused_attributes): New declaration.
584 (parser_xref_tag): Update prototype.
585 * c-decl.c (c_warn_unused_attributes): New function.
586 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
587 ctsk_tagref_attrs. Handle attribute declarations.
588 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
589 (grokdeclarator): Handle standard attributes.
590 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
591 attributes to incomplete type reference.
592 (xref_tag): Update call to parser_xref_tag.
593 (declspecs_add_addrspace, declspecs_add_type)
594 (declspecs_add_scspec, declspecs_add_attrs): Set
595 non_std_attrs_seen_p.
596 (finish_declspecs): Apply postfix standard attributes to type.
597 * c-parser.c (c_token_starts_declspecs)
598 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
599 (c_parser_next_tokens_start_declaration): Update comments.
600 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
601 parser->tokens[2] to parser->tokens[1].
602 (c_parser_nth_token_starts_std_attributes)
603 (c_parser_std_attribute_specifier_sequence): New functions.
604 (c_parser_declaration_or_fndef): Add arguments have_attrs and
605 attrs. All callers changed. Handle standard attributes.
606 (c_parser_parms_declarator, c_parser_parms_list_declarator)
607 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
608 All callers changed.
609 (c_parser_declspecs): Add arguments start_std_attr_ok and
610 end_std_attr_ok. All callers changed. Handle standard
611 attributes.
612 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
613 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
614 (c_parser_compound_statement_nostart, c_parser_all_labels)
615 (c_parser_label, c_parser_statement, c_parser_for_statement):
616 Handle standard attributes.
617 * c-parser.h (c_parser_declspecs): Update prototype.
618 * gimple-parser.c (c_parser_gimple_declaration): Update call to
619 c_parser_declspecs.
620
0c29cac4
ML
6212019-11-12 Martin Liska <mliska@suse.cz>
622
623 * gimple-parser.c: Do not include params.h.
624
028d4092
ML
6252019-11-12 Martin Liska <mliska@suse.cz>
626
627 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
628 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
629 macro.
630
62aee289
MR
6312019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
632 Frederik Harwath <frederik@codesourcery.com>
633
634 gcc/c/
635 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
636 (c_parser_oacc_kernels_parallel): Rename function to...
637 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
638 (c_parser_omp_construct): Update accordingly.
639
640
7cec9588
JJ
6412019-11-11 Jakub Jelinek <jakub@redhat.com>
642
643 * c-parser.c (c_parser_translation_unit): Diagnose declare target
644 without corresponding end declare target.
645
f486280c
RS
6462019-11-08 Richard Sandiford <richard.sandiford@arm.com>
647
648 * c-convert.c (convert): Only handle vector conversions if one of
649 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
650 allows it.
651 * c-typeck.c (build_array_ref): Only allow vector indexing if the
652 vectors satisfy gnu_vector_type_p.
653 (build_unary_op): Only allow unary operators to be applied to
654 vectors if they satisfy gnu_vector_type_p.
655 (digest_init): Only allow by-element initialization of vectors
656 if they satisfy gnu_vector_type_p.
657 (really_start_incremental_init): Likewise.
658 (push_init_level): Likewise.
659 (pop_init_level): Likewise.
660 (process_init_element): Likewise.
661 (build_binary_op): Only allow binary operators to be applied to
662 vectors if they satisfy gnu_vector_type_p.
663
017c6491
JM
6642019-11-08 Joseph Myers <joseph@codesourcery.com>
665
666 * c-decl.c (grokparms): Convert () in a function definition to
667 (void) for C2x.
668 (store_parm_decls_oldstyle): Pedwarn for C2x.
669 (store_parm_decls): Update comment about () not generating a
670 prototype.
671
c01bd174
JM
6722019-11-07 Joseph Myers <joseph@codesourcery.com>
673
674 * c-parser.c (c_parser_attribute_arguments): New function.
675 Factored out of c_parser_gnu_attribute.
676 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
677 (c_parser_balanced_token_sequence, c_parser_std_attribute)
678 (c_parser_std_attribute_specifier): New functions.
679 (c_parser_transaction_attributes): Use
680 c_parser_std_attribute_specifier.
681
471c5330
JM
6822019-11-07 Joseph Myers <joseph@codesourcery.com>
683
684 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
685 lex_joined_string and translate_strings_p.
686 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
687 c_lex_with_flags.
688 (c_parser_string_literal): New function.
689 (c_parser_static_assert_declaration_no_semi): Use
690 c_parser_string_literal. Do not set lex_untranslated_string.
691 (c_parser_asm_string_literal): Use c_parser_string_literal.
692 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
693 (c_parser_gnu_attributes): Set and restore translate_strings_p
694 instead of lex_untranslated_string.
695 (c_parser_asm_statement): Do not set lex_untranslated_string.
696 (c_parser_asm_operands): Likewise.
697 (c_parser_has_attribute_expression): Set and restore
698 translate_strings_p instead of lex_untranslated_string.
699 (c_parser_postfix_expression): Use c_parser_string_literal.
700 (pragma_lex): Likewise.
701 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
702 (c_parse_file): Set translate_strings_p.
703 * gimple-parser.c (c_parser_gimple_postfix_expression)
704 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
705 * c-parser.c (c_parser_string_literal): Declare function.
706
d0c464d2
JJ
7072019-11-02 Jakub Jelinek <jakub@redhat.com>
708
709 * c-parser.c (c_finish_omp_declare_variant): Use
710 omp_get_context_selector instead of c_omp_get_context_selector.
711
ac2cfa6c
RS
7122019-10-29 Richard Sandiford <richard.sandiford@arm.com>
713
714 * c-tree.h (c_simulate_enum_decl): Declare.
715 * c-decl.c (c_simulate_enum_decl): New function.
716 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
717
74078538
RS
7182019-10-29 Richard Sandiford <richard.sandiford@arm.com>
719
720 * c-tree.h (c_simulate_builtin_function_decl): Declare.
721 * c-decl.c (c_simulate_builtin_function_decl): New function.
722 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
723 to the above.
724
ad1539d5
MS
7252019-10-28 Martin Sebor <msebor@redhat.com>
726
727 PR c/66970
728 * c-decl.c (names_builtin_p): Define a new function.
729
cb73e4e7
RB
7302019-10-28 Richard Biener <rguenther@suse.de>
731
732 PR c/92249
733 * gimple-parser.c (c_parser_parse_gimple_body): Make
734 current_bb the entry block initially to easier recover
735 from errors.
736 (c_parser_gimple_compound_statement): Adjust.
737
135df52c
JJ
7382019-10-24 Jakub Jelinek <jakub@redhat.com>
739
740 * c-parser.c (c_finish_omp_declare_variant): Use
741 omp_context_selector_matches instead of
742 c_omp_context_selector_matches.
743 * c-decl.c (c_decl_attributes): Add "omp declare target block"
744 attribute in between declare target and end declare target
745 pragmas.
746
783bfe5e
JM
7472019-10-15 Joseph Myers <joseph@codesourcery.com>
748
749 * c-parser.c (c_parser_attribute_any_word): Rename to
750 c_parser_gnu_attribute_any_word. All callers changed.
751 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
752 callers changed.
753 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
754 callers changed.
755 (c_parser_declaration_or_fndef, c_parser_declspecs)
756 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
757 (c_parser_struct_declaration, c_parser_declarator)
758 (c_parser_gnu_attribute, c_parser_compound_statement)
759 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
760 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
761 attribute-related syntax productions.
762
56898e43
RS
7632019-10-14 Richard Sandiford <richard.sandiford@arm.com>
764
765 * c-objc-common.c (useful_aka_type_p): Replace with...
766 (get_aka_type): ...this new function. Given the original type,
767 decide which aka type to print (if any). Only look through typedefs
768 if user_facing_original_type_p.
769 (print_type): Update accordingly.
770
b9424661
JJ
7712019-10-14 Jakub Jelinek <jakub@redhat.com>
772
773 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
774 into int NESTED, if it is 2, diagnose missing commas in between
775 clauses.
776 (c_parser_omp_context_selector): Pass 2 as last argument to
777 c_parser_omp_all_clauses.
778
20de9568
JJ
7792019-10-12 Jakub Jelinek <jakub@redhat.com>
780
781 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
782 For simd properties, put them directly into TREE_VALUE.
783 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
784 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
785 add "omp declare variant base" attribute rather than
786 "omp declare variant".
787
fe2bc27c
JM
7882019-10-11 Joseph Myers <joseph@codesourcery.com>
789
790 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
791
94e7f906
JJ
7922019-10-10 Jakub Jelinek <jakub@redhat.com>
793
794 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
795 true, terminate processing on closing paren and don't skip to end of
796 pragma line.
797 (c_parser_omp_declare_simd): Handle also declare variant.
798 (omp_construct_selectors, omp_device_selectors,
799 omp_implementation_selectors, omp_user_selectors): New variables.
800 (c_parser_omp_context_selector,
801 c_parser_omp_context_selector_specification,
802 c_finish_omp_declare_variant): New functions.
803 (c_finish_omp_declare_simd): Handle both declare simd and
804 declare variant.
805 (c_parser_omp_declare): Handle declare variant.
806
93313b94
JM
8072019-10-02 Joseph Myers <joseph@codesourcery.com>
808
809 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
810 CPP_COLON tokens.
811
55879815
RS
8122019-10-01 Richard Sandiford <richard.sandiford@arm.com>
813
814 * c-objc-common.c (useful_aka_type_p): New function.
815 (print_type): Use it to decide whether an aka type is worth printing.
816
59bc434a
JJ
8172019-09-27 Jakub Jelinek <jakub@redhat.com>
818
819 PR c++/88203
820 * c-parser.c (c_parser_predefined_identifier): New function.
821 (c_parser_postfix_expression): Use it.
822 (c_parser_omp_variable_list): Parse predefined identifiers.
823 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
824 in shared and firstprivate clauses, even when they are predetermined
825 shared.
826
c6447c20
RS
8272019-09-27 Richard Sandiford <richard.sandiford@arm.com>
828
829 * c-typeck.c (build_function_call_vec): Take the original function
830 decl as an optional final parameter. Pass all built-in calls to
831 check_builtin_function_arguments.
832
522da4c2
EB
8332019-09-20 Eric Botcazou <ebotcazou@adacore.com>
834
835 PR c/91815
836 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
837 of identifiers in the external scope only for variables and functions.
838
68e2c199
PK
8392019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
840
841 PR c/78736
842 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
843
22f8849d
IS
8442019-08-23 Iain Sandoe <iain@sandoe.co.uk>
845
846 PR pch/61250
847 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
848 after determining that the first token is not
849 PRAGMA_GCC_PCH_PREPROCESS.
850
db376f45
EB
8512019-08-22 Eric Botcazou <ebotcazou@adacore.com>
852
853 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
854 FUNCTION_DECL to the right value in the presence of nested declarators.
855
4d732405
RS
8562019-08-13 Richard Sandiford <richard.sandiford@arm.com>
857
858 PR middle-end/91421
859 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
860
cb1180d5
RS
8612019-08-13 Richard Sandiford <richard.sandiford@arm.com>
862
863 PR middle-end/91421
864 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
865 of a built_in_function.
866 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
867
77eb117f
JJ
8682019-08-10 Jakub Jelinek <jakub@redhat.com>
869
870 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
871 (c_parser_omp_clause_device_type): New function.
872 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
873 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
874 (c_parser_omp_declare_target): Handle device_type clauses. Remove
875 diagnostics for declare target with clauses nested in clause-less
876 declare target declaration-definition-seq.
877 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
878
2c3b8bad
JJ
8792019-08-09 Jakub Jelinek <jakub@redhat.com>
880
bb522e2e
JJ
881 * c-parser.c (check_no_duplicate_clause): Simplify using
882 omp_find_clause.
883 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
884 directive name modifiers.
885 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
886
2c3b8bad
JJ
887 PR c/91401
888 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
889 check_no_duplicate_clause call. Comment it out, instead emit a
890 warning for duplicate dist_schedule clauses.
891
99769e7f
RS
8922019-08-08 Richard Sandiford <richard.sandiford@arm.com>
893
894 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
895
8860d270
JJ
8962019-08-08 Jakub Jelinek <jakub@redhat.com>
897
898 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
899 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
900 instead of generic_head to track duplicates.
901
398e3feb
JJ
9022019-08-07 Jakub Jelinek <jakub@redhat.com>
903
904 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
905 (c_parser_omp_clause_use_device_addr): New function.
906 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
907 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
908 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
909 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
910 map or use_device_* clauses.
911 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
912 in OpenMP, require pointer type rather than pointer or array type.
913 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
914
a28351e7
JJ
9152019-07-31 Jakub Jelinek <jakub@redhat.com>
916
917 PR c/91192
918 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
919 even if finish is UNKNOWN_LOCATION, just use start as finish in that
920 case.
921
6343b6bf
ML
9222019-07-25 Martin Liska <mliska@suse.cz>
923 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
924
925 PR c++/23383
926 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
927
cb50701e
ML
9282019-07-25 Martin Liska <mliska@suse.cz>
929
930 * c-decl.c (merge_decls): Use new macros
931 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
932
62e3e66f
RB
9332019-07-23 Richard Biener <rguenther@suse.de>
934
935 PR tree-optimization/83518
936 * gimple-parser.c (c_parser_parse_gimple_body): When we have
937 a CFG also rebuild cgraph edges.
938
554a530f
JJ
9392019-07-20 Jakub Jelinek <jakub@redhat.com>
940
941 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
942 (c_parser_omp_clause_bind): New function.
943 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
944 (OMP_LOOP_CLAUSE_MASK): Define.
945 (c_parser_omp_loop): New function.
946 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
947 loop combined with parallel or teams.
948 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
949 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
950
d119bf79
RS
9512019-07-18 Richard Sandiford <richard.sandiford@arm.com>
952
953 PR c/53633
954 * c-decl.c (finish_function): Check targetm.warn_func_return
955 before issuing a -Wreturn-type warning.
956
ab20d992 9572019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
958
959 * gimple-parser.c (c_parser_gimple_try_stmt): New.
960 (c_parser_compound_statement): Call it.
961
1fdd6f04
JJ
9622019-07-12 Jakub Jelinek <jakub@redhat.com>
963
964 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
965 (c_parser_omp_clause_order): New function.
966 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
967 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
968 PRAGMA_OMP_CLAUSE_ORDER.
969 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
970
8389386c
RB
9712019-07-10 Richard Biener <rguenther@suse.de>
972
973 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
974 _Literal (int *) &x for address literals.
975
99b1c316
MS
9762019-07-09 Martin Sebor <msebor@redhat.com>
977
978 PR c++/61339
979 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
980 to class.
981 (field_decl_cmp): Same.
982 * c-parser.c (c_parser_struct_or_union_specifier): Same.
983 * c-tree.h: Same.
984 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
985
6c1dae73
MS
9862019-07-09 Martin Sebor <msebor@redhat.com>
987
988 PR c++/61339
989 * c-decl.c: Change class-key from class to struct and vice versa
990 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
991 * gimple-parser.c: Same.
992
69b5279e
RB
9932019-07-01 Richard Biener <rguenther@suse.de>
994
995 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
996 _Literal (char *) &"foo" for address literals pointing to
997 STRING_CSTs.
998
ab20d992
JJ
9992019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1000
1001 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1002 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1003 C incompatibility if alternate "__intN__" form is used.
1004
1e3d475e
MS
10052019-06-24 Martin Sebor <msebor@redhat.com>
1006
1007 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1008
bf38f7e9
JJ
10092019-06-10 Jakub Jelinek <jakub@redhat.com>
1010
1011 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1012 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1013 (c_parser_omp_scan_loop_body): New function.
1014 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1015 inscan reduction clauses.
1016 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1017 non-inscan reductions on the same construct, or inscan reductions with
1018 ordered or schedule clauses, or inscan array reductions.
1019
65985d78
MS
10202019-06-05 Martin Sebor <msebor@redhat.com>
1021
1022 PR c/90737
1023 * c-typeck.c (c_finish_return): Only consider functions returning
1024 pointers as candidates for -Wreturn-local-addr.
1025
0ecf545c
MS
10262019-06-05 Martin Sebor <msebor@redhat.com>
1027
1028 * c-decl.c (start_decl): Adjust quoting and hyphenation
1029 in diagnostics.
1030 (finish_decl): Same.
1031 (finish_enum): Same.
1032 (start_function): Same.
1033 (declspecs_add_type): Same.
1034 * c-parser.c (warn_for_abs): Same.
1035 * c-typeck.c (build_binary_op): Same.
1036
e03436e7
TS
10372019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1038
b48f44bf
TS
1039 PR c/89433
1040 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1041 marked with an OpenACC 'routine' directive.
1042
5bf04509
TS
1043 PR c/89433
1044 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1045 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1046
e03436e7
TS
1047 PR c/89433
1048 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1049 clauses from "omp declare target" attribute.
1050
a9c697b8
MS
10512019-05-16 Martin Sebor <msebor@redhat.com>
1052
ab20d992
JJ
1053 * c-decl.c (start_decl): Quote keywords, operators, and
1054 types in diagnostics.
1055 (finish_decl): Same.
1056 * c-parser.c (c_parser_asm_statement): Same.
1057 (c_parser_conditional_expression): Same.
1058 (c_parser_transaction_cancel): Same.
1059 * c-typeck.c (c_common_type): Same.
1060 (build_conditional_expr): Same.
1061 (digest_init): Same.
1062 (process_init_element): Same.
1063 (build_binary_op): Same.
a9c697b8 1064
c4499192
RB
10652019-05-17 Richard Biener <rguenther@suse.de>
1066
1067 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1068 (c_parser_gimple_unary_expression): Likewise.
1069 (c_parser_gimple_parentized_ternary_expression): New function.
1070
adfe6e4b
RB
10712019-05-16 Richard Biener <rguenther@suse.de>
1072
1073 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1074 (c_parser_gimple_unary_expression): Likewise.
1075
186dabf2
RB
10762019-05-15 Richard Biener <rguenther@suse.de>
1077
1078 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1079 __BIT_FIELD_REF.
1080
1158c5b4
RB
10812019-05-14 Richard Biener <rguenther@suse.de>
1082
1083 * gimple-parser.c (c_parser_gimple_statement): Remove
1084 questionable auto-promotion to VIEW_CONVERT_EXPR.
1085 (c_parser_gimple_typespec): Split out from __MEM parsing.
1086 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1087 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1088 as __VIEW_CONVERT with -gimple.
1089
fd4485aa
ML
10902019-05-09 Martin Liska <mliska@suse.cz>
1091
1092 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1093 __MAX.
1094 (c_parser_gimple_unary_expression): Parse also binary expression
1095 __MIN and __MAX.
1096 (c_parser_gimple_parentized_binary_expression): New function.
1097
d276406a
ML
10982019-05-09 Martin Liska <mliska@suse.cz>
1099
1100 * gimple-parser.c (struct gimple_parser): Add probability.
1101 for gimple_parser_edge.
1102 (gimple_parser::push_edge): Add new argument probability.
1103 (c_parser_gimple_parse_bb_spec): Parse also probability
1104 if present.
1105 (c_parser_parse_gimple_body): Set edge probability.
1106 (c_parser_gimple_compound_statement): Consume token
1107 before calling c_parser_gimple_goto_stmt.
1108 Parse BB counts.
1109 (c_parser_gimple_statement): Pass new argument.
1110 (c_parser_gimple_goto_stmt): Likewise.
1111 (c_parser_gimple_if_stmt): Likewise.
1112 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1113 * c-parser.c (c_parser_declaration_or_fndef): Pass
1114 hot_bb_threshold argument.
1115 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1116 field.
1117 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1118
f179b64e
JJ
11192019-04-26 Jakub Jelinek <jakub@redhat.com>
1120
1121 PR debug/90197
1122 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1123 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1124 (c_parser_do_statement): Likewise.
1125 (c_parser_for_statement): Likewise. Formatting fixes.
1126 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1127 emit DEBUG_BEGIN_STMTs if needed.
1128
e7178413
JJ
11292019-04-19 Jakub Jelinek <jakub@redhat.com>
1130
c280b7ee
JJ
1131 PR c/89888
1132 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1133 (c_start_case): Don't clear it.
1134 (do_case): Adjust c_add_case_label caller.
1135 (c_finish_case): Adjust c_do_switch_warnings caller.
1136
e7178413
JJ
1137 PR c++/90108
1138 * c-decl.c (merge_decls): If remove is main variant and
1139 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1140 variant that has newdecl as TYPE_NAME if any.
1141
60a2c645
JJ
11422019-04-12 Jakub Jelinek <jakub@redhat.com>
1143
1144 PR c/89933
1145 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1146 don't try to remove it from the variant list, but instead assert
1147 it has no variants.
1148
2a82beaa
RB
11492019-04-01 Richard Biener <rguenther@suse.de>
1150
1151 PR c/71598
1152 * c-tree.h (c_get_alias_set): Declare.
1153 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1154 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1155 as the underlying integer type.
1156
bec1da64
MS
11572019-03-19 Martin Sebor <msebor@redhat.com>
1158
1159 PR tree-optimization/89688
1160 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1161 kinds of initializers.
1162
855cd9b1
JJ
11632019-03-19 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR c/89734
1166 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1167 return type even if quals_used is 0. Formatting fixes.
1168
baa09dc5
RB
11692019-03-14 Richard Biener <rguenther@suse.de>
1170
1171 * c-tree.h (enum c_declspec_il): New.
1172 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1173 enum bitfield.
1174 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1175 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1176 (c_parser_declspecs): Adjust.
1177 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1178 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1179 and bitmap.h.
1180 (struct gimple_parser): New.
1181 (gimple_parser::push_edge): New method.
1182 (c_parser_gimple_parse_bb_spec): New helper.
1183 (c_parser_parse_gimple_body): Get start pass and IL specification.
1184 Initialize SSA and CFG.
1185 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1186 Build a gimple_parser parsing state and pass it along.
1187 (c_parser_gimple_statement): Change intermittend __PHI internal
1188 function argument for the edge.
1189 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1190 (c_parser_gimple_goto_stmt): Record edges to build.
1191 (c_parser_gimple_if_stmt): Likewise.
1192 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1193 (c_parser_gimple_or_rtl_pass_list): Likewise.
1194
a3f9f006
ML
11952019-03-11 Martin Liska <mliska@suse.cz>
1196
1197 * c-decl.c (check_for_loop_decls): Wrap an option name
1198 in a string format message and fix GNU coding style.
1199 * c-parser.c (c_parser_declspecs): Likewise.
1200
1db01ff9
JJ
12012019-03-08 Jakub Jelinek <jakub@redhat.com>
1202
1203 PR tree-optimization/89550
1204 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1205 returned true.
1206 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1207 or warning returned true.
1208
66dcb747
JJ
12092019-02-28 Jakub Jelinek <jakub@redhat.com>
1210
1211 PR c/89525
1212 * c-typeck.c (convert_arguments): Call inform_declaration only if
1213 the previous warning_at call returned true.
1214
2263c9f2
TS
12152019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1216
1217 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1218 parameter. Adjust all users.
1219 (c_parser_oacc_simple_clause): Replace parser with loc formal
1220 parameter. Adjust all users.
1221
ab20d992 12222019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1223
1224 PR c/87924
1225 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1226 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1227
5f88ba10
JJ
12282019-02-15 Jakub Jelinek <jakub@redhat.com>
1229
1230 PR c/89340
1231 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1232 before c_decl_attributes rather than after it.
1233
cfc30fd1
JJ
12342019-02-06 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR c/89211
1237 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1238 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1239 instead of 3 nested ifs.
1240
fbe83e6b
JM
12412019-02-06 Joseph Myers <joseph@codesourcery.com>
1242
1243 PR c/88584
1244 * c-decl.c (finish_decl): Do not complete array types for arrays
1245 with external linkage not at file scope.
1246
f461f938
RB
12472019-02-05 Richard Biener <rguenther@suse.de>
1248
1249 PR c/88606
1250 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1251 all type variants when not supported.
1252
fe509359
JJ
12532019-01-30 Jakub Jelinek <jakub@redhat.com>
1254
1255 PR c/89061
1256 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1257 * c-decl.c (decl_jump_unsafe): Return false for
1258 C_DECL_COMPOUND_LITERAL_P decls.
1259 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1260
6a335b96
JJ
12612019-01-29 Jakub Jelinek <jakub@redhat.com>
1262
f4b7e754
JJ
1263 PR c/89045
1264 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1265 scope.
1266
6a335b96
JJ
1267 PR c/86125
1268 * c-decl.c (last_fileptr_type): Remove.
1269 (last_structptr_types): New variable.
1270 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1271 {old,new}rettype instead of the types themselves. Assert
1272 last_structptr_types array has the same number of elements
1273 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1274 argument oldtype and newtype. Instead of handling
1275 just fileptr_type_node specially, handle all builtin_structptr_types
1276 pointer nodes. Formatting fix.
1277
d8b5a1a0
MS
12782019-01-24 Martin Sebor <msebor@redhat.com>
1279
1280 PR c/86125
1281 PR c/88886
1282 PR middle-end/86308
1283 * c-decl.c (match_builtin_function_types): Add arguments.
1284 (diagnose_mismatched_decls): Diagnose mismatched declarations
1285 of built-ins more strictly.
1286
e21c4491
JJ
12872019-01-24 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR c++/88976
1290 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1291 on #pragma omp cancel with different modifiers.
1292
420183d9
L
12932019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1294
1295 PR c/51628
1296 PR c/88664
1297 * c-typeck.c (convert_for_assignment): Upate the
1298 warn_for_address_or_pointer_of_packed_member call.
1299
17ad43dd
TH
13002019-01-16 Tom Honermann <tom@honermann.net>
1301 Jason Merrill <jason@redhat.com>
1302
1303 * c-typeck.c (digest_init): Revised the error message produced for
1304 ill-formed cases of array initialization with a string literal.
1305 (error_init): Make variadic.
1306
5f07d78a
JJ
13072019-01-12 Jakub Jelinek <jakub@redhat.com>
1308
1309 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1310
c4581bbf
JJ
13112019-01-07 Jakub Jelinek <jakub@redhat.com>
1312
1313 PR c/88701
1314 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1315 if current_function_decl is non-NULL.
1316
65c5b1eb
JM
13172019-01-07 Joseph Myers <joseph@codesourcery.com>
1318
1319 PR c/88720
1320 PR c/88726
1321 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1322 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1323 functions declared but never defined only for external scope, not
1324 for other scopes.
1325
d8fcab68
JJ
13262019-01-07 Jakub Jelinek <jakub@redhat.com>
1327
1328 PR c++/85052
1329 * c-parser.c (c_parser_postfix_expression): Parse
1330 __builtin_convertvector.
1331
a5544970
JJ
13322019-01-01 Jakub Jelinek <jakub@redhat.com>
1333
1334 Update copyright years.
1335
da77eace
L
13362018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1337
1338 PR c/51628
1339 * c-typeck.c (convert_for_assignment): Call
1340 warn_for_address_or_pointer_of_packed_member.
1341
1edf8866
SB
13422018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1343
1344 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1345 a more specific error message (instead of just falling through).
1346
db4fd626
SB
13472018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1348
1349 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1350 asm qualifier is first seen; use that to give nicer "duplicate asm
1351 qualifier" messages. Delete 'quals" variable, instead pass the
1352 "is_volatile_ flag to build_asm_stmt directly.
1353 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1354 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1355
9c9cfcbb
SB
13562018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1357
1358 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1359 "done" boolean variable.
1360
a14feb3c
DM
13612018-12-19 David Malcolm <dmalcolm@redhat.com>
1362
1363 PR c++/87504
1364 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1365 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1366 (build_binary_op): Use struct op_location_t and
1367 class binary_op_rich_location.
1368
6d939173
JJ
13692018-12-11 Jakub Jelinek <jakub@redhat.com>
1370
1371 PR sanitizer/88426
1372 * c-convert.c (convert): Call c_fully_fold before calling
1373 ubsan_instrument_float_cast.
1374
b7055028
SB
13752018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1376
1377 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1378 setting "quals".
1379
5b76e75f
SB
13802018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1381
1382 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1383 after asm. Pass a flag for it to build_asm_expr.
1384 * c-tree.h (build_asm_expr): Update declaration.
1385 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1386 set ASM_INLINE_P.
1387
30bd42b9
SB
13882018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1389
1390 PR inline-asm/55681
1391 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1392 combination of volatile and goto, in any order, without repetitions.
1393
9df6c0e4
JB
13942018-12-04 James Norris <jnorris@codesourcery.com>
1395 Cesar Philippidis <cesar@codesourcery.com>
1396 Julian Brown <julian@codesourcery.com>
1397
1398 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1399 code.
1400
f44697b7
RB
14012018-11-30 Richard Biener <rguenther@suse.de>
1402
1403 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1404 _Literal (type) { ... } as empty aggregate or vector constructor.
1405
550dfbdc
MS
14062018-11-29 Martin Sebor <msebor@redhat.com>
1407
1408 PR c/88091
1409 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1410 (convert_arguments): Add comments. Pass additional argument to
1411 the function above.
1412
673670da
MS
14132018-11-29 Martin Sebor <msebor@redhat.com>
1414
1415 PR c/88172
1416 PR testsuite/88208
1417 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1418
db1d09b0
MS
14192018-11-23 Martin Sebor <msebor@redhat.com>
1420
1421 PR testsuite/88098
1422 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1423 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1424
98f08eb8
MS
14252018-11-20 Martin Sebor <msebor@redhat.com>
1426
1427 * c-parser.c (c_parser_has_attribute_expression): New function.
1428 (c_parser_attribute): New function.
1429 (c_parser_attributes): Move code into c_parser_attribute.
1430 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1431
cd5da983
MS
14322018-11-15 Martin Sebor <msebor@redhat.com>
1433
1434 PR c/83656
1435 * c-decl.c (header_for_builtin_fn): Declare.
1436 (diagnose_mismatched_decls): Diagnose declarations of built-in
1437 functions without a prototype.
1438 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1439 (convert_argument): Same.
1440 (convert_arguments): Factor code out into convert_argument.
1441 Detect mismatches between built-in formal arguments in calls
1442 to built-in without prototype.
1443 (build_conditional_expr): Same.
1444 (type_or_builtin_type): New function.
1445 (convert_for_assignment): Add argument. Conditionally issue
1446 warnings instead of errors for mismatches.
1447
620e594b
DM
14482018-11-13 David Malcolm <dmalcolm@redhat.com>
1449
1450 * c-decl.c: Replace "source_location" with "location_t".
1451 * c-tree.h: Likewise.
1452 * c-typeck.c: Likewise.
1453 * gimple-parser.c: Likewise.
1454
3179ebae
JJ
14552018-11-09 Jakub Jelinek <jakub@redhat.com>
1456
81a227c6
JJ
1457 * c-parser.c (c_parser_omp_clause_final): Use
1458 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1459 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1460 parsing instead of c_parser_paren_condition.
1461 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1462 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1463 c_fully_fold instead of c_parser_condition.
1464 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1465 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1466 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1467 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1468 c_parser_expr_no_commas instead of c_parser_expression.
1469
98c91c56
JJ
1470 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1471 reduction clause with inscan modifier.
1472
3179ebae
JJ
1473 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1474 clauses other than atomic_default_mem_order.
1475
28567c40
JJ
14762018-11-08 Jakub Jelinek <jakub@redhat.com>
1477
1478 * c-parser.c: Include memmode.h.
1479 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1480 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1481 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1482 task_reduction clauses.
1483 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1484 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1485 section, or lvalue assignment expression.
1486 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1487 (c_parser_omp_clause_lastprivate): Parse optional
1488 conditional: modifier.
1489 (c_parser_omp_clause_hint): Require constant integer expression rather
1490 than just integer expression.
1491 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1492 clause.
1493 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1494 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1495 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1496 functions.
1497 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1498 iterators. Parse mutexinoutset and depobj kinds.
1499 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1500 callers.
1501 (c_parser_omp_all_clauses): Likewise. Handle
1502 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1503 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1504 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1505 default memory order from requires directive if any. Adjust
1506 c_finish_omp_atomic caller.
1507 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1508 (c_parser_omp_flush): Parse flush with memory-order-clause.
1509 (c_parser_omp_for_loop): Allow NE_EXPR even in
1510 OpenMP loops, adjust c_finish_omp_for caller.
1511 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1512 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1513 Allow to be called while parsing combined parallel master.
1514 Parse combined master taskloop{, simd}.
1515 (c_parser_omp_parallel): Parse combined
1516 parallel master{, taskloop{, simd}} constructs.
1517 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1518 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1519 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1520 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1521 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1522 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1523 around teams body. Use SET_EXPR_LOCATION.
1524 (c_parser_omp_target_data): Allow target data
1525 with only use_device_ptr clauses.
1526 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1527 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1528 (c_parser_omp_requires): New function.
1529 (c_finish_taskloop_clauses): New function.
1530 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1531 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1532 declaration. Disallow in_reduction clause when combined with parallel
1533 master.
1534 (c_parser_omp_construct): Adjust c_parser_omp_master and
1535 c_parser_omp_taskgroup callers.
1536 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1537 other than cancel.
1538 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1539 like OMP_CLAUSE_REDUCTION.
1540 (handle_omp_array_sections): Likewise. Call save_expr on array
1541 reductions before calling build_index_type. Handle depend clauses
1542 with iterators.
1543 (struct c_find_omp_var_s): New type.
1544 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1545 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1546 with static, runtime or auto schedule kinds. Call save_expr for whole
1547 array reduction sizes. Diagnose reductions with zero sized elements
1548 or variable length structures. Diagnose nogroup clause used with
1549 reduction clause(s). Handle depend clause with
1550 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1551 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1552 some different type for other kinds. Use build_unary_op with
1553 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1554 Handle depend clauses with iterators. Remove no longer needed special
1555 case that predetermined const qualified vars may be specified in
1556 firstprivate clause. Complain if const qualified vars are mentioned
1557 in data-sharing clauses other than firstprivate or shared. Use
1558 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1559 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1560 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1561 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1562
7e2de6df
DM
15632018-10-29 David Malcolm <dmalcolm@redhat.com>
1564
1565 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1566 logic for change to name_hint::operator bool.
1567 (undeclared_variable): Likewise.
1568 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1569 (c_parser_parameter_declaration): Likewise.
1570
9f936c86
JM
15712018-10-17 Joseph Myers <joseph@codesourcery.com>
1572
1573 * c-errors.c (pedwarn_c11): New function.
1574 * c-parser.c (disable_extension_diagnostics): Save
1575 warn_c11_c2x_compat and set it to 0.
1576 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1577 (c_parser_static_assert_declaration_no_semi): Handle
1578 _Static_assert without string constant.
1579 * c-tree.h (pedwarn_c11): New prototype.
1580
033eb567
DM
15812018-10-17 David Malcolm <dmalcolm@redhat.com>
1582
1583 * Make-lang.in (selftest-c): New.
1584 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1585 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1586 from gcc/Makefile.in.
1587
0edf3afe
RB
15882018-10-02 Richard Biener <rguenther@suse.de>
1589
1590 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1591
8313a764
JM
15922018-09-26 Joseph Myers <joseph@codesourcery.com>
1593
1594 PR c/87390
1595 * c-typeck.c (build_binary_op): Use excess precision for
1596 comparisons of integers and floating-point for C11 and later.
1597
ce6f0888
MJ
15982018-09-26 Martin Jambor <mjambor@suse.cz>
1599
1600 PR c/87347
1601 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1602 comment.
ce6f0888 1603
9c4a4b3c
DM
16042018-09-17 David Malcolm <dmalcolm@redhat.com>
1605
1606 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1607 Update for new param.
1608 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1609 Likewise.
1610
80c6d1f4
MJ
16112018-09-17 Martin Jambor <mjambor@suse.cz>
1612
1613 PR c/63886
1614 * c-parser.c: (warn_for_abs): New function.
1615 (c_parser_postfix_expression_after_primary): Call it.
1616
4a426e36
BE
16172018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1618
1619 * c-typeck.c (digest_init): Shorten overlength strings.
1620
6d900107
BE
16212018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1622
1623 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1624
b5764229
BE
16252018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1626
1627 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1628 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1629
22eea6b2
AM
16302018-08-30 Alexander Monakov <amonakov@ispras.ru>
1631
1632 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1633 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1634
85204e23
DM
16352018-08-27 David Malcolm <dmalcolm@redhat.com>
1636
1637 PR 87091
1638 * c-decl.c (implicitly_declare): Update call to
1639 maybe_add_include_fixit to suggest overriding the location, as it
1640 is for a note.
1641 * c-objc-common.c (c_tree_printer): Update for conversion of
1642 show_caret_p to a tri-state.
1643
3d78e008
ML
16442018-08-27 Martin Liska <mliska@suse.cz>
1645
1646 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1647 fndecl_built_in_p and remove check for FUNCTION_DECL if
1648 possible.
3d78e008
ML
1649 (diagnose_mismatched_decls): Likewise.
1650 (merge_decls): Likewise.
1651 (warn_if_shadowing): Likewise.
1652 (pushdecl): Likewise.
1653 (implicitly_declare): Likewise.
1654 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1655 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1656 * c-typeck.c (build_function_call_vec): Likewise.
1657 (convert_arguments): Likewise.
1658
097f82ec
DM
16592018-08-20 David Malcolm <dmalcolm@redhat.com>
1660
1661 PR other/84889
1662 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1663 (diagnose_mismatched_decls): Likewise, in various places.
1664 (warn_if_shadowing): Likewise.
1665 (implicit_decl_warning): Likewise.
1666 (implicitly_declare): Likewise.
1667 (undeclared_variable): Likewise.
1668 (declare_label): Likewise.
1669 (grokdeclarator): Likewise.
1670 (start_function): Likewise.
1671 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1672 (c_parser_parameter_declaration): Likewise.
1673 (c_parser_binary_expression): Likewise.
1674 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1675 (parser_build_binary_op): Likewise.
1676 (build_unary_op): Likewise.
1677 (error_init): Likewise.
1678 (pedwarn_init): Likewise.
1679 (warning_init): Likewise.
1680 (convert_for_assignment): Likewise.
1681
96e6ae57
DM
16822018-08-15 David Malcolm <dmalcolm@redhat.com>
1683
1684 * c-objc-common.c: Include "gcc-rich-location.h".
1685 (c_tree_printer): Move implemenation of '%T' to...
1686 (print_type): ...this new function.
1687 (range_label_for_type_mismatch::get_text): New function.
1688 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1689 range for the various ic_argpass cases.
1690 (class maybe_range_label_for_tree_type_mismatch): New class.
1691 (build_binary_op): Use it when calling binary_op_error.
1692
0cd020ae 16932018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1694
0cd020ae
PK
1695 * c-decl.c (start_decl): Do not warn if variables is named as main
1696 and is a local variable.
1697
72733314
IS
16982018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1699
1700 PR c/19315
1701 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1702 objects of unknown size.
1703
23aa9f7c
MS
17042018-08-13 Martin Sebor <msebor@redhat.com>
1705
1706 PR tree-optimization/71625
1707 * c-parser.c (c_parser_declaration_or_fndef): Call
1708 braced_list_to_string.
1709
e5e7e50d
BH
17102018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1711
1712 PR c/86690
1713 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1714 errors.
1715
8a45b051
MS
17162018-08-01 Martin Sebor <msebor@redhat.com>
1717
1718 PR tree-optimization/86650
1719 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1720 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1721
5922dcb5
JJ
17222018-08-01 Jakub Jelinek <jakub@redhat.com>
1723
1724 PR c/85704
1725 * c-typeck.c (init_field_decl_cmp): New function.
1726 (output_pending_init_elements): Use it for field comparisons
1727 instead of pure bit_position comparisons.
1728
9b452033
JJ
17292018-07-12 Jakub Jelinek <jakub@redhat.com>
1730
1731 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1732 type here, instead add "omp declare target implicit" attribute.
1733 (finish_decl): Diagnose vars without mappable type here.
1734
ab20d992
JJ
17352018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1736 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1737 Cesar Philippidis <cesar@codesourcery.com>
1738
1739 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1740 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1741 to their non-present_or_* counterparts. Make 'self' an alias to
1742 PRAGMA_OACC_CLAUSE_HOST.
1743 (c_parser_oacc_data_clause): Update GOMP mappings for
1744 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1745 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1746 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1747 Remove support for present_or_* clauses.
1748 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1749 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1750 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1751 (OACC_DATA_CLAUSE_MASK): Likewise.
1752 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1753 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1754 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1755 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1756 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1757
e197e64e
KV
17582018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1759
1760 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1761 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1762 (c_parser_gimple_unary_expression): Likewise.
1763
487f2f61
JJ
17642018-06-15 Jakub Jelinek <jakub@redhat.com>
1765
1766 PR c/86093
1767 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1768 before doing POINTER_DIFF_EXPR.
1769
e4d44a37
MP
17702018-06-07 Marek Polacek <polacek@redhat.com>
1771
1772 PR c/85318
1773 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1774 for loop initial declarations.
1775
b67b9225
DP
17762018-05-30 David Pagan <dave.pagan@oracle.com>
1777
1778 PR c/55976
1779 * c-decl.c (grokdeclarator): Update check for return type warnings.
1780 (start_function): Likewise.
1781 (finish_function): Likewise.
1782 * c-typeck.c (c_finish_return): Update check for return type warnings.
1783 Pass OPT_Wreturn_type to pedwarn when appropriate.
1784
c566cc9f
RS
17852018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1786
1787 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1788 __FMA_EXPR handlng.
1789
e4f81565
RS
17902018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1791
1792 * gimple-parser.c: Include internal-fn.h.
1793 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1794 (c_parser_gimple_call_internal): New function.
1795 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1796 Fix typos in comment.
1797
79e7b1fe
JJ
17982018-05-10 Jakub Jelinek <jakub@redhat.com>
1799
1800 PR c++/85662
1801 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1802 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1803 fold_convert_loc.
1804 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1805 fold_offsetof_1, pass argtype as TYPE to it and drop the
1806 fold_convert_loc.
1807
f7584c81
DP
18082018-05-02 David Pagan <dave.pagan@oracle.com>
1809
1810 PR c/30552
1811 * c-decl.c (old_style_parameter_scope): New function.
1812 * c-parser.c (c_parser_postfix_expression): Check for statement
1813 expressions in old-style function parameter list declarations.
1814 * c-parser.h (old_style_parameter_scope): New extern declaration.
1815
b33a0cb3
JJ
18162018-04-25 Jakub Jelinek <jakub@redhat.com>
1817
1818 PR sanitizer/84307
1819 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1820 it is not TREE_STATIC.
1821 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1822 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1823 its COMPOUND_LITERAL_EXPR_DECL.
1824
c5c5822a
JM
18252018-03-21 Joseph Myers <joseph@codesourcery.com>
1826
1827 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1828 where all functions return the same _FloatN or _FloatNx type,
1829 treat integer types as _Float64 instead of double.
1830
aa1c9429
JJ
18312018-03-21 Jakub Jelinek <jakub@redhat.com>
1832
1833 PR c/84999
1834 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1835 building vector comparison, diagnose it and return error_mark_node.
1836
9bb45a95
JJ
18372018-03-15 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR c/84853
1840 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1841 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1842 INTEGER_TYPE element type.
1843
ada6bad9
DP
18442018-03-13 David Pagan <dave.pagan@oracle.com>
1845
1846 PR c/46921
1847 * c-typeck.c (output_init_element): Ensure field initializer
1848 expression is always evaluated if there are side effects.
1849
849bbdb9
JJ
18502018-03-06 Jakub Jelinek <jakub@redhat.com>
1851
1852 PR c/84721
1853 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1854 !building_stmt_list_p ().
1855
d74641bd
RS
18562018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1857
1858 PR c/84305
1859 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1860 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1861 and include the BIND_EXPR in the list of things that need to be
1862 pre-evaluated.
1863
0444aa9c
NS
18642018-02-09 Nathan Sidwell <nathan@acm.org>
1865
1866 PR c/84293
1867 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1868 to strict_aliasing_warning.
1869
7c30b12a
PC
18702018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1871
1872 * c-typeck.c (really_start_incremental_init, push_init_level,
1873 set_nonincremental_init, output_init_element, process_init_element):
1874 Use DECL_UNNAMED_BIT_FIELD.
1875
2be4dfcb
MP
18762018-01-31 Marek Polacek <polacek@redhat.com>
1877
1878 PR c/81779
1879 * c-parser.c (c_parser_compound_statement_nostart): Call
1880 expansion_point_location_if_in_system_header.
1881
bb9869d5
DM
18822018-01-17 David Malcolm <dmalcolm@redhat.com>
1883
1884 PR c++/83814
1885 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1886 the C part.
1887
b4923738
JJ
18882018-01-13 Jakub Jelinek <jakub@redhat.com>
1889
1890 PR c/83801
1891 * c-tree.h (decl_constant_value_1): Add a bool argument.
1892 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1893 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1894 (decl_constant_value): Adjust caller.
1895 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1896 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1897 decl_constant_value returns initializer that has BLKmode or
1898 array type.
1899 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1900
928686b1
RS
19012018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1902 Alan Hayward <alan.hayward@arm.com>
1903 David Sherwood <david.sherwood@arm.com>
1904
1905 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1906 TYPE_VECTOR_SUBPARTS.
1907
85ec4feb
JJ
19082018-01-03 Jakub Jelinek <jakub@redhat.com>
1909
1910 Update copyright years.
1911
913884f7
JJ
19122018-01-01 Jakub Jelinek <jakub@redhat.com>
1913
1914 PR c/83595
1915 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1916 c_parser_conditional_expression, c_parser_cast_expression,
1917 c_parser_sizeof_expression, c_parser_alignof_expression,
1918 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1919 c_parser_transaction_expression): Use set_error () method instead
1920 of setting value member to error_mark_node.
1921
c6cfa2bf
MM
19222017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1923
1924 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1925 and _Float<N>X built-in functions.
1926
11d29d63
JJ
19272017-12-22 Jakub Jelinek <jakub@redhat.com>
1928
14ec014e
JJ
1929 PR debug/83550
1930 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1931 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1932 incomplete vars rather than after it.
1933
11d29d63
JJ
1934 PR debug/83547
1935 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1936 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1937 and consider empty ones if there are no other stmts. For
1938 -Wunused-value walk all statements before the one only followed by
1939 DEBUG_BEGIN_STMTs.
1940
170a8bd6 19412017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1942 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1943
1944 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1945 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1946 (c_parser_do_statement): Likewise.
1947 (c_parser_for_statement): Likewise.
1948 (c_parser_statement_after_labels): Adjust calls to above.
1949 (c_parse_pragma_ivdep): New static function.
1950 (c_parser_pragma_unroll): Likewise.
1951 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1952 <PRAGMA_UNROLL>: New case.
1953
01512446
JJ
19542017-12-19 Jakub Jelinek <jakub@redhat.com>
1955
1956 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1957 perform_integral_promotions, digest_init): Replace Yoda conditions
1958 with typical order conditions.
1959 * c-decl.c (check_bitfield_type_and_width): Likewise.
1960
c65e18d3
BE
19612017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1962
1963 * c-typeck.c (c_safe_arg_type_equiv_p,
1964 c_safe_function_type_cast_p): New function.
1965 (build_c_cast): Implement -Wcast-function-type.
1966
b7280579
RB
19672017-12-14 Richard Biener <rguenther@suse.de>
1968
1969 PR c/83415
1970 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1971 like REALPART_EXPR for the behavior of whether its operand
1972 is an lvalue.
1973
49e6a6c0
MP
19742017-12-12 Marek Polacek <polacek@redhat.com>
1975
1976 PR c/82679
1977 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1978
ab20d992 19792017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1980
1981 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1982 * c-parser.c (add_debug_begin_stmt): New.
1983 (c_parser_declaration_or_fndef): Call it.
1984 (c_parser_compound_statement_nostart): Likewise.
1985 (c_parser_statement_after_labels): Likewise.
1986 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1987
4b2b493f
JM
19882017-12-07 Joseph Myers <joseph@codesourcery.com>
1989
1990 * c-decl.c (build_compound_literal): Add parameter alignas_align
1991 and set alignment of decl if nonzero.
1992 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1993 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1994 qualifier.
1995 (c_parser_struct_declaration): Update syntax comment.
1996 (c_parser_type_name): Add alignas_ok argument and pass it to
1997 c_parser_declspecs.
1998 (c_parser_cast_expression): Pass true to c_parser_type_name and
1999 give error if a cast used an _Alignas specifier.
2000 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2001 give error if sizeof (type-name) used an _Alignas specifier.
2002 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2003 give error if _Alignof (type-name) used an _Alignas specifier.
2004 (c_parser_postfix_expression_after_paren_type): Check specified
2005 alignment for a compound literal and pass it to
2006 build_compound_literal.
2007 * c-parser.h (c_parser_type_name): Update prototype.
2008 * c-tree.h (build_compound_literal): Update prototype.
2009
5d9ae53d
MS
20102017-12-07 Martin Sebor <msebor@redhat.com>
2011
2012 PR c/81544
2013 * c-decl.c (c_decl_attributes): Look up existing declaration and
2014 pass it to decl_attributes.
2015
c79144f8
DM
20162017-12-06 David Malcolm <dmalcolm@redhat.com>
2017
2018 PR c/83236
2019 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2020 reserved for use by the implementation.
2021
613bc14f
DM
20222017-12-06 David Malcolm <dmalcolm@redhat.com>
2023
2024 * c-decl.c: Include "c-family/c-spellcheck.h".
2025
05abad4c
ML
20262017-12-05 Martin Liska <mliska@suse.cz>
2027 Jakub Jelinek <jakub@redhat.com>
2028
2029 * c-typeck.c (pointer_diff): Add new argument and instrument
2030 pointer subtraction.
2031 (build_binary_op): Similar for pointer comparison.
2032
cc6534d4
JJ
20332017-12-01 Jakub Jelinek <jakub@redhat.com>
2034
65791f42
JJ
2035 PR c/79153
2036 * c-parser.c: Include tree-iterator.h.
2037 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2038 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2039 on it.
2040
cc6534d4
JJ
2041 PR c/83222
2042 * c-tree.h (decl_constant_value_1): Declare.
2043 * c-typeck.c (decl_constant_value_1): New function.
2044 (decl_constant_value): Use it.
2045 * c-fold.c (c_fully_fold_internal): If in_init, use
2046 decl_constant_value_1 instead of decl_constant_value.
2047
5de73c05
JJ
20482017-11-30 Jakub Jelinek <jakub@redhat.com>
2049
2050 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2051
058f0b9e
JJ
20522017-11-28 Jakub Jelinek <jakub@redhat.com>
2053
2054 PR sanitizer/81275
2055 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2056 c_switch_covers_all_cases_p returns true.
2057
5e9d6aa4 20582017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2059 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2060
2061 * Make-lang.in (c/c-array-notation.o): Remove.
2062 * c-array-notation.c: Delete.
2063 * c-decl.c: Remove cilkplus condition.
2064 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2065 c_parser_cilk_verify_simd, c_parser_array_notation,
2066 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2067 c_parser_cilk_simd_fn_vector_attrs,
2068 c_finish_cilk_simd_fn_tokens): Delete.
2069 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2070 (c_parser_direct_declarator_inner): Ditto.
2071 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2072 (c_parser_attributes, c_parser_compound_statement,
2073 c_parser_statement_after_labels, c_parser_if_statement,
2074 c_parser_switch_statement, c_parser_while_statement,
2075 c_parser_do_statement, c_parser_for_statement,
2076 c_parser_unary_expression, c_parser_postfix_expression,
2077 c_parser_postfix_expression_after_primary,
2078 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2079 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2080 support.
2081 * c-typeck.c (build_array_ref, build_function_call_vec,
2082 convert_arguments,
2083 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2084 c_finish_loop, build_binary_op): Remove cilkplus support.
2085
9e851845
JJ
20862017-11-28 Jakub Jelinek <jakub@redhat.com>
2087
2088 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2089 of build3.
2090
ab20d992 20912017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2092
2093 * Make-lang.in (c.install-plugin): Install backend import library.
2094
41521dee
JJ
20952017-11-23 Jakub Jelinek <jakub@redhat.com>
2096
2097 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2098 pragma_stmt context.
2099
ac9effed
EB
21002017-11-23 Mike Stump <mikestump@comcast.net>
2101 Eric Botcazou <ebotcazou@adacore.com>
2102
2103 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2104 ANNOTATE_EXPR.
2105 (c_parser_do_statement): Likewise.
2106 (c_parser_for_statement): Likewise.
2107
ce95abc4
DM
21082017-11-22 David Malcolm <dmalcolm@redhat.com>
2109
2110 PR c++/62170
2111 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2112 bool to bool *. Within '%T' handling, if showing an "aka", use
2113 "quoted" param to add appropriate quoting.
2114
974aedcc
MP
21152017-11-22 Marek Polacek <polacek@redhat.com>
2116
2117 PR c++/60336
2118 PR middle-end/67239
2119 PR target/68355
2120 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2121
d4300cc6
DM
21222017-11-21 David Malcolm <dmalcolm@redhat.com>
2123
2124 PR c/83056
2125 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2126 earlier failed lookups.
2127
1af4ebf5
MG
21282017-11-21 Marc Glisse <marc.glisse@inria.fr>
2129
2130 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2131 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2132
26edace6
DM
21332017-11-20 David Malcolm <dmalcolm@redhat.com>
2134
2135 PR c/81404
2136 * c-decl.c: Include "c-family/known-headers.h".
2137 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2138 to known-headers.cc.
2139 (class suggest_missing_header): Move to known-header.h.
2140 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2141 than get_c_name_hint.
2142
b1212255
DM
21432017-11-20 David Malcolm <dmalcolm@redhat.com>
2144
2145 * c-decl.c (get_c_name_hint): New function.
2146 (class suggest_missing_header): New class.
2147 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2148 suggest missing headers to the user.
2149
6c7a259b
DM
21502017-11-20 David Malcolm <dmalcolm@redhat.com>
2151
2152 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2153 Include "c-family/name-hint.h"
2154 (implicit_decl_warning): Convert "hint" from
2155 const char * to name_hint. Pass location to
2156 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2157 warning was not printed.
2158 (undeclared_variable): Likewise for "guessed_id".
2159 (lookup_name_fuzzy): Convert return type from const char *
2160 to name_hint. Add location_t param.
2161 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2162 Include "c-family/name-hint.h"
2163 (c_parser_declaration_or_fndef): Convert "hint" from
2164 const char * to name_hint. Pass location to lookup_name_fuzzy.
2165 (c_parser_parameter_declaration): Likewise.
2166
f9c59f7e
JJ
21672017-11-19 Jakub Jelinek <jakub@redhat.com>
2168
2169 PR c/66618
2170 PR c/69960
2171 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2172 where needed.
2173 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2174 handle_omp_array_sections): Likewise.
2175 (digest_init): Don't call decl_constant_value_for_optimization.
2176 * c-tree.h (decl_constant_value_for_optimization): Removed.
2177 * c-fold.c (c_fold_array_ref): New function.
2178 (c_fully_fold_internal): Add LVAL argument, propagate it through
2179 recursive calls. For VAR_P call decl_constant_value and
2180 unshare if not LVAL and either optimizing or IN_INIT. Remove
2181 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2182 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2183 (c_fully_fold): Add LVAL argument, pass it through to
2184 c_fully_fold_internal.
2185 (decl_constant_value_for_optimization): Removed.
2186
3ca0dc60
JM
21872017-11-15 Joseph Myers <joseph@codesourcery.com>
2188
2189 PR c/81156
2190 * c-parser.c (check_tgmath_function): New function.
2191 (enum tgmath_parm_kind): New enum.
2192 (c_parser_postfix_expression): Handle __builtin_tgmath.
2193
64a5912c
DM
21942017-10-31 David Malcolm <dmalcolm@redhat.com>
2195
2196 * c-decl.c (implicit_decl_warning): Update for renaming of
2197 pedwarn_at_rich_loc and warning_at_rich_loc.
2198 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2199 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2200 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2201 (c_parser_struct_or_union_specifier): Likewise for renaming of
2202 pedwarn_at_rich_loc.
2203 (c_parser_parameter_declaration): Likewise for renaming of
2204 error_at_rich_loc.
2205 * c-typeck.c (build_component_ref): Likewise.
2206 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2207 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2208 (set_init_label): Likewise for renaming of error_at_rich_loc.
2209
c1136864
RB
22102017-10-30 Richard Biener <rguenther@suse.de>
2211
2212 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2213 stmts.
2214
ee5fd23a
MM
22152017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2216
2217 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2218 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2219
1a59ccf2
DM
22202017-10-25 David Malcolm <dmalcolm@redhat.com>
2221
2222 PR c/7356
2223 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2224 semicolons.
2225
bc1a75dd
JJ
22262017-10-25 Jakub Jelinek <jakub@redhat.com>
2227
2228 PR libstdc++/81706
2229 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2230 newdecl to corresponding __builtin_ if any.
2231
ff1ff960
PC
22322017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2233
2234 PR c++/82466
2235 * c-decl.c (diagnose_mismatched_decls): Use
2236 OPT_Wbuiltin_declaration_mismatch.
2237
62e1c678
DM
22382017-10-12 David Malcolm <dmalcolm@redhat.com>
2239
2240 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2241 use it to guard calls to maybe_suggest_missing_token_insertion.
2242 (c_parser_parms_list_declarator): Override default value of new
2243 "type_is_unique" param to c_parser_require.
2244 (c_parser_asm_statement): Likewise.
2245 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2246 defaulting to true.
2247
a92f6726
NS
22482017-10-11 Nathan Sidwell <nathan@acm.org>
2249
2250 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2251
8e6cdc90
RS
22522017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2253
2254 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2255 operating on trees as wide_ints.
2256 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2257 (c_tree_equal): Likewise.
2258
8139a48e
DM
22592017-10-04 David Malcolm <dmalcolm@redhat.com>
2260
2261 * c-decl.c (push_parm_decl): Store c_parm's location into the
2262 PARAM_DECL.
2263 (build_c_parm): Add "loc" param and store it within the c_parm.
2264 * c-parser.c (struct c_parser): Add "last_token_location" field.
2265 (c_parser_consume_token): Store location of the token into the
2266 new field.
2267 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2268 when handling a FUNCTION_DECL, if it doesn't already have them.
2269 (c_parser_parameter_declaration): Generate a location for the
2270 parameter, and pass it to the call to build_c_parm.
2271 * c-tree.h (struct c_parm): Add field "loc".
2272 (build_c_parm): Add location_t param.
2273 * c-typeck.c (get_fndecl_argument_location): New function.
2274 (inform_for_arg): New function.
2275 (convert_for_assignment): Use inform_for_arg when dealing with
2276 ic_argpass.
2277
2a389958
JJ
22782017-09-29 Jakub Jelinek <jakub@redhat.com>
2279
7d386d45
JJ
2280 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2281 width is non-NULL.
2282 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2283 don't SET_DECL_C_BIT_FIELD here.
2284
2a389958
JJ
2285 PR c/82340
2286 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2287 instead of trying to set just TREE_READONLY manually.
2288
ebc6a85e
TV
22892017-09-16 Tom de Vries <tom@codesourcery.com>
2290
2291 PR c/81875
2292 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2293 cond itself.
2294
bb75facd
JM
22952017-09-15 Joseph Myers <joseph@codesourcery.com>
2296
2297 PR c/82071
2298 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2299 for C11.
2300 (build_conditional_expr): For C11, generate result with excess
2301 precision when one argument is an integer and the other is of a
2302 type using excess precision.
2303
1d933576
BE
23042017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2305
2306 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2307
267bbb6f
MP
23082017-09-13 Marek Polacek <polacek@redhat.com>
2309
2310 PR c/82167
2311 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2312 than expr.original_type.
2313
6836632e
NS
23142017-09-12 Nathan Sidwell <nathan@acm.org>
2315
2316 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2317 resort_sorted_fields): Moved from c-family/c-common.c.
2318 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2319
e035be33
JM
23202017-09-01 Joseph Myers <joseph@codesourcery.com>
2321
2322 PR c/82071
2323 * c-typeck.c (build_atomic_assign): Handle argument with excess
2324 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2325 argument passed to build_binary_op and convert_for_assignment but
2326 not for call to c_fully_fold.
2327 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2328 Ensure build_binary_op is called with argument with original
2329 semantic type. Avoid calling c_fully_fold with an
2330 EXCESS_PRECISION_EXPR from build_binary_op.
2331
d2e05fcb
JJ
23322017-09-01 Jakub Jelinek <jakub@redhat.com>
2333
2334 PR c/81887
2335 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2336
b397965c
RS
23372017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2338 Alan Hayward <alan.hayward@arm.com>
2339 David Sherwood <david.sherwood@arm.com>
2340
2341 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2342 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2343 m1 and m2 to the signed equivalent of a fixed-point
2344 SCALAR_TYPE_MODE.
2345
14e18d71
DM
23462017-08-24 David Malcolm <dmalcolm@redhat.com>
2347
2348 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2349 than CAN_HAVE_LOCATION_P when determining whether to use the
2350 location_t value within "value".
2351
7f204c0f
DM
23522017-08-21 David Malcolm <dmalcolm@redhat.com>
2353
2354 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2355 rather than peeking the location of the first token.
2356 * c-tree.h (c_expr::get_location): New method.
2357
2f687306
DM
23582017-08-21 David Malcolm <dmalcolm@redhat.com>
2359
2360 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2361 to check_function_arguments.
2362
3e7b80d7
MP
23632017-08-18 Marek Polacek <polacek@redhat.com>
2364
2365 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2366 commentary.
2367
00aa1fa2
L
23682017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2369
2370 PR c/53037
2371 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2372 (check_bitfield_type_and_width): Don't allow bit-field with
2373 warn_if_not_aligned type.
2374
da67acb9
MS
23752017-08-14 Martin Sebor <msebor@redhat.com>
2376
2377 PR c/81117
2378 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2379
bb85aa74
MP
23802017-08-11 Marek Polacek <polacek@redhat.com>
2381
2382 PR c/81795
2383 * c-decl.c (pushtag): Only print inform if the warning was printed.
2384 (grokdeclarator): Likewise.
2385
32129a17
DM
23862017-08-10 David Malcolm <dmalcolm@redhat.com>
2387
2388 * c-parser.c (c_parser_error): Rename to...
2389 (c_parser_error_richloc): ...this, making static, and adding
2390 "richloc" parameter, passing it to the c_parse_error call,
2391 rather than calling c_parser_set_source_position_from_token.
2392 (c_parser_error): Reintroduce, reimplementing in terms of the
2393 above, converting return type from void to bool.
2394 (class token_pair): New class.
2395 (struct matching_paren_traits): New struct.
2396 (matching_parens): New typedef.
2397 (struct matching_brace_traits): New struct.
2398 (matching_braces): New typedef.
2399 (get_matching_symbol): New function.
2400 (c_parser_require): Add param MATCHING_LOCATION, using it to
2401 highlight matching "opening" tokens for missing "closing" tokens.
2402 (c_parser_skip_until_found): Likewise.
2403 (c_parser_static_assert_declaration_no_semi): Convert explicit
2404 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2405 class matching_parens, so that the pertinent open parenthesis is
2406 highlighted when there are problems locating the close
2407 parenthesis.
2408 (c_parser_struct_or_union_specifier): Likewise.
2409 (c_parser_typeof_specifier): Likewise.
2410 (c_parser_alignas_specifier): Likewise.
2411 (c_parser_simple_asm_expr): Likewise.
2412 (c_parser_braced_init): Likewise, for matching_braces.
2413 (c_parser_paren_condition): Likewise, for matching_parens.
2414 (c_parser_switch_statement): Likewise.
2415 (c_parser_for_statement): Likewise.
2416 (c_parser_asm_statement): Likewise.
2417 (c_parser_asm_operands): Likewise.
2418 (c_parser_cast_expression): Likewise.
2419 (c_parser_sizeof_expression): Likewise.
2420 (c_parser_alignof_expression): Likewise.
2421 (c_parser_generic_selection): Likewise.
2422 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2423 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2424 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2425 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2426 c_parser_skip_until_found call.
2427 (c_parser_objc_class_definition): Use class matching_parens as
2428 above.
2429 (c_parser_objc_method_decl): Likewise.
2430 (c_parser_objc_try_catch_finally_statement): Likewise.
2431 (c_parser_objc_synchronized_statement): Likewise.
2432 (c_parser_objc_at_property_declaration): Likewise.
2433 (c_parser_oacc_wait_list): Likewise.
2434 (c_parser_omp_var_list_parens): Likewise.
2435 (c_parser_omp_clause_collapse): Likewise.
2436 (c_parser_omp_clause_default): Likewise.
2437 (c_parser_omp_clause_if): Likewise.
2438 (c_parser_omp_clause_num_threads): Likewise.
2439 (c_parser_omp_clause_num_tasks): Likewise.
2440 (c_parser_omp_clause_grainsize): Likewise.
2441 (c_parser_omp_clause_priority): Likewise.
2442 (c_parser_omp_clause_hint): Likewise.
2443 (c_parser_omp_clause_defaultmap): Likewise.
2444 (c_parser_oacc_single_int_clause): Likewise.
2445 (c_parser_omp_clause_ordered): Likewise.
2446 (c_parser_omp_clause_reduction): Likewise.
2447 (c_parser_omp_clause_schedule): Likewise.
2448 (c_parser_omp_clause_num_teams): Likewise.
2449 (c_parser_omp_clause_thread_limit): Likewise.
2450 (c_parser_omp_clause_aligned): Likewise.
2451 (c_parser_omp_clause_linear): Likewise.
2452 (c_parser_omp_clause_safelen): Likewise.
2453 (c_parser_omp_clause_simdlen): Likewise.
2454 (c_parser_omp_clause_depend): Likewise.
2455 (c_parser_omp_clause_map): Likewise.
2456 (c_parser_omp_clause_device): Likewise.
2457 (c_parser_omp_clause_dist_schedule): Likewise.
2458 (c_parser_omp_clause_proc_bind): Likewise.
2459 (c_parser_omp_clause_uniform): Likewise.
2460 (c_parser_omp_for_loop): Likewise.
2461 (c_parser_cilk_clause_vectorlength): Likewise.
2462 (c_parser_cilk_clause_linear): Likewise.
2463 (c_parser_transaction_expression): Likewise.
2464 * c-parser.h (c_parser_require): Add param matching_location with
2465 default UNKNOWN_LOCATION.
2466 (c_parser_error): Convert return type from void to bool.
2467 (c_parser_skip_until_found): Add param matching_location with
2468 default UNKNOWN_LOCATION.
2469
30af3a2b
MP
24702017-08-09 Marek Polacek <polacek@redhat.com>
2471
2472 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2473 * c-tree.h (build_external_ref): Update declaration.
2474 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2475 (build_external_ref): Change the type of a parameter to bool.
2476 (parser_build_binary_op): Use true/false instead of 1/0.
2477 (pointer_diff): Likewise.
2478 (build_modify_expr): Likewise.
2479 (set_designator): Change the type of a parameter to bool.
2480 (set_init_index): Use true/false instead of 1/0.
2481 (set_init_label): Likewise.
2482 (output_init_element): Change the type of a parameter to bool.
2483 (output_pending_init_elements): Use true/false instead of 1/0.
2484 (process_init_element): Likewise.
2485 (build_binary_op): Change the type of a parameter to bool.
2486
296c53ac
MP
24872017-08-09 Marek Polacek <polacek@redhat.com>
2488
2489 PR c/81233
2490 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2491 Call emit_diagnostic_valist instead of pedwarn.
2492 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2493 Print the relevant types in diagnostics.
2494
a32c8316
MP
24952017-08-09 Marek Polacek <polacek@redhat.com>
2496
2497 PR c/81417
2498 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2499 build_conditional_expr.
a32c8316
MP
2500 * c-parser.c (c_parser_conditional_expression): Create locations for
2501 EXP1 and EXP2 from their source ranges. Pass the locations down to
2502 build_conditional_expr.
2503 * c-tree.h (build_conditional_expr): Update declaration.
2504 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2505 For -Wsign-compare, also print the types.
2506
314e6352
ML
25072017-08-08 Martin Liska <mliska@suse.cz>
2508
2509 * c-convert.c: Include header files.
2510 * c-typeck.c: Likewise.
2511
577eec56
ML
25122017-08-07 Martin Liska <mliska@suse.cz>
2513
2514 * c-parser.c (c_parser_attributes): Canonicalize name of an
2515 attribute.
2516
f7b6353a
MP
25172017-08-02 Marek Polacek <polacek@redhat.com>
2518
2519 PR c/81289
2520 * c-parser.c (c_parser_unary_expression): Use set_error.
2521
8a6eab34
MP
2522 PR c/81448
2523 PR c/81306
2524 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2525 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2526
ab20d992 25272017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2528 Martin Liska <mliska@suse.cz>
2529
2530 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2531 statement.
7fef86d3 2532
f34ebeb2
ML
25332017-07-31 Martin Liska <mliska@suse.cz>
2534
2535 PR sanitize/81530
2536 * c-convert.c (convert): Guard condition with flag_sanitize_p
2537 also with current_function_decl non-null equality.
2538 * c-decl.c (grokdeclarator): Likewise.
2539 * c-typeck.c (build_binary_op): Likewise.
2540
8595f67b
MP
25412017-07-25 Marek Polacek <polacek@redhat.com>
2542
2543 * c-decl.c (grokfield): Remove local variable.
2544
d49718d6
MP
25452017-07-25 Marek Polacek <polacek@redhat.com>
2546
2547 PR c/81364
2548 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2549 macro expansion if the body is in { }.
2550 (c_parser_while_statement): Likewise.
2551 (c_parser_for_statement): Likewise.
2552
ff22eb12
NS
25532017-07-18 Nathan Sidwell <nathan@acm.org>
2554
2555 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2556
eea77d1f
DM
25572017-07-14 David Malcolm <dmalcolm@redhat.com>
2558
2559 * c-decl.c (implicitly_declare): When suggesting a missing
2560 #include, provide a fix-it hint.
2561
b6f43128
DM
25622017-07-06 David Malcolm <dmalcolm@redhat.com>
2563
2564 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2565 and call that instead.
2566 * c-tree.h (selftest::run_c_tests): New decl.
2567
3e2becc4
MP
25682017-06-26 Marek Polacek <polacek@redhat.com>
2569
2570 PR c/80116
2571 * c-parser.c (c_parser_if_body): Set the location of the
2572 body of the conditional after parsing all the labels. Call
2573 warn_for_multistatement_macros.
2574 (c_parser_else_body): Likewise.
2575 (c_parser_switch_statement): Likewise.
2576 (c_parser_while_statement): Likewise.
2577 (c_parser_for_statement): Likewise.
2578 (c_parser_statement): Add a default argument. Save the location
2579 after labels have been parsed.
2580 (c_parser_c99_block_statement): Likewise.
2581
343ae898
RB
25822017-06-19 Richard Biener <rguenther@suse.de>
2583
2584 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2585 negated _Literals to parse _Literal (int) -1.
2586
45b2222a
ML
25872017-06-13 Martin Liska <mliska@suse.cz>
2588
2589 PR sanitize/78204
2590 * c-convert.c (convert): Use sanitize_flags_p.
2591 * c-decl.c (grokdeclarator): Likewise.
2592 * c-typeck.c (convert_for_assignment): Likewise.
2593 (c_finish_return): Likewise.
2594 (build_binary_op): Likewise.
2595
8ab7005b
JJ
25962017-06-08 Jakub Jelinek <jakub@redhat.com>
2597
2598 PR c/81006
2599 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2600 to sizetype before size_binop.
2601
363dc72c
JJ
26022017-06-07 Jakub Jelinek <jakub@redhat.com>
2603
2604 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2605 of TDI_generic.
2606
dc949728
MP
26072017-06-06 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/79983
2610 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2611 ref.
2612 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2613
40ffd95f
BE
26142017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2615
2616 * c-parser.c (c_parser_binary_expression): Implement the
2617 -Wsizeof_pointer_div warning.
2618 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2619 from a parenthesized expression.
2620 (c_parser_expr_list): Use c_last_sizeof_loc.
2621 * c-tree.h (c_last_sizeof_loc): New external.
2622 * c-typeck.c (c_last_sizeof_loc): New variable.
2623 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2624
9fc5e7a4
MM
26252017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2626
2627 PR testsuite/80580
2628 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2629
f012c8ef
DM
26302017-05-30 David Malcolm <dmalcolm@redhat.com>
2631
2632 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2633 parameters.
2634
3cd211af
MS
26352017-05-24 Martin Sebor <msebor@redhat.com>
2636
2637 PR c/80731
2638 * c-fold.c (c_fully_fold_internal): Adjust.
2639 * c-typeck.c (parser_build_unary_op): Adjust.
2640
fd71a9a2
TS
26412017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2642
2643 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2644 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2645 "VECTOR_LENGTH".
2646
92fa0f9e
MP
26472017-05-23 Marek Polacek <polacek@redhat.com>
2648
2649 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2650 quotes.
2651
d11c168a
JJ
26522017-05-22 Jakub Jelinek <jakub@redhat.com>
2653
2654 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2655 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2656 it returned invariant. Call tree_invariant_p unconditionally
2657 afterwards to decide whether to return expr or op0.
2658
58aca9d9
NS
26592017-05-22 Nathan Sidwell <nathan@acm.org>
2660
2661 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2662
7fd549d2
TS
26632017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2664
2665 * c-parser.c (c_parser_omp_clause_default): Handle
2666 "OMP_CLAUSE_DEFAULT_PRESENT".
2667
6ecd2339
BE
26682017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2669
2670 * config-lang.in (gtfiles): Add c-family/c-format.c.
2671
8a57ecff
NS
26722017-05-18 Nathan Sidwell <nathan@acm.org>
2673
2674 * c-decl.c (pushdecl_top_level): Delete unused function.
2675
6574d78e
MP
26762017-05-18 Marek Polacek <polacek@redhat.com>
2677
2678 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2679 (check_earlier_gotos): Likewise.
2680 (define_label): Likewise.
2681 (pending_xref_error): Likewise.
2682 (smallest_type_quals_location): Likewise.
2683 (grokdeclarator): Likewise.
2684 (grokparms): Likewise.
2685 (identifier_global_value): Likewise.
2686 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2687 (find_init_member): Likewise.
2688
e3455240
MP
26892017-05-18 Marek Polacek <polacek@redhat.com>
2690
2691 * c-decl.c (start_decl): Use false/true instead of 0/1.
2692 (grokdeclarator): Likewise.
2693 (finish_struct): Likewise.
2694 (start_function): Change the return type to bool. Use false/true
2695 instead of 0/1.
2696 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2697 * c-tree.h (start_function): Update.
2698 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2699 (set_designator): Change the return type to bool. Use false/true
2700 instead of 0/1.
2701
3fa8871b
MP
27022017-05-17 Marek Polacek <polacek@redhat.com>
2703
2704 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2705 * c-typeck.c: Likewise.
2706
142473df
MP
27072017-05-17 Marek Polacek <polacek@redhat.com>
2708
2709 PR sanitizer/80659
2710 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2711 DECL_IGNORED_P even for non-static compound literals.
2712
1a817418
ML
27132017-05-17 Martin Liska <mliska@suse.cz>
2714
2715 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2716 use it instead of int type.
2717
b2fa0a8b
MP
27182017-05-17 Marek Polacek <polacek@redhat.com>
2719
2720 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2721 call c_fully_fold.
2722 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2723 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2724 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2725 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2726 save_expr.
2727 (c_parser_conditional_expression): Likewise.
2728 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2729 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2730 (process_init_element): Likewise.
2731 (build_binary_op): Likewise.
2732 (handle_omp_array_sections_1): Likewise.
2733
1e47f02b
TS
27342017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2735
2736 * c-parser.c (c_parser_omp_clause_num_gangs)
2737 (c_parser_omp_clause_num_workers)
2738 (c_parser_omp_clause_vector_length): Merge functions into...
2739 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2740 all users.
2741
c24e924f
NS
27422017-05-11 Nathan Sidwell <nathan@acm.org>
2743
2744 * gimple-parser.c: Don't #include tree-dump.h.
2745
c587104e
MM
27462017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2747
2748 PR testsuite/80580
2749 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2750
67ac9a9d
MM
27512017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2752
2753 PR testsuite/80580
2754 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2755 incorrect __MEM syntax.
2756
ac4eb40f
MM
27572017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2758
2759 PR testsuite/80580
2760 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2761 type of unary '*'.
2762
641da50a
NS
27632017-05-09 Nathan Sidwell <nathan@acm.org>
2764
2765 * c-tree.h (pushdecl): Declare.
2766
56d35585
DM
27672017-05-05 David Malcolm <dmalcolm@redhat.com>
2768
2769 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2770 with diagnostic_report_diagnostic.
2771 * c-errors.c (pedwarn_c99): Likewise.
2772 (pedwarn_c90): Likewise.
2773
815d9cc6
XR
27742017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2775
92a285c1 2776 PR c++/80038
815d9cc6
XR
2777 * c-gimplify.c (c_gimplify_expr): Remove calls to
2778 cilk_gimplifY_call_params_in_spawned_fn.
2779
1c4ea66f
DM
27802017-04-25 David Malcolm <dmalcolm@redhat.com>
2781
2782 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2783 hint for removing extra semicolon.
2784
666f7903
JJ
27852017-04-21 Jakub Jelinek <jakub@redhat.com>
2786
2787 PR c/80468
2788 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2789 enabled, set specs->type to integer_type_node.
2790
5764ee3c
JW
27912017-04-03 Jonathan Wakely <jwakely@redhat.com>
2792
2793 * c-array-notation.c: Fix typo in comment.
2794
10fa8dfb
MP
27952017-03-29 Marek Polacek <polacek@redhat.com>
2796
2797 PR c/79730
2798 * c-decl.c (finish_decl): Check VAR_P.
2799
a9e4a1a5
JJ
28002017-03-27 Jakub Jelinek <jakub@redhat.com>
2801
2802 PR middle-end/80162
2803 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2804 * c-typeck.c (c_mark_addressable): Likewise. Look through
2805 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2806 to ARRAY_TYPE.
2807 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2808
ee3ff394
MP
28092017-03-23 Marek Polacek <polacek@redhat.com>
2810
2811 * c-tree.h: Remove a C_RID_YYCODE reference.
2812
4d1b8e70
JJ
28132017-03-21 Jakub Jelinek <jakub@redhat.com>
2814
2815 PR c/80097
2816 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2817 optional COMPOUND_EXPR with ubsan instrumentation.
2818
31dc71a8
MP
28192017-03-17 Marek Polacek <polacek@redhat.com>
2820
2821 * c-parser.c: Add C11 references.
2822
d579c385
MP
28232017-03-15 Marek Polacek <polacek@redhat.com>
2824
2825 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2826
85059a38
MP
28272017-03-11 Marek Polacek <polacek@redhat.com>
2828
2829 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2830
2f6f187a
DM
28312017-03-10 David Malcolm <dmalcolm@redhat.com>
2832
2833 PR translation/79848
2834 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2835 "%qs".
2836 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2837
36618428
MP
28382017-03-09 Marek Polacek <polacek@redhat.com>
2839
2840 PR sanitizer/79757
2841 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2842 parameter declarations with initializers.
2843
01e5af5a
JJ
28442017-03-09 Jakub Jelinek <jakub@redhat.com>
2845
2846 PR c/79969
2847 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2848 TYPE_STUB_DECL.
2849
a71dbc63
JJ
28502017-03-07 Jakub Jelinek <jakub@redhat.com>
2851
2852 PR c/79834
2853 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2854 for "may only be used in compound statements" diagnostics, change it
2855 such that the same translatable string is used for all pragmas. For
2856 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2857 diagnostics.
2858 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2859 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2860 "may only be used in compound statements" diagnostics, such that the
2861 same translatable string is used for all pragmas.
2862
1ff4bae6
MP
28632017-03-04 Marek Polacek <polacek@redhat.com>
2864
2865 PR c/79847
2866 * c-decl.c (implicit_decl_warning): Add missing space.
2867
7f5a7d78
MP
28682017-03-03 Marek Polacek <polacek@redhat.com>
2869
2870 PR c/79758
2871 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2872 current_function_prototype_arg_types is error_mark_node. Fix
2873 formatting. Use TREE_VALUE instead of TREE_TYPE.
2874
883c8f06
JJ
28752017-03-03 Jakub Jelinek <jakub@redhat.com>
2876
79c9b7a8
JJ
2877 PR c/79837
2878 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2879 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2880 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2881 diagnostics.
2882
883c8f06
JJ
2883 PR c/79836
2884 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2885 instead of %<_Generic>.
2886 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2887 (c_parser_omp_target_exit_data): Use %<release%> instead of
2888 %<release>.
2889
324ff1a0
JJ
28902017-02-28 Jakub Jelinek <jakub@redhat.com>
2891
2892 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2893 instead of just cond ? "..." : "...".
2894 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2895 for "enter"/"exit" keyword.
2896 (c_finish_oacc_routine): Don't use %s to supply portions of the
2897 message.
2898
4227c9ad
JJ
28992017-02-24 Jakub Jelinek <jakub@redhat.com>
2900
2901 PR c++/79588
2902 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2903 handle -Wrestrict here.
2904 * c-typeck.c (build_function_call_vec): Adjust
2905 check_function_arguments caller.
2906
5d972e66
RB
29072017-02-23 Richard Biener <rguenther@suse.de>
2908
2909 PR c/79684
2910 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2911 to initialize c_exprs to return.
2912 (c_parser_gimple_binary_expression): Likewise.
2913 (c_parser_gimple_unary_expression): Likewise.
2914 (c_parser_gimple_postfix_expression): Likewise.
2915
61ac5ebe
MP
29162017-02-22 Marek Polacek <polacek@redhat.com>
2917
2918 PR c/79662
2919 * c-typeck.c (convert_arguments): Handle error_mark_node.
2920
41d1b0b1
PK
29212017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2922
2923 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2924 value of c_parser_parse_ssa_name against error_mark_node and emit
2925 error if ssa name is anonymous and written as default definition.
2926
eab1f169
PK
29272017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2928
2929 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2930 FMA_EXPR.
2931
bcac0b4d
JJ
29322017-02-16 Jakub Jelinek <jakub@redhat.com>
2933
2934 PR c++/79512
2935 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2936 ignore #pragma omp target even when not followed by identifier.
2937
1be33173
PK
29382017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2939
2940 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2941 (c_parser_gimple_unary_expression): Likewise.
2942
aa326bfb
JJ
29432017-02-13 Jakub Jelinek <jakub@redhat.com>
2944
2945 * c-parser.c (c_parser_oacc_declare): Add missing space in
2946 diagnostics.
2947
8a398bc5
PK
29482017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2949
2950 PR c/79478
2951 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2952 set_c_expr_source_range when parsing ssa-name.
2953
3dcde5ef 29542017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2955 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2956
2957 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2958 building IL when arguments are error_mark_node.
2959 (c_parser_gimple_unary_expression): Likewise.
2960 (c_parser_gimple_if_stmt): Likewise.
2961 (c_parser_gimple_switch_stmt): Likewise.
2962 (c_parser_gimple_return_stmt): Likewise.
2963 (c_parser_parse_ssa_name): When name lookup fails do not build
2964 an SSA name. Use undeclared rather than not declared in error
2965 reporting.
2966
192b048b
MP
29672017-02-09 Marek Polacek <polacek@redhat.com>
2968
2969 PR c/79428
2970 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2971 instead of c_parser_skip_until_found.
2972
56f71478
JJ
29732017-02-09 Jakub Jelinek <jakub@redhat.com>
2974
2975 PR c/79431
2976 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2977 symtab_node::get on automatic variables.
2978
02889d23
CLT
29792016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2980 Chung-Lin Tang <cltang@codesourcery.com>
2981
2982 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2983 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2984 semantic checking.
2985 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2986
7af4b20d
RB
29872017-02-07 Richard Biener <rguenther@suse.de>
2988
2989 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2990 (c_parser_gimple_postfix_expression_after_primary):
2991 Do not use c_build_function_call_vec to avoid folding and promotion.
2992 Simplify.
2993
e5e391d6
MO
29942017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2995
2996 PR lto/79061
2997 * c-decl.c (pop_scope): Pass main_input_filename to
2998 build_translation_unit_decl.
2999
c2e84327
DM
30002017-01-24 David Malcolm <dmalcolm@redhat.com>
3001
3002 * c-parser.c: Include "read-rtl-function.h" and
3003 "run-rtl-passes.h".
3004 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3005 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3006 production. Update for renaming of field "gimple_pass" to
3007 "gimple_or_rtl_pass". If __RTL was seen, call
3008 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3009 to an auto_timevar, to cope with early exit.
3010 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3011 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3012 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3013 Handle RID_RTL.
3014 (c_parser_parse_rtl_body): New function.
3015 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3016 (struct c_declspecs): Rename field "gimple_pass" to
3017 "gimple_or_rtl_pass". Add field "rtl_p".
3018 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3019 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3020 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3021 (c_parser_gimple_or_rtl_pass_list): ...this.
3022
2ebd93e1
MP
30232017-01-20 Marek Polacek <polacek@redhat.com>
3024
3025 PR c/64279
3026 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3027
b1c95bb5
RB
30282017-01-13 Richard Biener <rguenther@suse.de>
3029
3030 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3031 nops.
3032
25329913
RB
30332017-01-13 Richard Biener <rguenther@suse.de>
3034
3035 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3036 _Literal ( type-name ) number.
3037
6bb4ea5c
RB
30382017-01-12 Richard Biener <rguenther@suse.de>
3039
3040 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3041 __MEM.
3042
6b5b4e9c
JJ
30432017-01-11 Jakub Jelinek <jakub@redhat.com>
3044
3045 PR c++/72813
3046 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3047 PCH file.
3048
e3252775
RB
30492017-01-11 Richard Biener <rguenther@suse.de>
3050
3051 PR bootstrap/79052
3052 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3053 returns on parse errors.
3054
a9342885
MP
30552017-01-04 Marek Polacek <polacek@redhat.com>
3056
3057 PR c++/64767
3058 * c-parser.c (c_parser_postfix_expression): Mark zero character
3059 constants by setting original_type in c_expr.
3060 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3061 with a zero character constant.
3062 (char_type_p): New function.
3063
5dd9a9d0
DM
30642017-01-04 David Malcolm <dmalcolm@redhat.com>
3065
3066 * c-parser.c (c_parser_declaration_or_fndef): Create a
3067 rich_location at init_loc and parse it to start_init.
3068 (last_init_list_comma): New global.
3069 (c_parser_braced_init): Update last_init_list_comma when parsing
3070 commas. Pass it to pop_init_level. Pass location of closing
3071 brace to pop_init_level.
3072 (c_parser_postfix_expression_after_paren_type): Create a
3073 rich_location at type_loc and parse it to start_init.
3074 (c_parser_omp_declare_reduction): Likewise for loc.
3075 * c-tree.h (start_init): Add rich_location * param.
3076 (pop_init_level): Add location_t param.
3077 * c-typeck.c (struct initializer_stack): Add field
3078 "missing_brace_richloc".
3079 (start_init): Add richloc param, use it to initialize
3080 the stack node's missing_brace_richloc.
3081 (last_init_list_comma): New decl.
3082 (finish_implicit_inits): Pass last_init_list_comma to
3083 pop_init_level.
3084 (push_init_level): When finding missing open braces, add fix-it
3085 hints to the richloc.
3086 (pop_init_level): Add "insert_before" param and pass it
3087 when calling pop_init_level. Add fixits about missing
3088 close braces to any richloc. Use the richloc for the
3089 -Wmissing-braces warning.
3090 (set_designator): Pass last_init_list_comma to pop_init_level.
3091 (process_init_element): Likewise.
3092
cbe34bb5
JJ
30932017-01-01 Jakub Jelinek <jakub@redhat.com>
3094
3095 Update copyright years.
3096
d17680f3
JJ
30972016-12-21 Jakub Jelinek <jakub@redhat.com>
3098
0dba7960
JJ
3099 PR bootstrap/78817
3100 * c-typeck.c (build_function_call_vec): If check_function_arguments
3101 returns true, set TREE_NO_WARNING on CALL_EXPR.
3102
d17680f3
JJ
3103 PR c/77767
3104 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3105 to *expr instead of overwriting it.
3106
aa90531e
RB
31072016-12-20 Richard Biener <rguenther@suse.de>
3108
3109 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3110 error recovery.
3111 (c_parser_gimple_statement): Only build assigns for non-error
3112 stmts.
3113 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3114
629b3d75
MJ
31152016-12-14 Martin Jambor <mjambor@suse.cz>
3116
3117 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3118 omp-low.h.
3119 (c_finish_oacc_routine): Adjusted call to
3120 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3121 to use their new names.
3122 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3123 use its new name.
3124 (c_parser_oacc_update): Likewise.
3125 (c_parser_omp_simd): Likewise.
3126 (c_parser_omp_target_update): Likewise.
3127 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3128 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3129 name.
3130 (c_finish_omp_cancellation_point): Likewise.
3131 * gimple-parser.c: Do not include omp-low.h
3132
c5af52eb
CP
31332016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3134 James Norris <jnorris@codesourcery.com>
3135
3136 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3137 EXIT_DATA,WAIT} are not used in compound statements.
3138 (c_parser_oacc_enter_exit_data): Update diagnostics.
3139
48330c93
BE
31402016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3141
3142 PR c++/71973
3143 * c-decl.c (diagnose_mismatched_decls): Use
3144 OPT_Wbuiltin_declaration_mismatch here too.
3145
899ca90e 31462016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3147 Alan Hayward <alan.hayward@arm.com>
3148 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3149
3150 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3151 (make_label, finish_struct): Likewise.
3152
1ee62b92 31532016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3154 Richard Biener <rguenther@suse.de>
22b15758 3155
8e745a17
JJ
3156 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3157 * config-lang.in (gtfiles): Add c/c-parser.h.
3158 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3159 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3160 * c-parser.c (enum c_id_kind, struct c_token,
3161 c_parser_next_token_is, c_parser_next_token_is_not,
3162 c_parser_next_token_is_keyword,
3163 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3164 Split out to ...
3165 * c-parser.h: ... new header.
3166 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3167 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3168 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3169 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3170 c_parser_error, c_parser_require, c_parser_skip_until_found,
3171 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3172 c_parser_type_name): Export.
3173 (c_parser_tokens_buf): New function.
3174 (c_parser_error): Likewise.
3175 (c_parser_set_error): Likewise.
3176 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3177 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3178 via c_parser_parse_gimple_body.
8e745a17
JJ
3179 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3180 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3181 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3182 c_parser_error, c_parser_require, c_parser_skip_until_found,
3183 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3184 c_parser_type_name): Declare.
1ee62b92
PG
3185 (struct c_parser): Declare forward.
3186 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3187 (c_parser_error): Likewise.
3188 (c_parser_set_error): Likewise.
3189 * gimple-parser.c: New file.
3190 * gimple-parser.h: Likewise.
1ee62b92 3191
22b15758
UB
31922016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3193
3194 PR c/35503
3195 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3196 warn_for_restrict.
3197
84ff4775
LCW
31982016-09-11 Le-Chun Wu <lcwu@google.com>
3199 Mark Wielaard <mjw@redhat.com>
3200
3201 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3202 to the given -Wshadow= variant.
3203
4d0cdd0c
TP
32042016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3205
3206 * c-typeck.c: Include memmodel.h.
3207
1202f33e
JJ
32082016-10-13 Jakub Jelinek <jakub@redhat.com>
3209
3210 PR target/77957
3211 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3212 instead of lhd_return_null_tree_v.
3213
8a14afd0
BS
32142016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3215
3216 PR c++/69733
3217 * c-decl.c (smallest_type_quals_location): New static function.
3218 (grokdeclarator): Try to find the correct location for an ignored
3219 qualifier.
3220
81fea426
MP
32212016-09-26 Marek Polacek <polacek@redhat.com>
3222
3223 PR c/7652
3224 * c-decl.c (pop_scope): Add gcc_fallthrough.
3225
32262016-09-26 Marek Polacek <polacek@redhat.com>
3227
3228 PR c/7652
3229 * c-parser.c (struct c_token): Add flags field.
3230 (c_lex_one_token): Pass it to c_lex_with_flags.
3231 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3232 into IFN_FALLTHROUGH.
3233 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3234 attribute fallthrough after a case label or default label.
3235 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3236
9a2300e9
MP
32372016-09-24 Marek Polacek <polacek@redhat.com>
3238
3239 PR c/77490
3240 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3241 have boolean value. Warn about ++/-- on booleans.
3242
7de76362
JJ
32432016-09-23 Jakub Jelinek <jakub@redhat.com>
3244
3245 * c-parser.c (incomplete_record_decls): Remove unnecessary
3246 = vNULL initialization of file scope vec.
3247
5b73d2ab
MP
32482016-09-16 Marek Polacek <polacek@redhat.com>
3249
3250 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3251
e51fbec3
MP
32522016-09-14 Marek Polacek <polacek@redhat.com>
3253
3254 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3255 (fix_array_notation_expr): Likewise.
3256 * c-decl.c (finish_decl): Likewise.
3257 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3258 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3259 (function_to_pointer_conversion): Use false instead of 0.
3260 (convert_lvalue_to_rvalue): Likewise.
3261 (parser_build_unary_op): Likewise.
3262 (build_atomic_assign): Likewise.
3263 (build_unary_op): Change nonconvert parameter type to bool, use
3264 true/false instead of 1/0.
3265 (build_binary_op): Use true instead of 1.
3266
254830ba
DM
32672016-09-13 David Malcolm <dmalcolm@redhat.com>
3268
3269 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3270 of add_fixit_insert to add_fixit_insert_before.
3271
4c13ba17
MP
32722016-09-13 Marek Polacek <polacek@redhat.com>
3273
3274 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3275 it.
3276
54dcdb88
BE
32772016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3278
3279 PR c++/77496
3280 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3281 COMPOUND_EXPR to warn_for_omitted_condop.
3282
e5106e27
DM
32832016-09-07 David Malcolm <dmalcolm@redhat.com>
3284
3285 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3286 c_get_substring_location for this new langhook.
3287
9dc5773f
JJ
32882016-09-02 Jakub Jelinek <jakub@redhat.com>
3289
3290 PR c/65467
3291 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3292 flag_openmp.
3293 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3294 instead of mark_exp_read on low_bound/length expression.
3295 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3296 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3297 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3298 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3299 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3300 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3301 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3302 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3303 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3304 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3305 instead of mark_expr_read.
3306 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3307 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3308 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3309 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3310 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3311 array section bases outside of depend clause, for depend clause
3312 use convert_lvalue_to_rvalue on the base.
3313 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3314 linear, aligned, map, to and from clauses.
3315 (c_omp_clause_copy_ctor): New function.
3316
295844f6
MP
33172016-09-01 Marek Polacek <polacek@redhat.com>
3318
3319 PR c/7652
3320 * c-typeck.c (composite_type): Add FALLTHRU comment.
3321
089af25c
DM
33222016-08-31 David Malcolm <dmalcolm@redhat.com>
3323
3324 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3325 to the insertion fixits for "struct", "union", and "enum".
3326
f9087798
DM
33272016-08-30 David Malcolm <dmalcolm@redhat.com>
3328
3329 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3330 rather than add_fixit_misspelled_id.
3331 (undeclared_variable): Likewise.
3332 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3333 now-redundant "here" params from add_fixit_insert method calls.
3334 (c_parser_parameter_declaration): Likewise.
3335 * c-typeck.c (build_component_ref): Remove now-redundant range
3336 param from add_fixit_replace method calls.
3337
ebef225f
MP
33382016-08-25 Marek Polacek <polacek@redhat.com>
3339
3340 * c-typeck.c (parser_build_binary_op): Pass LHS to
3341 warn_logical_not_parentheses.
3342
fe377a48
MP
33432016-08-25 Marek Polacek <polacek@redhat.com>
3344
3345 PR c/77323
3346 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3347 or _FloatN or _FloatNx is not supported.
3348 (finish_declspecs): Set type to integer_type_node when _FloatN or
3349 _FloatNx is not supported.
3350
c65699ef
JM
33512016-08-19 Joseph Myers <joseph@codesourcery.com>
3352
3353 PR c/32187
3354 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3355 (struct c_declspecs): Add field floatn_nx_idx.
3356 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3357 and _FloatNx type specifiers.
3358 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3359 (c_parser_declspecs, c_parser_attribute_any_word)
3360 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3361 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3362 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3363 narrower than double.
3364
2f1364c2
JJ
33652016-08-12 Jakub Jelinek <jakub@redhat.com>
3366 Martin Liska <mliska@suse.cz>
3367
3368 PR c/67410
3369 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3370 % to determine val element to change. Assert that
3371 wchar_bytes * charwidth fits into val array.
3372
191816a3
MP
33732016-08-12 Marek Polacek <polacek@redhat.com>
3374
3375 PR c/7652
3376 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3377 (c_parser_postfix_expression): Likewise.
3378 * c-typeck.c (build_unary_op): Adjust fall through comment.
3379 (c_mark_addressable): Likewise.
3380
b95a64bb
JJ
33812016-08-11 Jakub Jelinek <jakub@redhat.com>
3382
3383 PR c/72816
3384 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3385 array member through typedef, for orig_qual_indirect == 0 clear
3386 orig_qual_type.
3387
895aa8e1
DM
33882016-08-08 David Malcolm <dmalcolm@redhat.com>
3389
3390 PR c/64955
3391 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3392 this up to selftest::run_c_tests.
3393 (selftest::run_c_tests): New function.
3394
0b212d8c
TS
33952016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3396
ae9281fc
TS
3397 * c-parser.c (struct oacc_routine_data): Add error_seen and
3398 fndecl_seen members.
3399 (c_finish_oacc_routine): Use these.
3400 (c_parser_declaration_or_fndef): Adjust.
3401 (c_parser_oacc_routine): Likewise. Support more C language
3402 constructs, and improve diagnostics. Move pragma context
3403 checking...
3404 (c_parser_pragma): ... here.
3405
0b212d8c
TS
3406 * c-parser.c (struct oacc_routine_data): New.
3407 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3408 Simplify code.
3409 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3410 declare target" attribute.
3411
76e2c821
JB
34122016-08-01 Jan Beulich <jbeulich@suse.com>
3413
3414 * c-fold.c (c_fully_fold_internal): Also emit shift count
3415 warnings for vector types.
3416 * c-typeck.c (build_binary_op): Likewise.
3417
f618a472
MP
34182016-07-29 Marek Polacek <polacek@redhat.com>
3419
3420 PR c/71742
3421 * c-decl.c (finish_struct): Rephrase an error message.
3422
efd0786f
MP
3423 PR c/71853
3424 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3425 to error node for invalid code.
3426
e00dceaf
MP
3427 PR c/71573
3428 * c-decl.c (implicitly_declare): Return decl early not only for
3429 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3430
673a107a
JJ
34312016-07-29 Jakub Jelinek <jakub@redhat.com>
3432
3433 PR c/71969
3434 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3435 on GNU extern inline functions.
3436
a5b5c8b6
MP
34372016-07-29 Marek Polacek <polacek@redhat.com>
3438
3439 PR c/71583
3440 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3441 check expr.value.
3442
e3fe09c1
UB
34432016-07-22 Uros Bizjak <ubizjak@gmail.com>
3444
3445 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3446
7c8f7eaa
DM
34472016-07-20 David Malcolm <dmalcolm@redhat.com>
3448
3449 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3450 spellcheck-tree.h
3451 (best_macro_match): Likewise, converting from a typedef to a
3452 subclass.
3453 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3454 (lookup_name_fuzzy): Update for change of best_macro_match to a
3455 subclass with a ctor that calls cpp_forall_identifiers.
3456
de6a69ee
DM
34572016-07-20 David Malcolm <dmalcolm@redhat.com>
3458
3459 * c-decl.c (implicit_decl_warning): Update for conversion of
3460 return type of lookup_name_fuzzy to const char *.
3461 (undeclared_variable): Likewise.
3462 (lookup_name_fuzzy): Convert return type from tree to
3463 const char *.
3464 * c-parser.c (c_parser_declaration_or_fndef): Update for
3465 conversion of return type of lookup_name_fuzzy to const char *.
3466 (c_parser_parameter_declaration): Likewise.
3467
b1c9c068
CP
34682016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3469
3470 * c-parser.c (c_parser_oacc_declare): Don't scan for
3471 GOMP_MAP_POINTER.
3472 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3473 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3474 zero-length subarrays.
3475
ddbbcb19
JJ
34762016-07-15 Jakub Jelinek <jakub@redhat.com>
3477
3478 PR c/71858
3479 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3480 instead of FUZZY_LOOKUP_NAME.
3481 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3482 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3483
dd36b877
JJ
34842016-07-14 Jakub Jelinek <jakub@redhat.com>
3485
3486 PR c/71858
3487 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3488
8c681247
TS
34892016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3490
3491 * c-parser.c (c_parser_generic_selection): Make type of variable
3492 auto_vec.
3493 (c_parser_omp_declare_simd): Likewise.
3494
bf4fa671
TS
34952016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3496
3497 * c-decl.c (struct c_struct_parse_info): Change member types
3498 from vec to auto_vec.
3499 (start_struct): Adjust.
3500 (finish_struct): Likewise.
3501
557e8c49
JJ
35022016-07-02 Jakub Jelinek <jakub@redhat.com>
3503
3504 PR c/71719
3505 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3506
54d19c3b
TS
35072016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3508
3509 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3510 Move pragma context checking into...
3511 (c_parser_omp_cancellation_point): ... here, and improve
3512 diagnostic messages.
3513 * c-typeck.c (c_finish_omp_cancel)
3514 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3515
152ef731
JJ
35162016-06-29 Jakub Jelinek <jakub@redhat.com>
3517
3518 PR c/71685
3519 * c-typeck.c (c_build_qualified_type): Don't clear
3520 C_TYPE_INCOMPLETE_VARS for the main variant.
3521
35222016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3523
3524 PR c/71552
3525 * c-typeck.c (output_init_element): Diagnose incompatible types
3526 before non-constant initializers.
3527
e9ac1f86
JJ
35282016-06-28 Jakub Jelinek <jakub@redhat.com>
3529
3530 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3531
277d7ee0
AK
35322016-06-23 Andi Kleen <ak@linux.intel.com>
3533
3534 * Make-lang.in: Add support for autofdo.
3535
1a4f11c8
DM
35362016-06-22 David Malcolm <dmalcolm@redhat.com>
3537
3538 PR c/70339
3539 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3540 (implicit_decl_warning): When issuing warnings for implicit
3541 declarations, attempt to provide a suggestion via
3542 lookup_name_fuzzy.
3543 (undeclared_variable): Likewise when issuing errors.
3544 (lookup_name_in_scope): Likewise.
3545 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3546 (best_macro_match): New typedef.
3547 (find_closest_macro_cpp_cb): New function.
3548 (lookup_name_fuzzy): New function.
3549 * c-parser.c: Include gcc-rich-location.h.
3550 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3551 (c_keyword_starts_typename): ...this new function.
3552 (c_parser_declaration_or_fndef): When issuing errors about
3553 missing "struct" etc, add a fixit. For other kinds of errors,
3554 attempt to provide a suggestion via lookup_name_fuzzy.
3555 (c_parser_parms_declarator): When looking ahead to detect typos in
3556 type names, also reject CPP_KEYWORD.
3557 (c_parser_parameter_declaration): When issuing errors about
3558 unknown type names, attempt to provide a suggestion via
3559 lookup_name_fuzzy.
3560 * c-tree.h (c_keyword_starts_typename): New prototype.
3561
5a578671
JM
35622016-06-20 Joseph Myers <joseph@codesourcery.com>
3563
3564 PR c/71601
3565 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3566 c_common_type returns error_mark_node.
3567
3f8257db 35682016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3569
3570 PR c/69507
3571 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3572 __alignof__ (expression).
3573
6a3f203c
DM
35742016-06-14 David Malcolm <dmalcolm@redhat.com>
3575
3576 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3577
264757fb
DM
35782016-06-14 David Malcolm <dmalcolm@redhat.com>
3579
3580 * c-typeck.c (build_component_ref): Simplify fixit code by
3581 using gcc_rich_location::add_fixit_misspelled_id.
3582 (set_init_label): Likewise.
3583
f7e4f2e3
DM
35842016-06-13 David Malcolm <dmalcolm@redhat.com>
3585
3586 * c-parser.c (c_parser_initelt): Provide location of name for new
3587 location_t param of set_init_label.
3588 * c-tree.h (set_init_label): Add location_t param.
3589 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3590 param and use it when issuing error messages about unrecognized
3591 field names. Attempt to provide a fixit hint if appropriate,
3592 otherwise update the error message to provide the type name.
3593
4b1ffdb1
TS
35942016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3595
3596 PR c/71381
3597 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3598 Loosen checking.
3599
44a845ca
MS
36002016-06-08 Martin Sebor <msebor@redhat.com>
3601 Jakub Jelinek <jakub@redhat.com>
3602
3603 PR c++/70507
3604 PR c/68120
3605 * c-typeck.c (convert_arguments): Don't promote last argument
3606 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3607
92a5f2ba
MP
36082016-06-08 Marek Polacek <polacek@redhat.com>
3609
3610 PR c/71418
3611 * c-decl.c (grokdeclarator): Check TYPE_P.
3612
08203f73
MP
3613 PR c/71426
3614 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3615 code.
3616
6ffd47b7
DM
36172016-06-07 David Malcolm <dmalcolm@redhat.com>
3618
3619 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3620 and structure element reference, capture the location of the
3621 element name token and pass it to build_component_ref.
3622 (c_parser_postfix_expression_after_primary): Likewise for
3623 structure element dereference.
3624 (c_parser_omp_variable_list): Likewise for
3625 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3626 * c-tree.h (build_component_ref): Add location_t param.
3627 * c-typeck.c (build_component_ref): Add location_t param
3628 COMPONENT_LOC. Use it, if available, when issuing hints about
3629 mispelled member names to provide a fixit replacement hint.
3630
1f40cff3
MP
36312016-06-06 Marek Polacek <polacek@redhat.com>
3632
3633 PR c/71362
3634 * c-parser.c (c_parser_direct_declarator): Set location.
3635
5545a907
MP
36362016-06-06 Marek Polacek <polacek@redhat.com>
3637
3638 * c-typeck.c (comptypes_internal): Handle comparisons of
3639 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3640 TYPE_REF_CAN_ALIAS_ALL.
3641
b605f663
CLT
36422016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3643
3644 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3645 arguments as addressable when async clause exists.
3646
00631022
JJ
36472016-05-30 Jakub Jelinek <jakub@redhat.com>
3648
3649 PR c++/71349
3650 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3651 when combined with target construct.
3652
7211a097
JJ
36532016-05-26 Jakub Jelinek <jakub@redhat.com>
3654
3655 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3656 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3657
95efe6b6
MP
36582016-05-25 Marek Polacek <polacek@redhat.com>
3659
3660 PR c/71265
3661 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3662
a23faf7a
MP
3663 PR c/71266
3664 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3665
e46c7770
CP
36662016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3667
3668 * c-parser.c (c_parser_oacc_declare): Add support for
3669 GOMP_MAP_FIRSTPRIVATE_POINTER.
3670 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3671 argument with enum c_omp_region_type ort.
3672 (handle_omp_array_sections): Likewise. Update call to
3673 handle_omp_array_sections_1.
3674 (c_finish_omp_clauses): Add specific errors and warning messages for
3675 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3676 call to handle_omp_array_sections.
3677
a04e69c0
TS
36782016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3679
3680 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3681
f17a223d
RB
36822016-05-24 Richard Biener <rguenther@suse.de>
3683
3684 PR middle-end/70434
3685 PR c/69504
3686 * c-typeck.c (build_array_ref): Do not complain about indexing
3687 non-lvalue vectors. Adjust for function name change.
3688
79063edd
MS
36892016-05-20 Martin Sebor <msebor@redhat.com>
3690
3691 PR c/71115
3692 * c-typeck.c (error_init): Use
3693 expansion_point_location_if_in_system_header.
3694 (warning_init): Same.
3695
8a40fef3
DM
36962016-05-19 David Malcolm <dmalcolm@redhat.com>
3697
3698 PR c/71171
3699 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3700 in error-handling.
3701 (c_parser_postfix_expression): Likewise.
3702 * c-tree.h (c_expr::set_error): New method.
3703 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3704 that result's range is initialized.
3705
e9892350
JG
37062016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3707
3708 * c-typeck.c (parser_build_unary_op): Fix formatting.
3709
8fad45f5
MW
37102016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3711
3712 * c-decl.c (grokdeclarator): Remove errmsg and use of
3713 targetm.invalid_return_type.
3714 (grokparms): Remove errmsg and use of
3715 targetm.invalid_parameter_type.
3716
aa4b467b
JM
37172016-05-13 Joseph Myers <joseph@codesourcery.com>
3718
3719 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3720 function return type.
3721
4f2e1536
MP
37222016-05-12 Marek Polacek <polacek@redhat.com>
3723
3724 PR c/70756
3725 * c-decl.c (build_compound_literal): Pass LOC down to
3726 c_incomplete_type_error.
3727 * c-tree.h (require_complete_type): Adjust declaration.
3728 (c_incomplete_type_error): Likewise.
3729 * c-typeck.c (require_complete_type): Add location parameter, pass it
3730 down to c_incomplete_type_error.
3731 (c_incomplete_type_error): Add location parameter, pass it down to
3732 error_at.
3733 (build_component_ref): Pass location down to c_incomplete_type_error.
3734 (default_conversion): Pass location down to require_complete_type.
3735 (build_array_ref): Likewise.
3736 (build_function_call_vec): Likewise.
3737 (convert_arguments): Likewise.
3738 (build_unary_op): Likewise.
3739 (build_c_cast): Likewise.
3740 (build_modify_expr): Likewise.
3741 (convert_for_assignment): Likewise.
3742 (c_finish_omp_clauses): Likewise.
3743
d6e83a8d
MM
37442016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3745
3746 PR c/43651
3747 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3748 is enabled.
3749 * c-errors.c (pedwarn_c90): Return true if warned.
3750 * c-tree.h (pedwarn_c90): Change return type to bool.
3751 (enum c_declspec_word): Add new enumerator cdw_atomic.
3752
5c3a10fb
MP
37532016-05-11 Marek Polacek <polacek@redhat.com>
3754
3755 PR c++/71024
3756 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3757 diagnose_mismatched_attributes and call it.
3758
cf68d92c
MP
37592016-05-10 Marek Polacek <polacek@redhat.com>
3760
3761 PR c/70255
3762 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3763 on a declaration following the definition.
3764
351f85c5
JJ
37652016-05-05 Jakub Jelinek <jakub@redhat.com>
3766
3767 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3768 parse it through to c_parser_c99_block_statement.
3769 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3770 caller.
3771
deef7113
MP
37722016-05-04 Marek Polacek <polacek@redhat.com>
3773
3774 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3775 OPT_Wdangling_else.
3776
de55efd5
MP
37772016-05-04 Marek Polacek <polacek@redhat.com>
3778
3779 PR c/48778
3780 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3781 for macro expansions.
3782
79ce98bc
MP
37832016-05-03 Marek Polacek <polacek@redhat.com>
3784
3785 PR c/70859
3786 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3787 check_builtin_function_arguments.
3788
fb2647aa
RB
37892016-05-03 Richard Biener <rguenther@suse.de>
3790
3791 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3792 the checksum from the previous stage.
3793
77886428
CP
37942016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3795
3796 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3797 c_finish_omp_clauses.
3798 (c_parser_omp_all_clauses): Likewise.
3799 (c_parser_oacc_cache): Likewise.
3800 (c_parser_oacc_loop): Likewise.
3801 (omp_split_clauses): Likewise.
3802 (c_parser_omp_declare_target): Likewise.
3803 (c_parser_cilk_all_clauses): Likewise.
3804 (c_parser_cilk_for): Likewise.
3805 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3806 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3807
7176a4a0
MP
38082016-05-02 Marek Polacek <polacek@redhat.com>
3809
3810 PR c/70851
3811 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3812 incomplete type.
3813
e7ff0319
CP
38142016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3815
3816 PR middle-end/70626
3817 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3818 OACC_LOOP_CLAUSE_MASK.
3819 (c_parser_oacc_kernels_parallel): Update call to
3820 c_oacc_split_loop_clauses.
3821
9f405ce1
AM
38222016-04-28 Andrew MacLeod <amacleod@redhat.com>
3823
3824 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3825 argument to build_modify_expr in two cases.
3826
c1e1f433
BS
38272016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3828
3829 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3830 warn_for_memset instead of warning directly here.
3831
2448a956
MP
38322016-04-26 Marek Polacek <polacek@redhat.com>
3833
3834 PR c/67784
3835 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3836 out of ...
3837 (c_parser_for_statement): ... here.
3838 (c_parser_if_statement): Use it.
3839 (c_parser_switch_statement): Use it.
3840 (c_parser_while_statement): Use it.
3841
b02a5e26
MP
3842 PR c/70791
3843 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3844
477d4906
IV
38452016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3846
3847 PR c++/69363
3848 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3849 instead of c_finish_cilk_clauses.
3850 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3851 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3852 floating-point variables in the linear clause for Cilk Plus.
3853
fe37c7af
MM
38542016-04-18 Michael Matz <matz@suse.de>
3855
3856 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3857 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3858
949505a9
MP
38592016-04-15 Marek Polacek <polacek@redhat.com>
3860
3861 PR c/70671
3862 * c-typeck.c (build_unary_op): Pass location down to error and
3863 warning call.
3864
dda1bf61
JJ
38652016-04-15 Jakub Jelinek <jakub@redhat.com>
3866
3867 PR c/70436
3868 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3869 where needed.
3870 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3871 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3872 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3873 Adjust c_parser_pragma callers.
3874 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3875 caller.
3876 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3877 c_parser_statement.
3878 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3879 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3880 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3881 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3882 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3883 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3884 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3885 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3886 down where needed.
3887 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3888 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3889 calls.
3890
99cd9857
MP
38912016-04-13 Marek Polacek <polacek@redhat.com>
3892
3893 PR c/70436
3894 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3895 adjust callers.
3896 (c_parser_statement): Likewise.
3897 (c_parser_c99_block_statement): Likewise.
3898 (c_parser_while_statement): Likewise.
3899 (c_parser_for_statement): Likewise.
3900 (c_parser_if_body): Don't set IF_P here.
3901 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3902 about dangling else here.
3903 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3904 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3905 warn about dangling else here.
3906
f13355da
MP
39072016-04-04 Marek Polacek <polacek@redhat.com>
3908
3909 PR c/70307
3910 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3911
5fde6a45
MP
39122016-03-31 Marek Polacek <polacek@redhat.com>
3913
3914 PR c/70297
3915 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3916
4bbf545b
DM
39172016-03-18 David Malcolm <dmalcolm@redhat.com>
3918
3919 PR c/70281
3920 * c-parser.c (c_parser_postfix_expression): Set the source range
3921 for uses of "__builtin_types_compatible_p".
3922
fcc2b74f
JJ
39232016-03-17 Jakub Jelinek <jakub@redhat.com>
3924
3925 PR c/70280
3926 * c-typeck.c (composite_type): Don't count void_list_node
3927 into len, if the list is terminated by void_list_node, start
3928 with void_list_node instead of NULL for newargs. Stop
3929 at void_list_node.
3930
ab4c578f
MP
39312016-03-16 Marek Polacek <polacek@redhat.com>
3932
3933 PR c/70093
3934 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3935 nested functions returning VM types.
3936
96b3c82d
CP
39372016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3938
3939 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3940 when calling c_finish_omp_clauses.
3941
29b9828f
BS
39422016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3943
3944 PR c/69824
3945 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3946 for later.
3947
7ff6ca38
MP
39482016-03-04 Marek Polacek <polacek@redhat.com>
3949
3950 PR c/69798
3951 * c-parser.c (c_parser_postfix_expression): Call
3952 c_parser_cast_expression rather than c_parser_postfix_expression.
3953
686e2237
JJ
39542016-03-01 Jakub Jelinek <jakub@redhat.com>
3955
3956 PR c/69796
3957 PR c/69974
3958 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3959 of incomplete decls to error_mark_node.
3960
0b05329b
MP
39612016-02-24 Marek Polacek <polacek@redhat.com>
3962
3963 PR c/69819
3964 * c-decl.c (finish_decl): Don't update the copy of the type of a
3965 different decl type.
3966
067fbd8b
JJ
39672016-02-23 Jakub Jelinek <jakub@redhat.com>
3968
3969 PR objc/69844
3970 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3971 in id_kind reclassification.
3972
bf14eba2
JJ
39732016-02-16 Jakub Jelinek <jakub@redhat.com>
3974
3975 PR c/69835
3976 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3977
ba539195
JN
39782016-02-16 James Norris <jnorris@codesourcery.com>
3979
3980 PR c/64748
3981 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3982
16595a1f
BS
39832016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3984
f48dfe98
BS
3985 * c-decl.c (build_null_declspecs): Zero the entire struct.
3986
16595a1f
BS
3987 PR c/69522
3988 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3989 callers changed. If nested_p is true, use it to call
3990 finish_implicit_inits.
3991 * c-tree.h (finish_implicit_inits): Declare.
3992 * c-typeck.c (finish_implicit_inits): New function. Move code
3993 from ...
3994 (push_init_level): ... here.
3995 (set_designator, process_init_element): Call finish_implicit_inits.
3996
66756373
JJ
39972016-02-11 Jakub Jelinek <jakub@redhat.com>
3998
3999 PR c/69768
4000 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4001 arguments for -Waddress warning.
4002
1066e9b5
JJ
40032016-02-04 Jakub Jelinek <jakub@redhat.com>
4004
4005 PR c/69669
4006 * c-decl.c (finish_enum): When honoring mode attribute,
4007 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4008
3a5d2ba4
JJ
40092016-01-29 Jakub Jelinek <jakub@redhat.com>
4010
4011 PR debug/69518
4012 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4013 all type variants, not just TYPE_MAIN_VARIANT.
4014
cbdd8ae0
JJ
40152016-01-27 Jakub Jelinek <jakub@redhat.com>
4016
4017 PR debug/66869
4018 * c-decl.c (c_write_global_declarations_1): Warn with
4019 warn_unused_function if static prototype without definition
4020 is not C_DECL_USED.
4021
fa74a4bc
MP
40222016-01-27 Marek Polacek <polacek@redhat.com>
4023
4024 PR c/68062
4025 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4026 to unsigned, if needed. Add -Wsign-compare warning.
4027
13f92e8d
JJ
40282016-01-26 Jakub Jelinek <jakub@redhat.com>
4029
4030 PR tree-optimization/69483
4031 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4032
cd8e73dc 40332016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4034
4035 PR c/24293
4036 * c-tree.h (incomplete_record_decls): Declare.
4037 * c-parser.c (incomplete_record_decls): Define.
4038 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4039 report error if any decl has zero size.
4040 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4041 or enum type to incomplete_record_decls.
4042
e6d6ec9e
TV
40432016-01-14 Tom de Vries <tom@codesourcery.com>
4044
4045 PR tree-optimization/68773
4046 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4047 set force_output.
4048
00083992
MP
40492016-01-14 Marek Polacek <polacek@redhat.com>
4050
4051 PR c/69262
4052 * c-decl.c (grokdeclarator): Provide more information for invalid
4053 array declarations.
4054
7443cf13
DM
40552016-01-06 David Malcolm <dmalcolm@redhat.com>
4056
4057 * c-parser.c (c_parser_unary_expression): For dereferences, build
4058 a combined location before calling build_indirect_ref, so that
4059 error reports cover the full range, manually updating the c_expr
4060 src_range.
4061
6b131d5b
MP
40622016-01-06 Marek Polacek <polacek@redhat.com>
4063
4064 PR sanitizer/69099
4065 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4066 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4067 NULL.
4068
818ab71a
JJ
40692016-01-04 Jakub Jelinek <jakub@redhat.com>
4070
4071 Update copyright years.
4072
2fe0a208
MP
40732016-01-04 Marek Polacek <polacek@redhat.com>
4074
4075 PR c/68908
4076 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4077 optimization to use __atomic_fetch_* built-in if possible.
4078
c7b48c8a
TS
40792015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4080
4081 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4082 into...
4083 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4084 all users.
4085
fda5652f
MP
40862015-12-22 Marek Polacek <polacek@redhat.com>
4087
4088 PR c/69002
4089 * c-typeck.c (build_component_ref): Warn when acessing elements of
4090 atomic structures or unions.
4091
745e411d
DM
40922015-12-21 David Malcolm <dmalcolm@redhat.com>
4093
4094 * c-typeck.c: Include "gcc-rich-location.h".
4095 (build_binary_op): In the two places that call binary_op_error,
4096 create a gcc_rich_location and populate it with the location of
4097 the binary op and its two operands.
4098
94c40e19
DM
40992015-12-16 David Malcolm <dmalcolm@redhat.com>
4100
4101 * c-parser.c (c_parser_statement_after_labels): When calling
4102 c_finish_return, Use the return expression's location if it has
4103 one, falling back to the location of the first token within it.
4104 * c-typeck.c (c_finish_return): When issuing warnings about
4105 the incorrect presence/absence of a return value, issue a note
4106 showing the declaration of the function.
4107
de67c4c3
DM
41082015-12-16 David Malcolm <dmalcolm@redhat.com>
4109
4110 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4111 to 4.
4112 (c_parser_peek_nth_token): New function.
4113 (c_parser_peek_conflict_marker): New function.
4114 (c_parser_error): Detect conflict markers and report them as such.
4115
a10704e1
DM
41162015-12-16 David Malcolm <dmalcolm@redhat.com>
4117
4118 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4119 to preserve range information for the primary expression
4120 in the call to c_parser_postfix_expression_after_primary.
4121
8062bca6
DM
41222015-12-16 David Malcolm <dmalcolm@redhat.com>
4123
4124 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4125 expression location, falling back on the first token location,
4126 rather than always using the latter.
4127
d06f8b75
MP
41282015-12-16 Marek Polacek <polacek@redhat.com>
4129
4130 PR c/64637
4131 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4132 available.
4133
2994fb91
MP
41342015-12-15 Marek Polacek <polacek@redhat.com>
4135
4136 PR c/68907
4137 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4138 artificial decl.
4139
a1b93f8d
DM
41402015-12-08 David Malcolm <dmalcolm@redhat.com>
4141
4142 * c-parser.c (c_parser_alignof_expression): Capture location of
4143 closing parenthesis (if any), or of end of unary expression, and
4144 use it to build a src_range for the expression.
4145
46c6e1e2
DM
41462015-12-08 David Malcolm <dmalcolm@redhat.com>
4147
4148 PR c/68757
4149 * c-parser.c (c_parser_get_builtin_args): Add
4150 "out_close_paren_loc" param, and write back to it.
4151 (c_parser_postfix_expression): Capture the closing
4152 parenthesis location for RID_CHOOSE_EXPR,
4153 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4154 RID_BUILTIN_SHUFFLE and use it to set the source range
4155 for such expressions; within RID_BUILTIN_COMPLEX set
4156 the underlying location.
4157
66189108
MP
41582015-12-07 Marek Polacek <polacek@redhat.com>
4159
4160 PR c/68668
4161 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4162 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4163
f187980b
EB
41642015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4165
4166 * c-tree.h (c_build_va_arg): Adjust prototype.
4167 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4168 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4169 parameter, adjust throughout and issue an error if EXPR is a component
4170 with reverse storage order.
4171
4250754e
JM
41722015-12-02 Jason Merrill <jason@redhat.com>
4173
4174 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4175 (c_fully_fold_internal, decl_constant_value_for_optimization):
4176 Move from c-common.c.
4177 * c-tree.h: Declare decl_constant_value_for_optimization.
4178 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4179
e9e32ee6
JM
41802015-12-02 Joseph Myers <joseph@codesourcery.com>
4181
4182 PR c/68162
4183 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4184 following link from declarator to next declarator. Track original
4185 qualified type and pass it to c_build_qualified_type.
4186 * c-typeck.c (c_build_qualified_type): Add arguments
4187 orig_qual_type and orig_qual_indirect.
4188
ff7a55bf
TS
41892015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4190
4191 * c-parser.c (c_parser_omp_clause_name)
4192 (c_parser_oacc_all_clauses): Alphabetical sorting.
4193
657e4e47
JJ
41942015-12-02 Jakub Jelinek <jakub@redhat.com>
4195
4196 PR c/68533
4197 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4198 for diagnostics.
4199
37d5ad46
JB
42002015-12-01 Julian Brown <julian@codesourcery.com>
4201 Cesar Philippidis <cesar@codesourcery.com>
4202 James Norris <James_Norris@mentor.com>
4203
4204 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4205 (c_parser_oacc_clause_use_device): New function.
4206 (c_parser_oacc_all_clauses): Add use_device support.
4207 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4208 (c_parser_oacc_host_data): New function.
4209 (c_parser_omp_construct): Add host_data support.
4210 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4211 * c-typeck.c (c_finish_oacc_host_data): New function.
4212 (c_finish_omp_clauses): Add use_device support.
4213
a4850ce9
JH
42142015-11-29 Jan Hubicka <hubicka@ucw.cz>
4215
4216 PR c/67106
4217 * c-decl.c: Set TYPE_PACKED in variants.
4218
b58d3df2
ML
42192015-11-27 Martin Liska <mliska@suse.cz>
4220
4221 PR c++/68312
4222 * c-array-notation.c (fix_builtin_array_notation_fn):
4223 Use release_vec_vec instead of vec::release.
4224 (build_array_notation_expr): Likewise.
4225 (fix_conditional_array_notations_1): Likewise.
4226 (fix_array_notation_expr): Likewise.
4227 (fix_array_notation_call_expr): Likewise.
4228
aec17bfe
JJ
42292015-11-27 Jakub Jelinek <jakub@redhat.com>
4230
4231 PR c/63326
4232 * c-parser.c (c_parser_compound_statement_nostart): If
4233 last_label is true, use pragma_stmt instead of pragma_compound
4234 as second c_parser_pragma argument.
4235 (c_parser_omp_ordered, c_parser_omp_target_update,
4236 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4237 false as second argument to c_parser_skip_to_pragma_eol after
4238 diagnosing standalone directives used in pragma_stmt context.
4239
688c4de0
IV
42402015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4241
4242 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4243 with "if (ENABLE_OFFLOADING)".
4244
cbd03aee
DM
42452015-11-23 David Malcolm <dmalcolm@redhat.com>
4246
4247 PR objc/68438
4248 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4249 for various Objective-C constructs: Class.name syntax,
4250 @selector(), @protocol(), @encode(), and [] message syntax.
4251
a87a86e1
DM
42522015-11-20 David Malcolm <dmalcolm@redhat.com>
4253
4254 PR 62314
4255 * c-typeck.c (should_suggest_deref_p): New function.
4256 (build_component_ref): Special-case POINTER_TYPE when
4257 generating a "not a structure of union" error message, and
4258 suggest a "->" rather than a ".", providing a fix-it hint.
4259
8ece8dfb
DM
42602015-11-19 David Malcolm <dmalcolm@redhat.com>
4261
4262 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4263 candidate into a new function, find_closest_identifier.
4264
433068cc
MP
42652015-11-19 Marek Polacek <polacek@redhat.com>
4266
4267 PR c/68412
4268 * c-typeck.c (parser_build_binary_op): Properly handle
4269 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4270
bef08b71
DM
42712015-11-17 David Malcolm <dmalcolm@redhat.com>
4272
4273 * c-parser.c (set_c_expr_source_range): Bulletproof both
4274 overloaded implementations against NULL expr->value.
4275 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4276 values.
4277 (c_parser_unary_expression): Likewise when handling addresses of
4278 labels.
4279 (c_parser_postfix_expression): Likewise for statement expressions,
4280 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4281 __builtin_va_arg, and for __builtin_offset_of.
4282 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4283 src_range using the range of the braced initializer.
4284 (c_parser_transaction_expression): Set src_range for "ret" to a
4285 sane pair of values.
4286
fff77217
KY
42872015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4288
4289 * c-parser.c (c_finish_omp_declare_simd): Look for
4290 "simd" attribute as well. Update error message.
4291
1d899da2
TS
42922015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4293
4294 * c-parser.c (c_parser_omp_declare_target): Adjust.
4295
e4606348
JJ
42962015-11-14 Jakub Jelinek <jakub@redhat.com>
4297
4298 * c-typeck.c (c_finish_omp_clauses): Don't mark
4299 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4300
3e636daf
MP
43012015-11-14 Marek Polacek <polacek@redhat.com>
4302
4303 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4304 * c-typeck.c: Likewise.
4305
ebedc9a3
DM
43062015-11-13 David Malcolm <dmalcolm@redhat.com>
4307
4308 * c-decl.c (warn_defaults_to): Pass line_table to
4309 rich_location ctor.
4310 * c-errors.c (pedwarn_c99): Likewise.
4311 (pedwarn_c90): Likewise.
4312 * c-parser.c (set_c_expr_source_range): New functions.
4313 (c_token::get_range): New method.
4314 (c_token::get_finish): New method.
4315 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4316 based on the range from the start of the LHS to the end of the
4317 RHS.
4318 (c_parser_conditional_expression): Likewise, based on the range
4319 from the start of the cond.value to the end of exp2.value.
4320 (c_parser_binary_expression): Call set_c_expr_source_range on
4321 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4322 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4323 based on the cast_loc through to the end of the expr.
4324 (c_parser_unary_expression): Likewise, based on the
4325 op_loc through to the end of op.
4326 (c_parser_sizeof_expression) Likewise, based on the start of the
4327 sizeof token through to either the closing paren or the end of
4328 expr.
4329 (c_parser_postfix_expression): Likewise, using the token range,
4330 or from the open paren through to the close paren for
4331 parenthesized expressions.
4332 (c_parser_postfix_expression_after_primary): Likewise, for
4333 various kinds of expression.
4334 * c-tree.h (struct c_expr): Add field "src_range".
4335 (c_expr::get_start): New method.
4336 (c_expr::get_finish): New method.
4337 (set_c_expr_source_range): New decls.
4338 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4339 on ret for prefix unary ops.
4340 (parser_build_binary_op): Likewise, running from the start of
4341 arg1.value through to the end of arg2.value.
4342
ec8b536f
MP
43432015-11-13 Marek Polacek <polacek@redhat.com>
4344
4345 PR c/68320
4346 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4347
277fe616
DM
43482015-11-13 David Malcolm <dmalcolm@redhat.com>
4349
4350 * c-typeck.c: Include spellcheck.h.
4351 (lookup_field_fuzzy_find_candidates): New function.
4352 (lookup_field_fuzzy): New function.
4353 (build_component_ref): If the field was not found, try using
4354 lookup_field_fuzzy and potentially offer a suggestion.
4355
6e232ba4
JN
43562015-11-12 James Norris <jnorris@codesourcery.com>
4357 Joseph Myers <joseph@codesourcery.com>
4358
4359 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4360 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4361 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4362 and PRAGMA_OMP_CLAUSE_LINK.
4363 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4364 and PRAGMA_OACC_CLAUSE_LINK.
4365 (OACC_DECLARE_CLAUSE_MASK): New definition.
4366 (c_parser_oacc_declare): New function.
4367
9be4f715
MP
43682015-11-12 Marek Polacek <polacek@redhat.com>
4369
4370 PR c/67784
4371 * c-parser.c (c_parser_for_statement): Reclassify the token in
4372 a correct scope.
4373
e78bede6
MP
43742015-11-11 Marek Polacek <polacek@redhat.com>
4375
4376 PR c/68107
4377 PR c++/68266
4378 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4379 checking the size of an array.
4380
69f293c9
AM
43812015-11-11 Andrew MacLeod <amacleod@redhat.com>
4382
4383 * c-array-notation.c: Remove unused header files.
4384 * c-aux-info.c: Likewise.
4385 * c-convert.c: Likewise.
4386 * c-decl.c: Likewise.
4387 * c-errors.c: Likewise.
4388 * c-lang.c: Likewise.
4389 * c-objc-common.c: Likewise.
4390 * c-parser.c: Likewise.
4391 * c-typeck.c: Likewise.
4392 * gccspec.c: Likewise.
4393
3a40d81d
NS
43942015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4395 Cesar Philippidis <cesar@codesourcery.com>
4396 James Norris <jnorris@codesourcery.com>
4397 Julian Brown <julian@codesourcery.com>
4398 Nathan Sidwell <nathan@codesourcery.com>
4399
3a40d81d
NS
4400 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4401 routine arg.
4402 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4403 (c_parser_pragma): Parse 'acc routine'.
4404 (OACC_ROUTINE_CLAUSE_MARK): Define.
4405 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4406
fc402eec
AA
44072015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4408
4409 PR debug/67192
4410 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4411 location of the backward-goto to the start of the loop body.
4412
f6b0b3db
AA
44132015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4414
4415 PR debug/67192
4416 * c-parser.c (c_parser_while_statement): Finish the loop before
4417 parsing ahead for misleading indentation.
4418 (c_parser_for_statement): Likewise.
4419
ee45a32d
EB
44202015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4421
4422 * c-decl.c (finish_struct): If the structure has reverse storage
4423 order, rewrite the type of array fields with scalar component. Call
4424 maybe_apply_pragma_scalar_storage_order on entry.
4425 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4426 errors on bit-fields and reverse SSO here and not...
4427 (c_mark_addressable): ...here.
4428 (output_init_element): Adjust call to initializer_constant_valid_p.
4429 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4430
8a645150
DM
44312015-11-06 David Malcolm <dmalcolm@redhat.com>
4432
4433 * c-decl.c (warn_defaults_to): Update for change in signature
4434 of diagnostic_set_info.
4435 * c-errors.c (pedwarn_c99): Likewise.
4436 (pedwarn_c90): Likewise.
4437 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4438 for textinfo::set_location.
4439
7a5e4956
CP
44402015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4441 Thomas Schwinge <thomas@codesourcery.com>
4442 James Norris <jnorris@codesourcery.com>
4443
4444 * c-parser.c (c_parser_omp_clause_name): Add support for
4445 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4446 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4447 default(none) in OpenACC.
4448 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4449 arguments.
4450 (c_parser_oacc_clause_tile): New function.
4451 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4452 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4453 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4454 TILE}.
4455 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4456 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4457 FIRSTPRIVATE}.
4458 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4459 (c_parser_oacc_update): Update the error message for missing clauses.
4460 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4461 and OMP_CLAUSE_INDEPENDENT.
4462
bfcfbfa0
MP
44632015-11-05 Marek Polacek <polacek@redhat.com>
4464
4465 PR c/68090
4466 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4467 deal with pre-evaluation on invalid types.
4468
e01d41e5
JJ
44692015-11-05 Jakub Jelinek <jakub@redhat.com>
4470 Ilya Verbin <ilya.verbin@intel.com>
4471
4472 * c-parser.c: Include context.h and gimple-expr.h.
4473 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4474 monotonic together with nonmonotonic.
4475 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4476 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4477 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4478 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4479 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4480 expressions on combined target teams before the target.
4481 (c_parser_omp_declare_target): If decl has "omp declare target" or
4482 "omp declare target link" attribute, and cgraph or varpool node already
4483 exists, then set corresponding flags. Call c_finish_omp_clauses
4484 in the parenthesized extended-list syntax case.
4485 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4486 declare target.
4487 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4488 on OMP_CLAUSE_REDUCTION array sections.
4489 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4490 into the constant offset, or for variable low-bound using
4491 POINTER_PLUS_EXPR. For structure element based array sections use
4492 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4493 (c_finish_omp_clauses): Drop generic_field_head, structure
4494 elements are now always mapped even as array section bases,
4495 diagnose same var in data sharing and mapping clauses. Diagnose if
4496 linear step on declare simd is neither a constant nor a uniform
4497 parameter. Look through POINTER_PLUS_EXPR for array section
4498 reductions. Diagnose the same var or function appearing multiple
4499 times on the same directive. Fix up wording for the to clause if t
4500 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4501 modifier on kinds other than dynamic or guided or nonmonotonic
4502 modifier together with ordered clause.
4503
4bf9e5a8
TS
45042015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4505 Chung-Lin Tang <cltang@codesourcery.com>
4506
4507 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4508
2adfab87
AM
45092015-10-29 Andrew MacLeod <amacleod@redhat.com>
4510
4511 * c-array-notation.c: Reorder #include's and remove duplicates.
4512 * c-aux-info.c: Likewise.
4513 * c-convert.c: Likewise.
4514 * c-decl.c: Likewise.
4515 * c-errors.c: Likewise.
4516 * c-lang.c: Likewise.
4517 * c-objc-common.c: Likewise.
4518 * c-parser.c: Likewise.
4519 * c-typeck.c: Likewise.
4520
e922069e
JW
45212015-10-26 Jim Wilson <jim.wilson@linaro.org>
4522
4523 PR debug/66068
4524 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4525 after calling build_qualified_type.
4526
765dd391
CP
45272015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4528 Thomas Schwinge <thomas@codesourcery.com>
4529 James Norris <jnorris@codesourcery.com>
4530 Joseph Myers <joseph@codesourcery.com>
4531 Julian Brown <julian@codesourcery.com>
4532 Bernd Schmidt <bschmidt@redhat.com>
4533
4534 * c-parser.c (c_parser_oacc_shape_clause): New.
4535 (c_parser_oacc_simple_clause): New.
4536 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4537 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4538
88bae6f4
TS
45392015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4540 James Norris <jnorris@codesourcery.com>
4541 Cesar Philippidis <cesar@codesourcery.com>
4542
4543 PR c/64765
4544 PR c/64880
4545 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4546 parameters, and handle these. Adjust all users.
4547 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4548 into...
4549 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4550 all users.
4551 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4552 declare functions.
4553 (c_finish_omp_construct): Declare function.
4554 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4555 Merge functions into...
4556 (c_finish_omp_construct): ... this new function.
4557
a8fc2579
RB
45582015-10-22 Richard Biener <rguenther@suse.de>
4559
4560 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4561 before folding a MINUS_EXPR.
4562
e9122ef6
MP
45632015-10-21 Marek Polacek <polacek@redhat.com>
4564
4565 PR c/68024
4566 * c-decl.c (start_function): Warn about vararg functions without
4567 a prototype.
4568
9f47c7e5
IE
45692015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4570
4571 * c-typeck.c (build_conditional_expr): Use boolean vector
4572 type for vector comparison.
4573 (build_vec_cmp): New.
4574 (build_binary_op): Use build_vec_cmp for comparison.
4575
fa60eeb9
MP
45762015-10-20 Marek Polacek <polacek@redhat.com>
4577
4578 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4579
2c7020eb
MP
45802015-10-20 Marek Polacek <polacek@redhat.com>
4581
4582 PR c/67964
4583 * c-parser.c (c_parser_attributes): Break out of the loop if the
4584 token after an attribute isn't a comma.
4585
d9a6bd32
JJ
45862015-10-13 Jakub Jelinek <jakub@redhat.com>
4587 Aldy Hernandez <aldyh@redhat.com>
4588
4589 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4590 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4591 (c_parser_omp_variable_list): Handle structure elements for
4592 map, to and from clauses. Handle array sections in reduction
4593 clause. Formatting fixes.
4594 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4595 if clause modifiers.
4596 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4597 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4598 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4599 c_parser_omp_clause_is_device_ptr): New functions.
4600 (c_parser_omp_clause_ordered): Parse optional parameter.
4601 (c_parser_omp_clause_reduction): Handle array reductions.
4602 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4603 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4604 functions.
4605 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4606 (c_parser_omp_clause_depend_sink): New function.
4607 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4608 (c_parser_omp_clause_map): Parse release/delete map kinds and
4609 optional always modifier.
4610 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4611 and c_finish_omp_clauses callers.
4612 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4613 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4614 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4615 (OMP_CRITICAL_CLAUSE_MASK): Define.
4616 (c_parser_omp_critical): Parse critical clauses.
4617 (c_parser_omp_for_loop): Handle doacross loops, adjust
4618 c_finish_omp_for and c_finish_omp_clauses callers.
4619 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4620 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4621 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4622 (c_parser_omp_for): Disallow ordered clause when combined with
4623 distribute. Disallow linear clause when combined with distribute
4624 and not combined with simd.
4625 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4626 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4627 parse clauses and if depend clause is found, don't parse a body.
4628 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4629 Allow target parallel without for after it.
4630 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4631 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4632 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4633 invalid kinds.
4634 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4635 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4636 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4637 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4638 functions.
4639 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4640 defaultmap and is_device_ptr clauses.
4641 (c_parser_omp_target): Parse target parallel and target simd. Set
4642 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4643 and target exit data. Diagnose invalid map kinds.
4644 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4645 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4646 construct.
4647 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4648 &omp_priv.
4649 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4650 (c_parser_omp_taskloop): New function.
4651 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4652 handle PRAGMA_OMP_TASKLOOP.
4653 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4654 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4655 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4656 Add IS_OMP argument, handle structure element bases, diagnose
4657 bitfields, pass IS_OMP recursively, diagnose known zero length
4658 array sections in depend clauses, handle array sections in reduction
4659 clause, diagnose negative length even for pointers.
4660 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4661 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4662 array sections in reduction clause, set
4663 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4664 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4665 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4666 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4667
21ba0cea
MP
46682015-10-06 Marek Polacek <polacek@redhat.com>
4669
4670 * c-parser.c (c_parser_statement_after_labels): Use
4671 protected_set_expr_location.
4672 (c_parser_omp_clause_num_gangs): Likewise.
4673 (c_parser_omp_clause_num_threads): Likewise.
4674 (c_parser_omp_clause_num_workers): Likewise.
4675 (c_parser_omp_clause_vector_length): Likewise.
4676 (c_parser_omp_clause_num_teams): Likewise.
4677 (c_parser_omp_clause_thread_limit): Likewise.
4678 * c-typeck.c (build_c_cast): Likewise.
4679 (c_cast_expr): Likewise.
4680
624d31fe
RS
46812015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4682
4683 * c-typeck.c (c_tree_equal): Use real_equal instead of
4684 REAL_VALUES_EQUAL.
4685
b8fd7909
JM
46862015-10-04 Jason Merrill <jason@redhat.com>
4687
4688 * c-parser.c (c_lex_one_token): Handle @synchronized.
4689 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4690 can change whether the function is transaction_safe.
4691
1c7485af
MP
46922015-10-02 Marek Polacek <polacek@redhat.com>
4693
4694 PR c/67730
4695 * c-typeck.c (convert_for_assignment): Use the expansion point
4696 location throughout.
4697
3e3b8d63
MP
46982015-10-02 Marek Polacek <polacek@redhat.com>
4699
4700 PR c/64249
4701 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4702 and pass it down to c_parser_if_statement.
4703 (c_parser_else_body): Add CHAIN parameter and pass it down to
4704 c_parser_statement_after_labels.
4705 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4706 duplicated if-else-if conditions.
4707
aabef2de
MP
47082015-10-01 Marek Polacek <polacek@redhat.com>
4709
4710 * c-typeck.c (convert_for_assignment): Improve commentary.
4711
de8ddd5f
MP
47122015-09-30 Marek Polacek <polacek@redhat.com>
4713
4714 PR c/67730
4715 * c-typeck.c (c_finish_return): Use the expansion point location for
4716 certain "return with value" warnings.
4717
c4914de6
MLI
47182015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4719
4720 * c-parser.c (pragma_lex): Add loc argument.
4721
0e36f5c7
MP
47222015-09-15 Marek Polacek <polacek@redhat.com>
4723
4724 PR c/67580
4725 * c-decl.c (tag_exists_p): New function.
4726 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4727 struct/union/enum keywords are missing.
4728 * c-tree.h (tag_exists_p): Declare.
4729
2f3bb934
MP
47302015-09-15 Marek Polacek <polacek@redhat.com>
4731
4732 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4733 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4734 Return NULL_TREE instead of 0.
4735 (lookup_name): Return NULL_TREE instead of 0.
4736 (lookup_name_in_scope): Likewise.
4737 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4738 (parser_xref_tag): Use false instead of 0.
4739 (start_struct): Use true instead of 1.
4740 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4741
aa256c4a
MP
47422015-09-14 Marek Polacek <polacek@redhat.com>
4743
4744 * c-typeck.c (set_nonincremental_init_from_string): Use
4745 HOST_WIDE_INT_M1U when shifting a negative value.
4746
dbb68221
MW
47472015-09-09 Mark Wielaard <mjw@redhat.com>
4748
4749 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4750 parm against NULL.
4751
a8a098ac
JJ
47522015-09-10 Jakub Jelinek <jakub@redhat.com>
4753
4754 PR c/67502
4755 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4756 into OMP_FOR_PRE_BODY rather than before the loop.
4757
f4b189d5
JJ
47582015-09-09 Jakub Jelinek <jakub@redhat.com>
4759
0bb99c11
JJ
4760 PR c/67501
4761 * c-parser.c (c_parser_oacc_all_clauses,
4762 c_parser_omp_all_clauses): Remove invalid clause from
4763 list of clauses even if parser->error is set.
4764
fce5e5e3
JJ
4765 PR c/67500
4766 * c-parser.c (c_parser_omp_clause_aligned,
4767 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4768 test for errors.
4769 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4770 error_mark_node.
4771
f4b189d5
JJ
4772 PR c/67495
4773 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4774 instead of c_parser_unary_expression. If the result is !lvalue_p,
4775 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4776
b2aaf235
MP
47772015-09-04 Marek Polacek <polacek@redhat.com>
4778
4779 PR sanitizer/67279
4780 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4781
1807ffc1
MS
47822015-09-03 Martin Sebor <msebor@redhat.com>
4783
4784 PR c/66516
8b652e65
JJ
4785 * c-typeck.c (convert_arguments, parser_build_unary_op,
4786 build_conditional_expr, c_cast_expr, convert_for_assignment,
4787 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4788 reject_gcc_builtin.
4789 (c_decl_implicit): Define.
4790
d04ff417
MP
47912015-09-02 Marek Polacek <polacek@redhat.com>
4792
4793 PR c/67432
4794 * c-parser.c (c_parser_enum_specifier): Give a better error for
4795 an empty enum.
4796
a79683d5
TS
47972015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4798
4799 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4800
191a6b94
MP
48012015-08-12 Marek Polacek <polacek@redhat.com>
4802
4803 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4804 LOC to it.
4805
420a9d9b
MP
48062015-08-03 Marek Polacek <polacek@redhat.com>
4807
4808 PR c/67088
4809 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4810 Use it.
4811 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4812
992118a1
PP
48132015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4814
4815 * c-parser.c (c_parser_if_body): Take token_indent_info
4816 argument. Call warn_for_misleading_indentation even when the
4817 body is a semicolon. Extract token_indent_infos corresponding
4818 to the guard, body and next tokens. Adjust call to
4819 warn_for_misleading_indentation accordingly.
4820 (c_parser_else_body): Likewise.
4821 (c_parser_if_statement): Likewise.
4822 (c_parser_while_statement): Likewise.
4823 (c_parser_for_statement): Likewise.
4824
46308474
LFSM
48252015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4826 Manuel López-Ibáñez <manu@gcc.gnu.org>
4827
4828 * c-decl.c (get_parm_info): Remove static var. Update warning
4829 message.
4830
05b28fd6
MP
48312015-07-27 Marek Polacek <polacek@redhat.com>
4832
4833 PR c++/66555
4834 PR c/54979
4835 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4836
451b5e48
MP
48372015-07-20 Marek Polacek <polacek@redhat.com>
4838
4839 PR c++/55095
4840 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4841 (build_binary_op): Warn about left shift overflows.
4842
1916bcb5
AM
48432015-07-09 Andrew MacLeod <amacleod@redhat.com>
4844
4845 * c-array-notation.c: Adjust includes for flags.h changes.
4846 * c-objc-common.c: Likewise.
4847
c7131fb2
AM
48482015-07-07 Andrew MacLeod <amacleod@redhat.com>
4849
4850 * c-array-notation.c: Adjust includes.
4851 * c-aux-info.c: Likewise.
4852 * c-convert.c: Likewise.
4853 * c-decl.c: Likewise.
4854 * c-errors.c: Likewise.
4855 * c-lang.c: Likewise.
4856 * c-objc-common.c: Likewise.
4857 * c-parser.c: Likewise.
4858 * c-typeck.c: Likewise.
4859
da2e71c9
MLI
48602015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4861
4862 PR fortran/66605
4863 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4864
b155cfd9
MP
48652015-06-29 Marek Polacek <polacek@redhat.com>
4866
4867 PR c/66322
4868 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4869 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4870 about -Wswitch-bool here.
4871 (do_case): Update c_add_case_label call.
4872 (c_finish_case): Update c_do_switch_warnings call.
4873
31521951
MP
48742015-06-27 Marek Polacek <polacek@redhat.com>
4875
4876 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4877
22d03525
MP
48782015-06-26 Marek Polacek <polacek@redhat.com>
4879
4880 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4881 INDIRECT_REF_P.
4882 * c-typeck.c (array_to_pointer_conversion): Likewise.
4883 (build_unary_op): Likewise.
4884 (c_finish_return): Likewise.
4885
f0889939
AM
48862015-06-25 Andrew MacLeod <amacleod@redhat.com>
4887
4888 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4889 * c-parser.c: Likewise.
4890
8d67ee55
RS
48912015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4892
4893 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4894 instead of pointer_hash.
4895 (detect_field_duplicates): Likewise.
4896
0ae9bd27
MP
48972015-06-25 Marek Polacek <polacek@redhat.com>
4898
4899 * c-array-notation.c: Use VAR_P throughout.
4900 * c-decl.c: Likewise.
4901 * c-objc-common.c: Likewise.
4902 * c-parser.c: Likewise.
4903 * c-typeck.c: Likewise.
4904
62f9079a
MP
49052015-06-25 Marek Polacek <polacek@redhat.com>
4906
4907 * c-decl.c: Use is_global_var throughout.
4908 * c-parser.c: Likewise.
4909 * c-typeck.c: Likewise.
4910
abb226c9
AM
49112015-06-17 Andrew MacLeod <amacleod@redhat.com>
4912
4913 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4914 * c-aux-info.c: Likewise.
4915 * c-convert.c: Likewise.
4916 * c-decl.c: Likewise.
4917 * c-errors.c: Likewise.
4918 * c-lang.c: Likewise.
4919 * c-objc-common.c: Likewise.
4920 * c-parser.c: Likewise.
4921 * c-typeck.c: Likewise.
4922
8cbababc
JH
49232015-06-11 Jan Hubicka <hubicka@ucw.cz>
4924
4925 PR middle-end/66325
4926 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4927 variants.
4928
a0349665
PMR
49292015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4930
4931 * c-decl.c (pop_scope): Register the main translation unit
4932 through the new debug hook.
4933
13fdf2e2
AM
49342015-06-08 Andrew MacLeod <amacleod@redhat.com>
4935
4936 * c-array-notation.c : Adjust include files.
4937 * c-aux-info.c : Likewise.
4938 * c-convert.c : Likewise.
4939 * c-decl.c : Likewise.
4940 * c-errors.c : Likewise.
4941 * c-lang.c : Likewise.
4942 * c-lang.h : Likewise.
4943 * c-objc-common.c : Likewise.
4944 * c-parser.c : Likewise.
4945 * c-typeck.c : Likewise.
4946
d7438551
AH
49472015-06-05 Aldy Hernandez <aldyh@redhat.com>
4948
4949 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4950 immediately clobber it.
4951 (c_write_global_declarations_1): Remove call to
4952 check_global_declaration_1.
4953 (c_write_global_declarations_2): Remove.
4954 (c_write_final_cleanups): Rename from c_write_global_declarations.
4955 Remove call to finalize_compilation_unit.
4956 Remove calls to debugging hooks.
4957 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4958 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4959 * c-tree.h: Remove c_write_global_declarations.
4960
ecb9f223
AM
49612015-06-04 Andrew MacLeod <amacleod@redhat.com>
4962
4963 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4964 * c-aux-info.c: Likewise.
4965 * c-convert.c: Likewise.
4966 * c-decl.c: Likewise.
4967 * c-errors.c: Likewise.
4968 * c-lang.c: Likewise.
4969 * c-objc-common.c: Likewise.
4970 * c-parser.c: Likewise.
4971 * c-typeck.c: Likewise.
4972
9482b620
MP
49732015-06-04 Marek Polacek <polacek@redhat.com>
4974
4975 PR c/66341
4976 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4977 it is a lvalue.
4978
bc51ace3
PK
49792015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4980
4981 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4982 Warn for empty struct.
4983 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4984
ea5b45b6
AT
49852015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4986
4987 * c-decl.c (start_function): Call plugin before parsing.
4988 (finish_function): Call plugin after parsing.
4989
c2d47482
PK
49902015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4991
4992 PR c/49551
4993 * c-decl.c (merge_decls): Merge DECL_COMMON.
4994
a95492ab
JW
49952015-05-22 Jim Wilson <jim.wilson@linaro.org>
4996
4997 * Make-lang.in (check_gcc_pallelize): Define.
4998
fd5c817a
MP
49992015-05-22 Marek Polacek <polacek@redhat.com>
5000
5001 PR c/47043
5002 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5003 attributes.
5004
c7b70a3c
MP
50052015-05-21 Marek Polacek <polacek@redhat.com>
5006
5007 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5008 DECL_BUILT_IN.
5009
21b634ae
MP
50102015-05-20 Marek Polacek <polacek@redhat.com>
5011
5012 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5013 * c-typeck.c: Likewise.
5014
296a8c2f
MP
50152015-05-19 Marek Polacek <polacek@redhat.com>
5016
5017 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5018
41b37d5e
JJ
50192015-05-19 Jakub Jelinek <jakub@redhat.com>
5020
5021 PR middle-end/66199
5022 * c-parser.c (c_parser_omp_for_loop): Don't add
5023 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5024 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5025 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5026 constructs.
5027
fab27f52
MM
50282015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5029
5030 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5031 swaps.
fab27f52 5032
40de31cf
MLI
50332015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5034
5035 PR fortran/44054
5036 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5037 accessor function.
5038
3aa3c9fc
MP
50392015-05-14 Marek Polacek <polacek@redhat.com>
5040
5041 PR c/66066
5042 PR c/66127
5043 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5044 rather than with 0.
5045
c3388e62
DM
50462015-05-12 David Malcolm <dmalcolm@redhat.com>
5047
5048 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5049 to add a call to warn_for_misleading_indentation.
5050 (c_parser_else_body): Likewise, adding param "else_loc".
5051 (c_parser_if_statement): Check for misleading indentation.
5052 (c_parser_while_statement): Likewise.
5053 (c_parser_for_statement): Likewise.
5054
755e528f
MP
50552015-05-08 Marek Polacek <polacek@redhat.com>
5056
5057 PR c/64918
5058 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5059 (output_init_element): Likewise.
5060
0173bd2a
MP
50612015-05-07 Marek Polacek <polacek@redhat.com>
5062
5063 PR c/65179
5064 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5065 value.
5066
9babc352
MP
50672015-04-30 Marek Polacek <polacek@redhat.com>
5068
5069 * c-typeck.c (set_init_label): Call error_at instead of error and
5070 pass LOC to it.
5071
ac9f18db
MP
5072 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5073 the type of a decl.
5074
ec3fba51
MP
5075 * c-typeck.c (c_build_va_arg): Clarify the error message.
5076
b811915d
TS
50772015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5078
5079 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5080 OMP_STANDALONE_CLAUSES.
5081
f3075008
MP
50822015-04-28 Marek Polacek <polacek@redhat.com>
5083
5084 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5085
4e81b788
MP
50862015-04-28 Marek Polacek <polacek@redhat.com>
5087
5088 PR c/65901
5089 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5090
6c1db78e
MP
50912015-04-25 Marek Polacek <polacek@redhat.com>
5092
5093 PR c/52085
5094 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5095 attribute.
5096
5c4abbb8
MP
50972015-04-23 Marek Polacek <polacek@redhat.com>
5098
5099 PR c/65345
5100 * c-decl.c (set_labels_context_r): New function.
5101 (store_parm_decls): Call it via walk_tree_without_duplicates.
5102 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5103 instead of create_tmp_var. Build TARGET_EXPR instead of
5104 COMPOUND_EXPR.
5105 (build_atomic_assign): Use create_tmp_var_raw instead of
5106 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5107
06aca1d5
IV
51082015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5109
5110 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5111 (c_parser_omp_target_update): Add missed %> to error_at ().
5112
8fba1830
BRF
51132015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5114
5115 PR target/55143
5116 * c-decl.c (c_default_pointer_mode): Remove definition.
5117 * c-tree.h (c_default_pointer_mode): Remove declaration.
5118
62021f64
TB
51192015-03-27 Tobias Burnus <burnus@net-b.de>
5120
5121 PR c/65586
5122 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5123 error out.
5124 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5125 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5126 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5127
9b65e171
JJ
51282015-03-19 Jakub Jelinek <jakub@redhat.com>
5129
5130 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5131 attribute for DECL_EXTERNAL VAR_DECLs.
5132
17958621
JJ
51332015-03-11 Jakub Jelinek <jakub@redhat.com>
5134
5135 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5136 argument.
5137
7ccb1a11
JJ
51382015-03-10 Jakub Jelinek <jakub@redhat.com>
5139
5140 PR c/65120
5141 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5142 before preparing arguments to warn_logical_not_parentheses.
5143
01177669
JJ
51442015-03-09 Jakub Jelinek <jakub@redhat.com>
5145
5146 PR c/65120
5147 * c-typeck.c (parser_build_binary_op): Don't warn for
5148 !!x == y or !b == y where b is _Bool.
5149
802ac282
MP
51502015-03-09 Marek Polacek <polacek@redhat.com>
5151
5152 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5153 * c-decl.c (grokdeclarator): Likewise.
5154 * c-typeck.c (build_binary_op): Likewise.
5155
e5165b60
MP
51562015-02-27 Marek Polacek <polacek@redhat.com>
5157
5158 PR c/65228
5159 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5160
065d214c
MP
51612015-02-14 Marek Polacek <polacek@redhat.com>
5162
5163 PR c/64768
5164 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5165 declared through a typedef name.
5166
e5d9235b
MP
51672015-02-13 Marek Polacek <polacek@redhat.com>
5168
5169 PR c/65050
5170 * c-decl.c (grokdeclarator): Print also the type when giving
5171 the error message about array's incomplete element type.
5172
fa01ffcc
JJ
51732015-02-11 Jakub Jelinek <jakub@redhat.com>
5174
5175 PR c/64824
5176 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5177 check in the POP macro.
5178
c3e38a03
MP
51792015-02-09 Marek Polacek <polacek@redhat.com>
5180
5181 PR c/64856
5182 * c-typeck.c (process_init_element): Don't always wrap
5183 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5184 initializing a range of elements.
5185
4886ec8e
JJ
51862015-02-04 Jakub Jelinek <jakub@redhat.com>
5187
5188 PR c/64824
5189 PR c/64868
5190 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5191
c3e38a03 51922015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5193
5194 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5195 processing enum declaration.
5196
7b33f0c8
MP
51972015-01-29 Marek Polacek <polacek@redhat.com>
5198
5199 PR c/64709
5200 * c-typeck.c (pop_init_level): If constructor_elements has
5201 exactly one element with integer_zerop value, set constructor_zeroinit
5202 to 1. Remove braces around warning_init call.
5203
dea63e49
JJ
52042015-01-27 Jakub Jelinek <jakub@redhat.com>
5205
5206 PR c/64766
5207 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5208 of FUNCTION_DECLs with error_mark_node.
5209
d38f7dce
JJ
52102015-01-26 Jakub Jelinek <jakub@redhat.com>
5211
5212 PR c/64778
5213 * c-typeck.c (convert_arguments): Return -1 if there are
5214 error_args, even if we've diagnosed too many arguments.
5215
cbf5d0e7
RB
52162015-01-21 Richard Biener <rguenther@suse.de>
5217
5218 PR middle-end/64313
5219 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5220 for builtins the user declared correctly.
5221
41dbbb37
TS
52222015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5223 Bernd Schmidt <bernds@codesourcery.com>
5224 Cesar Philippidis <cesar@codesourcery.com>
5225 James Norris <jnorris@codesourcery.com>
5226 Jakub Jelinek <jakub@redhat.com>
5227 Ilmir Usmanov <i.usmanov@samsung.com>
5228
5229 * c-parser.c: Include "gomp-constants.h".
5230 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5231 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5232 Use OMP_CLAUSE_SET_MAP_KIND.
5233 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5234 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5235 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5236 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5237 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5238 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5239 "copyout", "create", "delete", "deviceptr", "gang", "host",
5240 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5241 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5242 "present_or_create", "pcreate", "seq", "self", "vector",
5243 "vector_length", "wait", "worker".
5244 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5245 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5246 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5247 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5248 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5249 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5250 (c_parser_oacc_data_clause_deviceptr)
5251 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5252 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5253 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5254 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5255 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5256 (c_parser_oacc_parallel, c_parser_oacc_update)
5257 (c_parser_oacc_wait): New functions.
5258 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5259 (c_finish_oacc_data): New prototypes.
5260 * c-typeck.c: Include "gomp-constants.h".
5261 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5262 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5263 OMP_CLAUSE_SET_MAP_KIND.
5264 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5265 (c_finish_oacc_data): New functions.
5266 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5267 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5268 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5269 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5270 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5271 GOMP_MAP_FORCE_DEVICEPTR.
5272
adfac8df
JJ
52732015-01-09 Michael Collison <michael.collison@linaro.org>
5274
5275 * c-array-notation.c: Include hash-set.h, machmode.h,
5276 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5277 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5278 * c-aux-info.c: Ditto.
5279 * c-convert.c: Ditto.
5280 * c-decl.c: Ditto.
5281 * c-errors.c: Ditto.
5282 * c-lang.c: Dittoxs.
5283 * c-objc-common.c: Ditto.
5284 * c-parser.c: Ditto.
5285 * c-typeck.c: Include hash-set.h, machmode.h,
5286 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5287 fold-const.h, wide-int.h, inchash.h, real.h and
5288 fixed-value.h due to flattening of tree.h.
5289
2cc901dc
MP
52902015-01-07 Marek Polacek <polacek@redhat.com>
5291
5292 PR c/64417
5293 * c-typeck.c (process_init_element): Disallow initialization of
5294 a flexible array member with a string constant if the structure
5295 is in an array.
5296
5624e564
JJ
52972015-01-05 Jakub Jelinek <jakub@redhat.com>
5298
e5341100
JJ
5299 PR sanitizer/64344
5300 * c-typeck.c (convert_for_assignment, c_finish_return): For
5301 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5302 types also set in_late_binary_op around convert call.
5303 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5304 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5305 result on expr as last argument to ubsan_instrument_float_cast,
5306 if in_late_binary_op, don't use c_save_expr but save_expr.
5307
5624e564
JJ
5308 Update copyright years.
5309
5bd012f8
MP
53102015-01-05 Marek Polacek <polacek@redhat.com>
5311
5312 PR c/64423
5313 * c-typeck.c (build_array_ref): Pass loc down to
5314 warn_array_subscript_with_type_char.
5315
3f8257db 53162014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5317
5318 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5319 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5320 element type.
8e745a17 5321 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5322 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5323 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5324 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5325 to PEDWARN_FOR_QUALIFIERS.
768952be 5326
8f94a8c4
JJ
53272014-12-17 Jakub Jelinek <jakub@redhat.com>
5328
5329 PR sanitizer/64289
5330 * c-convert.c: Include ubsan.h.
5331 (convert): For real -> integral casts and
5332 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5333 instead instrument the float cast directly.
5334
b731b390
JJ
53352014-11-29 Jakub Jelinek <jakub@redhat.com>
5336
5337 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5338 c_finish_stmt_expr): Remove NULL last argument from
5339 create_tmp_var_raw and create_tmp_var calls.
5340 * c-array-notation.c (fix_builtin_array_notation_fn,
5341 build_array_notation_expr, fix_conditional_array_notations_1,
5342 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5343
541e35a6
MP
53442014-11-28 Marek Polacek <polacek@redhat.com>
5345
5346 PR c/63862
5347 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5348 convert the right operand to integer type.
5349
b286be94
MP
53502014-11-25 Marek Polacek <polacek@redhat.com>
5351
5352 PR c/63877
5353 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5354 for inline functions.
5355
aa7da51a
JJ
53562014-11-21 Jakub Jelinek <jakub@redhat.com>
5357
5358 PR target/63764
5359 * c-typeck.c (build_array_ref): Adjust
5360 convert_vector_to_pointer_for_subscript caller. If it returns true,
5361 call non_lvalue_loc on the result.
5362
d876207f
RB
53632014-11-11 Richard Biener <rguenther@suse.de>
5364
5365 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5366 to true.
5367
e5e44252
AK
53682014-11-10 Andi Kleen <ak@linux.intel.com>
5369
5370 PR c/60804
5371 * c-parser.c (c_parser_statement_after_labels): Call
5372 check_no_cilk.
5373 (c_parser_if_statement): Dito.
5374 (c_parser_switch_statement): Dito.
5375 (c_parser_while_statement): Dito.
5376 (c_parser_do_statement): Dito.
5377 (c_parser_for_statement): Dito.
5378 * c-typeck.c (c_finish_loop): Dito.
5379
13c21655
PC
53802014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5381
5382 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5383 OPT_Wshift_count_overflow in the warnings.
5384
2d51fcef
MP
53852014-10-30 Marek Polacek <polacek@redhat.com>
5386
5387 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5388 print the stripped version as well, if they're not the same.
5389
ef4bddc2
RS
53902014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5391
5392 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5393 machine_mode.
5394
c582198b
AM
53952014-10-28 Andrew MacLeod <amacleod@redhat.com>
5396
5397 * c-decl.c: Adjust include files.
5398 * c-parser.c: Ditto.
5399
ddc8de03
PM
54002014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5401 Tom Tromey <tromey@redhat.com>
5402
5403 * c-tree.h (enum c_oracle_request): New.
5404 (c_binding_oracle_function): New typedef.
5405 (c_binding_oracle, c_pushtag, c_bind): Declare.
5406 * c-decl.c (c_binding_oracle): New global.
5407 (I_SYMBOL_CHECKED): New macro.
5408 (i_symbol_binding): New function.
5409 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5410 (I_TAG_CHECKED): New macro.
5411 (i_tag_binding): New function.
5412 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5413 (I_LABEL_CHECKED): New macro.
5414 (i_label_binding): New function.
5415 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5416 (c_print_identifier): Save and restore c_binding_oracle.
5417 (c_pushtag, c_bind): New functions.
5418
60393bbc
AM
54192014-10-27 Andrew MacLeod <amacleod@redhat.com>
5420
5421 * c-typeck.c: Adjust include files.
5422
d723bb7c
MLI
54232014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5424
5425 PR c++/53061
5426 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5427 initialization here...
5428 (c_initialize_diagnostics): ... but here. Set defaults after
5429 building pretty-printer.
5430
1bc5a451
MP
54312014-10-23 Marek Polacek <polacek@redhat.com>
5432
5433 PR c/63626
5434 * c-decl.c (pop_scope): Don't print warning in external_scope.
5435
4435bb92
MP
54362014-10-19 Marek Polacek <polacek@redhat.com>
5437
5438 PR c/63567
5439 * c-typeck.c (output_init_element): Allow initializing objects with
5440 static storage duration with compound literals even in C99 and add
5441 pedwarn for it.
5442
7278465e
MP
54432014-10-17 Marek Polacek <polacek@redhat.com>
5444
5445 PR c/63567
5446 * c-typeck.c (digest_init): Allow initializing objects with static
5447 storage duration with compound literals even in C99 and add pedwarn
5448 for it.
5449
d9b7be2e
MP
54502014-10-17 Marek Polacek <polacek@redhat.com>
5451
5452 PR c/63543
5453 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5454 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5455 error multiple times. Print the type.
5456
f406ae1f
MP
54572014-10-17 Marek Polacek <polacek@redhat.com>
5458
5459 PR c/63549
5460 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5461 type.
5462
92574c7c
MP
54632014-10-17 Marek Polacek <polacek@redhat.com>
5464
5465 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5466 (start_function): Use OPT_Wimplicit_int instead of 0.
5467 (store_parm_decls_oldstyle): Likewise.
5468
1bc4a978
MT
54692014-10-17 Alan Modra <amodra@gmail.com>
5470
5471 PR middle-end/61848
5472 * c-decl.c (merge_decls): Don't merge section name or tls model
5473 to newdecl symtab node, instead merge to olddecl. Override
5474 existing olddecl section name. Set tls_model for all thread-local
5475 vars, not just OMP thread-private ones. Remove incorrect comment.
5476
83685514
AM
54772014-10-16 Andrew MacLeod <amacleod@redhat.com>
5478
5479 * c-decl.c: Adjust include files.
5480
78a7c317
DD
54812014-10-14 DJ Delorie <dj@redhat.com>
5482
5483 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5484 (c_token_starts_typename): Check all __intN, not just __int128.
5485 (c_token_starts_declspecs): Likewise.
5486 (c_parser_declspecs): Likewise.
5487 (c_parser_attribute_any_word): Likewise.
5488 (c_parser_objc_selector): Likewise.
5489 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5490 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5491 is specified.
5492 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5493 __int128.
5494 (finish_declspecs): Likewise.
5495
74d98c1e
AB
54962014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5497
8e745a17 5498 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5499 the duplicate code.
8e745a17 5500 (c_parser_statement): Call the new function.
74d98c1e 5501
84937de2
MP
55022014-10-09 Marek Polacek <polacek@redhat.com>
5503
5504 PR c/63480
5505 * c-typeck.c (pop_init_level): Don't warn about initializing
5506 with { }.
5507
0382aaa0
MP
55082014-10-07 Marek Polacek <polacek@redhat.com>
5509
5510 PR c/59717
5511 * c-decl.c (header_for_builtin_fn): New function.
5512 (implicitly_declare): Suggest which header to include.
5513
7a0ca710
MP
55142014-10-07 Marek Polacek <polacek@redhat.com>
5515
5516 * c-convert.c (convert): Use error_operand_p.
5517 * c-typeck.c (require_complete_type): Likewise.
5518 (really_atomic_lvalue): Likewise.
5519 (digest_init): Likewise.
5520 (handle_omp_array_sections_1): Likewise.
5521
6bc8a126
MP
55222014-10-03 Marek Polacek <polacek@redhat.com>
5523
5524 PR c/63453
5525 * c-decl.c (pop_scope): Don't warn about "inline function declared
5526 but never defined" for functions marked with gnu_inline attribute.
5527
d90c0a59
JJ
55282014-09-25 Jakub Jelinek <jakub@redhat.com>
5529
5530 PR c++/63249
5531 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5532 on low_bound and length.
5533
083e891e
MP
55342014-09-24 Marek Polacek <polacek@redhat.com>
5535
5536 PR c/61405
5537 PR c/53874
5538 * c-parser.c: Don't define CPP_KEYWORD.
5539 (c_parser_switch_statement): Pass original type to c_finish_case.
5540 * c-tree.h (c_finish_case): Update declaration.
5541 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5542 conditionally to c_do_switch_warnings.
5543
8d95fe25
MP
55442014-09-03 Marek Polacek <polacek@redhat.com>
5545
5546 PR c/62024
5547 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5548 conversions.
5549
9a771876
JJ
55502014-09-02 Jakub Jelinek <jakub@redhat.com>
5551 Balaji V. Iyer <balaji.v.iyer@intel.com>
5552 Igor Zamyatin <igor.zamyatin@intel.com>
5553
5554 * c-parser.c (c_parser_cilk_for): New function.
5555 (c_parser_cilk_grainsize): Likewise.
5556 (c_get_temp_regvar): Likewise.
5557 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5558 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5559 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5560 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5561 case.
5562
b7679d96
CG
55632014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5564
5565 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5566 with using HOST_WIDE_INT without truncation to 'int'
5567
59ea0364
MP
55682014-08-22 Marek Polacek <polacek@redhat.com>
5569
5570 PR c++/62199
5571 * c-typeck.c (parser_build_binary_op): Adjust call to
5572 warn_logical_not_parentheses.
5573
671a475e
IZ
55742014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5575
5576 PR other/62008
5577 * c-parser.c (c_parser_array_notation): Check for correct
5578 type of an array added.
5579
04159acf
MP
55802014-08-19 Marek Polacek <polacek@redhat.com>
5581
5582 PR c++/62153
5583 * c-typeck.c (build_binary_op): If either operand of a comparison
5584 is a boolean expression, call maybe_warn_bool_compare.
5585
c77935ee
PP
55862014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5587
5588 PR c/45584
5589 * c-typeck.c (build_c_cast): Do a conversion even when the
5590 TYPE_MAIN_VARIANTs are the same.
5591
35aff4fb
MP
55922014-08-19 Marek Polacek <polacek@redhat.com>
5593
5594 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5595 pedwarn_c99 instead of pedwarn.
5596 (grokfield): Likewise.
5597 (warn_defaults_to): New function.
5598 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5599 Unconditionally call pedwarn_c99 instead of pedwarn.
5600 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5601 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5602 check flag_isoc11 before.
5603 * c-errors.c (pedwarn_c99): Change the return type to bool.
5604 Handle -Wc99-c11-compat.
5605 * c-parser.c (disable_extension_diagnostics): Handle
5606 warn_c99_c11_compat.
5607 (restore_extension_diagnostics): Likewise.
5608 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5609 instead of pedwarn, don't check flag_isoc11 before.
5610 (c_parser_declspecs): Likewise.
5611 (c_parser_alignas_specifier): Likewise.
5612 (c_parser_alignof_expression): Likewise.
5613 (c_parser_generic_selection): Likewise.
5614 * c-tree.h (pedwarn_c99): Update declaration.
5615 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5616 of pedwarn_c99.
5617
177cce46
MP
56182014-08-19 Marek Polacek <polacek@redhat.com>
5619
5620 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5621 to pedwarn_c90.
5622 * c-errors.c: Include "opts.h".
5623 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5624 * c-parser.c (disable_extension_diagnostics): Handle negative value
5625 of warn_c90_c99_compat, too.
5626 (restore_extension_diagnostics): Likewise.
5627 (c_parser_compound_statement_nostart): Pass
5628 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5629
6dc99c33
MP
56302014-08-12 Marek Polacek <polacek@redhat.com>
5631
5632 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5633 Add pedwarn.
5634 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5635 Likewise.
5636 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5637
3f8257db 56382014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5639
5640 PR c/51849
5641 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5642 Call pedwarn_c90 instead of pedwarn.
5643 (check_bitfield_type_and_width): Likewise.
5644 (declspecs_add_qual): Likewise.
5645 (declspecs_add_type): Likewise.
5646 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5647 Adjust to only call pedwarn_c90.
5648 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5649 pedwarn_c90 instead of pedwarn.
5650 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5651 * c-parser.c (disable_extension_diagnostics): Handle
5652 warn_c90_c99_compat.
5653 (restore_extension_diagnostics): Likewise.
5654 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5655 pedwarn_c90 instead of pedwarn.
5656 (c_parser_initelt): Likewise.
5657 (c_parser_postfix_expression): Likewise.
5658 (c_parser_postfix_expression_after_paren_type): Likewise.
5659 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5660 * c-tree.h: Fix formatting.
5661 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5662 pedwarn_c90 instead of pedwarn.
5663
9f25a338
TS
56642014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5665
5666 * c-typeck.c: Remove include of pointer-set.h.
5667
044331a8
MP
56682014-08-07 Marek Polacek <polacek@redhat.com>
5669
5670 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5671
b787e7a2
TS
56722014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5673
5674 * c-typeck.c: Use hash_map instead of pointer_map.
5675
6e2830c3
TS
56762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5677
5678 * c-decl.c: Use hash_set instead of pointer_set.
5679
a7ee52fb
IZ
56802014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5681
5682 PR middle-end/61455
5683 * c-array-notation.c (expand_array_notations): Handling
5684 of DECL_EXPR added.
5685
b4dfdc11
MG
56862014-07-31 Marc Glisse <marc.glisse@inria.fr>
5687
5688 PR c++/60517
5689 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5690 a local variable.
5691
976d5a22
TT
56922014-07-30 Tom Tromey <tromey@redhat.com>
5693
5694 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5695 field.
5696 (really_start_incremental_init, push_init_level): Initialize
5697 designator_depth.
5698 (pop_init_level): Set global designator_depth.
5699 (process_init_element): Check for designated_init attribute.
5700
30281de2
MP
57012014-07-20 Marek Polacek <polacek@redhat.com>
5702
5703 PR c/61852
5704 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5705 (implicitly_declare): Pass location to implicit_decl_warning.
5706
b108f48f
JJ
57072014-07-14 Jakub Jelinek <jakub@redhat.com>
5708
5709 PR middle-end/61294
5710 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5711 If non-NULL, call c_parser_check_literal_zero.
5712 (c_parser_check_literal_zero): New function.
5713 (c_parser_postfix_expression_after_primary): Adjust
5714 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5715
773ec47f
MP
57162014-07-06 Marek Polacek <polacek@redhat.com>
5717
5718 PR c/6940
5719 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5720 * c-tree.h (C_ARRAY_PARAMETER): Define.
5721 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5722 function parameter.
5723
22e1cf1c 57242014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5725 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5726
5727 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5728 releasing symbol.
5729
52ec0ea3
MP
57302014-07-01 Marek Polacek <polacek@redhat.com>
5731
5732 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5733 instead of 0 to WARN_FOR_ASSIGNMENT.
5734
d5c3d343
MP
57352014-07-01 Marek Polacek <polacek@redhat.com>
5736
5737 PR c/58286
5738 * c-typeck.c (convert_for_assignment): Pass
5739 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5740
6a7253a4
MP
57412014-06-30 Marek Polacek <polacek@redhat.com>
5742
5743 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5744 has no_sanitize_undefined attribute.
5745
5e88a8f4
IZ
57462014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5747
5748 PR middle-end/57541
5749 * c-array-notation.c (fix_builtin_array_notation_fn):
5750 Check for 0 arguments in builtin call. Check that bultin argument is
5751 correct.
5752 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5753 index.
5754
9698b078
SH
57552014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5756
5757 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5758 qualifiers in __auto_type for atomic types.
5759 (c_parser_typeof_specifier): Discard all type qualifiers in
5760 __typeof__ for atomic types.
5761
6e07c515
MP
57622014-06-25 Marek Polacek <polacek@redhat.com>
5763
5764 PR c/61162
5765 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5766 the return expression to c_finish_return.
5767
da6f124d
JJ
57682014-06-25 Jakub Jelinek <jakub@redhat.com>
5769
5770 * c-typeck.c (c_finish_omp_clauses): Make sure
5771 OMP_CLAUSE_LINEAR_STEP has correct type.
5772
c203e8a7
TS
57732014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5774
5775 * c-decl.c: Adjust.
5776
56ad0e38
JJ
57772014-06-24 Jakub Jelinek <jakub@redhat.com>
5778
5779 * c-parser.c (c_parser_omp_for_loop): For
5780 #pragma omp parallel for simd move lastprivate clause from parallel
5781 to for rather than simd.
5782
47c2554f
MP
57832014-06-23 Marek Polacek <polacek@redhat.com>
5784
5785 * c-typeck.c (parser_build_binary_op): Don't call
5786 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5787
56363ffd
JH
57882014-06-15 Jan Hubicka <hubicka@ucw.cz>
5789
5790 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5791 * c-decl.c (merge_decls): Likewise.
5792
d7ff7ae5
MP
57932014-06-09 Marek Polacek <polacek@redhat.com>
5794
5795 PR c/36446
5796 * c-typeck.c (error_init): Call inform instead of error_at.
5797 (pedwarn_init): Call inform instead of pedwarn.
5798 (warning_init): Call inform instead of warning_at.
5799
24d047a3
JH
58002014-06-07 Jan Hubicka <hubicka@ucw.cz>
5801
5802 * c-decl.c (merge_decls): Use set_decl_section_name.
5803 (duplicate_decls): Remove node if it exists.
5804
9bac5cbb
G
58052014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5806
5807 PR c/53119
5808 * c-typeck.c (push_init_level, process_init_element,
5809 pop_init_level): Correct check for zero initialization, move
5810 missing brace warning to respect zero initialization.
5811
8ffcdea8
MP
58122014-06-05 Marek Polacek <polacek@redhat.com>
5813
5814 PR c/56724
5815 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5816
742938c9
MP
58172014-06-05 Marek Polacek <polacek@redhat.com>
5818
5819 PR c/49706
5820 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5821 on the left hand side operand of a comparison.
742938c9 5822
6447c55d
MP
58232014-06-05 Marek Polacek <polacek@redhat.com>
5824
5825 PR c/48062
5826 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5827 Print note only if the warning was printed.
5828
9dc7743c
IZ
58292014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5830
5831 PR c/58942
5832 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5833 with a pointer.
5834
fedfecef
MP
58352014-06-03 Marek Polacek <polacek@redhat.com>
5836
5837 PR c/60439
5838 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5839 c_start_case.
5840 * c-tree.h (c_start_case): Update.
5841 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5842 switch condition has boolean value.
5843
9b2b7279
AM
58442014-06-02 Andrew MacLeod <amacleod@redhat.com>
5845
5846 * c-decl.c: Include builtins.h.
5847 * c-parser.c: Likewise.
5848
5c1bc275
MP
58492014-05-27 Marek Polacek <polacek@redhat.com>
5850
5851 PR c/56724
5852 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5853 error and warning calls to error_at and warning_at. Pass location of
5854 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5855 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5856 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5857
97563bc8
IZ
58582014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5859
5860 PR c/61191
5861 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5862 function parameters.
5863
aede2c10
JH
58642014-05-23 Jan Hubicka <hubicka@ucw.cz>
5865
5866 * c-decl.c (merge_decls): Preserve symtab node pointers.
5867 (duplicate_decls): Free new decl.
5868
edbba2ce
TS
58692014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5870
f3316c6d
TS
5871 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5872 initialization.
5873
edbba2ce
TS
5874 * c-parser.c (c_parser_omp_target): Return bool values.
5875
68c81f24
TS
58762014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5877
5878 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5879 num_teams_loc variable to num_thread_limit_loc.
5880
632f2871
RS
58812014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5882
5883 * c-array-notation.c (expand_array_notations): Use void_node
5884 instead of void_zero_node.
5885
766090c2
TS
58862014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5887
5888 * c-decl.c (finish_struct): Adjust.
5889 (finish_enum): Likewise.
5890 (bind): Adjust.
5891 (record_inline_static): Likewise.
5892 (push_scope): Likewise.
5893 (make_label): Likewise.
5894 (lookup_label_for_goto): Likewise.
5895 (finish_struct): Likewise.
5896 (finish_enum): Likewise.
5897 (store_parm_decls): Likewise.
5898 (c_push_function_context): Likewise.
5899 * c-lang.h: Remove usage of variable_size gty attribute.
5900 * c-parser.c (c_parse_init): Adjust.
5901 (c_parse_file): Likewise.
5902
2b107f6b
MP
59032014-05-13 Marek Polacek <polacek@redhat.com>
5904
5905 PR c/61162
5906 * c-typeck.c (convert_for_assignment): Pass location to
5907 WARN_FOR_ASSIGNMENT instead of input_location.
5908
d033409e
MP
59092014-05-10 Marek Polacek <polacek@redhat.com>
5910
5911 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5912 maybe_warn_string_init.
5913 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5914 maybe_warn_string_init.
5915 * c-tree.h (maybe_warn_string_init): Update declaration.
5916 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5917 Call pedwarn_init with loc instead of with input_location.
5918 (digest_init): Pass init_loc to maybe_warn_string_init.
5919 (pop_init_level): Call pedwarn_init with loc instead of with
5920 input_location.
5921 (set_init_index): Likewise.
5922 (process_init_element): Likewise.
5923
ea58ef42
MP
59242014-05-09 Marek Polacek <polacek@redhat.com>
5925
5926 PR c/61096
5927 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5928 (c_parser_initelt): Pass location to set_init_label. Pass array index
5929 location to set_init_index.
5930 * c-tree.h (push_init_level): Update declaration.
5931 (pop_init_level): Likewise.
5932 (set_init_index): Likewise.
5933 (set_init_label): Likewise.
5934 * c-typeck.c (error_init): Add location parameter. Call error_at
5935 instead of error.
5936 (digest_init): Pass init_loc to error_init.
5937 (really_start_incremental_init):
5938 (push_init_level): Add location parameter. Pass loc to pop_init_level
5939 and error_init.
5940 (pop_init_level): Likewise.
5941 (set_designator): Add location parameter. Pass loc to pop_init_level,
5942 push_init_level, and error_init.
5943 (set_init_index): Add location parameter. Pass loc to error_init and
5944 set_designator.
5945 (set_init_label): Likewise.
5946 (output_init_element): Pass loc to error_init.
5947 (process_init_element): Pass loc to error_init, pop_init_level,
5948 pedwarn_init, and push_init_level.
5949
661a0813
MP
59502014-05-09 Marek Polacek <polacek@redhat.com>
5951
5952 PR c/50459
5953 * c-parser.c (c_parser_attributes): Parse the arguments as an
5954 expression-list if the attribute takes identifier.
5955
2793eeab
MP
59562014-05-08 Marek Polacek <polacek@redhat.com>
5957
5958 PR c/61053
5959 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5960 TYPE_ALIGN_UNIT.
5961
f827930a
MP
59622014-05-08 Marek Polacek <polacek@redhat.com>
5963
5964 PR c/61077
5965 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5966 of main.
5967
1d60af08
KZ
59682014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5969 Mike Stump <mikestump@comcast.net>
5970 Richard Sandiford <rdsandiford@googlemail.com>
5971
5972 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5973 (finish_enum): Use wide-int interfaces.
5974 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5975 * c-typeck.c (build_c_cast): Likewise.
5976 (set_nonincremental_init_from_string): Likewise.
5977 (c_tree_equal): Likewise.
5978
a0e24419
MP
59792014-05-02 Marek Polacek <polacek@redhat.com>
5980
5981 PR c/25801
5982 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5983 Return size_one_node when the type is not complete.
5984 (pointer_diff): Remove comment.
5985 (build_unary_op): Improve error messages.
5986
19fc9faa
MP
59872014-05-02 Marek Polacek <polacek@redhat.com>
5988
5989 * c-typeck.c (c_finish_return): Separate warning_at calls.
5990
63bc4e87
MP
59912014-05-02 Marek Polacek <polacek@redhat.com>
5992
5993 * c-tree.h (error_init): Remove declaration.
5994 (pedwarn_init): Likewise.
5995 * c-typeck.c (error_init): Make static and move above.
5996 (pedwarn_init): Likewise.
5997 (warning_init): Move above.
5998 (maybe_warn_string_init): Likewise.
5999
4bd2511b
JL
60002014-05-01 Jeff Law <law@redhat.com>
6001
6002 Revert:
6003
6004 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6005 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6006 avoid goto.
6007
6a358dcb
MP
60082014-05-02 Marek Polacek <polacek@redhat.com>
6009
6010 PR c/60784
6011 * c-typeck.c (push_init_level): Set constructor_designated to
6012 p->designated for structures.
6013
ae5ebda4
MP
60142014-05-01 Marek Polacek <polacek@redhat.com>
6015
6016 PR c/60915
6017 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6018 function-definition has an attribute after the declarator.
6019
96b40f8d
MP
60202014-05-01 Marek Polacek <polacek@redhat.com>
6021
6022 PR c/60257
6023 * c-typeck.c (warning_init): Add location_t parameter. Call
6024 warning_at instead of warning.
6025 (push_init_level): Pass input_location to warning_init.
6026 (add_pending_init): Add location_t parameter. Pass loc to
6027 warning_init.
6028 (set_nonincremental_init): Pass input_location to add_pending_init.
6029 (set_nonincremental_init_from_string): Likewise.
6030 (output_init_element): Pass loc to warning_init and to
6031 add_pending_init.
6032
32e00768
MP
60332014-05-01 Marek Polacek <polacek@redhat.com>
6034
6035 PR c/43395
6036 * c-typeck.c (c_finish_return): Distinguish between label and variable
6037 when warning about returning local address.
6038
c9379ce2
MP
60392014-05-01 Marek Polacek <polacek@redhat.com>
6040
6041 PR c/29467
6042 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6043 in C89 mode.
6044
d00887e8
MP
60452014-05-01 Marek Polacek <polacek@redhat.com>
6046
6047 PR c/43245
6048 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6049 instead of 0 to WARN_FOR_QUALIFIERS.
6050
5436fa2e
MP
60512014-05-01 Marek Polacek <polacek@redhat.com>
6052
6053 PR c/56989
6054 * c-typeck.c (default_conversion): Use better location for
6055 error call.
6056
f8ed5150
MP
60572014-04-30 Marek Polacek <polacek@redhat.com>
6058
6059 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6060 also when SANITIZE_FLOAT_DIVIDE is on.
6061
8337d1db
MP
60622014-04-30 Marek Polacek <polacek@redhat.com>
6063
6064 PR c/60139
6065 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6066 and pedwarn_init. Use loc insted of input_location.
6067
c4bdc42f
MP
60682014-04-30 Marek Polacek <polacek@redhat.com>
6069
6070 PR c/60351
6071 * c-typeck.c (build_binary_op): Use location when warning about
6072 shift count.
6073
45484dcf
MP
60742014-04-25 Marek Polacek <polacek@redhat.com>
6075
6076 PR c/18079
6077 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6078 always_inline/noinline and hot/cold attributes.
6079
34cf811f
MP
60802014-04-25 Marek Polacek <polacek@redhat.com>
6081
6082 PR c/60114
6083 * c-parser.c (c_parser_initelt): Pass input_location to
6084 process_init_element.
6085 (c_parser_initval): Pass loc to process_init_element.
6086 * c-tree.h (process_init_element): Adjust declaration.
6087 * c-typeck.c (push_init_level): Pass input_location to
6088 process_init_element.
6089 (pop_init_level): Likewise.
6090 (set_designator): Likewise.
6091 (output_init_element): Add location_t parameter. Pass loc to
6092 digest_init.
6093 (output_pending_init_elements): Pass input_location to
6094 output_init_element.
6095 (process_init_element): Add location_t parameter. Pass loc to
6096 output_init_element.
6097
42056eac
JJ
60982014-04-24 Jakub Jelinek <jakub@redhat.com>
6099
6100 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6101 atomic-clause, allow comma in between atomic-clause and
6102 seq_cst.
6103
e162a134
JJ
61042014-04-22 Jakub Jelinek <jakub@redhat.com>
6105
6106 PR c/59073
6107 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6108 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6109
2f6babac
IZ
61102014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6111
6112 PR middle-end/60469
6113 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6114 create_tmp_var instead build_decl for creating temps.
6115 (build_array_notation_expr): Likewise.
6116 (fix_conditional_array_notations_1): Likewise.
6117 (fix_array_notation_expr): Likewise.
6118 (fix_array_notation_call_expr): Likewise.
6119
8edbfaa6
JJ
61202014-03-28 Jakub Jelinek <jakub@redhat.com>
6121
6122 PR c++/60689
6123 * c-tree.h (c_build_function_call_vec): New prototype.
6124 * c-typeck.c (build_function_call_vec): Don't call
6125 resolve_overloaded_builtin here.
6126 (c_build_function_call_vec): New wrapper function around
6127 build_function_call_vec. Call resolve_overloaded_builtin here.
6128 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6129 Call c_build_function_call_vec instead of build_function_call_vec.
6130 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6131 * c-decl.c (finish_decl): Likewise.
6132
7485aeea
MLI
61332014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6134
6135 PR c/55383
6136 * c-typeck.c: Use correct format string in cast-qual warning
6137
b17a8b07
TS
61382014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6139
6140 * c-decl.c (c_decl_attributes): Use
6141 lang_hooks.types.omp_mappable_type.
6142 * c-typeck.c (c_finish_omp_clauses): Likewise.
6143
3af9c5e9
MP
61442014-03-06 Marek Polacek <polacek@redhat.com>
6145
6146 PR c/60197
6147 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6148 of checking tree code.
6149
1c9f5f33
PK
61502014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6151
6152 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6153 (c_parser_parameter_declaration): Likewise.
6154
cc28fc7f
MP
61552014-02-19 Marek Polacek <polacek@redhat.com>
6156
6157 PR c/60195
6158 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6159 Call mark_exp_read on exp.value.
6160 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6161 TREE_ADDRESSABLE on old instead of val.
6162 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6163
b581c05c
PK
61642014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6165
6166 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6167 C_EXPR_APPEND by vec_safe_push.
6168 * c-tree.h (C_EXPR_APPEND): Remove.
6169
81e5eca8
MP
61702014-01-31 Marek Polacek <polacek@redhat.com>
6171
6172 PR c/59963
6173 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6174 build_function_call_vec.
6175 (build_function_call): Likewise.
6176 (build_atomic_assign): Likewise.
6177 (build_function_call_vec): Add arg_loc parameter. Use it.
6178 (convert_arguments): Likewise.
6179 (convert_for_assignment): Rename rhs_loc to expr_loc.
6180 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6181 (c_parser_objc_keywordexpr): Likewise.
6182 (c_parser_postfix_expression_after_primary): Call
6183 build_function_call_vec with expr_loc rather than op_loc.
6184 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6185 build_function_call_vec.
6186 (c_parser_expr_list): Add locations parameter. Fill it with locations
6187 of function arguments.
6188 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6189
68fca595
MP
61902014-01-30 Marek Polacek <polacek@redhat.com>
6191
6192 PR c/59940
6193 * c-typeck.c (build_function_call_vec): Use loc parameter.
6194 (convert_arguments): Add location parameter. Use it.
6195 (ep_convert_and_check): Likewise.
6196 (build_atomic_assign): Adjust convert_for_assignment call.
6197 (build_modify_expr): Likewise.
6198 (digest_init): Likewise.
6199 (c_finish_return): Likewise.
6200 (build_conditional_expr): Adjust ep_convert_and_check calls.
6201 (convert_for_assignment): Add rhs_loc parameter. Use it.
6202 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6203 calls.
6204
fa337f3a
RB
62052014-01-30 Richard Biener <rguenther@suse.de>
6206
6207 PR c/59905
6208 * c-typeck.c (build_function_call_vec): Do not replace calls
6209 to a function via an incompatible type with a runtime abort.
6210
b72271b9
BI
62112014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6212
6213 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6214 flag_enable_cilkplus with flag_cilkplus.
6215 (c_parser_direct_declarator_inner): Likewise.
6216 (c_parser_attribute_any_word): Likewise.
6217 (c_parser_attributes): Likewise.
6218 (c_parser_compound_statement): Likewise.
6219 (c_parser_statement_after_labels): Likewise.
6220 (c_parser_if_statement): Likewise.
6221 (c_parser_switch_statement): Likewise.
6222 (c_parser_do_statement): Likewise.
6223 (c_parser_for_statement): Likewise.
6224 (c_parser_unary_expression): Likewise.
6225 (c_parser_postfix_expression): Likewise.
6226 (c_parser_postfix_expression_after_primary): Likewise.
6227 (c_parser_postfix_expression_after_primary): Likewise.
6228 (c_parser_omp_clause_name): Likewise.
6229 (c_finish_omp_declare_simd): Likewise.
6230 (c_parser_cilk_verify_simd): Likewise.
6231 * c-typeck.c (build_array_ref): Likewise.
6232 (build_function_call_vec): Likewise.
6233 (convert_arguments): Likewise.
6234 (build_compound_expr): Likewise.
6235 (c_finish_return): Likewise.
6236 (c_finish_if_stmt): Likewise.
6237 (c_finish_loop): Likewise.
6238 (build_binary_op): Likewise.
6239
393e8e8b
MP
62402014-01-23 Marek Polacek <polacek@redhat.com>
6241
6242 PR c/59846
6243 * c-typeck.c (parser_build_binary_op): Use location instead of
6244 input_location.
6245 (build_binary_op): Pass location to shorten_compare.
6246
f04dda30
MP
62472014-01-23 Marek Polacek <polacek@redhat.com>
6248
6249 PR c/58346
6250 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6251 an empty aggregate.
6252
789eadcd
MP
62532014-01-23 Marek Polacek <polacek@redhat.com>
6254
6255 PR c/59871
6256 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6257 of a comma expression.
6258 (emit_side_effect_warnings): Likewise.
6259
40f14e9f
BI
62602014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6261
6262 PR c/59825
6263 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6264 function to use walk_tree and moved a lot of its functionality to
6265 expand_array_notations.
6266 (expand_array_notations): New function.
6267
74558dd9
BI
62682014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6269
6270 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6271 attribute an attribute without value.
6272
652fea39
JJ
62732014-01-23 Jakub Jelinek <jakub@redhat.com>
6274
6275 PR middle-end/58809
6276 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6277 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6278
f34f1c87
MP
62792014-01-22 Marek Polacek <polacek@redhat.com>
6280
6281 PR c/59891
6282 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6283 of remove_c_maybe_const_expr on op1 and op2.
6284
241f845a
JJ
62852014-01-15 Jakub Jelinek <jakub@redhat.com>
6286
6287 PR c/58943
6288 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6289 effects, preevaluate rhs using SAVE_EXPR first.
6290
9a74f20c
BI
62912014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6292
6293 PR c++/59631
6294 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6295 statements with if-elseif statements.
6296
96066ce1
MP
62972014-01-06 Marek Polacek <polacek@redhat.com>
6298
6299 PR c/57773
6300 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6301 defined bit-field types only in ISO C.
6302
23a5b65a
RS
63032014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6304
6305 Update copyright years
6306
f9030485
RS
63072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6308
6309 * c-array-notation.c: Use the standard form for the copyright notice.
6310
41958c28
BI
63112013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6312
6313 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6314 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6315 field in parser is not empty. If not-empty, call the function
6316 c_parser_finish_omp_declare_simd.
6317 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6318 between SIMD-enabled functions and #pragma simd. Added new parameter.
6319 (c_parser_cilk_all_clauses): Modified the usage of the function
6320 c_parser_cilk_clause_vectorlength as mentioned above.
6321 (c_parser_cilk_simd_fn_vector_attrs): New function.
6322 (c_finish_cilk_simd_fn_tokens): Likewise.
6323 (is_cilkplus_vector_p): Likewise.
6324 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6325 "nomask," and "mask" strings in clause name.
6326 (c_parser_omp_all_clauses): Added 3 new case statements:
6327 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6328 PRAGMA_CILK_CLAUSE_NOMASK.
6329 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6330 check for vector attribute and if so call the function
6331 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6332 called the function c_finish_cilk_simd_fn_tokens.
6333 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6334 parser field is non-empty. If so, parse them as you would parse
6335 the omp declare simd pragma.
6336 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6337 Added a check when step is a parameter and flag it as error.
6338 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6339 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6340 pragma_omp_clause.
6341
cef0fd0e
TS
63422013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6343
6344 * c-parser.c (c_parser_omp_parallel): Fix description.
6345
12893402
BI
63462013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6347
6348 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6349 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6350 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6351 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6352
296674db
JM
63532013-12-04 Joseph Myers <joseph@codesourcery.com>
6354
6355 PR c/52023
6356 * c-parser.c (c_parser_alignas_specifier): Use
6357 c_sizeof_or_alignof_type instead of c_alignof.
6358 (c_parser_alignof_expression): Likewise, with min_alignof
6359 parameter depending on alignof spelling used.
6360
edd28054
MP
63612013-12-04 Marek Polacek <polacek@redhat.com>
6362
6363 PR c/54113
6364 * c-decl.c (start_function): Don't warn for missing prototype for
6365 inline functions.
6366
da0fc454
MP
63672013-12-03 Marek Polacek <polacek@redhat.com>
6368
6369 PR c/59351
6370 * c-decl.c (build_compound_literal): Allow compound literals with
6371 empty initial value.
6372
4c2ecab0
JM
63732013-12-02 Joseph Myers <joseph@codesourcery.com>
6374
6375 PR c/58235
6376 * c-typeck.c (build_modify_expr): Diagnose assignment to
6377 expression with array type.
6378
340baef7
JM
63792013-11-29 Joseph Myers <joseph@codesourcery.com>
6380
6381 PR c/42262
6382 * c-typeck.c (process_init_element): Do not treat a string as
6383 initializing a whole array when used with a designator for an
6384 individual element.
6385
6763b9f7
JM
63862013-11-29 Joseph Myers <joseph@codesourcery.com>
6387
6388 PR c/57574
6389 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6390 an inline function following a static declaration.
6391
e7bd1de1
JJ
63922013-11-28 Jakub Jelinek <jakub@redhat.com>
6393
6394 PR c/59310
6395 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6396 to p_name before calling c_parser_omp_teams instead of after.
6397 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6398 argument. Remove unused p_name variable.
6399
0136f8f0
AH
64002013-11-27 Aldy Hernandez <aldyh@redhat.com>
6401 Jakub Jelinek <jakub@redhat.com>
6402
6403 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6404 external_scope is NULL.
6405
241b71bb
TV
64062013-11-27 Tom de Vries <tom@codesourcery.com>
6407 Marc Glisse <marc.glisse@inria.fr>
6408
6409 PR c++/59032
6410 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6411
2fb9a547
AM
64122013-11-22 Andrew MacLeod <amacleod@redhat.com>
6413
6414 * c-typeck.c: Add required include files from gimple.h.
6415
8400e75e
DM
64162013-11-22 David Malcolm <dmalcolm@redhat.com>
6417
6418 * c-decl.c (define_label, shadow_tag_warned)
6419 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6420 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6421 (declspecs_add_type): Remove use of in_system_header macro.
6422 * c-parser.c (c_parser_unary_expression): Likewise.
6423 * c-typeck.c (store_init_value, process_init_element)
6424 (c_start_case): Likewise.
6425
6426 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6427 macro.
6428
6429 * c-parser.c (c_parser_set_source_position_from_token): Remove
6430 reference to in_system_header from comment.
6431
386b1f1f
RS
64322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6433
6434 * c-decl.c (grokdeclarator): Update comment to refer to
6435 tree_to_[su]hwi rather than tree_low_cst.
6436
ae7e9ddd
RS
64372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6438
6439 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6440 tree_to_uhwi throughout.
6441
9439e9a1
RS
64422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6443
6444 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6445 throughout.
6446
9541ffee
RS
64472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6448
6449 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6450 throughout.
6451
c02065fc
AH
64522013-11-15 Aldy Hernandez <aldyh@redhat.com>
6453
6454 * c-parser.c (c_parser_cilk_simd): New.
6455 (c_parser_cilk_verify_simd): New.
6456 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6457 (c_parser_omp_for_loop): Add case for NE_EXPR.
6458 Set c_break_label for CILK_SIMD.
6459 (c_parser_cilk_clause_vectorlength): New.
6460 (c_parser_cilk_clause_linear): New.
6461 (c_parser_cilk_clause_name): New.
6462 (c_parser_cilk_all_clauses): New.
6463 * c-typeck.c (build_unary_op): Pass location argument to
6464 readonly_error.
6465 (build_modify_expr): Same.
6466 (build_asm_expr): Same.
6467 (c_finish_bc_stmt): Error on break/continue in loops.
6468
18f429e2
AM
64692013-11-14 Andrew MacLeod <amacleod@redhat.com>
6470
6471 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6472
d8a2d370
DN
64732013-11-14 Diego Novillo <dnovillo@google.com>
6474
6475 * c-decl.c: Include print-tree.h.
6476 Include stor-layout.h.
6477 Include varasm.h.
6478 Include attribs.h.
6479 Include stringpool.h.
6480 * c-lang.c: Include fold-const.h.
6481 * c-parser.c: Include stringpool.h.
6482 Include attribs.h.
6483 Include stor-layout.h.
6484 Include varasm.h.
6485 Include trans-mem.h.
6486 * c-typeck.c: Include stor-layout.h.
6487 Include trans-mem.h.
6488 Include varasm.h.
6489 Include stmt.h.
6490
38b7bc7f
JM
64912013-11-13 Joseph Myers <joseph@codesourcery.com>
6492
6493 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6494 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6495 __auto_type.
6496 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6497 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6498 RID_AUTO_TYPE.
6499 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6500 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6501 (c_parser_declarator, c_parser_direct_declarator_inner)
6502 (c_parser_parameter_declaration, c_parser_type_name): All callers
6503 changed.
6504 (c_parser_declaration_or_fndef): Handle declarations with type
6505 determined from the initializer.
6506
45b0be94
AM
65072013-11-12 Andrew MacLeod <amacleod@redhat.com>
6508
18f429e2 6509 * c-typeck.c: Include gimplify.h.
45b0be94 6510
582d9b50
JM
65112013-11-12 Joseph Myers <joseph@codesourcery.com>
6512
6513 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6514 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6515 comment.
6516 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6517 or _Thread_local as appropriate in diagnostics.
6518 (build_null_declspecs): Initialize ret->thread_gnu_p.
6519 (declspecs_add_scspec): Handle either __thread or _Thread_local
6520 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6521 pedantic. Do not disallow _Thread_local extern and _Thread_local
6522 static.
6523
267bac10
JM
65242013-11-07 Joseph Myers <joseph@codesourcery.com>
6525 Andrew MacLeod <amacleod@redhat.com>
6526
6527 * c-aux-info.c (gen_type): Handle atomic qualifier.
6528 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6529 qualifiers when compating types.
6530 (shadow_tag_warned): Handle atomic_p in declspecs.
6531 (quals_from_declspecs): Likewise.
6532 (start_decl): Use c_type_promotes_to when promoting argument
6533 types.
6534 (grokdeclarator): Handle _Atomic.
6535 (get_parm_info): Diagnose any qualifier on "void" as only
6536 parameter.
6537 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6538 comparing types. Use c_type_promotes_to when promoting argument
6539 types.
6540 (finish_function): Use c_type_promotes_to when promoting argument
6541 types.
6542 (build_null_declspecs): Handle atomic_p in declspecs.
6543 (declspecs_add_qual): Handle RID_ATOMIC.
6544 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6545 (c_token_starts_declspecs): Handle RID_ATOMIC.
6546 (c_parser_declspecs): Handle atomic type specifiers and
6547 qualifiers.
6548 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6549 from types of expressions with atomic type.
6550 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6551 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6552 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6553 (c_parser_statement_after_labels, c_parser_switch_statement)
6554 (c_parser_for_statement, c_parser_expr_no_commas)
6555 (c_parser_conditional_expression, c_parser_binary_expression)
6556 (c_parser_cast_expression, c_parser_unary_expression)
6557 (c_parser_postfix_expression)
6558 (c_parser_postfix_expression_after_primary, c_parser_expression):
6559 Use convert_lvalue_to_rvalue.
6560 (c_parser_expression_conv, c_parser_expr_list): Document
6561 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6562 (c_parser_objc_synchronized_statement): Use
6563 convert_lvalue_to_rvalue.
6564 (c_parser_objc_selector): Handle RID_ATOMIC.
6565 (c_parser_objc_receiver, c_parser_array_notation): Use
6566 convert_lvalue_to_rvalue.
6567 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6568 _Atomic (type-name).
6569 (struct c_declspecs): Add atomic_p field.
6570 (convert_lvalue_to_rvalue): Declare.
6571 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6572 corresponding atomic types.
6573 (qualify_type): Don't add _Atomic qualifiers from second argument.
6574 (comp_target_types): Do not allow _Atomic mismatches.
6575 (type_lists_compatible_p): Do not remove atomic qualifiers when
6576 comparing types.
6577 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6578 (build_atomic_assign): New functions.
6579 (build_unary_op): Use build_atomic_assign for atomic increment and
6580 decrement.
6581 (build_conditional_expr): Do not treat _Atomic void as a qualified
6582 version of void.
6583 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6584 (find_anonymous_field_with_type, convert_to_anonymous_field)
6585 (convert_for_assignment): Do not remove atomic qualifiers when
6586 comparing types.
6587 (digest_init): Do not accept initialization of arrays of atomic
6588 elements by string constants.
6589 (build_asm_expr): Use convert_lvalue_to_rvalue.
6590 (build_binary_op): Do not treat _Atomic void as a qualified
6591 version of void.
6592
0c249d4b
DD
65932013-11-06 DJ Delorie <dj@redhat.com>
6594
6595 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6596 both explicit and builtin, print the location of the explicit one.
6597
6d7f7e0a
TB
65982013-11-05 Tobias Burnus <burnus@net-b.de>
6599
6600 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6601 c_parser_omp_distribute, c_parser_omp_teams,
6602 c_parser_omp_target, c_parser_omp_declare): Handle
6603 -fopenmp-simd.
6604
b906f4ca
MP
66052013-11-03 Marek Polacek <polacek@redhat.com>
6606
6607 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6608
ee1d5a02
JJ
66092013-11-01 Jakub Jelinek <jakub@redhat.com>
6610
6611 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6612 check_dup_generic at the end, unless remove is true.
6613 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6614 remove = true;.
6615 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6616
5a9785fb
JJ
66172013-10-31 Jakub Jelinek <jakub@redhat.com>
6618
6619 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6620 with decl that is not pointer nor array.
6621
939b37da
BI
66222013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6623
6624 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6625 a spawning function is found.
6626 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6627 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6628 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6629 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6630 case.
6631 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6632 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6633 expr.
6634 (c_finish_return): Added a check to reject _Cilk_spawn in return
6635 expression.
6636 (build_cilk_spawn): New function.
6637 (build_cilk_sync): Likewise.
6638 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6639
d4af74d4
TB
66402013-10-27 Tobias Burnus <burnus@net-b.de>
6641
6642 PR other/33426
6643 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6644 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6645 (c_parser_statement_after_labels): Update calls.
6646
d73749df 66472013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6648
6649 PR other/33426
6650 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6651 Handle PRAGMA_IVDEP.
6652 (c_parser_statement_after_labels): Update call.
6653
f28aa681
MP
66542013-10-24 Marek Polacek <polacek@redhat.com>
6655
6656 * c-parser.c (c_parser_struct_declaration): Add a comment.
6657 (c_parser_declarator): Don't allow _Alignas here.
6658
0645c1a2
AM
66592013-10-17 Andrew MacLeod <amacleod@redhat.com>
6660
6661 * c-parser.c: Include omp-low.h.
6662 * c-typeck.c: Likewise.
6663
568a31f2
MP
66642013-10-17 Marek Polacek <polacek@redhat.com>
6665
6666 PR c/58267
6667 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6668 Document syntax of the array-declarator.
6669 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6670 are not permitted.
6671 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6672 (c_parser_struct_declaration): Likewise.
6673 (c_parser_declarator): Likewise.
6674 (c_parser_direct_declarator_inner): Likewise.
6675 (c_parser_parameter_declaration): Likewise.
6676 (c_parser_type_name): Likewise.
6677
acf0174b
JJ
66782013-10-11 Jakub Jelinek <jakub@redhat.com>
6679
6680 * c-lang.h (current_omp_declare_target_attribute): New extern
6681 decl.
6682 * c-parser.c: Include c-lang.h.
6683 (struct c_parser): Change tokens to c_token *.
6684 Add tokens_buf field. Change tokens_avail type to unsigned int.
6685 (c_parser_consume_token): If parser->tokens isn't
6686 &parser->tokens_buf[0], increment parser->tokens.
6687 (c_parser_consume_pragma): Likewise.
6688 (enum pragma_context): Add pragma_struct and pragma_param.
6689 (c_parser_external_declaration): Adjust
6690 c_parser_declaration_or_fndef caller.
6691 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6692 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6693 Adjust recursive call.
6694 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6695 of pragma_external.
6696 (c_parser_parameter_declaration): Use pragma_param instead of
6697 pragma_external.
6698 (c_parser_compound_statement_nostart, c_parser_label,
6699 c_parser_for_statement): Adjust
6700 c_parser_declaration_or_fndef callers.
6701 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6702 it through to c_parser_conditional_expression.
6703 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6704 pass it through to c_parser_binary_expression. Adjust recursive
6705 call.
6706 (c_parser_binary_expression): Remove prec argument, add
6707 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6708 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6709 binop matches it, use build2 instead of parser_build_binary_op.
6710 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6711 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6712 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6713 Handle pragma_struct and pragma_param the same as pragma_external.
6714 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6715 (c_parser_omp_variable_list): Parse array sections for
6716 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6717 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6718 (c_parser_omp_clause_reduction): Handle user defined reductions.
6719 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6720 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6721 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6722 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6723 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6724 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6725 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6726 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6727 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6728 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6729 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6730 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6731 (c_parser_omp_for_loop): Add CODE argument, pass it through
6732 to c_finish_omp_for. Change last argument to cclauses,
6733 and adjust uses to grab parallel clauses from the array of all
6734 the split clauses. Adjust c_parser_binary_expression,
6735 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6736 (omp_split_clauses): New function.
6737 (c_parser_omp_simd): New function.
6738 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6739 Allow the function to be called also when parsing combined constructs,
6740 and call c_parser_omp_simd when parsing for simd.
6741 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6742 #pragma omp section, require exactly one structured-block instead of
6743 sequence of statements.
6744 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6745 Allow the function to be called also when parsing combined constructs.
6746 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6747 Allow the function to be called also when parsing combined
6748 constructs.
6749 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6750 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6751 c_parser_omp_teams, c_parser_omp_target_data,
6752 c_parser_omp_target_update, c_parser_omp_target,
6753 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6754 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6755 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6756 (c_parser_omp_construct): Add p_name and mask vars. Handle
6757 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6758 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6759 and c_parser_omp_sections callers.
6760 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6761 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6762 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6763 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6764 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6765 OMP_CLAUSE_DEPEND.
6766 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6767 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6768 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6769 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6770 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6771 * c-typeck.c: Include tree-inline.h.
6772 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6773 handle_omp_array_sections_1, handle_omp_array_sections,
6774 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6775 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6776 user defined reductions.
6777 (c_tree_equal): New function.
6778 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6779 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6780 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6781 c_check_omp_declare_reduction_r): New prototypes.
6782 * c-decl.c (current_omp_declare_target_attribute): New variable.
6783 (c_decl_attributes): New function.
6784 (start_decl, start_function): Use it instead of decl_attributes.
6785 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6786 c_omp_reduction_decl, c_omp_reduction_lookup,
6787 c_check_omp_declare_reduction_r): New functions.
6788
0a6c2227
TT
67892013-09-25 Tom Tromey <tromey@redhat.com>
6790
6791 * Make-lang.in (c/gccspec.o): Remove.
6792 (CFLAGS-c/gccspec.o): New variable.
6793 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6794 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6795 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6796
f3bc55f0
TT
67972013-09-25 Tom Tromey <tromey@redhat.com>
6798
6799 * Make-lang.in (c/gccspec.o): Don't use subshell.
6800
a24d975c
MP
68012013-09-18 Marek Polacek <polacek@redhat.com>
6802
6803 PR sanitize/58443
6804 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6805 Remove unnecessary check.
6806
ce6923c5
MP
68072013-09-18 Marek Polacek <polacek@redhat.com>
6808
6809 PR sanitizer/58411
6810 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6811 no_sanitize_undefined attribute.
6812
a1e51df9
KT
68132013-09-13 Kai Tietz <ktietz@redhat.com>
6814
6815 PR target/57848
6816 * c-decl.c (c_builtin_function_ext_scope): Remove
6817 wrong assumption that it is never called on prexisting
6818 symbol.
6819
0af94e6f
JR
68202013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6821
6822 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6823
20059c8b
GDR
68242013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6825
6826 * c-objc-common.c (c_tree_printer): Tidy.
6827
de5a5fa1
MP
68282013-08-30 Marek Polacek <polacek@redhat.com>
6829
6830 * c-typeck.c (build_binary_op): Add division by zero and shift
6831 instrumentation.
6832
2531a1d9 68332013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6834 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6835
6e2bcc98 6836 PR c/35649
2531a1d9
JR
6837 * c-typeck.c (c_common_type): Prefer double_type_node over
6838 other REAL_TYPE types with the same precision.
6839 (convert_arguments): Likewise.
6840
025311c4
GDR
68412013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6842
6843 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6844 (c_initialize_diagnostics): Call a destructor for the early printer.
6845
da6ca2b5
GDR
68462013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6847
6848 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6849 printer initialization.
6850
318cda85 68512013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6852
318cda85
BI
6853 PR c/57490
6854 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6855 check for truth values.
6856 (expand_array_notation_exprs): Added truth values case. Removed an
6857 unwanted else. Added for-loop to walk through subtrees in default
6858 case.
6859
b066401f
GDR
68602013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6861
6862 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6863
fb48aadc
JM
68642013-07-23 Joseph Myers <joseph@codesourcery.com>
6865
6866 * c-parser.c (struct c_generic_association): Fix typo.
6867
433cc7b0
TT
68682013-07-23 Tom Tromey <tromey@redhat.com>
6869 Joseph Myers <joseph@codesourcery.com>
6870
6871 * c-parser.c (struct c_generic_association): New.
6872 (c_generic_association_d): New typedef.
6873 (c_parser_generic_selection): New function.
6874 (c_parser_postfix_expression): Handle RID_GENERIC.
6875
26d40c3d
JM
68762013-07-13 Jason Merrill <jason@redhat.com>
6877
6878 PR c++/57793
6879 * c-decl.c (finish_struct): Check for too-large class.
6880
ecdbd01a 68812013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6882
6883 PR c/57821
6884 * c-typeck.c (set_init_index): When folding, check for index overflow.
6885
1141ed3f
BI
68862013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6887
6888 * c-parser.c (c_parser_array_notation): Removed rejection of array
6889 notations in an array of function pointers.
6890
713b46fa
BI
68912013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6892
6893 * c-array-notation.c (make_triplet_val_inv): New function.
6894 (create_cmp_incr): Likewise.
6895 (create_array_refs): Likewise.
6896 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6897 Also modularized common parts between functions and called the function.
6898 (build_array_notation_expr): Likewise.
6899 (fix_conditional_array_notations_1): Likewise.
6900 (fix_array_notation_expr): Likewise.
6901 (fix_array_notation_call_expr): Likewise.
6902
92f20202
MP
69032013-06-18 Marek Polacek <polacek@redhat.com>
6904
6905 PR c/57630
6906 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6907
73a23b06
BI
69082013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6909
6910 * c-array-notation.c (build_array_notation_expr): Reject array notation
6911 mismatch between LHS and RHS even inside a call_expr. Also, removed
6912 a couple while statements that were dead code.
6913
00b8517d
BI
69142013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6915
6916 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6917 excessive precision expressions in function parameters. Also removed
6918 couple unwanted while statements.
6919
1509bdda
BI
69202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6921
6922 * c-array-notation.c (expand_array_notation_exprs): Added
6923 ARRAY_NOTATION_REF case.
ab20d992 6924
d60f1706
BI
69252013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6926
6927 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6928 function to c-family/array-notation-common.c.
6929 (is_cilkplus_reduce_builtin): Likewise.
6930 (find_rank): Likewise.
6931 (extract_array_notation_exprs): Likewise.
6932 (replace_array_notations): Likewise.
6933 (find_inv_trees): Likewise.
6934 (replace_inv_trees): Likewise.
6935 (contains_array_notation_expr): Likewise.
6936 (find_correct_array_notation_type): Likewise.
6937 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6938 (struct inv_list): Moved this to c-family/array-notation-common.c.
6939 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6940
6d6efbb3
BI
69412013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6942
6943 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6944 reduction functions outside the for-loop. Added a check if the fundecl
6945 is non-NULL. Finally, removed an unwanted if-statement, and made the
6946 body unconditional.
6947
25c22937
BI
69482013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6949
6950 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6951 condition of the if-statement matches the rank of else-block and then-
6952 block when array notations are used.
6953 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6954 expression after the entire function body is parsed.
6955 (c_parser_expr_no_commas): Delayed creating array notation expressions
6956 to the end of function parsing.
6957 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6958 whole if-statement instead of just the condition.
ab20d992 6959 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6960
edd25645
BI
69612013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6962
6963 PR c/57474
6964 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6965 array to NULL_TREE if they are unused. Also added a check for the
6966 field to be NULL before its fields are used in future.
ab20d992 6967
065ce7f1
RO
69682013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6969
6970 PR bootstrap/57450
6971 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6972 (build_array_notation_expr): Likewise.
6973
36536d79
BI
69742013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6975
6976 * c-typeck.c (build_array_ref): Added a check to see if array's
6977 index is greater than one. If true, then emit an error.
6978 (build_function_call_vec): Exclude error reporting and checking
6979 for builtin array-notation functions.
6980 (convert_arguments): Likewise.
6981 (c_finish_return): Added a check for array notations as a return
6982 expression. If true, then emit an error.
6983 (c_finish_loop): Added a check for array notations in a loop
6984 condition. If true then emit an error.
6985 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6986 (build_binary_op): Added a check for array notation expr inside
6987 op1 and op0. If present, we call another function to find correct
6988 type.
6989 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6990 * c-parser.c (c_parser_compound_statement): Check if array
6991 notation code is used in tree, if so, then transform them into
6992 appropriate C code.
6993 (c_parser_expr_no_commas): Check if array notation is used in LHS
6994 or RHS, if so, then build array notation expression instead of
6995 regular modify.
6996 (c_parser_postfix_expression_after_primary): Added a check for
6997 colon(s) after square braces, if so then handle it like an array
6998 notation. Also, break up array notations in unary op if found.
6999 (c_parser_direct_declarator_inner): Added a check for array
7000 notation.
7001 (c_parser_compound_statement): Added a check for array notation in
7002 a stmt. If one is present, then expand array notation expr.
7003 (c_parser_if_statement): Likewise.
7004 (c_parser_switch_statement): Added a check for array notations in
7005 a switch statement's condition. If true, then output an error.
7006 (c_parser_while_statement): Similarly, but for a while.
7007 (c_parser_do_statement): Similarly, but for a do-while.
7008 (c_parser_for_statement): Similarly, but for a for-loop.
7009 (c_parser_unary_expression): Check if array notation is used in a
7010 pre-increment or pre-decrement expression. If true, then expand
7011 them.
7012 (c_parser_array_notation): New function.
7013 * c-array-notation.c: New file.
7014 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7015
cd192ccc
MS
70162013-05-23 Mike Stump <mikestump@comcast.net>
7017
7018 * c-typeck.c (convert_for_assignment): Handle references to memory
7019 spaces better.
7020
427b248d
JM
70212013-05-16 Jason Merrill <jason@redhat.com>
7022
7023 * Make-lang.in (cc1$(exeext)): Use link mutex.
7024
44d90fe1
PC
70252013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7026
7027 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7028 to simply use OPT_Wpointer_arith.
7029 (build_unary_op): Likewise.
7030
4e7d7b3d
JJ
70312013-04-03 Jakub Jelinek <jakub@redhat.com>
7032
7033 PR c/19449
7034 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7035 argument. If set, or it temporarily for parsing of the first
7036 argument into force_folding_builtin_constant_p.
7037 (c_parser_postfix_expression): Adjust callers.
7038
839b422f
RB
70392013-03-21 Richard Biener <rguenther@suse.de>
7040
7041 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7042 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7043
2ee028f1
MP
70442013-02-12 Marek Polacek <polacek@redhat.com>
7045
7046 PR c/44938
7047 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7048 origtypes to NULL.
7049
8824edff
JJ
70502013-01-24 Jakub Jelinek <jakub@redhat.com>
7051
7052 PR c/56078
7053 * c-typeck.c (set_nonincremental_init_from_string): If
7054 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7055 returned false.
7056 (process_init_element): Likewise.
7057
eadd3d0d
JJ
70582012-12-20 Jakub Jelinek <jakub@redhat.com>
7059
7060 PR c++/55619
7061 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7062 argument, don't call default_function_array_conversion
7063 nor c_fully_fold here.
7064 (c_parser_asm_statement): Adjust callers.
7065 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7066 and outputs here, and call default_function_array_conversion
7067 on inputs that don't need to be addressable.
7068
f8a93a2e
JJ
70692012-12-18 Jakub Jelinek <jakub@redhat.com>
7070
7071 PR c/39464
7072 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7073 warning require that both c_common_unsigned_type as well as
7074 c_common_signed_type is the same for both mvl and mvr types.
7075
9771b263
DN
70762012-11-16 Diego Novillo <dnovillo@google.com>
7077
7078 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7079
7080 * c-common.c: Use new vec API in vec.h.
7081 * c-common.h: Likewise.
7082 * c-gimplify.c: Likewise.
7083 * c-pragma.c: Likewise.
7084 * c-pretty-print.c: Likewise.
7085 * c-pretty-print.h: Likewise.
7086 * c-semantics.c: Likewise.
7087 * c-decl.c: Likewise.
7088 * c-parser.c: Likewise.
7089 * c-tree.h: Likewise.
7090 * c-typeck.c: Likewise.
7091
880661a4
JW
70922012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7093
7094 PR c++/54930
7095 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7096
077d1abe
MLI
70972012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7098
7099 PR c/53066
7100 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7101 shadows a function, unless the variable is a function or a
7102 pointer-to-function.
7103
3a785c97
JJ
71042012-10-12 Jakub Jelinek <jakub@redhat.com>
7105
7106 PR c/54381
7107 * c-parser.c (struct c_tree_loc_pair): Removed.
7108 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7109 add location_t * and tree * arguments, fill in array of 3
7110 sizeof_arg trees and corresponding locs.
7111 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7112 c_parser_expr_list callers.
7113 (c_parser_postfix_expression_after_primary): Likewise. Pass
7114 array of 3 sizeof_arg trees and locs (corresponding to first
7115 3 arguments) to sizeof_pointer_memaccess_warning.
7116
703c8606
LC
71172012-10-09 Lawrence Crowl <crowl@google.com>
7118
7119 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7120 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7121 hash table.
7122
5d9de0d0
PC
71232012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7124
7125 PR c++/54194
7126 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7127 call.
7128
a212e43f
MG
71292012-10-09 Marc Glisse <marc.glisse@inria.fr>
7130
7131 PR c++/54427
7132 * c-typeck.c: Include c-common.h.
7133 (enum stv_conv): Moved to c-common.h.
7134 (scalar_to_vector): Moved to c-common.c.
7135 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7136 * Make-lang.in: c-typeck.c depends on c-common.h.
7137
3b78de56
AC
71382012-10-04 Arnaud Charlet <charlet@adacore.com>
7139
7140 * c-decl.c (c_write_global_declarations): Fix handling of
7141 -fdump-ada-spec*.
7142
78c60e3d
SS
71432012-09-30 Sharad Singhai <singhai@google.com>
7144
7145 * c-decl.c (c_write_global_declarations): Use a different method
7146 to determine if the dump has ben initialized.
7147
9f33203d
JM
71482012-09-14 Joseph Myers <joseph@codesourcery.com>
7149
7150 PR c/54552
7151 * c-typeck.c (c_cast_expr): When casting to a type requiring
7152 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7153 c_fully_fold first.
7154
a27d595d
JM
71552012-09-14 Joseph Myers <joseph@codesourcery.com>
7156
7157 PR c/54103
7158 * c-typeck.c (build_unary_op): Pass original argument of
7159 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7160 any C_MAYBE_CONST_EXPR, if it has integer operands.
7161 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7162 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7163 to c_objc_common_truthvalue_conversion, then remove any
7164 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7165 c_objc_common_truthvalue_conversion not
7166 c_common_truthvalue_conversion.
7167 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7168 call note_integer_operands for arguments with integer operands
7169 that are not integer constants.
7170
9feb29df
JJ
71712012-09-13 Jakub Jelinek <jakub@redhat.com>
7172
7173 PR c/54559
7174 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7175 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7176
d409320c
JJ
71772012-08-31 Jakub Jelinek <jakub@redhat.com>
7178
7179 PR c/54428
7180 * c-convert.c (convert): Don't call fold_convert_loc if
7181 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7182 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7183 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7184
6265d07c
JJ
71852012-08-24 Jakub Jelinek <jakub@redhat.com>
7186
7187 PR c/54355
7188 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7189 for nested and empty_ok arguments in the call to
7190 c_parser_declaration_or_fndef.
7191
1a4049e7
JJ
71922012-08-17 Jakub Jelinek <jakub@redhat.com>
7193
7194 * c-tree.h (c_last_sizeof_arg): Declare.
7195 * c-parser.c (struct c_tree_loc_pair): New type.
7196 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7197 non-NULL.
7198 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7199 (c_parser_postfix_expression_after_primary): Likewise. Call
7200 sizeof_pointer_memaccess_warning if needed.
7201 (sizeof_ptr_memacc_comptypes): New function.
7202 * c-typeck.c (c_last_sizeof_arg): New global variable.
7203 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7204
0229aee9
UB
72052012-07-24 Uros Bizjak <ubizjak@gmail.com>
7206
7207 * c-lang.h (lang_decl): Add variable_size GTY option.
7208
7ee2468b
SB
72092012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7210
7211 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7212 * Make-lang.in: Fix dependencies.
7213
d4a10d0a
SB
72142012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7215
7216 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7217 and add language Makefile hooks.
7218 * config-lang.in: New file.
7219 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7220 add the required "normal" config-lang.in rules.
7221 * c-lang.h: Moved from gcc/ to here.
7222 * c-tree.h: Likewise.
7223 * c-objc-common.c: Likewise.
7224 * c-objc-common.h: Likewise.
7225 * c-typeck.c: Likewise.
7226 * c-convert.c: Likewise.
7227 * c-lang.c: Likewise.
7228 * c-aux-info.c: Likewise.
7229 * c-errors.c: Likewise.
7230 * gccspec.c: Likewise.
7231 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7232 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7233\f
8d9254fc 7234Copyright (C) 2012-2020 Free Software Foundation, Inc.
d4a10d0a
SB
7235
7236Copying and distribution of this file, with or without modification,
7237are permitted in any medium without royalty provided the copyright
7238notice and this notice are preserved.