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