]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
4967ca2f
GA
12020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2
3 PR c/96377
4 * c-typeck.c (process_init_element): Split test for whether to
5 recurse into a record, union or array into...
6 (initialize_elementwise_p): ...this new function. Don't recurse
7 into a vector type if the initialization value is also a vector.
8
48cc2e46
GA
92020-07-31 Richard Biener <rguenther@suse.de>
10
11 PR debug/96383
12 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
13 Define to c_common_finalize_early_debug.
14
3ea9abca
GA
152020-07-22 Tobias Burnus <tobias@codesourcery.com>
16
17 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
18 (c_parser_omp_critical): Permit hint(0) clause without named critical.
19 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
20
30430061
GA
212020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
22
23 PR target/95237
24 * c-decl.c (finish_decl): Call target hook
25 lower_local_decl_alignment to lower local decl alignment.
26
3f8ca9cb
GA
272020-07-09 Julian Brown <julian@codesourcery.com>
28 Thomas Schwinge <thomas@codesourcery.com>
29
30 PR middle-end/95270
31 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
32 for standalone attach/detach clauses.
33
50873cc5
GA
342020-07-08 Eric Botcazou <ebotcazou@gcc.gnu.org>
35
36 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
37 set, warn for conversion between pointers that point to incompatible
38 scalar storage orders.
39
f60ee68d
GA
402020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
41
42 * c-parser.c (c_parser_statement_after_labels): Pass correct
43 parameters to c_parser_do_statement.
44
56638b9b
GA
452020-06-16 Jakub Jelinek <jakub@redhat.com>
46
47 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
48 c_in_omp_for.
49 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
50 premature c_fully_fold. Defer explicit c_fully_fold calls to after
51 c_finish_omp_for.
52 * c-tree.h (c_in_omp_for): Declare.
53 * c-typeck.c (c_in_omp_for): Define.
54 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
55 (digest_init): Likewise.
56 (build_binary_op): Likewise.
57
582020-06-16 Jakub Jelinek <jakub@redhat.com>
59
60 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
61 from kind by comma rather than colon.
62
1a59f3db
GA
632020-06-05 Mark Wielaard <mark@klomp.org>
64
65 * c-decl.c (implicit_decl_warning): When warned and olddecl is
66 an undeclared builtin, then add a fixit header hint, if found.
67 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
68 warning_at about implicit builtin declaration type mismatch.
69
9a5b7438
GA
702020-06-03 Mark Wielaard <mark@klomp.org>
71
72 * c-parser.c (struct c_parser): Add seen_string_literal
73 bitfield.
74 (c_parser_consume_token): Reset seen_string_literal.
75 (c_parser_error_richloc): Add name_hint if seen_string_literal
76 and next token is a CPP_NAME and we have a missing header
77 suggestion for the name.
78 (c_parser_string_literal): Set seen_string_literal.
79
802020-06-03 Mark Wielaard <mark@klomp.org>
81
82 * c-parser.c (c_parser_postfix_expression_after_primary): Add
83 scope with matching_parens after CPP_OPEN_PAREN.
84
852020-06-03 Tobias Burnus <tobias@codesourcery.com>
86
87 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
88
53ffb43a
GA
892020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
90
91 * Make-lang.in: Remove extra slash.
92
8f66f175
ML
932020-05-19 Martin Liska <mliska@suse.cz>
94
95 * c-parser.c: Fix typo.
96
49ddde69
JJ
972020-05-14 Jakub Jelinek <jakub@redhat.com>
98
99 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
100
eb72dc66
RB
1012020-05-07 Richard Biener <rguenther@suse.de>
102
103 PR middle-end/94703
104 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
105 DECL_GIMPLE_REG_P.
106
bf915591
JJ
1072020-04-30 Jakub Jelinek <jakub@redhat.com>
108
109 PR c/94842
110 * c-decl.c (set_labels_context_r): In addition to context-less
111 LABEL_DECLs adjust also LABEL_DECLs with context equal to
112 parent function if any.
113 (store_parm_decls): Adjust comment.
114
e1113ffb
JJ
1152020-04-19 Jakub Jelinek <jakub@redhat.com>
116
117 PR objc/94637
118 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
119 two CPP_COLON tokens.
120
2e389749
JJ
1212020-04-17 Jakub Jelinek <jakub@redhat.com>
122
123 PR other/94629
124 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
125 to data.clauses.
126
2dc9294c
JJ
1272020-04-15 Jakub Jelinek <jakub@redhat.com>
128
129 PR c/94593
130 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
131 requires directive when not at file scope.
132
13e41d8b
TB
1332020-04-08 Tobias Burnus <tobias@codesourcery.com>
134
135 PR middle-end/94120
136 * c-decl.c (c_check_in_current_scope): New function.
137 * c-tree.h (c_check_in_current_scope): Declare it.
138 * c-parser.c (c_parser_oacc_declare): Add check that variables
139 are declared in the same scope as the directive. Fix handling
140 of namespace vars.
141
4df50a05
JJ
1422020-04-07 Jakub Jelinek <jakub@redhat.com>
143
144 PR c++/94512
145 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
146 if c_parser_omp_master succeeded.
147
5db9e893
JJ
1482020-03-23 Jakub Jelinek <jakub@redhat.com>
149
150 PR gcov-profile/94029
151 PR c/94239
152 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
153 the function_start_locus location. Don't do that afterwards for the
154 __GIMPLE body parsing.
155
9def91e9
JJ
1562020-03-19 Jakub Jelinek <jakub@redhat.com>
157
158 PR gcov-profile/94029
159 * c-tree.h (finish_function): Add location_t argument defaulted to
160 input_location.
161 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
162 set it to the locus of closing } if non-NULL.
163 (c_parser_compound_statement_nostart): Return locus of closing }.
164 (c_parser_parse_rtl_body): Likewise.
165 (c_parser_declaration_or_fndef): Propagate locus of closing } to
166 finish_function.
167 * c-decl.c (finish_function): Add end_loc argument, use it instead of
168 input_location to set function_end_locus.
169
046c5890
JJ
1702020-03-17 Jakub Jelinek <jakub@redhat.com>
171
172 PR c/94172
173 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
174 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
175 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
176 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
177 ENUMERAL_TYPEs.
178 (finish_incomplete_vars): New function, moved from finish_struct. Use
179 relayout_decl instead of layout_decl.
180 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
181 being TYPE_VFIELD. Use finish_incomplete_vars.
182 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
183 finish_incomplete_vars.
184 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
185 also on ENUMERAL_TYPEs.
186
c015ff8c
JJ
1872020-03-16 Jakub Jelinek <jakub@redhat.com>
188
189 PR c/94179
190 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
191
f2e9fe5f
MS
1922020-03-13 Martin Sebor <msebor@redhat.com>
193
194 PR c/94040
195 * c-decl.c (builtin_structptr_type_count): New constant.
196 (match_builtin_function_types): Reject decls that are incompatible
197 in types pointed to by pointers.
198 (diagnose_mismatched_decls): Adjust comments.
199
c9d70946
JM
2002020-03-05 Joseph Myers <joseph@codesourcery.com>
201
202 PR c/93577
203 * c-typeck.c (pop_init_level): Do not diagnose initializers as
204 empty when initialized type is error_mark_node.
205 (set_designator, process_init_element): Ignore initializers for
206 elements of a variable-size type or of error_mark_node.
207
726e292d
MS
2082020-03-01 Martin Sebor <msebor@redhat.com>
209
210 PR middle-end/93926
211 * c-decl.c (types_close_enough_to_match): New function.
212 (match_builtin_function_types):
213 (diagnose_mismatched_decls): Add missing inform call to a warning.
214
a499c2f8
MS
2152020-03-01 Martin Sebor <msebor@redhat.com>
216
217 PR c/93812
218 * c-typeck.c (build_functype_attribute_variant): New function.
219 (composite_type): Call it.
220
9c3da8cc
JJ
2212020-02-25 Jakub Jelinek <jakub@redhat.com>
222
223 PR other/93912
224 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
225 Rename last argument from probablity to probability.
226
bacdd5e9
JJ
2272020-02-13 Jakub Jelinek <jakub@redhat.com>
228
229 PR c/93576
230 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
231 *expr if it has side effects.
232
f9eb0973
JL
2332020-01-30 Jeff Law <law@redhat.com>
234
235 PR c/88660
236 * c-parser.c (c_parser_switch_statement): Make sure to request
237 marking the switch expr as used.
238
ac68e287
JM
2392020-01-22 Joseph Myers <joseph@codesourcery.com>
240
241 PR c/93348
242 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
243 argument with integer operands.
244
852f0ae8
KK
2452020-01-16 Kerem Kat <keremkat@gmail.com>
246
247 PR c/92833
248 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
249 to support 4 available tokens.
250
e2346a33
JM
2512020-01-15 Joseph Myers <joseph@codesourcery.com>
252
253 PR c/93072
254 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
255 determine whether to set DECL_CONTEXT.
256
3d77686d
JM
2572020-01-13 Joseph Myers <joseph@codesourcery.com>
258
259 PR c/93241
260 * c-typeck.c (build_c_cast): Check for expressions with integer
261 operands that can occur in an unevaluated part of an integer
262 constant expression and call note_integer_operands as needed.
263
f74c4b2c
RB
2642019-01-08 Richard Biener <rguenther@suse.de>
265
266 PR middle-end/93199
267 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
268 permanently.
269
8d9254fc
JJ
2702020-01-01 Jakub Jelinek <jakub@redhat.com>
271
272 Update copyright years.
273
39292e25
EB
2742019-12-20 Eric Botcazou <ebotcazou@adacore.com>
275
276 * c-decl.c (collect_source_ref_cb): Delete.
277 (for_each_global_decl): Rename into...
278 (collect_source_refs): ...this. Call collect_source_ref directly.
279 (c_parse_final_cleanups): Always call collect_source_ref on the main
280 input filename.
281
519d7496
JB
2822019-12-19 Julian Brown <julian@codesourcery.com>
283 Cesar Philippidis <cesar@codesourcery.com>
284
285 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
286 detach clauses.
287 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
288 Allow deref (->) in variable lists if true.
289 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
290 Pass to c_parser_omp_variable_list.
291 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
292 call to c_parser_omp_variable_list.
293 (c_parser_oacc_all_clauses): Support attach and detach clauses.
294 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
295 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
296 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
297 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
298 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
299 and detach. Support deref.
300 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
301 GOMP_MAP_ALWAYS_POINTER for OpenACC.
302 (c_oacc_check_attachments): New function.
303 (c_finish_omp_clauses): Check attach/detach arguments for being
304 pointers using above. Support deref.
305
a6163563
JB
3062019-12-19 Julian Brown <julian@codesourcery.com>
307 Maciej W. Rozycki <macro@codesourcery.com>
308 Tobias Burnus <tobias@codesourcery.com>
309 Thomas Schwinge <thomas@codesourcery.com>
310
311 * c-parser.c (c_parser_omp_clause_name): Support no_create.
312 (c_parser_oacc_data_clause): Likewise.
313 (c_parser_oacc_all_clauses): Likewise.
314 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
315 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
316 PRAGMA_OACC_CLAUSE_NO_CREATE.
317 * c-typeck.c (handle_omp_array_sections): Support
318 GOMP_MAP_NO_ALLOC.
319
d68f5d45
DM
3202019-12-09 David Malcolm <dmalcolm@redhat.com>
321
322 * c-objc-common.c (range_label_for_type_mismatch::get_text):
323 Replace label_text ctor calls.
324
4691bf46
JM
3252019-12-04 Joseph Myers <joseph@codesourcery.com>
326
327 PR c/36941
328 PR c/88827
329 * c-typeck.c (convert_lvalue_to_rvalue): Call
330 require_complete_type for arguments not of void types.
331 (build_indirect_ref): Do not diagnose dereferencing pointers to
332 incomplete types.
333 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
334
85d11957
JM
3352019-12-03 Joseph Myers <joseph@codesourcery.com>
336
337 PR c/88704
338 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
339 old-style parameter definitions.
340
4569f8b3
SL
3412019-12-01 Sandra Loosemore <sandra@codesourcery.com>
342
343 PR target/92499
344
345 * c-decl.c (flexible_array_type_p): Move to common code.
346
65ef05d0
RS
3472019-11-30 Richard Sandiford <richard.sandiford@arm.com>
348
349 * c-decl.c (start_decl): Allow initialization of variables whose
350 size is a POLY_INT_CST.
351 (finish_decl): Use verify_type_context to check whether the target
352 allows variables with a particular type to have static or thread-local
353 storage duration. Don't raise a second error if such variables do
354 not have a constant size.
355 (grokdeclarator): Use verify_type_context to check whether the
356 target allows fields or array elements to have a particular type.
357 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
358 the target allows pointer difference for the types involved.
359 (build_unary_op): Likewise for pointer increment and decrement.
360
34b43828
JM
3612019-11-29 Joseph Myers <joseph@codesourcery.com>
362
363 * c-parser.c (struct c_parser): Add members raw_tokens and
364 raw_tokens_used.
365 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
366 using previously-lexed raw tokens.
367 (c_parser_peek_nth_token_raw)
368 (c_parser_check_balanced_raw_token_sequence): New functions.
369 (c_parser_nth_token_starts_std_attributes): Use
370 c_parser_check_balanced_raw_token_sequence for Objective-C.
371
5b8d9367
JM
3722019-11-25 Joseph Myers <joseph@codesourcery.com>
373
374 PR c/91985
375 * c-decl.c (finish_declspecs): Use int instead of decimal
376 floating-point types if decimal floating-point not supported.
377
1723e1be
JM
3782019-11-25 Joseph Myers <joseph@codesourcery.com>
379
380 * c-tree.h (struct c_declarator): Use a structure for id member.
381 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
382 declarators at the start, not when handling individual declarators
383 later. Use u.id.id instead of u.id.
384 (grokfield): Use u.id.id instead of u.id.
385 (build_id_declarator): Set u.id.id and u.id.attrs.
386 (finish_declspecs): Handle postfix attributes in case of typedef
387 name or typeof used.
388 * c-parser.c (c_parser_direct_declarator)
389 (c_parser_direct_declarator_inner): Place declarator for
390 attributes inside that for function or array, not outside. Set
391 u.id.attrs for identifiers.
392 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
393 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
394 instead of u.id.
395
bdaf8be1
JJ
3962019-11-22 Jakub Jelinek <jakub@redhat.com>
397
398 PR c/90677
399 * c-decl.c (identifier_global_tag): Define.
400
3e00ba47
RB
4012019-11-20 Richard Biener <rguenther@suse.de>
402
403 PR c/92088
404 * c-decl.c (grokdeclarator): Prevent inlining of nested
405 function with VLA arguments.
406
8c5b727a
JM
4072019-11-20 Joseph Myers <joseph@codesourcery.com>
408
409 * c-decl.c (c_warn_type_attributes): New function.
410 (groktypename, grokdeclarator, finish_declspecs): Call
411 c_warn_type_attributes before applying attributes to types.
412 * c-tree.h (c_warn_type_attributes): Declare.
413
192961ff
JM
4142019-11-19 Joseph Myers <joseph@codesourcery.com>
415
416 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
417 standard attributes.
418 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
419 pedwarn for unknown standard attributes and return error_mark_node
420 for them.
421
20a38017
MM
4222019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
423
424 * c-parser.c (c_parser_parse_rtl_body): Always call
425 run_rtl_passes, even if startwith pass is not provided.
426
d5fbe5e0
JM
4272019-11-15 Joseph Myers <joseph@codesourcery.com>
428
429 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
430 duplicate standard attributes.
431
97cc1187
JM
4322019-11-15 Joseph Myers <joseph@codesourcery.com>
433
434 * c-decl.c (std_attribute_table): Add maybe_unused.
435
f8aea5e3
JM
4362019-11-15 Joseph Myers <joseph@codesourcery.com>
437
438 * c-decl.c (std_attribute_table): Add fallthrough.
439 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
440 attribute at top level.
441
2cc94aa8
JM
4422019-11-15 Joseph Myers <joseph@codesourcery.com>
443
444 * c-decl.c (std_attribute_table): New.
445 (c_init_decl_processing): Register attributes from
446 std_attribute_table.
447 * c-parser.c (c_parser_attribute_arguments): Add arguments
448 require_string and allow_empty_args. All callers changed.
449 (c_parser_std_attribute): Set require_string argument for
450 "deprecated" attribute.
451
7c5890cc
JM
4522019-11-14 Joseph Myers <joseph@codesourcery.com>
453
454 * c-parser.c (c_parser_postfix_expression)
455 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
456 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
457
e8738f4e
RS
4582019-11-14 Richard Sandiford <richard.sandiford@arm.com>
459
460 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
461 of build_same_sized_truth_vector_type.
462 (build_vec_cmp): Likewise.
463
b2417b59
JJ
4642019-11-14 Jakub Jelinek <jakub@redhat.com>
465
bedb7f04
JJ
466 * c-parser.c (c_parser_omp_context_selector): Don't require score
467 argument to fit into shwi, just to be INTEGER_CST. Diagnose
468 negative score.
469
b2417b59
JJ
470 * c-parser.c (c_parser_omp_context_selector): Rename
471 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
472 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
473 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
474 and string literals.
475
4e03c3a7
JM
4762019-11-14 Joseph Myers <joseph@codesourcery.com>
477
478 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
479 ctsk_tagfirstref_attrs.
480 (struct c_declspecs): Update description of attrs. Add
481 postfix_attrs and non_std_attrs_seen_p. Increase size of
482 typespec_kind bit-field.
483 (c_warn_unused_attributes): New declaration.
484 (parser_xref_tag): Update prototype.
485 * c-decl.c (c_warn_unused_attributes): New function.
486 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
487 ctsk_tagref_attrs. Handle attribute declarations.
488 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
489 (grokdeclarator): Handle standard attributes.
490 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
491 attributes to incomplete type reference.
492 (xref_tag): Update call to parser_xref_tag.
493 (declspecs_add_addrspace, declspecs_add_type)
494 (declspecs_add_scspec, declspecs_add_attrs): Set
495 non_std_attrs_seen_p.
496 (finish_declspecs): Apply postfix standard attributes to type.
497 * c-parser.c (c_token_starts_declspecs)
498 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
499 (c_parser_next_tokens_start_declaration): Update comments.
500 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
501 parser->tokens[2] to parser->tokens[1].
502 (c_parser_nth_token_starts_std_attributes)
503 (c_parser_std_attribute_specifier_sequence): New functions.
504 (c_parser_declaration_or_fndef): Add arguments have_attrs and
505 attrs. All callers changed. Handle standard attributes.
506 (c_parser_parms_declarator, c_parser_parms_list_declarator)
507 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
508 All callers changed.
509 (c_parser_declspecs): Add arguments start_std_attr_ok and
510 end_std_attr_ok. All callers changed. Handle standard
511 attributes.
512 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
513 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
514 (c_parser_compound_statement_nostart, c_parser_all_labels)
515 (c_parser_label, c_parser_statement, c_parser_for_statement):
516 Handle standard attributes.
517 * c-parser.h (c_parser_declspecs): Update prototype.
518 * gimple-parser.c (c_parser_gimple_declaration): Update call to
519 c_parser_declspecs.
520
0c29cac4
ML
5212019-11-12 Martin Liska <mliska@suse.cz>
522
523 * gimple-parser.c: Do not include params.h.
524
028d4092
ML
5252019-11-12 Martin Liska <mliska@suse.cz>
526
527 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
528 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
529 macro.
530
62aee289
MR
5312019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
532 Frederik Harwath <frederik@codesourcery.com>
533
534 gcc/c/
535 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
536 (c_parser_oacc_kernels_parallel): Rename function to...
537 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
538 (c_parser_omp_construct): Update accordingly.
539
540
7cec9588
JJ
5412019-11-11 Jakub Jelinek <jakub@redhat.com>
542
543 * c-parser.c (c_parser_translation_unit): Diagnose declare target
544 without corresponding end declare target.
545
f486280c
RS
5462019-11-08 Richard Sandiford <richard.sandiford@arm.com>
547
548 * c-convert.c (convert): Only handle vector conversions if one of
549 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
550 allows it.
551 * c-typeck.c (build_array_ref): Only allow vector indexing if the
552 vectors satisfy gnu_vector_type_p.
553 (build_unary_op): Only allow unary operators to be applied to
554 vectors if they satisfy gnu_vector_type_p.
555 (digest_init): Only allow by-element initialization of vectors
556 if they satisfy gnu_vector_type_p.
557 (really_start_incremental_init): Likewise.
558 (push_init_level): Likewise.
559 (pop_init_level): Likewise.
560 (process_init_element): Likewise.
561 (build_binary_op): Only allow binary operators to be applied to
562 vectors if they satisfy gnu_vector_type_p.
563
017c6491
JM
5642019-11-08 Joseph Myers <joseph@codesourcery.com>
565
566 * c-decl.c (grokparms): Convert () in a function definition to
567 (void) for C2x.
568 (store_parm_decls_oldstyle): Pedwarn for C2x.
569 (store_parm_decls): Update comment about () not generating a
570 prototype.
571
c01bd174
JM
5722019-11-07 Joseph Myers <joseph@codesourcery.com>
573
574 * c-parser.c (c_parser_attribute_arguments): New function.
575 Factored out of c_parser_gnu_attribute.
576 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
577 (c_parser_balanced_token_sequence, c_parser_std_attribute)
578 (c_parser_std_attribute_specifier): New functions.
579 (c_parser_transaction_attributes): Use
580 c_parser_std_attribute_specifier.
581
471c5330
JM
5822019-11-07 Joseph Myers <joseph@codesourcery.com>
583
584 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
585 lex_joined_string and translate_strings_p.
586 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
587 c_lex_with_flags.
588 (c_parser_string_literal): New function.
589 (c_parser_static_assert_declaration_no_semi): Use
590 c_parser_string_literal. Do not set lex_untranslated_string.
591 (c_parser_asm_string_literal): Use c_parser_string_literal.
592 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
593 (c_parser_gnu_attributes): Set and restore translate_strings_p
594 instead of lex_untranslated_string.
595 (c_parser_asm_statement): Do not set lex_untranslated_string.
596 (c_parser_asm_operands): Likewise.
597 (c_parser_has_attribute_expression): Set and restore
598 translate_strings_p instead of lex_untranslated_string.
599 (c_parser_postfix_expression): Use c_parser_string_literal.
600 (pragma_lex): Likewise.
601 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
602 (c_parse_file): Set translate_strings_p.
603 * gimple-parser.c (c_parser_gimple_postfix_expression)
604 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
605 * c-parser.c (c_parser_string_literal): Declare function.
606
d0c464d2
JJ
6072019-11-02 Jakub Jelinek <jakub@redhat.com>
608
609 * c-parser.c (c_finish_omp_declare_variant): Use
610 omp_get_context_selector instead of c_omp_get_context_selector.
611
ac2cfa6c
RS
6122019-10-29 Richard Sandiford <richard.sandiford@arm.com>
613
614 * c-tree.h (c_simulate_enum_decl): Declare.
615 * c-decl.c (c_simulate_enum_decl): New function.
616 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
617
74078538
RS
6182019-10-29 Richard Sandiford <richard.sandiford@arm.com>
619
620 * c-tree.h (c_simulate_builtin_function_decl): Declare.
621 * c-decl.c (c_simulate_builtin_function_decl): New function.
622 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
623 to the above.
624
ad1539d5
MS
6252019-10-28 Martin Sebor <msebor@redhat.com>
626
627 PR c/66970
628 * c-decl.c (names_builtin_p): Define a new function.
629
cb73e4e7
RB
6302019-10-28 Richard Biener <rguenther@suse.de>
631
632 PR c/92249
633 * gimple-parser.c (c_parser_parse_gimple_body): Make
634 current_bb the entry block initially to easier recover
635 from errors.
636 (c_parser_gimple_compound_statement): Adjust.
637
135df52c
JJ
6382019-10-24 Jakub Jelinek <jakub@redhat.com>
639
640 * c-parser.c (c_finish_omp_declare_variant): Use
641 omp_context_selector_matches instead of
642 c_omp_context_selector_matches.
643 * c-decl.c (c_decl_attributes): Add "omp declare target block"
644 attribute in between declare target and end declare target
645 pragmas.
646
783bfe5e
JM
6472019-10-15 Joseph Myers <joseph@codesourcery.com>
648
649 * c-parser.c (c_parser_attribute_any_word): Rename to
650 c_parser_gnu_attribute_any_word. All callers changed.
651 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
652 callers changed.
653 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
654 callers changed.
655 (c_parser_declaration_or_fndef, c_parser_declspecs)
656 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
657 (c_parser_struct_declaration, c_parser_declarator)
658 (c_parser_gnu_attribute, c_parser_compound_statement)
659 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
660 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
661 attribute-related syntax productions.
662
56898e43
RS
6632019-10-14 Richard Sandiford <richard.sandiford@arm.com>
664
665 * c-objc-common.c (useful_aka_type_p): Replace with...
666 (get_aka_type): ...this new function. Given the original type,
667 decide which aka type to print (if any). Only look through typedefs
668 if user_facing_original_type_p.
669 (print_type): Update accordingly.
670
b9424661
JJ
6712019-10-14 Jakub Jelinek <jakub@redhat.com>
672
673 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
674 into int NESTED, if it is 2, diagnose missing commas in between
675 clauses.
676 (c_parser_omp_context_selector): Pass 2 as last argument to
677 c_parser_omp_all_clauses.
678
20de9568
JJ
6792019-10-12 Jakub Jelinek <jakub@redhat.com>
680
681 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
682 For simd properties, put them directly into TREE_VALUE.
683 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
684 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
685 add "omp declare variant base" attribute rather than
686 "omp declare variant".
687
fe2bc27c
JM
6882019-10-11 Joseph Myers <joseph@codesourcery.com>
689
690 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
691
94e7f906
JJ
6922019-10-10 Jakub Jelinek <jakub@redhat.com>
693
694 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
695 true, terminate processing on closing paren and don't skip to end of
696 pragma line.
697 (c_parser_omp_declare_simd): Handle also declare variant.
698 (omp_construct_selectors, omp_device_selectors,
699 omp_implementation_selectors, omp_user_selectors): New variables.
700 (c_parser_omp_context_selector,
701 c_parser_omp_context_selector_specification,
702 c_finish_omp_declare_variant): New functions.
703 (c_finish_omp_declare_simd): Handle both declare simd and
704 declare variant.
705 (c_parser_omp_declare): Handle declare variant.
706
93313b94
JM
7072019-10-02 Joseph Myers <joseph@codesourcery.com>
708
709 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
710 CPP_COLON tokens.
711
55879815
RS
7122019-10-01 Richard Sandiford <richard.sandiford@arm.com>
713
714 * c-objc-common.c (useful_aka_type_p): New function.
715 (print_type): Use it to decide whether an aka type is worth printing.
716
59bc434a
JJ
7172019-09-27 Jakub Jelinek <jakub@redhat.com>
718
719 PR c++/88203
720 * c-parser.c (c_parser_predefined_identifier): New function.
721 (c_parser_postfix_expression): Use it.
722 (c_parser_omp_variable_list): Parse predefined identifiers.
723 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
724 in shared and firstprivate clauses, even when they are predetermined
725 shared.
726
c6447c20
RS
7272019-09-27 Richard Sandiford <richard.sandiford@arm.com>
728
729 * c-typeck.c (build_function_call_vec): Take the original function
730 decl as an optional final parameter. Pass all built-in calls to
731 check_builtin_function_arguments.
732
522da4c2
EB
7332019-09-20 Eric Botcazou <ebotcazou@adacore.com>
734
735 PR c/91815
736 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
737 of identifiers in the external scope only for variables and functions.
738
68e2c199
PK
7392019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
740
741 PR c/78736
742 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
743
22f8849d
IS
7442019-08-23 Iain Sandoe <iain@sandoe.co.uk>
745
746 PR pch/61250
747 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
748 after determining that the first token is not
749 PRAGMA_GCC_PCH_PREPROCESS.
750
db376f45
EB
7512019-08-22 Eric Botcazou <ebotcazou@adacore.com>
752
753 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
754 FUNCTION_DECL to the right value in the presence of nested declarators.
755
4d732405
RS
7562019-08-13 Richard Sandiford <richard.sandiford@arm.com>
757
758 PR middle-end/91421
759 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
760
cb1180d5
RS
7612019-08-13 Richard Sandiford <richard.sandiford@arm.com>
762
763 PR middle-end/91421
764 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
765 of a built_in_function.
766 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
767
77eb117f
JJ
7682019-08-10 Jakub Jelinek <jakub@redhat.com>
769
770 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
771 (c_parser_omp_clause_device_type): New function.
772 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
773 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
774 (c_parser_omp_declare_target): Handle device_type clauses. Remove
775 diagnostics for declare target with clauses nested in clause-less
776 declare target declaration-definition-seq.
777 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
778
2c3b8bad
JJ
7792019-08-09 Jakub Jelinek <jakub@redhat.com>
780
bb522e2e
JJ
781 * c-parser.c (check_no_duplicate_clause): Simplify using
782 omp_find_clause.
783 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
784 directive name modifiers.
785 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
786
2c3b8bad
JJ
787 PR c/91401
788 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
789 check_no_duplicate_clause call. Comment it out, instead emit a
790 warning for duplicate dist_schedule clauses.
791
99769e7f
RS
7922019-08-08 Richard Sandiford <richard.sandiford@arm.com>
793
794 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
795
8860d270
JJ
7962019-08-08 Jakub Jelinek <jakub@redhat.com>
797
798 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
799 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
800 instead of generic_head to track duplicates.
801
398e3feb
JJ
8022019-08-07 Jakub Jelinek <jakub@redhat.com>
803
804 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
805 (c_parser_omp_clause_use_device_addr): New function.
806 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
807 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
808 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
809 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
810 map or use_device_* clauses.
811 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
812 in OpenMP, require pointer type rather than pointer or array type.
813 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
814
a28351e7
JJ
8152019-07-31 Jakub Jelinek <jakub@redhat.com>
816
817 PR c/91192
818 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
819 even if finish is UNKNOWN_LOCATION, just use start as finish in that
820 case.
821
6343b6bf
ML
8222019-07-25 Martin Liska <mliska@suse.cz>
823 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
824
825 PR c++/23383
826 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
827
cb50701e
ML
8282019-07-25 Martin Liska <mliska@suse.cz>
829
830 * c-decl.c (merge_decls): Use new macros
831 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
832
62e3e66f
RB
8332019-07-23 Richard Biener <rguenther@suse.de>
834
835 PR tree-optimization/83518
836 * gimple-parser.c (c_parser_parse_gimple_body): When we have
837 a CFG also rebuild cgraph edges.
838
554a530f
JJ
8392019-07-20 Jakub Jelinek <jakub@redhat.com>
840
841 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
842 (c_parser_omp_clause_bind): New function.
843 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
844 (OMP_LOOP_CLAUSE_MASK): Define.
845 (c_parser_omp_loop): New function.
846 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
847 loop combined with parallel or teams.
848 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
849 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
850
d119bf79
RS
8512019-07-18 Richard Sandiford <richard.sandiford@arm.com>
852
853 PR c/53633
854 * c-decl.c (finish_function): Check targetm.warn_func_return
855 before issuing a -Wreturn-type warning.
856
ab20d992 8572019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
858
859 * gimple-parser.c (c_parser_gimple_try_stmt): New.
860 (c_parser_compound_statement): Call it.
861
1fdd6f04
JJ
8622019-07-12 Jakub Jelinek <jakub@redhat.com>
863
864 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
865 (c_parser_omp_clause_order): New function.
866 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
867 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
868 PRAGMA_OMP_CLAUSE_ORDER.
869 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
870
8389386c
RB
8712019-07-10 Richard Biener <rguenther@suse.de>
872
873 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
874 _Literal (int *) &x for address literals.
875
99b1c316
MS
8762019-07-09 Martin Sebor <msebor@redhat.com>
877
878 PR c++/61339
879 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
880 to class.
881 (field_decl_cmp): Same.
882 * c-parser.c (c_parser_struct_or_union_specifier): Same.
883 * c-tree.h: Same.
884 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
885
6c1dae73
MS
8862019-07-09 Martin Sebor <msebor@redhat.com>
887
888 PR c++/61339
889 * c-decl.c: Change class-key from class to struct and vice versa
890 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
891 * gimple-parser.c: Same.
892
69b5279e
RB
8932019-07-01 Richard Biener <rguenther@suse.de>
894
895 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
896 _Literal (char *) &"foo" for address literals pointing to
897 STRING_CSTs.
898
ab20d992
JJ
8992019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
900
901 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
902 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
903 C incompatibility if alternate "__intN__" form is used.
904
1e3d475e
MS
9052019-06-24 Martin Sebor <msebor@redhat.com>
906
907 * c-typeck.c (build_binary_op): Hyphenate floating-point.
908
bf38f7e9
JJ
9092019-06-10 Jakub Jelinek <jakub@redhat.com>
910
911 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
912 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
913 (c_parser_omp_scan_loop_body): New function.
914 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
915 inscan reduction clauses.
916 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
917 non-inscan reductions on the same construct, or inscan reductions with
918 ordered or schedule clauses, or inscan array reductions.
919
65985d78
MS
9202019-06-05 Martin Sebor <msebor@redhat.com>
921
922 PR c/90737
923 * c-typeck.c (c_finish_return): Only consider functions returning
924 pointers as candidates for -Wreturn-local-addr.
925
0ecf545c
MS
9262019-06-05 Martin Sebor <msebor@redhat.com>
927
928 * c-decl.c (start_decl): Adjust quoting and hyphenation
929 in diagnostics.
930 (finish_decl): Same.
931 (finish_enum): Same.
932 (start_function): Same.
933 (declspecs_add_type): Same.
934 * c-parser.c (warn_for_abs): Same.
935 * c-typeck.c (build_binary_op): Same.
936
e03436e7
TS
9372019-05-17 Thomas Schwinge <thomas@codesourcery.com>
938
b48f44bf
TS
939 PR c/89433
940 * c-parser.c (c_finish_oacc_routine): Rework checking if already
941 marked with an OpenACC 'routine' directive.
942
5bf04509
TS
943 PR c/89433
944 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
945 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
946
e03436e7
TS
947 PR c/89433
948 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
949 clauses from "omp declare target" attribute.
950
a9c697b8
MS
9512019-05-16 Martin Sebor <msebor@redhat.com>
952
ab20d992
JJ
953 * c-decl.c (start_decl): Quote keywords, operators, and
954 types in diagnostics.
955 (finish_decl): Same.
956 * c-parser.c (c_parser_asm_statement): Same.
957 (c_parser_conditional_expression): Same.
958 (c_parser_transaction_cancel): Same.
959 * c-typeck.c (c_common_type): Same.
960 (build_conditional_expr): Same.
961 (digest_init): Same.
962 (process_init_element): Same.
963 (build_binary_op): Same.
a9c697b8 964
c4499192
RB
9652019-05-17 Richard Biener <rguenther@suse.de>
966
967 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
968 (c_parser_gimple_unary_expression): Likewise.
969 (c_parser_gimple_parentized_ternary_expression): New function.
970
adfe6e4b
RB
9712019-05-16 Richard Biener <rguenther@suse.de>
972
973 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
974 (c_parser_gimple_unary_expression): Likewise.
975
186dabf2
RB
9762019-05-15 Richard Biener <rguenther@suse.de>
977
978 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
979 __BIT_FIELD_REF.
980
1158c5b4
RB
9812019-05-14 Richard Biener <rguenther@suse.de>
982
983 * gimple-parser.c (c_parser_gimple_statement): Remove
984 questionable auto-promotion to VIEW_CONVERT_EXPR.
985 (c_parser_gimple_typespec): Split out from __MEM parsing.
986 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
987 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
988 as __VIEW_CONVERT with -gimple.
989
fd4485aa
ML
9902019-05-09 Martin Liska <mliska@suse.cz>
991
992 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
993 __MAX.
994 (c_parser_gimple_unary_expression): Parse also binary expression
995 __MIN and __MAX.
996 (c_parser_gimple_parentized_binary_expression): New function.
997
d276406a
ML
9982019-05-09 Martin Liska <mliska@suse.cz>
999
1000 * gimple-parser.c (struct gimple_parser): Add probability.
1001 for gimple_parser_edge.
1002 (gimple_parser::push_edge): Add new argument probability.
1003 (c_parser_gimple_parse_bb_spec): Parse also probability
1004 if present.
1005 (c_parser_parse_gimple_body): Set edge probability.
1006 (c_parser_gimple_compound_statement): Consume token
1007 before calling c_parser_gimple_goto_stmt.
1008 Parse BB counts.
1009 (c_parser_gimple_statement): Pass new argument.
1010 (c_parser_gimple_goto_stmt): Likewise.
1011 (c_parser_gimple_if_stmt): Likewise.
1012 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1013 * c-parser.c (c_parser_declaration_or_fndef): Pass
1014 hot_bb_threshold argument.
1015 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1016 field.
1017 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1018
f179b64e
JJ
10192019-04-26 Jakub Jelinek <jakub@redhat.com>
1020
1021 PR debug/90197
1022 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1023 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1024 (c_parser_do_statement): Likewise.
1025 (c_parser_for_statement): Likewise. Formatting fixes.
1026 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1027 emit DEBUG_BEGIN_STMTs if needed.
1028
e7178413
JJ
10292019-04-19 Jakub Jelinek <jakub@redhat.com>
1030
c280b7ee
JJ
1031 PR c/89888
1032 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1033 (c_start_case): Don't clear it.
1034 (do_case): Adjust c_add_case_label caller.
1035 (c_finish_case): Adjust c_do_switch_warnings caller.
1036
e7178413
JJ
1037 PR c++/90108
1038 * c-decl.c (merge_decls): If remove is main variant and
1039 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1040 variant that has newdecl as TYPE_NAME if any.
1041
60a2c645
JJ
10422019-04-12 Jakub Jelinek <jakub@redhat.com>
1043
1044 PR c/89933
1045 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1046 don't try to remove it from the variant list, but instead assert
1047 it has no variants.
1048
2a82beaa
RB
10492019-04-01 Richard Biener <rguenther@suse.de>
1050
1051 PR c/71598
1052 * c-tree.h (c_get_alias_set): Declare.
1053 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1054 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1055 as the underlying integer type.
1056
bec1da64
MS
10572019-03-19 Martin Sebor <msebor@redhat.com>
1058
1059 PR tree-optimization/89688
1060 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1061 kinds of initializers.
1062
855cd9b1
JJ
10632019-03-19 Jakub Jelinek <jakub@redhat.com>
1064
1065 PR c/89734
1066 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1067 return type even if quals_used is 0. Formatting fixes.
1068
baa09dc5
RB
10692019-03-14 Richard Biener <rguenther@suse.de>
1070
1071 * c-tree.h (enum c_declspec_il): New.
1072 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1073 enum bitfield.
1074 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1075 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1076 (c_parser_declspecs): Adjust.
1077 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1078 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1079 and bitmap.h.
1080 (struct gimple_parser): New.
1081 (gimple_parser::push_edge): New method.
1082 (c_parser_gimple_parse_bb_spec): New helper.
1083 (c_parser_parse_gimple_body): Get start pass and IL specification.
1084 Initialize SSA and CFG.
1085 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1086 Build a gimple_parser parsing state and pass it along.
1087 (c_parser_gimple_statement): Change intermittend __PHI internal
1088 function argument for the edge.
1089 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1090 (c_parser_gimple_goto_stmt): Record edges to build.
1091 (c_parser_gimple_if_stmt): Likewise.
1092 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1093 (c_parser_gimple_or_rtl_pass_list): Likewise.
1094
a3f9f006
ML
10952019-03-11 Martin Liska <mliska@suse.cz>
1096
1097 * c-decl.c (check_for_loop_decls): Wrap an option name
1098 in a string format message and fix GNU coding style.
1099 * c-parser.c (c_parser_declspecs): Likewise.
1100
1db01ff9
JJ
11012019-03-08 Jakub Jelinek <jakub@redhat.com>
1102
1103 PR tree-optimization/89550
1104 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1105 returned true.
1106 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1107 or warning returned true.
1108
66dcb747
JJ
11092019-02-28 Jakub Jelinek <jakub@redhat.com>
1110
1111 PR c/89525
1112 * c-typeck.c (convert_arguments): Call inform_declaration only if
1113 the previous warning_at call returned true.
1114
2263c9f2
TS
11152019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1116
1117 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1118 parameter. Adjust all users.
1119 (c_parser_oacc_simple_clause): Replace parser with loc formal
1120 parameter. Adjust all users.
1121
ab20d992 11222019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1123
1124 PR c/87924
1125 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1126 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1127
5f88ba10
JJ
11282019-02-15 Jakub Jelinek <jakub@redhat.com>
1129
1130 PR c/89340
1131 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1132 before c_decl_attributes rather than after it.
1133
cfc30fd1
JJ
11342019-02-06 Jakub Jelinek <jakub@redhat.com>
1135
1136 PR c/89211
1137 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1138 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1139 instead of 3 nested ifs.
1140
fbe83e6b
JM
11412019-02-06 Joseph Myers <joseph@codesourcery.com>
1142
1143 PR c/88584
1144 * c-decl.c (finish_decl): Do not complete array types for arrays
1145 with external linkage not at file scope.
1146
f461f938
RB
11472019-02-05 Richard Biener <rguenther@suse.de>
1148
1149 PR c/88606
1150 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1151 all type variants when not supported.
1152
fe509359
JJ
11532019-01-30 Jakub Jelinek <jakub@redhat.com>
1154
1155 PR c/89061
1156 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1157 * c-decl.c (decl_jump_unsafe): Return false for
1158 C_DECL_COMPOUND_LITERAL_P decls.
1159 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1160
6a335b96
JJ
11612019-01-29 Jakub Jelinek <jakub@redhat.com>
1162
f4b7e754
JJ
1163 PR c/89045
1164 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1165 scope.
1166
6a335b96
JJ
1167 PR c/86125
1168 * c-decl.c (last_fileptr_type): Remove.
1169 (last_structptr_types): New variable.
1170 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1171 {old,new}rettype instead of the types themselves. Assert
1172 last_structptr_types array has the same number of elements
1173 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1174 argument oldtype and newtype. Instead of handling
1175 just fileptr_type_node specially, handle all builtin_structptr_types
1176 pointer nodes. Formatting fix.
1177
d8b5a1a0
MS
11782019-01-24 Martin Sebor <msebor@redhat.com>
1179
1180 PR c/86125
1181 PR c/88886
1182 PR middle-end/86308
1183 * c-decl.c (match_builtin_function_types): Add arguments.
1184 (diagnose_mismatched_decls): Diagnose mismatched declarations
1185 of built-ins more strictly.
1186
e21c4491
JJ
11872019-01-24 Jakub Jelinek <jakub@redhat.com>
1188
1189 PR c++/88976
1190 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1191 on #pragma omp cancel with different modifiers.
1192
420183d9
L
11932019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1194
1195 PR c/51628
1196 PR c/88664
1197 * c-typeck.c (convert_for_assignment): Upate the
1198 warn_for_address_or_pointer_of_packed_member call.
1199
17ad43dd
TH
12002019-01-16 Tom Honermann <tom@honermann.net>
1201 Jason Merrill <jason@redhat.com>
1202
1203 * c-typeck.c (digest_init): Revised the error message produced for
1204 ill-formed cases of array initialization with a string literal.
1205 (error_init): Make variadic.
1206
5f07d78a
JJ
12072019-01-12 Jakub Jelinek <jakub@redhat.com>
1208
1209 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1210
c4581bbf
JJ
12112019-01-07 Jakub Jelinek <jakub@redhat.com>
1212
1213 PR c/88701
1214 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1215 if current_function_decl is non-NULL.
1216
65c5b1eb
JM
12172019-01-07 Joseph Myers <joseph@codesourcery.com>
1218
1219 PR c/88720
1220 PR c/88726
1221 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1222 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1223 functions declared but never defined only for external scope, not
1224 for other scopes.
1225
d8fcab68
JJ
12262019-01-07 Jakub Jelinek <jakub@redhat.com>
1227
1228 PR c++/85052
1229 * c-parser.c (c_parser_postfix_expression): Parse
1230 __builtin_convertvector.
1231
a5544970
JJ
12322019-01-01 Jakub Jelinek <jakub@redhat.com>
1233
1234 Update copyright years.
1235
da77eace
L
12362018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1237
1238 PR c/51628
1239 * c-typeck.c (convert_for_assignment): Call
1240 warn_for_address_or_pointer_of_packed_member.
1241
1edf8866
SB
12422018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1243
1244 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1245 a more specific error message (instead of just falling through).
1246
db4fd626
SB
12472018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1248
1249 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1250 asm qualifier is first seen; use that to give nicer "duplicate asm
1251 qualifier" messages. Delete 'quals" variable, instead pass the
1252 "is_volatile_ flag to build_asm_stmt directly.
1253 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1254 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1255
9c9cfcbb
SB
12562018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1257
1258 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1259 "done" boolean variable.
1260
a14feb3c
DM
12612018-12-19 David Malcolm <dmalcolm@redhat.com>
1262
1263 PR c++/87504
1264 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1265 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1266 (build_binary_op): Use struct op_location_t and
1267 class binary_op_rich_location.
1268
6d939173
JJ
12692018-12-11 Jakub Jelinek <jakub@redhat.com>
1270
1271 PR sanitizer/88426
1272 * c-convert.c (convert): Call c_fully_fold before calling
1273 ubsan_instrument_float_cast.
1274
b7055028
SB
12752018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1276
1277 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1278 setting "quals".
1279
5b76e75f
SB
12802018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1281
1282 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1283 after asm. Pass a flag for it to build_asm_expr.
1284 * c-tree.h (build_asm_expr): Update declaration.
1285 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1286 set ASM_INLINE_P.
1287
30bd42b9
SB
12882018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1289
1290 PR inline-asm/55681
1291 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1292 combination of volatile and goto, in any order, without repetitions.
1293
9df6c0e4
JB
12942018-12-04 James Norris <jnorris@codesourcery.com>
1295 Cesar Philippidis <cesar@codesourcery.com>
1296 Julian Brown <julian@codesourcery.com>
1297
1298 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1299 code.
1300
f44697b7
RB
13012018-11-30 Richard Biener <rguenther@suse.de>
1302
1303 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1304 _Literal (type) { ... } as empty aggregate or vector constructor.
1305
550dfbdc
MS
13062018-11-29 Martin Sebor <msebor@redhat.com>
1307
1308 PR c/88091
1309 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1310 (convert_arguments): Add comments. Pass additional argument to
1311 the function above.
1312
673670da
MS
13132018-11-29 Martin Sebor <msebor@redhat.com>
1314
1315 PR c/88172
1316 PR testsuite/88208
1317 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1318
db1d09b0
MS
13192018-11-23 Martin Sebor <msebor@redhat.com>
1320
1321 PR testsuite/88098
1322 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1323 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1324
98f08eb8
MS
13252018-11-20 Martin Sebor <msebor@redhat.com>
1326
1327 * c-parser.c (c_parser_has_attribute_expression): New function.
1328 (c_parser_attribute): New function.
1329 (c_parser_attributes): Move code into c_parser_attribute.
1330 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1331
cd5da983
MS
13322018-11-15 Martin Sebor <msebor@redhat.com>
1333
1334 PR c/83656
1335 * c-decl.c (header_for_builtin_fn): Declare.
1336 (diagnose_mismatched_decls): Diagnose declarations of built-in
1337 functions without a prototype.
1338 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1339 (convert_argument): Same.
1340 (convert_arguments): Factor code out into convert_argument.
1341 Detect mismatches between built-in formal arguments in calls
1342 to built-in without prototype.
1343 (build_conditional_expr): Same.
1344 (type_or_builtin_type): New function.
1345 (convert_for_assignment): Add argument. Conditionally issue
1346 warnings instead of errors for mismatches.
1347
620e594b
DM
13482018-11-13 David Malcolm <dmalcolm@redhat.com>
1349
1350 * c-decl.c: Replace "source_location" with "location_t".
1351 * c-tree.h: Likewise.
1352 * c-typeck.c: Likewise.
1353 * gimple-parser.c: Likewise.
1354
3179ebae
JJ
13552018-11-09 Jakub Jelinek <jakub@redhat.com>
1356
81a227c6
JJ
1357 * c-parser.c (c_parser_omp_clause_final): Use
1358 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1359 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1360 parsing instead of c_parser_paren_condition.
1361 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1362 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1363 c_fully_fold instead of c_parser_condition.
1364 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1365 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1366 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1367 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1368 c_parser_expr_no_commas instead of c_parser_expression.
1369
98c91c56
JJ
1370 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1371 reduction clause with inscan modifier.
1372
3179ebae
JJ
1373 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1374 clauses other than atomic_default_mem_order.
1375
28567c40
JJ
13762018-11-08 Jakub Jelinek <jakub@redhat.com>
1377
1378 * c-parser.c: Include memmode.h.
1379 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1380 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1381 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1382 task_reduction clauses.
1383 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1384 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1385 section, or lvalue assignment expression.
1386 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1387 (c_parser_omp_clause_lastprivate): Parse optional
1388 conditional: modifier.
1389 (c_parser_omp_clause_hint): Require constant integer expression rather
1390 than just integer expression.
1391 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1392 clause.
1393 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1394 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1395 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1396 functions.
1397 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1398 iterators. Parse mutexinoutset and depobj kinds.
1399 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1400 callers.
1401 (c_parser_omp_all_clauses): Likewise. Handle
1402 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1403 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1404 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1405 default memory order from requires directive if any. Adjust
1406 c_finish_omp_atomic caller.
1407 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1408 (c_parser_omp_flush): Parse flush with memory-order-clause.
1409 (c_parser_omp_for_loop): Allow NE_EXPR even in
1410 OpenMP loops, adjust c_finish_omp_for caller.
1411 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1412 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1413 Allow to be called while parsing combined parallel master.
1414 Parse combined master taskloop{, simd}.
1415 (c_parser_omp_parallel): Parse combined
1416 parallel master{, taskloop{, simd}} constructs.
1417 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1418 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1419 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1420 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1421 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1422 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1423 around teams body. Use SET_EXPR_LOCATION.
1424 (c_parser_omp_target_data): Allow target data
1425 with only use_device_ptr clauses.
1426 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1427 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1428 (c_parser_omp_requires): New function.
1429 (c_finish_taskloop_clauses): New function.
1430 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1431 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1432 declaration. Disallow in_reduction clause when combined with parallel
1433 master.
1434 (c_parser_omp_construct): Adjust c_parser_omp_master and
1435 c_parser_omp_taskgroup callers.
1436 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1437 other than cancel.
1438 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1439 like OMP_CLAUSE_REDUCTION.
1440 (handle_omp_array_sections): Likewise. Call save_expr on array
1441 reductions before calling build_index_type. Handle depend clauses
1442 with iterators.
1443 (struct c_find_omp_var_s): New type.
1444 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1445 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1446 with static, runtime or auto schedule kinds. Call save_expr for whole
1447 array reduction sizes. Diagnose reductions with zero sized elements
1448 or variable length structures. Diagnose nogroup clause used with
1449 reduction clause(s). Handle depend clause with
1450 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1451 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1452 some different type for other kinds. Use build_unary_op with
1453 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1454 Handle depend clauses with iterators. Remove no longer needed special
1455 case that predetermined const qualified vars may be specified in
1456 firstprivate clause. Complain if const qualified vars are mentioned
1457 in data-sharing clauses other than firstprivate or shared. Use
1458 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1459 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1460 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1461 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1462
7e2de6df
DM
14632018-10-29 David Malcolm <dmalcolm@redhat.com>
1464
1465 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1466 logic for change to name_hint::operator bool.
1467 (undeclared_variable): Likewise.
1468 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1469 (c_parser_parameter_declaration): Likewise.
1470
9f936c86
JM
14712018-10-17 Joseph Myers <joseph@codesourcery.com>
1472
1473 * c-errors.c (pedwarn_c11): New function.
1474 * c-parser.c (disable_extension_diagnostics): Save
1475 warn_c11_c2x_compat and set it to 0.
1476 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1477 (c_parser_static_assert_declaration_no_semi): Handle
1478 _Static_assert without string constant.
1479 * c-tree.h (pedwarn_c11): New prototype.
1480
033eb567
DM
14812018-10-17 David Malcolm <dmalcolm@redhat.com>
1482
1483 * Make-lang.in (selftest-c): New.
1484 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1485 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1486 from gcc/Makefile.in.
1487
0edf3afe
RB
14882018-10-02 Richard Biener <rguenther@suse.de>
1489
1490 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1491
8313a764
JM
14922018-09-26 Joseph Myers <joseph@codesourcery.com>
1493
1494 PR c/87390
1495 * c-typeck.c (build_binary_op): Use excess precision for
1496 comparisons of integers and floating-point for C11 and later.
1497
ce6f0888
MJ
14982018-09-26 Martin Jambor <mjambor@suse.cz>
1499
1500 PR c/87347
1501 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1502 comment.
ce6f0888 1503
9c4a4b3c
DM
15042018-09-17 David Malcolm <dmalcolm@redhat.com>
1505
1506 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1507 Update for new param.
1508 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1509 Likewise.
1510
80c6d1f4
MJ
15112018-09-17 Martin Jambor <mjambor@suse.cz>
1512
1513 PR c/63886
1514 * c-parser.c: (warn_for_abs): New function.
1515 (c_parser_postfix_expression_after_primary): Call it.
1516
4a426e36
BE
15172018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1518
1519 * c-typeck.c (digest_init): Shorten overlength strings.
1520
6d900107
BE
15212018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1522
1523 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1524
b5764229
BE
15252018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1526
1527 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1528 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1529
22eea6b2
AM
15302018-08-30 Alexander Monakov <amonakov@ispras.ru>
1531
1532 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1533 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1534
85204e23
DM
15352018-08-27 David Malcolm <dmalcolm@redhat.com>
1536
1537 PR 87091
1538 * c-decl.c (implicitly_declare): Update call to
1539 maybe_add_include_fixit to suggest overriding the location, as it
1540 is for a note.
1541 * c-objc-common.c (c_tree_printer): Update for conversion of
1542 show_caret_p to a tri-state.
1543
3d78e008
ML
15442018-08-27 Martin Liska <mliska@suse.cz>
1545
1546 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1547 fndecl_built_in_p and remove check for FUNCTION_DECL if
1548 possible.
3d78e008
ML
1549 (diagnose_mismatched_decls): Likewise.
1550 (merge_decls): Likewise.
1551 (warn_if_shadowing): Likewise.
1552 (pushdecl): Likewise.
1553 (implicitly_declare): Likewise.
1554 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1555 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1556 * c-typeck.c (build_function_call_vec): Likewise.
1557 (convert_arguments): Likewise.
1558
097f82ec
DM
15592018-08-20 David Malcolm <dmalcolm@redhat.com>
1560
1561 PR other/84889
1562 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1563 (diagnose_mismatched_decls): Likewise, in various places.
1564 (warn_if_shadowing): Likewise.
1565 (implicit_decl_warning): Likewise.
1566 (implicitly_declare): Likewise.
1567 (undeclared_variable): Likewise.
1568 (declare_label): Likewise.
1569 (grokdeclarator): Likewise.
1570 (start_function): Likewise.
1571 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1572 (c_parser_parameter_declaration): Likewise.
1573 (c_parser_binary_expression): Likewise.
1574 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1575 (parser_build_binary_op): Likewise.
1576 (build_unary_op): Likewise.
1577 (error_init): Likewise.
1578 (pedwarn_init): Likewise.
1579 (warning_init): Likewise.
1580 (convert_for_assignment): Likewise.
1581
96e6ae57
DM
15822018-08-15 David Malcolm <dmalcolm@redhat.com>
1583
1584 * c-objc-common.c: Include "gcc-rich-location.h".
1585 (c_tree_printer): Move implemenation of '%T' to...
1586 (print_type): ...this new function.
1587 (range_label_for_type_mismatch::get_text): New function.
1588 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1589 range for the various ic_argpass cases.
1590 (class maybe_range_label_for_tree_type_mismatch): New class.
1591 (build_binary_op): Use it when calling binary_op_error.
1592
0cd020ae 15932018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1594
0cd020ae
PK
1595 * c-decl.c (start_decl): Do not warn if variables is named as main
1596 and is a local variable.
1597
72733314
IS
15982018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1599
1600 PR c/19315
1601 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1602 objects of unknown size.
1603
23aa9f7c
MS
16042018-08-13 Martin Sebor <msebor@redhat.com>
1605
1606 PR tree-optimization/71625
1607 * c-parser.c (c_parser_declaration_or_fndef): Call
1608 braced_list_to_string.
1609
e5e7e50d
BH
16102018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1611
1612 PR c/86690
1613 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1614 errors.
1615
8a45b051
MS
16162018-08-01 Martin Sebor <msebor@redhat.com>
1617
1618 PR tree-optimization/86650
1619 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1620 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1621
5922dcb5
JJ
16222018-08-01 Jakub Jelinek <jakub@redhat.com>
1623
1624 PR c/85704
1625 * c-typeck.c (init_field_decl_cmp): New function.
1626 (output_pending_init_elements): Use it for field comparisons
1627 instead of pure bit_position comparisons.
1628
9b452033
JJ
16292018-07-12 Jakub Jelinek <jakub@redhat.com>
1630
1631 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1632 type here, instead add "omp declare target implicit" attribute.
1633 (finish_decl): Diagnose vars without mappable type here.
1634
ab20d992
JJ
16352018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1636 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1637 Cesar Philippidis <cesar@codesourcery.com>
1638
1639 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1640 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1641 to their non-present_or_* counterparts. Make 'self' an alias to
1642 PRAGMA_OACC_CLAUSE_HOST.
1643 (c_parser_oacc_data_clause): Update GOMP mappings for
1644 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1645 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1646 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1647 Remove support for present_or_* clauses.
1648 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1649 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1650 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1651 (OACC_DATA_CLAUSE_MASK): Likewise.
1652 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1653 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1654 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1655 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1656 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1657
e197e64e
KV
16582018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1659
1660 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1661 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1662 (c_parser_gimple_unary_expression): Likewise.
1663
487f2f61
JJ
16642018-06-15 Jakub Jelinek <jakub@redhat.com>
1665
1666 PR c/86093
1667 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1668 before doing POINTER_DIFF_EXPR.
1669
e4d44a37
MP
16702018-06-07 Marek Polacek <polacek@redhat.com>
1671
1672 PR c/85318
1673 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1674 for loop initial declarations.
1675
b67b9225
DP
16762018-05-30 David Pagan <dave.pagan@oracle.com>
1677
1678 PR c/55976
1679 * c-decl.c (grokdeclarator): Update check for return type warnings.
1680 (start_function): Likewise.
1681 (finish_function): Likewise.
1682 * c-typeck.c (c_finish_return): Update check for return type warnings.
1683 Pass OPT_Wreturn_type to pedwarn when appropriate.
1684
c566cc9f
RS
16852018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1686
1687 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1688 __FMA_EXPR handlng.
1689
e4f81565
RS
16902018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1691
1692 * gimple-parser.c: Include internal-fn.h.
1693 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1694 (c_parser_gimple_call_internal): New function.
1695 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1696 Fix typos in comment.
1697
79e7b1fe
JJ
16982018-05-10 Jakub Jelinek <jakub@redhat.com>
1699
1700 PR c++/85662
1701 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1702 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1703 fold_convert_loc.
1704 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1705 fold_offsetof_1, pass argtype as TYPE to it and drop the
1706 fold_convert_loc.
1707
f7584c81
DP
17082018-05-02 David Pagan <dave.pagan@oracle.com>
1709
1710 PR c/30552
1711 * c-decl.c (old_style_parameter_scope): New function.
1712 * c-parser.c (c_parser_postfix_expression): Check for statement
1713 expressions in old-style function parameter list declarations.
1714 * c-parser.h (old_style_parameter_scope): New extern declaration.
1715
b33a0cb3
JJ
17162018-04-25 Jakub Jelinek <jakub@redhat.com>
1717
1718 PR sanitizer/84307
1719 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1720 it is not TREE_STATIC.
1721 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1722 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1723 its COMPOUND_LITERAL_EXPR_DECL.
1724
c5c5822a
JM
17252018-03-21 Joseph Myers <joseph@codesourcery.com>
1726
1727 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1728 where all functions return the same _FloatN or _FloatNx type,
1729 treat integer types as _Float64 instead of double.
1730
aa1c9429
JJ
17312018-03-21 Jakub Jelinek <jakub@redhat.com>
1732
1733 PR c/84999
1734 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1735 building vector comparison, diagnose it and return error_mark_node.
1736
9bb45a95
JJ
17372018-03-15 Jakub Jelinek <jakub@redhat.com>
1738
1739 PR c/84853
1740 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1741 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1742 INTEGER_TYPE element type.
1743
ada6bad9
DP
17442018-03-13 David Pagan <dave.pagan@oracle.com>
1745
1746 PR c/46921
1747 * c-typeck.c (output_init_element): Ensure field initializer
1748 expression is always evaluated if there are side effects.
1749
849bbdb9
JJ
17502018-03-06 Jakub Jelinek <jakub@redhat.com>
1751
1752 PR c/84721
1753 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1754 !building_stmt_list_p ().
1755
d74641bd
RS
17562018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1757
1758 PR c/84305
1759 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1760 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1761 and include the BIND_EXPR in the list of things that need to be
1762 pre-evaluated.
1763
0444aa9c
NS
17642018-02-09 Nathan Sidwell <nathan@acm.org>
1765
1766 PR c/84293
1767 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1768 to strict_aliasing_warning.
1769
7c30b12a
PC
17702018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1771
1772 * c-typeck.c (really_start_incremental_init, push_init_level,
1773 set_nonincremental_init, output_init_element, process_init_element):
1774 Use DECL_UNNAMED_BIT_FIELD.
1775
2be4dfcb
MP
17762018-01-31 Marek Polacek <polacek@redhat.com>
1777
1778 PR c/81779
1779 * c-parser.c (c_parser_compound_statement_nostart): Call
1780 expansion_point_location_if_in_system_header.
1781
bb9869d5
DM
17822018-01-17 David Malcolm <dmalcolm@redhat.com>
1783
1784 PR c++/83814
1785 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1786 the C part.
1787
b4923738
JJ
17882018-01-13 Jakub Jelinek <jakub@redhat.com>
1789
1790 PR c/83801
1791 * c-tree.h (decl_constant_value_1): Add a bool argument.
1792 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1793 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1794 (decl_constant_value): Adjust caller.
1795 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1796 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1797 decl_constant_value returns initializer that has BLKmode or
1798 array type.
1799 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1800
928686b1
RS
18012018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1802 Alan Hayward <alan.hayward@arm.com>
1803 David Sherwood <david.sherwood@arm.com>
1804
1805 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1806 TYPE_VECTOR_SUBPARTS.
1807
85ec4feb
JJ
18082018-01-03 Jakub Jelinek <jakub@redhat.com>
1809
1810 Update copyright years.
1811
913884f7
JJ
18122018-01-01 Jakub Jelinek <jakub@redhat.com>
1813
1814 PR c/83595
1815 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1816 c_parser_conditional_expression, c_parser_cast_expression,
1817 c_parser_sizeof_expression, c_parser_alignof_expression,
1818 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1819 c_parser_transaction_expression): Use set_error () method instead
1820 of setting value member to error_mark_node.
1821
c6cfa2bf
MM
18222017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1823
1824 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1825 and _Float<N>X built-in functions.
1826
11d29d63
JJ
18272017-12-22 Jakub Jelinek <jakub@redhat.com>
1828
14ec014e
JJ
1829 PR debug/83550
1830 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1831 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1832 incomplete vars rather than after it.
1833
11d29d63
JJ
1834 PR debug/83547
1835 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1836 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1837 and consider empty ones if there are no other stmts. For
1838 -Wunused-value walk all statements before the one only followed by
1839 DEBUG_BEGIN_STMTs.
1840
170a8bd6 18412017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1842 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1843
1844 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1845 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1846 (c_parser_do_statement): Likewise.
1847 (c_parser_for_statement): Likewise.
1848 (c_parser_statement_after_labels): Adjust calls to above.
1849 (c_parse_pragma_ivdep): New static function.
1850 (c_parser_pragma_unroll): Likewise.
1851 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1852 <PRAGMA_UNROLL>: New case.
1853
01512446
JJ
18542017-12-19 Jakub Jelinek <jakub@redhat.com>
1855
1856 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1857 perform_integral_promotions, digest_init): Replace Yoda conditions
1858 with typical order conditions.
1859 * c-decl.c (check_bitfield_type_and_width): Likewise.
1860
c65e18d3
BE
18612017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1862
1863 * c-typeck.c (c_safe_arg_type_equiv_p,
1864 c_safe_function_type_cast_p): New function.
1865 (build_c_cast): Implement -Wcast-function-type.
1866
b7280579
RB
18672017-12-14 Richard Biener <rguenther@suse.de>
1868
1869 PR c/83415
1870 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1871 like REALPART_EXPR for the behavior of whether its operand
1872 is an lvalue.
1873
49e6a6c0
MP
18742017-12-12 Marek Polacek <polacek@redhat.com>
1875
1876 PR c/82679
1877 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1878
ab20d992 18792017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1880
1881 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1882 * c-parser.c (add_debug_begin_stmt): New.
1883 (c_parser_declaration_or_fndef): Call it.
1884 (c_parser_compound_statement_nostart): Likewise.
1885 (c_parser_statement_after_labels): Likewise.
1886 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1887
4b2b493f
JM
18882017-12-07 Joseph Myers <joseph@codesourcery.com>
1889
1890 * c-decl.c (build_compound_literal): Add parameter alignas_align
1891 and set alignment of decl if nonzero.
1892 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1893 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1894 qualifier.
1895 (c_parser_struct_declaration): Update syntax comment.
1896 (c_parser_type_name): Add alignas_ok argument and pass it to
1897 c_parser_declspecs.
1898 (c_parser_cast_expression): Pass true to c_parser_type_name and
1899 give error if a cast used an _Alignas specifier.
1900 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1901 give error if sizeof (type-name) used an _Alignas specifier.
1902 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1903 give error if _Alignof (type-name) used an _Alignas specifier.
1904 (c_parser_postfix_expression_after_paren_type): Check specified
1905 alignment for a compound literal and pass it to
1906 build_compound_literal.
1907 * c-parser.h (c_parser_type_name): Update prototype.
1908 * c-tree.h (build_compound_literal): Update prototype.
1909
5d9ae53d
MS
19102017-12-07 Martin Sebor <msebor@redhat.com>
1911
1912 PR c/81544
1913 * c-decl.c (c_decl_attributes): Look up existing declaration and
1914 pass it to decl_attributes.
1915
c79144f8
DM
19162017-12-06 David Malcolm <dmalcolm@redhat.com>
1917
1918 PR c/83236
1919 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1920 reserved for use by the implementation.
1921
613bc14f
DM
19222017-12-06 David Malcolm <dmalcolm@redhat.com>
1923
1924 * c-decl.c: Include "c-family/c-spellcheck.h".
1925
05abad4c
ML
19262017-12-05 Martin Liska <mliska@suse.cz>
1927 Jakub Jelinek <jakub@redhat.com>
1928
1929 * c-typeck.c (pointer_diff): Add new argument and instrument
1930 pointer subtraction.
1931 (build_binary_op): Similar for pointer comparison.
1932
cc6534d4
JJ
19332017-12-01 Jakub Jelinek <jakub@redhat.com>
1934
65791f42
JJ
1935 PR c/79153
1936 * c-parser.c: Include tree-iterator.h.
1937 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1938 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1939 on it.
1940
cc6534d4
JJ
1941 PR c/83222
1942 * c-tree.h (decl_constant_value_1): Declare.
1943 * c-typeck.c (decl_constant_value_1): New function.
1944 (decl_constant_value): Use it.
1945 * c-fold.c (c_fully_fold_internal): If in_init, use
1946 decl_constant_value_1 instead of decl_constant_value.
1947
5de73c05
JJ
19482017-11-30 Jakub Jelinek <jakub@redhat.com>
1949
1950 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1951
058f0b9e
JJ
19522017-11-28 Jakub Jelinek <jakub@redhat.com>
1953
1954 PR sanitizer/81275
1955 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1956 c_switch_covers_all_cases_p returns true.
1957
5e9d6aa4 19582017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1959 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1960
1961 * Make-lang.in (c/c-array-notation.o): Remove.
1962 * c-array-notation.c: Delete.
1963 * c-decl.c: Remove cilkplus condition.
1964 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1965 c_parser_cilk_verify_simd, c_parser_array_notation,
1966 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1967 c_parser_cilk_simd_fn_vector_attrs,
1968 c_finish_cilk_simd_fn_tokens): Delete.
1969 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1970 (c_parser_direct_declarator_inner): Ditto.
1971 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1972 (c_parser_attributes, c_parser_compound_statement,
1973 c_parser_statement_after_labels, c_parser_if_statement,
1974 c_parser_switch_statement, c_parser_while_statement,
1975 c_parser_do_statement, c_parser_for_statement,
1976 c_parser_unary_expression, c_parser_postfix_expression,
1977 c_parser_postfix_expression_after_primary,
1978 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1979 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1980 support.
1981 * c-typeck.c (build_array_ref, build_function_call_vec,
1982 convert_arguments,
1983 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1984 c_finish_loop, build_binary_op): Remove cilkplus support.
1985
9e851845
JJ
19862017-11-28 Jakub Jelinek <jakub@redhat.com>
1987
1988 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1989 of build3.
1990
ab20d992 19912017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1992
1993 * Make-lang.in (c.install-plugin): Install backend import library.
1994
41521dee
JJ
19952017-11-23 Jakub Jelinek <jakub@redhat.com>
1996
1997 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1998 pragma_stmt context.
1999
ac9effed
EB
20002017-11-23 Mike Stump <mikestump@comcast.net>
2001 Eric Botcazou <ebotcazou@adacore.com>
2002
2003 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2004 ANNOTATE_EXPR.
2005 (c_parser_do_statement): Likewise.
2006 (c_parser_for_statement): Likewise.
2007
ce95abc4
DM
20082017-11-22 David Malcolm <dmalcolm@redhat.com>
2009
2010 PR c++/62170
2011 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2012 bool to bool *. Within '%T' handling, if showing an "aka", use
2013 "quoted" param to add appropriate quoting.
2014
974aedcc
MP
20152017-11-22 Marek Polacek <polacek@redhat.com>
2016
2017 PR c++/60336
2018 PR middle-end/67239
2019 PR target/68355
2020 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2021
d4300cc6
DM
20222017-11-21 David Malcolm <dmalcolm@redhat.com>
2023
2024 PR c/83056
2025 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2026 earlier failed lookups.
2027
1af4ebf5
MG
20282017-11-21 Marc Glisse <marc.glisse@inria.fr>
2029
2030 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2031 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2032
26edace6
DM
20332017-11-20 David Malcolm <dmalcolm@redhat.com>
2034
2035 PR c/81404
2036 * c-decl.c: Include "c-family/known-headers.h".
2037 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2038 to known-headers.cc.
2039 (class suggest_missing_header): Move to known-header.h.
2040 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2041 than get_c_name_hint.
2042
b1212255
DM
20432017-11-20 David Malcolm <dmalcolm@redhat.com>
2044
2045 * c-decl.c (get_c_name_hint): New function.
2046 (class suggest_missing_header): New class.
2047 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2048 suggest missing headers to the user.
2049
6c7a259b
DM
20502017-11-20 David Malcolm <dmalcolm@redhat.com>
2051
2052 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2053 Include "c-family/name-hint.h"
2054 (implicit_decl_warning): Convert "hint" from
2055 const char * to name_hint. Pass location to
2056 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2057 warning was not printed.
2058 (undeclared_variable): Likewise for "guessed_id".
2059 (lookup_name_fuzzy): Convert return type from const char *
2060 to name_hint. Add location_t param.
2061 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2062 Include "c-family/name-hint.h"
2063 (c_parser_declaration_or_fndef): Convert "hint" from
2064 const char * to name_hint. Pass location to lookup_name_fuzzy.
2065 (c_parser_parameter_declaration): Likewise.
2066
f9c59f7e
JJ
20672017-11-19 Jakub Jelinek <jakub@redhat.com>
2068
2069 PR c/66618
2070 PR c/69960
2071 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2072 where needed.
2073 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2074 handle_omp_array_sections): Likewise.
2075 (digest_init): Don't call decl_constant_value_for_optimization.
2076 * c-tree.h (decl_constant_value_for_optimization): Removed.
2077 * c-fold.c (c_fold_array_ref): New function.
2078 (c_fully_fold_internal): Add LVAL argument, propagate it through
2079 recursive calls. For VAR_P call decl_constant_value and
2080 unshare if not LVAL and either optimizing or IN_INIT. Remove
2081 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2082 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2083 (c_fully_fold): Add LVAL argument, pass it through to
2084 c_fully_fold_internal.
2085 (decl_constant_value_for_optimization): Removed.
2086
3ca0dc60
JM
20872017-11-15 Joseph Myers <joseph@codesourcery.com>
2088
2089 PR c/81156
2090 * c-parser.c (check_tgmath_function): New function.
2091 (enum tgmath_parm_kind): New enum.
2092 (c_parser_postfix_expression): Handle __builtin_tgmath.
2093
64a5912c
DM
20942017-10-31 David Malcolm <dmalcolm@redhat.com>
2095
2096 * c-decl.c (implicit_decl_warning): Update for renaming of
2097 pedwarn_at_rich_loc and warning_at_rich_loc.
2098 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2099 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2100 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2101 (c_parser_struct_or_union_specifier): Likewise for renaming of
2102 pedwarn_at_rich_loc.
2103 (c_parser_parameter_declaration): Likewise for renaming of
2104 error_at_rich_loc.
2105 * c-typeck.c (build_component_ref): Likewise.
2106 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2107 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2108 (set_init_label): Likewise for renaming of error_at_rich_loc.
2109
c1136864
RB
21102017-10-30 Richard Biener <rguenther@suse.de>
2111
2112 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2113 stmts.
2114
ee5fd23a
MM
21152017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2116
2117 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2118 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2119
1a59ccf2
DM
21202017-10-25 David Malcolm <dmalcolm@redhat.com>
2121
2122 PR c/7356
2123 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2124 semicolons.
2125
bc1a75dd
JJ
21262017-10-25 Jakub Jelinek <jakub@redhat.com>
2127
2128 PR libstdc++/81706
2129 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2130 newdecl to corresponding __builtin_ if any.
2131
ff1ff960
PC
21322017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2133
2134 PR c++/82466
2135 * c-decl.c (diagnose_mismatched_decls): Use
2136 OPT_Wbuiltin_declaration_mismatch.
2137
62e1c678
DM
21382017-10-12 David Malcolm <dmalcolm@redhat.com>
2139
2140 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2141 use it to guard calls to maybe_suggest_missing_token_insertion.
2142 (c_parser_parms_list_declarator): Override default value of new
2143 "type_is_unique" param to c_parser_require.
2144 (c_parser_asm_statement): Likewise.
2145 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2146 defaulting to true.
2147
a92f6726
NS
21482017-10-11 Nathan Sidwell <nathan@acm.org>
2149
2150 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2151
8e6cdc90
RS
21522017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2153
2154 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2155 operating on trees as wide_ints.
2156 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2157 (c_tree_equal): Likewise.
2158
8139a48e
DM
21592017-10-04 David Malcolm <dmalcolm@redhat.com>
2160
2161 * c-decl.c (push_parm_decl): Store c_parm's location into the
2162 PARAM_DECL.
2163 (build_c_parm): Add "loc" param and store it within the c_parm.
2164 * c-parser.c (struct c_parser): Add "last_token_location" field.
2165 (c_parser_consume_token): Store location of the token into the
2166 new field.
2167 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2168 when handling a FUNCTION_DECL, if it doesn't already have them.
2169 (c_parser_parameter_declaration): Generate a location for the
2170 parameter, and pass it to the call to build_c_parm.
2171 * c-tree.h (struct c_parm): Add field "loc".
2172 (build_c_parm): Add location_t param.
2173 * c-typeck.c (get_fndecl_argument_location): New function.
2174 (inform_for_arg): New function.
2175 (convert_for_assignment): Use inform_for_arg when dealing with
2176 ic_argpass.
2177
2a389958
JJ
21782017-09-29 Jakub Jelinek <jakub@redhat.com>
2179
7d386d45
JJ
2180 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2181 width is non-NULL.
2182 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2183 don't SET_DECL_C_BIT_FIELD here.
2184
2a389958
JJ
2185 PR c/82340
2186 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2187 instead of trying to set just TREE_READONLY manually.
2188
ebc6a85e
TV
21892017-09-16 Tom de Vries <tom@codesourcery.com>
2190
2191 PR c/81875
2192 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2193 cond itself.
2194
bb75facd
JM
21952017-09-15 Joseph Myers <joseph@codesourcery.com>
2196
2197 PR c/82071
2198 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2199 for C11.
2200 (build_conditional_expr): For C11, generate result with excess
2201 precision when one argument is an integer and the other is of a
2202 type using excess precision.
2203
1d933576
BE
22042017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2205
2206 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2207
267bbb6f
MP
22082017-09-13 Marek Polacek <polacek@redhat.com>
2209
2210 PR c/82167
2211 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2212 than expr.original_type.
2213
6836632e
NS
22142017-09-12 Nathan Sidwell <nathan@acm.org>
2215
2216 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2217 resort_sorted_fields): Moved from c-family/c-common.c.
2218 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2219
e035be33
JM
22202017-09-01 Joseph Myers <joseph@codesourcery.com>
2221
2222 PR c/82071
2223 * c-typeck.c (build_atomic_assign): Handle argument with excess
2224 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2225 argument passed to build_binary_op and convert_for_assignment but
2226 not for call to c_fully_fold.
2227 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2228 Ensure build_binary_op is called with argument with original
2229 semantic type. Avoid calling c_fully_fold with an
2230 EXCESS_PRECISION_EXPR from build_binary_op.
2231
d2e05fcb
JJ
22322017-09-01 Jakub Jelinek <jakub@redhat.com>
2233
2234 PR c/81887
2235 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2236
b397965c
RS
22372017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2238 Alan Hayward <alan.hayward@arm.com>
2239 David Sherwood <david.sherwood@arm.com>
2240
2241 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2242 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2243 m1 and m2 to the signed equivalent of a fixed-point
2244 SCALAR_TYPE_MODE.
2245
14e18d71
DM
22462017-08-24 David Malcolm <dmalcolm@redhat.com>
2247
2248 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2249 than CAN_HAVE_LOCATION_P when determining whether to use the
2250 location_t value within "value".
2251
7f204c0f
DM
22522017-08-21 David Malcolm <dmalcolm@redhat.com>
2253
2254 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2255 rather than peeking the location of the first token.
2256 * c-tree.h (c_expr::get_location): New method.
2257
2f687306
DM
22582017-08-21 David Malcolm <dmalcolm@redhat.com>
2259
2260 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2261 to check_function_arguments.
2262
3e7b80d7
MP
22632017-08-18 Marek Polacek <polacek@redhat.com>
2264
2265 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2266 commentary.
2267
00aa1fa2
L
22682017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2269
2270 PR c/53037
2271 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2272 (check_bitfield_type_and_width): Don't allow bit-field with
2273 warn_if_not_aligned type.
2274
da67acb9
MS
22752017-08-14 Martin Sebor <msebor@redhat.com>
2276
2277 PR c/81117
2278 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2279
bb85aa74
MP
22802017-08-11 Marek Polacek <polacek@redhat.com>
2281
2282 PR c/81795
2283 * c-decl.c (pushtag): Only print inform if the warning was printed.
2284 (grokdeclarator): Likewise.
2285
32129a17
DM
22862017-08-10 David Malcolm <dmalcolm@redhat.com>
2287
2288 * c-parser.c (c_parser_error): Rename to...
2289 (c_parser_error_richloc): ...this, making static, and adding
2290 "richloc" parameter, passing it to the c_parse_error call,
2291 rather than calling c_parser_set_source_position_from_token.
2292 (c_parser_error): Reintroduce, reimplementing in terms of the
2293 above, converting return type from void to bool.
2294 (class token_pair): New class.
2295 (struct matching_paren_traits): New struct.
2296 (matching_parens): New typedef.
2297 (struct matching_brace_traits): New struct.
2298 (matching_braces): New typedef.
2299 (get_matching_symbol): New function.
2300 (c_parser_require): Add param MATCHING_LOCATION, using it to
2301 highlight matching "opening" tokens for missing "closing" tokens.
2302 (c_parser_skip_until_found): Likewise.
2303 (c_parser_static_assert_declaration_no_semi): Convert explicit
2304 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2305 class matching_parens, so that the pertinent open parenthesis is
2306 highlighted when there are problems locating the close
2307 parenthesis.
2308 (c_parser_struct_or_union_specifier): Likewise.
2309 (c_parser_typeof_specifier): Likewise.
2310 (c_parser_alignas_specifier): Likewise.
2311 (c_parser_simple_asm_expr): Likewise.
2312 (c_parser_braced_init): Likewise, for matching_braces.
2313 (c_parser_paren_condition): Likewise, for matching_parens.
2314 (c_parser_switch_statement): Likewise.
2315 (c_parser_for_statement): Likewise.
2316 (c_parser_asm_statement): Likewise.
2317 (c_parser_asm_operands): Likewise.
2318 (c_parser_cast_expression): Likewise.
2319 (c_parser_sizeof_expression): Likewise.
2320 (c_parser_alignof_expression): Likewise.
2321 (c_parser_generic_selection): Likewise.
2322 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2323 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2324 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2325 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2326 c_parser_skip_until_found call.
2327 (c_parser_objc_class_definition): Use class matching_parens as
2328 above.
2329 (c_parser_objc_method_decl): Likewise.
2330 (c_parser_objc_try_catch_finally_statement): Likewise.
2331 (c_parser_objc_synchronized_statement): Likewise.
2332 (c_parser_objc_at_property_declaration): Likewise.
2333 (c_parser_oacc_wait_list): Likewise.
2334 (c_parser_omp_var_list_parens): Likewise.
2335 (c_parser_omp_clause_collapse): Likewise.
2336 (c_parser_omp_clause_default): Likewise.
2337 (c_parser_omp_clause_if): Likewise.
2338 (c_parser_omp_clause_num_threads): Likewise.
2339 (c_parser_omp_clause_num_tasks): Likewise.
2340 (c_parser_omp_clause_grainsize): Likewise.
2341 (c_parser_omp_clause_priority): Likewise.
2342 (c_parser_omp_clause_hint): Likewise.
2343 (c_parser_omp_clause_defaultmap): Likewise.
2344 (c_parser_oacc_single_int_clause): Likewise.
2345 (c_parser_omp_clause_ordered): Likewise.
2346 (c_parser_omp_clause_reduction): Likewise.
2347 (c_parser_omp_clause_schedule): Likewise.
2348 (c_parser_omp_clause_num_teams): Likewise.
2349 (c_parser_omp_clause_thread_limit): Likewise.
2350 (c_parser_omp_clause_aligned): Likewise.
2351 (c_parser_omp_clause_linear): Likewise.
2352 (c_parser_omp_clause_safelen): Likewise.
2353 (c_parser_omp_clause_simdlen): Likewise.
2354 (c_parser_omp_clause_depend): Likewise.
2355 (c_parser_omp_clause_map): Likewise.
2356 (c_parser_omp_clause_device): Likewise.
2357 (c_parser_omp_clause_dist_schedule): Likewise.
2358 (c_parser_omp_clause_proc_bind): Likewise.
2359 (c_parser_omp_clause_uniform): Likewise.
2360 (c_parser_omp_for_loop): Likewise.
2361 (c_parser_cilk_clause_vectorlength): Likewise.
2362 (c_parser_cilk_clause_linear): Likewise.
2363 (c_parser_transaction_expression): Likewise.
2364 * c-parser.h (c_parser_require): Add param matching_location with
2365 default UNKNOWN_LOCATION.
2366 (c_parser_error): Convert return type from void to bool.
2367 (c_parser_skip_until_found): Add param matching_location with
2368 default UNKNOWN_LOCATION.
2369
30af3a2b
MP
23702017-08-09 Marek Polacek <polacek@redhat.com>
2371
2372 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2373 * c-tree.h (build_external_ref): Update declaration.
2374 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2375 (build_external_ref): Change the type of a parameter to bool.
2376 (parser_build_binary_op): Use true/false instead of 1/0.
2377 (pointer_diff): Likewise.
2378 (build_modify_expr): Likewise.
2379 (set_designator): Change the type of a parameter to bool.
2380 (set_init_index): Use true/false instead of 1/0.
2381 (set_init_label): Likewise.
2382 (output_init_element): Change the type of a parameter to bool.
2383 (output_pending_init_elements): Use true/false instead of 1/0.
2384 (process_init_element): Likewise.
2385 (build_binary_op): Change the type of a parameter to bool.
2386
296c53ac
MP
23872017-08-09 Marek Polacek <polacek@redhat.com>
2388
2389 PR c/81233
2390 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2391 Call emit_diagnostic_valist instead of pedwarn.
2392 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2393 Print the relevant types in diagnostics.
2394
a32c8316
MP
23952017-08-09 Marek Polacek <polacek@redhat.com>
2396
2397 PR c/81417
2398 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2399 build_conditional_expr.
a32c8316
MP
2400 * c-parser.c (c_parser_conditional_expression): Create locations for
2401 EXP1 and EXP2 from their source ranges. Pass the locations down to
2402 build_conditional_expr.
2403 * c-tree.h (build_conditional_expr): Update declaration.
2404 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2405 For -Wsign-compare, also print the types.
2406
314e6352
ML
24072017-08-08 Martin Liska <mliska@suse.cz>
2408
2409 * c-convert.c: Include header files.
2410 * c-typeck.c: Likewise.
2411
577eec56
ML
24122017-08-07 Martin Liska <mliska@suse.cz>
2413
2414 * c-parser.c (c_parser_attributes): Canonicalize name of an
2415 attribute.
2416
f7b6353a
MP
24172017-08-02 Marek Polacek <polacek@redhat.com>
2418
2419 PR c/81289
2420 * c-parser.c (c_parser_unary_expression): Use set_error.
2421
8a6eab34
MP
2422 PR c/81448
2423 PR c/81306
2424 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2425 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2426
ab20d992 24272017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2428 Martin Liska <mliska@suse.cz>
2429
2430 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2431 statement.
7fef86d3 2432
f34ebeb2
ML
24332017-07-31 Martin Liska <mliska@suse.cz>
2434
2435 PR sanitize/81530
2436 * c-convert.c (convert): Guard condition with flag_sanitize_p
2437 also with current_function_decl non-null equality.
2438 * c-decl.c (grokdeclarator): Likewise.
2439 * c-typeck.c (build_binary_op): Likewise.
2440
8595f67b
MP
24412017-07-25 Marek Polacek <polacek@redhat.com>
2442
2443 * c-decl.c (grokfield): Remove local variable.
2444
d49718d6
MP
24452017-07-25 Marek Polacek <polacek@redhat.com>
2446
2447 PR c/81364
2448 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2449 macro expansion if the body is in { }.
2450 (c_parser_while_statement): Likewise.
2451 (c_parser_for_statement): Likewise.
2452
ff22eb12
NS
24532017-07-18 Nathan Sidwell <nathan@acm.org>
2454
2455 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2456
eea77d1f
DM
24572017-07-14 David Malcolm <dmalcolm@redhat.com>
2458
2459 * c-decl.c (implicitly_declare): When suggesting a missing
2460 #include, provide a fix-it hint.
2461
b6f43128
DM
24622017-07-06 David Malcolm <dmalcolm@redhat.com>
2463
2464 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2465 and call that instead.
2466 * c-tree.h (selftest::run_c_tests): New decl.
2467
3e2becc4
MP
24682017-06-26 Marek Polacek <polacek@redhat.com>
2469
2470 PR c/80116
2471 * c-parser.c (c_parser_if_body): Set the location of the
2472 body of the conditional after parsing all the labels. Call
2473 warn_for_multistatement_macros.
2474 (c_parser_else_body): Likewise.
2475 (c_parser_switch_statement): Likewise.
2476 (c_parser_while_statement): Likewise.
2477 (c_parser_for_statement): Likewise.
2478 (c_parser_statement): Add a default argument. Save the location
2479 after labels have been parsed.
2480 (c_parser_c99_block_statement): Likewise.
2481
343ae898
RB
24822017-06-19 Richard Biener <rguenther@suse.de>
2483
2484 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2485 negated _Literals to parse _Literal (int) -1.
2486
45b2222a
ML
24872017-06-13 Martin Liska <mliska@suse.cz>
2488
2489 PR sanitize/78204
2490 * c-convert.c (convert): Use sanitize_flags_p.
2491 * c-decl.c (grokdeclarator): Likewise.
2492 * c-typeck.c (convert_for_assignment): Likewise.
2493 (c_finish_return): Likewise.
2494 (build_binary_op): Likewise.
2495
8ab7005b
JJ
24962017-06-08 Jakub Jelinek <jakub@redhat.com>
2497
2498 PR c/81006
2499 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2500 to sizetype before size_binop.
2501
363dc72c
JJ
25022017-06-07 Jakub Jelinek <jakub@redhat.com>
2503
2504 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2505 of TDI_generic.
2506
dc949728
MP
25072017-06-06 Marek Polacek <polacek@redhat.com>
2508
2509 PR c/79983
2510 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2511 ref.
2512 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2513
40ffd95f
BE
25142017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2515
2516 * c-parser.c (c_parser_binary_expression): Implement the
2517 -Wsizeof_pointer_div warning.
2518 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2519 from a parenthesized expression.
2520 (c_parser_expr_list): Use c_last_sizeof_loc.
2521 * c-tree.h (c_last_sizeof_loc): New external.
2522 * c-typeck.c (c_last_sizeof_loc): New variable.
2523 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2524
9fc5e7a4
MM
25252017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2526
2527 PR testsuite/80580
2528 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2529
f012c8ef
DM
25302017-05-30 David Malcolm <dmalcolm@redhat.com>
2531
2532 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2533 parameters.
2534
3cd211af
MS
25352017-05-24 Martin Sebor <msebor@redhat.com>
2536
2537 PR c/80731
2538 * c-fold.c (c_fully_fold_internal): Adjust.
2539 * c-typeck.c (parser_build_unary_op): Adjust.
2540
fd71a9a2
TS
25412017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2542
2543 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2544 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2545 "VECTOR_LENGTH".
2546
92fa0f9e
MP
25472017-05-23 Marek Polacek <polacek@redhat.com>
2548
2549 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2550 quotes.
2551
d11c168a
JJ
25522017-05-22 Jakub Jelinek <jakub@redhat.com>
2553
2554 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2555 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2556 it returned invariant. Call tree_invariant_p unconditionally
2557 afterwards to decide whether to return expr or op0.
2558
58aca9d9
NS
25592017-05-22 Nathan Sidwell <nathan@acm.org>
2560
2561 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2562
7fd549d2
TS
25632017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2564
2565 * c-parser.c (c_parser_omp_clause_default): Handle
2566 "OMP_CLAUSE_DEFAULT_PRESENT".
2567
6ecd2339
BE
25682017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2569
2570 * config-lang.in (gtfiles): Add c-family/c-format.c.
2571
8a57ecff
NS
25722017-05-18 Nathan Sidwell <nathan@acm.org>
2573
2574 * c-decl.c (pushdecl_top_level): Delete unused function.
2575
6574d78e
MP
25762017-05-18 Marek Polacek <polacek@redhat.com>
2577
2578 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2579 (check_earlier_gotos): Likewise.
2580 (define_label): Likewise.
2581 (pending_xref_error): Likewise.
2582 (smallest_type_quals_location): Likewise.
2583 (grokdeclarator): Likewise.
2584 (grokparms): Likewise.
2585 (identifier_global_value): Likewise.
2586 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2587 (find_init_member): Likewise.
2588
e3455240
MP
25892017-05-18 Marek Polacek <polacek@redhat.com>
2590
2591 * c-decl.c (start_decl): Use false/true instead of 0/1.
2592 (grokdeclarator): Likewise.
2593 (finish_struct): Likewise.
2594 (start_function): Change the return type to bool. Use false/true
2595 instead of 0/1.
2596 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2597 * c-tree.h (start_function): Update.
2598 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2599 (set_designator): Change the return type to bool. Use false/true
2600 instead of 0/1.
2601
3fa8871b
MP
26022017-05-17 Marek Polacek <polacek@redhat.com>
2603
2604 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2605 * c-typeck.c: Likewise.
2606
142473df
MP
26072017-05-17 Marek Polacek <polacek@redhat.com>
2608
2609 PR sanitizer/80659
2610 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2611 DECL_IGNORED_P even for non-static compound literals.
2612
1a817418
ML
26132017-05-17 Martin Liska <mliska@suse.cz>
2614
2615 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2616 use it instead of int type.
2617
b2fa0a8b
MP
26182017-05-17 Marek Polacek <polacek@redhat.com>
2619
2620 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2621 call c_fully_fold.
2622 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2623 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2624 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2625 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2626 save_expr.
2627 (c_parser_conditional_expression): Likewise.
2628 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2629 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2630 (process_init_element): Likewise.
2631 (build_binary_op): Likewise.
2632 (handle_omp_array_sections_1): Likewise.
2633
1e47f02b
TS
26342017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2635
2636 * c-parser.c (c_parser_omp_clause_num_gangs)
2637 (c_parser_omp_clause_num_workers)
2638 (c_parser_omp_clause_vector_length): Merge functions into...
2639 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2640 all users.
2641
c24e924f
NS
26422017-05-11 Nathan Sidwell <nathan@acm.org>
2643
2644 * gimple-parser.c: Don't #include tree-dump.h.
2645
c587104e
MM
26462017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2647
2648 PR testsuite/80580
2649 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2650
67ac9a9d
MM
26512017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2652
2653 PR testsuite/80580
2654 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2655 incorrect __MEM syntax.
2656
ac4eb40f
MM
26572017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2658
2659 PR testsuite/80580
2660 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2661 type of unary '*'.
2662
641da50a
NS
26632017-05-09 Nathan Sidwell <nathan@acm.org>
2664
2665 * c-tree.h (pushdecl): Declare.
2666
56d35585
DM
26672017-05-05 David Malcolm <dmalcolm@redhat.com>
2668
2669 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2670 with diagnostic_report_diagnostic.
2671 * c-errors.c (pedwarn_c99): Likewise.
2672 (pedwarn_c90): Likewise.
2673
815d9cc6
XR
26742017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2675
92a285c1 2676 PR c++/80038
815d9cc6
XR
2677 * c-gimplify.c (c_gimplify_expr): Remove calls to
2678 cilk_gimplifY_call_params_in_spawned_fn.
2679
1c4ea66f
DM
26802017-04-25 David Malcolm <dmalcolm@redhat.com>
2681
2682 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2683 hint for removing extra semicolon.
2684
666f7903
JJ
26852017-04-21 Jakub Jelinek <jakub@redhat.com>
2686
2687 PR c/80468
2688 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2689 enabled, set specs->type to integer_type_node.
2690
5764ee3c
JW
26912017-04-03 Jonathan Wakely <jwakely@redhat.com>
2692
2693 * c-array-notation.c: Fix typo in comment.
2694
10fa8dfb
MP
26952017-03-29 Marek Polacek <polacek@redhat.com>
2696
2697 PR c/79730
2698 * c-decl.c (finish_decl): Check VAR_P.
2699
a9e4a1a5
JJ
27002017-03-27 Jakub Jelinek <jakub@redhat.com>
2701
2702 PR middle-end/80162
2703 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2704 * c-typeck.c (c_mark_addressable): Likewise. Look through
2705 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2706 to ARRAY_TYPE.
2707 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2708
ee3ff394
MP
27092017-03-23 Marek Polacek <polacek@redhat.com>
2710
2711 * c-tree.h: Remove a C_RID_YYCODE reference.
2712
4d1b8e70
JJ
27132017-03-21 Jakub Jelinek <jakub@redhat.com>
2714
2715 PR c/80097
2716 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2717 optional COMPOUND_EXPR with ubsan instrumentation.
2718
31dc71a8
MP
27192017-03-17 Marek Polacek <polacek@redhat.com>
2720
2721 * c-parser.c: Add C11 references.
2722
d579c385
MP
27232017-03-15 Marek Polacek <polacek@redhat.com>
2724
2725 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2726
85059a38
MP
27272017-03-11 Marek Polacek <polacek@redhat.com>
2728
2729 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2730
2f6f187a
DM
27312017-03-10 David Malcolm <dmalcolm@redhat.com>
2732
2733 PR translation/79848
2734 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2735 "%qs".
2736 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2737
36618428
MP
27382017-03-09 Marek Polacek <polacek@redhat.com>
2739
2740 PR sanitizer/79757
2741 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2742 parameter declarations with initializers.
2743
01e5af5a
JJ
27442017-03-09 Jakub Jelinek <jakub@redhat.com>
2745
2746 PR c/79969
2747 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2748 TYPE_STUB_DECL.
2749
a71dbc63
JJ
27502017-03-07 Jakub Jelinek <jakub@redhat.com>
2751
2752 PR c/79834
2753 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2754 for "may only be used in compound statements" diagnostics, change it
2755 such that the same translatable string is used for all pragmas. For
2756 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2757 diagnostics.
2758 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2759 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2760 "may only be used in compound statements" diagnostics, such that the
2761 same translatable string is used for all pragmas.
2762
1ff4bae6
MP
27632017-03-04 Marek Polacek <polacek@redhat.com>
2764
2765 PR c/79847
2766 * c-decl.c (implicit_decl_warning): Add missing space.
2767
7f5a7d78
MP
27682017-03-03 Marek Polacek <polacek@redhat.com>
2769
2770 PR c/79758
2771 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2772 current_function_prototype_arg_types is error_mark_node. Fix
2773 formatting. Use TREE_VALUE instead of TREE_TYPE.
2774
883c8f06
JJ
27752017-03-03 Jakub Jelinek <jakub@redhat.com>
2776
79c9b7a8
JJ
2777 PR c/79837
2778 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2779 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2780 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2781 diagnostics.
2782
883c8f06
JJ
2783 PR c/79836
2784 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2785 instead of %<_Generic>.
2786 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2787 (c_parser_omp_target_exit_data): Use %<release%> instead of
2788 %<release>.
2789
324ff1a0
JJ
27902017-02-28 Jakub Jelinek <jakub@redhat.com>
2791
2792 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2793 instead of just cond ? "..." : "...".
2794 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2795 for "enter"/"exit" keyword.
2796 (c_finish_oacc_routine): Don't use %s to supply portions of the
2797 message.
2798
4227c9ad
JJ
27992017-02-24 Jakub Jelinek <jakub@redhat.com>
2800
2801 PR c++/79588
2802 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2803 handle -Wrestrict here.
2804 * c-typeck.c (build_function_call_vec): Adjust
2805 check_function_arguments caller.
2806
5d972e66
RB
28072017-02-23 Richard Biener <rguenther@suse.de>
2808
2809 PR c/79684
2810 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2811 to initialize c_exprs to return.
2812 (c_parser_gimple_binary_expression): Likewise.
2813 (c_parser_gimple_unary_expression): Likewise.
2814 (c_parser_gimple_postfix_expression): Likewise.
2815
61ac5ebe
MP
28162017-02-22 Marek Polacek <polacek@redhat.com>
2817
2818 PR c/79662
2819 * c-typeck.c (convert_arguments): Handle error_mark_node.
2820
41d1b0b1
PK
28212017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2822
2823 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2824 value of c_parser_parse_ssa_name against error_mark_node and emit
2825 error if ssa name is anonymous and written as default definition.
2826
eab1f169
PK
28272017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2828
2829 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2830 FMA_EXPR.
2831
bcac0b4d
JJ
28322017-02-16 Jakub Jelinek <jakub@redhat.com>
2833
2834 PR c++/79512
2835 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2836 ignore #pragma omp target even when not followed by identifier.
2837
1be33173
PK
28382017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2839
2840 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2841 (c_parser_gimple_unary_expression): Likewise.
2842
aa326bfb
JJ
28432017-02-13 Jakub Jelinek <jakub@redhat.com>
2844
2845 * c-parser.c (c_parser_oacc_declare): Add missing space in
2846 diagnostics.
2847
8a398bc5
PK
28482017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2849
2850 PR c/79478
2851 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2852 set_c_expr_source_range when parsing ssa-name.
2853
3dcde5ef 28542017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2855 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2856
2857 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2858 building IL when arguments are error_mark_node.
2859 (c_parser_gimple_unary_expression): Likewise.
2860 (c_parser_gimple_if_stmt): Likewise.
2861 (c_parser_gimple_switch_stmt): Likewise.
2862 (c_parser_gimple_return_stmt): Likewise.
2863 (c_parser_parse_ssa_name): When name lookup fails do not build
2864 an SSA name. Use undeclared rather than not declared in error
2865 reporting.
2866
192b048b
MP
28672017-02-09 Marek Polacek <polacek@redhat.com>
2868
2869 PR c/79428
2870 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2871 instead of c_parser_skip_until_found.
2872
56f71478
JJ
28732017-02-09 Jakub Jelinek <jakub@redhat.com>
2874
2875 PR c/79431
2876 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2877 symtab_node::get on automatic variables.
2878
02889d23
CLT
28792016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2880 Chung-Lin Tang <cltang@codesourcery.com>
2881
2882 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2883 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2884 semantic checking.
2885 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2886
7af4b20d
RB
28872017-02-07 Richard Biener <rguenther@suse.de>
2888
2889 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2890 (c_parser_gimple_postfix_expression_after_primary):
2891 Do not use c_build_function_call_vec to avoid folding and promotion.
2892 Simplify.
2893
e5e391d6
MO
28942017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2895
2896 PR lto/79061
2897 * c-decl.c (pop_scope): Pass main_input_filename to
2898 build_translation_unit_decl.
2899
c2e84327
DM
29002017-01-24 David Malcolm <dmalcolm@redhat.com>
2901
2902 * c-parser.c: Include "read-rtl-function.h" and
2903 "run-rtl-passes.h".
2904 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2905 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2906 production. Update for renaming of field "gimple_pass" to
2907 "gimple_or_rtl_pass". If __RTL was seen, call
2908 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2909 to an auto_timevar, to cope with early exit.
2910 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2911 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2912 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2913 Handle RID_RTL.
2914 (c_parser_parse_rtl_body): New function.
2915 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2916 (struct c_declspecs): Rename field "gimple_pass" to
2917 "gimple_or_rtl_pass". Add field "rtl_p".
2918 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2919 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2920 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2921 (c_parser_gimple_or_rtl_pass_list): ...this.
2922
2ebd93e1
MP
29232017-01-20 Marek Polacek <polacek@redhat.com>
2924
2925 PR c/64279
2926 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2927
b1c95bb5
RB
29282017-01-13 Richard Biener <rguenther@suse.de>
2929
2930 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2931 nops.
2932
25329913
RB
29332017-01-13 Richard Biener <rguenther@suse.de>
2934
2935 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2936 _Literal ( type-name ) number.
2937
6bb4ea5c
RB
29382017-01-12 Richard Biener <rguenther@suse.de>
2939
2940 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2941 __MEM.
2942
6b5b4e9c
JJ
29432017-01-11 Jakub Jelinek <jakub@redhat.com>
2944
2945 PR c++/72813
2946 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2947 PCH file.
2948
e3252775
RB
29492017-01-11 Richard Biener <rguenther@suse.de>
2950
2951 PR bootstrap/79052
2952 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2953 returns on parse errors.
2954
a9342885
MP
29552017-01-04 Marek Polacek <polacek@redhat.com>
2956
2957 PR c++/64767
2958 * c-parser.c (c_parser_postfix_expression): Mark zero character
2959 constants by setting original_type in c_expr.
2960 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2961 with a zero character constant.
2962 (char_type_p): New function.
2963
5dd9a9d0
DM
29642017-01-04 David Malcolm <dmalcolm@redhat.com>
2965
2966 * c-parser.c (c_parser_declaration_or_fndef): Create a
2967 rich_location at init_loc and parse it to start_init.
2968 (last_init_list_comma): New global.
2969 (c_parser_braced_init): Update last_init_list_comma when parsing
2970 commas. Pass it to pop_init_level. Pass location of closing
2971 brace to pop_init_level.
2972 (c_parser_postfix_expression_after_paren_type): Create a
2973 rich_location at type_loc and parse it to start_init.
2974 (c_parser_omp_declare_reduction): Likewise for loc.
2975 * c-tree.h (start_init): Add rich_location * param.
2976 (pop_init_level): Add location_t param.
2977 * c-typeck.c (struct initializer_stack): Add field
2978 "missing_brace_richloc".
2979 (start_init): Add richloc param, use it to initialize
2980 the stack node's missing_brace_richloc.
2981 (last_init_list_comma): New decl.
2982 (finish_implicit_inits): Pass last_init_list_comma to
2983 pop_init_level.
2984 (push_init_level): When finding missing open braces, add fix-it
2985 hints to the richloc.
2986 (pop_init_level): Add "insert_before" param and pass it
2987 when calling pop_init_level. Add fixits about missing
2988 close braces to any richloc. Use the richloc for the
2989 -Wmissing-braces warning.
2990 (set_designator): Pass last_init_list_comma to pop_init_level.
2991 (process_init_element): Likewise.
2992
cbe34bb5
JJ
29932017-01-01 Jakub Jelinek <jakub@redhat.com>
2994
2995 Update copyright years.
2996
d17680f3
JJ
29972016-12-21 Jakub Jelinek <jakub@redhat.com>
2998
0dba7960
JJ
2999 PR bootstrap/78817
3000 * c-typeck.c (build_function_call_vec): If check_function_arguments
3001 returns true, set TREE_NO_WARNING on CALL_EXPR.
3002
d17680f3
JJ
3003 PR c/77767
3004 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3005 to *expr instead of overwriting it.
3006
aa90531e
RB
30072016-12-20 Richard Biener <rguenther@suse.de>
3008
3009 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3010 error recovery.
3011 (c_parser_gimple_statement): Only build assigns for non-error
3012 stmts.
3013 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3014
629b3d75
MJ
30152016-12-14 Martin Jambor <mjambor@suse.cz>
3016
3017 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3018 omp-low.h.
3019 (c_finish_oacc_routine): Adjusted call to
3020 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3021 to use their new names.
3022 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3023 use its new name.
3024 (c_parser_oacc_update): Likewise.
3025 (c_parser_omp_simd): Likewise.
3026 (c_parser_omp_target_update): Likewise.
3027 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3028 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3029 name.
3030 (c_finish_omp_cancellation_point): Likewise.
3031 * gimple-parser.c: Do not include omp-low.h
3032
c5af52eb
CP
30332016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3034 James Norris <jnorris@codesourcery.com>
3035
3036 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3037 EXIT_DATA,WAIT} are not used in compound statements.
3038 (c_parser_oacc_enter_exit_data): Update diagnostics.
3039
48330c93
BE
30402016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3041
3042 PR c++/71973
3043 * c-decl.c (diagnose_mismatched_decls): Use
3044 OPT_Wbuiltin_declaration_mismatch here too.
3045
899ca90e 30462016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3047 Alan Hayward <alan.hayward@arm.com>
3048 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3049
3050 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3051 (make_label, finish_struct): Likewise.
3052
1ee62b92 30532016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3054 Richard Biener <rguenther@suse.de>
22b15758 3055
8e745a17
JJ
3056 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3057 * config-lang.in (gtfiles): Add c/c-parser.h.
3058 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3059 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3060 * c-parser.c (enum c_id_kind, struct c_token,
3061 c_parser_next_token_is, c_parser_next_token_is_not,
3062 c_parser_next_token_is_keyword,
3063 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3064 Split out to ...
3065 * c-parser.h: ... new header.
3066 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3067 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3068 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3069 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3070 c_parser_error, c_parser_require, c_parser_skip_until_found,
3071 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3072 c_parser_type_name): Export.
3073 (c_parser_tokens_buf): New function.
3074 (c_parser_error): Likewise.
3075 (c_parser_set_error): Likewise.
3076 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3077 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3078 via c_parser_parse_gimple_body.
8e745a17
JJ
3079 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3080 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3081 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3082 c_parser_error, c_parser_require, c_parser_skip_until_found,
3083 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3084 c_parser_type_name): Declare.
1ee62b92
PG
3085 (struct c_parser): Declare forward.
3086 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3087 (c_parser_error): Likewise.
3088 (c_parser_set_error): Likewise.
3089 * gimple-parser.c: New file.
3090 * gimple-parser.h: Likewise.
1ee62b92 3091
22b15758
UB
30922016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3093
3094 PR c/35503
3095 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3096 warn_for_restrict.
3097
84ff4775
LCW
30982016-09-11 Le-Chun Wu <lcwu@google.com>
3099 Mark Wielaard <mjw@redhat.com>
3100
3101 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3102 to the given -Wshadow= variant.
3103
4d0cdd0c
TP
31042016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3105
3106 * c-typeck.c: Include memmodel.h.
3107
1202f33e
JJ
31082016-10-13 Jakub Jelinek <jakub@redhat.com>
3109
3110 PR target/77957
3111 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3112 instead of lhd_return_null_tree_v.
3113
8a14afd0
BS
31142016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3115
3116 PR c++/69733
3117 * c-decl.c (smallest_type_quals_location): New static function.
3118 (grokdeclarator): Try to find the correct location for an ignored
3119 qualifier.
3120
81fea426
MP
31212016-09-26 Marek Polacek <polacek@redhat.com>
3122
3123 PR c/7652
3124 * c-decl.c (pop_scope): Add gcc_fallthrough.
3125
31262016-09-26 Marek Polacek <polacek@redhat.com>
3127
3128 PR c/7652
3129 * c-parser.c (struct c_token): Add flags field.
3130 (c_lex_one_token): Pass it to c_lex_with_flags.
3131 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3132 into IFN_FALLTHROUGH.
3133 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3134 attribute fallthrough after a case label or default label.
3135 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3136
9a2300e9
MP
31372016-09-24 Marek Polacek <polacek@redhat.com>
3138
3139 PR c/77490
3140 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3141 have boolean value. Warn about ++/-- on booleans.
3142
7de76362
JJ
31432016-09-23 Jakub Jelinek <jakub@redhat.com>
3144
3145 * c-parser.c (incomplete_record_decls): Remove unnecessary
3146 = vNULL initialization of file scope vec.
3147
5b73d2ab
MP
31482016-09-16 Marek Polacek <polacek@redhat.com>
3149
3150 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3151
e51fbec3
MP
31522016-09-14 Marek Polacek <polacek@redhat.com>
3153
3154 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3155 (fix_array_notation_expr): Likewise.
3156 * c-decl.c (finish_decl): Likewise.
3157 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3158 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3159 (function_to_pointer_conversion): Use false instead of 0.
3160 (convert_lvalue_to_rvalue): Likewise.
3161 (parser_build_unary_op): Likewise.
3162 (build_atomic_assign): Likewise.
3163 (build_unary_op): Change nonconvert parameter type to bool, use
3164 true/false instead of 1/0.
3165 (build_binary_op): Use true instead of 1.
3166
254830ba
DM
31672016-09-13 David Malcolm <dmalcolm@redhat.com>
3168
3169 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3170 of add_fixit_insert to add_fixit_insert_before.
3171
4c13ba17
MP
31722016-09-13 Marek Polacek <polacek@redhat.com>
3173
3174 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3175 it.
3176
54dcdb88
BE
31772016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3178
3179 PR c++/77496
3180 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3181 COMPOUND_EXPR to warn_for_omitted_condop.
3182
e5106e27
DM
31832016-09-07 David Malcolm <dmalcolm@redhat.com>
3184
3185 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3186 c_get_substring_location for this new langhook.
3187
9dc5773f
JJ
31882016-09-02 Jakub Jelinek <jakub@redhat.com>
3189
3190 PR c/65467
3191 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3192 flag_openmp.
3193 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3194 instead of mark_exp_read on low_bound/length expression.
3195 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3196 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3197 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3198 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3199 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3200 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3201 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3202 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3203 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3204 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3205 instead of mark_expr_read.
3206 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3207 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3208 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3209 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3210 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3211 array section bases outside of depend clause, for depend clause
3212 use convert_lvalue_to_rvalue on the base.
3213 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3214 linear, aligned, map, to and from clauses.
3215 (c_omp_clause_copy_ctor): New function.
3216
295844f6
MP
32172016-09-01 Marek Polacek <polacek@redhat.com>
3218
3219 PR c/7652
3220 * c-typeck.c (composite_type): Add FALLTHRU comment.
3221
089af25c
DM
32222016-08-31 David Malcolm <dmalcolm@redhat.com>
3223
3224 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3225 to the insertion fixits for "struct", "union", and "enum".
3226
f9087798
DM
32272016-08-30 David Malcolm <dmalcolm@redhat.com>
3228
3229 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3230 rather than add_fixit_misspelled_id.
3231 (undeclared_variable): Likewise.
3232 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3233 now-redundant "here" params from add_fixit_insert method calls.
3234 (c_parser_parameter_declaration): Likewise.
3235 * c-typeck.c (build_component_ref): Remove now-redundant range
3236 param from add_fixit_replace method calls.
3237
ebef225f
MP
32382016-08-25 Marek Polacek <polacek@redhat.com>
3239
3240 * c-typeck.c (parser_build_binary_op): Pass LHS to
3241 warn_logical_not_parentheses.
3242
fe377a48
MP
32432016-08-25 Marek Polacek <polacek@redhat.com>
3244
3245 PR c/77323
3246 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3247 or _FloatN or _FloatNx is not supported.
3248 (finish_declspecs): Set type to integer_type_node when _FloatN or
3249 _FloatNx is not supported.
3250
c65699ef
JM
32512016-08-19 Joseph Myers <joseph@codesourcery.com>
3252
3253 PR c/32187
3254 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3255 (struct c_declspecs): Add field floatn_nx_idx.
3256 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3257 and _FloatNx type specifiers.
3258 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3259 (c_parser_declspecs, c_parser_attribute_any_word)
3260 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3261 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3262 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3263 narrower than double.
3264
2f1364c2
JJ
32652016-08-12 Jakub Jelinek <jakub@redhat.com>
3266 Martin Liska <mliska@suse.cz>
3267
3268 PR c/67410
3269 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3270 % to determine val element to change. Assert that
3271 wchar_bytes * charwidth fits into val array.
3272
191816a3
MP
32732016-08-12 Marek Polacek <polacek@redhat.com>
3274
3275 PR c/7652
3276 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3277 (c_parser_postfix_expression): Likewise.
3278 * c-typeck.c (build_unary_op): Adjust fall through comment.
3279 (c_mark_addressable): Likewise.
3280
b95a64bb
JJ
32812016-08-11 Jakub Jelinek <jakub@redhat.com>
3282
3283 PR c/72816
3284 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3285 array member through typedef, for orig_qual_indirect == 0 clear
3286 orig_qual_type.
3287
895aa8e1
DM
32882016-08-08 David Malcolm <dmalcolm@redhat.com>
3289
3290 PR c/64955
3291 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3292 this up to selftest::run_c_tests.
3293 (selftest::run_c_tests): New function.
3294
0b212d8c
TS
32952016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3296
ae9281fc
TS
3297 * c-parser.c (struct oacc_routine_data): Add error_seen and
3298 fndecl_seen members.
3299 (c_finish_oacc_routine): Use these.
3300 (c_parser_declaration_or_fndef): Adjust.
3301 (c_parser_oacc_routine): Likewise. Support more C language
3302 constructs, and improve diagnostics. Move pragma context
3303 checking...
3304 (c_parser_pragma): ... here.
3305
0b212d8c
TS
3306 * c-parser.c (struct oacc_routine_data): New.
3307 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3308 Simplify code.
3309 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3310 declare target" attribute.
3311
76e2c821
JB
33122016-08-01 Jan Beulich <jbeulich@suse.com>
3313
3314 * c-fold.c (c_fully_fold_internal): Also emit shift count
3315 warnings for vector types.
3316 * c-typeck.c (build_binary_op): Likewise.
3317
f618a472
MP
33182016-07-29 Marek Polacek <polacek@redhat.com>
3319
3320 PR c/71742
3321 * c-decl.c (finish_struct): Rephrase an error message.
3322
efd0786f
MP
3323 PR c/71853
3324 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3325 to error node for invalid code.
3326
e00dceaf
MP
3327 PR c/71573
3328 * c-decl.c (implicitly_declare): Return decl early not only for
3329 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3330
673a107a
JJ
33312016-07-29 Jakub Jelinek <jakub@redhat.com>
3332
3333 PR c/71969
3334 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3335 on GNU extern inline functions.
3336
a5b5c8b6
MP
33372016-07-29 Marek Polacek <polacek@redhat.com>
3338
3339 PR c/71583
3340 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3341 check expr.value.
3342
e3fe09c1
UB
33432016-07-22 Uros Bizjak <ubizjak@gmail.com>
3344
3345 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3346
7c8f7eaa
DM
33472016-07-20 David Malcolm <dmalcolm@redhat.com>
3348
3349 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3350 spellcheck-tree.h
3351 (best_macro_match): Likewise, converting from a typedef to a
3352 subclass.
3353 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3354 (lookup_name_fuzzy): Update for change of best_macro_match to a
3355 subclass with a ctor that calls cpp_forall_identifiers.
3356
de6a69ee
DM
33572016-07-20 David Malcolm <dmalcolm@redhat.com>
3358
3359 * c-decl.c (implicit_decl_warning): Update for conversion of
3360 return type of lookup_name_fuzzy to const char *.
3361 (undeclared_variable): Likewise.
3362 (lookup_name_fuzzy): Convert return type from tree to
3363 const char *.
3364 * c-parser.c (c_parser_declaration_or_fndef): Update for
3365 conversion of return type of lookup_name_fuzzy to const char *.
3366 (c_parser_parameter_declaration): Likewise.
3367
b1c9c068
CP
33682016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3369
3370 * c-parser.c (c_parser_oacc_declare): Don't scan for
3371 GOMP_MAP_POINTER.
3372 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3373 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3374 zero-length subarrays.
3375
ddbbcb19
JJ
33762016-07-15 Jakub Jelinek <jakub@redhat.com>
3377
3378 PR c/71858
3379 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3380 instead of FUZZY_LOOKUP_NAME.
3381 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3382 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3383
dd36b877
JJ
33842016-07-14 Jakub Jelinek <jakub@redhat.com>
3385
3386 PR c/71858
3387 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3388
8c681247
TS
33892016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3390
3391 * c-parser.c (c_parser_generic_selection): Make type of variable
3392 auto_vec.
3393 (c_parser_omp_declare_simd): Likewise.
3394
bf4fa671
TS
33952016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3396
3397 * c-decl.c (struct c_struct_parse_info): Change member types
3398 from vec to auto_vec.
3399 (start_struct): Adjust.
3400 (finish_struct): Likewise.
3401
557e8c49
JJ
34022016-07-02 Jakub Jelinek <jakub@redhat.com>
3403
3404 PR c/71719
3405 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3406
54d19c3b
TS
34072016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3408
3409 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3410 Move pragma context checking into...
3411 (c_parser_omp_cancellation_point): ... here, and improve
3412 diagnostic messages.
3413 * c-typeck.c (c_finish_omp_cancel)
3414 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3415
152ef731
JJ
34162016-06-29 Jakub Jelinek <jakub@redhat.com>
3417
3418 PR c/71685
3419 * c-typeck.c (c_build_qualified_type): Don't clear
3420 C_TYPE_INCOMPLETE_VARS for the main variant.
3421
34222016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3423
3424 PR c/71552
3425 * c-typeck.c (output_init_element): Diagnose incompatible types
3426 before non-constant initializers.
3427
e9ac1f86
JJ
34282016-06-28 Jakub Jelinek <jakub@redhat.com>
3429
3430 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3431
277d7ee0
AK
34322016-06-23 Andi Kleen <ak@linux.intel.com>
3433
3434 * Make-lang.in: Add support for autofdo.
3435
1a4f11c8
DM
34362016-06-22 David Malcolm <dmalcolm@redhat.com>
3437
3438 PR c/70339
3439 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3440 (implicit_decl_warning): When issuing warnings for implicit
3441 declarations, attempt to provide a suggestion via
3442 lookup_name_fuzzy.
3443 (undeclared_variable): Likewise when issuing errors.
3444 (lookup_name_in_scope): Likewise.
3445 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3446 (best_macro_match): New typedef.
3447 (find_closest_macro_cpp_cb): New function.
3448 (lookup_name_fuzzy): New function.
3449 * c-parser.c: Include gcc-rich-location.h.
3450 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3451 (c_keyword_starts_typename): ...this new function.
3452 (c_parser_declaration_or_fndef): When issuing errors about
3453 missing "struct" etc, add a fixit. For other kinds of errors,
3454 attempt to provide a suggestion via lookup_name_fuzzy.
3455 (c_parser_parms_declarator): When looking ahead to detect typos in
3456 type names, also reject CPP_KEYWORD.
3457 (c_parser_parameter_declaration): When issuing errors about
3458 unknown type names, attempt to provide a suggestion via
3459 lookup_name_fuzzy.
3460 * c-tree.h (c_keyword_starts_typename): New prototype.
3461
5a578671
JM
34622016-06-20 Joseph Myers <joseph@codesourcery.com>
3463
3464 PR c/71601
3465 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3466 c_common_type returns error_mark_node.
3467
3f8257db 34682016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3469
3470 PR c/69507
3471 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3472 __alignof__ (expression).
3473
6a3f203c
DM
34742016-06-14 David Malcolm <dmalcolm@redhat.com>
3475
3476 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3477
264757fb
DM
34782016-06-14 David Malcolm <dmalcolm@redhat.com>
3479
3480 * c-typeck.c (build_component_ref): Simplify fixit code by
3481 using gcc_rich_location::add_fixit_misspelled_id.
3482 (set_init_label): Likewise.
3483
f7e4f2e3
DM
34842016-06-13 David Malcolm <dmalcolm@redhat.com>
3485
3486 * c-parser.c (c_parser_initelt): Provide location of name for new
3487 location_t param of set_init_label.
3488 * c-tree.h (set_init_label): Add location_t param.
3489 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3490 param and use it when issuing error messages about unrecognized
3491 field names. Attempt to provide a fixit hint if appropriate,
3492 otherwise update the error message to provide the type name.
3493
4b1ffdb1
TS
34942016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3495
3496 PR c/71381
3497 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3498 Loosen checking.
3499
44a845ca
MS
35002016-06-08 Martin Sebor <msebor@redhat.com>
3501 Jakub Jelinek <jakub@redhat.com>
3502
3503 PR c++/70507
3504 PR c/68120
3505 * c-typeck.c (convert_arguments): Don't promote last argument
3506 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3507
92a5f2ba
MP
35082016-06-08 Marek Polacek <polacek@redhat.com>
3509
3510 PR c/71418
3511 * c-decl.c (grokdeclarator): Check TYPE_P.
3512
08203f73
MP
3513 PR c/71426
3514 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3515 code.
3516
6ffd47b7
DM
35172016-06-07 David Malcolm <dmalcolm@redhat.com>
3518
3519 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3520 and structure element reference, capture the location of the
3521 element name token and pass it to build_component_ref.
3522 (c_parser_postfix_expression_after_primary): Likewise for
3523 structure element dereference.
3524 (c_parser_omp_variable_list): Likewise for
3525 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3526 * c-tree.h (build_component_ref): Add location_t param.
3527 * c-typeck.c (build_component_ref): Add location_t param
3528 COMPONENT_LOC. Use it, if available, when issuing hints about
3529 mispelled member names to provide a fixit replacement hint.
3530
1f40cff3
MP
35312016-06-06 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/71362
3534 * c-parser.c (c_parser_direct_declarator): Set location.
3535
5545a907
MP
35362016-06-06 Marek Polacek <polacek@redhat.com>
3537
3538 * c-typeck.c (comptypes_internal): Handle comparisons of
3539 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3540 TYPE_REF_CAN_ALIAS_ALL.
3541
b605f663
CLT
35422016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3543
3544 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3545 arguments as addressable when async clause exists.
3546
00631022
JJ
35472016-05-30 Jakub Jelinek <jakub@redhat.com>
3548
3549 PR c++/71349
3550 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3551 when combined with target construct.
3552
7211a097
JJ
35532016-05-26 Jakub Jelinek <jakub@redhat.com>
3554
3555 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3556 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3557
95efe6b6
MP
35582016-05-25 Marek Polacek <polacek@redhat.com>
3559
3560 PR c/71265
3561 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3562
a23faf7a
MP
3563 PR c/71266
3564 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3565
e46c7770
CP
35662016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3567
3568 * c-parser.c (c_parser_oacc_declare): Add support for
3569 GOMP_MAP_FIRSTPRIVATE_POINTER.
3570 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3571 argument with enum c_omp_region_type ort.
3572 (handle_omp_array_sections): Likewise. Update call to
3573 handle_omp_array_sections_1.
3574 (c_finish_omp_clauses): Add specific errors and warning messages for
3575 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3576 call to handle_omp_array_sections.
3577
a04e69c0
TS
35782016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3579
3580 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3581
f17a223d
RB
35822016-05-24 Richard Biener <rguenther@suse.de>
3583
3584 PR middle-end/70434
3585 PR c/69504
3586 * c-typeck.c (build_array_ref): Do not complain about indexing
3587 non-lvalue vectors. Adjust for function name change.
3588
79063edd
MS
35892016-05-20 Martin Sebor <msebor@redhat.com>
3590
3591 PR c/71115
3592 * c-typeck.c (error_init): Use
3593 expansion_point_location_if_in_system_header.
3594 (warning_init): Same.
3595
8a40fef3
DM
35962016-05-19 David Malcolm <dmalcolm@redhat.com>
3597
3598 PR c/71171
3599 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3600 in error-handling.
3601 (c_parser_postfix_expression): Likewise.
3602 * c-tree.h (c_expr::set_error): New method.
3603 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3604 that result's range is initialized.
3605
e9892350
JG
36062016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3607
3608 * c-typeck.c (parser_build_unary_op): Fix formatting.
3609
8fad45f5
MW
36102016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3611
3612 * c-decl.c (grokdeclarator): Remove errmsg and use of
3613 targetm.invalid_return_type.
3614 (grokparms): Remove errmsg and use of
3615 targetm.invalid_parameter_type.
3616
aa4b467b
JM
36172016-05-13 Joseph Myers <joseph@codesourcery.com>
3618
3619 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3620 function return type.
3621
4f2e1536
MP
36222016-05-12 Marek Polacek <polacek@redhat.com>
3623
3624 PR c/70756
3625 * c-decl.c (build_compound_literal): Pass LOC down to
3626 c_incomplete_type_error.
3627 * c-tree.h (require_complete_type): Adjust declaration.
3628 (c_incomplete_type_error): Likewise.
3629 * c-typeck.c (require_complete_type): Add location parameter, pass it
3630 down to c_incomplete_type_error.
3631 (c_incomplete_type_error): Add location parameter, pass it down to
3632 error_at.
3633 (build_component_ref): Pass location down to c_incomplete_type_error.
3634 (default_conversion): Pass location down to require_complete_type.
3635 (build_array_ref): Likewise.
3636 (build_function_call_vec): Likewise.
3637 (convert_arguments): Likewise.
3638 (build_unary_op): Likewise.
3639 (build_c_cast): Likewise.
3640 (build_modify_expr): Likewise.
3641 (convert_for_assignment): Likewise.
3642 (c_finish_omp_clauses): Likewise.
3643
d6e83a8d
MM
36442016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3645
3646 PR c/43651
3647 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3648 is enabled.
3649 * c-errors.c (pedwarn_c90): Return true if warned.
3650 * c-tree.h (pedwarn_c90): Change return type to bool.
3651 (enum c_declspec_word): Add new enumerator cdw_atomic.
3652
5c3a10fb
MP
36532016-05-11 Marek Polacek <polacek@redhat.com>
3654
3655 PR c++/71024
3656 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3657 diagnose_mismatched_attributes and call it.
3658
cf68d92c
MP
36592016-05-10 Marek Polacek <polacek@redhat.com>
3660
3661 PR c/70255
3662 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3663 on a declaration following the definition.
3664
351f85c5
JJ
36652016-05-05 Jakub Jelinek <jakub@redhat.com>
3666
3667 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3668 parse it through to c_parser_c99_block_statement.
3669 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3670 caller.
3671
deef7113
MP
36722016-05-04 Marek Polacek <polacek@redhat.com>
3673
3674 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3675 OPT_Wdangling_else.
3676
de55efd5
MP
36772016-05-04 Marek Polacek <polacek@redhat.com>
3678
3679 PR c/48778
3680 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3681 for macro expansions.
3682
79ce98bc
MP
36832016-05-03 Marek Polacek <polacek@redhat.com>
3684
3685 PR c/70859
3686 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3687 check_builtin_function_arguments.
3688
fb2647aa
RB
36892016-05-03 Richard Biener <rguenther@suse.de>
3690
3691 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3692 the checksum from the previous stage.
3693
77886428
CP
36942016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3695
3696 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3697 c_finish_omp_clauses.
3698 (c_parser_omp_all_clauses): Likewise.
3699 (c_parser_oacc_cache): Likewise.
3700 (c_parser_oacc_loop): Likewise.
3701 (omp_split_clauses): Likewise.
3702 (c_parser_omp_declare_target): Likewise.
3703 (c_parser_cilk_all_clauses): Likewise.
3704 (c_parser_cilk_for): Likewise.
3705 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3706 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3707
7176a4a0
MP
37082016-05-02 Marek Polacek <polacek@redhat.com>
3709
3710 PR c/70851
3711 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3712 incomplete type.
3713
e7ff0319
CP
37142016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3715
3716 PR middle-end/70626
3717 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3718 OACC_LOOP_CLAUSE_MASK.
3719 (c_parser_oacc_kernels_parallel): Update call to
3720 c_oacc_split_loop_clauses.
3721
9f405ce1
AM
37222016-04-28 Andrew MacLeod <amacleod@redhat.com>
3723
3724 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3725 argument to build_modify_expr in two cases.
3726
c1e1f433
BS
37272016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3728
3729 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3730 warn_for_memset instead of warning directly here.
3731
2448a956
MP
37322016-04-26 Marek Polacek <polacek@redhat.com>
3733
3734 PR c/67784
3735 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3736 out of ...
3737 (c_parser_for_statement): ... here.
3738 (c_parser_if_statement): Use it.
3739 (c_parser_switch_statement): Use it.
3740 (c_parser_while_statement): Use it.
3741
b02a5e26
MP
3742 PR c/70791
3743 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3744
477d4906
IV
37452016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3746
3747 PR c++/69363
3748 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3749 instead of c_finish_cilk_clauses.
3750 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3751 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3752 floating-point variables in the linear clause for Cilk Plus.
3753
fe37c7af
MM
37542016-04-18 Michael Matz <matz@suse.de>
3755
3756 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3757 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3758
949505a9
MP
37592016-04-15 Marek Polacek <polacek@redhat.com>
3760
3761 PR c/70671
3762 * c-typeck.c (build_unary_op): Pass location down to error and
3763 warning call.
3764
dda1bf61
JJ
37652016-04-15 Jakub Jelinek <jakub@redhat.com>
3766
3767 PR c/70436
3768 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3769 where needed.
3770 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3771 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3772 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3773 Adjust c_parser_pragma callers.
3774 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3775 caller.
3776 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3777 c_parser_statement.
3778 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3779 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3780 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3781 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3782 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3783 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3784 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3785 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3786 down where needed.
3787 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3788 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3789 calls.
3790
99cd9857
MP
37912016-04-13 Marek Polacek <polacek@redhat.com>
3792
3793 PR c/70436
3794 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3795 adjust callers.
3796 (c_parser_statement): Likewise.
3797 (c_parser_c99_block_statement): Likewise.
3798 (c_parser_while_statement): Likewise.
3799 (c_parser_for_statement): Likewise.
3800 (c_parser_if_body): Don't set IF_P here.
3801 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3802 about dangling else here.
3803 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3804 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3805 warn about dangling else here.
3806
f13355da
MP
38072016-04-04 Marek Polacek <polacek@redhat.com>
3808
3809 PR c/70307
3810 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3811
5fde6a45
MP
38122016-03-31 Marek Polacek <polacek@redhat.com>
3813
3814 PR c/70297
3815 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3816
4bbf545b
DM
38172016-03-18 David Malcolm <dmalcolm@redhat.com>
3818
3819 PR c/70281
3820 * c-parser.c (c_parser_postfix_expression): Set the source range
3821 for uses of "__builtin_types_compatible_p".
3822
fcc2b74f
JJ
38232016-03-17 Jakub Jelinek <jakub@redhat.com>
3824
3825 PR c/70280
3826 * c-typeck.c (composite_type): Don't count void_list_node
3827 into len, if the list is terminated by void_list_node, start
3828 with void_list_node instead of NULL for newargs. Stop
3829 at void_list_node.
3830
ab4c578f
MP
38312016-03-16 Marek Polacek <polacek@redhat.com>
3832
3833 PR c/70093
3834 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3835 nested functions returning VM types.
3836
96b3c82d
CP
38372016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3838
3839 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3840 when calling c_finish_omp_clauses.
3841
29b9828f
BS
38422016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3843
3844 PR c/69824
3845 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3846 for later.
3847
7ff6ca38
MP
38482016-03-04 Marek Polacek <polacek@redhat.com>
3849
3850 PR c/69798
3851 * c-parser.c (c_parser_postfix_expression): Call
3852 c_parser_cast_expression rather than c_parser_postfix_expression.
3853
686e2237
JJ
38542016-03-01 Jakub Jelinek <jakub@redhat.com>
3855
3856 PR c/69796
3857 PR c/69974
3858 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3859 of incomplete decls to error_mark_node.
3860
0b05329b
MP
38612016-02-24 Marek Polacek <polacek@redhat.com>
3862
3863 PR c/69819
3864 * c-decl.c (finish_decl): Don't update the copy of the type of a
3865 different decl type.
3866
067fbd8b
JJ
38672016-02-23 Jakub Jelinek <jakub@redhat.com>
3868
3869 PR objc/69844
3870 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3871 in id_kind reclassification.
3872
bf14eba2
JJ
38732016-02-16 Jakub Jelinek <jakub@redhat.com>
3874
3875 PR c/69835
3876 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3877
ba539195
JN
38782016-02-16 James Norris <jnorris@codesourcery.com>
3879
3880 PR c/64748
3881 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3882
16595a1f
BS
38832016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3884
f48dfe98
BS
3885 * c-decl.c (build_null_declspecs): Zero the entire struct.
3886
16595a1f
BS
3887 PR c/69522
3888 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3889 callers changed. If nested_p is true, use it to call
3890 finish_implicit_inits.
3891 * c-tree.h (finish_implicit_inits): Declare.
3892 * c-typeck.c (finish_implicit_inits): New function. Move code
3893 from ...
3894 (push_init_level): ... here.
3895 (set_designator, process_init_element): Call finish_implicit_inits.
3896
66756373
JJ
38972016-02-11 Jakub Jelinek <jakub@redhat.com>
3898
3899 PR c/69768
3900 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3901 arguments for -Waddress warning.
3902
1066e9b5
JJ
39032016-02-04 Jakub Jelinek <jakub@redhat.com>
3904
3905 PR c/69669
3906 * c-decl.c (finish_enum): When honoring mode attribute,
3907 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3908
3a5d2ba4
JJ
39092016-01-29 Jakub Jelinek <jakub@redhat.com>
3910
3911 PR debug/69518
3912 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3913 all type variants, not just TYPE_MAIN_VARIANT.
3914
cbdd8ae0
JJ
39152016-01-27 Jakub Jelinek <jakub@redhat.com>
3916
3917 PR debug/66869
3918 * c-decl.c (c_write_global_declarations_1): Warn with
3919 warn_unused_function if static prototype without definition
3920 is not C_DECL_USED.
3921
fa74a4bc
MP
39222016-01-27 Marek Polacek <polacek@redhat.com>
3923
3924 PR c/68062
3925 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3926 to unsigned, if needed. Add -Wsign-compare warning.
3927
13f92e8d
JJ
39282016-01-26 Jakub Jelinek <jakub@redhat.com>
3929
3930 PR tree-optimization/69483
3931 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3932
cd8e73dc 39332016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3934
3935 PR c/24293
3936 * c-tree.h (incomplete_record_decls): Declare.
3937 * c-parser.c (incomplete_record_decls): Define.
3938 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3939 report error if any decl has zero size.
3940 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3941 or enum type to incomplete_record_decls.
3942
e6d6ec9e
TV
39432016-01-14 Tom de Vries <tom@codesourcery.com>
3944
3945 PR tree-optimization/68773
3946 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3947 set force_output.
3948
00083992
MP
39492016-01-14 Marek Polacek <polacek@redhat.com>
3950
3951 PR c/69262
3952 * c-decl.c (grokdeclarator): Provide more information for invalid
3953 array declarations.
3954
7443cf13
DM
39552016-01-06 David Malcolm <dmalcolm@redhat.com>
3956
3957 * c-parser.c (c_parser_unary_expression): For dereferences, build
3958 a combined location before calling build_indirect_ref, so that
3959 error reports cover the full range, manually updating the c_expr
3960 src_range.
3961
6b131d5b
MP
39622016-01-06 Marek Polacek <polacek@redhat.com>
3963
3964 PR sanitizer/69099
3965 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3966 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3967 NULL.
3968
818ab71a
JJ
39692016-01-04 Jakub Jelinek <jakub@redhat.com>
3970
3971 Update copyright years.
3972
2fe0a208
MP
39732016-01-04 Marek Polacek <polacek@redhat.com>
3974
3975 PR c/68908
3976 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3977 optimization to use __atomic_fetch_* built-in if possible.
3978
c7b48c8a
TS
39792015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3980
3981 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3982 into...
3983 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3984 all users.
3985
fda5652f
MP
39862015-12-22 Marek Polacek <polacek@redhat.com>
3987
3988 PR c/69002
3989 * c-typeck.c (build_component_ref): Warn when acessing elements of
3990 atomic structures or unions.
3991
745e411d
DM
39922015-12-21 David Malcolm <dmalcolm@redhat.com>
3993
3994 * c-typeck.c: Include "gcc-rich-location.h".
3995 (build_binary_op): In the two places that call binary_op_error,
3996 create a gcc_rich_location and populate it with the location of
3997 the binary op and its two operands.
3998
94c40e19
DM
39992015-12-16 David Malcolm <dmalcolm@redhat.com>
4000
4001 * c-parser.c (c_parser_statement_after_labels): When calling
4002 c_finish_return, Use the return expression's location if it has
4003 one, falling back to the location of the first token within it.
4004 * c-typeck.c (c_finish_return): When issuing warnings about
4005 the incorrect presence/absence of a return value, issue a note
4006 showing the declaration of the function.
4007
de67c4c3
DM
40082015-12-16 David Malcolm <dmalcolm@redhat.com>
4009
4010 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4011 to 4.
4012 (c_parser_peek_nth_token): New function.
4013 (c_parser_peek_conflict_marker): New function.
4014 (c_parser_error): Detect conflict markers and report them as such.
4015
a10704e1
DM
40162015-12-16 David Malcolm <dmalcolm@redhat.com>
4017
4018 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4019 to preserve range information for the primary expression
4020 in the call to c_parser_postfix_expression_after_primary.
4021
8062bca6
DM
40222015-12-16 David Malcolm <dmalcolm@redhat.com>
4023
4024 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4025 expression location, falling back on the first token location,
4026 rather than always using the latter.
4027
d06f8b75
MP
40282015-12-16 Marek Polacek <polacek@redhat.com>
4029
4030 PR c/64637
4031 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4032 available.
4033
2994fb91
MP
40342015-12-15 Marek Polacek <polacek@redhat.com>
4035
4036 PR c/68907
4037 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4038 artificial decl.
4039
a1b93f8d
DM
40402015-12-08 David Malcolm <dmalcolm@redhat.com>
4041
4042 * c-parser.c (c_parser_alignof_expression): Capture location of
4043 closing parenthesis (if any), or of end of unary expression, and
4044 use it to build a src_range for the expression.
4045
46c6e1e2
DM
40462015-12-08 David Malcolm <dmalcolm@redhat.com>
4047
4048 PR c/68757
4049 * c-parser.c (c_parser_get_builtin_args): Add
4050 "out_close_paren_loc" param, and write back to it.
4051 (c_parser_postfix_expression): Capture the closing
4052 parenthesis location for RID_CHOOSE_EXPR,
4053 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4054 RID_BUILTIN_SHUFFLE and use it to set the source range
4055 for such expressions; within RID_BUILTIN_COMPLEX set
4056 the underlying location.
4057
66189108
MP
40582015-12-07 Marek Polacek <polacek@redhat.com>
4059
4060 PR c/68668
4061 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4062 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4063
f187980b
EB
40642015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4065
4066 * c-tree.h (c_build_va_arg): Adjust prototype.
4067 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4068 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4069 parameter, adjust throughout and issue an error if EXPR is a component
4070 with reverse storage order.
4071
4250754e
JM
40722015-12-02 Jason Merrill <jason@redhat.com>
4073
4074 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4075 (c_fully_fold_internal, decl_constant_value_for_optimization):
4076 Move from c-common.c.
4077 * c-tree.h: Declare decl_constant_value_for_optimization.
4078 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4079
e9e32ee6
JM
40802015-12-02 Joseph Myers <joseph@codesourcery.com>
4081
4082 PR c/68162
4083 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4084 following link from declarator to next declarator. Track original
4085 qualified type and pass it to c_build_qualified_type.
4086 * c-typeck.c (c_build_qualified_type): Add arguments
4087 orig_qual_type and orig_qual_indirect.
4088
ff7a55bf
TS
40892015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4090
4091 * c-parser.c (c_parser_omp_clause_name)
4092 (c_parser_oacc_all_clauses): Alphabetical sorting.
4093
657e4e47
JJ
40942015-12-02 Jakub Jelinek <jakub@redhat.com>
4095
4096 PR c/68533
4097 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4098 for diagnostics.
4099
37d5ad46
JB
41002015-12-01 Julian Brown <julian@codesourcery.com>
4101 Cesar Philippidis <cesar@codesourcery.com>
4102 James Norris <James_Norris@mentor.com>
4103
4104 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4105 (c_parser_oacc_clause_use_device): New function.
4106 (c_parser_oacc_all_clauses): Add use_device support.
4107 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4108 (c_parser_oacc_host_data): New function.
4109 (c_parser_omp_construct): Add host_data support.
4110 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4111 * c-typeck.c (c_finish_oacc_host_data): New function.
4112 (c_finish_omp_clauses): Add use_device support.
4113
a4850ce9
JH
41142015-11-29 Jan Hubicka <hubicka@ucw.cz>
4115
4116 PR c/67106
4117 * c-decl.c: Set TYPE_PACKED in variants.
4118
b58d3df2
ML
41192015-11-27 Martin Liska <mliska@suse.cz>
4120
4121 PR c++/68312
4122 * c-array-notation.c (fix_builtin_array_notation_fn):
4123 Use release_vec_vec instead of vec::release.
4124 (build_array_notation_expr): Likewise.
4125 (fix_conditional_array_notations_1): Likewise.
4126 (fix_array_notation_expr): Likewise.
4127 (fix_array_notation_call_expr): Likewise.
4128
aec17bfe
JJ
41292015-11-27 Jakub Jelinek <jakub@redhat.com>
4130
4131 PR c/63326
4132 * c-parser.c (c_parser_compound_statement_nostart): If
4133 last_label is true, use pragma_stmt instead of pragma_compound
4134 as second c_parser_pragma argument.
4135 (c_parser_omp_ordered, c_parser_omp_target_update,
4136 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4137 false as second argument to c_parser_skip_to_pragma_eol after
4138 diagnosing standalone directives used in pragma_stmt context.
4139
688c4de0
IV
41402015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4141
4142 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4143 with "if (ENABLE_OFFLOADING)".
4144
cbd03aee
DM
41452015-11-23 David Malcolm <dmalcolm@redhat.com>
4146
4147 PR objc/68438
4148 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4149 for various Objective-C constructs: Class.name syntax,
4150 @selector(), @protocol(), @encode(), and [] message syntax.
4151
a87a86e1
DM
41522015-11-20 David Malcolm <dmalcolm@redhat.com>
4153
4154 PR 62314
4155 * c-typeck.c (should_suggest_deref_p): New function.
4156 (build_component_ref): Special-case POINTER_TYPE when
4157 generating a "not a structure of union" error message, and
4158 suggest a "->" rather than a ".", providing a fix-it hint.
4159
8ece8dfb
DM
41602015-11-19 David Malcolm <dmalcolm@redhat.com>
4161
4162 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4163 candidate into a new function, find_closest_identifier.
4164
433068cc
MP
41652015-11-19 Marek Polacek <polacek@redhat.com>
4166
4167 PR c/68412
4168 * c-typeck.c (parser_build_binary_op): Properly handle
4169 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4170
bef08b71
DM
41712015-11-17 David Malcolm <dmalcolm@redhat.com>
4172
4173 * c-parser.c (set_c_expr_source_range): Bulletproof both
4174 overloaded implementations against NULL expr->value.
4175 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4176 values.
4177 (c_parser_unary_expression): Likewise when handling addresses of
4178 labels.
4179 (c_parser_postfix_expression): Likewise for statement expressions,
4180 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4181 __builtin_va_arg, and for __builtin_offset_of.
4182 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4183 src_range using the range of the braced initializer.
4184 (c_parser_transaction_expression): Set src_range for "ret" to a
4185 sane pair of values.
4186
fff77217
KY
41872015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4188
4189 * c-parser.c (c_finish_omp_declare_simd): Look for
4190 "simd" attribute as well. Update error message.
4191
1d899da2
TS
41922015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4193
4194 * c-parser.c (c_parser_omp_declare_target): Adjust.
4195
e4606348
JJ
41962015-11-14 Jakub Jelinek <jakub@redhat.com>
4197
4198 * c-typeck.c (c_finish_omp_clauses): Don't mark
4199 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4200
3e636daf
MP
42012015-11-14 Marek Polacek <polacek@redhat.com>
4202
4203 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4204 * c-typeck.c: Likewise.
4205
ebedc9a3
DM
42062015-11-13 David Malcolm <dmalcolm@redhat.com>
4207
4208 * c-decl.c (warn_defaults_to): Pass line_table to
4209 rich_location ctor.
4210 * c-errors.c (pedwarn_c99): Likewise.
4211 (pedwarn_c90): Likewise.
4212 * c-parser.c (set_c_expr_source_range): New functions.
4213 (c_token::get_range): New method.
4214 (c_token::get_finish): New method.
4215 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4216 based on the range from the start of the LHS to the end of the
4217 RHS.
4218 (c_parser_conditional_expression): Likewise, based on the range
4219 from the start of the cond.value to the end of exp2.value.
4220 (c_parser_binary_expression): Call set_c_expr_source_range on
4221 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4222 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4223 based on the cast_loc through to the end of the expr.
4224 (c_parser_unary_expression): Likewise, based on the
4225 op_loc through to the end of op.
4226 (c_parser_sizeof_expression) Likewise, based on the start of the
4227 sizeof token through to either the closing paren or the end of
4228 expr.
4229 (c_parser_postfix_expression): Likewise, using the token range,
4230 or from the open paren through to the close paren for
4231 parenthesized expressions.
4232 (c_parser_postfix_expression_after_primary): Likewise, for
4233 various kinds of expression.
4234 * c-tree.h (struct c_expr): Add field "src_range".
4235 (c_expr::get_start): New method.
4236 (c_expr::get_finish): New method.
4237 (set_c_expr_source_range): New decls.
4238 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4239 on ret for prefix unary ops.
4240 (parser_build_binary_op): Likewise, running from the start of
4241 arg1.value through to the end of arg2.value.
4242
ec8b536f
MP
42432015-11-13 Marek Polacek <polacek@redhat.com>
4244
4245 PR c/68320
4246 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4247
277fe616
DM
42482015-11-13 David Malcolm <dmalcolm@redhat.com>
4249
4250 * c-typeck.c: Include spellcheck.h.
4251 (lookup_field_fuzzy_find_candidates): New function.
4252 (lookup_field_fuzzy): New function.
4253 (build_component_ref): If the field was not found, try using
4254 lookup_field_fuzzy and potentially offer a suggestion.
4255
6e232ba4
JN
42562015-11-12 James Norris <jnorris@codesourcery.com>
4257 Joseph Myers <joseph@codesourcery.com>
4258
4259 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4260 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4261 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4262 and PRAGMA_OMP_CLAUSE_LINK.
4263 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4264 and PRAGMA_OACC_CLAUSE_LINK.
4265 (OACC_DECLARE_CLAUSE_MASK): New definition.
4266 (c_parser_oacc_declare): New function.
4267
9be4f715
MP
42682015-11-12 Marek Polacek <polacek@redhat.com>
4269
4270 PR c/67784
4271 * c-parser.c (c_parser_for_statement): Reclassify the token in
4272 a correct scope.
4273
e78bede6
MP
42742015-11-11 Marek Polacek <polacek@redhat.com>
4275
4276 PR c/68107
4277 PR c++/68266
4278 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4279 checking the size of an array.
4280
69f293c9
AM
42812015-11-11 Andrew MacLeod <amacleod@redhat.com>
4282
4283 * c-array-notation.c: Remove unused header files.
4284 * c-aux-info.c: Likewise.
4285 * c-convert.c: Likewise.
4286 * c-decl.c: Likewise.
4287 * c-errors.c: Likewise.
4288 * c-lang.c: Likewise.
4289 * c-objc-common.c: Likewise.
4290 * c-parser.c: Likewise.
4291 * c-typeck.c: Likewise.
4292 * gccspec.c: Likewise.
4293
3a40d81d
NS
42942015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4295 Cesar Philippidis <cesar@codesourcery.com>
4296 James Norris <jnorris@codesourcery.com>
4297 Julian Brown <julian@codesourcery.com>
4298 Nathan Sidwell <nathan@codesourcery.com>
4299
3a40d81d
NS
4300 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4301 routine arg.
4302 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4303 (c_parser_pragma): Parse 'acc routine'.
4304 (OACC_ROUTINE_CLAUSE_MARK): Define.
4305 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4306
fc402eec
AA
43072015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4308
4309 PR debug/67192
4310 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4311 location of the backward-goto to the start of the loop body.
4312
f6b0b3db
AA
43132015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4314
4315 PR debug/67192
4316 * c-parser.c (c_parser_while_statement): Finish the loop before
4317 parsing ahead for misleading indentation.
4318 (c_parser_for_statement): Likewise.
4319
ee45a32d
EB
43202015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4321
4322 * c-decl.c (finish_struct): If the structure has reverse storage
4323 order, rewrite the type of array fields with scalar component. Call
4324 maybe_apply_pragma_scalar_storage_order on entry.
4325 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4326 errors on bit-fields and reverse SSO here and not...
4327 (c_mark_addressable): ...here.
4328 (output_init_element): Adjust call to initializer_constant_valid_p.
4329 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4330
8a645150
DM
43312015-11-06 David Malcolm <dmalcolm@redhat.com>
4332
4333 * c-decl.c (warn_defaults_to): Update for change in signature
4334 of diagnostic_set_info.
4335 * c-errors.c (pedwarn_c99): Likewise.
4336 (pedwarn_c90): Likewise.
4337 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4338 for textinfo::set_location.
4339
7a5e4956
CP
43402015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4341 Thomas Schwinge <thomas@codesourcery.com>
4342 James Norris <jnorris@codesourcery.com>
4343
4344 * c-parser.c (c_parser_omp_clause_name): Add support for
4345 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4346 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4347 default(none) in OpenACC.
4348 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4349 arguments.
4350 (c_parser_oacc_clause_tile): New function.
4351 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4352 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4353 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4354 TILE}.
4355 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4356 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4357 FIRSTPRIVATE}.
4358 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4359 (c_parser_oacc_update): Update the error message for missing clauses.
4360 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4361 and OMP_CLAUSE_INDEPENDENT.
4362
bfcfbfa0
MP
43632015-11-05 Marek Polacek <polacek@redhat.com>
4364
4365 PR c/68090
4366 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4367 deal with pre-evaluation on invalid types.
4368
e01d41e5
JJ
43692015-11-05 Jakub Jelinek <jakub@redhat.com>
4370 Ilya Verbin <ilya.verbin@intel.com>
4371
4372 * c-parser.c: Include context.h and gimple-expr.h.
4373 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4374 monotonic together with nonmonotonic.
4375 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4376 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4377 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4378 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4379 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4380 expressions on combined target teams before the target.
4381 (c_parser_omp_declare_target): If decl has "omp declare target" or
4382 "omp declare target link" attribute, and cgraph or varpool node already
4383 exists, then set corresponding flags. Call c_finish_omp_clauses
4384 in the parenthesized extended-list syntax case.
4385 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4386 declare target.
4387 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4388 on OMP_CLAUSE_REDUCTION array sections.
4389 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4390 into the constant offset, or for variable low-bound using
4391 POINTER_PLUS_EXPR. For structure element based array sections use
4392 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4393 (c_finish_omp_clauses): Drop generic_field_head, structure
4394 elements are now always mapped even as array section bases,
4395 diagnose same var in data sharing and mapping clauses. Diagnose if
4396 linear step on declare simd is neither a constant nor a uniform
4397 parameter. Look through POINTER_PLUS_EXPR for array section
4398 reductions. Diagnose the same var or function appearing multiple
4399 times on the same directive. Fix up wording for the to clause if t
4400 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4401 modifier on kinds other than dynamic or guided or nonmonotonic
4402 modifier together with ordered clause.
4403
4bf9e5a8
TS
44042015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4405 Chung-Lin Tang <cltang@codesourcery.com>
4406
4407 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4408
2adfab87
AM
44092015-10-29 Andrew MacLeod <amacleod@redhat.com>
4410
4411 * c-array-notation.c: Reorder #include's and remove duplicates.
4412 * c-aux-info.c: Likewise.
4413 * c-convert.c: Likewise.
4414 * c-decl.c: Likewise.
4415 * c-errors.c: Likewise.
4416 * c-lang.c: Likewise.
4417 * c-objc-common.c: Likewise.
4418 * c-parser.c: Likewise.
4419 * c-typeck.c: Likewise.
4420
e922069e
JW
44212015-10-26 Jim Wilson <jim.wilson@linaro.org>
4422
4423 PR debug/66068
4424 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4425 after calling build_qualified_type.
4426
765dd391
CP
44272015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4428 Thomas Schwinge <thomas@codesourcery.com>
4429 James Norris <jnorris@codesourcery.com>
4430 Joseph Myers <joseph@codesourcery.com>
4431 Julian Brown <julian@codesourcery.com>
4432 Bernd Schmidt <bschmidt@redhat.com>
4433
4434 * c-parser.c (c_parser_oacc_shape_clause): New.
4435 (c_parser_oacc_simple_clause): New.
4436 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4437 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4438
88bae6f4
TS
44392015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4440 James Norris <jnorris@codesourcery.com>
4441 Cesar Philippidis <cesar@codesourcery.com>
4442
4443 PR c/64765
4444 PR c/64880
4445 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4446 parameters, and handle these. Adjust all users.
4447 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4448 into...
4449 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4450 all users.
4451 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4452 declare functions.
4453 (c_finish_omp_construct): Declare function.
4454 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4455 Merge functions into...
4456 (c_finish_omp_construct): ... this new function.
4457
a8fc2579
RB
44582015-10-22 Richard Biener <rguenther@suse.de>
4459
4460 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4461 before folding a MINUS_EXPR.
4462
e9122ef6
MP
44632015-10-21 Marek Polacek <polacek@redhat.com>
4464
4465 PR c/68024
4466 * c-decl.c (start_function): Warn about vararg functions without
4467 a prototype.
4468
9f47c7e5
IE
44692015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4470
4471 * c-typeck.c (build_conditional_expr): Use boolean vector
4472 type for vector comparison.
4473 (build_vec_cmp): New.
4474 (build_binary_op): Use build_vec_cmp for comparison.
4475
fa60eeb9
MP
44762015-10-20 Marek Polacek <polacek@redhat.com>
4477
4478 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4479
2c7020eb
MP
44802015-10-20 Marek Polacek <polacek@redhat.com>
4481
4482 PR c/67964
4483 * c-parser.c (c_parser_attributes): Break out of the loop if the
4484 token after an attribute isn't a comma.
4485
d9a6bd32
JJ
44862015-10-13 Jakub Jelinek <jakub@redhat.com>
4487 Aldy Hernandez <aldyh@redhat.com>
4488
4489 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4490 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4491 (c_parser_omp_variable_list): Handle structure elements for
4492 map, to and from clauses. Handle array sections in reduction
4493 clause. Formatting fixes.
4494 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4495 if clause modifiers.
4496 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4497 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4498 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4499 c_parser_omp_clause_is_device_ptr): New functions.
4500 (c_parser_omp_clause_ordered): Parse optional parameter.
4501 (c_parser_omp_clause_reduction): Handle array reductions.
4502 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4503 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4504 functions.
4505 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4506 (c_parser_omp_clause_depend_sink): New function.
4507 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4508 (c_parser_omp_clause_map): Parse release/delete map kinds and
4509 optional always modifier.
4510 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4511 and c_finish_omp_clauses callers.
4512 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4513 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4514 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4515 (OMP_CRITICAL_CLAUSE_MASK): Define.
4516 (c_parser_omp_critical): Parse critical clauses.
4517 (c_parser_omp_for_loop): Handle doacross loops, adjust
4518 c_finish_omp_for and c_finish_omp_clauses callers.
4519 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4520 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4521 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4522 (c_parser_omp_for): Disallow ordered clause when combined with
4523 distribute. Disallow linear clause when combined with distribute
4524 and not combined with simd.
4525 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4526 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4527 parse clauses and if depend clause is found, don't parse a body.
4528 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4529 Allow target parallel without for after it.
4530 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4531 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4532 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4533 invalid kinds.
4534 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4535 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4536 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4537 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4538 functions.
4539 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4540 defaultmap and is_device_ptr clauses.
4541 (c_parser_omp_target): Parse target parallel and target simd. Set
4542 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4543 and target exit data. Diagnose invalid map kinds.
4544 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4545 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4546 construct.
4547 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4548 &omp_priv.
4549 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4550 (c_parser_omp_taskloop): New function.
4551 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4552 handle PRAGMA_OMP_TASKLOOP.
4553 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4554 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4555 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4556 Add IS_OMP argument, handle structure element bases, diagnose
4557 bitfields, pass IS_OMP recursively, diagnose known zero length
4558 array sections in depend clauses, handle array sections in reduction
4559 clause, diagnose negative length even for pointers.
4560 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4561 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4562 array sections in reduction clause, set
4563 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4564 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4565 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4566 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4567
21ba0cea
MP
45682015-10-06 Marek Polacek <polacek@redhat.com>
4569
4570 * c-parser.c (c_parser_statement_after_labels): Use
4571 protected_set_expr_location.
4572 (c_parser_omp_clause_num_gangs): Likewise.
4573 (c_parser_omp_clause_num_threads): Likewise.
4574 (c_parser_omp_clause_num_workers): Likewise.
4575 (c_parser_omp_clause_vector_length): Likewise.
4576 (c_parser_omp_clause_num_teams): Likewise.
4577 (c_parser_omp_clause_thread_limit): Likewise.
4578 * c-typeck.c (build_c_cast): Likewise.
4579 (c_cast_expr): Likewise.
4580
624d31fe
RS
45812015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4582
4583 * c-typeck.c (c_tree_equal): Use real_equal instead of
4584 REAL_VALUES_EQUAL.
4585
b8fd7909
JM
45862015-10-04 Jason Merrill <jason@redhat.com>
4587
4588 * c-parser.c (c_lex_one_token): Handle @synchronized.
4589 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4590 can change whether the function is transaction_safe.
4591
1c7485af
MP
45922015-10-02 Marek Polacek <polacek@redhat.com>
4593
4594 PR c/67730
4595 * c-typeck.c (convert_for_assignment): Use the expansion point
4596 location throughout.
4597
3e3b8d63
MP
45982015-10-02 Marek Polacek <polacek@redhat.com>
4599
4600 PR c/64249
4601 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4602 and pass it down to c_parser_if_statement.
4603 (c_parser_else_body): Add CHAIN parameter and pass it down to
4604 c_parser_statement_after_labels.
4605 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4606 duplicated if-else-if conditions.
4607
aabef2de
MP
46082015-10-01 Marek Polacek <polacek@redhat.com>
4609
4610 * c-typeck.c (convert_for_assignment): Improve commentary.
4611
de8ddd5f
MP
46122015-09-30 Marek Polacek <polacek@redhat.com>
4613
4614 PR c/67730
4615 * c-typeck.c (c_finish_return): Use the expansion point location for
4616 certain "return with value" warnings.
4617
c4914de6
MLI
46182015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4619
4620 * c-parser.c (pragma_lex): Add loc argument.
4621
0e36f5c7
MP
46222015-09-15 Marek Polacek <polacek@redhat.com>
4623
4624 PR c/67580
4625 * c-decl.c (tag_exists_p): New function.
4626 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4627 struct/union/enum keywords are missing.
4628 * c-tree.h (tag_exists_p): Declare.
4629
2f3bb934
MP
46302015-09-15 Marek Polacek <polacek@redhat.com>
4631
4632 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4633 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4634 Return NULL_TREE instead of 0.
4635 (lookup_name): Return NULL_TREE instead of 0.
4636 (lookup_name_in_scope): Likewise.
4637 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4638 (parser_xref_tag): Use false instead of 0.
4639 (start_struct): Use true instead of 1.
4640 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4641
aa256c4a
MP
46422015-09-14 Marek Polacek <polacek@redhat.com>
4643
4644 * c-typeck.c (set_nonincremental_init_from_string): Use
4645 HOST_WIDE_INT_M1U when shifting a negative value.
4646
dbb68221
MW
46472015-09-09 Mark Wielaard <mjw@redhat.com>
4648
4649 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4650 parm against NULL.
4651
a8a098ac
JJ
46522015-09-10 Jakub Jelinek <jakub@redhat.com>
4653
4654 PR c/67502
4655 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4656 into OMP_FOR_PRE_BODY rather than before the loop.
4657
f4b189d5
JJ
46582015-09-09 Jakub Jelinek <jakub@redhat.com>
4659
0bb99c11
JJ
4660 PR c/67501
4661 * c-parser.c (c_parser_oacc_all_clauses,
4662 c_parser_omp_all_clauses): Remove invalid clause from
4663 list of clauses even if parser->error is set.
4664
fce5e5e3
JJ
4665 PR c/67500
4666 * c-parser.c (c_parser_omp_clause_aligned,
4667 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4668 test for errors.
4669 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4670 error_mark_node.
4671
f4b189d5
JJ
4672 PR c/67495
4673 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4674 instead of c_parser_unary_expression. If the result is !lvalue_p,
4675 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4676
b2aaf235
MP
46772015-09-04 Marek Polacek <polacek@redhat.com>
4678
4679 PR sanitizer/67279
4680 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4681
1807ffc1
MS
46822015-09-03 Martin Sebor <msebor@redhat.com>
4683
4684 PR c/66516
8b652e65
JJ
4685 * c-typeck.c (convert_arguments, parser_build_unary_op,
4686 build_conditional_expr, c_cast_expr, convert_for_assignment,
4687 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4688 reject_gcc_builtin.
4689 (c_decl_implicit): Define.
4690
d04ff417
MP
46912015-09-02 Marek Polacek <polacek@redhat.com>
4692
4693 PR c/67432
4694 * c-parser.c (c_parser_enum_specifier): Give a better error for
4695 an empty enum.
4696
a79683d5
TS
46972015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4698
4699 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4700
191a6b94
MP
47012015-08-12 Marek Polacek <polacek@redhat.com>
4702
4703 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4704 LOC to it.
4705
420a9d9b
MP
47062015-08-03 Marek Polacek <polacek@redhat.com>
4707
4708 PR c/67088
4709 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4710 Use it.
4711 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4712
992118a1
PP
47132015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4714
4715 * c-parser.c (c_parser_if_body): Take token_indent_info
4716 argument. Call warn_for_misleading_indentation even when the
4717 body is a semicolon. Extract token_indent_infos corresponding
4718 to the guard, body and next tokens. Adjust call to
4719 warn_for_misleading_indentation accordingly.
4720 (c_parser_else_body): Likewise.
4721 (c_parser_if_statement): Likewise.
4722 (c_parser_while_statement): Likewise.
4723 (c_parser_for_statement): Likewise.
4724
46308474
LFSM
47252015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4726 Manuel López-Ibáñez <manu@gcc.gnu.org>
4727
4728 * c-decl.c (get_parm_info): Remove static var. Update warning
4729 message.
4730
05b28fd6
MP
47312015-07-27 Marek Polacek <polacek@redhat.com>
4732
4733 PR c++/66555
4734 PR c/54979
4735 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4736
451b5e48
MP
47372015-07-20 Marek Polacek <polacek@redhat.com>
4738
4739 PR c++/55095
4740 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4741 (build_binary_op): Warn about left shift overflows.
4742
1916bcb5
AM
47432015-07-09 Andrew MacLeod <amacleod@redhat.com>
4744
4745 * c-array-notation.c: Adjust includes for flags.h changes.
4746 * c-objc-common.c: Likewise.
4747
c7131fb2
AM
47482015-07-07 Andrew MacLeod <amacleod@redhat.com>
4749
4750 * c-array-notation.c: Adjust includes.
4751 * c-aux-info.c: Likewise.
4752 * c-convert.c: Likewise.
4753 * c-decl.c: Likewise.
4754 * c-errors.c: Likewise.
4755 * c-lang.c: Likewise.
4756 * c-objc-common.c: Likewise.
4757 * c-parser.c: Likewise.
4758 * c-typeck.c: Likewise.
4759
da2e71c9
MLI
47602015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4761
4762 PR fortran/66605
4763 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4764
b155cfd9
MP
47652015-06-29 Marek Polacek <polacek@redhat.com>
4766
4767 PR c/66322
4768 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4769 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4770 about -Wswitch-bool here.
4771 (do_case): Update c_add_case_label call.
4772 (c_finish_case): Update c_do_switch_warnings call.
4773
31521951
MP
47742015-06-27 Marek Polacek <polacek@redhat.com>
4775
4776 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4777
22d03525
MP
47782015-06-26 Marek Polacek <polacek@redhat.com>
4779
4780 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4781 INDIRECT_REF_P.
4782 * c-typeck.c (array_to_pointer_conversion): Likewise.
4783 (build_unary_op): Likewise.
4784 (c_finish_return): Likewise.
4785
f0889939
AM
47862015-06-25 Andrew MacLeod <amacleod@redhat.com>
4787
4788 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4789 * c-parser.c: Likewise.
4790
8d67ee55
RS
47912015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4792
4793 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4794 instead of pointer_hash.
4795 (detect_field_duplicates): Likewise.
4796
0ae9bd27
MP
47972015-06-25 Marek Polacek <polacek@redhat.com>
4798
4799 * c-array-notation.c: Use VAR_P throughout.
4800 * c-decl.c: Likewise.
4801 * c-objc-common.c: Likewise.
4802 * c-parser.c: Likewise.
4803 * c-typeck.c: Likewise.
4804
62f9079a
MP
48052015-06-25 Marek Polacek <polacek@redhat.com>
4806
4807 * c-decl.c: Use is_global_var throughout.
4808 * c-parser.c: Likewise.
4809 * c-typeck.c: Likewise.
4810
abb226c9
AM
48112015-06-17 Andrew MacLeod <amacleod@redhat.com>
4812
4813 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4814 * c-aux-info.c: Likewise.
4815 * c-convert.c: Likewise.
4816 * c-decl.c: Likewise.
4817 * c-errors.c: Likewise.
4818 * c-lang.c: Likewise.
4819 * c-objc-common.c: Likewise.
4820 * c-parser.c: Likewise.
4821 * c-typeck.c: Likewise.
4822
8cbababc
JH
48232015-06-11 Jan Hubicka <hubicka@ucw.cz>
4824
4825 PR middle-end/66325
4826 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4827 variants.
4828
a0349665
PMR
48292015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4830
4831 * c-decl.c (pop_scope): Register the main translation unit
4832 through the new debug hook.
4833
13fdf2e2
AM
48342015-06-08 Andrew MacLeod <amacleod@redhat.com>
4835
4836 * c-array-notation.c : Adjust include files.
4837 * c-aux-info.c : Likewise.
4838 * c-convert.c : Likewise.
4839 * c-decl.c : Likewise.
4840 * c-errors.c : Likewise.
4841 * c-lang.c : Likewise.
4842 * c-lang.h : Likewise.
4843 * c-objc-common.c : Likewise.
4844 * c-parser.c : Likewise.
4845 * c-typeck.c : Likewise.
4846
d7438551
AH
48472015-06-05 Aldy Hernandez <aldyh@redhat.com>
4848
4849 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4850 immediately clobber it.
4851 (c_write_global_declarations_1): Remove call to
4852 check_global_declaration_1.
4853 (c_write_global_declarations_2): Remove.
4854 (c_write_final_cleanups): Rename from c_write_global_declarations.
4855 Remove call to finalize_compilation_unit.
4856 Remove calls to debugging hooks.
4857 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4858 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4859 * c-tree.h: Remove c_write_global_declarations.
4860
ecb9f223
AM
48612015-06-04 Andrew MacLeod <amacleod@redhat.com>
4862
4863 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4864 * c-aux-info.c: Likewise.
4865 * c-convert.c: Likewise.
4866 * c-decl.c: Likewise.
4867 * c-errors.c: Likewise.
4868 * c-lang.c: Likewise.
4869 * c-objc-common.c: Likewise.
4870 * c-parser.c: Likewise.
4871 * c-typeck.c: Likewise.
4872
9482b620
MP
48732015-06-04 Marek Polacek <polacek@redhat.com>
4874
4875 PR c/66341
4876 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4877 it is a lvalue.
4878
bc51ace3
PK
48792015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4880
4881 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4882 Warn for empty struct.
4883 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4884
ea5b45b6
AT
48852015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4886
4887 * c-decl.c (start_function): Call plugin before parsing.
4888 (finish_function): Call plugin after parsing.
4889
c2d47482
PK
48902015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4891
4892 PR c/49551
4893 * c-decl.c (merge_decls): Merge DECL_COMMON.
4894
a95492ab
JW
48952015-05-22 Jim Wilson <jim.wilson@linaro.org>
4896
4897 * Make-lang.in (check_gcc_pallelize): Define.
4898
fd5c817a
MP
48992015-05-22 Marek Polacek <polacek@redhat.com>
4900
4901 PR c/47043
4902 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4903 attributes.
4904
c7b70a3c
MP
49052015-05-21 Marek Polacek <polacek@redhat.com>
4906
4907 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4908 DECL_BUILT_IN.
4909
21b634ae
MP
49102015-05-20 Marek Polacek <polacek@redhat.com>
4911
4912 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4913 * c-typeck.c: Likewise.
4914
296a8c2f
MP
49152015-05-19 Marek Polacek <polacek@redhat.com>
4916
4917 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4918
41b37d5e
JJ
49192015-05-19 Jakub Jelinek <jakub@redhat.com>
4920
4921 PR middle-end/66199
4922 * c-parser.c (c_parser_omp_for_loop): Don't add
4923 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4924 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4925 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4926 constructs.
4927
fab27f52
MM
49282015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4929
4930 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4931 swaps.
fab27f52 4932
40de31cf
MLI
49332015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4934
4935 PR fortran/44054
4936 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4937 accessor function.
4938
3aa3c9fc
MP
49392015-05-14 Marek Polacek <polacek@redhat.com>
4940
4941 PR c/66066
4942 PR c/66127
4943 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4944 rather than with 0.
4945
c3388e62
DM
49462015-05-12 David Malcolm <dmalcolm@redhat.com>
4947
4948 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4949 to add a call to warn_for_misleading_indentation.
4950 (c_parser_else_body): Likewise, adding param "else_loc".
4951 (c_parser_if_statement): Check for misleading indentation.
4952 (c_parser_while_statement): Likewise.
4953 (c_parser_for_statement): Likewise.
4954
755e528f
MP
49552015-05-08 Marek Polacek <polacek@redhat.com>
4956
4957 PR c/64918
4958 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4959 (output_init_element): Likewise.
4960
0173bd2a
MP
49612015-05-07 Marek Polacek <polacek@redhat.com>
4962
4963 PR c/65179
4964 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4965 value.
4966
9babc352
MP
49672015-04-30 Marek Polacek <polacek@redhat.com>
4968
4969 * c-typeck.c (set_init_label): Call error_at instead of error and
4970 pass LOC to it.
4971
ac9f18db
MP
4972 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4973 the type of a decl.
4974
ec3fba51
MP
4975 * c-typeck.c (c_build_va_arg): Clarify the error message.
4976
b811915d
TS
49772015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4978
4979 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4980 OMP_STANDALONE_CLAUSES.
4981
f3075008
MP
49822015-04-28 Marek Polacek <polacek@redhat.com>
4983
4984 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4985
4e81b788
MP
49862015-04-28 Marek Polacek <polacek@redhat.com>
4987
4988 PR c/65901
4989 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4990
6c1db78e
MP
49912015-04-25 Marek Polacek <polacek@redhat.com>
4992
4993 PR c/52085
4994 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4995 attribute.
4996
5c4abbb8
MP
49972015-04-23 Marek Polacek <polacek@redhat.com>
4998
4999 PR c/65345
5000 * c-decl.c (set_labels_context_r): New function.
5001 (store_parm_decls): Call it via walk_tree_without_duplicates.
5002 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5003 instead of create_tmp_var. Build TARGET_EXPR instead of
5004 COMPOUND_EXPR.
5005 (build_atomic_assign): Use create_tmp_var_raw instead of
5006 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5007
06aca1d5
IV
50082015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5009
5010 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5011 (c_parser_omp_target_update): Add missed %> to error_at ().
5012
8fba1830
BRF
50132015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5014
5015 PR target/55143
5016 * c-decl.c (c_default_pointer_mode): Remove definition.
5017 * c-tree.h (c_default_pointer_mode): Remove declaration.
5018
62021f64
TB
50192015-03-27 Tobias Burnus <burnus@net-b.de>
5020
5021 PR c/65586
5022 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5023 error out.
5024 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5025 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5026 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5027
9b65e171
JJ
50282015-03-19 Jakub Jelinek <jakub@redhat.com>
5029
5030 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5031 attribute for DECL_EXTERNAL VAR_DECLs.
5032
17958621
JJ
50332015-03-11 Jakub Jelinek <jakub@redhat.com>
5034
5035 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5036 argument.
5037
7ccb1a11
JJ
50382015-03-10 Jakub Jelinek <jakub@redhat.com>
5039
5040 PR c/65120
5041 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5042 before preparing arguments to warn_logical_not_parentheses.
5043
01177669
JJ
50442015-03-09 Jakub Jelinek <jakub@redhat.com>
5045
5046 PR c/65120
5047 * c-typeck.c (parser_build_binary_op): Don't warn for
5048 !!x == y or !b == y where b is _Bool.
5049
802ac282
MP
50502015-03-09 Marek Polacek <polacek@redhat.com>
5051
5052 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5053 * c-decl.c (grokdeclarator): Likewise.
5054 * c-typeck.c (build_binary_op): Likewise.
5055
e5165b60
MP
50562015-02-27 Marek Polacek <polacek@redhat.com>
5057
5058 PR c/65228
5059 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5060
065d214c
MP
50612015-02-14 Marek Polacek <polacek@redhat.com>
5062
5063 PR c/64768
5064 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5065 declared through a typedef name.
5066
e5d9235b
MP
50672015-02-13 Marek Polacek <polacek@redhat.com>
5068
5069 PR c/65050
5070 * c-decl.c (grokdeclarator): Print also the type when giving
5071 the error message about array's incomplete element type.
5072
fa01ffcc
JJ
50732015-02-11 Jakub Jelinek <jakub@redhat.com>
5074
5075 PR c/64824
5076 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5077 check in the POP macro.
5078
c3e38a03
MP
50792015-02-09 Marek Polacek <polacek@redhat.com>
5080
5081 PR c/64856
5082 * c-typeck.c (process_init_element): Don't always wrap
5083 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5084 initializing a range of elements.
5085
4886ec8e
JJ
50862015-02-04 Jakub Jelinek <jakub@redhat.com>
5087
5088 PR c/64824
5089 PR c/64868
5090 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5091
c3e38a03 50922015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5093
5094 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5095 processing enum declaration.
5096
7b33f0c8
MP
50972015-01-29 Marek Polacek <polacek@redhat.com>
5098
5099 PR c/64709
5100 * c-typeck.c (pop_init_level): If constructor_elements has
5101 exactly one element with integer_zerop value, set constructor_zeroinit
5102 to 1. Remove braces around warning_init call.
5103
dea63e49
JJ
51042015-01-27 Jakub Jelinek <jakub@redhat.com>
5105
5106 PR c/64766
5107 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5108 of FUNCTION_DECLs with error_mark_node.
5109
d38f7dce
JJ
51102015-01-26 Jakub Jelinek <jakub@redhat.com>
5111
5112 PR c/64778
5113 * c-typeck.c (convert_arguments): Return -1 if there are
5114 error_args, even if we've diagnosed too many arguments.
5115
cbf5d0e7
RB
51162015-01-21 Richard Biener <rguenther@suse.de>
5117
5118 PR middle-end/64313
5119 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5120 for builtins the user declared correctly.
5121
41dbbb37
TS
51222015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5123 Bernd Schmidt <bernds@codesourcery.com>
5124 Cesar Philippidis <cesar@codesourcery.com>
5125 James Norris <jnorris@codesourcery.com>
5126 Jakub Jelinek <jakub@redhat.com>
5127 Ilmir Usmanov <i.usmanov@samsung.com>
5128
5129 * c-parser.c: Include "gomp-constants.h".
5130 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5131 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5132 Use OMP_CLAUSE_SET_MAP_KIND.
5133 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5134 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5135 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5136 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5137 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5138 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5139 "copyout", "create", "delete", "deviceptr", "gang", "host",
5140 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5141 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5142 "present_or_create", "pcreate", "seq", "self", "vector",
5143 "vector_length", "wait", "worker".
5144 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5145 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5146 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5147 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5148 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5149 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5150 (c_parser_oacc_data_clause_deviceptr)
5151 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5152 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5153 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5154 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5155 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5156 (c_parser_oacc_parallel, c_parser_oacc_update)
5157 (c_parser_oacc_wait): New functions.
5158 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5159 (c_finish_oacc_data): New prototypes.
5160 * c-typeck.c: Include "gomp-constants.h".
5161 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5162 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5163 OMP_CLAUSE_SET_MAP_KIND.
5164 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5165 (c_finish_oacc_data): New functions.
5166 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5167 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5168 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5169 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5170 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5171 GOMP_MAP_FORCE_DEVICEPTR.
5172
adfac8df
JJ
51732015-01-09 Michael Collison <michael.collison@linaro.org>
5174
5175 * c-array-notation.c: Include hash-set.h, machmode.h,
5176 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5177 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5178 * c-aux-info.c: Ditto.
5179 * c-convert.c: Ditto.
5180 * c-decl.c: Ditto.
5181 * c-errors.c: Ditto.
5182 * c-lang.c: Dittoxs.
5183 * c-objc-common.c: Ditto.
5184 * c-parser.c: Ditto.
5185 * c-typeck.c: Include hash-set.h, machmode.h,
5186 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5187 fold-const.h, wide-int.h, inchash.h, real.h and
5188 fixed-value.h due to flattening of tree.h.
5189
2cc901dc
MP
51902015-01-07 Marek Polacek <polacek@redhat.com>
5191
5192 PR c/64417
5193 * c-typeck.c (process_init_element): Disallow initialization of
5194 a flexible array member with a string constant if the structure
5195 is in an array.
5196
5624e564
JJ
51972015-01-05 Jakub Jelinek <jakub@redhat.com>
5198
e5341100
JJ
5199 PR sanitizer/64344
5200 * c-typeck.c (convert_for_assignment, c_finish_return): For
5201 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5202 types also set in_late_binary_op around convert call.
5203 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5204 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5205 result on expr as last argument to ubsan_instrument_float_cast,
5206 if in_late_binary_op, don't use c_save_expr but save_expr.
5207
5624e564
JJ
5208 Update copyright years.
5209
5bd012f8
MP
52102015-01-05 Marek Polacek <polacek@redhat.com>
5211
5212 PR c/64423
5213 * c-typeck.c (build_array_ref): Pass loc down to
5214 warn_array_subscript_with_type_char.
5215
3f8257db 52162014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5217
5218 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5219 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5220 element type.
8e745a17 5221 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5222 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5223 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5224 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5225 to PEDWARN_FOR_QUALIFIERS.
768952be 5226
8f94a8c4
JJ
52272014-12-17 Jakub Jelinek <jakub@redhat.com>
5228
5229 PR sanitizer/64289
5230 * c-convert.c: Include ubsan.h.
5231 (convert): For real -> integral casts and
5232 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5233 instead instrument the float cast directly.
5234
b731b390
JJ
52352014-11-29 Jakub Jelinek <jakub@redhat.com>
5236
5237 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5238 c_finish_stmt_expr): Remove NULL last argument from
5239 create_tmp_var_raw and create_tmp_var calls.
5240 * c-array-notation.c (fix_builtin_array_notation_fn,
5241 build_array_notation_expr, fix_conditional_array_notations_1,
5242 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5243
541e35a6
MP
52442014-11-28 Marek Polacek <polacek@redhat.com>
5245
5246 PR c/63862
5247 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5248 convert the right operand to integer type.
5249
b286be94
MP
52502014-11-25 Marek Polacek <polacek@redhat.com>
5251
5252 PR c/63877
5253 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5254 for inline functions.
5255
aa7da51a
JJ
52562014-11-21 Jakub Jelinek <jakub@redhat.com>
5257
5258 PR target/63764
5259 * c-typeck.c (build_array_ref): Adjust
5260 convert_vector_to_pointer_for_subscript caller. If it returns true,
5261 call non_lvalue_loc on the result.
5262
d876207f
RB
52632014-11-11 Richard Biener <rguenther@suse.de>
5264
5265 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5266 to true.
5267
e5e44252
AK
52682014-11-10 Andi Kleen <ak@linux.intel.com>
5269
5270 PR c/60804
5271 * c-parser.c (c_parser_statement_after_labels): Call
5272 check_no_cilk.
5273 (c_parser_if_statement): Dito.
5274 (c_parser_switch_statement): Dito.
5275 (c_parser_while_statement): Dito.
5276 (c_parser_do_statement): Dito.
5277 (c_parser_for_statement): Dito.
5278 * c-typeck.c (c_finish_loop): Dito.
5279
13c21655
PC
52802014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5281
5282 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5283 OPT_Wshift_count_overflow in the warnings.
5284
2d51fcef
MP
52852014-10-30 Marek Polacek <polacek@redhat.com>
5286
5287 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5288 print the stripped version as well, if they're not the same.
5289
ef4bddc2
RS
52902014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5291
5292 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5293 machine_mode.
5294
c582198b
AM
52952014-10-28 Andrew MacLeod <amacleod@redhat.com>
5296
5297 * c-decl.c: Adjust include files.
5298 * c-parser.c: Ditto.
5299
ddc8de03
PM
53002014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5301 Tom Tromey <tromey@redhat.com>
5302
5303 * c-tree.h (enum c_oracle_request): New.
5304 (c_binding_oracle_function): New typedef.
5305 (c_binding_oracle, c_pushtag, c_bind): Declare.
5306 * c-decl.c (c_binding_oracle): New global.
5307 (I_SYMBOL_CHECKED): New macro.
5308 (i_symbol_binding): New function.
5309 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5310 (I_TAG_CHECKED): New macro.
5311 (i_tag_binding): New function.
5312 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5313 (I_LABEL_CHECKED): New macro.
5314 (i_label_binding): New function.
5315 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5316 (c_print_identifier): Save and restore c_binding_oracle.
5317 (c_pushtag, c_bind): New functions.
5318
60393bbc
AM
53192014-10-27 Andrew MacLeod <amacleod@redhat.com>
5320
5321 * c-typeck.c: Adjust include files.
5322
d723bb7c
MLI
53232014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5324
5325 PR c++/53061
5326 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5327 initialization here...
5328 (c_initialize_diagnostics): ... but here. Set defaults after
5329 building pretty-printer.
5330
1bc5a451
MP
53312014-10-23 Marek Polacek <polacek@redhat.com>
5332
5333 PR c/63626
5334 * c-decl.c (pop_scope): Don't print warning in external_scope.
5335
4435bb92
MP
53362014-10-19 Marek Polacek <polacek@redhat.com>
5337
5338 PR c/63567
5339 * c-typeck.c (output_init_element): Allow initializing objects with
5340 static storage duration with compound literals even in C99 and add
5341 pedwarn for it.
5342
7278465e
MP
53432014-10-17 Marek Polacek <polacek@redhat.com>
5344
5345 PR c/63567
5346 * c-typeck.c (digest_init): Allow initializing objects with static
5347 storage duration with compound literals even in C99 and add pedwarn
5348 for it.
5349
d9b7be2e
MP
53502014-10-17 Marek Polacek <polacek@redhat.com>
5351
5352 PR c/63543
5353 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5354 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5355 error multiple times. Print the type.
5356
f406ae1f
MP
53572014-10-17 Marek Polacek <polacek@redhat.com>
5358
5359 PR c/63549
5360 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5361 type.
5362
92574c7c
MP
53632014-10-17 Marek Polacek <polacek@redhat.com>
5364
5365 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5366 (start_function): Use OPT_Wimplicit_int instead of 0.
5367 (store_parm_decls_oldstyle): Likewise.
5368
1bc4a978
MT
53692014-10-17 Alan Modra <amodra@gmail.com>
5370
5371 PR middle-end/61848
5372 * c-decl.c (merge_decls): Don't merge section name or tls model
5373 to newdecl symtab node, instead merge to olddecl. Override
5374 existing olddecl section name. Set tls_model for all thread-local
5375 vars, not just OMP thread-private ones. Remove incorrect comment.
5376
83685514
AM
53772014-10-16 Andrew MacLeod <amacleod@redhat.com>
5378
5379 * c-decl.c: Adjust include files.
5380
78a7c317
DD
53812014-10-14 DJ Delorie <dj@redhat.com>
5382
5383 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5384 (c_token_starts_typename): Check all __intN, not just __int128.
5385 (c_token_starts_declspecs): Likewise.
5386 (c_parser_declspecs): Likewise.
5387 (c_parser_attribute_any_word): Likewise.
5388 (c_parser_objc_selector): Likewise.
5389 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5390 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5391 is specified.
5392 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5393 __int128.
5394 (finish_declspecs): Likewise.
5395
74d98c1e
AB
53962014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5397
8e745a17 5398 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5399 the duplicate code.
8e745a17 5400 (c_parser_statement): Call the new function.
74d98c1e 5401
84937de2
MP
54022014-10-09 Marek Polacek <polacek@redhat.com>
5403
5404 PR c/63480
5405 * c-typeck.c (pop_init_level): Don't warn about initializing
5406 with { }.
5407
0382aaa0
MP
54082014-10-07 Marek Polacek <polacek@redhat.com>
5409
5410 PR c/59717
5411 * c-decl.c (header_for_builtin_fn): New function.
5412 (implicitly_declare): Suggest which header to include.
5413
7a0ca710
MP
54142014-10-07 Marek Polacek <polacek@redhat.com>
5415
5416 * c-convert.c (convert): Use error_operand_p.
5417 * c-typeck.c (require_complete_type): Likewise.
5418 (really_atomic_lvalue): Likewise.
5419 (digest_init): Likewise.
5420 (handle_omp_array_sections_1): Likewise.
5421
6bc8a126
MP
54222014-10-03 Marek Polacek <polacek@redhat.com>
5423
5424 PR c/63453
5425 * c-decl.c (pop_scope): Don't warn about "inline function declared
5426 but never defined" for functions marked with gnu_inline attribute.
5427
d90c0a59
JJ
54282014-09-25 Jakub Jelinek <jakub@redhat.com>
5429
5430 PR c++/63249
5431 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5432 on low_bound and length.
5433
083e891e
MP
54342014-09-24 Marek Polacek <polacek@redhat.com>
5435
5436 PR c/61405
5437 PR c/53874
5438 * c-parser.c: Don't define CPP_KEYWORD.
5439 (c_parser_switch_statement): Pass original type to c_finish_case.
5440 * c-tree.h (c_finish_case): Update declaration.
5441 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5442 conditionally to c_do_switch_warnings.
5443
8d95fe25
MP
54442014-09-03 Marek Polacek <polacek@redhat.com>
5445
5446 PR c/62024
5447 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5448 conversions.
5449
9a771876
JJ
54502014-09-02 Jakub Jelinek <jakub@redhat.com>
5451 Balaji V. Iyer <balaji.v.iyer@intel.com>
5452 Igor Zamyatin <igor.zamyatin@intel.com>
5453
5454 * c-parser.c (c_parser_cilk_for): New function.
5455 (c_parser_cilk_grainsize): Likewise.
5456 (c_get_temp_regvar): Likewise.
5457 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5458 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5459 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5460 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5461 case.
5462
b7679d96
CG
54632014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5464
5465 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5466 with using HOST_WIDE_INT without truncation to 'int'
5467
59ea0364
MP
54682014-08-22 Marek Polacek <polacek@redhat.com>
5469
5470 PR c++/62199
5471 * c-typeck.c (parser_build_binary_op): Adjust call to
5472 warn_logical_not_parentheses.
5473
671a475e
IZ
54742014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5475
5476 PR other/62008
5477 * c-parser.c (c_parser_array_notation): Check for correct
5478 type of an array added.
5479
04159acf
MP
54802014-08-19 Marek Polacek <polacek@redhat.com>
5481
5482 PR c++/62153
5483 * c-typeck.c (build_binary_op): If either operand of a comparison
5484 is a boolean expression, call maybe_warn_bool_compare.
5485
c77935ee
PP
54862014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5487
5488 PR c/45584
5489 * c-typeck.c (build_c_cast): Do a conversion even when the
5490 TYPE_MAIN_VARIANTs are the same.
5491
35aff4fb
MP
54922014-08-19 Marek Polacek <polacek@redhat.com>
5493
5494 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5495 pedwarn_c99 instead of pedwarn.
5496 (grokfield): Likewise.
5497 (warn_defaults_to): New function.
5498 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5499 Unconditionally call pedwarn_c99 instead of pedwarn.
5500 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5501 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5502 check flag_isoc11 before.
5503 * c-errors.c (pedwarn_c99): Change the return type to bool.
5504 Handle -Wc99-c11-compat.
5505 * c-parser.c (disable_extension_diagnostics): Handle
5506 warn_c99_c11_compat.
5507 (restore_extension_diagnostics): Likewise.
5508 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5509 instead of pedwarn, don't check flag_isoc11 before.
5510 (c_parser_declspecs): Likewise.
5511 (c_parser_alignas_specifier): Likewise.
5512 (c_parser_alignof_expression): Likewise.
5513 (c_parser_generic_selection): Likewise.
5514 * c-tree.h (pedwarn_c99): Update declaration.
5515 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5516 of pedwarn_c99.
5517
177cce46
MP
55182014-08-19 Marek Polacek <polacek@redhat.com>
5519
5520 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5521 to pedwarn_c90.
5522 * c-errors.c: Include "opts.h".
5523 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5524 * c-parser.c (disable_extension_diagnostics): Handle negative value
5525 of warn_c90_c99_compat, too.
5526 (restore_extension_diagnostics): Likewise.
5527 (c_parser_compound_statement_nostart): Pass
5528 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5529
6dc99c33
MP
55302014-08-12 Marek Polacek <polacek@redhat.com>
5531
5532 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5533 Add pedwarn.
5534 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5535 Likewise.
5536 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5537
3f8257db 55382014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5539
5540 PR c/51849
5541 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5542 Call pedwarn_c90 instead of pedwarn.
5543 (check_bitfield_type_and_width): Likewise.
5544 (declspecs_add_qual): Likewise.
5545 (declspecs_add_type): Likewise.
5546 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5547 Adjust to only call pedwarn_c90.
5548 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5549 pedwarn_c90 instead of pedwarn.
5550 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5551 * c-parser.c (disable_extension_diagnostics): Handle
5552 warn_c90_c99_compat.
5553 (restore_extension_diagnostics): Likewise.
5554 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5555 pedwarn_c90 instead of pedwarn.
5556 (c_parser_initelt): Likewise.
5557 (c_parser_postfix_expression): Likewise.
5558 (c_parser_postfix_expression_after_paren_type): Likewise.
5559 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5560 * c-tree.h: Fix formatting.
5561 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5562 pedwarn_c90 instead of pedwarn.
5563
9f25a338
TS
55642014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5565
5566 * c-typeck.c: Remove include of pointer-set.h.
5567
044331a8
MP
55682014-08-07 Marek Polacek <polacek@redhat.com>
5569
5570 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5571
b787e7a2
TS
55722014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5573
5574 * c-typeck.c: Use hash_map instead of pointer_map.
5575
6e2830c3
TS
55762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5577
5578 * c-decl.c: Use hash_set instead of pointer_set.
5579
a7ee52fb
IZ
55802014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5581
5582 PR middle-end/61455
5583 * c-array-notation.c (expand_array_notations): Handling
5584 of DECL_EXPR added.
5585
b4dfdc11
MG
55862014-07-31 Marc Glisse <marc.glisse@inria.fr>
5587
5588 PR c++/60517
5589 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5590 a local variable.
5591
976d5a22
TT
55922014-07-30 Tom Tromey <tromey@redhat.com>
5593
5594 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5595 field.
5596 (really_start_incremental_init, push_init_level): Initialize
5597 designator_depth.
5598 (pop_init_level): Set global designator_depth.
5599 (process_init_element): Check for designated_init attribute.
5600
30281de2
MP
56012014-07-20 Marek Polacek <polacek@redhat.com>
5602
5603 PR c/61852
5604 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5605 (implicitly_declare): Pass location to implicit_decl_warning.
5606
b108f48f
JJ
56072014-07-14 Jakub Jelinek <jakub@redhat.com>
5608
5609 PR middle-end/61294
5610 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5611 If non-NULL, call c_parser_check_literal_zero.
5612 (c_parser_check_literal_zero): New function.
5613 (c_parser_postfix_expression_after_primary): Adjust
5614 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5615
773ec47f
MP
56162014-07-06 Marek Polacek <polacek@redhat.com>
5617
5618 PR c/6940
5619 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5620 * c-tree.h (C_ARRAY_PARAMETER): Define.
5621 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5622 function parameter.
5623
22e1cf1c 56242014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5625 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5626
5627 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5628 releasing symbol.
5629
52ec0ea3
MP
56302014-07-01 Marek Polacek <polacek@redhat.com>
5631
5632 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5633 instead of 0 to WARN_FOR_ASSIGNMENT.
5634
d5c3d343
MP
56352014-07-01 Marek Polacek <polacek@redhat.com>
5636
5637 PR c/58286
5638 * c-typeck.c (convert_for_assignment): Pass
5639 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5640
6a7253a4
MP
56412014-06-30 Marek Polacek <polacek@redhat.com>
5642
5643 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5644 has no_sanitize_undefined attribute.
5645
5e88a8f4
IZ
56462014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5647
5648 PR middle-end/57541
5649 * c-array-notation.c (fix_builtin_array_notation_fn):
5650 Check for 0 arguments in builtin call. Check that bultin argument is
5651 correct.
5652 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5653 index.
5654
9698b078
SH
56552014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5656
5657 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5658 qualifiers in __auto_type for atomic types.
5659 (c_parser_typeof_specifier): Discard all type qualifiers in
5660 __typeof__ for atomic types.
5661
6e07c515
MP
56622014-06-25 Marek Polacek <polacek@redhat.com>
5663
5664 PR c/61162
5665 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5666 the return expression to c_finish_return.
5667
da6f124d
JJ
56682014-06-25 Jakub Jelinek <jakub@redhat.com>
5669
5670 * c-typeck.c (c_finish_omp_clauses): Make sure
5671 OMP_CLAUSE_LINEAR_STEP has correct type.
5672
c203e8a7
TS
56732014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5674
5675 * c-decl.c: Adjust.
5676
56ad0e38
JJ
56772014-06-24 Jakub Jelinek <jakub@redhat.com>
5678
5679 * c-parser.c (c_parser_omp_for_loop): For
5680 #pragma omp parallel for simd move lastprivate clause from parallel
5681 to for rather than simd.
5682
47c2554f
MP
56832014-06-23 Marek Polacek <polacek@redhat.com>
5684
5685 * c-typeck.c (parser_build_binary_op): Don't call
5686 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5687
56363ffd
JH
56882014-06-15 Jan Hubicka <hubicka@ucw.cz>
5689
5690 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5691 * c-decl.c (merge_decls): Likewise.
5692
d7ff7ae5
MP
56932014-06-09 Marek Polacek <polacek@redhat.com>
5694
5695 PR c/36446
5696 * c-typeck.c (error_init): Call inform instead of error_at.
5697 (pedwarn_init): Call inform instead of pedwarn.
5698 (warning_init): Call inform instead of warning_at.
5699
24d047a3
JH
57002014-06-07 Jan Hubicka <hubicka@ucw.cz>
5701
5702 * c-decl.c (merge_decls): Use set_decl_section_name.
5703 (duplicate_decls): Remove node if it exists.
5704
9bac5cbb
G
57052014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5706
5707 PR c/53119
5708 * c-typeck.c (push_init_level, process_init_element,
5709 pop_init_level): Correct check for zero initialization, move
5710 missing brace warning to respect zero initialization.
5711
8ffcdea8
MP
57122014-06-05 Marek Polacek <polacek@redhat.com>
5713
5714 PR c/56724
5715 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5716
742938c9
MP
57172014-06-05 Marek Polacek <polacek@redhat.com>
5718
5719 PR c/49706
5720 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5721 on the left hand side operand of a comparison.
742938c9 5722
6447c55d
MP
57232014-06-05 Marek Polacek <polacek@redhat.com>
5724
5725 PR c/48062
5726 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5727 Print note only if the warning was printed.
5728
9dc7743c
IZ
57292014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5730
5731 PR c/58942
5732 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5733 with a pointer.
5734
fedfecef
MP
57352014-06-03 Marek Polacek <polacek@redhat.com>
5736
5737 PR c/60439
5738 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5739 c_start_case.
5740 * c-tree.h (c_start_case): Update.
5741 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5742 switch condition has boolean value.
5743
9b2b7279
AM
57442014-06-02 Andrew MacLeod <amacleod@redhat.com>
5745
5746 * c-decl.c: Include builtins.h.
5747 * c-parser.c: Likewise.
5748
5c1bc275
MP
57492014-05-27 Marek Polacek <polacek@redhat.com>
5750
5751 PR c/56724
5752 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5753 error and warning calls to error_at and warning_at. Pass location of
5754 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5755 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5756 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5757
97563bc8
IZ
57582014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5759
5760 PR c/61191
5761 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5762 function parameters.
5763
aede2c10
JH
57642014-05-23 Jan Hubicka <hubicka@ucw.cz>
5765
5766 * c-decl.c (merge_decls): Preserve symtab node pointers.
5767 (duplicate_decls): Free new decl.
5768
edbba2ce
TS
57692014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5770
f3316c6d
TS
5771 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5772 initialization.
5773
edbba2ce
TS
5774 * c-parser.c (c_parser_omp_target): Return bool values.
5775
68c81f24
TS
57762014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5777
5778 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5779 num_teams_loc variable to num_thread_limit_loc.
5780
632f2871
RS
57812014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5782
5783 * c-array-notation.c (expand_array_notations): Use void_node
5784 instead of void_zero_node.
5785
766090c2
TS
57862014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5787
5788 * c-decl.c (finish_struct): Adjust.
5789 (finish_enum): Likewise.
5790 (bind): Adjust.
5791 (record_inline_static): Likewise.
5792 (push_scope): Likewise.
5793 (make_label): Likewise.
5794 (lookup_label_for_goto): Likewise.
5795 (finish_struct): Likewise.
5796 (finish_enum): Likewise.
5797 (store_parm_decls): Likewise.
5798 (c_push_function_context): Likewise.
5799 * c-lang.h: Remove usage of variable_size gty attribute.
5800 * c-parser.c (c_parse_init): Adjust.
5801 (c_parse_file): Likewise.
5802
2b107f6b
MP
58032014-05-13 Marek Polacek <polacek@redhat.com>
5804
5805 PR c/61162
5806 * c-typeck.c (convert_for_assignment): Pass location to
5807 WARN_FOR_ASSIGNMENT instead of input_location.
5808
d033409e
MP
58092014-05-10 Marek Polacek <polacek@redhat.com>
5810
5811 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5812 maybe_warn_string_init.
5813 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5814 maybe_warn_string_init.
5815 * c-tree.h (maybe_warn_string_init): Update declaration.
5816 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5817 Call pedwarn_init with loc instead of with input_location.
5818 (digest_init): Pass init_loc to maybe_warn_string_init.
5819 (pop_init_level): Call pedwarn_init with loc instead of with
5820 input_location.
5821 (set_init_index): Likewise.
5822 (process_init_element): Likewise.
5823
ea58ef42
MP
58242014-05-09 Marek Polacek <polacek@redhat.com>
5825
5826 PR c/61096
5827 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5828 (c_parser_initelt): Pass location to set_init_label. Pass array index
5829 location to set_init_index.
5830 * c-tree.h (push_init_level): Update declaration.
5831 (pop_init_level): Likewise.
5832 (set_init_index): Likewise.
5833 (set_init_label): Likewise.
5834 * c-typeck.c (error_init): Add location parameter. Call error_at
5835 instead of error.
5836 (digest_init): Pass init_loc to error_init.
5837 (really_start_incremental_init):
5838 (push_init_level): Add location parameter. Pass loc to pop_init_level
5839 and error_init.
5840 (pop_init_level): Likewise.
5841 (set_designator): Add location parameter. Pass loc to pop_init_level,
5842 push_init_level, and error_init.
5843 (set_init_index): Add location parameter. Pass loc to error_init and
5844 set_designator.
5845 (set_init_label): Likewise.
5846 (output_init_element): Pass loc to error_init.
5847 (process_init_element): Pass loc to error_init, pop_init_level,
5848 pedwarn_init, and push_init_level.
5849
661a0813
MP
58502014-05-09 Marek Polacek <polacek@redhat.com>
5851
5852 PR c/50459
5853 * c-parser.c (c_parser_attributes): Parse the arguments as an
5854 expression-list if the attribute takes identifier.
5855
2793eeab
MP
58562014-05-08 Marek Polacek <polacek@redhat.com>
5857
5858 PR c/61053
5859 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5860 TYPE_ALIGN_UNIT.
5861
f827930a
MP
58622014-05-08 Marek Polacek <polacek@redhat.com>
5863
5864 PR c/61077
5865 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5866 of main.
5867
1d60af08
KZ
58682014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5869 Mike Stump <mikestump@comcast.net>
5870 Richard Sandiford <rdsandiford@googlemail.com>
5871
5872 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5873 (finish_enum): Use wide-int interfaces.
5874 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5875 * c-typeck.c (build_c_cast): Likewise.
5876 (set_nonincremental_init_from_string): Likewise.
5877 (c_tree_equal): Likewise.
5878
a0e24419
MP
58792014-05-02 Marek Polacek <polacek@redhat.com>
5880
5881 PR c/25801
5882 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5883 Return size_one_node when the type is not complete.
5884 (pointer_diff): Remove comment.
5885 (build_unary_op): Improve error messages.
5886
19fc9faa
MP
58872014-05-02 Marek Polacek <polacek@redhat.com>
5888
5889 * c-typeck.c (c_finish_return): Separate warning_at calls.
5890
63bc4e87
MP
58912014-05-02 Marek Polacek <polacek@redhat.com>
5892
5893 * c-tree.h (error_init): Remove declaration.
5894 (pedwarn_init): Likewise.
5895 * c-typeck.c (error_init): Make static and move above.
5896 (pedwarn_init): Likewise.
5897 (warning_init): Move above.
5898 (maybe_warn_string_init): Likewise.
5899
4bd2511b
JL
59002014-05-01 Jeff Law <law@redhat.com>
5901
5902 Revert:
5903
5904 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5905 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5906 avoid goto.
5907
6a358dcb
MP
59082014-05-02 Marek Polacek <polacek@redhat.com>
5909
5910 PR c/60784
5911 * c-typeck.c (push_init_level): Set constructor_designated to
5912 p->designated for structures.
5913
ae5ebda4
MP
59142014-05-01 Marek Polacek <polacek@redhat.com>
5915
5916 PR c/60915
5917 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5918 function-definition has an attribute after the declarator.
5919
96b40f8d
MP
59202014-05-01 Marek Polacek <polacek@redhat.com>
5921
5922 PR c/60257
5923 * c-typeck.c (warning_init): Add location_t parameter. Call
5924 warning_at instead of warning.
5925 (push_init_level): Pass input_location to warning_init.
5926 (add_pending_init): Add location_t parameter. Pass loc to
5927 warning_init.
5928 (set_nonincremental_init): Pass input_location to add_pending_init.
5929 (set_nonincremental_init_from_string): Likewise.
5930 (output_init_element): Pass loc to warning_init and to
5931 add_pending_init.
5932
32e00768
MP
59332014-05-01 Marek Polacek <polacek@redhat.com>
5934
5935 PR c/43395
5936 * c-typeck.c (c_finish_return): Distinguish between label and variable
5937 when warning about returning local address.
5938
c9379ce2
MP
59392014-05-01 Marek Polacek <polacek@redhat.com>
5940
5941 PR c/29467
5942 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5943 in C89 mode.
5944
d00887e8
MP
59452014-05-01 Marek Polacek <polacek@redhat.com>
5946
5947 PR c/43245
5948 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5949 instead of 0 to WARN_FOR_QUALIFIERS.
5950
5436fa2e
MP
59512014-05-01 Marek Polacek <polacek@redhat.com>
5952
5953 PR c/56989
5954 * c-typeck.c (default_conversion): Use better location for
5955 error call.
5956
f8ed5150
MP
59572014-04-30 Marek Polacek <polacek@redhat.com>
5958
5959 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5960 also when SANITIZE_FLOAT_DIVIDE is on.
5961
8337d1db
MP
59622014-04-30 Marek Polacek <polacek@redhat.com>
5963
5964 PR c/60139
5965 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5966 and pedwarn_init. Use loc insted of input_location.
5967
c4bdc42f
MP
59682014-04-30 Marek Polacek <polacek@redhat.com>
5969
5970 PR c/60351
5971 * c-typeck.c (build_binary_op): Use location when warning about
5972 shift count.
5973
45484dcf
MP
59742014-04-25 Marek Polacek <polacek@redhat.com>
5975
5976 PR c/18079
5977 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5978 always_inline/noinline and hot/cold attributes.
5979
34cf811f
MP
59802014-04-25 Marek Polacek <polacek@redhat.com>
5981
5982 PR c/60114
5983 * c-parser.c (c_parser_initelt): Pass input_location to
5984 process_init_element.
5985 (c_parser_initval): Pass loc to process_init_element.
5986 * c-tree.h (process_init_element): Adjust declaration.
5987 * c-typeck.c (push_init_level): Pass input_location to
5988 process_init_element.
5989 (pop_init_level): Likewise.
5990 (set_designator): Likewise.
5991 (output_init_element): Add location_t parameter. Pass loc to
5992 digest_init.
5993 (output_pending_init_elements): Pass input_location to
5994 output_init_element.
5995 (process_init_element): Add location_t parameter. Pass loc to
5996 output_init_element.
5997
42056eac
JJ
59982014-04-24 Jakub Jelinek <jakub@redhat.com>
5999
6000 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6001 atomic-clause, allow comma in between atomic-clause and
6002 seq_cst.
6003
e162a134
JJ
60042014-04-22 Jakub Jelinek <jakub@redhat.com>
6005
6006 PR c/59073
6007 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6008 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6009
2f6babac
IZ
60102014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6011
6012 PR middle-end/60469
6013 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6014 create_tmp_var instead build_decl for creating temps.
6015 (build_array_notation_expr): Likewise.
6016 (fix_conditional_array_notations_1): Likewise.
6017 (fix_array_notation_expr): Likewise.
6018 (fix_array_notation_call_expr): Likewise.
6019
8edbfaa6
JJ
60202014-03-28 Jakub Jelinek <jakub@redhat.com>
6021
6022 PR c++/60689
6023 * c-tree.h (c_build_function_call_vec): New prototype.
6024 * c-typeck.c (build_function_call_vec): Don't call
6025 resolve_overloaded_builtin here.
6026 (c_build_function_call_vec): New wrapper function around
6027 build_function_call_vec. Call resolve_overloaded_builtin here.
6028 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6029 Call c_build_function_call_vec instead of build_function_call_vec.
6030 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6031 * c-decl.c (finish_decl): Likewise.
6032
7485aeea
MLI
60332014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6034
6035 PR c/55383
6036 * c-typeck.c: Use correct format string in cast-qual warning
6037
b17a8b07
TS
60382014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6039
6040 * c-decl.c (c_decl_attributes): Use
6041 lang_hooks.types.omp_mappable_type.
6042 * c-typeck.c (c_finish_omp_clauses): Likewise.
6043
3af9c5e9
MP
60442014-03-06 Marek Polacek <polacek@redhat.com>
6045
6046 PR c/60197
6047 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6048 of checking tree code.
6049
1c9f5f33
PK
60502014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6051
6052 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6053 (c_parser_parameter_declaration): Likewise.
6054
cc28fc7f
MP
60552014-02-19 Marek Polacek <polacek@redhat.com>
6056
6057 PR c/60195
6058 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6059 Call mark_exp_read on exp.value.
6060 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6061 TREE_ADDRESSABLE on old instead of val.
6062 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6063
b581c05c
PK
60642014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6065
6066 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6067 C_EXPR_APPEND by vec_safe_push.
6068 * c-tree.h (C_EXPR_APPEND): Remove.
6069
81e5eca8
MP
60702014-01-31 Marek Polacek <polacek@redhat.com>
6071
6072 PR c/59963
6073 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6074 build_function_call_vec.
6075 (build_function_call): Likewise.
6076 (build_atomic_assign): Likewise.
6077 (build_function_call_vec): Add arg_loc parameter. Use it.
6078 (convert_arguments): Likewise.
6079 (convert_for_assignment): Rename rhs_loc to expr_loc.
6080 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6081 (c_parser_objc_keywordexpr): Likewise.
6082 (c_parser_postfix_expression_after_primary): Call
6083 build_function_call_vec with expr_loc rather than op_loc.
6084 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6085 build_function_call_vec.
6086 (c_parser_expr_list): Add locations parameter. Fill it with locations
6087 of function arguments.
6088 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6089
68fca595
MP
60902014-01-30 Marek Polacek <polacek@redhat.com>
6091
6092 PR c/59940
6093 * c-typeck.c (build_function_call_vec): Use loc parameter.
6094 (convert_arguments): Add location parameter. Use it.
6095 (ep_convert_and_check): Likewise.
6096 (build_atomic_assign): Adjust convert_for_assignment call.
6097 (build_modify_expr): Likewise.
6098 (digest_init): Likewise.
6099 (c_finish_return): Likewise.
6100 (build_conditional_expr): Adjust ep_convert_and_check calls.
6101 (convert_for_assignment): Add rhs_loc parameter. Use it.
6102 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6103 calls.
6104
fa337f3a
RB
61052014-01-30 Richard Biener <rguenther@suse.de>
6106
6107 PR c/59905
6108 * c-typeck.c (build_function_call_vec): Do not replace calls
6109 to a function via an incompatible type with a runtime abort.
6110
b72271b9
BI
61112014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6112
6113 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6114 flag_enable_cilkplus with flag_cilkplus.
6115 (c_parser_direct_declarator_inner): Likewise.
6116 (c_parser_attribute_any_word): Likewise.
6117 (c_parser_attributes): Likewise.
6118 (c_parser_compound_statement): Likewise.
6119 (c_parser_statement_after_labels): Likewise.
6120 (c_parser_if_statement): Likewise.
6121 (c_parser_switch_statement): Likewise.
6122 (c_parser_do_statement): Likewise.
6123 (c_parser_for_statement): Likewise.
6124 (c_parser_unary_expression): Likewise.
6125 (c_parser_postfix_expression): Likewise.
6126 (c_parser_postfix_expression_after_primary): Likewise.
6127 (c_parser_postfix_expression_after_primary): Likewise.
6128 (c_parser_omp_clause_name): Likewise.
6129 (c_finish_omp_declare_simd): Likewise.
6130 (c_parser_cilk_verify_simd): Likewise.
6131 * c-typeck.c (build_array_ref): Likewise.
6132 (build_function_call_vec): Likewise.
6133 (convert_arguments): Likewise.
6134 (build_compound_expr): Likewise.
6135 (c_finish_return): Likewise.
6136 (c_finish_if_stmt): Likewise.
6137 (c_finish_loop): Likewise.
6138 (build_binary_op): Likewise.
6139
393e8e8b
MP
61402014-01-23 Marek Polacek <polacek@redhat.com>
6141
6142 PR c/59846
6143 * c-typeck.c (parser_build_binary_op): Use location instead of
6144 input_location.
6145 (build_binary_op): Pass location to shorten_compare.
6146
f04dda30
MP
61472014-01-23 Marek Polacek <polacek@redhat.com>
6148
6149 PR c/58346
6150 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6151 an empty aggregate.
6152
789eadcd
MP
61532014-01-23 Marek Polacek <polacek@redhat.com>
6154
6155 PR c/59871
6156 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6157 of a comma expression.
6158 (emit_side_effect_warnings): Likewise.
6159
40f14e9f
BI
61602014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6161
6162 PR c/59825
6163 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6164 function to use walk_tree and moved a lot of its functionality to
6165 expand_array_notations.
6166 (expand_array_notations): New function.
6167
74558dd9
BI
61682014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6169
6170 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6171 attribute an attribute without value.
6172
652fea39
JJ
61732014-01-23 Jakub Jelinek <jakub@redhat.com>
6174
6175 PR middle-end/58809
6176 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6177 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6178
f34f1c87
MP
61792014-01-22 Marek Polacek <polacek@redhat.com>
6180
6181 PR c/59891
6182 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6183 of remove_c_maybe_const_expr on op1 and op2.
6184
241f845a
JJ
61852014-01-15 Jakub Jelinek <jakub@redhat.com>
6186
6187 PR c/58943
6188 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6189 effects, preevaluate rhs using SAVE_EXPR first.
6190
9a74f20c
BI
61912014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6192
6193 PR c++/59631
6194 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6195 statements with if-elseif statements.
6196
96066ce1
MP
61972014-01-06 Marek Polacek <polacek@redhat.com>
6198
6199 PR c/57773
6200 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6201 defined bit-field types only in ISO C.
6202
23a5b65a
RS
62032014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6204
6205 Update copyright years
6206
f9030485
RS
62072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6208
6209 * c-array-notation.c: Use the standard form for the copyright notice.
6210
41958c28
BI
62112013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6212
6213 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6214 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6215 field in parser is not empty. If not-empty, call the function
6216 c_parser_finish_omp_declare_simd.
6217 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6218 between SIMD-enabled functions and #pragma simd. Added new parameter.
6219 (c_parser_cilk_all_clauses): Modified the usage of the function
6220 c_parser_cilk_clause_vectorlength as mentioned above.
6221 (c_parser_cilk_simd_fn_vector_attrs): New function.
6222 (c_finish_cilk_simd_fn_tokens): Likewise.
6223 (is_cilkplus_vector_p): Likewise.
6224 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6225 "nomask," and "mask" strings in clause name.
6226 (c_parser_omp_all_clauses): Added 3 new case statements:
6227 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6228 PRAGMA_CILK_CLAUSE_NOMASK.
6229 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6230 check for vector attribute and if so call the function
6231 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6232 called the function c_finish_cilk_simd_fn_tokens.
6233 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6234 parser field is non-empty. If so, parse them as you would parse
6235 the omp declare simd pragma.
6236 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6237 Added a check when step is a parameter and flag it as error.
6238 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6239 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6240 pragma_omp_clause.
6241
cef0fd0e
TS
62422013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6243
6244 * c-parser.c (c_parser_omp_parallel): Fix description.
6245
12893402
BI
62462013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6247
6248 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6249 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6250 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6251 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6252
296674db
JM
62532013-12-04 Joseph Myers <joseph@codesourcery.com>
6254
6255 PR c/52023
6256 * c-parser.c (c_parser_alignas_specifier): Use
6257 c_sizeof_or_alignof_type instead of c_alignof.
6258 (c_parser_alignof_expression): Likewise, with min_alignof
6259 parameter depending on alignof spelling used.
6260
edd28054
MP
62612013-12-04 Marek Polacek <polacek@redhat.com>
6262
6263 PR c/54113
6264 * c-decl.c (start_function): Don't warn for missing prototype for
6265 inline functions.
6266
da0fc454
MP
62672013-12-03 Marek Polacek <polacek@redhat.com>
6268
6269 PR c/59351
6270 * c-decl.c (build_compound_literal): Allow compound literals with
6271 empty initial value.
6272
4c2ecab0
JM
62732013-12-02 Joseph Myers <joseph@codesourcery.com>
6274
6275 PR c/58235
6276 * c-typeck.c (build_modify_expr): Diagnose assignment to
6277 expression with array type.
6278
340baef7
JM
62792013-11-29 Joseph Myers <joseph@codesourcery.com>
6280
6281 PR c/42262
6282 * c-typeck.c (process_init_element): Do not treat a string as
6283 initializing a whole array when used with a designator for an
6284 individual element.
6285
6763b9f7
JM
62862013-11-29 Joseph Myers <joseph@codesourcery.com>
6287
6288 PR c/57574
6289 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6290 an inline function following a static declaration.
6291
e7bd1de1
JJ
62922013-11-28 Jakub Jelinek <jakub@redhat.com>
6293
6294 PR c/59310
6295 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6296 to p_name before calling c_parser_omp_teams instead of after.
6297 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6298 argument. Remove unused p_name variable.
6299
0136f8f0
AH
63002013-11-27 Aldy Hernandez <aldyh@redhat.com>
6301 Jakub Jelinek <jakub@redhat.com>
6302
6303 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6304 external_scope is NULL.
6305
241b71bb
TV
63062013-11-27 Tom de Vries <tom@codesourcery.com>
6307 Marc Glisse <marc.glisse@inria.fr>
6308
6309 PR c++/59032
6310 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6311
2fb9a547
AM
63122013-11-22 Andrew MacLeod <amacleod@redhat.com>
6313
6314 * c-typeck.c: Add required include files from gimple.h.
6315
8400e75e
DM
63162013-11-22 David Malcolm <dmalcolm@redhat.com>
6317
6318 * c-decl.c (define_label, shadow_tag_warned)
6319 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6320 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6321 (declspecs_add_type): Remove use of in_system_header macro.
6322 * c-parser.c (c_parser_unary_expression): Likewise.
6323 * c-typeck.c (store_init_value, process_init_element)
6324 (c_start_case): Likewise.
6325
6326 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6327 macro.
6328
6329 * c-parser.c (c_parser_set_source_position_from_token): Remove
6330 reference to in_system_header from comment.
6331
386b1f1f
RS
63322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6333
6334 * c-decl.c (grokdeclarator): Update comment to refer to
6335 tree_to_[su]hwi rather than tree_low_cst.
6336
ae7e9ddd
RS
63372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6338
6339 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6340 tree_to_uhwi throughout.
6341
9439e9a1
RS
63422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6343
6344 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6345 throughout.
6346
9541ffee
RS
63472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6348
6349 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6350 throughout.
6351
c02065fc
AH
63522013-11-15 Aldy Hernandez <aldyh@redhat.com>
6353
6354 * c-parser.c (c_parser_cilk_simd): New.
6355 (c_parser_cilk_verify_simd): New.
6356 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6357 (c_parser_omp_for_loop): Add case for NE_EXPR.
6358 Set c_break_label for CILK_SIMD.
6359 (c_parser_cilk_clause_vectorlength): New.
6360 (c_parser_cilk_clause_linear): New.
6361 (c_parser_cilk_clause_name): New.
6362 (c_parser_cilk_all_clauses): New.
6363 * c-typeck.c (build_unary_op): Pass location argument to
6364 readonly_error.
6365 (build_modify_expr): Same.
6366 (build_asm_expr): Same.
6367 (c_finish_bc_stmt): Error on break/continue in loops.
6368
18f429e2
AM
63692013-11-14 Andrew MacLeod <amacleod@redhat.com>
6370
6371 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6372
d8a2d370
DN
63732013-11-14 Diego Novillo <dnovillo@google.com>
6374
6375 * c-decl.c: Include print-tree.h.
6376 Include stor-layout.h.
6377 Include varasm.h.
6378 Include attribs.h.
6379 Include stringpool.h.
6380 * c-lang.c: Include fold-const.h.
6381 * c-parser.c: Include stringpool.h.
6382 Include attribs.h.
6383 Include stor-layout.h.
6384 Include varasm.h.
6385 Include trans-mem.h.
6386 * c-typeck.c: Include stor-layout.h.
6387 Include trans-mem.h.
6388 Include varasm.h.
6389 Include stmt.h.
6390
38b7bc7f
JM
63912013-11-13 Joseph Myers <joseph@codesourcery.com>
6392
6393 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6394 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6395 __auto_type.
6396 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6397 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6398 RID_AUTO_TYPE.
6399 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6400 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6401 (c_parser_declarator, c_parser_direct_declarator_inner)
6402 (c_parser_parameter_declaration, c_parser_type_name): All callers
6403 changed.
6404 (c_parser_declaration_or_fndef): Handle declarations with type
6405 determined from the initializer.
6406
45b0be94
AM
64072013-11-12 Andrew MacLeod <amacleod@redhat.com>
6408
18f429e2 6409 * c-typeck.c: Include gimplify.h.
45b0be94 6410
582d9b50
JM
64112013-11-12 Joseph Myers <joseph@codesourcery.com>
6412
6413 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6414 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6415 comment.
6416 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6417 or _Thread_local as appropriate in diagnostics.
6418 (build_null_declspecs): Initialize ret->thread_gnu_p.
6419 (declspecs_add_scspec): Handle either __thread or _Thread_local
6420 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6421 pedantic. Do not disallow _Thread_local extern and _Thread_local
6422 static.
6423
267bac10
JM
64242013-11-07 Joseph Myers <joseph@codesourcery.com>
6425 Andrew MacLeod <amacleod@redhat.com>
6426
6427 * c-aux-info.c (gen_type): Handle atomic qualifier.
6428 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6429 qualifiers when compating types.
6430 (shadow_tag_warned): Handle atomic_p in declspecs.
6431 (quals_from_declspecs): Likewise.
6432 (start_decl): Use c_type_promotes_to when promoting argument
6433 types.
6434 (grokdeclarator): Handle _Atomic.
6435 (get_parm_info): Diagnose any qualifier on "void" as only
6436 parameter.
6437 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6438 comparing types. Use c_type_promotes_to when promoting argument
6439 types.
6440 (finish_function): Use c_type_promotes_to when promoting argument
6441 types.
6442 (build_null_declspecs): Handle atomic_p in declspecs.
6443 (declspecs_add_qual): Handle RID_ATOMIC.
6444 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6445 (c_token_starts_declspecs): Handle RID_ATOMIC.
6446 (c_parser_declspecs): Handle atomic type specifiers and
6447 qualifiers.
6448 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6449 from types of expressions with atomic type.
6450 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6451 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6452 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6453 (c_parser_statement_after_labels, c_parser_switch_statement)
6454 (c_parser_for_statement, c_parser_expr_no_commas)
6455 (c_parser_conditional_expression, c_parser_binary_expression)
6456 (c_parser_cast_expression, c_parser_unary_expression)
6457 (c_parser_postfix_expression)
6458 (c_parser_postfix_expression_after_primary, c_parser_expression):
6459 Use convert_lvalue_to_rvalue.
6460 (c_parser_expression_conv, c_parser_expr_list): Document
6461 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6462 (c_parser_objc_synchronized_statement): Use
6463 convert_lvalue_to_rvalue.
6464 (c_parser_objc_selector): Handle RID_ATOMIC.
6465 (c_parser_objc_receiver, c_parser_array_notation): Use
6466 convert_lvalue_to_rvalue.
6467 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6468 _Atomic (type-name).
6469 (struct c_declspecs): Add atomic_p field.
6470 (convert_lvalue_to_rvalue): Declare.
6471 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6472 corresponding atomic types.
6473 (qualify_type): Don't add _Atomic qualifiers from second argument.
6474 (comp_target_types): Do not allow _Atomic mismatches.
6475 (type_lists_compatible_p): Do not remove atomic qualifiers when
6476 comparing types.
6477 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6478 (build_atomic_assign): New functions.
6479 (build_unary_op): Use build_atomic_assign for atomic increment and
6480 decrement.
6481 (build_conditional_expr): Do not treat _Atomic void as a qualified
6482 version of void.
6483 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6484 (find_anonymous_field_with_type, convert_to_anonymous_field)
6485 (convert_for_assignment): Do not remove atomic qualifiers when
6486 comparing types.
6487 (digest_init): Do not accept initialization of arrays of atomic
6488 elements by string constants.
6489 (build_asm_expr): Use convert_lvalue_to_rvalue.
6490 (build_binary_op): Do not treat _Atomic void as a qualified
6491 version of void.
6492
0c249d4b
DD
64932013-11-06 DJ Delorie <dj@redhat.com>
6494
6495 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6496 both explicit and builtin, print the location of the explicit one.
6497
6d7f7e0a
TB
64982013-11-05 Tobias Burnus <burnus@net-b.de>
6499
6500 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6501 c_parser_omp_distribute, c_parser_omp_teams,
6502 c_parser_omp_target, c_parser_omp_declare): Handle
6503 -fopenmp-simd.
6504
b906f4ca
MP
65052013-11-03 Marek Polacek <polacek@redhat.com>
6506
6507 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6508
ee1d5a02
JJ
65092013-11-01 Jakub Jelinek <jakub@redhat.com>
6510
6511 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6512 check_dup_generic at the end, unless remove is true.
6513 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6514 remove = true;.
6515 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6516
5a9785fb
JJ
65172013-10-31 Jakub Jelinek <jakub@redhat.com>
6518
6519 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6520 with decl that is not pointer nor array.
6521
939b37da
BI
65222013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6523
6524 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6525 a spawning function is found.
6526 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6527 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6528 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6529 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6530 case.
6531 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6532 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6533 expr.
6534 (c_finish_return): Added a check to reject _Cilk_spawn in return
6535 expression.
6536 (build_cilk_spawn): New function.
6537 (build_cilk_sync): Likewise.
6538 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6539
d4af74d4
TB
65402013-10-27 Tobias Burnus <burnus@net-b.de>
6541
6542 PR other/33426
6543 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6544 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6545 (c_parser_statement_after_labels): Update calls.
6546
d73749df 65472013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6548
6549 PR other/33426
6550 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6551 Handle PRAGMA_IVDEP.
6552 (c_parser_statement_after_labels): Update call.
6553
f28aa681
MP
65542013-10-24 Marek Polacek <polacek@redhat.com>
6555
6556 * c-parser.c (c_parser_struct_declaration): Add a comment.
6557 (c_parser_declarator): Don't allow _Alignas here.
6558
0645c1a2
AM
65592013-10-17 Andrew MacLeod <amacleod@redhat.com>
6560
6561 * c-parser.c: Include omp-low.h.
6562 * c-typeck.c: Likewise.
6563
568a31f2
MP
65642013-10-17 Marek Polacek <polacek@redhat.com>
6565
6566 PR c/58267
6567 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6568 Document syntax of the array-declarator.
6569 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6570 are not permitted.
6571 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6572 (c_parser_struct_declaration): Likewise.
6573 (c_parser_declarator): Likewise.
6574 (c_parser_direct_declarator_inner): Likewise.
6575 (c_parser_parameter_declaration): Likewise.
6576 (c_parser_type_name): Likewise.
6577
acf0174b
JJ
65782013-10-11 Jakub Jelinek <jakub@redhat.com>
6579
6580 * c-lang.h (current_omp_declare_target_attribute): New extern
6581 decl.
6582 * c-parser.c: Include c-lang.h.
6583 (struct c_parser): Change tokens to c_token *.
6584 Add tokens_buf field. Change tokens_avail type to unsigned int.
6585 (c_parser_consume_token): If parser->tokens isn't
6586 &parser->tokens_buf[0], increment parser->tokens.
6587 (c_parser_consume_pragma): Likewise.
6588 (enum pragma_context): Add pragma_struct and pragma_param.
6589 (c_parser_external_declaration): Adjust
6590 c_parser_declaration_or_fndef caller.
6591 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6592 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6593 Adjust recursive call.
6594 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6595 of pragma_external.
6596 (c_parser_parameter_declaration): Use pragma_param instead of
6597 pragma_external.
6598 (c_parser_compound_statement_nostart, c_parser_label,
6599 c_parser_for_statement): Adjust
6600 c_parser_declaration_or_fndef callers.
6601 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6602 it through to c_parser_conditional_expression.
6603 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6604 pass it through to c_parser_binary_expression. Adjust recursive
6605 call.
6606 (c_parser_binary_expression): Remove prec argument, add
6607 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6608 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6609 binop matches it, use build2 instead of parser_build_binary_op.
6610 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6611 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6612 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6613 Handle pragma_struct and pragma_param the same as pragma_external.
6614 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6615 (c_parser_omp_variable_list): Parse array sections for
6616 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6617 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6618 (c_parser_omp_clause_reduction): Handle user defined reductions.
6619 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6620 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6621 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6622 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6623 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6624 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6625 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6626 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6627 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6628 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6629 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6630 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6631 (c_parser_omp_for_loop): Add CODE argument, pass it through
6632 to c_finish_omp_for. Change last argument to cclauses,
6633 and adjust uses to grab parallel clauses from the array of all
6634 the split clauses. Adjust c_parser_binary_expression,
6635 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6636 (omp_split_clauses): New function.
6637 (c_parser_omp_simd): New function.
6638 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6639 Allow the function to be called also when parsing combined constructs,
6640 and call c_parser_omp_simd when parsing for simd.
6641 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6642 #pragma omp section, require exactly one structured-block instead of
6643 sequence of statements.
6644 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6645 Allow the function to be called also when parsing combined constructs.
6646 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6647 Allow the function to be called also when parsing combined
6648 constructs.
6649 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6650 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6651 c_parser_omp_teams, c_parser_omp_target_data,
6652 c_parser_omp_target_update, c_parser_omp_target,
6653 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6654 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6655 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6656 (c_parser_omp_construct): Add p_name and mask vars. Handle
6657 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6658 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6659 and c_parser_omp_sections callers.
6660 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6661 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6662 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6663 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6664 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6665 OMP_CLAUSE_DEPEND.
6666 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6667 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6668 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6669 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6670 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6671 * c-typeck.c: Include tree-inline.h.
6672 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6673 handle_omp_array_sections_1, handle_omp_array_sections,
6674 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6675 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6676 user defined reductions.
6677 (c_tree_equal): New function.
6678 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6679 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6680 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6681 c_check_omp_declare_reduction_r): New prototypes.
6682 * c-decl.c (current_omp_declare_target_attribute): New variable.
6683 (c_decl_attributes): New function.
6684 (start_decl, start_function): Use it instead of decl_attributes.
6685 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6686 c_omp_reduction_decl, c_omp_reduction_lookup,
6687 c_check_omp_declare_reduction_r): New functions.
6688
0a6c2227
TT
66892013-09-25 Tom Tromey <tromey@redhat.com>
6690
6691 * Make-lang.in (c/gccspec.o): Remove.
6692 (CFLAGS-c/gccspec.o): New variable.
6693 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6694 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6695 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6696
f3bc55f0
TT
66972013-09-25 Tom Tromey <tromey@redhat.com>
6698
6699 * Make-lang.in (c/gccspec.o): Don't use subshell.
6700
a24d975c
MP
67012013-09-18 Marek Polacek <polacek@redhat.com>
6702
6703 PR sanitize/58443
6704 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6705 Remove unnecessary check.
6706
ce6923c5
MP
67072013-09-18 Marek Polacek <polacek@redhat.com>
6708
6709 PR sanitizer/58411
6710 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6711 no_sanitize_undefined attribute.
6712
a1e51df9
KT
67132013-09-13 Kai Tietz <ktietz@redhat.com>
6714
6715 PR target/57848
6716 * c-decl.c (c_builtin_function_ext_scope): Remove
6717 wrong assumption that it is never called on prexisting
6718 symbol.
6719
0af94e6f
JR
67202013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6721
6722 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6723
20059c8b
GDR
67242013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6725
6726 * c-objc-common.c (c_tree_printer): Tidy.
6727
de5a5fa1
MP
67282013-08-30 Marek Polacek <polacek@redhat.com>
6729
6730 * c-typeck.c (build_binary_op): Add division by zero and shift
6731 instrumentation.
6732
2531a1d9 67332013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6734 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6735
6e2bcc98 6736 PR c/35649
2531a1d9
JR
6737 * c-typeck.c (c_common_type): Prefer double_type_node over
6738 other REAL_TYPE types with the same precision.
6739 (convert_arguments): Likewise.
6740
025311c4
GDR
67412013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6742
6743 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6744 (c_initialize_diagnostics): Call a destructor for the early printer.
6745
da6ca2b5
GDR
67462013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6747
6748 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6749 printer initialization.
6750
318cda85 67512013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6752
318cda85
BI
6753 PR c/57490
6754 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6755 check for truth values.
6756 (expand_array_notation_exprs): Added truth values case. Removed an
6757 unwanted else. Added for-loop to walk through subtrees in default
6758 case.
6759
b066401f
GDR
67602013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6761
6762 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6763
fb48aadc
JM
67642013-07-23 Joseph Myers <joseph@codesourcery.com>
6765
6766 * c-parser.c (struct c_generic_association): Fix typo.
6767
433cc7b0
TT
67682013-07-23 Tom Tromey <tromey@redhat.com>
6769 Joseph Myers <joseph@codesourcery.com>
6770
6771 * c-parser.c (struct c_generic_association): New.
6772 (c_generic_association_d): New typedef.
6773 (c_parser_generic_selection): New function.
6774 (c_parser_postfix_expression): Handle RID_GENERIC.
6775
26d40c3d
JM
67762013-07-13 Jason Merrill <jason@redhat.com>
6777
6778 PR c++/57793
6779 * c-decl.c (finish_struct): Check for too-large class.
6780
ecdbd01a 67812013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6782
6783 PR c/57821
6784 * c-typeck.c (set_init_index): When folding, check for index overflow.
6785
1141ed3f
BI
67862013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6787
6788 * c-parser.c (c_parser_array_notation): Removed rejection of array
6789 notations in an array of function pointers.
6790
713b46fa
BI
67912013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6792
6793 * c-array-notation.c (make_triplet_val_inv): New function.
6794 (create_cmp_incr): Likewise.
6795 (create_array_refs): Likewise.
6796 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6797 Also modularized common parts between functions and called the function.
6798 (build_array_notation_expr): Likewise.
6799 (fix_conditional_array_notations_1): Likewise.
6800 (fix_array_notation_expr): Likewise.
6801 (fix_array_notation_call_expr): Likewise.
6802
92f20202
MP
68032013-06-18 Marek Polacek <polacek@redhat.com>
6804
6805 PR c/57630
6806 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6807
73a23b06
BI
68082013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6809
6810 * c-array-notation.c (build_array_notation_expr): Reject array notation
6811 mismatch between LHS and RHS even inside a call_expr. Also, removed
6812 a couple while statements that were dead code.
6813
00b8517d
BI
68142013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6815
6816 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6817 excessive precision expressions in function parameters. Also removed
6818 couple unwanted while statements.
6819
1509bdda
BI
68202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6821
6822 * c-array-notation.c (expand_array_notation_exprs): Added
6823 ARRAY_NOTATION_REF case.
ab20d992 6824
d60f1706
BI
68252013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6826
6827 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6828 function to c-family/array-notation-common.c.
6829 (is_cilkplus_reduce_builtin): Likewise.
6830 (find_rank): Likewise.
6831 (extract_array_notation_exprs): Likewise.
6832 (replace_array_notations): Likewise.
6833 (find_inv_trees): Likewise.
6834 (replace_inv_trees): Likewise.
6835 (contains_array_notation_expr): Likewise.
6836 (find_correct_array_notation_type): Likewise.
6837 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6838 (struct inv_list): Moved this to c-family/array-notation-common.c.
6839 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6840
6d6efbb3
BI
68412013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6842
6843 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6844 reduction functions outside the for-loop. Added a check if the fundecl
6845 is non-NULL. Finally, removed an unwanted if-statement, and made the
6846 body unconditional.
6847
25c22937
BI
68482013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6849
6850 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6851 condition of the if-statement matches the rank of else-block and then-
6852 block when array notations are used.
6853 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6854 expression after the entire function body is parsed.
6855 (c_parser_expr_no_commas): Delayed creating array notation expressions
6856 to the end of function parsing.
6857 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6858 whole if-statement instead of just the condition.
ab20d992 6859 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6860
edd25645
BI
68612013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6862
6863 PR c/57474
6864 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6865 array to NULL_TREE if they are unused. Also added a check for the
6866 field to be NULL before its fields are used in future.
ab20d992 6867
065ce7f1
RO
68682013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6869
6870 PR bootstrap/57450
6871 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6872 (build_array_notation_expr): Likewise.
6873
36536d79
BI
68742013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6875
6876 * c-typeck.c (build_array_ref): Added a check to see if array's
6877 index is greater than one. If true, then emit an error.
6878 (build_function_call_vec): Exclude error reporting and checking
6879 for builtin array-notation functions.
6880 (convert_arguments): Likewise.
6881 (c_finish_return): Added a check for array notations as a return
6882 expression. If true, then emit an error.
6883 (c_finish_loop): Added a check for array notations in a loop
6884 condition. If true then emit an error.
6885 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6886 (build_binary_op): Added a check for array notation expr inside
6887 op1 and op0. If present, we call another function to find correct
6888 type.
6889 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6890 * c-parser.c (c_parser_compound_statement): Check if array
6891 notation code is used in tree, if so, then transform them into
6892 appropriate C code.
6893 (c_parser_expr_no_commas): Check if array notation is used in LHS
6894 or RHS, if so, then build array notation expression instead of
6895 regular modify.
6896 (c_parser_postfix_expression_after_primary): Added a check for
6897 colon(s) after square braces, if so then handle it like an array
6898 notation. Also, break up array notations in unary op if found.
6899 (c_parser_direct_declarator_inner): Added a check for array
6900 notation.
6901 (c_parser_compound_statement): Added a check for array notation in
6902 a stmt. If one is present, then expand array notation expr.
6903 (c_parser_if_statement): Likewise.
6904 (c_parser_switch_statement): Added a check for array notations in
6905 a switch statement's condition. If true, then output an error.
6906 (c_parser_while_statement): Similarly, but for a while.
6907 (c_parser_do_statement): Similarly, but for a do-while.
6908 (c_parser_for_statement): Similarly, but for a for-loop.
6909 (c_parser_unary_expression): Check if array notation is used in a
6910 pre-increment or pre-decrement expression. If true, then expand
6911 them.
6912 (c_parser_array_notation): New function.
6913 * c-array-notation.c: New file.
6914 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6915
cd192ccc
MS
69162013-05-23 Mike Stump <mikestump@comcast.net>
6917
6918 * c-typeck.c (convert_for_assignment): Handle references to memory
6919 spaces better.
6920
427b248d
JM
69212013-05-16 Jason Merrill <jason@redhat.com>
6922
6923 * Make-lang.in (cc1$(exeext)): Use link mutex.
6924
44d90fe1
PC
69252013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6926
6927 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6928 to simply use OPT_Wpointer_arith.
6929 (build_unary_op): Likewise.
6930
4e7d7b3d
JJ
69312013-04-03 Jakub Jelinek <jakub@redhat.com>
6932
6933 PR c/19449
6934 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6935 argument. If set, or it temporarily for parsing of the first
6936 argument into force_folding_builtin_constant_p.
6937 (c_parser_postfix_expression): Adjust callers.
6938
839b422f
RB
69392013-03-21 Richard Biener <rguenther@suse.de>
6940
6941 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6942 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6943
2ee028f1
MP
69442013-02-12 Marek Polacek <polacek@redhat.com>
6945
6946 PR c/44938
6947 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6948 origtypes to NULL.
6949
8824edff
JJ
69502013-01-24 Jakub Jelinek <jakub@redhat.com>
6951
6952 PR c/56078
6953 * c-typeck.c (set_nonincremental_init_from_string): If
6954 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6955 returned false.
6956 (process_init_element): Likewise.
6957
eadd3d0d
JJ
69582012-12-20 Jakub Jelinek <jakub@redhat.com>
6959
6960 PR c++/55619
6961 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6962 argument, don't call default_function_array_conversion
6963 nor c_fully_fold here.
6964 (c_parser_asm_statement): Adjust callers.
6965 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6966 and outputs here, and call default_function_array_conversion
6967 on inputs that don't need to be addressable.
6968
f8a93a2e
JJ
69692012-12-18 Jakub Jelinek <jakub@redhat.com>
6970
6971 PR c/39464
6972 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6973 warning require that both c_common_unsigned_type as well as
6974 c_common_signed_type is the same for both mvl and mvr types.
6975
9771b263
DN
69762012-11-16 Diego Novillo <dnovillo@google.com>
6977
6978 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6979
6980 * c-common.c: Use new vec API in vec.h.
6981 * c-common.h: Likewise.
6982 * c-gimplify.c: Likewise.
6983 * c-pragma.c: Likewise.
6984 * c-pretty-print.c: Likewise.
6985 * c-pretty-print.h: Likewise.
6986 * c-semantics.c: Likewise.
6987 * c-decl.c: Likewise.
6988 * c-parser.c: Likewise.
6989 * c-tree.h: Likewise.
6990 * c-typeck.c: Likewise.
6991
880661a4
JW
69922012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6993
6994 PR c++/54930
6995 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6996
077d1abe
MLI
69972012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6998
6999 PR c/53066
7000 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7001 shadows a function, unless the variable is a function or a
7002 pointer-to-function.
7003
3a785c97
JJ
70042012-10-12 Jakub Jelinek <jakub@redhat.com>
7005
7006 PR c/54381
7007 * c-parser.c (struct c_tree_loc_pair): Removed.
7008 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7009 add location_t * and tree * arguments, fill in array of 3
7010 sizeof_arg trees and corresponding locs.
7011 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7012 c_parser_expr_list callers.
7013 (c_parser_postfix_expression_after_primary): Likewise. Pass
7014 array of 3 sizeof_arg trees and locs (corresponding to first
7015 3 arguments) to sizeof_pointer_memaccess_warning.
7016
703c8606
LC
70172012-10-09 Lawrence Crowl <crowl@google.com>
7018
7019 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7020 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7021 hash table.
7022
5d9de0d0
PC
70232012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7024
7025 PR c++/54194
7026 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7027 call.
7028
a212e43f
MG
70292012-10-09 Marc Glisse <marc.glisse@inria.fr>
7030
7031 PR c++/54427
7032 * c-typeck.c: Include c-common.h.
7033 (enum stv_conv): Moved to c-common.h.
7034 (scalar_to_vector): Moved to c-common.c.
7035 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7036 * Make-lang.in: c-typeck.c depends on c-common.h.
7037
3b78de56
AC
70382012-10-04 Arnaud Charlet <charlet@adacore.com>
7039
7040 * c-decl.c (c_write_global_declarations): Fix handling of
7041 -fdump-ada-spec*.
7042
78c60e3d
SS
70432012-09-30 Sharad Singhai <singhai@google.com>
7044
7045 * c-decl.c (c_write_global_declarations): Use a different method
7046 to determine if the dump has ben initialized.
7047
9f33203d
JM
70482012-09-14 Joseph Myers <joseph@codesourcery.com>
7049
7050 PR c/54552
7051 * c-typeck.c (c_cast_expr): When casting to a type requiring
7052 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7053 c_fully_fold first.
7054
a27d595d
JM
70552012-09-14 Joseph Myers <joseph@codesourcery.com>
7056
7057 PR c/54103
7058 * c-typeck.c (build_unary_op): Pass original argument of
7059 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7060 any C_MAYBE_CONST_EXPR, if it has integer operands.
7061 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7062 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7063 to c_objc_common_truthvalue_conversion, then remove any
7064 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7065 c_objc_common_truthvalue_conversion not
7066 c_common_truthvalue_conversion.
7067 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7068 call note_integer_operands for arguments with integer operands
7069 that are not integer constants.
7070
9feb29df
JJ
70712012-09-13 Jakub Jelinek <jakub@redhat.com>
7072
7073 PR c/54559
7074 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7075 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7076
d409320c
JJ
70772012-08-31 Jakub Jelinek <jakub@redhat.com>
7078
7079 PR c/54428
7080 * c-convert.c (convert): Don't call fold_convert_loc if
7081 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7082 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7083 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7084
6265d07c
JJ
70852012-08-24 Jakub Jelinek <jakub@redhat.com>
7086
7087 PR c/54355
7088 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7089 for nested and empty_ok arguments in the call to
7090 c_parser_declaration_or_fndef.
7091
1a4049e7
JJ
70922012-08-17 Jakub Jelinek <jakub@redhat.com>
7093
7094 * c-tree.h (c_last_sizeof_arg): Declare.
7095 * c-parser.c (struct c_tree_loc_pair): New type.
7096 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7097 non-NULL.
7098 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7099 (c_parser_postfix_expression_after_primary): Likewise. Call
7100 sizeof_pointer_memaccess_warning if needed.
7101 (sizeof_ptr_memacc_comptypes): New function.
7102 * c-typeck.c (c_last_sizeof_arg): New global variable.
7103 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7104
0229aee9
UB
71052012-07-24 Uros Bizjak <ubizjak@gmail.com>
7106
7107 * c-lang.h (lang_decl): Add variable_size GTY option.
7108
7ee2468b
SB
71092012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7110
7111 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7112 * Make-lang.in: Fix dependencies.
7113
d4a10d0a
SB
71142012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7115
7116 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7117 and add language Makefile hooks.
7118 * config-lang.in: New file.
7119 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7120 add the required "normal" config-lang.in rules.
7121 * c-lang.h: Moved from gcc/ to here.
7122 * c-tree.h: Likewise.
7123 * c-objc-common.c: Likewise.
7124 * c-objc-common.h: Likewise.
7125 * c-typeck.c: Likewise.
7126 * c-convert.c: Likewise.
7127 * c-lang.c: Likewise.
7128 * c-aux-info.c: Likewise.
7129 * c-errors.c: Likewise.
7130 * gccspec.c: Likewise.
7131 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7132 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7133\f
8d9254fc 7134Copyright (C) 2012-2020 Free Software Foundation, Inc.
d4a10d0a
SB
7135
7136Copying and distribution of this file, with or without modification,
7137are permitted in any medium without royalty provided the copyright
7138notice and this notice are preserved.
This page took 2.972046 seconds and 5 git commands to generate.