]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
48cc2e46
GA
12020-07-31 Richard Biener <rguenther@suse.de>
2
3 PR debug/96383
4 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
5 Define to c_common_finalize_early_debug.
6
3ea9abca
GA
72020-07-22 Tobias Burnus <tobias@codesourcery.com>
8
9 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
10 (c_parser_omp_critical): Permit hint(0) clause without named critical.
11 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
12
30430061
GA
132020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
14
15 PR target/95237
16 * c-decl.c (finish_decl): Call target hook
17 lower_local_decl_alignment to lower local decl alignment.
18
3f8ca9cb
GA
192020-07-09 Julian Brown <julian@codesourcery.com>
20 Thomas Schwinge <thomas@codesourcery.com>
21
22 PR middle-end/95270
23 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
24 for standalone attach/detach clauses.
25
50873cc5
GA
262020-07-08 Eric Botcazou <ebotcazou@gcc.gnu.org>
27
28 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
29 set, warn for conversion between pointers that point to incompatible
30 scalar storage orders.
31
f60ee68d
GA
322020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
33
34 * c-parser.c (c_parser_statement_after_labels): Pass correct
35 parameters to c_parser_do_statement.
36
56638b9b
GA
372020-06-16 Jakub Jelinek <jakub@redhat.com>
38
39 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
40 c_in_omp_for.
41 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
42 premature c_fully_fold. Defer explicit c_fully_fold calls to after
43 c_finish_omp_for.
44 * c-tree.h (c_in_omp_for): Declare.
45 * c-typeck.c (c_in_omp_for): Define.
46 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
47 (digest_init): Likewise.
48 (build_binary_op): Likewise.
49
502020-06-16 Jakub Jelinek <jakub@redhat.com>
51
52 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
53 from kind by comma rather than colon.
54
1a59f3db
GA
552020-06-05 Mark Wielaard <mark@klomp.org>
56
57 * c-decl.c (implicit_decl_warning): When warned and olddecl is
58 an undeclared builtin, then add a fixit header hint, if found.
59 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
60 warning_at about implicit builtin declaration type mismatch.
61
9a5b7438
GA
622020-06-03 Mark Wielaard <mark@klomp.org>
63
64 * c-parser.c (struct c_parser): Add seen_string_literal
65 bitfield.
66 (c_parser_consume_token): Reset seen_string_literal.
67 (c_parser_error_richloc): Add name_hint if seen_string_literal
68 and next token is a CPP_NAME and we have a missing header
69 suggestion for the name.
70 (c_parser_string_literal): Set seen_string_literal.
71
722020-06-03 Mark Wielaard <mark@klomp.org>
73
74 * c-parser.c (c_parser_postfix_expression_after_primary): Add
75 scope with matching_parens after CPP_OPEN_PAREN.
76
772020-06-03 Tobias Burnus <tobias@codesourcery.com>
78
79 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
80
53ffb43a
GA
812020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
82
83 * Make-lang.in: Remove extra slash.
84
8f66f175
ML
852020-05-19 Martin Liska <mliska@suse.cz>
86
87 * c-parser.c: Fix typo.
88
49ddde69
JJ
892020-05-14 Jakub Jelinek <jakub@redhat.com>
90
91 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
92
eb72dc66
RB
932020-05-07 Richard Biener <rguenther@suse.de>
94
95 PR middle-end/94703
96 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
97 DECL_GIMPLE_REG_P.
98
bf915591
JJ
992020-04-30 Jakub Jelinek <jakub@redhat.com>
100
101 PR c/94842
102 * c-decl.c (set_labels_context_r): In addition to context-less
103 LABEL_DECLs adjust also LABEL_DECLs with context equal to
104 parent function if any.
105 (store_parm_decls): Adjust comment.
106
e1113ffb
JJ
1072020-04-19 Jakub Jelinek <jakub@redhat.com>
108
109 PR objc/94637
110 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
111 two CPP_COLON tokens.
112
2e389749
JJ
1132020-04-17 Jakub Jelinek <jakub@redhat.com>
114
115 PR other/94629
116 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
117 to data.clauses.
118
2dc9294c
JJ
1192020-04-15 Jakub Jelinek <jakub@redhat.com>
120
121 PR c/94593
122 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
123 requires directive when not at file scope.
124
13e41d8b
TB
1252020-04-08 Tobias Burnus <tobias@codesourcery.com>
126
127 PR middle-end/94120
128 * c-decl.c (c_check_in_current_scope): New function.
129 * c-tree.h (c_check_in_current_scope): Declare it.
130 * c-parser.c (c_parser_oacc_declare): Add check that variables
131 are declared in the same scope as the directive. Fix handling
132 of namespace vars.
133
4df50a05
JJ
1342020-04-07 Jakub Jelinek <jakub@redhat.com>
135
136 PR c++/94512
137 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
138 if c_parser_omp_master succeeded.
139
5db9e893
JJ
1402020-03-23 Jakub Jelinek <jakub@redhat.com>
141
142 PR gcov-profile/94029
143 PR c/94239
144 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
145 the function_start_locus location. Don't do that afterwards for the
146 __GIMPLE body parsing.
147
9def91e9
JJ
1482020-03-19 Jakub Jelinek <jakub@redhat.com>
149
150 PR gcov-profile/94029
151 * c-tree.h (finish_function): Add location_t argument defaulted to
152 input_location.
153 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
154 set it to the locus of closing } if non-NULL.
155 (c_parser_compound_statement_nostart): Return locus of closing }.
156 (c_parser_parse_rtl_body): Likewise.
157 (c_parser_declaration_or_fndef): Propagate locus of closing } to
158 finish_function.
159 * c-decl.c (finish_function): Add end_loc argument, use it instead of
160 input_location to set function_end_locus.
161
046c5890
JJ
1622020-03-17 Jakub Jelinek <jakub@redhat.com>
163
164 PR c/94172
165 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
166 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
167 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
168 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
169 ENUMERAL_TYPEs.
170 (finish_incomplete_vars): New function, moved from finish_struct. Use
171 relayout_decl instead of layout_decl.
172 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
173 being TYPE_VFIELD. Use finish_incomplete_vars.
174 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
175 finish_incomplete_vars.
176 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
177 also on ENUMERAL_TYPEs.
178
c015ff8c
JJ
1792020-03-16 Jakub Jelinek <jakub@redhat.com>
180
181 PR c/94179
182 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
183
f2e9fe5f
MS
1842020-03-13 Martin Sebor <msebor@redhat.com>
185
186 PR c/94040
187 * c-decl.c (builtin_structptr_type_count): New constant.
188 (match_builtin_function_types): Reject decls that are incompatible
189 in types pointed to by pointers.
190 (diagnose_mismatched_decls): Adjust comments.
191
c9d70946
JM
1922020-03-05 Joseph Myers <joseph@codesourcery.com>
193
194 PR c/93577
195 * c-typeck.c (pop_init_level): Do not diagnose initializers as
196 empty when initialized type is error_mark_node.
197 (set_designator, process_init_element): Ignore initializers for
198 elements of a variable-size type or of error_mark_node.
199
726e292d
MS
2002020-03-01 Martin Sebor <msebor@redhat.com>
201
202 PR middle-end/93926
203 * c-decl.c (types_close_enough_to_match): New function.
204 (match_builtin_function_types):
205 (diagnose_mismatched_decls): Add missing inform call to a warning.
206
a499c2f8
MS
2072020-03-01 Martin Sebor <msebor@redhat.com>
208
209 PR c/93812
210 * c-typeck.c (build_functype_attribute_variant): New function.
211 (composite_type): Call it.
212
9c3da8cc
JJ
2132020-02-25 Jakub Jelinek <jakub@redhat.com>
214
215 PR other/93912
216 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
217 Rename last argument from probablity to probability.
218
bacdd5e9
JJ
2192020-02-13 Jakub Jelinek <jakub@redhat.com>
220
221 PR c/93576
222 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
223 *expr if it has side effects.
224
f9eb0973
JL
2252020-01-30 Jeff Law <law@redhat.com>
226
227 PR c/88660
228 * c-parser.c (c_parser_switch_statement): Make sure to request
229 marking the switch expr as used.
230
ac68e287
JM
2312020-01-22 Joseph Myers <joseph@codesourcery.com>
232
233 PR c/93348
234 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
235 argument with integer operands.
236
852f0ae8
KK
2372020-01-16 Kerem Kat <keremkat@gmail.com>
238
239 PR c/92833
240 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
241 to support 4 available tokens.
242
e2346a33
JM
2432020-01-15 Joseph Myers <joseph@codesourcery.com>
244
245 PR c/93072
246 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
247 determine whether to set DECL_CONTEXT.
248
3d77686d
JM
2492020-01-13 Joseph Myers <joseph@codesourcery.com>
250
251 PR c/93241
252 * c-typeck.c (build_c_cast): Check for expressions with integer
253 operands that can occur in an unevaluated part of an integer
254 constant expression and call note_integer_operands as needed.
255
f74c4b2c
RB
2562019-01-08 Richard Biener <rguenther@suse.de>
257
258 PR middle-end/93199
259 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
260 permanently.
261
8d9254fc
JJ
2622020-01-01 Jakub Jelinek <jakub@redhat.com>
263
264 Update copyright years.
265
39292e25
EB
2662019-12-20 Eric Botcazou <ebotcazou@adacore.com>
267
268 * c-decl.c (collect_source_ref_cb): Delete.
269 (for_each_global_decl): Rename into...
270 (collect_source_refs): ...this. Call collect_source_ref directly.
271 (c_parse_final_cleanups): Always call collect_source_ref on the main
272 input filename.
273
519d7496
JB
2742019-12-19 Julian Brown <julian@codesourcery.com>
275 Cesar Philippidis <cesar@codesourcery.com>
276
277 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
278 detach clauses.
279 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
280 Allow deref (->) in variable lists if true.
281 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
282 Pass to c_parser_omp_variable_list.
283 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
284 call to c_parser_omp_variable_list.
285 (c_parser_oacc_all_clauses): Support attach and detach clauses.
286 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
287 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
288 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
289 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
290 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
291 and detach. Support deref.
292 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
293 GOMP_MAP_ALWAYS_POINTER for OpenACC.
294 (c_oacc_check_attachments): New function.
295 (c_finish_omp_clauses): Check attach/detach arguments for being
296 pointers using above. Support deref.
297
a6163563
JB
2982019-12-19 Julian Brown <julian@codesourcery.com>
299 Maciej W. Rozycki <macro@codesourcery.com>
300 Tobias Burnus <tobias@codesourcery.com>
301 Thomas Schwinge <thomas@codesourcery.com>
302
303 * c-parser.c (c_parser_omp_clause_name): Support no_create.
304 (c_parser_oacc_data_clause): Likewise.
305 (c_parser_oacc_all_clauses): Likewise.
306 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
307 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
308 PRAGMA_OACC_CLAUSE_NO_CREATE.
309 * c-typeck.c (handle_omp_array_sections): Support
310 GOMP_MAP_NO_ALLOC.
311
d68f5d45
DM
3122019-12-09 David Malcolm <dmalcolm@redhat.com>
313
314 * c-objc-common.c (range_label_for_type_mismatch::get_text):
315 Replace label_text ctor calls.
316
4691bf46
JM
3172019-12-04 Joseph Myers <joseph@codesourcery.com>
318
319 PR c/36941
320 PR c/88827
321 * c-typeck.c (convert_lvalue_to_rvalue): Call
322 require_complete_type for arguments not of void types.
323 (build_indirect_ref): Do not diagnose dereferencing pointers to
324 incomplete types.
325 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
326
85d11957
JM
3272019-12-03 Joseph Myers <joseph@codesourcery.com>
328
329 PR c/88704
330 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
331 old-style parameter definitions.
332
4569f8b3
SL
3332019-12-01 Sandra Loosemore <sandra@codesourcery.com>
334
335 PR target/92499
336
337 * c-decl.c (flexible_array_type_p): Move to common code.
338
65ef05d0
RS
3392019-11-30 Richard Sandiford <richard.sandiford@arm.com>
340
341 * c-decl.c (start_decl): Allow initialization of variables whose
342 size is a POLY_INT_CST.
343 (finish_decl): Use verify_type_context to check whether the target
344 allows variables with a particular type to have static or thread-local
345 storage duration. Don't raise a second error if such variables do
346 not have a constant size.
347 (grokdeclarator): Use verify_type_context to check whether the
348 target allows fields or array elements to have a particular type.
349 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
350 the target allows pointer difference for the types involved.
351 (build_unary_op): Likewise for pointer increment and decrement.
352
34b43828
JM
3532019-11-29 Joseph Myers <joseph@codesourcery.com>
354
355 * c-parser.c (struct c_parser): Add members raw_tokens and
356 raw_tokens_used.
357 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
358 using previously-lexed raw tokens.
359 (c_parser_peek_nth_token_raw)
360 (c_parser_check_balanced_raw_token_sequence): New functions.
361 (c_parser_nth_token_starts_std_attributes): Use
362 c_parser_check_balanced_raw_token_sequence for Objective-C.
363
5b8d9367
JM
3642019-11-25 Joseph Myers <joseph@codesourcery.com>
365
366 PR c/91985
367 * c-decl.c (finish_declspecs): Use int instead of decimal
368 floating-point types if decimal floating-point not supported.
369
1723e1be
JM
3702019-11-25 Joseph Myers <joseph@codesourcery.com>
371
372 * c-tree.h (struct c_declarator): Use a structure for id member.
373 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
374 declarators at the start, not when handling individual declarators
375 later. Use u.id.id instead of u.id.
376 (grokfield): Use u.id.id instead of u.id.
377 (build_id_declarator): Set u.id.id and u.id.attrs.
378 (finish_declspecs): Handle postfix attributes in case of typedef
379 name or typeof used.
380 * c-parser.c (c_parser_direct_declarator)
381 (c_parser_direct_declarator_inner): Place declarator for
382 attributes inside that for function or array, not outside. Set
383 u.id.attrs for identifiers.
384 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
385 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
386 instead of u.id.
387
bdaf8be1
JJ
3882019-11-22 Jakub Jelinek <jakub@redhat.com>
389
390 PR c/90677
391 * c-decl.c (identifier_global_tag): Define.
392
3e00ba47
RB
3932019-11-20 Richard Biener <rguenther@suse.de>
394
395 PR c/92088
396 * c-decl.c (grokdeclarator): Prevent inlining of nested
397 function with VLA arguments.
398
8c5b727a
JM
3992019-11-20 Joseph Myers <joseph@codesourcery.com>
400
401 * c-decl.c (c_warn_type_attributes): New function.
402 (groktypename, grokdeclarator, finish_declspecs): Call
403 c_warn_type_attributes before applying attributes to types.
404 * c-tree.h (c_warn_type_attributes): Declare.
405
192961ff
JM
4062019-11-19 Joseph Myers <joseph@codesourcery.com>
407
408 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
409 standard attributes.
410 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
411 pedwarn for unknown standard attributes and return error_mark_node
412 for them.
413
20a38017
MM
4142019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
415
416 * c-parser.c (c_parser_parse_rtl_body): Always call
417 run_rtl_passes, even if startwith pass is not provided.
418
d5fbe5e0
JM
4192019-11-15 Joseph Myers <joseph@codesourcery.com>
420
421 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
422 duplicate standard attributes.
423
97cc1187
JM
4242019-11-15 Joseph Myers <joseph@codesourcery.com>
425
426 * c-decl.c (std_attribute_table): Add maybe_unused.
427
f8aea5e3
JM
4282019-11-15 Joseph Myers <joseph@codesourcery.com>
429
430 * c-decl.c (std_attribute_table): Add fallthrough.
431 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
432 attribute at top level.
433
2cc94aa8
JM
4342019-11-15 Joseph Myers <joseph@codesourcery.com>
435
436 * c-decl.c (std_attribute_table): New.
437 (c_init_decl_processing): Register attributes from
438 std_attribute_table.
439 * c-parser.c (c_parser_attribute_arguments): Add arguments
440 require_string and allow_empty_args. All callers changed.
441 (c_parser_std_attribute): Set require_string argument for
442 "deprecated" attribute.
443
7c5890cc
JM
4442019-11-14 Joseph Myers <joseph@codesourcery.com>
445
446 * c-parser.c (c_parser_postfix_expression)
447 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
448 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
449
e8738f4e
RS
4502019-11-14 Richard Sandiford <richard.sandiford@arm.com>
451
452 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
453 of build_same_sized_truth_vector_type.
454 (build_vec_cmp): Likewise.
455
b2417b59
JJ
4562019-11-14 Jakub Jelinek <jakub@redhat.com>
457
bedb7f04
JJ
458 * c-parser.c (c_parser_omp_context_selector): Don't require score
459 argument to fit into shwi, just to be INTEGER_CST. Diagnose
460 negative score.
461
b2417b59
JJ
462 * c-parser.c (c_parser_omp_context_selector): Rename
463 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
464 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
465 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
466 and string literals.
467
4e03c3a7
JM
4682019-11-14 Joseph Myers <joseph@codesourcery.com>
469
470 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
471 ctsk_tagfirstref_attrs.
472 (struct c_declspecs): Update description of attrs. Add
473 postfix_attrs and non_std_attrs_seen_p. Increase size of
474 typespec_kind bit-field.
475 (c_warn_unused_attributes): New declaration.
476 (parser_xref_tag): Update prototype.
477 * c-decl.c (c_warn_unused_attributes): New function.
478 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
479 ctsk_tagref_attrs. Handle attribute declarations.
480 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
481 (grokdeclarator): Handle standard attributes.
482 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
483 attributes to incomplete type reference.
484 (xref_tag): Update call to parser_xref_tag.
485 (declspecs_add_addrspace, declspecs_add_type)
486 (declspecs_add_scspec, declspecs_add_attrs): Set
487 non_std_attrs_seen_p.
488 (finish_declspecs): Apply postfix standard attributes to type.
489 * c-parser.c (c_token_starts_declspecs)
490 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
491 (c_parser_next_tokens_start_declaration): Update comments.
492 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
493 parser->tokens[2] to parser->tokens[1].
494 (c_parser_nth_token_starts_std_attributes)
495 (c_parser_std_attribute_specifier_sequence): New functions.
496 (c_parser_declaration_or_fndef): Add arguments have_attrs and
497 attrs. All callers changed. Handle standard attributes.
498 (c_parser_parms_declarator, c_parser_parms_list_declarator)
499 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
500 All callers changed.
501 (c_parser_declspecs): Add arguments start_std_attr_ok and
502 end_std_attr_ok. All callers changed. Handle standard
503 attributes.
504 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
505 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
506 (c_parser_compound_statement_nostart, c_parser_all_labels)
507 (c_parser_label, c_parser_statement, c_parser_for_statement):
508 Handle standard attributes.
509 * c-parser.h (c_parser_declspecs): Update prototype.
510 * gimple-parser.c (c_parser_gimple_declaration): Update call to
511 c_parser_declspecs.
512
0c29cac4
ML
5132019-11-12 Martin Liska <mliska@suse.cz>
514
515 * gimple-parser.c: Do not include params.h.
516
028d4092
ML
5172019-11-12 Martin Liska <mliska@suse.cz>
518
519 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
520 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
521 macro.
522
62aee289
MR
5232019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
524 Frederik Harwath <frederik@codesourcery.com>
525
526 gcc/c/
527 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
528 (c_parser_oacc_kernels_parallel): Rename function to...
529 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
530 (c_parser_omp_construct): Update accordingly.
531
532
7cec9588
JJ
5332019-11-11 Jakub Jelinek <jakub@redhat.com>
534
535 * c-parser.c (c_parser_translation_unit): Diagnose declare target
536 without corresponding end declare target.
537
f486280c
RS
5382019-11-08 Richard Sandiford <richard.sandiford@arm.com>
539
540 * c-convert.c (convert): Only handle vector conversions if one of
541 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
542 allows it.
543 * c-typeck.c (build_array_ref): Only allow vector indexing if the
544 vectors satisfy gnu_vector_type_p.
545 (build_unary_op): Only allow unary operators to be applied to
546 vectors if they satisfy gnu_vector_type_p.
547 (digest_init): Only allow by-element initialization of vectors
548 if they satisfy gnu_vector_type_p.
549 (really_start_incremental_init): Likewise.
550 (push_init_level): Likewise.
551 (pop_init_level): Likewise.
552 (process_init_element): Likewise.
553 (build_binary_op): Only allow binary operators to be applied to
554 vectors if they satisfy gnu_vector_type_p.
555
017c6491
JM
5562019-11-08 Joseph Myers <joseph@codesourcery.com>
557
558 * c-decl.c (grokparms): Convert () in a function definition to
559 (void) for C2x.
560 (store_parm_decls_oldstyle): Pedwarn for C2x.
561 (store_parm_decls): Update comment about () not generating a
562 prototype.
563
c01bd174
JM
5642019-11-07 Joseph Myers <joseph@codesourcery.com>
565
566 * c-parser.c (c_parser_attribute_arguments): New function.
567 Factored out of c_parser_gnu_attribute.
568 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
569 (c_parser_balanced_token_sequence, c_parser_std_attribute)
570 (c_parser_std_attribute_specifier): New functions.
571 (c_parser_transaction_attributes): Use
572 c_parser_std_attribute_specifier.
573
471c5330
JM
5742019-11-07 Joseph Myers <joseph@codesourcery.com>
575
576 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
577 lex_joined_string and translate_strings_p.
578 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
579 c_lex_with_flags.
580 (c_parser_string_literal): New function.
581 (c_parser_static_assert_declaration_no_semi): Use
582 c_parser_string_literal. Do not set lex_untranslated_string.
583 (c_parser_asm_string_literal): Use c_parser_string_literal.
584 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
585 (c_parser_gnu_attributes): Set and restore translate_strings_p
586 instead of lex_untranslated_string.
587 (c_parser_asm_statement): Do not set lex_untranslated_string.
588 (c_parser_asm_operands): Likewise.
589 (c_parser_has_attribute_expression): Set and restore
590 translate_strings_p instead of lex_untranslated_string.
591 (c_parser_postfix_expression): Use c_parser_string_literal.
592 (pragma_lex): Likewise.
593 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
594 (c_parse_file): Set translate_strings_p.
595 * gimple-parser.c (c_parser_gimple_postfix_expression)
596 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
597 * c-parser.c (c_parser_string_literal): Declare function.
598
d0c464d2
JJ
5992019-11-02 Jakub Jelinek <jakub@redhat.com>
600
601 * c-parser.c (c_finish_omp_declare_variant): Use
602 omp_get_context_selector instead of c_omp_get_context_selector.
603
ac2cfa6c
RS
6042019-10-29 Richard Sandiford <richard.sandiford@arm.com>
605
606 * c-tree.h (c_simulate_enum_decl): Declare.
607 * c-decl.c (c_simulate_enum_decl): New function.
608 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
609
74078538
RS
6102019-10-29 Richard Sandiford <richard.sandiford@arm.com>
611
612 * c-tree.h (c_simulate_builtin_function_decl): Declare.
613 * c-decl.c (c_simulate_builtin_function_decl): New function.
614 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
615 to the above.
616
ad1539d5
MS
6172019-10-28 Martin Sebor <msebor@redhat.com>
618
619 PR c/66970
620 * c-decl.c (names_builtin_p): Define a new function.
621
cb73e4e7
RB
6222019-10-28 Richard Biener <rguenther@suse.de>
623
624 PR c/92249
625 * gimple-parser.c (c_parser_parse_gimple_body): Make
626 current_bb the entry block initially to easier recover
627 from errors.
628 (c_parser_gimple_compound_statement): Adjust.
629
135df52c
JJ
6302019-10-24 Jakub Jelinek <jakub@redhat.com>
631
632 * c-parser.c (c_finish_omp_declare_variant): Use
633 omp_context_selector_matches instead of
634 c_omp_context_selector_matches.
635 * c-decl.c (c_decl_attributes): Add "omp declare target block"
636 attribute in between declare target and end declare target
637 pragmas.
638
783bfe5e
JM
6392019-10-15 Joseph Myers <joseph@codesourcery.com>
640
641 * c-parser.c (c_parser_attribute_any_word): Rename to
642 c_parser_gnu_attribute_any_word. All callers changed.
643 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
644 callers changed.
645 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
646 callers changed.
647 (c_parser_declaration_or_fndef, c_parser_declspecs)
648 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
649 (c_parser_struct_declaration, c_parser_declarator)
650 (c_parser_gnu_attribute, c_parser_compound_statement)
651 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
652 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
653 attribute-related syntax productions.
654
56898e43
RS
6552019-10-14 Richard Sandiford <richard.sandiford@arm.com>
656
657 * c-objc-common.c (useful_aka_type_p): Replace with...
658 (get_aka_type): ...this new function. Given the original type,
659 decide which aka type to print (if any). Only look through typedefs
660 if user_facing_original_type_p.
661 (print_type): Update accordingly.
662
b9424661
JJ
6632019-10-14 Jakub Jelinek <jakub@redhat.com>
664
665 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
666 into int NESTED, if it is 2, diagnose missing commas in between
667 clauses.
668 (c_parser_omp_context_selector): Pass 2 as last argument to
669 c_parser_omp_all_clauses.
670
20de9568
JJ
6712019-10-12 Jakub Jelinek <jakub@redhat.com>
672
673 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
674 For simd properties, put them directly into TREE_VALUE.
675 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
676 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
677 add "omp declare variant base" attribute rather than
678 "omp declare variant".
679
fe2bc27c
JM
6802019-10-11 Joseph Myers <joseph@codesourcery.com>
681
682 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
683
94e7f906
JJ
6842019-10-10 Jakub Jelinek <jakub@redhat.com>
685
686 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
687 true, terminate processing on closing paren and don't skip to end of
688 pragma line.
689 (c_parser_omp_declare_simd): Handle also declare variant.
690 (omp_construct_selectors, omp_device_selectors,
691 omp_implementation_selectors, omp_user_selectors): New variables.
692 (c_parser_omp_context_selector,
693 c_parser_omp_context_selector_specification,
694 c_finish_omp_declare_variant): New functions.
695 (c_finish_omp_declare_simd): Handle both declare simd and
696 declare variant.
697 (c_parser_omp_declare): Handle declare variant.
698
93313b94
JM
6992019-10-02 Joseph Myers <joseph@codesourcery.com>
700
701 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
702 CPP_COLON tokens.
703
55879815
RS
7042019-10-01 Richard Sandiford <richard.sandiford@arm.com>
705
706 * c-objc-common.c (useful_aka_type_p): New function.
707 (print_type): Use it to decide whether an aka type is worth printing.
708
59bc434a
JJ
7092019-09-27 Jakub Jelinek <jakub@redhat.com>
710
711 PR c++/88203
712 * c-parser.c (c_parser_predefined_identifier): New function.
713 (c_parser_postfix_expression): Use it.
714 (c_parser_omp_variable_list): Parse predefined identifiers.
715 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
716 in shared and firstprivate clauses, even when they are predetermined
717 shared.
718
c6447c20
RS
7192019-09-27 Richard Sandiford <richard.sandiford@arm.com>
720
721 * c-typeck.c (build_function_call_vec): Take the original function
722 decl as an optional final parameter. Pass all built-in calls to
723 check_builtin_function_arguments.
724
522da4c2
EB
7252019-09-20 Eric Botcazou <ebotcazou@adacore.com>
726
727 PR c/91815
728 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
729 of identifiers in the external scope only for variables and functions.
730
68e2c199
PK
7312019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
732
733 PR c/78736
734 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
735
22f8849d
IS
7362019-08-23 Iain Sandoe <iain@sandoe.co.uk>
737
738 PR pch/61250
739 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
740 after determining that the first token is not
741 PRAGMA_GCC_PCH_PREPROCESS.
742
db376f45
EB
7432019-08-22 Eric Botcazou <ebotcazou@adacore.com>
744
745 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
746 FUNCTION_DECL to the right value in the presence of nested declarators.
747
4d732405
RS
7482019-08-13 Richard Sandiford <richard.sandiford@arm.com>
749
750 PR middle-end/91421
751 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
752
cb1180d5
RS
7532019-08-13 Richard Sandiford <richard.sandiford@arm.com>
754
755 PR middle-end/91421
756 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
757 of a built_in_function.
758 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
759
77eb117f
JJ
7602019-08-10 Jakub Jelinek <jakub@redhat.com>
761
762 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
763 (c_parser_omp_clause_device_type): New function.
764 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
765 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
766 (c_parser_omp_declare_target): Handle device_type clauses. Remove
767 diagnostics for declare target with clauses nested in clause-less
768 declare target declaration-definition-seq.
769 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
770
2c3b8bad
JJ
7712019-08-09 Jakub Jelinek <jakub@redhat.com>
772
bb522e2e
JJ
773 * c-parser.c (check_no_duplicate_clause): Simplify using
774 omp_find_clause.
775 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
776 directive name modifiers.
777 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
778
2c3b8bad
JJ
779 PR c/91401
780 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
781 check_no_duplicate_clause call. Comment it out, instead emit a
782 warning for duplicate dist_schedule clauses.
783
99769e7f
RS
7842019-08-08 Richard Sandiford <richard.sandiford@arm.com>
785
786 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
787
8860d270
JJ
7882019-08-08 Jakub Jelinek <jakub@redhat.com>
789
790 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
791 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
792 instead of generic_head to track duplicates.
793
398e3feb
JJ
7942019-08-07 Jakub Jelinek <jakub@redhat.com>
795
796 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
797 (c_parser_omp_clause_use_device_addr): New function.
798 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
799 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
800 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
801 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
802 map or use_device_* clauses.
803 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
804 in OpenMP, require pointer type rather than pointer or array type.
805 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
806
a28351e7
JJ
8072019-07-31 Jakub Jelinek <jakub@redhat.com>
808
809 PR c/91192
810 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
811 even if finish is UNKNOWN_LOCATION, just use start as finish in that
812 case.
813
6343b6bf
ML
8142019-07-25 Martin Liska <mliska@suse.cz>
815 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
816
817 PR c++/23383
818 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
819
cb50701e
ML
8202019-07-25 Martin Liska <mliska@suse.cz>
821
822 * c-decl.c (merge_decls): Use new macros
823 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
824
62e3e66f
RB
8252019-07-23 Richard Biener <rguenther@suse.de>
826
827 PR tree-optimization/83518
828 * gimple-parser.c (c_parser_parse_gimple_body): When we have
829 a CFG also rebuild cgraph edges.
830
554a530f
JJ
8312019-07-20 Jakub Jelinek <jakub@redhat.com>
832
833 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
834 (c_parser_omp_clause_bind): New function.
835 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
836 (OMP_LOOP_CLAUSE_MASK): Define.
837 (c_parser_omp_loop): New function.
838 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
839 loop combined with parallel or teams.
840 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
841 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
842
d119bf79
RS
8432019-07-18 Richard Sandiford <richard.sandiford@arm.com>
844
845 PR c/53633
846 * c-decl.c (finish_function): Check targetm.warn_func_return
847 before issuing a -Wreturn-type warning.
848
ab20d992 8492019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
850
851 * gimple-parser.c (c_parser_gimple_try_stmt): New.
852 (c_parser_compound_statement): Call it.
853
1fdd6f04
JJ
8542019-07-12 Jakub Jelinek <jakub@redhat.com>
855
856 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
857 (c_parser_omp_clause_order): New function.
858 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
859 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
860 PRAGMA_OMP_CLAUSE_ORDER.
861 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
862
8389386c
RB
8632019-07-10 Richard Biener <rguenther@suse.de>
864
865 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
866 _Literal (int *) &x for address literals.
867
99b1c316
MS
8682019-07-09 Martin Sebor <msebor@redhat.com>
869
870 PR c++/61339
871 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
872 to class.
873 (field_decl_cmp): Same.
874 * c-parser.c (c_parser_struct_or_union_specifier): Same.
875 * c-tree.h: Same.
876 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
877
6c1dae73
MS
8782019-07-09 Martin Sebor <msebor@redhat.com>
879
880 PR c++/61339
881 * c-decl.c: Change class-key from class to struct and vice versa
882 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
883 * gimple-parser.c: Same.
884
69b5279e
RB
8852019-07-01 Richard Biener <rguenther@suse.de>
886
887 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
888 _Literal (char *) &"foo" for address literals pointing to
889 STRING_CSTs.
890
ab20d992
JJ
8912019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
892
893 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
894 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
895 C incompatibility if alternate "__intN__" form is used.
896
1e3d475e
MS
8972019-06-24 Martin Sebor <msebor@redhat.com>
898
899 * c-typeck.c (build_binary_op): Hyphenate floating-point.
900
bf38f7e9
JJ
9012019-06-10 Jakub Jelinek <jakub@redhat.com>
902
903 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
904 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
905 (c_parser_omp_scan_loop_body): New function.
906 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
907 inscan reduction clauses.
908 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
909 non-inscan reductions on the same construct, or inscan reductions with
910 ordered or schedule clauses, or inscan array reductions.
911
65985d78
MS
9122019-06-05 Martin Sebor <msebor@redhat.com>
913
914 PR c/90737
915 * c-typeck.c (c_finish_return): Only consider functions returning
916 pointers as candidates for -Wreturn-local-addr.
917
0ecf545c
MS
9182019-06-05 Martin Sebor <msebor@redhat.com>
919
920 * c-decl.c (start_decl): Adjust quoting and hyphenation
921 in diagnostics.
922 (finish_decl): Same.
923 (finish_enum): Same.
924 (start_function): Same.
925 (declspecs_add_type): Same.
926 * c-parser.c (warn_for_abs): Same.
927 * c-typeck.c (build_binary_op): Same.
928
e03436e7
TS
9292019-05-17 Thomas Schwinge <thomas@codesourcery.com>
930
b48f44bf
TS
931 PR c/89433
932 * c-parser.c (c_finish_oacc_routine): Rework checking if already
933 marked with an OpenACC 'routine' directive.
934
5bf04509
TS
935 PR c/89433
936 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
937 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
938
e03436e7
TS
939 PR c/89433
940 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
941 clauses from "omp declare target" attribute.
942
a9c697b8
MS
9432019-05-16 Martin Sebor <msebor@redhat.com>
944
ab20d992
JJ
945 * c-decl.c (start_decl): Quote keywords, operators, and
946 types in diagnostics.
947 (finish_decl): Same.
948 * c-parser.c (c_parser_asm_statement): Same.
949 (c_parser_conditional_expression): Same.
950 (c_parser_transaction_cancel): Same.
951 * c-typeck.c (c_common_type): Same.
952 (build_conditional_expr): Same.
953 (digest_init): Same.
954 (process_init_element): Same.
955 (build_binary_op): Same.
a9c697b8 956
c4499192
RB
9572019-05-17 Richard Biener <rguenther@suse.de>
958
959 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
960 (c_parser_gimple_unary_expression): Likewise.
961 (c_parser_gimple_parentized_ternary_expression): New function.
962
adfe6e4b
RB
9632019-05-16 Richard Biener <rguenther@suse.de>
964
965 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
966 (c_parser_gimple_unary_expression): Likewise.
967
186dabf2
RB
9682019-05-15 Richard Biener <rguenther@suse.de>
969
970 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
971 __BIT_FIELD_REF.
972
1158c5b4
RB
9732019-05-14 Richard Biener <rguenther@suse.de>
974
975 * gimple-parser.c (c_parser_gimple_statement): Remove
976 questionable auto-promotion to VIEW_CONVERT_EXPR.
977 (c_parser_gimple_typespec): Split out from __MEM parsing.
978 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
979 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
980 as __VIEW_CONVERT with -gimple.
981
fd4485aa
ML
9822019-05-09 Martin Liska <mliska@suse.cz>
983
984 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
985 __MAX.
986 (c_parser_gimple_unary_expression): Parse also binary expression
987 __MIN and __MAX.
988 (c_parser_gimple_parentized_binary_expression): New function.
989
d276406a
ML
9902019-05-09 Martin Liska <mliska@suse.cz>
991
992 * gimple-parser.c (struct gimple_parser): Add probability.
993 for gimple_parser_edge.
994 (gimple_parser::push_edge): Add new argument probability.
995 (c_parser_gimple_parse_bb_spec): Parse also probability
996 if present.
997 (c_parser_parse_gimple_body): Set edge probability.
998 (c_parser_gimple_compound_statement): Consume token
999 before calling c_parser_gimple_goto_stmt.
1000 Parse BB counts.
1001 (c_parser_gimple_statement): Pass new argument.
1002 (c_parser_gimple_goto_stmt): Likewise.
1003 (c_parser_gimple_if_stmt): Likewise.
1004 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1005 * c-parser.c (c_parser_declaration_or_fndef): Pass
1006 hot_bb_threshold argument.
1007 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1008 field.
1009 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1010
f179b64e
JJ
10112019-04-26 Jakub Jelinek <jakub@redhat.com>
1012
1013 PR debug/90197
1014 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1015 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1016 (c_parser_do_statement): Likewise.
1017 (c_parser_for_statement): Likewise. Formatting fixes.
1018 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1019 emit DEBUG_BEGIN_STMTs if needed.
1020
e7178413
JJ
10212019-04-19 Jakub Jelinek <jakub@redhat.com>
1022
c280b7ee
JJ
1023 PR c/89888
1024 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1025 (c_start_case): Don't clear it.
1026 (do_case): Adjust c_add_case_label caller.
1027 (c_finish_case): Adjust c_do_switch_warnings caller.
1028
e7178413
JJ
1029 PR c++/90108
1030 * c-decl.c (merge_decls): If remove is main variant and
1031 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1032 variant that has newdecl as TYPE_NAME if any.
1033
60a2c645
JJ
10342019-04-12 Jakub Jelinek <jakub@redhat.com>
1035
1036 PR c/89933
1037 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1038 don't try to remove it from the variant list, but instead assert
1039 it has no variants.
1040
2a82beaa
RB
10412019-04-01 Richard Biener <rguenther@suse.de>
1042
1043 PR c/71598
1044 * c-tree.h (c_get_alias_set): Declare.
1045 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1046 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1047 as the underlying integer type.
1048
bec1da64
MS
10492019-03-19 Martin Sebor <msebor@redhat.com>
1050
1051 PR tree-optimization/89688
1052 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1053 kinds of initializers.
1054
855cd9b1
JJ
10552019-03-19 Jakub Jelinek <jakub@redhat.com>
1056
1057 PR c/89734
1058 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1059 return type even if quals_used is 0. Formatting fixes.
1060
baa09dc5
RB
10612019-03-14 Richard Biener <rguenther@suse.de>
1062
1063 * c-tree.h (enum c_declspec_il): New.
1064 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1065 enum bitfield.
1066 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1067 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1068 (c_parser_declspecs): Adjust.
1069 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1070 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1071 and bitmap.h.
1072 (struct gimple_parser): New.
1073 (gimple_parser::push_edge): New method.
1074 (c_parser_gimple_parse_bb_spec): New helper.
1075 (c_parser_parse_gimple_body): Get start pass and IL specification.
1076 Initialize SSA and CFG.
1077 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1078 Build a gimple_parser parsing state and pass it along.
1079 (c_parser_gimple_statement): Change intermittend __PHI internal
1080 function argument for the edge.
1081 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1082 (c_parser_gimple_goto_stmt): Record edges to build.
1083 (c_parser_gimple_if_stmt): Likewise.
1084 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1085 (c_parser_gimple_or_rtl_pass_list): Likewise.
1086
a3f9f006
ML
10872019-03-11 Martin Liska <mliska@suse.cz>
1088
1089 * c-decl.c (check_for_loop_decls): Wrap an option name
1090 in a string format message and fix GNU coding style.
1091 * c-parser.c (c_parser_declspecs): Likewise.
1092
1db01ff9
JJ
10932019-03-08 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR tree-optimization/89550
1096 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1097 returned true.
1098 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1099 or warning returned true.
1100
66dcb747
JJ
11012019-02-28 Jakub Jelinek <jakub@redhat.com>
1102
1103 PR c/89525
1104 * c-typeck.c (convert_arguments): Call inform_declaration only if
1105 the previous warning_at call returned true.
1106
2263c9f2
TS
11072019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1108
1109 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1110 parameter. Adjust all users.
1111 (c_parser_oacc_simple_clause): Replace parser with loc formal
1112 parameter. Adjust all users.
1113
ab20d992 11142019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1115
1116 PR c/87924
1117 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1118 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1119
5f88ba10
JJ
11202019-02-15 Jakub Jelinek <jakub@redhat.com>
1121
1122 PR c/89340
1123 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1124 before c_decl_attributes rather than after it.
1125
cfc30fd1
JJ
11262019-02-06 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c/89211
1129 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1130 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1131 instead of 3 nested ifs.
1132
fbe83e6b
JM
11332019-02-06 Joseph Myers <joseph@codesourcery.com>
1134
1135 PR c/88584
1136 * c-decl.c (finish_decl): Do not complete array types for arrays
1137 with external linkage not at file scope.
1138
f461f938
RB
11392019-02-05 Richard Biener <rguenther@suse.de>
1140
1141 PR c/88606
1142 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1143 all type variants when not supported.
1144
fe509359
JJ
11452019-01-30 Jakub Jelinek <jakub@redhat.com>
1146
1147 PR c/89061
1148 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1149 * c-decl.c (decl_jump_unsafe): Return false for
1150 C_DECL_COMPOUND_LITERAL_P decls.
1151 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1152
6a335b96
JJ
11532019-01-29 Jakub Jelinek <jakub@redhat.com>
1154
f4b7e754
JJ
1155 PR c/89045
1156 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1157 scope.
1158
6a335b96
JJ
1159 PR c/86125
1160 * c-decl.c (last_fileptr_type): Remove.
1161 (last_structptr_types): New variable.
1162 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1163 {old,new}rettype instead of the types themselves. Assert
1164 last_structptr_types array has the same number of elements
1165 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1166 argument oldtype and newtype. Instead of handling
1167 just fileptr_type_node specially, handle all builtin_structptr_types
1168 pointer nodes. Formatting fix.
1169
d8b5a1a0
MS
11702019-01-24 Martin Sebor <msebor@redhat.com>
1171
1172 PR c/86125
1173 PR c/88886
1174 PR middle-end/86308
1175 * c-decl.c (match_builtin_function_types): Add arguments.
1176 (diagnose_mismatched_decls): Diagnose mismatched declarations
1177 of built-ins more strictly.
1178
e21c4491
JJ
11792019-01-24 Jakub Jelinek <jakub@redhat.com>
1180
1181 PR c++/88976
1182 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1183 on #pragma omp cancel with different modifiers.
1184
420183d9
L
11852019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1186
1187 PR c/51628
1188 PR c/88664
1189 * c-typeck.c (convert_for_assignment): Upate the
1190 warn_for_address_or_pointer_of_packed_member call.
1191
17ad43dd
TH
11922019-01-16 Tom Honermann <tom@honermann.net>
1193 Jason Merrill <jason@redhat.com>
1194
1195 * c-typeck.c (digest_init): Revised the error message produced for
1196 ill-formed cases of array initialization with a string literal.
1197 (error_init): Make variadic.
1198
5f07d78a
JJ
11992019-01-12 Jakub Jelinek <jakub@redhat.com>
1200
1201 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1202
c4581bbf
JJ
12032019-01-07 Jakub Jelinek <jakub@redhat.com>
1204
1205 PR c/88701
1206 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1207 if current_function_decl is non-NULL.
1208
65c5b1eb
JM
12092019-01-07 Joseph Myers <joseph@codesourcery.com>
1210
1211 PR c/88720
1212 PR c/88726
1213 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1214 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1215 functions declared but never defined only for external scope, not
1216 for other scopes.
1217
d8fcab68
JJ
12182019-01-07 Jakub Jelinek <jakub@redhat.com>
1219
1220 PR c++/85052
1221 * c-parser.c (c_parser_postfix_expression): Parse
1222 __builtin_convertvector.
1223
a5544970
JJ
12242019-01-01 Jakub Jelinek <jakub@redhat.com>
1225
1226 Update copyright years.
1227
da77eace
L
12282018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1229
1230 PR c/51628
1231 * c-typeck.c (convert_for_assignment): Call
1232 warn_for_address_or_pointer_of_packed_member.
1233
1edf8866
SB
12342018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1235
1236 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1237 a more specific error message (instead of just falling through).
1238
db4fd626
SB
12392018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1240
1241 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1242 asm qualifier is first seen; use that to give nicer "duplicate asm
1243 qualifier" messages. Delete 'quals" variable, instead pass the
1244 "is_volatile_ flag to build_asm_stmt directly.
1245 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1246 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1247
9c9cfcbb
SB
12482018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1249
1250 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1251 "done" boolean variable.
1252
a14feb3c
DM
12532018-12-19 David Malcolm <dmalcolm@redhat.com>
1254
1255 PR c++/87504
1256 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1257 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1258 (build_binary_op): Use struct op_location_t and
1259 class binary_op_rich_location.
1260
6d939173
JJ
12612018-12-11 Jakub Jelinek <jakub@redhat.com>
1262
1263 PR sanitizer/88426
1264 * c-convert.c (convert): Call c_fully_fold before calling
1265 ubsan_instrument_float_cast.
1266
b7055028
SB
12672018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1268
1269 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1270 setting "quals".
1271
5b76e75f
SB
12722018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1273
1274 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1275 after asm. Pass a flag for it to build_asm_expr.
1276 * c-tree.h (build_asm_expr): Update declaration.
1277 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1278 set ASM_INLINE_P.
1279
30bd42b9
SB
12802018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1281
1282 PR inline-asm/55681
1283 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1284 combination of volatile and goto, in any order, without repetitions.
1285
9df6c0e4
JB
12862018-12-04 James Norris <jnorris@codesourcery.com>
1287 Cesar Philippidis <cesar@codesourcery.com>
1288 Julian Brown <julian@codesourcery.com>
1289
1290 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1291 code.
1292
f44697b7
RB
12932018-11-30 Richard Biener <rguenther@suse.de>
1294
1295 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1296 _Literal (type) { ... } as empty aggregate or vector constructor.
1297
550dfbdc
MS
12982018-11-29 Martin Sebor <msebor@redhat.com>
1299
1300 PR c/88091
1301 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1302 (convert_arguments): Add comments. Pass additional argument to
1303 the function above.
1304
673670da
MS
13052018-11-29 Martin Sebor <msebor@redhat.com>
1306
1307 PR c/88172
1308 PR testsuite/88208
1309 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1310
db1d09b0
MS
13112018-11-23 Martin Sebor <msebor@redhat.com>
1312
1313 PR testsuite/88098
1314 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1315 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1316
98f08eb8
MS
13172018-11-20 Martin Sebor <msebor@redhat.com>
1318
1319 * c-parser.c (c_parser_has_attribute_expression): New function.
1320 (c_parser_attribute): New function.
1321 (c_parser_attributes): Move code into c_parser_attribute.
1322 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1323
cd5da983
MS
13242018-11-15 Martin Sebor <msebor@redhat.com>
1325
1326 PR c/83656
1327 * c-decl.c (header_for_builtin_fn): Declare.
1328 (diagnose_mismatched_decls): Diagnose declarations of built-in
1329 functions without a prototype.
1330 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1331 (convert_argument): Same.
1332 (convert_arguments): Factor code out into convert_argument.
1333 Detect mismatches between built-in formal arguments in calls
1334 to built-in without prototype.
1335 (build_conditional_expr): Same.
1336 (type_or_builtin_type): New function.
1337 (convert_for_assignment): Add argument. Conditionally issue
1338 warnings instead of errors for mismatches.
1339
620e594b
DM
13402018-11-13 David Malcolm <dmalcolm@redhat.com>
1341
1342 * c-decl.c: Replace "source_location" with "location_t".
1343 * c-tree.h: Likewise.
1344 * c-typeck.c: Likewise.
1345 * gimple-parser.c: Likewise.
1346
3179ebae
JJ
13472018-11-09 Jakub Jelinek <jakub@redhat.com>
1348
81a227c6
JJ
1349 * c-parser.c (c_parser_omp_clause_final): Use
1350 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1351 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1352 parsing instead of c_parser_paren_condition.
1353 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1354 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1355 c_fully_fold instead of c_parser_condition.
1356 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1357 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1358 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1359 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1360 c_parser_expr_no_commas instead of c_parser_expression.
1361
98c91c56
JJ
1362 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1363 reduction clause with inscan modifier.
1364
3179ebae
JJ
1365 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1366 clauses other than atomic_default_mem_order.
1367
28567c40
JJ
13682018-11-08 Jakub Jelinek <jakub@redhat.com>
1369
1370 * c-parser.c: Include memmode.h.
1371 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1372 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1373 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1374 task_reduction clauses.
1375 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1376 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1377 section, or lvalue assignment expression.
1378 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1379 (c_parser_omp_clause_lastprivate): Parse optional
1380 conditional: modifier.
1381 (c_parser_omp_clause_hint): Require constant integer expression rather
1382 than just integer expression.
1383 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1384 clause.
1385 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1386 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1387 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1388 functions.
1389 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1390 iterators. Parse mutexinoutset and depobj kinds.
1391 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1392 callers.
1393 (c_parser_omp_all_clauses): Likewise. Handle
1394 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1395 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1396 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1397 default memory order from requires directive if any. Adjust
1398 c_finish_omp_atomic caller.
1399 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1400 (c_parser_omp_flush): Parse flush with memory-order-clause.
1401 (c_parser_omp_for_loop): Allow NE_EXPR even in
1402 OpenMP loops, adjust c_finish_omp_for caller.
1403 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1404 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1405 Allow to be called while parsing combined parallel master.
1406 Parse combined master taskloop{, simd}.
1407 (c_parser_omp_parallel): Parse combined
1408 parallel master{, taskloop{, simd}} constructs.
1409 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1410 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1411 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1412 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1413 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1414 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1415 around teams body. Use SET_EXPR_LOCATION.
1416 (c_parser_omp_target_data): Allow target data
1417 with only use_device_ptr clauses.
1418 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1419 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1420 (c_parser_omp_requires): New function.
1421 (c_finish_taskloop_clauses): New function.
1422 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1423 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1424 declaration. Disallow in_reduction clause when combined with parallel
1425 master.
1426 (c_parser_omp_construct): Adjust c_parser_omp_master and
1427 c_parser_omp_taskgroup callers.
1428 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1429 other than cancel.
1430 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1431 like OMP_CLAUSE_REDUCTION.
1432 (handle_omp_array_sections): Likewise. Call save_expr on array
1433 reductions before calling build_index_type. Handle depend clauses
1434 with iterators.
1435 (struct c_find_omp_var_s): New type.
1436 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1437 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1438 with static, runtime or auto schedule kinds. Call save_expr for whole
1439 array reduction sizes. Diagnose reductions with zero sized elements
1440 or variable length structures. Diagnose nogroup clause used with
1441 reduction clause(s). Handle depend clause with
1442 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1443 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1444 some different type for other kinds. Use build_unary_op with
1445 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1446 Handle depend clauses with iterators. Remove no longer needed special
1447 case that predetermined const qualified vars may be specified in
1448 firstprivate clause. Complain if const qualified vars are mentioned
1449 in data-sharing clauses other than firstprivate or shared. Use
1450 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1451 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1452 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1453 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1454
7e2de6df
DM
14552018-10-29 David Malcolm <dmalcolm@redhat.com>
1456
1457 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1458 logic for change to name_hint::operator bool.
1459 (undeclared_variable): Likewise.
1460 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1461 (c_parser_parameter_declaration): Likewise.
1462
9f936c86
JM
14632018-10-17 Joseph Myers <joseph@codesourcery.com>
1464
1465 * c-errors.c (pedwarn_c11): New function.
1466 * c-parser.c (disable_extension_diagnostics): Save
1467 warn_c11_c2x_compat and set it to 0.
1468 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1469 (c_parser_static_assert_declaration_no_semi): Handle
1470 _Static_assert without string constant.
1471 * c-tree.h (pedwarn_c11): New prototype.
1472
033eb567
DM
14732018-10-17 David Malcolm <dmalcolm@redhat.com>
1474
1475 * Make-lang.in (selftest-c): New.
1476 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1477 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1478 from gcc/Makefile.in.
1479
0edf3afe
RB
14802018-10-02 Richard Biener <rguenther@suse.de>
1481
1482 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1483
8313a764
JM
14842018-09-26 Joseph Myers <joseph@codesourcery.com>
1485
1486 PR c/87390
1487 * c-typeck.c (build_binary_op): Use excess precision for
1488 comparisons of integers and floating-point for C11 and later.
1489
ce6f0888
MJ
14902018-09-26 Martin Jambor <mjambor@suse.cz>
1491
1492 PR c/87347
1493 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1494 comment.
ce6f0888 1495
9c4a4b3c
DM
14962018-09-17 David Malcolm <dmalcolm@redhat.com>
1497
1498 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1499 Update for new param.
1500 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1501 Likewise.
1502
80c6d1f4
MJ
15032018-09-17 Martin Jambor <mjambor@suse.cz>
1504
1505 PR c/63886
1506 * c-parser.c: (warn_for_abs): New function.
1507 (c_parser_postfix_expression_after_primary): Call it.
1508
4a426e36
BE
15092018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1510
1511 * c-typeck.c (digest_init): Shorten overlength strings.
1512
6d900107
BE
15132018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1514
1515 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1516
b5764229
BE
15172018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1518
1519 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1520 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1521
22eea6b2
AM
15222018-08-30 Alexander Monakov <amonakov@ispras.ru>
1523
1524 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1525 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1526
85204e23
DM
15272018-08-27 David Malcolm <dmalcolm@redhat.com>
1528
1529 PR 87091
1530 * c-decl.c (implicitly_declare): Update call to
1531 maybe_add_include_fixit to suggest overriding the location, as it
1532 is for a note.
1533 * c-objc-common.c (c_tree_printer): Update for conversion of
1534 show_caret_p to a tri-state.
1535
3d78e008
ML
15362018-08-27 Martin Liska <mliska@suse.cz>
1537
1538 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1539 fndecl_built_in_p and remove check for FUNCTION_DECL if
1540 possible.
3d78e008
ML
1541 (diagnose_mismatched_decls): Likewise.
1542 (merge_decls): Likewise.
1543 (warn_if_shadowing): Likewise.
1544 (pushdecl): Likewise.
1545 (implicitly_declare): Likewise.
1546 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1547 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1548 * c-typeck.c (build_function_call_vec): Likewise.
1549 (convert_arguments): Likewise.
1550
097f82ec
DM
15512018-08-20 David Malcolm <dmalcolm@redhat.com>
1552
1553 PR other/84889
1554 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1555 (diagnose_mismatched_decls): Likewise, in various places.
1556 (warn_if_shadowing): Likewise.
1557 (implicit_decl_warning): Likewise.
1558 (implicitly_declare): Likewise.
1559 (undeclared_variable): Likewise.
1560 (declare_label): Likewise.
1561 (grokdeclarator): Likewise.
1562 (start_function): Likewise.
1563 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1564 (c_parser_parameter_declaration): Likewise.
1565 (c_parser_binary_expression): Likewise.
1566 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1567 (parser_build_binary_op): Likewise.
1568 (build_unary_op): Likewise.
1569 (error_init): Likewise.
1570 (pedwarn_init): Likewise.
1571 (warning_init): Likewise.
1572 (convert_for_assignment): Likewise.
1573
96e6ae57
DM
15742018-08-15 David Malcolm <dmalcolm@redhat.com>
1575
1576 * c-objc-common.c: Include "gcc-rich-location.h".
1577 (c_tree_printer): Move implemenation of '%T' to...
1578 (print_type): ...this new function.
1579 (range_label_for_type_mismatch::get_text): New function.
1580 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1581 range for the various ic_argpass cases.
1582 (class maybe_range_label_for_tree_type_mismatch): New class.
1583 (build_binary_op): Use it when calling binary_op_error.
1584
0cd020ae 15852018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1586
0cd020ae
PK
1587 * c-decl.c (start_decl): Do not warn if variables is named as main
1588 and is a local variable.
1589
72733314
IS
15902018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1591
1592 PR c/19315
1593 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1594 objects of unknown size.
1595
23aa9f7c
MS
15962018-08-13 Martin Sebor <msebor@redhat.com>
1597
1598 PR tree-optimization/71625
1599 * c-parser.c (c_parser_declaration_or_fndef): Call
1600 braced_list_to_string.
1601
e5e7e50d
BH
16022018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1603
1604 PR c/86690
1605 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1606 errors.
1607
8a45b051
MS
16082018-08-01 Martin Sebor <msebor@redhat.com>
1609
1610 PR tree-optimization/86650
1611 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1612 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1613
5922dcb5
JJ
16142018-08-01 Jakub Jelinek <jakub@redhat.com>
1615
1616 PR c/85704
1617 * c-typeck.c (init_field_decl_cmp): New function.
1618 (output_pending_init_elements): Use it for field comparisons
1619 instead of pure bit_position comparisons.
1620
9b452033
JJ
16212018-07-12 Jakub Jelinek <jakub@redhat.com>
1622
1623 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1624 type here, instead add "omp declare target implicit" attribute.
1625 (finish_decl): Diagnose vars without mappable type here.
1626
ab20d992
JJ
16272018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1628 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1629 Cesar Philippidis <cesar@codesourcery.com>
1630
1631 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1632 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1633 to their non-present_or_* counterparts. Make 'self' an alias to
1634 PRAGMA_OACC_CLAUSE_HOST.
1635 (c_parser_oacc_data_clause): Update GOMP mappings for
1636 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1637 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1638 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1639 Remove support for present_or_* clauses.
1640 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1641 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1642 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1643 (OACC_DATA_CLAUSE_MASK): Likewise.
1644 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1645 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1646 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1647 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1648 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1649
e197e64e
KV
16502018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1651
1652 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1653 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1654 (c_parser_gimple_unary_expression): Likewise.
1655
487f2f61
JJ
16562018-06-15 Jakub Jelinek <jakub@redhat.com>
1657
1658 PR c/86093
1659 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1660 before doing POINTER_DIFF_EXPR.
1661
e4d44a37
MP
16622018-06-07 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/85318
1665 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1666 for loop initial declarations.
1667
b67b9225
DP
16682018-05-30 David Pagan <dave.pagan@oracle.com>
1669
1670 PR c/55976
1671 * c-decl.c (grokdeclarator): Update check for return type warnings.
1672 (start_function): Likewise.
1673 (finish_function): Likewise.
1674 * c-typeck.c (c_finish_return): Update check for return type warnings.
1675 Pass OPT_Wreturn_type to pedwarn when appropriate.
1676
c566cc9f
RS
16772018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1678
1679 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1680 __FMA_EXPR handlng.
1681
e4f81565
RS
16822018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1683
1684 * gimple-parser.c: Include internal-fn.h.
1685 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1686 (c_parser_gimple_call_internal): New function.
1687 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1688 Fix typos in comment.
1689
79e7b1fe
JJ
16902018-05-10 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR c++/85662
1693 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1694 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1695 fold_convert_loc.
1696 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1697 fold_offsetof_1, pass argtype as TYPE to it and drop the
1698 fold_convert_loc.
1699
f7584c81
DP
17002018-05-02 David Pagan <dave.pagan@oracle.com>
1701
1702 PR c/30552
1703 * c-decl.c (old_style_parameter_scope): New function.
1704 * c-parser.c (c_parser_postfix_expression): Check for statement
1705 expressions in old-style function parameter list declarations.
1706 * c-parser.h (old_style_parameter_scope): New extern declaration.
1707
b33a0cb3
JJ
17082018-04-25 Jakub Jelinek <jakub@redhat.com>
1709
1710 PR sanitizer/84307
1711 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1712 it is not TREE_STATIC.
1713 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1714 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1715 its COMPOUND_LITERAL_EXPR_DECL.
1716
c5c5822a
JM
17172018-03-21 Joseph Myers <joseph@codesourcery.com>
1718
1719 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1720 where all functions return the same _FloatN or _FloatNx type,
1721 treat integer types as _Float64 instead of double.
1722
aa1c9429
JJ
17232018-03-21 Jakub Jelinek <jakub@redhat.com>
1724
1725 PR c/84999
1726 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1727 building vector comparison, diagnose it and return error_mark_node.
1728
9bb45a95
JJ
17292018-03-15 Jakub Jelinek <jakub@redhat.com>
1730
1731 PR c/84853
1732 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1733 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1734 INTEGER_TYPE element type.
1735
ada6bad9
DP
17362018-03-13 David Pagan <dave.pagan@oracle.com>
1737
1738 PR c/46921
1739 * c-typeck.c (output_init_element): Ensure field initializer
1740 expression is always evaluated if there are side effects.
1741
849bbdb9
JJ
17422018-03-06 Jakub Jelinek <jakub@redhat.com>
1743
1744 PR c/84721
1745 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1746 !building_stmt_list_p ().
1747
d74641bd
RS
17482018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1749
1750 PR c/84305
1751 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1752 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1753 and include the BIND_EXPR in the list of things that need to be
1754 pre-evaluated.
1755
0444aa9c
NS
17562018-02-09 Nathan Sidwell <nathan@acm.org>
1757
1758 PR c/84293
1759 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1760 to strict_aliasing_warning.
1761
7c30b12a
PC
17622018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1763
1764 * c-typeck.c (really_start_incremental_init, push_init_level,
1765 set_nonincremental_init, output_init_element, process_init_element):
1766 Use DECL_UNNAMED_BIT_FIELD.
1767
2be4dfcb
MP
17682018-01-31 Marek Polacek <polacek@redhat.com>
1769
1770 PR c/81779
1771 * c-parser.c (c_parser_compound_statement_nostart): Call
1772 expansion_point_location_if_in_system_header.
1773
bb9869d5
DM
17742018-01-17 David Malcolm <dmalcolm@redhat.com>
1775
1776 PR c++/83814
1777 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1778 the C part.
1779
b4923738
JJ
17802018-01-13 Jakub Jelinek <jakub@redhat.com>
1781
1782 PR c/83801
1783 * c-tree.h (decl_constant_value_1): Add a bool argument.
1784 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1785 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1786 (decl_constant_value): Adjust caller.
1787 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1788 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1789 decl_constant_value returns initializer that has BLKmode or
1790 array type.
1791 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1792
928686b1
RS
17932018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1794 Alan Hayward <alan.hayward@arm.com>
1795 David Sherwood <david.sherwood@arm.com>
1796
1797 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1798 TYPE_VECTOR_SUBPARTS.
1799
85ec4feb
JJ
18002018-01-03 Jakub Jelinek <jakub@redhat.com>
1801
1802 Update copyright years.
1803
913884f7
JJ
18042018-01-01 Jakub Jelinek <jakub@redhat.com>
1805
1806 PR c/83595
1807 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1808 c_parser_conditional_expression, c_parser_cast_expression,
1809 c_parser_sizeof_expression, c_parser_alignof_expression,
1810 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1811 c_parser_transaction_expression): Use set_error () method instead
1812 of setting value member to error_mark_node.
1813
c6cfa2bf
MM
18142017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1815
1816 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1817 and _Float<N>X built-in functions.
1818
11d29d63
JJ
18192017-12-22 Jakub Jelinek <jakub@redhat.com>
1820
14ec014e
JJ
1821 PR debug/83550
1822 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1823 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1824 incomplete vars rather than after it.
1825
11d29d63
JJ
1826 PR debug/83547
1827 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1828 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1829 and consider empty ones if there are no other stmts. For
1830 -Wunused-value walk all statements before the one only followed by
1831 DEBUG_BEGIN_STMTs.
1832
170a8bd6 18332017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1834 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1835
1836 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1837 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1838 (c_parser_do_statement): Likewise.
1839 (c_parser_for_statement): Likewise.
1840 (c_parser_statement_after_labels): Adjust calls to above.
1841 (c_parse_pragma_ivdep): New static function.
1842 (c_parser_pragma_unroll): Likewise.
1843 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1844 <PRAGMA_UNROLL>: New case.
1845
01512446
JJ
18462017-12-19 Jakub Jelinek <jakub@redhat.com>
1847
1848 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1849 perform_integral_promotions, digest_init): Replace Yoda conditions
1850 with typical order conditions.
1851 * c-decl.c (check_bitfield_type_and_width): Likewise.
1852
c65e18d3
BE
18532017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1854
1855 * c-typeck.c (c_safe_arg_type_equiv_p,
1856 c_safe_function_type_cast_p): New function.
1857 (build_c_cast): Implement -Wcast-function-type.
1858
b7280579
RB
18592017-12-14 Richard Biener <rguenther@suse.de>
1860
1861 PR c/83415
1862 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1863 like REALPART_EXPR for the behavior of whether its operand
1864 is an lvalue.
1865
49e6a6c0
MP
18662017-12-12 Marek Polacek <polacek@redhat.com>
1867
1868 PR c/82679
1869 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1870
ab20d992 18712017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1872
1873 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1874 * c-parser.c (add_debug_begin_stmt): New.
1875 (c_parser_declaration_or_fndef): Call it.
1876 (c_parser_compound_statement_nostart): Likewise.
1877 (c_parser_statement_after_labels): Likewise.
1878 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1879
4b2b493f
JM
18802017-12-07 Joseph Myers <joseph@codesourcery.com>
1881
1882 * c-decl.c (build_compound_literal): Add parameter alignas_align
1883 and set alignment of decl if nonzero.
1884 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1885 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1886 qualifier.
1887 (c_parser_struct_declaration): Update syntax comment.
1888 (c_parser_type_name): Add alignas_ok argument and pass it to
1889 c_parser_declspecs.
1890 (c_parser_cast_expression): Pass true to c_parser_type_name and
1891 give error if a cast used an _Alignas specifier.
1892 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1893 give error if sizeof (type-name) used an _Alignas specifier.
1894 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1895 give error if _Alignof (type-name) used an _Alignas specifier.
1896 (c_parser_postfix_expression_after_paren_type): Check specified
1897 alignment for a compound literal and pass it to
1898 build_compound_literal.
1899 * c-parser.h (c_parser_type_name): Update prototype.
1900 * c-tree.h (build_compound_literal): Update prototype.
1901
5d9ae53d
MS
19022017-12-07 Martin Sebor <msebor@redhat.com>
1903
1904 PR c/81544
1905 * c-decl.c (c_decl_attributes): Look up existing declaration and
1906 pass it to decl_attributes.
1907
c79144f8
DM
19082017-12-06 David Malcolm <dmalcolm@redhat.com>
1909
1910 PR c/83236
1911 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1912 reserved for use by the implementation.
1913
613bc14f
DM
19142017-12-06 David Malcolm <dmalcolm@redhat.com>
1915
1916 * c-decl.c: Include "c-family/c-spellcheck.h".
1917
05abad4c
ML
19182017-12-05 Martin Liska <mliska@suse.cz>
1919 Jakub Jelinek <jakub@redhat.com>
1920
1921 * c-typeck.c (pointer_diff): Add new argument and instrument
1922 pointer subtraction.
1923 (build_binary_op): Similar for pointer comparison.
1924
cc6534d4
JJ
19252017-12-01 Jakub Jelinek <jakub@redhat.com>
1926
65791f42
JJ
1927 PR c/79153
1928 * c-parser.c: Include tree-iterator.h.
1929 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1930 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1931 on it.
1932
cc6534d4
JJ
1933 PR c/83222
1934 * c-tree.h (decl_constant_value_1): Declare.
1935 * c-typeck.c (decl_constant_value_1): New function.
1936 (decl_constant_value): Use it.
1937 * c-fold.c (c_fully_fold_internal): If in_init, use
1938 decl_constant_value_1 instead of decl_constant_value.
1939
5de73c05
JJ
19402017-11-30 Jakub Jelinek <jakub@redhat.com>
1941
1942 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1943
058f0b9e
JJ
19442017-11-28 Jakub Jelinek <jakub@redhat.com>
1945
1946 PR sanitizer/81275
1947 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1948 c_switch_covers_all_cases_p returns true.
1949
5e9d6aa4 19502017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1951 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1952
1953 * Make-lang.in (c/c-array-notation.o): Remove.
1954 * c-array-notation.c: Delete.
1955 * c-decl.c: Remove cilkplus condition.
1956 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1957 c_parser_cilk_verify_simd, c_parser_array_notation,
1958 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1959 c_parser_cilk_simd_fn_vector_attrs,
1960 c_finish_cilk_simd_fn_tokens): Delete.
1961 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1962 (c_parser_direct_declarator_inner): Ditto.
1963 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1964 (c_parser_attributes, c_parser_compound_statement,
1965 c_parser_statement_after_labels, c_parser_if_statement,
1966 c_parser_switch_statement, c_parser_while_statement,
1967 c_parser_do_statement, c_parser_for_statement,
1968 c_parser_unary_expression, c_parser_postfix_expression,
1969 c_parser_postfix_expression_after_primary,
1970 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1971 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1972 support.
1973 * c-typeck.c (build_array_ref, build_function_call_vec,
1974 convert_arguments,
1975 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1976 c_finish_loop, build_binary_op): Remove cilkplus support.
1977
9e851845
JJ
19782017-11-28 Jakub Jelinek <jakub@redhat.com>
1979
1980 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1981 of build3.
1982
ab20d992 19832017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1984
1985 * Make-lang.in (c.install-plugin): Install backend import library.
1986
41521dee
JJ
19872017-11-23 Jakub Jelinek <jakub@redhat.com>
1988
1989 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1990 pragma_stmt context.
1991
ac9effed
EB
19922017-11-23 Mike Stump <mikestump@comcast.net>
1993 Eric Botcazou <ebotcazou@adacore.com>
1994
1995 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1996 ANNOTATE_EXPR.
1997 (c_parser_do_statement): Likewise.
1998 (c_parser_for_statement): Likewise.
1999
ce95abc4
DM
20002017-11-22 David Malcolm <dmalcolm@redhat.com>
2001
2002 PR c++/62170
2003 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2004 bool to bool *. Within '%T' handling, if showing an "aka", use
2005 "quoted" param to add appropriate quoting.
2006
974aedcc
MP
20072017-11-22 Marek Polacek <polacek@redhat.com>
2008
2009 PR c++/60336
2010 PR middle-end/67239
2011 PR target/68355
2012 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2013
d4300cc6
DM
20142017-11-21 David Malcolm <dmalcolm@redhat.com>
2015
2016 PR c/83056
2017 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2018 earlier failed lookups.
2019
1af4ebf5
MG
20202017-11-21 Marc Glisse <marc.glisse@inria.fr>
2021
2022 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2023 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2024
26edace6
DM
20252017-11-20 David Malcolm <dmalcolm@redhat.com>
2026
2027 PR c/81404
2028 * c-decl.c: Include "c-family/known-headers.h".
2029 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2030 to known-headers.cc.
2031 (class suggest_missing_header): Move to known-header.h.
2032 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2033 than get_c_name_hint.
2034
b1212255
DM
20352017-11-20 David Malcolm <dmalcolm@redhat.com>
2036
2037 * c-decl.c (get_c_name_hint): New function.
2038 (class suggest_missing_header): New class.
2039 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2040 suggest missing headers to the user.
2041
6c7a259b
DM
20422017-11-20 David Malcolm <dmalcolm@redhat.com>
2043
2044 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2045 Include "c-family/name-hint.h"
2046 (implicit_decl_warning): Convert "hint" from
2047 const char * to name_hint. Pass location to
2048 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2049 warning was not printed.
2050 (undeclared_variable): Likewise for "guessed_id".
2051 (lookup_name_fuzzy): Convert return type from const char *
2052 to name_hint. Add location_t param.
2053 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2054 Include "c-family/name-hint.h"
2055 (c_parser_declaration_or_fndef): Convert "hint" from
2056 const char * to name_hint. Pass location to lookup_name_fuzzy.
2057 (c_parser_parameter_declaration): Likewise.
2058
f9c59f7e
JJ
20592017-11-19 Jakub Jelinek <jakub@redhat.com>
2060
2061 PR c/66618
2062 PR c/69960
2063 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2064 where needed.
2065 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2066 handle_omp_array_sections): Likewise.
2067 (digest_init): Don't call decl_constant_value_for_optimization.
2068 * c-tree.h (decl_constant_value_for_optimization): Removed.
2069 * c-fold.c (c_fold_array_ref): New function.
2070 (c_fully_fold_internal): Add LVAL argument, propagate it through
2071 recursive calls. For VAR_P call decl_constant_value and
2072 unshare if not LVAL and either optimizing or IN_INIT. Remove
2073 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2074 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2075 (c_fully_fold): Add LVAL argument, pass it through to
2076 c_fully_fold_internal.
2077 (decl_constant_value_for_optimization): Removed.
2078
3ca0dc60
JM
20792017-11-15 Joseph Myers <joseph@codesourcery.com>
2080
2081 PR c/81156
2082 * c-parser.c (check_tgmath_function): New function.
2083 (enum tgmath_parm_kind): New enum.
2084 (c_parser_postfix_expression): Handle __builtin_tgmath.
2085
64a5912c
DM
20862017-10-31 David Malcolm <dmalcolm@redhat.com>
2087
2088 * c-decl.c (implicit_decl_warning): Update for renaming of
2089 pedwarn_at_rich_loc and warning_at_rich_loc.
2090 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2091 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2092 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2093 (c_parser_struct_or_union_specifier): Likewise for renaming of
2094 pedwarn_at_rich_loc.
2095 (c_parser_parameter_declaration): Likewise for renaming of
2096 error_at_rich_loc.
2097 * c-typeck.c (build_component_ref): Likewise.
2098 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2099 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2100 (set_init_label): Likewise for renaming of error_at_rich_loc.
2101
c1136864
RB
21022017-10-30 Richard Biener <rguenther@suse.de>
2103
2104 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2105 stmts.
2106
ee5fd23a
MM
21072017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2108
2109 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2110 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2111
1a59ccf2
DM
21122017-10-25 David Malcolm <dmalcolm@redhat.com>
2113
2114 PR c/7356
2115 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2116 semicolons.
2117
bc1a75dd
JJ
21182017-10-25 Jakub Jelinek <jakub@redhat.com>
2119
2120 PR libstdc++/81706
2121 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2122 newdecl to corresponding __builtin_ if any.
2123
ff1ff960
PC
21242017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2125
2126 PR c++/82466
2127 * c-decl.c (diagnose_mismatched_decls): Use
2128 OPT_Wbuiltin_declaration_mismatch.
2129
62e1c678
DM
21302017-10-12 David Malcolm <dmalcolm@redhat.com>
2131
2132 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2133 use it to guard calls to maybe_suggest_missing_token_insertion.
2134 (c_parser_parms_list_declarator): Override default value of new
2135 "type_is_unique" param to c_parser_require.
2136 (c_parser_asm_statement): Likewise.
2137 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2138 defaulting to true.
2139
a92f6726
NS
21402017-10-11 Nathan Sidwell <nathan@acm.org>
2141
2142 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2143
8e6cdc90
RS
21442017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2145
2146 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2147 operating on trees as wide_ints.
2148 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2149 (c_tree_equal): Likewise.
2150
8139a48e
DM
21512017-10-04 David Malcolm <dmalcolm@redhat.com>
2152
2153 * c-decl.c (push_parm_decl): Store c_parm's location into the
2154 PARAM_DECL.
2155 (build_c_parm): Add "loc" param and store it within the c_parm.
2156 * c-parser.c (struct c_parser): Add "last_token_location" field.
2157 (c_parser_consume_token): Store location of the token into the
2158 new field.
2159 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2160 when handling a FUNCTION_DECL, if it doesn't already have them.
2161 (c_parser_parameter_declaration): Generate a location for the
2162 parameter, and pass it to the call to build_c_parm.
2163 * c-tree.h (struct c_parm): Add field "loc".
2164 (build_c_parm): Add location_t param.
2165 * c-typeck.c (get_fndecl_argument_location): New function.
2166 (inform_for_arg): New function.
2167 (convert_for_assignment): Use inform_for_arg when dealing with
2168 ic_argpass.
2169
2a389958
JJ
21702017-09-29 Jakub Jelinek <jakub@redhat.com>
2171
7d386d45
JJ
2172 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2173 width is non-NULL.
2174 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2175 don't SET_DECL_C_BIT_FIELD here.
2176
2a389958
JJ
2177 PR c/82340
2178 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2179 instead of trying to set just TREE_READONLY manually.
2180
ebc6a85e
TV
21812017-09-16 Tom de Vries <tom@codesourcery.com>
2182
2183 PR c/81875
2184 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2185 cond itself.
2186
bb75facd
JM
21872017-09-15 Joseph Myers <joseph@codesourcery.com>
2188
2189 PR c/82071
2190 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2191 for C11.
2192 (build_conditional_expr): For C11, generate result with excess
2193 precision when one argument is an integer and the other is of a
2194 type using excess precision.
2195
1d933576
BE
21962017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2197
2198 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2199
267bbb6f
MP
22002017-09-13 Marek Polacek <polacek@redhat.com>
2201
2202 PR c/82167
2203 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2204 than expr.original_type.
2205
6836632e
NS
22062017-09-12 Nathan Sidwell <nathan@acm.org>
2207
2208 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2209 resort_sorted_fields): Moved from c-family/c-common.c.
2210 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2211
e035be33
JM
22122017-09-01 Joseph Myers <joseph@codesourcery.com>
2213
2214 PR c/82071
2215 * c-typeck.c (build_atomic_assign): Handle argument with excess
2216 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2217 argument passed to build_binary_op and convert_for_assignment but
2218 not for call to c_fully_fold.
2219 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2220 Ensure build_binary_op is called with argument with original
2221 semantic type. Avoid calling c_fully_fold with an
2222 EXCESS_PRECISION_EXPR from build_binary_op.
2223
d2e05fcb
JJ
22242017-09-01 Jakub Jelinek <jakub@redhat.com>
2225
2226 PR c/81887
2227 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2228
b397965c
RS
22292017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2230 Alan Hayward <alan.hayward@arm.com>
2231 David Sherwood <david.sherwood@arm.com>
2232
2233 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2234 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2235 m1 and m2 to the signed equivalent of a fixed-point
2236 SCALAR_TYPE_MODE.
2237
14e18d71
DM
22382017-08-24 David Malcolm <dmalcolm@redhat.com>
2239
2240 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2241 than CAN_HAVE_LOCATION_P when determining whether to use the
2242 location_t value within "value".
2243
7f204c0f
DM
22442017-08-21 David Malcolm <dmalcolm@redhat.com>
2245
2246 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2247 rather than peeking the location of the first token.
2248 * c-tree.h (c_expr::get_location): New method.
2249
2f687306
DM
22502017-08-21 David Malcolm <dmalcolm@redhat.com>
2251
2252 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2253 to check_function_arguments.
2254
3e7b80d7
MP
22552017-08-18 Marek Polacek <polacek@redhat.com>
2256
2257 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2258 commentary.
2259
00aa1fa2
L
22602017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2261
2262 PR c/53037
2263 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2264 (check_bitfield_type_and_width): Don't allow bit-field with
2265 warn_if_not_aligned type.
2266
da67acb9
MS
22672017-08-14 Martin Sebor <msebor@redhat.com>
2268
2269 PR c/81117
2270 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2271
bb85aa74
MP
22722017-08-11 Marek Polacek <polacek@redhat.com>
2273
2274 PR c/81795
2275 * c-decl.c (pushtag): Only print inform if the warning was printed.
2276 (grokdeclarator): Likewise.
2277
32129a17
DM
22782017-08-10 David Malcolm <dmalcolm@redhat.com>
2279
2280 * c-parser.c (c_parser_error): Rename to...
2281 (c_parser_error_richloc): ...this, making static, and adding
2282 "richloc" parameter, passing it to the c_parse_error call,
2283 rather than calling c_parser_set_source_position_from_token.
2284 (c_parser_error): Reintroduce, reimplementing in terms of the
2285 above, converting return type from void to bool.
2286 (class token_pair): New class.
2287 (struct matching_paren_traits): New struct.
2288 (matching_parens): New typedef.
2289 (struct matching_brace_traits): New struct.
2290 (matching_braces): New typedef.
2291 (get_matching_symbol): New function.
2292 (c_parser_require): Add param MATCHING_LOCATION, using it to
2293 highlight matching "opening" tokens for missing "closing" tokens.
2294 (c_parser_skip_until_found): Likewise.
2295 (c_parser_static_assert_declaration_no_semi): Convert explicit
2296 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2297 class matching_parens, so that the pertinent open parenthesis is
2298 highlighted when there are problems locating the close
2299 parenthesis.
2300 (c_parser_struct_or_union_specifier): Likewise.
2301 (c_parser_typeof_specifier): Likewise.
2302 (c_parser_alignas_specifier): Likewise.
2303 (c_parser_simple_asm_expr): Likewise.
2304 (c_parser_braced_init): Likewise, for matching_braces.
2305 (c_parser_paren_condition): Likewise, for matching_parens.
2306 (c_parser_switch_statement): Likewise.
2307 (c_parser_for_statement): Likewise.
2308 (c_parser_asm_statement): Likewise.
2309 (c_parser_asm_operands): Likewise.
2310 (c_parser_cast_expression): Likewise.
2311 (c_parser_sizeof_expression): Likewise.
2312 (c_parser_alignof_expression): Likewise.
2313 (c_parser_generic_selection): Likewise.
2314 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2315 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2316 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2317 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2318 c_parser_skip_until_found call.
2319 (c_parser_objc_class_definition): Use class matching_parens as
2320 above.
2321 (c_parser_objc_method_decl): Likewise.
2322 (c_parser_objc_try_catch_finally_statement): Likewise.
2323 (c_parser_objc_synchronized_statement): Likewise.
2324 (c_parser_objc_at_property_declaration): Likewise.
2325 (c_parser_oacc_wait_list): Likewise.
2326 (c_parser_omp_var_list_parens): Likewise.
2327 (c_parser_omp_clause_collapse): Likewise.
2328 (c_parser_omp_clause_default): Likewise.
2329 (c_parser_omp_clause_if): Likewise.
2330 (c_parser_omp_clause_num_threads): Likewise.
2331 (c_parser_omp_clause_num_tasks): Likewise.
2332 (c_parser_omp_clause_grainsize): Likewise.
2333 (c_parser_omp_clause_priority): Likewise.
2334 (c_parser_omp_clause_hint): Likewise.
2335 (c_parser_omp_clause_defaultmap): Likewise.
2336 (c_parser_oacc_single_int_clause): Likewise.
2337 (c_parser_omp_clause_ordered): Likewise.
2338 (c_parser_omp_clause_reduction): Likewise.
2339 (c_parser_omp_clause_schedule): Likewise.
2340 (c_parser_omp_clause_num_teams): Likewise.
2341 (c_parser_omp_clause_thread_limit): Likewise.
2342 (c_parser_omp_clause_aligned): Likewise.
2343 (c_parser_omp_clause_linear): Likewise.
2344 (c_parser_omp_clause_safelen): Likewise.
2345 (c_parser_omp_clause_simdlen): Likewise.
2346 (c_parser_omp_clause_depend): Likewise.
2347 (c_parser_omp_clause_map): Likewise.
2348 (c_parser_omp_clause_device): Likewise.
2349 (c_parser_omp_clause_dist_schedule): Likewise.
2350 (c_parser_omp_clause_proc_bind): Likewise.
2351 (c_parser_omp_clause_uniform): Likewise.
2352 (c_parser_omp_for_loop): Likewise.
2353 (c_parser_cilk_clause_vectorlength): Likewise.
2354 (c_parser_cilk_clause_linear): Likewise.
2355 (c_parser_transaction_expression): Likewise.
2356 * c-parser.h (c_parser_require): Add param matching_location with
2357 default UNKNOWN_LOCATION.
2358 (c_parser_error): Convert return type from void to bool.
2359 (c_parser_skip_until_found): Add param matching_location with
2360 default UNKNOWN_LOCATION.
2361
30af3a2b
MP
23622017-08-09 Marek Polacek <polacek@redhat.com>
2363
2364 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2365 * c-tree.h (build_external_ref): Update declaration.
2366 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2367 (build_external_ref): Change the type of a parameter to bool.
2368 (parser_build_binary_op): Use true/false instead of 1/0.
2369 (pointer_diff): Likewise.
2370 (build_modify_expr): Likewise.
2371 (set_designator): Change the type of a parameter to bool.
2372 (set_init_index): Use true/false instead of 1/0.
2373 (set_init_label): Likewise.
2374 (output_init_element): Change the type of a parameter to bool.
2375 (output_pending_init_elements): Use true/false instead of 1/0.
2376 (process_init_element): Likewise.
2377 (build_binary_op): Change the type of a parameter to bool.
2378
296c53ac
MP
23792017-08-09 Marek Polacek <polacek@redhat.com>
2380
2381 PR c/81233
2382 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2383 Call emit_diagnostic_valist instead of pedwarn.
2384 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2385 Print the relevant types in diagnostics.
2386
a32c8316
MP
23872017-08-09 Marek Polacek <polacek@redhat.com>
2388
2389 PR c/81417
2390 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2391 build_conditional_expr.
a32c8316
MP
2392 * c-parser.c (c_parser_conditional_expression): Create locations for
2393 EXP1 and EXP2 from their source ranges. Pass the locations down to
2394 build_conditional_expr.
2395 * c-tree.h (build_conditional_expr): Update declaration.
2396 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2397 For -Wsign-compare, also print the types.
2398
314e6352
ML
23992017-08-08 Martin Liska <mliska@suse.cz>
2400
2401 * c-convert.c: Include header files.
2402 * c-typeck.c: Likewise.
2403
577eec56
ML
24042017-08-07 Martin Liska <mliska@suse.cz>
2405
2406 * c-parser.c (c_parser_attributes): Canonicalize name of an
2407 attribute.
2408
f7b6353a
MP
24092017-08-02 Marek Polacek <polacek@redhat.com>
2410
2411 PR c/81289
2412 * c-parser.c (c_parser_unary_expression): Use set_error.
2413
8a6eab34
MP
2414 PR c/81448
2415 PR c/81306
2416 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2417 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2418
ab20d992 24192017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2420 Martin Liska <mliska@suse.cz>
2421
2422 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2423 statement.
7fef86d3 2424
f34ebeb2
ML
24252017-07-31 Martin Liska <mliska@suse.cz>
2426
2427 PR sanitize/81530
2428 * c-convert.c (convert): Guard condition with flag_sanitize_p
2429 also with current_function_decl non-null equality.
2430 * c-decl.c (grokdeclarator): Likewise.
2431 * c-typeck.c (build_binary_op): Likewise.
2432
8595f67b
MP
24332017-07-25 Marek Polacek <polacek@redhat.com>
2434
2435 * c-decl.c (grokfield): Remove local variable.
2436
d49718d6
MP
24372017-07-25 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/81364
2440 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2441 macro expansion if the body is in { }.
2442 (c_parser_while_statement): Likewise.
2443 (c_parser_for_statement): Likewise.
2444
ff22eb12
NS
24452017-07-18 Nathan Sidwell <nathan@acm.org>
2446
2447 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2448
eea77d1f
DM
24492017-07-14 David Malcolm <dmalcolm@redhat.com>
2450
2451 * c-decl.c (implicitly_declare): When suggesting a missing
2452 #include, provide a fix-it hint.
2453
b6f43128
DM
24542017-07-06 David Malcolm <dmalcolm@redhat.com>
2455
2456 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2457 and call that instead.
2458 * c-tree.h (selftest::run_c_tests): New decl.
2459
3e2becc4
MP
24602017-06-26 Marek Polacek <polacek@redhat.com>
2461
2462 PR c/80116
2463 * c-parser.c (c_parser_if_body): Set the location of the
2464 body of the conditional after parsing all the labels. Call
2465 warn_for_multistatement_macros.
2466 (c_parser_else_body): Likewise.
2467 (c_parser_switch_statement): Likewise.
2468 (c_parser_while_statement): Likewise.
2469 (c_parser_for_statement): Likewise.
2470 (c_parser_statement): Add a default argument. Save the location
2471 after labels have been parsed.
2472 (c_parser_c99_block_statement): Likewise.
2473
343ae898
RB
24742017-06-19 Richard Biener <rguenther@suse.de>
2475
2476 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2477 negated _Literals to parse _Literal (int) -1.
2478
45b2222a
ML
24792017-06-13 Martin Liska <mliska@suse.cz>
2480
2481 PR sanitize/78204
2482 * c-convert.c (convert): Use sanitize_flags_p.
2483 * c-decl.c (grokdeclarator): Likewise.
2484 * c-typeck.c (convert_for_assignment): Likewise.
2485 (c_finish_return): Likewise.
2486 (build_binary_op): Likewise.
2487
8ab7005b
JJ
24882017-06-08 Jakub Jelinek <jakub@redhat.com>
2489
2490 PR c/81006
2491 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2492 to sizetype before size_binop.
2493
363dc72c
JJ
24942017-06-07 Jakub Jelinek <jakub@redhat.com>
2495
2496 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2497 of TDI_generic.
2498
dc949728
MP
24992017-06-06 Marek Polacek <polacek@redhat.com>
2500
2501 PR c/79983
2502 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2503 ref.
2504 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2505
40ffd95f
BE
25062017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2507
2508 * c-parser.c (c_parser_binary_expression): Implement the
2509 -Wsizeof_pointer_div warning.
2510 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2511 from a parenthesized expression.
2512 (c_parser_expr_list): Use c_last_sizeof_loc.
2513 * c-tree.h (c_last_sizeof_loc): New external.
2514 * c-typeck.c (c_last_sizeof_loc): New variable.
2515 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2516
9fc5e7a4
MM
25172017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2518
2519 PR testsuite/80580
2520 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2521
f012c8ef
DM
25222017-05-30 David Malcolm <dmalcolm@redhat.com>
2523
2524 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2525 parameters.
2526
3cd211af
MS
25272017-05-24 Martin Sebor <msebor@redhat.com>
2528
2529 PR c/80731
2530 * c-fold.c (c_fully_fold_internal): Adjust.
2531 * c-typeck.c (parser_build_unary_op): Adjust.
2532
fd71a9a2
TS
25332017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2534
2535 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2536 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2537 "VECTOR_LENGTH".
2538
92fa0f9e
MP
25392017-05-23 Marek Polacek <polacek@redhat.com>
2540
2541 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2542 quotes.
2543
d11c168a
JJ
25442017-05-22 Jakub Jelinek <jakub@redhat.com>
2545
2546 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2547 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2548 it returned invariant. Call tree_invariant_p unconditionally
2549 afterwards to decide whether to return expr or op0.
2550
58aca9d9
NS
25512017-05-22 Nathan Sidwell <nathan@acm.org>
2552
2553 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2554
7fd549d2
TS
25552017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2556
2557 * c-parser.c (c_parser_omp_clause_default): Handle
2558 "OMP_CLAUSE_DEFAULT_PRESENT".
2559
6ecd2339
BE
25602017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2561
2562 * config-lang.in (gtfiles): Add c-family/c-format.c.
2563
8a57ecff
NS
25642017-05-18 Nathan Sidwell <nathan@acm.org>
2565
2566 * c-decl.c (pushdecl_top_level): Delete unused function.
2567
6574d78e
MP
25682017-05-18 Marek Polacek <polacek@redhat.com>
2569
2570 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2571 (check_earlier_gotos): Likewise.
2572 (define_label): Likewise.
2573 (pending_xref_error): Likewise.
2574 (smallest_type_quals_location): Likewise.
2575 (grokdeclarator): Likewise.
2576 (grokparms): Likewise.
2577 (identifier_global_value): Likewise.
2578 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2579 (find_init_member): Likewise.
2580
e3455240
MP
25812017-05-18 Marek Polacek <polacek@redhat.com>
2582
2583 * c-decl.c (start_decl): Use false/true instead of 0/1.
2584 (grokdeclarator): Likewise.
2585 (finish_struct): Likewise.
2586 (start_function): Change the return type to bool. Use false/true
2587 instead of 0/1.
2588 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2589 * c-tree.h (start_function): Update.
2590 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2591 (set_designator): Change the return type to bool. Use false/true
2592 instead of 0/1.
2593
3fa8871b
MP
25942017-05-17 Marek Polacek <polacek@redhat.com>
2595
2596 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2597 * c-typeck.c: Likewise.
2598
142473df
MP
25992017-05-17 Marek Polacek <polacek@redhat.com>
2600
2601 PR sanitizer/80659
2602 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2603 DECL_IGNORED_P even for non-static compound literals.
2604
1a817418
ML
26052017-05-17 Martin Liska <mliska@suse.cz>
2606
2607 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2608 use it instead of int type.
2609
b2fa0a8b
MP
26102017-05-17 Marek Polacek <polacek@redhat.com>
2611
2612 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2613 call c_fully_fold.
2614 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2615 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2616 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2617 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2618 save_expr.
2619 (c_parser_conditional_expression): Likewise.
2620 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2621 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2622 (process_init_element): Likewise.
2623 (build_binary_op): Likewise.
2624 (handle_omp_array_sections_1): Likewise.
2625
1e47f02b
TS
26262017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2627
2628 * c-parser.c (c_parser_omp_clause_num_gangs)
2629 (c_parser_omp_clause_num_workers)
2630 (c_parser_omp_clause_vector_length): Merge functions into...
2631 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2632 all users.
2633
c24e924f
NS
26342017-05-11 Nathan Sidwell <nathan@acm.org>
2635
2636 * gimple-parser.c: Don't #include tree-dump.h.
2637
c587104e
MM
26382017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2639
2640 PR testsuite/80580
2641 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2642
67ac9a9d
MM
26432017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2644
2645 PR testsuite/80580
2646 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2647 incorrect __MEM syntax.
2648
ac4eb40f
MM
26492017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2650
2651 PR testsuite/80580
2652 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2653 type of unary '*'.
2654
641da50a
NS
26552017-05-09 Nathan Sidwell <nathan@acm.org>
2656
2657 * c-tree.h (pushdecl): Declare.
2658
56d35585
DM
26592017-05-05 David Malcolm <dmalcolm@redhat.com>
2660
2661 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2662 with diagnostic_report_diagnostic.
2663 * c-errors.c (pedwarn_c99): Likewise.
2664 (pedwarn_c90): Likewise.
2665
815d9cc6
XR
26662017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2667
92a285c1 2668 PR c++/80038
815d9cc6
XR
2669 * c-gimplify.c (c_gimplify_expr): Remove calls to
2670 cilk_gimplifY_call_params_in_spawned_fn.
2671
1c4ea66f
DM
26722017-04-25 David Malcolm <dmalcolm@redhat.com>
2673
2674 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2675 hint for removing extra semicolon.
2676
666f7903
JJ
26772017-04-21 Jakub Jelinek <jakub@redhat.com>
2678
2679 PR c/80468
2680 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2681 enabled, set specs->type to integer_type_node.
2682
5764ee3c
JW
26832017-04-03 Jonathan Wakely <jwakely@redhat.com>
2684
2685 * c-array-notation.c: Fix typo in comment.
2686
10fa8dfb
MP
26872017-03-29 Marek Polacek <polacek@redhat.com>
2688
2689 PR c/79730
2690 * c-decl.c (finish_decl): Check VAR_P.
2691
a9e4a1a5
JJ
26922017-03-27 Jakub Jelinek <jakub@redhat.com>
2693
2694 PR middle-end/80162
2695 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2696 * c-typeck.c (c_mark_addressable): Likewise. Look through
2697 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2698 to ARRAY_TYPE.
2699 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2700
ee3ff394
MP
27012017-03-23 Marek Polacek <polacek@redhat.com>
2702
2703 * c-tree.h: Remove a C_RID_YYCODE reference.
2704
4d1b8e70
JJ
27052017-03-21 Jakub Jelinek <jakub@redhat.com>
2706
2707 PR c/80097
2708 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2709 optional COMPOUND_EXPR with ubsan instrumentation.
2710
31dc71a8
MP
27112017-03-17 Marek Polacek <polacek@redhat.com>
2712
2713 * c-parser.c: Add C11 references.
2714
d579c385
MP
27152017-03-15 Marek Polacek <polacek@redhat.com>
2716
2717 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2718
85059a38
MP
27192017-03-11 Marek Polacek <polacek@redhat.com>
2720
2721 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2722
2f6f187a
DM
27232017-03-10 David Malcolm <dmalcolm@redhat.com>
2724
2725 PR translation/79848
2726 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2727 "%qs".
2728 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2729
36618428
MP
27302017-03-09 Marek Polacek <polacek@redhat.com>
2731
2732 PR sanitizer/79757
2733 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2734 parameter declarations with initializers.
2735
01e5af5a
JJ
27362017-03-09 Jakub Jelinek <jakub@redhat.com>
2737
2738 PR c/79969
2739 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2740 TYPE_STUB_DECL.
2741
a71dbc63
JJ
27422017-03-07 Jakub Jelinek <jakub@redhat.com>
2743
2744 PR c/79834
2745 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2746 for "may only be used in compound statements" diagnostics, change it
2747 such that the same translatable string is used for all pragmas. For
2748 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2749 diagnostics.
2750 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2751 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2752 "may only be used in compound statements" diagnostics, such that the
2753 same translatable string is used for all pragmas.
2754
1ff4bae6
MP
27552017-03-04 Marek Polacek <polacek@redhat.com>
2756
2757 PR c/79847
2758 * c-decl.c (implicit_decl_warning): Add missing space.
2759
7f5a7d78
MP
27602017-03-03 Marek Polacek <polacek@redhat.com>
2761
2762 PR c/79758
2763 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2764 current_function_prototype_arg_types is error_mark_node. Fix
2765 formatting. Use TREE_VALUE instead of TREE_TYPE.
2766
883c8f06
JJ
27672017-03-03 Jakub Jelinek <jakub@redhat.com>
2768
79c9b7a8
JJ
2769 PR c/79837
2770 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2771 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2772 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2773 diagnostics.
2774
883c8f06
JJ
2775 PR c/79836
2776 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2777 instead of %<_Generic>.
2778 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2779 (c_parser_omp_target_exit_data): Use %<release%> instead of
2780 %<release>.
2781
324ff1a0
JJ
27822017-02-28 Jakub Jelinek <jakub@redhat.com>
2783
2784 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2785 instead of just cond ? "..." : "...".
2786 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2787 for "enter"/"exit" keyword.
2788 (c_finish_oacc_routine): Don't use %s to supply portions of the
2789 message.
2790
4227c9ad
JJ
27912017-02-24 Jakub Jelinek <jakub@redhat.com>
2792
2793 PR c++/79588
2794 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2795 handle -Wrestrict here.
2796 * c-typeck.c (build_function_call_vec): Adjust
2797 check_function_arguments caller.
2798
5d972e66
RB
27992017-02-23 Richard Biener <rguenther@suse.de>
2800
2801 PR c/79684
2802 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2803 to initialize c_exprs to return.
2804 (c_parser_gimple_binary_expression): Likewise.
2805 (c_parser_gimple_unary_expression): Likewise.
2806 (c_parser_gimple_postfix_expression): Likewise.
2807
61ac5ebe
MP
28082017-02-22 Marek Polacek <polacek@redhat.com>
2809
2810 PR c/79662
2811 * c-typeck.c (convert_arguments): Handle error_mark_node.
2812
41d1b0b1
PK
28132017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2814
2815 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2816 value of c_parser_parse_ssa_name against error_mark_node and emit
2817 error if ssa name is anonymous and written as default definition.
2818
eab1f169
PK
28192017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2820
2821 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2822 FMA_EXPR.
2823
bcac0b4d
JJ
28242017-02-16 Jakub Jelinek <jakub@redhat.com>
2825
2826 PR c++/79512
2827 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2828 ignore #pragma omp target even when not followed by identifier.
2829
1be33173
PK
28302017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2831
2832 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2833 (c_parser_gimple_unary_expression): Likewise.
2834
aa326bfb
JJ
28352017-02-13 Jakub Jelinek <jakub@redhat.com>
2836
2837 * c-parser.c (c_parser_oacc_declare): Add missing space in
2838 diagnostics.
2839
8a398bc5
PK
28402017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2841
2842 PR c/79478
2843 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2844 set_c_expr_source_range when parsing ssa-name.
2845
3dcde5ef 28462017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2847 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2848
2849 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2850 building IL when arguments are error_mark_node.
2851 (c_parser_gimple_unary_expression): Likewise.
2852 (c_parser_gimple_if_stmt): Likewise.
2853 (c_parser_gimple_switch_stmt): Likewise.
2854 (c_parser_gimple_return_stmt): Likewise.
2855 (c_parser_parse_ssa_name): When name lookup fails do not build
2856 an SSA name. Use undeclared rather than not declared in error
2857 reporting.
2858
192b048b
MP
28592017-02-09 Marek Polacek <polacek@redhat.com>
2860
2861 PR c/79428
2862 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2863 instead of c_parser_skip_until_found.
2864
56f71478
JJ
28652017-02-09 Jakub Jelinek <jakub@redhat.com>
2866
2867 PR c/79431
2868 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2869 symtab_node::get on automatic variables.
2870
02889d23
CLT
28712016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2872 Chung-Lin Tang <cltang@codesourcery.com>
2873
2874 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2875 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2876 semantic checking.
2877 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2878
7af4b20d
RB
28792017-02-07 Richard Biener <rguenther@suse.de>
2880
2881 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2882 (c_parser_gimple_postfix_expression_after_primary):
2883 Do not use c_build_function_call_vec to avoid folding and promotion.
2884 Simplify.
2885
e5e391d6
MO
28862017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2887
2888 PR lto/79061
2889 * c-decl.c (pop_scope): Pass main_input_filename to
2890 build_translation_unit_decl.
2891
c2e84327
DM
28922017-01-24 David Malcolm <dmalcolm@redhat.com>
2893
2894 * c-parser.c: Include "read-rtl-function.h" and
2895 "run-rtl-passes.h".
2896 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2897 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2898 production. Update for renaming of field "gimple_pass" to
2899 "gimple_or_rtl_pass". If __RTL was seen, call
2900 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2901 to an auto_timevar, to cope with early exit.
2902 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2903 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2904 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2905 Handle RID_RTL.
2906 (c_parser_parse_rtl_body): New function.
2907 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2908 (struct c_declspecs): Rename field "gimple_pass" to
2909 "gimple_or_rtl_pass". Add field "rtl_p".
2910 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2911 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2912 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2913 (c_parser_gimple_or_rtl_pass_list): ...this.
2914
2ebd93e1
MP
29152017-01-20 Marek Polacek <polacek@redhat.com>
2916
2917 PR c/64279
2918 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2919
b1c95bb5
RB
29202017-01-13 Richard Biener <rguenther@suse.de>
2921
2922 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2923 nops.
2924
25329913
RB
29252017-01-13 Richard Biener <rguenther@suse.de>
2926
2927 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2928 _Literal ( type-name ) number.
2929
6bb4ea5c
RB
29302017-01-12 Richard Biener <rguenther@suse.de>
2931
2932 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2933 __MEM.
2934
6b5b4e9c
JJ
29352017-01-11 Jakub Jelinek <jakub@redhat.com>
2936
2937 PR c++/72813
2938 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2939 PCH file.
2940
e3252775
RB
29412017-01-11 Richard Biener <rguenther@suse.de>
2942
2943 PR bootstrap/79052
2944 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2945 returns on parse errors.
2946
a9342885
MP
29472017-01-04 Marek Polacek <polacek@redhat.com>
2948
2949 PR c++/64767
2950 * c-parser.c (c_parser_postfix_expression): Mark zero character
2951 constants by setting original_type in c_expr.
2952 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2953 with a zero character constant.
2954 (char_type_p): New function.
2955
5dd9a9d0
DM
29562017-01-04 David Malcolm <dmalcolm@redhat.com>
2957
2958 * c-parser.c (c_parser_declaration_or_fndef): Create a
2959 rich_location at init_loc and parse it to start_init.
2960 (last_init_list_comma): New global.
2961 (c_parser_braced_init): Update last_init_list_comma when parsing
2962 commas. Pass it to pop_init_level. Pass location of closing
2963 brace to pop_init_level.
2964 (c_parser_postfix_expression_after_paren_type): Create a
2965 rich_location at type_loc and parse it to start_init.
2966 (c_parser_omp_declare_reduction): Likewise for loc.
2967 * c-tree.h (start_init): Add rich_location * param.
2968 (pop_init_level): Add location_t param.
2969 * c-typeck.c (struct initializer_stack): Add field
2970 "missing_brace_richloc".
2971 (start_init): Add richloc param, use it to initialize
2972 the stack node's missing_brace_richloc.
2973 (last_init_list_comma): New decl.
2974 (finish_implicit_inits): Pass last_init_list_comma to
2975 pop_init_level.
2976 (push_init_level): When finding missing open braces, add fix-it
2977 hints to the richloc.
2978 (pop_init_level): Add "insert_before" param and pass it
2979 when calling pop_init_level. Add fixits about missing
2980 close braces to any richloc. Use the richloc for the
2981 -Wmissing-braces warning.
2982 (set_designator): Pass last_init_list_comma to pop_init_level.
2983 (process_init_element): Likewise.
2984
cbe34bb5
JJ
29852017-01-01 Jakub Jelinek <jakub@redhat.com>
2986
2987 Update copyright years.
2988
d17680f3
JJ
29892016-12-21 Jakub Jelinek <jakub@redhat.com>
2990
0dba7960
JJ
2991 PR bootstrap/78817
2992 * c-typeck.c (build_function_call_vec): If check_function_arguments
2993 returns true, set TREE_NO_WARNING on CALL_EXPR.
2994
d17680f3
JJ
2995 PR c/77767
2996 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2997 to *expr instead of overwriting it.
2998
aa90531e
RB
29992016-12-20 Richard Biener <rguenther@suse.de>
3000
3001 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3002 error recovery.
3003 (c_parser_gimple_statement): Only build assigns for non-error
3004 stmts.
3005 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3006
629b3d75
MJ
30072016-12-14 Martin Jambor <mjambor@suse.cz>
3008
3009 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3010 omp-low.h.
3011 (c_finish_oacc_routine): Adjusted call to
3012 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3013 to use their new names.
3014 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3015 use its new name.
3016 (c_parser_oacc_update): Likewise.
3017 (c_parser_omp_simd): Likewise.
3018 (c_parser_omp_target_update): Likewise.
3019 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3020 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3021 name.
3022 (c_finish_omp_cancellation_point): Likewise.
3023 * gimple-parser.c: Do not include omp-low.h
3024
c5af52eb
CP
30252016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3026 James Norris <jnorris@codesourcery.com>
3027
3028 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3029 EXIT_DATA,WAIT} are not used in compound statements.
3030 (c_parser_oacc_enter_exit_data): Update diagnostics.
3031
48330c93
BE
30322016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3033
3034 PR c++/71973
3035 * c-decl.c (diagnose_mismatched_decls): Use
3036 OPT_Wbuiltin_declaration_mismatch here too.
3037
899ca90e 30382016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3039 Alan Hayward <alan.hayward@arm.com>
3040 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3041
3042 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3043 (make_label, finish_struct): Likewise.
3044
1ee62b92 30452016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3046 Richard Biener <rguenther@suse.de>
22b15758 3047
8e745a17
JJ
3048 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3049 * config-lang.in (gtfiles): Add c/c-parser.h.
3050 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3051 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3052 * c-parser.c (enum c_id_kind, struct c_token,
3053 c_parser_next_token_is, c_parser_next_token_is_not,
3054 c_parser_next_token_is_keyword,
3055 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3056 Split out to ...
3057 * c-parser.h: ... new header.
3058 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3059 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3060 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3061 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3062 c_parser_error, c_parser_require, c_parser_skip_until_found,
3063 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3064 c_parser_type_name): Export.
3065 (c_parser_tokens_buf): New function.
3066 (c_parser_error): Likewise.
3067 (c_parser_set_error): Likewise.
3068 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3069 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3070 via c_parser_parse_gimple_body.
8e745a17
JJ
3071 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3072 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3073 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3074 c_parser_error, c_parser_require, c_parser_skip_until_found,
3075 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3076 c_parser_type_name): Declare.
1ee62b92
PG
3077 (struct c_parser): Declare forward.
3078 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3079 (c_parser_error): Likewise.
3080 (c_parser_set_error): Likewise.
3081 * gimple-parser.c: New file.
3082 * gimple-parser.h: Likewise.
1ee62b92 3083
22b15758
UB
30842016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3085
3086 PR c/35503
3087 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3088 warn_for_restrict.
3089
84ff4775
LCW
30902016-09-11 Le-Chun Wu <lcwu@google.com>
3091 Mark Wielaard <mjw@redhat.com>
3092
3093 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3094 to the given -Wshadow= variant.
3095
4d0cdd0c
TP
30962016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3097
3098 * c-typeck.c: Include memmodel.h.
3099
1202f33e
JJ
31002016-10-13 Jakub Jelinek <jakub@redhat.com>
3101
3102 PR target/77957
3103 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3104 instead of lhd_return_null_tree_v.
3105
8a14afd0
BS
31062016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3107
3108 PR c++/69733
3109 * c-decl.c (smallest_type_quals_location): New static function.
3110 (grokdeclarator): Try to find the correct location for an ignored
3111 qualifier.
3112
81fea426
MP
31132016-09-26 Marek Polacek <polacek@redhat.com>
3114
3115 PR c/7652
3116 * c-decl.c (pop_scope): Add gcc_fallthrough.
3117
31182016-09-26 Marek Polacek <polacek@redhat.com>
3119
3120 PR c/7652
3121 * c-parser.c (struct c_token): Add flags field.
3122 (c_lex_one_token): Pass it to c_lex_with_flags.
3123 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3124 into IFN_FALLTHROUGH.
3125 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3126 attribute fallthrough after a case label or default label.
3127 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3128
9a2300e9
MP
31292016-09-24 Marek Polacek <polacek@redhat.com>
3130
3131 PR c/77490
3132 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3133 have boolean value. Warn about ++/-- on booleans.
3134
7de76362
JJ
31352016-09-23 Jakub Jelinek <jakub@redhat.com>
3136
3137 * c-parser.c (incomplete_record_decls): Remove unnecessary
3138 = vNULL initialization of file scope vec.
3139
5b73d2ab
MP
31402016-09-16 Marek Polacek <polacek@redhat.com>
3141
3142 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3143
e51fbec3
MP
31442016-09-14 Marek Polacek <polacek@redhat.com>
3145
3146 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3147 (fix_array_notation_expr): Likewise.
3148 * c-decl.c (finish_decl): Likewise.
3149 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3150 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3151 (function_to_pointer_conversion): Use false instead of 0.
3152 (convert_lvalue_to_rvalue): Likewise.
3153 (parser_build_unary_op): Likewise.
3154 (build_atomic_assign): Likewise.
3155 (build_unary_op): Change nonconvert parameter type to bool, use
3156 true/false instead of 1/0.
3157 (build_binary_op): Use true instead of 1.
3158
254830ba
DM
31592016-09-13 David Malcolm <dmalcolm@redhat.com>
3160
3161 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3162 of add_fixit_insert to add_fixit_insert_before.
3163
4c13ba17
MP
31642016-09-13 Marek Polacek <polacek@redhat.com>
3165
3166 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3167 it.
3168
54dcdb88
BE
31692016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3170
3171 PR c++/77496
3172 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3173 COMPOUND_EXPR to warn_for_omitted_condop.
3174
e5106e27
DM
31752016-09-07 David Malcolm <dmalcolm@redhat.com>
3176
3177 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3178 c_get_substring_location for this new langhook.
3179
9dc5773f
JJ
31802016-09-02 Jakub Jelinek <jakub@redhat.com>
3181
3182 PR c/65467
3183 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3184 flag_openmp.
3185 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3186 instead of mark_exp_read on low_bound/length expression.
3187 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3188 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3189 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3190 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3191 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3192 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3193 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3194 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3195 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3196 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3197 instead of mark_expr_read.
3198 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3199 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3200 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3201 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3202 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3203 array section bases outside of depend clause, for depend clause
3204 use convert_lvalue_to_rvalue on the base.
3205 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3206 linear, aligned, map, to and from clauses.
3207 (c_omp_clause_copy_ctor): New function.
3208
295844f6
MP
32092016-09-01 Marek Polacek <polacek@redhat.com>
3210
3211 PR c/7652
3212 * c-typeck.c (composite_type): Add FALLTHRU comment.
3213
089af25c
DM
32142016-08-31 David Malcolm <dmalcolm@redhat.com>
3215
3216 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3217 to the insertion fixits for "struct", "union", and "enum".
3218
f9087798
DM
32192016-08-30 David Malcolm <dmalcolm@redhat.com>
3220
3221 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3222 rather than add_fixit_misspelled_id.
3223 (undeclared_variable): Likewise.
3224 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3225 now-redundant "here" params from add_fixit_insert method calls.
3226 (c_parser_parameter_declaration): Likewise.
3227 * c-typeck.c (build_component_ref): Remove now-redundant range
3228 param from add_fixit_replace method calls.
3229
ebef225f
MP
32302016-08-25 Marek Polacek <polacek@redhat.com>
3231
3232 * c-typeck.c (parser_build_binary_op): Pass LHS to
3233 warn_logical_not_parentheses.
3234
fe377a48
MP
32352016-08-25 Marek Polacek <polacek@redhat.com>
3236
3237 PR c/77323
3238 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3239 or _FloatN or _FloatNx is not supported.
3240 (finish_declspecs): Set type to integer_type_node when _FloatN or
3241 _FloatNx is not supported.
3242
c65699ef
JM
32432016-08-19 Joseph Myers <joseph@codesourcery.com>
3244
3245 PR c/32187
3246 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3247 (struct c_declspecs): Add field floatn_nx_idx.
3248 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3249 and _FloatNx type specifiers.
3250 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3251 (c_parser_declspecs, c_parser_attribute_any_word)
3252 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3253 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3254 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3255 narrower than double.
3256
2f1364c2
JJ
32572016-08-12 Jakub Jelinek <jakub@redhat.com>
3258 Martin Liska <mliska@suse.cz>
3259
3260 PR c/67410
3261 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3262 % to determine val element to change. Assert that
3263 wchar_bytes * charwidth fits into val array.
3264
191816a3
MP
32652016-08-12 Marek Polacek <polacek@redhat.com>
3266
3267 PR c/7652
3268 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3269 (c_parser_postfix_expression): Likewise.
3270 * c-typeck.c (build_unary_op): Adjust fall through comment.
3271 (c_mark_addressable): Likewise.
3272
b95a64bb
JJ
32732016-08-11 Jakub Jelinek <jakub@redhat.com>
3274
3275 PR c/72816
3276 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3277 array member through typedef, for orig_qual_indirect == 0 clear
3278 orig_qual_type.
3279
895aa8e1
DM
32802016-08-08 David Malcolm <dmalcolm@redhat.com>
3281
3282 PR c/64955
3283 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3284 this up to selftest::run_c_tests.
3285 (selftest::run_c_tests): New function.
3286
0b212d8c
TS
32872016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3288
ae9281fc
TS
3289 * c-parser.c (struct oacc_routine_data): Add error_seen and
3290 fndecl_seen members.
3291 (c_finish_oacc_routine): Use these.
3292 (c_parser_declaration_or_fndef): Adjust.
3293 (c_parser_oacc_routine): Likewise. Support more C language
3294 constructs, and improve diagnostics. Move pragma context
3295 checking...
3296 (c_parser_pragma): ... here.
3297
0b212d8c
TS
3298 * c-parser.c (struct oacc_routine_data): New.
3299 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3300 Simplify code.
3301 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3302 declare target" attribute.
3303
76e2c821
JB
33042016-08-01 Jan Beulich <jbeulich@suse.com>
3305
3306 * c-fold.c (c_fully_fold_internal): Also emit shift count
3307 warnings for vector types.
3308 * c-typeck.c (build_binary_op): Likewise.
3309
f618a472
MP
33102016-07-29 Marek Polacek <polacek@redhat.com>
3311
3312 PR c/71742
3313 * c-decl.c (finish_struct): Rephrase an error message.
3314
efd0786f
MP
3315 PR c/71853
3316 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3317 to error node for invalid code.
3318
e00dceaf
MP
3319 PR c/71573
3320 * c-decl.c (implicitly_declare): Return decl early not only for
3321 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3322
673a107a
JJ
33232016-07-29 Jakub Jelinek <jakub@redhat.com>
3324
3325 PR c/71969
3326 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3327 on GNU extern inline functions.
3328
a5b5c8b6
MP
33292016-07-29 Marek Polacek <polacek@redhat.com>
3330
3331 PR c/71583
3332 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3333 check expr.value.
3334
e3fe09c1
UB
33352016-07-22 Uros Bizjak <ubizjak@gmail.com>
3336
3337 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3338
7c8f7eaa
DM
33392016-07-20 David Malcolm <dmalcolm@redhat.com>
3340
3341 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3342 spellcheck-tree.h
3343 (best_macro_match): Likewise, converting from a typedef to a
3344 subclass.
3345 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3346 (lookup_name_fuzzy): Update for change of best_macro_match to a
3347 subclass with a ctor that calls cpp_forall_identifiers.
3348
de6a69ee
DM
33492016-07-20 David Malcolm <dmalcolm@redhat.com>
3350
3351 * c-decl.c (implicit_decl_warning): Update for conversion of
3352 return type of lookup_name_fuzzy to const char *.
3353 (undeclared_variable): Likewise.
3354 (lookup_name_fuzzy): Convert return type from tree to
3355 const char *.
3356 * c-parser.c (c_parser_declaration_or_fndef): Update for
3357 conversion of return type of lookup_name_fuzzy to const char *.
3358 (c_parser_parameter_declaration): Likewise.
3359
b1c9c068
CP
33602016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3361
3362 * c-parser.c (c_parser_oacc_declare): Don't scan for
3363 GOMP_MAP_POINTER.
3364 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3365 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3366 zero-length subarrays.
3367
ddbbcb19
JJ
33682016-07-15 Jakub Jelinek <jakub@redhat.com>
3369
3370 PR c/71858
3371 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3372 instead of FUZZY_LOOKUP_NAME.
3373 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3374 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3375
dd36b877
JJ
33762016-07-14 Jakub Jelinek <jakub@redhat.com>
3377
3378 PR c/71858
3379 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3380
8c681247
TS
33812016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3382
3383 * c-parser.c (c_parser_generic_selection): Make type of variable
3384 auto_vec.
3385 (c_parser_omp_declare_simd): Likewise.
3386
bf4fa671
TS
33872016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3388
3389 * c-decl.c (struct c_struct_parse_info): Change member types
3390 from vec to auto_vec.
3391 (start_struct): Adjust.
3392 (finish_struct): Likewise.
3393
557e8c49
JJ
33942016-07-02 Jakub Jelinek <jakub@redhat.com>
3395
3396 PR c/71719
3397 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3398
54d19c3b
TS
33992016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3400
3401 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3402 Move pragma context checking into...
3403 (c_parser_omp_cancellation_point): ... here, and improve
3404 diagnostic messages.
3405 * c-typeck.c (c_finish_omp_cancel)
3406 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3407
152ef731
JJ
34082016-06-29 Jakub Jelinek <jakub@redhat.com>
3409
3410 PR c/71685
3411 * c-typeck.c (c_build_qualified_type): Don't clear
3412 C_TYPE_INCOMPLETE_VARS for the main variant.
3413
34142016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3415
3416 PR c/71552
3417 * c-typeck.c (output_init_element): Diagnose incompatible types
3418 before non-constant initializers.
3419
e9ac1f86
JJ
34202016-06-28 Jakub Jelinek <jakub@redhat.com>
3421
3422 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3423
277d7ee0
AK
34242016-06-23 Andi Kleen <ak@linux.intel.com>
3425
3426 * Make-lang.in: Add support for autofdo.
3427
1a4f11c8
DM
34282016-06-22 David Malcolm <dmalcolm@redhat.com>
3429
3430 PR c/70339
3431 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3432 (implicit_decl_warning): When issuing warnings for implicit
3433 declarations, attempt to provide a suggestion via
3434 lookup_name_fuzzy.
3435 (undeclared_variable): Likewise when issuing errors.
3436 (lookup_name_in_scope): Likewise.
3437 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3438 (best_macro_match): New typedef.
3439 (find_closest_macro_cpp_cb): New function.
3440 (lookup_name_fuzzy): New function.
3441 * c-parser.c: Include gcc-rich-location.h.
3442 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3443 (c_keyword_starts_typename): ...this new function.
3444 (c_parser_declaration_or_fndef): When issuing errors about
3445 missing "struct" etc, add a fixit. For other kinds of errors,
3446 attempt to provide a suggestion via lookup_name_fuzzy.
3447 (c_parser_parms_declarator): When looking ahead to detect typos in
3448 type names, also reject CPP_KEYWORD.
3449 (c_parser_parameter_declaration): When issuing errors about
3450 unknown type names, attempt to provide a suggestion via
3451 lookup_name_fuzzy.
3452 * c-tree.h (c_keyword_starts_typename): New prototype.
3453
5a578671
JM
34542016-06-20 Joseph Myers <joseph@codesourcery.com>
3455
3456 PR c/71601
3457 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3458 c_common_type returns error_mark_node.
3459
3f8257db 34602016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3461
3462 PR c/69507
3463 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3464 __alignof__ (expression).
3465
6a3f203c
DM
34662016-06-14 David Malcolm <dmalcolm@redhat.com>
3467
3468 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3469
264757fb
DM
34702016-06-14 David Malcolm <dmalcolm@redhat.com>
3471
3472 * c-typeck.c (build_component_ref): Simplify fixit code by
3473 using gcc_rich_location::add_fixit_misspelled_id.
3474 (set_init_label): Likewise.
3475
f7e4f2e3
DM
34762016-06-13 David Malcolm <dmalcolm@redhat.com>
3477
3478 * c-parser.c (c_parser_initelt): Provide location of name for new
3479 location_t param of set_init_label.
3480 * c-tree.h (set_init_label): Add location_t param.
3481 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3482 param and use it when issuing error messages about unrecognized
3483 field names. Attempt to provide a fixit hint if appropriate,
3484 otherwise update the error message to provide the type name.
3485
4b1ffdb1
TS
34862016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3487
3488 PR c/71381
3489 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3490 Loosen checking.
3491
44a845ca
MS
34922016-06-08 Martin Sebor <msebor@redhat.com>
3493 Jakub Jelinek <jakub@redhat.com>
3494
3495 PR c++/70507
3496 PR c/68120
3497 * c-typeck.c (convert_arguments): Don't promote last argument
3498 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3499
92a5f2ba
MP
35002016-06-08 Marek Polacek <polacek@redhat.com>
3501
3502 PR c/71418
3503 * c-decl.c (grokdeclarator): Check TYPE_P.
3504
08203f73
MP
3505 PR c/71426
3506 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3507 code.
3508
6ffd47b7
DM
35092016-06-07 David Malcolm <dmalcolm@redhat.com>
3510
3511 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3512 and structure element reference, capture the location of the
3513 element name token and pass it to build_component_ref.
3514 (c_parser_postfix_expression_after_primary): Likewise for
3515 structure element dereference.
3516 (c_parser_omp_variable_list): Likewise for
3517 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3518 * c-tree.h (build_component_ref): Add location_t param.
3519 * c-typeck.c (build_component_ref): Add location_t param
3520 COMPONENT_LOC. Use it, if available, when issuing hints about
3521 mispelled member names to provide a fixit replacement hint.
3522
1f40cff3
MP
35232016-06-06 Marek Polacek <polacek@redhat.com>
3524
3525 PR c/71362
3526 * c-parser.c (c_parser_direct_declarator): Set location.
3527
5545a907
MP
35282016-06-06 Marek Polacek <polacek@redhat.com>
3529
3530 * c-typeck.c (comptypes_internal): Handle comparisons of
3531 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3532 TYPE_REF_CAN_ALIAS_ALL.
3533
b605f663
CLT
35342016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3535
3536 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3537 arguments as addressable when async clause exists.
3538
00631022
JJ
35392016-05-30 Jakub Jelinek <jakub@redhat.com>
3540
3541 PR c++/71349
3542 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3543 when combined with target construct.
3544
7211a097
JJ
35452016-05-26 Jakub Jelinek <jakub@redhat.com>
3546
3547 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3548 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3549
95efe6b6
MP
35502016-05-25 Marek Polacek <polacek@redhat.com>
3551
3552 PR c/71265
3553 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3554
a23faf7a
MP
3555 PR c/71266
3556 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3557
e46c7770
CP
35582016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3559
3560 * c-parser.c (c_parser_oacc_declare): Add support for
3561 GOMP_MAP_FIRSTPRIVATE_POINTER.
3562 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3563 argument with enum c_omp_region_type ort.
3564 (handle_omp_array_sections): Likewise. Update call to
3565 handle_omp_array_sections_1.
3566 (c_finish_omp_clauses): Add specific errors and warning messages for
3567 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3568 call to handle_omp_array_sections.
3569
a04e69c0
TS
35702016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3571
3572 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3573
f17a223d
RB
35742016-05-24 Richard Biener <rguenther@suse.de>
3575
3576 PR middle-end/70434
3577 PR c/69504
3578 * c-typeck.c (build_array_ref): Do not complain about indexing
3579 non-lvalue vectors. Adjust for function name change.
3580
79063edd
MS
35812016-05-20 Martin Sebor <msebor@redhat.com>
3582
3583 PR c/71115
3584 * c-typeck.c (error_init): Use
3585 expansion_point_location_if_in_system_header.
3586 (warning_init): Same.
3587
8a40fef3
DM
35882016-05-19 David Malcolm <dmalcolm@redhat.com>
3589
3590 PR c/71171
3591 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3592 in error-handling.
3593 (c_parser_postfix_expression): Likewise.
3594 * c-tree.h (c_expr::set_error): New method.
3595 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3596 that result's range is initialized.
3597
e9892350
JG
35982016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3599
3600 * c-typeck.c (parser_build_unary_op): Fix formatting.
3601
8fad45f5
MW
36022016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3603
3604 * c-decl.c (grokdeclarator): Remove errmsg and use of
3605 targetm.invalid_return_type.
3606 (grokparms): Remove errmsg and use of
3607 targetm.invalid_parameter_type.
3608
aa4b467b
JM
36092016-05-13 Joseph Myers <joseph@codesourcery.com>
3610
3611 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3612 function return type.
3613
4f2e1536
MP
36142016-05-12 Marek Polacek <polacek@redhat.com>
3615
3616 PR c/70756
3617 * c-decl.c (build_compound_literal): Pass LOC down to
3618 c_incomplete_type_error.
3619 * c-tree.h (require_complete_type): Adjust declaration.
3620 (c_incomplete_type_error): Likewise.
3621 * c-typeck.c (require_complete_type): Add location parameter, pass it
3622 down to c_incomplete_type_error.
3623 (c_incomplete_type_error): Add location parameter, pass it down to
3624 error_at.
3625 (build_component_ref): Pass location down to c_incomplete_type_error.
3626 (default_conversion): Pass location down to require_complete_type.
3627 (build_array_ref): Likewise.
3628 (build_function_call_vec): Likewise.
3629 (convert_arguments): Likewise.
3630 (build_unary_op): Likewise.
3631 (build_c_cast): Likewise.
3632 (build_modify_expr): Likewise.
3633 (convert_for_assignment): Likewise.
3634 (c_finish_omp_clauses): Likewise.
3635
d6e83a8d
MM
36362016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3637
3638 PR c/43651
3639 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3640 is enabled.
3641 * c-errors.c (pedwarn_c90): Return true if warned.
3642 * c-tree.h (pedwarn_c90): Change return type to bool.
3643 (enum c_declspec_word): Add new enumerator cdw_atomic.
3644
5c3a10fb
MP
36452016-05-11 Marek Polacek <polacek@redhat.com>
3646
3647 PR c++/71024
3648 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3649 diagnose_mismatched_attributes and call it.
3650
cf68d92c
MP
36512016-05-10 Marek Polacek <polacek@redhat.com>
3652
3653 PR c/70255
3654 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3655 on a declaration following the definition.
3656
351f85c5
JJ
36572016-05-05 Jakub Jelinek <jakub@redhat.com>
3658
3659 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3660 parse it through to c_parser_c99_block_statement.
3661 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3662 caller.
3663
deef7113
MP
36642016-05-04 Marek Polacek <polacek@redhat.com>
3665
3666 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3667 OPT_Wdangling_else.
3668
de55efd5
MP
36692016-05-04 Marek Polacek <polacek@redhat.com>
3670
3671 PR c/48778
3672 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3673 for macro expansions.
3674
79ce98bc
MP
36752016-05-03 Marek Polacek <polacek@redhat.com>
3676
3677 PR c/70859
3678 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3679 check_builtin_function_arguments.
3680
fb2647aa
RB
36812016-05-03 Richard Biener <rguenther@suse.de>
3682
3683 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3684 the checksum from the previous stage.
3685
77886428
CP
36862016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3687
3688 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3689 c_finish_omp_clauses.
3690 (c_parser_omp_all_clauses): Likewise.
3691 (c_parser_oacc_cache): Likewise.
3692 (c_parser_oacc_loop): Likewise.
3693 (omp_split_clauses): Likewise.
3694 (c_parser_omp_declare_target): Likewise.
3695 (c_parser_cilk_all_clauses): Likewise.
3696 (c_parser_cilk_for): Likewise.
3697 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3698 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3699
7176a4a0
MP
37002016-05-02 Marek Polacek <polacek@redhat.com>
3701
3702 PR c/70851
3703 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3704 incomplete type.
3705
e7ff0319
CP
37062016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3707
3708 PR middle-end/70626
3709 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3710 OACC_LOOP_CLAUSE_MASK.
3711 (c_parser_oacc_kernels_parallel): Update call to
3712 c_oacc_split_loop_clauses.
3713
9f405ce1
AM
37142016-04-28 Andrew MacLeod <amacleod@redhat.com>
3715
3716 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3717 argument to build_modify_expr in two cases.
3718
c1e1f433
BS
37192016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3720
3721 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3722 warn_for_memset instead of warning directly here.
3723
2448a956
MP
37242016-04-26 Marek Polacek <polacek@redhat.com>
3725
3726 PR c/67784
3727 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3728 out of ...
3729 (c_parser_for_statement): ... here.
3730 (c_parser_if_statement): Use it.
3731 (c_parser_switch_statement): Use it.
3732 (c_parser_while_statement): Use it.
3733
b02a5e26
MP
3734 PR c/70791
3735 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3736
477d4906
IV
37372016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3738
3739 PR c++/69363
3740 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3741 instead of c_finish_cilk_clauses.
3742 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3743 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3744 floating-point variables in the linear clause for Cilk Plus.
3745
fe37c7af
MM
37462016-04-18 Michael Matz <matz@suse.de>
3747
3748 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3749 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3750
949505a9
MP
37512016-04-15 Marek Polacek <polacek@redhat.com>
3752
3753 PR c/70671
3754 * c-typeck.c (build_unary_op): Pass location down to error and
3755 warning call.
3756
dda1bf61
JJ
37572016-04-15 Jakub Jelinek <jakub@redhat.com>
3758
3759 PR c/70436
3760 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3761 where needed.
3762 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3763 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3764 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3765 Adjust c_parser_pragma callers.
3766 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3767 caller.
3768 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3769 c_parser_statement.
3770 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3771 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3772 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3773 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3774 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3775 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3776 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3777 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3778 down where needed.
3779 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3780 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3781 calls.
3782
99cd9857
MP
37832016-04-13 Marek Polacek <polacek@redhat.com>
3784
3785 PR c/70436
3786 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3787 adjust callers.
3788 (c_parser_statement): Likewise.
3789 (c_parser_c99_block_statement): Likewise.
3790 (c_parser_while_statement): Likewise.
3791 (c_parser_for_statement): Likewise.
3792 (c_parser_if_body): Don't set IF_P here.
3793 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3794 about dangling else here.
3795 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3796 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3797 warn about dangling else here.
3798
f13355da
MP
37992016-04-04 Marek Polacek <polacek@redhat.com>
3800
3801 PR c/70307
3802 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3803
5fde6a45
MP
38042016-03-31 Marek Polacek <polacek@redhat.com>
3805
3806 PR c/70297
3807 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3808
4bbf545b
DM
38092016-03-18 David Malcolm <dmalcolm@redhat.com>
3810
3811 PR c/70281
3812 * c-parser.c (c_parser_postfix_expression): Set the source range
3813 for uses of "__builtin_types_compatible_p".
3814
fcc2b74f
JJ
38152016-03-17 Jakub Jelinek <jakub@redhat.com>
3816
3817 PR c/70280
3818 * c-typeck.c (composite_type): Don't count void_list_node
3819 into len, if the list is terminated by void_list_node, start
3820 with void_list_node instead of NULL for newargs. Stop
3821 at void_list_node.
3822
ab4c578f
MP
38232016-03-16 Marek Polacek <polacek@redhat.com>
3824
3825 PR c/70093
3826 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3827 nested functions returning VM types.
3828
96b3c82d
CP
38292016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3830
3831 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3832 when calling c_finish_omp_clauses.
3833
29b9828f
BS
38342016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3835
3836 PR c/69824
3837 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3838 for later.
3839
7ff6ca38
MP
38402016-03-04 Marek Polacek <polacek@redhat.com>
3841
3842 PR c/69798
3843 * c-parser.c (c_parser_postfix_expression): Call
3844 c_parser_cast_expression rather than c_parser_postfix_expression.
3845
686e2237
JJ
38462016-03-01 Jakub Jelinek <jakub@redhat.com>
3847
3848 PR c/69796
3849 PR c/69974
3850 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3851 of incomplete decls to error_mark_node.
3852
0b05329b
MP
38532016-02-24 Marek Polacek <polacek@redhat.com>
3854
3855 PR c/69819
3856 * c-decl.c (finish_decl): Don't update the copy of the type of a
3857 different decl type.
3858
067fbd8b
JJ
38592016-02-23 Jakub Jelinek <jakub@redhat.com>
3860
3861 PR objc/69844
3862 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3863 in id_kind reclassification.
3864
bf14eba2
JJ
38652016-02-16 Jakub Jelinek <jakub@redhat.com>
3866
3867 PR c/69835
3868 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3869
ba539195
JN
38702016-02-16 James Norris <jnorris@codesourcery.com>
3871
3872 PR c/64748
3873 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3874
16595a1f
BS
38752016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3876
f48dfe98
BS
3877 * c-decl.c (build_null_declspecs): Zero the entire struct.
3878
16595a1f
BS
3879 PR c/69522
3880 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3881 callers changed. If nested_p is true, use it to call
3882 finish_implicit_inits.
3883 * c-tree.h (finish_implicit_inits): Declare.
3884 * c-typeck.c (finish_implicit_inits): New function. Move code
3885 from ...
3886 (push_init_level): ... here.
3887 (set_designator, process_init_element): Call finish_implicit_inits.
3888
66756373
JJ
38892016-02-11 Jakub Jelinek <jakub@redhat.com>
3890
3891 PR c/69768
3892 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3893 arguments for -Waddress warning.
3894
1066e9b5
JJ
38952016-02-04 Jakub Jelinek <jakub@redhat.com>
3896
3897 PR c/69669
3898 * c-decl.c (finish_enum): When honoring mode attribute,
3899 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3900
3a5d2ba4
JJ
39012016-01-29 Jakub Jelinek <jakub@redhat.com>
3902
3903 PR debug/69518
3904 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3905 all type variants, not just TYPE_MAIN_VARIANT.
3906
cbdd8ae0
JJ
39072016-01-27 Jakub Jelinek <jakub@redhat.com>
3908
3909 PR debug/66869
3910 * c-decl.c (c_write_global_declarations_1): Warn with
3911 warn_unused_function if static prototype without definition
3912 is not C_DECL_USED.
3913
fa74a4bc
MP
39142016-01-27 Marek Polacek <polacek@redhat.com>
3915
3916 PR c/68062
3917 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3918 to unsigned, if needed. Add -Wsign-compare warning.
3919
13f92e8d
JJ
39202016-01-26 Jakub Jelinek <jakub@redhat.com>
3921
3922 PR tree-optimization/69483
3923 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3924
cd8e73dc 39252016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3926
3927 PR c/24293
3928 * c-tree.h (incomplete_record_decls): Declare.
3929 * c-parser.c (incomplete_record_decls): Define.
3930 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3931 report error if any decl has zero size.
3932 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3933 or enum type to incomplete_record_decls.
3934
e6d6ec9e
TV
39352016-01-14 Tom de Vries <tom@codesourcery.com>
3936
3937 PR tree-optimization/68773
3938 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3939 set force_output.
3940
00083992
MP
39412016-01-14 Marek Polacek <polacek@redhat.com>
3942
3943 PR c/69262
3944 * c-decl.c (grokdeclarator): Provide more information for invalid
3945 array declarations.
3946
7443cf13
DM
39472016-01-06 David Malcolm <dmalcolm@redhat.com>
3948
3949 * c-parser.c (c_parser_unary_expression): For dereferences, build
3950 a combined location before calling build_indirect_ref, so that
3951 error reports cover the full range, manually updating the c_expr
3952 src_range.
3953
6b131d5b
MP
39542016-01-06 Marek Polacek <polacek@redhat.com>
3955
3956 PR sanitizer/69099
3957 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3958 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3959 NULL.
3960
818ab71a
JJ
39612016-01-04 Jakub Jelinek <jakub@redhat.com>
3962
3963 Update copyright years.
3964
2fe0a208
MP
39652016-01-04 Marek Polacek <polacek@redhat.com>
3966
3967 PR c/68908
3968 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3969 optimization to use __atomic_fetch_* built-in if possible.
3970
c7b48c8a
TS
39712015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3972
3973 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3974 into...
3975 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3976 all users.
3977
fda5652f
MP
39782015-12-22 Marek Polacek <polacek@redhat.com>
3979
3980 PR c/69002
3981 * c-typeck.c (build_component_ref): Warn when acessing elements of
3982 atomic structures or unions.
3983
745e411d
DM
39842015-12-21 David Malcolm <dmalcolm@redhat.com>
3985
3986 * c-typeck.c: Include "gcc-rich-location.h".
3987 (build_binary_op): In the two places that call binary_op_error,
3988 create a gcc_rich_location and populate it with the location of
3989 the binary op and its two operands.
3990
94c40e19
DM
39912015-12-16 David Malcolm <dmalcolm@redhat.com>
3992
3993 * c-parser.c (c_parser_statement_after_labels): When calling
3994 c_finish_return, Use the return expression's location if it has
3995 one, falling back to the location of the first token within it.
3996 * c-typeck.c (c_finish_return): When issuing warnings about
3997 the incorrect presence/absence of a return value, issue a note
3998 showing the declaration of the function.
3999
de67c4c3
DM
40002015-12-16 David Malcolm <dmalcolm@redhat.com>
4001
4002 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4003 to 4.
4004 (c_parser_peek_nth_token): New function.
4005 (c_parser_peek_conflict_marker): New function.
4006 (c_parser_error): Detect conflict markers and report them as such.
4007
a10704e1
DM
40082015-12-16 David Malcolm <dmalcolm@redhat.com>
4009
4010 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4011 to preserve range information for the primary expression
4012 in the call to c_parser_postfix_expression_after_primary.
4013
8062bca6
DM
40142015-12-16 David Malcolm <dmalcolm@redhat.com>
4015
4016 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4017 expression location, falling back on the first token location,
4018 rather than always using the latter.
4019
d06f8b75
MP
40202015-12-16 Marek Polacek <polacek@redhat.com>
4021
4022 PR c/64637
4023 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4024 available.
4025
2994fb91
MP
40262015-12-15 Marek Polacek <polacek@redhat.com>
4027
4028 PR c/68907
4029 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4030 artificial decl.
4031
a1b93f8d
DM
40322015-12-08 David Malcolm <dmalcolm@redhat.com>
4033
4034 * c-parser.c (c_parser_alignof_expression): Capture location of
4035 closing parenthesis (if any), or of end of unary expression, and
4036 use it to build a src_range for the expression.
4037
46c6e1e2
DM
40382015-12-08 David Malcolm <dmalcolm@redhat.com>
4039
4040 PR c/68757
4041 * c-parser.c (c_parser_get_builtin_args): Add
4042 "out_close_paren_loc" param, and write back to it.
4043 (c_parser_postfix_expression): Capture the closing
4044 parenthesis location for RID_CHOOSE_EXPR,
4045 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4046 RID_BUILTIN_SHUFFLE and use it to set the source range
4047 for such expressions; within RID_BUILTIN_COMPLEX set
4048 the underlying location.
4049
66189108
MP
40502015-12-07 Marek Polacek <polacek@redhat.com>
4051
4052 PR c/68668
4053 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4054 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4055
f187980b
EB
40562015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4057
4058 * c-tree.h (c_build_va_arg): Adjust prototype.
4059 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4060 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4061 parameter, adjust throughout and issue an error if EXPR is a component
4062 with reverse storage order.
4063
4250754e
JM
40642015-12-02 Jason Merrill <jason@redhat.com>
4065
4066 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4067 (c_fully_fold_internal, decl_constant_value_for_optimization):
4068 Move from c-common.c.
4069 * c-tree.h: Declare decl_constant_value_for_optimization.
4070 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4071
e9e32ee6
JM
40722015-12-02 Joseph Myers <joseph@codesourcery.com>
4073
4074 PR c/68162
4075 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4076 following link from declarator to next declarator. Track original
4077 qualified type and pass it to c_build_qualified_type.
4078 * c-typeck.c (c_build_qualified_type): Add arguments
4079 orig_qual_type and orig_qual_indirect.
4080
ff7a55bf
TS
40812015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4082
4083 * c-parser.c (c_parser_omp_clause_name)
4084 (c_parser_oacc_all_clauses): Alphabetical sorting.
4085
657e4e47
JJ
40862015-12-02 Jakub Jelinek <jakub@redhat.com>
4087
4088 PR c/68533
4089 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4090 for diagnostics.
4091
37d5ad46
JB
40922015-12-01 Julian Brown <julian@codesourcery.com>
4093 Cesar Philippidis <cesar@codesourcery.com>
4094 James Norris <James_Norris@mentor.com>
4095
4096 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4097 (c_parser_oacc_clause_use_device): New function.
4098 (c_parser_oacc_all_clauses): Add use_device support.
4099 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4100 (c_parser_oacc_host_data): New function.
4101 (c_parser_omp_construct): Add host_data support.
4102 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4103 * c-typeck.c (c_finish_oacc_host_data): New function.
4104 (c_finish_omp_clauses): Add use_device support.
4105
a4850ce9
JH
41062015-11-29 Jan Hubicka <hubicka@ucw.cz>
4107
4108 PR c/67106
4109 * c-decl.c: Set TYPE_PACKED in variants.
4110
b58d3df2
ML
41112015-11-27 Martin Liska <mliska@suse.cz>
4112
4113 PR c++/68312
4114 * c-array-notation.c (fix_builtin_array_notation_fn):
4115 Use release_vec_vec instead of vec::release.
4116 (build_array_notation_expr): Likewise.
4117 (fix_conditional_array_notations_1): Likewise.
4118 (fix_array_notation_expr): Likewise.
4119 (fix_array_notation_call_expr): Likewise.
4120
aec17bfe
JJ
41212015-11-27 Jakub Jelinek <jakub@redhat.com>
4122
4123 PR c/63326
4124 * c-parser.c (c_parser_compound_statement_nostart): If
4125 last_label is true, use pragma_stmt instead of pragma_compound
4126 as second c_parser_pragma argument.
4127 (c_parser_omp_ordered, c_parser_omp_target_update,
4128 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4129 false as second argument to c_parser_skip_to_pragma_eol after
4130 diagnosing standalone directives used in pragma_stmt context.
4131
688c4de0
IV
41322015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4133
4134 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4135 with "if (ENABLE_OFFLOADING)".
4136
cbd03aee
DM
41372015-11-23 David Malcolm <dmalcolm@redhat.com>
4138
4139 PR objc/68438
4140 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4141 for various Objective-C constructs: Class.name syntax,
4142 @selector(), @protocol(), @encode(), and [] message syntax.
4143
a87a86e1
DM
41442015-11-20 David Malcolm <dmalcolm@redhat.com>
4145
4146 PR 62314
4147 * c-typeck.c (should_suggest_deref_p): New function.
4148 (build_component_ref): Special-case POINTER_TYPE when
4149 generating a "not a structure of union" error message, and
4150 suggest a "->" rather than a ".", providing a fix-it hint.
4151
8ece8dfb
DM
41522015-11-19 David Malcolm <dmalcolm@redhat.com>
4153
4154 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4155 candidate into a new function, find_closest_identifier.
4156
433068cc
MP
41572015-11-19 Marek Polacek <polacek@redhat.com>
4158
4159 PR c/68412
4160 * c-typeck.c (parser_build_binary_op): Properly handle
4161 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4162
bef08b71
DM
41632015-11-17 David Malcolm <dmalcolm@redhat.com>
4164
4165 * c-parser.c (set_c_expr_source_range): Bulletproof both
4166 overloaded implementations against NULL expr->value.
4167 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4168 values.
4169 (c_parser_unary_expression): Likewise when handling addresses of
4170 labels.
4171 (c_parser_postfix_expression): Likewise for statement expressions,
4172 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4173 __builtin_va_arg, and for __builtin_offset_of.
4174 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4175 src_range using the range of the braced initializer.
4176 (c_parser_transaction_expression): Set src_range for "ret" to a
4177 sane pair of values.
4178
fff77217
KY
41792015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4180
4181 * c-parser.c (c_finish_omp_declare_simd): Look for
4182 "simd" attribute as well. Update error message.
4183
1d899da2
TS
41842015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4185
4186 * c-parser.c (c_parser_omp_declare_target): Adjust.
4187
e4606348
JJ
41882015-11-14 Jakub Jelinek <jakub@redhat.com>
4189
4190 * c-typeck.c (c_finish_omp_clauses): Don't mark
4191 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4192
3e636daf
MP
41932015-11-14 Marek Polacek <polacek@redhat.com>
4194
4195 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4196 * c-typeck.c: Likewise.
4197
ebedc9a3
DM
41982015-11-13 David Malcolm <dmalcolm@redhat.com>
4199
4200 * c-decl.c (warn_defaults_to): Pass line_table to
4201 rich_location ctor.
4202 * c-errors.c (pedwarn_c99): Likewise.
4203 (pedwarn_c90): Likewise.
4204 * c-parser.c (set_c_expr_source_range): New functions.
4205 (c_token::get_range): New method.
4206 (c_token::get_finish): New method.
4207 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4208 based on the range from the start of the LHS to the end of the
4209 RHS.
4210 (c_parser_conditional_expression): Likewise, based on the range
4211 from the start of the cond.value to the end of exp2.value.
4212 (c_parser_binary_expression): Call set_c_expr_source_range on
4213 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4214 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4215 based on the cast_loc through to the end of the expr.
4216 (c_parser_unary_expression): Likewise, based on the
4217 op_loc through to the end of op.
4218 (c_parser_sizeof_expression) Likewise, based on the start of the
4219 sizeof token through to either the closing paren or the end of
4220 expr.
4221 (c_parser_postfix_expression): Likewise, using the token range,
4222 or from the open paren through to the close paren for
4223 parenthesized expressions.
4224 (c_parser_postfix_expression_after_primary): Likewise, for
4225 various kinds of expression.
4226 * c-tree.h (struct c_expr): Add field "src_range".
4227 (c_expr::get_start): New method.
4228 (c_expr::get_finish): New method.
4229 (set_c_expr_source_range): New decls.
4230 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4231 on ret for prefix unary ops.
4232 (parser_build_binary_op): Likewise, running from the start of
4233 arg1.value through to the end of arg2.value.
4234
ec8b536f
MP
42352015-11-13 Marek Polacek <polacek@redhat.com>
4236
4237 PR c/68320
4238 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4239
277fe616
DM
42402015-11-13 David Malcolm <dmalcolm@redhat.com>
4241
4242 * c-typeck.c: Include spellcheck.h.
4243 (lookup_field_fuzzy_find_candidates): New function.
4244 (lookup_field_fuzzy): New function.
4245 (build_component_ref): If the field was not found, try using
4246 lookup_field_fuzzy and potentially offer a suggestion.
4247
6e232ba4
JN
42482015-11-12 James Norris <jnorris@codesourcery.com>
4249 Joseph Myers <joseph@codesourcery.com>
4250
4251 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4252 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4253 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4254 and PRAGMA_OMP_CLAUSE_LINK.
4255 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4256 and PRAGMA_OACC_CLAUSE_LINK.
4257 (OACC_DECLARE_CLAUSE_MASK): New definition.
4258 (c_parser_oacc_declare): New function.
4259
9be4f715
MP
42602015-11-12 Marek Polacek <polacek@redhat.com>
4261
4262 PR c/67784
4263 * c-parser.c (c_parser_for_statement): Reclassify the token in
4264 a correct scope.
4265
e78bede6
MP
42662015-11-11 Marek Polacek <polacek@redhat.com>
4267
4268 PR c/68107
4269 PR c++/68266
4270 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4271 checking the size of an array.
4272
69f293c9
AM
42732015-11-11 Andrew MacLeod <amacleod@redhat.com>
4274
4275 * c-array-notation.c: Remove unused header files.
4276 * c-aux-info.c: Likewise.
4277 * c-convert.c: Likewise.
4278 * c-decl.c: Likewise.
4279 * c-errors.c: Likewise.
4280 * c-lang.c: Likewise.
4281 * c-objc-common.c: Likewise.
4282 * c-parser.c: Likewise.
4283 * c-typeck.c: Likewise.
4284 * gccspec.c: Likewise.
4285
3a40d81d
NS
42862015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4287 Cesar Philippidis <cesar@codesourcery.com>
4288 James Norris <jnorris@codesourcery.com>
4289 Julian Brown <julian@codesourcery.com>
4290 Nathan Sidwell <nathan@codesourcery.com>
4291
3a40d81d
NS
4292 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4293 routine arg.
4294 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4295 (c_parser_pragma): Parse 'acc routine'.
4296 (OACC_ROUTINE_CLAUSE_MARK): Define.
4297 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4298
fc402eec
AA
42992015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4300
4301 PR debug/67192
4302 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4303 location of the backward-goto to the start of the loop body.
4304
f6b0b3db
AA
43052015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4306
4307 PR debug/67192
4308 * c-parser.c (c_parser_while_statement): Finish the loop before
4309 parsing ahead for misleading indentation.
4310 (c_parser_for_statement): Likewise.
4311
ee45a32d
EB
43122015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4313
4314 * c-decl.c (finish_struct): If the structure has reverse storage
4315 order, rewrite the type of array fields with scalar component. Call
4316 maybe_apply_pragma_scalar_storage_order on entry.
4317 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4318 errors on bit-fields and reverse SSO here and not...
4319 (c_mark_addressable): ...here.
4320 (output_init_element): Adjust call to initializer_constant_valid_p.
4321 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4322
8a645150
DM
43232015-11-06 David Malcolm <dmalcolm@redhat.com>
4324
4325 * c-decl.c (warn_defaults_to): Update for change in signature
4326 of diagnostic_set_info.
4327 * c-errors.c (pedwarn_c99): Likewise.
4328 (pedwarn_c90): Likewise.
4329 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4330 for textinfo::set_location.
4331
7a5e4956
CP
43322015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4333 Thomas Schwinge <thomas@codesourcery.com>
4334 James Norris <jnorris@codesourcery.com>
4335
4336 * c-parser.c (c_parser_omp_clause_name): Add support for
4337 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4338 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4339 default(none) in OpenACC.
4340 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4341 arguments.
4342 (c_parser_oacc_clause_tile): New function.
4343 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4344 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4345 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4346 TILE}.
4347 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4348 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4349 FIRSTPRIVATE}.
4350 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4351 (c_parser_oacc_update): Update the error message for missing clauses.
4352 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4353 and OMP_CLAUSE_INDEPENDENT.
4354
bfcfbfa0
MP
43552015-11-05 Marek Polacek <polacek@redhat.com>
4356
4357 PR c/68090
4358 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4359 deal with pre-evaluation on invalid types.
4360
e01d41e5
JJ
43612015-11-05 Jakub Jelinek <jakub@redhat.com>
4362 Ilya Verbin <ilya.verbin@intel.com>
4363
4364 * c-parser.c: Include context.h and gimple-expr.h.
4365 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4366 monotonic together with nonmonotonic.
4367 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4368 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4369 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4370 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4371 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4372 expressions on combined target teams before the target.
4373 (c_parser_omp_declare_target): If decl has "omp declare target" or
4374 "omp declare target link" attribute, and cgraph or varpool node already
4375 exists, then set corresponding flags. Call c_finish_omp_clauses
4376 in the parenthesized extended-list syntax case.
4377 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4378 declare target.
4379 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4380 on OMP_CLAUSE_REDUCTION array sections.
4381 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4382 into the constant offset, or for variable low-bound using
4383 POINTER_PLUS_EXPR. For structure element based array sections use
4384 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4385 (c_finish_omp_clauses): Drop generic_field_head, structure
4386 elements are now always mapped even as array section bases,
4387 diagnose same var in data sharing and mapping clauses. Diagnose if
4388 linear step on declare simd is neither a constant nor a uniform
4389 parameter. Look through POINTER_PLUS_EXPR for array section
4390 reductions. Diagnose the same var or function appearing multiple
4391 times on the same directive. Fix up wording for the to clause if t
4392 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4393 modifier on kinds other than dynamic or guided or nonmonotonic
4394 modifier together with ordered clause.
4395
4bf9e5a8
TS
43962015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4397 Chung-Lin Tang <cltang@codesourcery.com>
4398
4399 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4400
2adfab87
AM
44012015-10-29 Andrew MacLeod <amacleod@redhat.com>
4402
4403 * c-array-notation.c: Reorder #include's and remove duplicates.
4404 * c-aux-info.c: Likewise.
4405 * c-convert.c: Likewise.
4406 * c-decl.c: Likewise.
4407 * c-errors.c: Likewise.
4408 * c-lang.c: Likewise.
4409 * c-objc-common.c: Likewise.
4410 * c-parser.c: Likewise.
4411 * c-typeck.c: Likewise.
4412
e922069e
JW
44132015-10-26 Jim Wilson <jim.wilson@linaro.org>
4414
4415 PR debug/66068
4416 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4417 after calling build_qualified_type.
4418
765dd391
CP
44192015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4420 Thomas Schwinge <thomas@codesourcery.com>
4421 James Norris <jnorris@codesourcery.com>
4422 Joseph Myers <joseph@codesourcery.com>
4423 Julian Brown <julian@codesourcery.com>
4424 Bernd Schmidt <bschmidt@redhat.com>
4425
4426 * c-parser.c (c_parser_oacc_shape_clause): New.
4427 (c_parser_oacc_simple_clause): New.
4428 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4429 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4430
88bae6f4
TS
44312015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4432 James Norris <jnorris@codesourcery.com>
4433 Cesar Philippidis <cesar@codesourcery.com>
4434
4435 PR c/64765
4436 PR c/64880
4437 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4438 parameters, and handle these. Adjust all users.
4439 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4440 into...
4441 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4442 all users.
4443 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4444 declare functions.
4445 (c_finish_omp_construct): Declare function.
4446 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4447 Merge functions into...
4448 (c_finish_omp_construct): ... this new function.
4449
a8fc2579
RB
44502015-10-22 Richard Biener <rguenther@suse.de>
4451
4452 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4453 before folding a MINUS_EXPR.
4454
e9122ef6
MP
44552015-10-21 Marek Polacek <polacek@redhat.com>
4456
4457 PR c/68024
4458 * c-decl.c (start_function): Warn about vararg functions without
4459 a prototype.
4460
9f47c7e5
IE
44612015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4462
4463 * c-typeck.c (build_conditional_expr): Use boolean vector
4464 type for vector comparison.
4465 (build_vec_cmp): New.
4466 (build_binary_op): Use build_vec_cmp for comparison.
4467
fa60eeb9
MP
44682015-10-20 Marek Polacek <polacek@redhat.com>
4469
4470 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4471
2c7020eb
MP
44722015-10-20 Marek Polacek <polacek@redhat.com>
4473
4474 PR c/67964
4475 * c-parser.c (c_parser_attributes): Break out of the loop if the
4476 token after an attribute isn't a comma.
4477
d9a6bd32
JJ
44782015-10-13 Jakub Jelinek <jakub@redhat.com>
4479 Aldy Hernandez <aldyh@redhat.com>
4480
4481 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4482 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4483 (c_parser_omp_variable_list): Handle structure elements for
4484 map, to and from clauses. Handle array sections in reduction
4485 clause. Formatting fixes.
4486 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4487 if clause modifiers.
4488 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4489 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4490 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4491 c_parser_omp_clause_is_device_ptr): New functions.
4492 (c_parser_omp_clause_ordered): Parse optional parameter.
4493 (c_parser_omp_clause_reduction): Handle array reductions.
4494 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4495 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4496 functions.
4497 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4498 (c_parser_omp_clause_depend_sink): New function.
4499 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4500 (c_parser_omp_clause_map): Parse release/delete map kinds and
4501 optional always modifier.
4502 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4503 and c_finish_omp_clauses callers.
4504 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4505 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4506 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4507 (OMP_CRITICAL_CLAUSE_MASK): Define.
4508 (c_parser_omp_critical): Parse critical clauses.
4509 (c_parser_omp_for_loop): Handle doacross loops, adjust
4510 c_finish_omp_for and c_finish_omp_clauses callers.
4511 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4512 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4513 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4514 (c_parser_omp_for): Disallow ordered clause when combined with
4515 distribute. Disallow linear clause when combined with distribute
4516 and not combined with simd.
4517 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4518 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4519 parse clauses and if depend clause is found, don't parse a body.
4520 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4521 Allow target parallel without for after it.
4522 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4523 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4524 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4525 invalid kinds.
4526 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4527 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4528 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4529 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4530 functions.
4531 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4532 defaultmap and is_device_ptr clauses.
4533 (c_parser_omp_target): Parse target parallel and target simd. Set
4534 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4535 and target exit data. Diagnose invalid map kinds.
4536 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4537 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4538 construct.
4539 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4540 &omp_priv.
4541 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4542 (c_parser_omp_taskloop): New function.
4543 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4544 handle PRAGMA_OMP_TASKLOOP.
4545 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4546 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4547 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4548 Add IS_OMP argument, handle structure element bases, diagnose
4549 bitfields, pass IS_OMP recursively, diagnose known zero length
4550 array sections in depend clauses, handle array sections in reduction
4551 clause, diagnose negative length even for pointers.
4552 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4553 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4554 array sections in reduction clause, set
4555 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4556 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4557 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4558 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4559
21ba0cea
MP
45602015-10-06 Marek Polacek <polacek@redhat.com>
4561
4562 * c-parser.c (c_parser_statement_after_labels): Use
4563 protected_set_expr_location.
4564 (c_parser_omp_clause_num_gangs): Likewise.
4565 (c_parser_omp_clause_num_threads): Likewise.
4566 (c_parser_omp_clause_num_workers): Likewise.
4567 (c_parser_omp_clause_vector_length): Likewise.
4568 (c_parser_omp_clause_num_teams): Likewise.
4569 (c_parser_omp_clause_thread_limit): Likewise.
4570 * c-typeck.c (build_c_cast): Likewise.
4571 (c_cast_expr): Likewise.
4572
624d31fe
RS
45732015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4574
4575 * c-typeck.c (c_tree_equal): Use real_equal instead of
4576 REAL_VALUES_EQUAL.
4577
b8fd7909
JM
45782015-10-04 Jason Merrill <jason@redhat.com>
4579
4580 * c-parser.c (c_lex_one_token): Handle @synchronized.
4581 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4582 can change whether the function is transaction_safe.
4583
1c7485af
MP
45842015-10-02 Marek Polacek <polacek@redhat.com>
4585
4586 PR c/67730
4587 * c-typeck.c (convert_for_assignment): Use the expansion point
4588 location throughout.
4589
3e3b8d63
MP
45902015-10-02 Marek Polacek <polacek@redhat.com>
4591
4592 PR c/64249
4593 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4594 and pass it down to c_parser_if_statement.
4595 (c_parser_else_body): Add CHAIN parameter and pass it down to
4596 c_parser_statement_after_labels.
4597 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4598 duplicated if-else-if conditions.
4599
aabef2de
MP
46002015-10-01 Marek Polacek <polacek@redhat.com>
4601
4602 * c-typeck.c (convert_for_assignment): Improve commentary.
4603
de8ddd5f
MP
46042015-09-30 Marek Polacek <polacek@redhat.com>
4605
4606 PR c/67730
4607 * c-typeck.c (c_finish_return): Use the expansion point location for
4608 certain "return with value" warnings.
4609
c4914de6
MLI
46102015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4611
4612 * c-parser.c (pragma_lex): Add loc argument.
4613
0e36f5c7
MP
46142015-09-15 Marek Polacek <polacek@redhat.com>
4615
4616 PR c/67580
4617 * c-decl.c (tag_exists_p): New function.
4618 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4619 struct/union/enum keywords are missing.
4620 * c-tree.h (tag_exists_p): Declare.
4621
2f3bb934
MP
46222015-09-15 Marek Polacek <polacek@redhat.com>
4623
4624 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4625 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4626 Return NULL_TREE instead of 0.
4627 (lookup_name): Return NULL_TREE instead of 0.
4628 (lookup_name_in_scope): Likewise.
4629 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4630 (parser_xref_tag): Use false instead of 0.
4631 (start_struct): Use true instead of 1.
4632 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4633
aa256c4a
MP
46342015-09-14 Marek Polacek <polacek@redhat.com>
4635
4636 * c-typeck.c (set_nonincremental_init_from_string): Use
4637 HOST_WIDE_INT_M1U when shifting a negative value.
4638
dbb68221
MW
46392015-09-09 Mark Wielaard <mjw@redhat.com>
4640
4641 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4642 parm against NULL.
4643
a8a098ac
JJ
46442015-09-10 Jakub Jelinek <jakub@redhat.com>
4645
4646 PR c/67502
4647 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4648 into OMP_FOR_PRE_BODY rather than before the loop.
4649
f4b189d5
JJ
46502015-09-09 Jakub Jelinek <jakub@redhat.com>
4651
0bb99c11
JJ
4652 PR c/67501
4653 * c-parser.c (c_parser_oacc_all_clauses,
4654 c_parser_omp_all_clauses): Remove invalid clause from
4655 list of clauses even if parser->error is set.
4656
fce5e5e3
JJ
4657 PR c/67500
4658 * c-parser.c (c_parser_omp_clause_aligned,
4659 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4660 test for errors.
4661 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4662 error_mark_node.
4663
f4b189d5
JJ
4664 PR c/67495
4665 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4666 instead of c_parser_unary_expression. If the result is !lvalue_p,
4667 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4668
b2aaf235
MP
46692015-09-04 Marek Polacek <polacek@redhat.com>
4670
4671 PR sanitizer/67279
4672 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4673
1807ffc1
MS
46742015-09-03 Martin Sebor <msebor@redhat.com>
4675
4676 PR c/66516
8b652e65
JJ
4677 * c-typeck.c (convert_arguments, parser_build_unary_op,
4678 build_conditional_expr, c_cast_expr, convert_for_assignment,
4679 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4680 reject_gcc_builtin.
4681 (c_decl_implicit): Define.
4682
d04ff417
MP
46832015-09-02 Marek Polacek <polacek@redhat.com>
4684
4685 PR c/67432
4686 * c-parser.c (c_parser_enum_specifier): Give a better error for
4687 an empty enum.
4688
a79683d5
TS
46892015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4690
4691 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4692
191a6b94
MP
46932015-08-12 Marek Polacek <polacek@redhat.com>
4694
4695 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4696 LOC to it.
4697
420a9d9b
MP
46982015-08-03 Marek Polacek <polacek@redhat.com>
4699
4700 PR c/67088
4701 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4702 Use it.
4703 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4704
992118a1
PP
47052015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4706
4707 * c-parser.c (c_parser_if_body): Take token_indent_info
4708 argument. Call warn_for_misleading_indentation even when the
4709 body is a semicolon. Extract token_indent_infos corresponding
4710 to the guard, body and next tokens. Adjust call to
4711 warn_for_misleading_indentation accordingly.
4712 (c_parser_else_body): Likewise.
4713 (c_parser_if_statement): Likewise.
4714 (c_parser_while_statement): Likewise.
4715 (c_parser_for_statement): Likewise.
4716
46308474
LFSM
47172015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4718 Manuel López-Ibáñez <manu@gcc.gnu.org>
4719
4720 * c-decl.c (get_parm_info): Remove static var. Update warning
4721 message.
4722
05b28fd6
MP
47232015-07-27 Marek Polacek <polacek@redhat.com>
4724
4725 PR c++/66555
4726 PR c/54979
4727 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4728
451b5e48
MP
47292015-07-20 Marek Polacek <polacek@redhat.com>
4730
4731 PR c++/55095
4732 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4733 (build_binary_op): Warn about left shift overflows.
4734
1916bcb5
AM
47352015-07-09 Andrew MacLeod <amacleod@redhat.com>
4736
4737 * c-array-notation.c: Adjust includes for flags.h changes.
4738 * c-objc-common.c: Likewise.
4739
c7131fb2
AM
47402015-07-07 Andrew MacLeod <amacleod@redhat.com>
4741
4742 * c-array-notation.c: Adjust includes.
4743 * c-aux-info.c: Likewise.
4744 * c-convert.c: Likewise.
4745 * c-decl.c: Likewise.
4746 * c-errors.c: Likewise.
4747 * c-lang.c: Likewise.
4748 * c-objc-common.c: Likewise.
4749 * c-parser.c: Likewise.
4750 * c-typeck.c: Likewise.
4751
da2e71c9
MLI
47522015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4753
4754 PR fortran/66605
4755 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4756
b155cfd9
MP
47572015-06-29 Marek Polacek <polacek@redhat.com>
4758
4759 PR c/66322
4760 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4761 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4762 about -Wswitch-bool here.
4763 (do_case): Update c_add_case_label call.
4764 (c_finish_case): Update c_do_switch_warnings call.
4765
31521951
MP
47662015-06-27 Marek Polacek <polacek@redhat.com>
4767
4768 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4769
22d03525
MP
47702015-06-26 Marek Polacek <polacek@redhat.com>
4771
4772 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4773 INDIRECT_REF_P.
4774 * c-typeck.c (array_to_pointer_conversion): Likewise.
4775 (build_unary_op): Likewise.
4776 (c_finish_return): Likewise.
4777
f0889939
AM
47782015-06-25 Andrew MacLeod <amacleod@redhat.com>
4779
4780 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4781 * c-parser.c: Likewise.
4782
8d67ee55
RS
47832015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4784
4785 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4786 instead of pointer_hash.
4787 (detect_field_duplicates): Likewise.
4788
0ae9bd27
MP
47892015-06-25 Marek Polacek <polacek@redhat.com>
4790
4791 * c-array-notation.c: Use VAR_P throughout.
4792 * c-decl.c: Likewise.
4793 * c-objc-common.c: Likewise.
4794 * c-parser.c: Likewise.
4795 * c-typeck.c: Likewise.
4796
62f9079a
MP
47972015-06-25 Marek Polacek <polacek@redhat.com>
4798
4799 * c-decl.c: Use is_global_var throughout.
4800 * c-parser.c: Likewise.
4801 * c-typeck.c: Likewise.
4802
abb226c9
AM
48032015-06-17 Andrew MacLeod <amacleod@redhat.com>
4804
4805 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4806 * c-aux-info.c: Likewise.
4807 * c-convert.c: Likewise.
4808 * c-decl.c: Likewise.
4809 * c-errors.c: Likewise.
4810 * c-lang.c: Likewise.
4811 * c-objc-common.c: Likewise.
4812 * c-parser.c: Likewise.
4813 * c-typeck.c: Likewise.
4814
8cbababc
JH
48152015-06-11 Jan Hubicka <hubicka@ucw.cz>
4816
4817 PR middle-end/66325
4818 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4819 variants.
4820
a0349665
PMR
48212015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4822
4823 * c-decl.c (pop_scope): Register the main translation unit
4824 through the new debug hook.
4825
13fdf2e2
AM
48262015-06-08 Andrew MacLeod <amacleod@redhat.com>
4827
4828 * c-array-notation.c : Adjust include files.
4829 * c-aux-info.c : Likewise.
4830 * c-convert.c : Likewise.
4831 * c-decl.c : Likewise.
4832 * c-errors.c : Likewise.
4833 * c-lang.c : Likewise.
4834 * c-lang.h : Likewise.
4835 * c-objc-common.c : Likewise.
4836 * c-parser.c : Likewise.
4837 * c-typeck.c : Likewise.
4838
d7438551
AH
48392015-06-05 Aldy Hernandez <aldyh@redhat.com>
4840
4841 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4842 immediately clobber it.
4843 (c_write_global_declarations_1): Remove call to
4844 check_global_declaration_1.
4845 (c_write_global_declarations_2): Remove.
4846 (c_write_final_cleanups): Rename from c_write_global_declarations.
4847 Remove call to finalize_compilation_unit.
4848 Remove calls to debugging hooks.
4849 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4850 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4851 * c-tree.h: Remove c_write_global_declarations.
4852
ecb9f223
AM
48532015-06-04 Andrew MacLeod <amacleod@redhat.com>
4854
4855 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4856 * c-aux-info.c: Likewise.
4857 * c-convert.c: Likewise.
4858 * c-decl.c: Likewise.
4859 * c-errors.c: Likewise.
4860 * c-lang.c: Likewise.
4861 * c-objc-common.c: Likewise.
4862 * c-parser.c: Likewise.
4863 * c-typeck.c: Likewise.
4864
9482b620
MP
48652015-06-04 Marek Polacek <polacek@redhat.com>
4866
4867 PR c/66341
4868 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4869 it is a lvalue.
4870
bc51ace3
PK
48712015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4872
4873 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4874 Warn for empty struct.
4875 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4876
ea5b45b6
AT
48772015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4878
4879 * c-decl.c (start_function): Call plugin before parsing.
4880 (finish_function): Call plugin after parsing.
4881
c2d47482
PK
48822015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4883
4884 PR c/49551
4885 * c-decl.c (merge_decls): Merge DECL_COMMON.
4886
a95492ab
JW
48872015-05-22 Jim Wilson <jim.wilson@linaro.org>
4888
4889 * Make-lang.in (check_gcc_pallelize): Define.
4890
fd5c817a
MP
48912015-05-22 Marek Polacek <polacek@redhat.com>
4892
4893 PR c/47043
4894 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4895 attributes.
4896
c7b70a3c
MP
48972015-05-21 Marek Polacek <polacek@redhat.com>
4898
4899 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4900 DECL_BUILT_IN.
4901
21b634ae
MP
49022015-05-20 Marek Polacek <polacek@redhat.com>
4903
4904 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4905 * c-typeck.c: Likewise.
4906
296a8c2f
MP
49072015-05-19 Marek Polacek <polacek@redhat.com>
4908
4909 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4910
41b37d5e
JJ
49112015-05-19 Jakub Jelinek <jakub@redhat.com>
4912
4913 PR middle-end/66199
4914 * c-parser.c (c_parser_omp_for_loop): Don't add
4915 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4916 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4917 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4918 constructs.
4919
fab27f52
MM
49202015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4921
4922 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4923 swaps.
fab27f52 4924
40de31cf
MLI
49252015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4926
4927 PR fortran/44054
4928 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4929 accessor function.
4930
3aa3c9fc
MP
49312015-05-14 Marek Polacek <polacek@redhat.com>
4932
4933 PR c/66066
4934 PR c/66127
4935 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4936 rather than with 0.
4937
c3388e62
DM
49382015-05-12 David Malcolm <dmalcolm@redhat.com>
4939
4940 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4941 to add a call to warn_for_misleading_indentation.
4942 (c_parser_else_body): Likewise, adding param "else_loc".
4943 (c_parser_if_statement): Check for misleading indentation.
4944 (c_parser_while_statement): Likewise.
4945 (c_parser_for_statement): Likewise.
4946
755e528f
MP
49472015-05-08 Marek Polacek <polacek@redhat.com>
4948
4949 PR c/64918
4950 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4951 (output_init_element): Likewise.
4952
0173bd2a
MP
49532015-05-07 Marek Polacek <polacek@redhat.com>
4954
4955 PR c/65179
4956 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4957 value.
4958
9babc352
MP
49592015-04-30 Marek Polacek <polacek@redhat.com>
4960
4961 * c-typeck.c (set_init_label): Call error_at instead of error and
4962 pass LOC to it.
4963
ac9f18db
MP
4964 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4965 the type of a decl.
4966
ec3fba51
MP
4967 * c-typeck.c (c_build_va_arg): Clarify the error message.
4968
b811915d
TS
49692015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4970
4971 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4972 OMP_STANDALONE_CLAUSES.
4973
f3075008
MP
49742015-04-28 Marek Polacek <polacek@redhat.com>
4975
4976 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4977
4e81b788
MP
49782015-04-28 Marek Polacek <polacek@redhat.com>
4979
4980 PR c/65901
4981 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4982
6c1db78e
MP
49832015-04-25 Marek Polacek <polacek@redhat.com>
4984
4985 PR c/52085
4986 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4987 attribute.
4988
5c4abbb8
MP
49892015-04-23 Marek Polacek <polacek@redhat.com>
4990
4991 PR c/65345
4992 * c-decl.c (set_labels_context_r): New function.
4993 (store_parm_decls): Call it via walk_tree_without_duplicates.
4994 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4995 instead of create_tmp_var. Build TARGET_EXPR instead of
4996 COMPOUND_EXPR.
4997 (build_atomic_assign): Use create_tmp_var_raw instead of
4998 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4999
06aca1d5
IV
50002015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5001
5002 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5003 (c_parser_omp_target_update): Add missed %> to error_at ().
5004
8fba1830
BRF
50052015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5006
5007 PR target/55143
5008 * c-decl.c (c_default_pointer_mode): Remove definition.
5009 * c-tree.h (c_default_pointer_mode): Remove declaration.
5010
62021f64
TB
50112015-03-27 Tobias Burnus <burnus@net-b.de>
5012
5013 PR c/65586
5014 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5015 error out.
5016 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5017 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5018 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5019
9b65e171
JJ
50202015-03-19 Jakub Jelinek <jakub@redhat.com>
5021
5022 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5023 attribute for DECL_EXTERNAL VAR_DECLs.
5024
17958621
JJ
50252015-03-11 Jakub Jelinek <jakub@redhat.com>
5026
5027 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5028 argument.
5029
7ccb1a11
JJ
50302015-03-10 Jakub Jelinek <jakub@redhat.com>
5031
5032 PR c/65120
5033 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5034 before preparing arguments to warn_logical_not_parentheses.
5035
01177669
JJ
50362015-03-09 Jakub Jelinek <jakub@redhat.com>
5037
5038 PR c/65120
5039 * c-typeck.c (parser_build_binary_op): Don't warn for
5040 !!x == y or !b == y where b is _Bool.
5041
802ac282
MP
50422015-03-09 Marek Polacek <polacek@redhat.com>
5043
5044 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5045 * c-decl.c (grokdeclarator): Likewise.
5046 * c-typeck.c (build_binary_op): Likewise.
5047
e5165b60
MP
50482015-02-27 Marek Polacek <polacek@redhat.com>
5049
5050 PR c/65228
5051 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5052
065d214c
MP
50532015-02-14 Marek Polacek <polacek@redhat.com>
5054
5055 PR c/64768
5056 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5057 declared through a typedef name.
5058
e5d9235b
MP
50592015-02-13 Marek Polacek <polacek@redhat.com>
5060
5061 PR c/65050
5062 * c-decl.c (grokdeclarator): Print also the type when giving
5063 the error message about array's incomplete element type.
5064
fa01ffcc
JJ
50652015-02-11 Jakub Jelinek <jakub@redhat.com>
5066
5067 PR c/64824
5068 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5069 check in the POP macro.
5070
c3e38a03
MP
50712015-02-09 Marek Polacek <polacek@redhat.com>
5072
5073 PR c/64856
5074 * c-typeck.c (process_init_element): Don't always wrap
5075 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5076 initializing a range of elements.
5077
4886ec8e
JJ
50782015-02-04 Jakub Jelinek <jakub@redhat.com>
5079
5080 PR c/64824
5081 PR c/64868
5082 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5083
c3e38a03 50842015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5085
5086 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5087 processing enum declaration.
5088
7b33f0c8
MP
50892015-01-29 Marek Polacek <polacek@redhat.com>
5090
5091 PR c/64709
5092 * c-typeck.c (pop_init_level): If constructor_elements has
5093 exactly one element with integer_zerop value, set constructor_zeroinit
5094 to 1. Remove braces around warning_init call.
5095
dea63e49
JJ
50962015-01-27 Jakub Jelinek <jakub@redhat.com>
5097
5098 PR c/64766
5099 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5100 of FUNCTION_DECLs with error_mark_node.
5101
d38f7dce
JJ
51022015-01-26 Jakub Jelinek <jakub@redhat.com>
5103
5104 PR c/64778
5105 * c-typeck.c (convert_arguments): Return -1 if there are
5106 error_args, even if we've diagnosed too many arguments.
5107
cbf5d0e7
RB
51082015-01-21 Richard Biener <rguenther@suse.de>
5109
5110 PR middle-end/64313
5111 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5112 for builtins the user declared correctly.
5113
41dbbb37
TS
51142015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5115 Bernd Schmidt <bernds@codesourcery.com>
5116 Cesar Philippidis <cesar@codesourcery.com>
5117 James Norris <jnorris@codesourcery.com>
5118 Jakub Jelinek <jakub@redhat.com>
5119 Ilmir Usmanov <i.usmanov@samsung.com>
5120
5121 * c-parser.c: Include "gomp-constants.h".
5122 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5123 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5124 Use OMP_CLAUSE_SET_MAP_KIND.
5125 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5126 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5127 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5128 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5129 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5130 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5131 "copyout", "create", "delete", "deviceptr", "gang", "host",
5132 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5133 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5134 "present_or_create", "pcreate", "seq", "self", "vector",
5135 "vector_length", "wait", "worker".
5136 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5137 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5138 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5139 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5140 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5141 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5142 (c_parser_oacc_data_clause_deviceptr)
5143 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5144 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5145 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5146 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5147 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5148 (c_parser_oacc_parallel, c_parser_oacc_update)
5149 (c_parser_oacc_wait): New functions.
5150 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5151 (c_finish_oacc_data): New prototypes.
5152 * c-typeck.c: Include "gomp-constants.h".
5153 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5154 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5155 OMP_CLAUSE_SET_MAP_KIND.
5156 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5157 (c_finish_oacc_data): New functions.
5158 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5159 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5160 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5161 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5162 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5163 GOMP_MAP_FORCE_DEVICEPTR.
5164
adfac8df
JJ
51652015-01-09 Michael Collison <michael.collison@linaro.org>
5166
5167 * c-array-notation.c: Include hash-set.h, machmode.h,
5168 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5169 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5170 * c-aux-info.c: Ditto.
5171 * c-convert.c: Ditto.
5172 * c-decl.c: Ditto.
5173 * c-errors.c: Ditto.
5174 * c-lang.c: Dittoxs.
5175 * c-objc-common.c: Ditto.
5176 * c-parser.c: Ditto.
5177 * c-typeck.c: Include hash-set.h, machmode.h,
5178 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5179 fold-const.h, wide-int.h, inchash.h, real.h and
5180 fixed-value.h due to flattening of tree.h.
5181
2cc901dc
MP
51822015-01-07 Marek Polacek <polacek@redhat.com>
5183
5184 PR c/64417
5185 * c-typeck.c (process_init_element): Disallow initialization of
5186 a flexible array member with a string constant if the structure
5187 is in an array.
5188
5624e564
JJ
51892015-01-05 Jakub Jelinek <jakub@redhat.com>
5190
e5341100
JJ
5191 PR sanitizer/64344
5192 * c-typeck.c (convert_for_assignment, c_finish_return): For
5193 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5194 types also set in_late_binary_op around convert call.
5195 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5196 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5197 result on expr as last argument to ubsan_instrument_float_cast,
5198 if in_late_binary_op, don't use c_save_expr but save_expr.
5199
5624e564
JJ
5200 Update copyright years.
5201
5bd012f8
MP
52022015-01-05 Marek Polacek <polacek@redhat.com>
5203
5204 PR c/64423
5205 * c-typeck.c (build_array_ref): Pass loc down to
5206 warn_array_subscript_with_type_char.
5207
3f8257db 52082014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5209
5210 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5211 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5212 element type.
8e745a17 5213 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5214 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5215 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5216 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5217 to PEDWARN_FOR_QUALIFIERS.
768952be 5218
8f94a8c4
JJ
52192014-12-17 Jakub Jelinek <jakub@redhat.com>
5220
5221 PR sanitizer/64289
5222 * c-convert.c: Include ubsan.h.
5223 (convert): For real -> integral casts and
5224 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5225 instead instrument the float cast directly.
5226
b731b390
JJ
52272014-11-29 Jakub Jelinek <jakub@redhat.com>
5228
5229 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5230 c_finish_stmt_expr): Remove NULL last argument from
5231 create_tmp_var_raw and create_tmp_var calls.
5232 * c-array-notation.c (fix_builtin_array_notation_fn,
5233 build_array_notation_expr, fix_conditional_array_notations_1,
5234 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5235
541e35a6
MP
52362014-11-28 Marek Polacek <polacek@redhat.com>
5237
5238 PR c/63862
5239 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5240 convert the right operand to integer type.
5241
b286be94
MP
52422014-11-25 Marek Polacek <polacek@redhat.com>
5243
5244 PR c/63877
5245 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5246 for inline functions.
5247
aa7da51a
JJ
52482014-11-21 Jakub Jelinek <jakub@redhat.com>
5249
5250 PR target/63764
5251 * c-typeck.c (build_array_ref): Adjust
5252 convert_vector_to_pointer_for_subscript caller. If it returns true,
5253 call non_lvalue_loc on the result.
5254
d876207f
RB
52552014-11-11 Richard Biener <rguenther@suse.de>
5256
5257 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5258 to true.
5259
e5e44252
AK
52602014-11-10 Andi Kleen <ak@linux.intel.com>
5261
5262 PR c/60804
5263 * c-parser.c (c_parser_statement_after_labels): Call
5264 check_no_cilk.
5265 (c_parser_if_statement): Dito.
5266 (c_parser_switch_statement): Dito.
5267 (c_parser_while_statement): Dito.
5268 (c_parser_do_statement): Dito.
5269 (c_parser_for_statement): Dito.
5270 * c-typeck.c (c_finish_loop): Dito.
5271
13c21655
PC
52722014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5273
5274 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5275 OPT_Wshift_count_overflow in the warnings.
5276
2d51fcef
MP
52772014-10-30 Marek Polacek <polacek@redhat.com>
5278
5279 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5280 print the stripped version as well, if they're not the same.
5281
ef4bddc2
RS
52822014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5283
5284 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5285 machine_mode.
5286
c582198b
AM
52872014-10-28 Andrew MacLeod <amacleod@redhat.com>
5288
5289 * c-decl.c: Adjust include files.
5290 * c-parser.c: Ditto.
5291
ddc8de03
PM
52922014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5293 Tom Tromey <tromey@redhat.com>
5294
5295 * c-tree.h (enum c_oracle_request): New.
5296 (c_binding_oracle_function): New typedef.
5297 (c_binding_oracle, c_pushtag, c_bind): Declare.
5298 * c-decl.c (c_binding_oracle): New global.
5299 (I_SYMBOL_CHECKED): New macro.
5300 (i_symbol_binding): New function.
5301 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5302 (I_TAG_CHECKED): New macro.
5303 (i_tag_binding): New function.
5304 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5305 (I_LABEL_CHECKED): New macro.
5306 (i_label_binding): New function.
5307 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5308 (c_print_identifier): Save and restore c_binding_oracle.
5309 (c_pushtag, c_bind): New functions.
5310
60393bbc
AM
53112014-10-27 Andrew MacLeod <amacleod@redhat.com>
5312
5313 * c-typeck.c: Adjust include files.
5314
d723bb7c
MLI
53152014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5316
5317 PR c++/53061
5318 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5319 initialization here...
5320 (c_initialize_diagnostics): ... but here. Set defaults after
5321 building pretty-printer.
5322
1bc5a451
MP
53232014-10-23 Marek Polacek <polacek@redhat.com>
5324
5325 PR c/63626
5326 * c-decl.c (pop_scope): Don't print warning in external_scope.
5327
4435bb92
MP
53282014-10-19 Marek Polacek <polacek@redhat.com>
5329
5330 PR c/63567
5331 * c-typeck.c (output_init_element): Allow initializing objects with
5332 static storage duration with compound literals even in C99 and add
5333 pedwarn for it.
5334
7278465e
MP
53352014-10-17 Marek Polacek <polacek@redhat.com>
5336
5337 PR c/63567
5338 * c-typeck.c (digest_init): Allow initializing objects with static
5339 storage duration with compound literals even in C99 and add pedwarn
5340 for it.
5341
d9b7be2e
MP
53422014-10-17 Marek Polacek <polacek@redhat.com>
5343
5344 PR c/63543
5345 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5346 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5347 error multiple times. Print the type.
5348
f406ae1f
MP
53492014-10-17 Marek Polacek <polacek@redhat.com>
5350
5351 PR c/63549
5352 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5353 type.
5354
92574c7c
MP
53552014-10-17 Marek Polacek <polacek@redhat.com>
5356
5357 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5358 (start_function): Use OPT_Wimplicit_int instead of 0.
5359 (store_parm_decls_oldstyle): Likewise.
5360
1bc4a978
MT
53612014-10-17 Alan Modra <amodra@gmail.com>
5362
5363 PR middle-end/61848
5364 * c-decl.c (merge_decls): Don't merge section name or tls model
5365 to newdecl symtab node, instead merge to olddecl. Override
5366 existing olddecl section name. Set tls_model for all thread-local
5367 vars, not just OMP thread-private ones. Remove incorrect comment.
5368
83685514
AM
53692014-10-16 Andrew MacLeod <amacleod@redhat.com>
5370
5371 * c-decl.c: Adjust include files.
5372
78a7c317
DD
53732014-10-14 DJ Delorie <dj@redhat.com>
5374
5375 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5376 (c_token_starts_typename): Check all __intN, not just __int128.
5377 (c_token_starts_declspecs): Likewise.
5378 (c_parser_declspecs): Likewise.
5379 (c_parser_attribute_any_word): Likewise.
5380 (c_parser_objc_selector): Likewise.
5381 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5382 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5383 is specified.
5384 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5385 __int128.
5386 (finish_declspecs): Likewise.
5387
74d98c1e
AB
53882014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5389
8e745a17 5390 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5391 the duplicate code.
8e745a17 5392 (c_parser_statement): Call the new function.
74d98c1e 5393
84937de2
MP
53942014-10-09 Marek Polacek <polacek@redhat.com>
5395
5396 PR c/63480
5397 * c-typeck.c (pop_init_level): Don't warn about initializing
5398 with { }.
5399
0382aaa0
MP
54002014-10-07 Marek Polacek <polacek@redhat.com>
5401
5402 PR c/59717
5403 * c-decl.c (header_for_builtin_fn): New function.
5404 (implicitly_declare): Suggest which header to include.
5405
7a0ca710
MP
54062014-10-07 Marek Polacek <polacek@redhat.com>
5407
5408 * c-convert.c (convert): Use error_operand_p.
5409 * c-typeck.c (require_complete_type): Likewise.
5410 (really_atomic_lvalue): Likewise.
5411 (digest_init): Likewise.
5412 (handle_omp_array_sections_1): Likewise.
5413
6bc8a126
MP
54142014-10-03 Marek Polacek <polacek@redhat.com>
5415
5416 PR c/63453
5417 * c-decl.c (pop_scope): Don't warn about "inline function declared
5418 but never defined" for functions marked with gnu_inline attribute.
5419
d90c0a59
JJ
54202014-09-25 Jakub Jelinek <jakub@redhat.com>
5421
5422 PR c++/63249
5423 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5424 on low_bound and length.
5425
083e891e
MP
54262014-09-24 Marek Polacek <polacek@redhat.com>
5427
5428 PR c/61405
5429 PR c/53874
5430 * c-parser.c: Don't define CPP_KEYWORD.
5431 (c_parser_switch_statement): Pass original type to c_finish_case.
5432 * c-tree.h (c_finish_case): Update declaration.
5433 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5434 conditionally to c_do_switch_warnings.
5435
8d95fe25
MP
54362014-09-03 Marek Polacek <polacek@redhat.com>
5437
5438 PR c/62024
5439 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5440 conversions.
5441
9a771876
JJ
54422014-09-02 Jakub Jelinek <jakub@redhat.com>
5443 Balaji V. Iyer <balaji.v.iyer@intel.com>
5444 Igor Zamyatin <igor.zamyatin@intel.com>
5445
5446 * c-parser.c (c_parser_cilk_for): New function.
5447 (c_parser_cilk_grainsize): Likewise.
5448 (c_get_temp_regvar): Likewise.
5449 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5450 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5451 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5452 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5453 case.
5454
b7679d96
CG
54552014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5456
5457 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5458 with using HOST_WIDE_INT without truncation to 'int'
5459
59ea0364
MP
54602014-08-22 Marek Polacek <polacek@redhat.com>
5461
5462 PR c++/62199
5463 * c-typeck.c (parser_build_binary_op): Adjust call to
5464 warn_logical_not_parentheses.
5465
671a475e
IZ
54662014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5467
5468 PR other/62008
5469 * c-parser.c (c_parser_array_notation): Check for correct
5470 type of an array added.
5471
04159acf
MP
54722014-08-19 Marek Polacek <polacek@redhat.com>
5473
5474 PR c++/62153
5475 * c-typeck.c (build_binary_op): If either operand of a comparison
5476 is a boolean expression, call maybe_warn_bool_compare.
5477
c77935ee
PP
54782014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5479
5480 PR c/45584
5481 * c-typeck.c (build_c_cast): Do a conversion even when the
5482 TYPE_MAIN_VARIANTs are the same.
5483
35aff4fb
MP
54842014-08-19 Marek Polacek <polacek@redhat.com>
5485
5486 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5487 pedwarn_c99 instead of pedwarn.
5488 (grokfield): Likewise.
5489 (warn_defaults_to): New function.
5490 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5491 Unconditionally call pedwarn_c99 instead of pedwarn.
5492 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5493 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5494 check flag_isoc11 before.
5495 * c-errors.c (pedwarn_c99): Change the return type to bool.
5496 Handle -Wc99-c11-compat.
5497 * c-parser.c (disable_extension_diagnostics): Handle
5498 warn_c99_c11_compat.
5499 (restore_extension_diagnostics): Likewise.
5500 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5501 instead of pedwarn, don't check flag_isoc11 before.
5502 (c_parser_declspecs): Likewise.
5503 (c_parser_alignas_specifier): Likewise.
5504 (c_parser_alignof_expression): Likewise.
5505 (c_parser_generic_selection): Likewise.
5506 * c-tree.h (pedwarn_c99): Update declaration.
5507 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5508 of pedwarn_c99.
5509
177cce46
MP
55102014-08-19 Marek Polacek <polacek@redhat.com>
5511
5512 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5513 to pedwarn_c90.
5514 * c-errors.c: Include "opts.h".
5515 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5516 * c-parser.c (disable_extension_diagnostics): Handle negative value
5517 of warn_c90_c99_compat, too.
5518 (restore_extension_diagnostics): Likewise.
5519 (c_parser_compound_statement_nostart): Pass
5520 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5521
6dc99c33
MP
55222014-08-12 Marek Polacek <polacek@redhat.com>
5523
5524 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5525 Add pedwarn.
5526 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5527 Likewise.
5528 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5529
3f8257db 55302014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5531
5532 PR c/51849
5533 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5534 Call pedwarn_c90 instead of pedwarn.
5535 (check_bitfield_type_and_width): Likewise.
5536 (declspecs_add_qual): Likewise.
5537 (declspecs_add_type): Likewise.
5538 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5539 Adjust to only call pedwarn_c90.
5540 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5541 pedwarn_c90 instead of pedwarn.
5542 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5543 * c-parser.c (disable_extension_diagnostics): Handle
5544 warn_c90_c99_compat.
5545 (restore_extension_diagnostics): Likewise.
5546 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5547 pedwarn_c90 instead of pedwarn.
5548 (c_parser_initelt): Likewise.
5549 (c_parser_postfix_expression): Likewise.
5550 (c_parser_postfix_expression_after_paren_type): Likewise.
5551 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5552 * c-tree.h: Fix formatting.
5553 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5554 pedwarn_c90 instead of pedwarn.
5555
9f25a338
TS
55562014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5557
5558 * c-typeck.c: Remove include of pointer-set.h.
5559
044331a8
MP
55602014-08-07 Marek Polacek <polacek@redhat.com>
5561
5562 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5563
b787e7a2
TS
55642014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5565
5566 * c-typeck.c: Use hash_map instead of pointer_map.
5567
6e2830c3
TS
55682014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5569
5570 * c-decl.c: Use hash_set instead of pointer_set.
5571
a7ee52fb
IZ
55722014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5573
5574 PR middle-end/61455
5575 * c-array-notation.c (expand_array_notations): Handling
5576 of DECL_EXPR added.
5577
b4dfdc11
MG
55782014-07-31 Marc Glisse <marc.glisse@inria.fr>
5579
5580 PR c++/60517
5581 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5582 a local variable.
5583
976d5a22
TT
55842014-07-30 Tom Tromey <tromey@redhat.com>
5585
5586 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5587 field.
5588 (really_start_incremental_init, push_init_level): Initialize
5589 designator_depth.
5590 (pop_init_level): Set global designator_depth.
5591 (process_init_element): Check for designated_init attribute.
5592
30281de2
MP
55932014-07-20 Marek Polacek <polacek@redhat.com>
5594
5595 PR c/61852
5596 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5597 (implicitly_declare): Pass location to implicit_decl_warning.
5598
b108f48f
JJ
55992014-07-14 Jakub Jelinek <jakub@redhat.com>
5600
5601 PR middle-end/61294
5602 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5603 If non-NULL, call c_parser_check_literal_zero.
5604 (c_parser_check_literal_zero): New function.
5605 (c_parser_postfix_expression_after_primary): Adjust
5606 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5607
773ec47f
MP
56082014-07-06 Marek Polacek <polacek@redhat.com>
5609
5610 PR c/6940
5611 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5612 * c-tree.h (C_ARRAY_PARAMETER): Define.
5613 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5614 function parameter.
5615
22e1cf1c 56162014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5617 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5618
5619 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5620 releasing symbol.
5621
52ec0ea3
MP
56222014-07-01 Marek Polacek <polacek@redhat.com>
5623
5624 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5625 instead of 0 to WARN_FOR_ASSIGNMENT.
5626
d5c3d343
MP
56272014-07-01 Marek Polacek <polacek@redhat.com>
5628
5629 PR c/58286
5630 * c-typeck.c (convert_for_assignment): Pass
5631 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5632
6a7253a4
MP
56332014-06-30 Marek Polacek <polacek@redhat.com>
5634
5635 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5636 has no_sanitize_undefined attribute.
5637
5e88a8f4
IZ
56382014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5639
5640 PR middle-end/57541
5641 * c-array-notation.c (fix_builtin_array_notation_fn):
5642 Check for 0 arguments in builtin call. Check that bultin argument is
5643 correct.
5644 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5645 index.
5646
9698b078
SH
56472014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5648
5649 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5650 qualifiers in __auto_type for atomic types.
5651 (c_parser_typeof_specifier): Discard all type qualifiers in
5652 __typeof__ for atomic types.
5653
6e07c515
MP
56542014-06-25 Marek Polacek <polacek@redhat.com>
5655
5656 PR c/61162
5657 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5658 the return expression to c_finish_return.
5659
da6f124d
JJ
56602014-06-25 Jakub Jelinek <jakub@redhat.com>
5661
5662 * c-typeck.c (c_finish_omp_clauses): Make sure
5663 OMP_CLAUSE_LINEAR_STEP has correct type.
5664
c203e8a7
TS
56652014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5666
5667 * c-decl.c: Adjust.
5668
56ad0e38
JJ
56692014-06-24 Jakub Jelinek <jakub@redhat.com>
5670
5671 * c-parser.c (c_parser_omp_for_loop): For
5672 #pragma omp parallel for simd move lastprivate clause from parallel
5673 to for rather than simd.
5674
47c2554f
MP
56752014-06-23 Marek Polacek <polacek@redhat.com>
5676
5677 * c-typeck.c (parser_build_binary_op): Don't call
5678 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5679
56363ffd
JH
56802014-06-15 Jan Hubicka <hubicka@ucw.cz>
5681
5682 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5683 * c-decl.c (merge_decls): Likewise.
5684
d7ff7ae5
MP
56852014-06-09 Marek Polacek <polacek@redhat.com>
5686
5687 PR c/36446
5688 * c-typeck.c (error_init): Call inform instead of error_at.
5689 (pedwarn_init): Call inform instead of pedwarn.
5690 (warning_init): Call inform instead of warning_at.
5691
24d047a3
JH
56922014-06-07 Jan Hubicka <hubicka@ucw.cz>
5693
5694 * c-decl.c (merge_decls): Use set_decl_section_name.
5695 (duplicate_decls): Remove node if it exists.
5696
9bac5cbb
G
56972014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5698
5699 PR c/53119
5700 * c-typeck.c (push_init_level, process_init_element,
5701 pop_init_level): Correct check for zero initialization, move
5702 missing brace warning to respect zero initialization.
5703
8ffcdea8
MP
57042014-06-05 Marek Polacek <polacek@redhat.com>
5705
5706 PR c/56724
5707 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5708
742938c9
MP
57092014-06-05 Marek Polacek <polacek@redhat.com>
5710
5711 PR c/49706
5712 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5713 on the left hand side operand of a comparison.
742938c9 5714
6447c55d
MP
57152014-06-05 Marek Polacek <polacek@redhat.com>
5716
5717 PR c/48062
5718 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5719 Print note only if the warning was printed.
5720
9dc7743c
IZ
57212014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5722
5723 PR c/58942
5724 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5725 with a pointer.
5726
fedfecef
MP
57272014-06-03 Marek Polacek <polacek@redhat.com>
5728
5729 PR c/60439
5730 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5731 c_start_case.
5732 * c-tree.h (c_start_case): Update.
5733 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5734 switch condition has boolean value.
5735
9b2b7279
AM
57362014-06-02 Andrew MacLeod <amacleod@redhat.com>
5737
5738 * c-decl.c: Include builtins.h.
5739 * c-parser.c: Likewise.
5740
5c1bc275
MP
57412014-05-27 Marek Polacek <polacek@redhat.com>
5742
5743 PR c/56724
5744 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5745 error and warning calls to error_at and warning_at. Pass location of
5746 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5747 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5748 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5749
97563bc8
IZ
57502014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5751
5752 PR c/61191
5753 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5754 function parameters.
5755
aede2c10
JH
57562014-05-23 Jan Hubicka <hubicka@ucw.cz>
5757
5758 * c-decl.c (merge_decls): Preserve symtab node pointers.
5759 (duplicate_decls): Free new decl.
5760
edbba2ce
TS
57612014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5762
f3316c6d
TS
5763 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5764 initialization.
5765
edbba2ce
TS
5766 * c-parser.c (c_parser_omp_target): Return bool values.
5767
68c81f24
TS
57682014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5769
5770 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5771 num_teams_loc variable to num_thread_limit_loc.
5772
632f2871
RS
57732014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5774
5775 * c-array-notation.c (expand_array_notations): Use void_node
5776 instead of void_zero_node.
5777
766090c2
TS
57782014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5779
5780 * c-decl.c (finish_struct): Adjust.
5781 (finish_enum): Likewise.
5782 (bind): Adjust.
5783 (record_inline_static): Likewise.
5784 (push_scope): Likewise.
5785 (make_label): Likewise.
5786 (lookup_label_for_goto): Likewise.
5787 (finish_struct): Likewise.
5788 (finish_enum): Likewise.
5789 (store_parm_decls): Likewise.
5790 (c_push_function_context): Likewise.
5791 * c-lang.h: Remove usage of variable_size gty attribute.
5792 * c-parser.c (c_parse_init): Adjust.
5793 (c_parse_file): Likewise.
5794
2b107f6b
MP
57952014-05-13 Marek Polacek <polacek@redhat.com>
5796
5797 PR c/61162
5798 * c-typeck.c (convert_for_assignment): Pass location to
5799 WARN_FOR_ASSIGNMENT instead of input_location.
5800
d033409e
MP
58012014-05-10 Marek Polacek <polacek@redhat.com>
5802
5803 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5804 maybe_warn_string_init.
5805 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5806 maybe_warn_string_init.
5807 * c-tree.h (maybe_warn_string_init): Update declaration.
5808 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5809 Call pedwarn_init with loc instead of with input_location.
5810 (digest_init): Pass init_loc to maybe_warn_string_init.
5811 (pop_init_level): Call pedwarn_init with loc instead of with
5812 input_location.
5813 (set_init_index): Likewise.
5814 (process_init_element): Likewise.
5815
ea58ef42
MP
58162014-05-09 Marek Polacek <polacek@redhat.com>
5817
5818 PR c/61096
5819 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5820 (c_parser_initelt): Pass location to set_init_label. Pass array index
5821 location to set_init_index.
5822 * c-tree.h (push_init_level): Update declaration.
5823 (pop_init_level): Likewise.
5824 (set_init_index): Likewise.
5825 (set_init_label): Likewise.
5826 * c-typeck.c (error_init): Add location parameter. Call error_at
5827 instead of error.
5828 (digest_init): Pass init_loc to error_init.
5829 (really_start_incremental_init):
5830 (push_init_level): Add location parameter. Pass loc to pop_init_level
5831 and error_init.
5832 (pop_init_level): Likewise.
5833 (set_designator): Add location parameter. Pass loc to pop_init_level,
5834 push_init_level, and error_init.
5835 (set_init_index): Add location parameter. Pass loc to error_init and
5836 set_designator.
5837 (set_init_label): Likewise.
5838 (output_init_element): Pass loc to error_init.
5839 (process_init_element): Pass loc to error_init, pop_init_level,
5840 pedwarn_init, and push_init_level.
5841
661a0813
MP
58422014-05-09 Marek Polacek <polacek@redhat.com>
5843
5844 PR c/50459
5845 * c-parser.c (c_parser_attributes): Parse the arguments as an
5846 expression-list if the attribute takes identifier.
5847
2793eeab
MP
58482014-05-08 Marek Polacek <polacek@redhat.com>
5849
5850 PR c/61053
5851 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5852 TYPE_ALIGN_UNIT.
5853
f827930a
MP
58542014-05-08 Marek Polacek <polacek@redhat.com>
5855
5856 PR c/61077
5857 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5858 of main.
5859
1d60af08
KZ
58602014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5861 Mike Stump <mikestump@comcast.net>
5862 Richard Sandiford <rdsandiford@googlemail.com>
5863
5864 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5865 (finish_enum): Use wide-int interfaces.
5866 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5867 * c-typeck.c (build_c_cast): Likewise.
5868 (set_nonincremental_init_from_string): Likewise.
5869 (c_tree_equal): Likewise.
5870
a0e24419
MP
58712014-05-02 Marek Polacek <polacek@redhat.com>
5872
5873 PR c/25801
5874 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5875 Return size_one_node when the type is not complete.
5876 (pointer_diff): Remove comment.
5877 (build_unary_op): Improve error messages.
5878
19fc9faa
MP
58792014-05-02 Marek Polacek <polacek@redhat.com>
5880
5881 * c-typeck.c (c_finish_return): Separate warning_at calls.
5882
63bc4e87
MP
58832014-05-02 Marek Polacek <polacek@redhat.com>
5884
5885 * c-tree.h (error_init): Remove declaration.
5886 (pedwarn_init): Likewise.
5887 * c-typeck.c (error_init): Make static and move above.
5888 (pedwarn_init): Likewise.
5889 (warning_init): Move above.
5890 (maybe_warn_string_init): Likewise.
5891
4bd2511b
JL
58922014-05-01 Jeff Law <law@redhat.com>
5893
5894 Revert:
5895
5896 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5897 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5898 avoid goto.
5899
6a358dcb
MP
59002014-05-02 Marek Polacek <polacek@redhat.com>
5901
5902 PR c/60784
5903 * c-typeck.c (push_init_level): Set constructor_designated to
5904 p->designated for structures.
5905
ae5ebda4
MP
59062014-05-01 Marek Polacek <polacek@redhat.com>
5907
5908 PR c/60915
5909 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5910 function-definition has an attribute after the declarator.
5911
96b40f8d
MP
59122014-05-01 Marek Polacek <polacek@redhat.com>
5913
5914 PR c/60257
5915 * c-typeck.c (warning_init): Add location_t parameter. Call
5916 warning_at instead of warning.
5917 (push_init_level): Pass input_location to warning_init.
5918 (add_pending_init): Add location_t parameter. Pass loc to
5919 warning_init.
5920 (set_nonincremental_init): Pass input_location to add_pending_init.
5921 (set_nonincremental_init_from_string): Likewise.
5922 (output_init_element): Pass loc to warning_init and to
5923 add_pending_init.
5924
32e00768
MP
59252014-05-01 Marek Polacek <polacek@redhat.com>
5926
5927 PR c/43395
5928 * c-typeck.c (c_finish_return): Distinguish between label and variable
5929 when warning about returning local address.
5930
c9379ce2
MP
59312014-05-01 Marek Polacek <polacek@redhat.com>
5932
5933 PR c/29467
5934 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5935 in C89 mode.
5936
d00887e8
MP
59372014-05-01 Marek Polacek <polacek@redhat.com>
5938
5939 PR c/43245
5940 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5941 instead of 0 to WARN_FOR_QUALIFIERS.
5942
5436fa2e
MP
59432014-05-01 Marek Polacek <polacek@redhat.com>
5944
5945 PR c/56989
5946 * c-typeck.c (default_conversion): Use better location for
5947 error call.
5948
f8ed5150
MP
59492014-04-30 Marek Polacek <polacek@redhat.com>
5950
5951 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5952 also when SANITIZE_FLOAT_DIVIDE is on.
5953
8337d1db
MP
59542014-04-30 Marek Polacek <polacek@redhat.com>
5955
5956 PR c/60139
5957 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5958 and pedwarn_init. Use loc insted of input_location.
5959
c4bdc42f
MP
59602014-04-30 Marek Polacek <polacek@redhat.com>
5961
5962 PR c/60351
5963 * c-typeck.c (build_binary_op): Use location when warning about
5964 shift count.
5965
45484dcf
MP
59662014-04-25 Marek Polacek <polacek@redhat.com>
5967
5968 PR c/18079
5969 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5970 always_inline/noinline and hot/cold attributes.
5971
34cf811f
MP
59722014-04-25 Marek Polacek <polacek@redhat.com>
5973
5974 PR c/60114
5975 * c-parser.c (c_parser_initelt): Pass input_location to
5976 process_init_element.
5977 (c_parser_initval): Pass loc to process_init_element.
5978 * c-tree.h (process_init_element): Adjust declaration.
5979 * c-typeck.c (push_init_level): Pass input_location to
5980 process_init_element.
5981 (pop_init_level): Likewise.
5982 (set_designator): Likewise.
5983 (output_init_element): Add location_t parameter. Pass loc to
5984 digest_init.
5985 (output_pending_init_elements): Pass input_location to
5986 output_init_element.
5987 (process_init_element): Add location_t parameter. Pass loc to
5988 output_init_element.
5989
42056eac
JJ
59902014-04-24 Jakub Jelinek <jakub@redhat.com>
5991
5992 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5993 atomic-clause, allow comma in between atomic-clause and
5994 seq_cst.
5995
e162a134
JJ
59962014-04-22 Jakub Jelinek <jakub@redhat.com>
5997
5998 PR c/59073
5999 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6000 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6001
2f6babac
IZ
60022014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6003
6004 PR middle-end/60469
6005 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6006 create_tmp_var instead build_decl for creating temps.
6007 (build_array_notation_expr): Likewise.
6008 (fix_conditional_array_notations_1): Likewise.
6009 (fix_array_notation_expr): Likewise.
6010 (fix_array_notation_call_expr): Likewise.
6011
8edbfaa6
JJ
60122014-03-28 Jakub Jelinek <jakub@redhat.com>
6013
6014 PR c++/60689
6015 * c-tree.h (c_build_function_call_vec): New prototype.
6016 * c-typeck.c (build_function_call_vec): Don't call
6017 resolve_overloaded_builtin here.
6018 (c_build_function_call_vec): New wrapper function around
6019 build_function_call_vec. Call resolve_overloaded_builtin here.
6020 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6021 Call c_build_function_call_vec instead of build_function_call_vec.
6022 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6023 * c-decl.c (finish_decl): Likewise.
6024
7485aeea
MLI
60252014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6026
6027 PR c/55383
6028 * c-typeck.c: Use correct format string in cast-qual warning
6029
b17a8b07
TS
60302014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6031
6032 * c-decl.c (c_decl_attributes): Use
6033 lang_hooks.types.omp_mappable_type.
6034 * c-typeck.c (c_finish_omp_clauses): Likewise.
6035
3af9c5e9
MP
60362014-03-06 Marek Polacek <polacek@redhat.com>
6037
6038 PR c/60197
6039 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6040 of checking tree code.
6041
1c9f5f33
PK
60422014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6043
6044 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6045 (c_parser_parameter_declaration): Likewise.
6046
cc28fc7f
MP
60472014-02-19 Marek Polacek <polacek@redhat.com>
6048
6049 PR c/60195
6050 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6051 Call mark_exp_read on exp.value.
6052 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6053 TREE_ADDRESSABLE on old instead of val.
6054 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6055
b581c05c
PK
60562014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6057
6058 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6059 C_EXPR_APPEND by vec_safe_push.
6060 * c-tree.h (C_EXPR_APPEND): Remove.
6061
81e5eca8
MP
60622014-01-31 Marek Polacek <polacek@redhat.com>
6063
6064 PR c/59963
6065 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6066 build_function_call_vec.
6067 (build_function_call): Likewise.
6068 (build_atomic_assign): Likewise.
6069 (build_function_call_vec): Add arg_loc parameter. Use it.
6070 (convert_arguments): Likewise.
6071 (convert_for_assignment): Rename rhs_loc to expr_loc.
6072 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6073 (c_parser_objc_keywordexpr): Likewise.
6074 (c_parser_postfix_expression_after_primary): Call
6075 build_function_call_vec with expr_loc rather than op_loc.
6076 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6077 build_function_call_vec.
6078 (c_parser_expr_list): Add locations parameter. Fill it with locations
6079 of function arguments.
6080 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6081
68fca595
MP
60822014-01-30 Marek Polacek <polacek@redhat.com>
6083
6084 PR c/59940
6085 * c-typeck.c (build_function_call_vec): Use loc parameter.
6086 (convert_arguments): Add location parameter. Use it.
6087 (ep_convert_and_check): Likewise.
6088 (build_atomic_assign): Adjust convert_for_assignment call.
6089 (build_modify_expr): Likewise.
6090 (digest_init): Likewise.
6091 (c_finish_return): Likewise.
6092 (build_conditional_expr): Adjust ep_convert_and_check calls.
6093 (convert_for_assignment): Add rhs_loc parameter. Use it.
6094 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6095 calls.
6096
fa337f3a
RB
60972014-01-30 Richard Biener <rguenther@suse.de>
6098
6099 PR c/59905
6100 * c-typeck.c (build_function_call_vec): Do not replace calls
6101 to a function via an incompatible type with a runtime abort.
6102
b72271b9
BI
61032014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6104
6105 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6106 flag_enable_cilkplus with flag_cilkplus.
6107 (c_parser_direct_declarator_inner): Likewise.
6108 (c_parser_attribute_any_word): Likewise.
6109 (c_parser_attributes): Likewise.
6110 (c_parser_compound_statement): Likewise.
6111 (c_parser_statement_after_labels): Likewise.
6112 (c_parser_if_statement): Likewise.
6113 (c_parser_switch_statement): Likewise.
6114 (c_parser_do_statement): Likewise.
6115 (c_parser_for_statement): Likewise.
6116 (c_parser_unary_expression): Likewise.
6117 (c_parser_postfix_expression): Likewise.
6118 (c_parser_postfix_expression_after_primary): Likewise.
6119 (c_parser_postfix_expression_after_primary): Likewise.
6120 (c_parser_omp_clause_name): Likewise.
6121 (c_finish_omp_declare_simd): Likewise.
6122 (c_parser_cilk_verify_simd): Likewise.
6123 * c-typeck.c (build_array_ref): Likewise.
6124 (build_function_call_vec): Likewise.
6125 (convert_arguments): Likewise.
6126 (build_compound_expr): Likewise.
6127 (c_finish_return): Likewise.
6128 (c_finish_if_stmt): Likewise.
6129 (c_finish_loop): Likewise.
6130 (build_binary_op): Likewise.
6131
393e8e8b
MP
61322014-01-23 Marek Polacek <polacek@redhat.com>
6133
6134 PR c/59846
6135 * c-typeck.c (parser_build_binary_op): Use location instead of
6136 input_location.
6137 (build_binary_op): Pass location to shorten_compare.
6138
f04dda30
MP
61392014-01-23 Marek Polacek <polacek@redhat.com>
6140
6141 PR c/58346
6142 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6143 an empty aggregate.
6144
789eadcd
MP
61452014-01-23 Marek Polacek <polacek@redhat.com>
6146
6147 PR c/59871
6148 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6149 of a comma expression.
6150 (emit_side_effect_warnings): Likewise.
6151
40f14e9f
BI
61522014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6153
6154 PR c/59825
6155 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6156 function to use walk_tree and moved a lot of its functionality to
6157 expand_array_notations.
6158 (expand_array_notations): New function.
6159
74558dd9
BI
61602014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6161
6162 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6163 attribute an attribute without value.
6164
652fea39
JJ
61652014-01-23 Jakub Jelinek <jakub@redhat.com>
6166
6167 PR middle-end/58809
6168 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6169 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6170
f34f1c87
MP
61712014-01-22 Marek Polacek <polacek@redhat.com>
6172
6173 PR c/59891
6174 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6175 of remove_c_maybe_const_expr on op1 and op2.
6176
241f845a
JJ
61772014-01-15 Jakub Jelinek <jakub@redhat.com>
6178
6179 PR c/58943
6180 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6181 effects, preevaluate rhs using SAVE_EXPR first.
6182
9a74f20c
BI
61832014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6184
6185 PR c++/59631
6186 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6187 statements with if-elseif statements.
6188
96066ce1
MP
61892014-01-06 Marek Polacek <polacek@redhat.com>
6190
6191 PR c/57773
6192 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6193 defined bit-field types only in ISO C.
6194
23a5b65a
RS
61952014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6196
6197 Update copyright years
6198
f9030485
RS
61992014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6200
6201 * c-array-notation.c: Use the standard form for the copyright notice.
6202
41958c28
BI
62032013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6204
6205 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6206 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6207 field in parser is not empty. If not-empty, call the function
6208 c_parser_finish_omp_declare_simd.
6209 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6210 between SIMD-enabled functions and #pragma simd. Added new parameter.
6211 (c_parser_cilk_all_clauses): Modified the usage of the function
6212 c_parser_cilk_clause_vectorlength as mentioned above.
6213 (c_parser_cilk_simd_fn_vector_attrs): New function.
6214 (c_finish_cilk_simd_fn_tokens): Likewise.
6215 (is_cilkplus_vector_p): Likewise.
6216 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6217 "nomask," and "mask" strings in clause name.
6218 (c_parser_omp_all_clauses): Added 3 new case statements:
6219 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6220 PRAGMA_CILK_CLAUSE_NOMASK.
6221 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6222 check for vector attribute and if so call the function
6223 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6224 called the function c_finish_cilk_simd_fn_tokens.
6225 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6226 parser field is non-empty. If so, parse them as you would parse
6227 the omp declare simd pragma.
6228 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6229 Added a check when step is a parameter and flag it as error.
6230 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6231 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6232 pragma_omp_clause.
6233
cef0fd0e
TS
62342013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6235
6236 * c-parser.c (c_parser_omp_parallel): Fix description.
6237
12893402
BI
62382013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6239
6240 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6241 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6242 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6243 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6244
296674db
JM
62452013-12-04 Joseph Myers <joseph@codesourcery.com>
6246
6247 PR c/52023
6248 * c-parser.c (c_parser_alignas_specifier): Use
6249 c_sizeof_or_alignof_type instead of c_alignof.
6250 (c_parser_alignof_expression): Likewise, with min_alignof
6251 parameter depending on alignof spelling used.
6252
edd28054
MP
62532013-12-04 Marek Polacek <polacek@redhat.com>
6254
6255 PR c/54113
6256 * c-decl.c (start_function): Don't warn for missing prototype for
6257 inline functions.
6258
da0fc454
MP
62592013-12-03 Marek Polacek <polacek@redhat.com>
6260
6261 PR c/59351
6262 * c-decl.c (build_compound_literal): Allow compound literals with
6263 empty initial value.
6264
4c2ecab0
JM
62652013-12-02 Joseph Myers <joseph@codesourcery.com>
6266
6267 PR c/58235
6268 * c-typeck.c (build_modify_expr): Diagnose assignment to
6269 expression with array type.
6270
340baef7
JM
62712013-11-29 Joseph Myers <joseph@codesourcery.com>
6272
6273 PR c/42262
6274 * c-typeck.c (process_init_element): Do not treat a string as
6275 initializing a whole array when used with a designator for an
6276 individual element.
6277
6763b9f7
JM
62782013-11-29 Joseph Myers <joseph@codesourcery.com>
6279
6280 PR c/57574
6281 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6282 an inline function following a static declaration.
6283
e7bd1de1
JJ
62842013-11-28 Jakub Jelinek <jakub@redhat.com>
6285
6286 PR c/59310
6287 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6288 to p_name before calling c_parser_omp_teams instead of after.
6289 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6290 argument. Remove unused p_name variable.
6291
0136f8f0
AH
62922013-11-27 Aldy Hernandez <aldyh@redhat.com>
6293 Jakub Jelinek <jakub@redhat.com>
6294
6295 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6296 external_scope is NULL.
6297
241b71bb
TV
62982013-11-27 Tom de Vries <tom@codesourcery.com>
6299 Marc Glisse <marc.glisse@inria.fr>
6300
6301 PR c++/59032
6302 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6303
2fb9a547
AM
63042013-11-22 Andrew MacLeod <amacleod@redhat.com>
6305
6306 * c-typeck.c: Add required include files from gimple.h.
6307
8400e75e
DM
63082013-11-22 David Malcolm <dmalcolm@redhat.com>
6309
6310 * c-decl.c (define_label, shadow_tag_warned)
6311 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6312 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6313 (declspecs_add_type): Remove use of in_system_header macro.
6314 * c-parser.c (c_parser_unary_expression): Likewise.
6315 * c-typeck.c (store_init_value, process_init_element)
6316 (c_start_case): Likewise.
6317
6318 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6319 macro.
6320
6321 * c-parser.c (c_parser_set_source_position_from_token): Remove
6322 reference to in_system_header from comment.
6323
386b1f1f
RS
63242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6325
6326 * c-decl.c (grokdeclarator): Update comment to refer to
6327 tree_to_[su]hwi rather than tree_low_cst.
6328
ae7e9ddd
RS
63292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6330
6331 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6332 tree_to_uhwi throughout.
6333
9439e9a1
RS
63342013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6335
6336 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6337 throughout.
6338
9541ffee
RS
63392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6340
6341 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6342 throughout.
6343
c02065fc
AH
63442013-11-15 Aldy Hernandez <aldyh@redhat.com>
6345
6346 * c-parser.c (c_parser_cilk_simd): New.
6347 (c_parser_cilk_verify_simd): New.
6348 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6349 (c_parser_omp_for_loop): Add case for NE_EXPR.
6350 Set c_break_label for CILK_SIMD.
6351 (c_parser_cilk_clause_vectorlength): New.
6352 (c_parser_cilk_clause_linear): New.
6353 (c_parser_cilk_clause_name): New.
6354 (c_parser_cilk_all_clauses): New.
6355 * c-typeck.c (build_unary_op): Pass location argument to
6356 readonly_error.
6357 (build_modify_expr): Same.
6358 (build_asm_expr): Same.
6359 (c_finish_bc_stmt): Error on break/continue in loops.
6360
18f429e2
AM
63612013-11-14 Andrew MacLeod <amacleod@redhat.com>
6362
6363 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6364
d8a2d370
DN
63652013-11-14 Diego Novillo <dnovillo@google.com>
6366
6367 * c-decl.c: Include print-tree.h.
6368 Include stor-layout.h.
6369 Include varasm.h.
6370 Include attribs.h.
6371 Include stringpool.h.
6372 * c-lang.c: Include fold-const.h.
6373 * c-parser.c: Include stringpool.h.
6374 Include attribs.h.
6375 Include stor-layout.h.
6376 Include varasm.h.
6377 Include trans-mem.h.
6378 * c-typeck.c: Include stor-layout.h.
6379 Include trans-mem.h.
6380 Include varasm.h.
6381 Include stmt.h.
6382
38b7bc7f
JM
63832013-11-13 Joseph Myers <joseph@codesourcery.com>
6384
6385 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6386 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6387 __auto_type.
6388 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6389 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6390 RID_AUTO_TYPE.
6391 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6392 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6393 (c_parser_declarator, c_parser_direct_declarator_inner)
6394 (c_parser_parameter_declaration, c_parser_type_name): All callers
6395 changed.
6396 (c_parser_declaration_or_fndef): Handle declarations with type
6397 determined from the initializer.
6398
45b0be94
AM
63992013-11-12 Andrew MacLeod <amacleod@redhat.com>
6400
18f429e2 6401 * c-typeck.c: Include gimplify.h.
45b0be94 6402
582d9b50
JM
64032013-11-12 Joseph Myers <joseph@codesourcery.com>
6404
6405 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6406 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6407 comment.
6408 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6409 or _Thread_local as appropriate in diagnostics.
6410 (build_null_declspecs): Initialize ret->thread_gnu_p.
6411 (declspecs_add_scspec): Handle either __thread or _Thread_local
6412 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6413 pedantic. Do not disallow _Thread_local extern and _Thread_local
6414 static.
6415
267bac10
JM
64162013-11-07 Joseph Myers <joseph@codesourcery.com>
6417 Andrew MacLeod <amacleod@redhat.com>
6418
6419 * c-aux-info.c (gen_type): Handle atomic qualifier.
6420 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6421 qualifiers when compating types.
6422 (shadow_tag_warned): Handle atomic_p in declspecs.
6423 (quals_from_declspecs): Likewise.
6424 (start_decl): Use c_type_promotes_to when promoting argument
6425 types.
6426 (grokdeclarator): Handle _Atomic.
6427 (get_parm_info): Diagnose any qualifier on "void" as only
6428 parameter.
6429 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6430 comparing types. Use c_type_promotes_to when promoting argument
6431 types.
6432 (finish_function): Use c_type_promotes_to when promoting argument
6433 types.
6434 (build_null_declspecs): Handle atomic_p in declspecs.
6435 (declspecs_add_qual): Handle RID_ATOMIC.
6436 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6437 (c_token_starts_declspecs): Handle RID_ATOMIC.
6438 (c_parser_declspecs): Handle atomic type specifiers and
6439 qualifiers.
6440 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6441 from types of expressions with atomic type.
6442 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6443 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6444 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6445 (c_parser_statement_after_labels, c_parser_switch_statement)
6446 (c_parser_for_statement, c_parser_expr_no_commas)
6447 (c_parser_conditional_expression, c_parser_binary_expression)
6448 (c_parser_cast_expression, c_parser_unary_expression)
6449 (c_parser_postfix_expression)
6450 (c_parser_postfix_expression_after_primary, c_parser_expression):
6451 Use convert_lvalue_to_rvalue.
6452 (c_parser_expression_conv, c_parser_expr_list): Document
6453 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6454 (c_parser_objc_synchronized_statement): Use
6455 convert_lvalue_to_rvalue.
6456 (c_parser_objc_selector): Handle RID_ATOMIC.
6457 (c_parser_objc_receiver, c_parser_array_notation): Use
6458 convert_lvalue_to_rvalue.
6459 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6460 _Atomic (type-name).
6461 (struct c_declspecs): Add atomic_p field.
6462 (convert_lvalue_to_rvalue): Declare.
6463 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6464 corresponding atomic types.
6465 (qualify_type): Don't add _Atomic qualifiers from second argument.
6466 (comp_target_types): Do not allow _Atomic mismatches.
6467 (type_lists_compatible_p): Do not remove atomic qualifiers when
6468 comparing types.
6469 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6470 (build_atomic_assign): New functions.
6471 (build_unary_op): Use build_atomic_assign for atomic increment and
6472 decrement.
6473 (build_conditional_expr): Do not treat _Atomic void as a qualified
6474 version of void.
6475 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6476 (find_anonymous_field_with_type, convert_to_anonymous_field)
6477 (convert_for_assignment): Do not remove atomic qualifiers when
6478 comparing types.
6479 (digest_init): Do not accept initialization of arrays of atomic
6480 elements by string constants.
6481 (build_asm_expr): Use convert_lvalue_to_rvalue.
6482 (build_binary_op): Do not treat _Atomic void as a qualified
6483 version of void.
6484
0c249d4b
DD
64852013-11-06 DJ Delorie <dj@redhat.com>
6486
6487 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6488 both explicit and builtin, print the location of the explicit one.
6489
6d7f7e0a
TB
64902013-11-05 Tobias Burnus <burnus@net-b.de>
6491
6492 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6493 c_parser_omp_distribute, c_parser_omp_teams,
6494 c_parser_omp_target, c_parser_omp_declare): Handle
6495 -fopenmp-simd.
6496
b906f4ca
MP
64972013-11-03 Marek Polacek <polacek@redhat.com>
6498
6499 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6500
ee1d5a02
JJ
65012013-11-01 Jakub Jelinek <jakub@redhat.com>
6502
6503 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6504 check_dup_generic at the end, unless remove is true.
6505 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6506 remove = true;.
6507 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6508
5a9785fb
JJ
65092013-10-31 Jakub Jelinek <jakub@redhat.com>
6510
6511 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6512 with decl that is not pointer nor array.
6513
939b37da
BI
65142013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6515
6516 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6517 a spawning function is found.
6518 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6519 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6520 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6521 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6522 case.
6523 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6524 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6525 expr.
6526 (c_finish_return): Added a check to reject _Cilk_spawn in return
6527 expression.
6528 (build_cilk_spawn): New function.
6529 (build_cilk_sync): Likewise.
6530 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6531
d4af74d4
TB
65322013-10-27 Tobias Burnus <burnus@net-b.de>
6533
6534 PR other/33426
6535 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6536 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6537 (c_parser_statement_after_labels): Update calls.
6538
d73749df 65392013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6540
6541 PR other/33426
6542 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6543 Handle PRAGMA_IVDEP.
6544 (c_parser_statement_after_labels): Update call.
6545
f28aa681
MP
65462013-10-24 Marek Polacek <polacek@redhat.com>
6547
6548 * c-parser.c (c_parser_struct_declaration): Add a comment.
6549 (c_parser_declarator): Don't allow _Alignas here.
6550
0645c1a2
AM
65512013-10-17 Andrew MacLeod <amacleod@redhat.com>
6552
6553 * c-parser.c: Include omp-low.h.
6554 * c-typeck.c: Likewise.
6555
568a31f2
MP
65562013-10-17 Marek Polacek <polacek@redhat.com>
6557
6558 PR c/58267
6559 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6560 Document syntax of the array-declarator.
6561 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6562 are not permitted.
6563 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6564 (c_parser_struct_declaration): Likewise.
6565 (c_parser_declarator): Likewise.
6566 (c_parser_direct_declarator_inner): Likewise.
6567 (c_parser_parameter_declaration): Likewise.
6568 (c_parser_type_name): Likewise.
6569
acf0174b
JJ
65702013-10-11 Jakub Jelinek <jakub@redhat.com>
6571
6572 * c-lang.h (current_omp_declare_target_attribute): New extern
6573 decl.
6574 * c-parser.c: Include c-lang.h.
6575 (struct c_parser): Change tokens to c_token *.
6576 Add tokens_buf field. Change tokens_avail type to unsigned int.
6577 (c_parser_consume_token): If parser->tokens isn't
6578 &parser->tokens_buf[0], increment parser->tokens.
6579 (c_parser_consume_pragma): Likewise.
6580 (enum pragma_context): Add pragma_struct and pragma_param.
6581 (c_parser_external_declaration): Adjust
6582 c_parser_declaration_or_fndef caller.
6583 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6584 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6585 Adjust recursive call.
6586 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6587 of pragma_external.
6588 (c_parser_parameter_declaration): Use pragma_param instead of
6589 pragma_external.
6590 (c_parser_compound_statement_nostart, c_parser_label,
6591 c_parser_for_statement): Adjust
6592 c_parser_declaration_or_fndef callers.
6593 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6594 it through to c_parser_conditional_expression.
6595 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6596 pass it through to c_parser_binary_expression. Adjust recursive
6597 call.
6598 (c_parser_binary_expression): Remove prec argument, add
6599 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6600 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6601 binop matches it, use build2 instead of parser_build_binary_op.
6602 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6603 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6604 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6605 Handle pragma_struct and pragma_param the same as pragma_external.
6606 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6607 (c_parser_omp_variable_list): Parse array sections for
6608 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6609 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6610 (c_parser_omp_clause_reduction): Handle user defined reductions.
6611 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6612 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6613 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6614 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6615 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6616 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6617 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6618 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6619 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6620 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6621 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6622 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6623 (c_parser_omp_for_loop): Add CODE argument, pass it through
6624 to c_finish_omp_for. Change last argument to cclauses,
6625 and adjust uses to grab parallel clauses from the array of all
6626 the split clauses. Adjust c_parser_binary_expression,
6627 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6628 (omp_split_clauses): New function.
6629 (c_parser_omp_simd): New function.
6630 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6631 Allow the function to be called also when parsing combined constructs,
6632 and call c_parser_omp_simd when parsing for simd.
6633 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6634 #pragma omp section, require exactly one structured-block instead of
6635 sequence of statements.
6636 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6637 Allow the function to be called also when parsing combined constructs.
6638 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6639 Allow the function to be called also when parsing combined
6640 constructs.
6641 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6642 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6643 c_parser_omp_teams, c_parser_omp_target_data,
6644 c_parser_omp_target_update, c_parser_omp_target,
6645 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6646 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6647 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6648 (c_parser_omp_construct): Add p_name and mask vars. Handle
6649 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6650 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6651 and c_parser_omp_sections callers.
6652 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6653 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6654 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6655 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6656 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6657 OMP_CLAUSE_DEPEND.
6658 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6659 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6660 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6661 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6662 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6663 * c-typeck.c: Include tree-inline.h.
6664 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6665 handle_omp_array_sections_1, handle_omp_array_sections,
6666 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6667 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6668 user defined reductions.
6669 (c_tree_equal): New function.
6670 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6671 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6672 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6673 c_check_omp_declare_reduction_r): New prototypes.
6674 * c-decl.c (current_omp_declare_target_attribute): New variable.
6675 (c_decl_attributes): New function.
6676 (start_decl, start_function): Use it instead of decl_attributes.
6677 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6678 c_omp_reduction_decl, c_omp_reduction_lookup,
6679 c_check_omp_declare_reduction_r): New functions.
6680
0a6c2227
TT
66812013-09-25 Tom Tromey <tromey@redhat.com>
6682
6683 * Make-lang.in (c/gccspec.o): Remove.
6684 (CFLAGS-c/gccspec.o): New variable.
6685 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6686 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6687 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6688
f3bc55f0
TT
66892013-09-25 Tom Tromey <tromey@redhat.com>
6690
6691 * Make-lang.in (c/gccspec.o): Don't use subshell.
6692
a24d975c
MP
66932013-09-18 Marek Polacek <polacek@redhat.com>
6694
6695 PR sanitize/58443
6696 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6697 Remove unnecessary check.
6698
ce6923c5
MP
66992013-09-18 Marek Polacek <polacek@redhat.com>
6700
6701 PR sanitizer/58411
6702 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6703 no_sanitize_undefined attribute.
6704
a1e51df9
KT
67052013-09-13 Kai Tietz <ktietz@redhat.com>
6706
6707 PR target/57848
6708 * c-decl.c (c_builtin_function_ext_scope): Remove
6709 wrong assumption that it is never called on prexisting
6710 symbol.
6711
0af94e6f
JR
67122013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6713
6714 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6715
20059c8b
GDR
67162013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6717
6718 * c-objc-common.c (c_tree_printer): Tidy.
6719
de5a5fa1
MP
67202013-08-30 Marek Polacek <polacek@redhat.com>
6721
6722 * c-typeck.c (build_binary_op): Add division by zero and shift
6723 instrumentation.
6724
2531a1d9 67252013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6726 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6727
6e2bcc98 6728 PR c/35649
2531a1d9
JR
6729 * c-typeck.c (c_common_type): Prefer double_type_node over
6730 other REAL_TYPE types with the same precision.
6731 (convert_arguments): Likewise.
6732
025311c4
GDR
67332013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6734
6735 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6736 (c_initialize_diagnostics): Call a destructor for the early printer.
6737
da6ca2b5
GDR
67382013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6739
6740 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6741 printer initialization.
6742
318cda85 67432013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6744
318cda85
BI
6745 PR c/57490
6746 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6747 check for truth values.
6748 (expand_array_notation_exprs): Added truth values case. Removed an
6749 unwanted else. Added for-loop to walk through subtrees in default
6750 case.
6751
b066401f
GDR
67522013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6753
6754 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6755
fb48aadc
JM
67562013-07-23 Joseph Myers <joseph@codesourcery.com>
6757
6758 * c-parser.c (struct c_generic_association): Fix typo.
6759
433cc7b0
TT
67602013-07-23 Tom Tromey <tromey@redhat.com>
6761 Joseph Myers <joseph@codesourcery.com>
6762
6763 * c-parser.c (struct c_generic_association): New.
6764 (c_generic_association_d): New typedef.
6765 (c_parser_generic_selection): New function.
6766 (c_parser_postfix_expression): Handle RID_GENERIC.
6767
26d40c3d
JM
67682013-07-13 Jason Merrill <jason@redhat.com>
6769
6770 PR c++/57793
6771 * c-decl.c (finish_struct): Check for too-large class.
6772
ecdbd01a 67732013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6774
6775 PR c/57821
6776 * c-typeck.c (set_init_index): When folding, check for index overflow.
6777
1141ed3f
BI
67782013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6779
6780 * c-parser.c (c_parser_array_notation): Removed rejection of array
6781 notations in an array of function pointers.
6782
713b46fa
BI
67832013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6784
6785 * c-array-notation.c (make_triplet_val_inv): New function.
6786 (create_cmp_incr): Likewise.
6787 (create_array_refs): Likewise.
6788 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6789 Also modularized common parts between functions and called the function.
6790 (build_array_notation_expr): Likewise.
6791 (fix_conditional_array_notations_1): Likewise.
6792 (fix_array_notation_expr): Likewise.
6793 (fix_array_notation_call_expr): Likewise.
6794
92f20202
MP
67952013-06-18 Marek Polacek <polacek@redhat.com>
6796
6797 PR c/57630
6798 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6799
73a23b06
BI
68002013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6801
6802 * c-array-notation.c (build_array_notation_expr): Reject array notation
6803 mismatch between LHS and RHS even inside a call_expr. Also, removed
6804 a couple while statements that were dead code.
6805
00b8517d
BI
68062013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6807
6808 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6809 excessive precision expressions in function parameters. Also removed
6810 couple unwanted while statements.
6811
1509bdda
BI
68122013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6813
6814 * c-array-notation.c (expand_array_notation_exprs): Added
6815 ARRAY_NOTATION_REF case.
ab20d992 6816
d60f1706
BI
68172013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6818
6819 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6820 function to c-family/array-notation-common.c.
6821 (is_cilkplus_reduce_builtin): Likewise.
6822 (find_rank): Likewise.
6823 (extract_array_notation_exprs): Likewise.
6824 (replace_array_notations): Likewise.
6825 (find_inv_trees): Likewise.
6826 (replace_inv_trees): Likewise.
6827 (contains_array_notation_expr): Likewise.
6828 (find_correct_array_notation_type): Likewise.
6829 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6830 (struct inv_list): Moved this to c-family/array-notation-common.c.
6831 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6832
6d6efbb3
BI
68332013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6834
6835 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6836 reduction functions outside the for-loop. Added a check if the fundecl
6837 is non-NULL. Finally, removed an unwanted if-statement, and made the
6838 body unconditional.
6839
25c22937
BI
68402013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6841
6842 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6843 condition of the if-statement matches the rank of else-block and then-
6844 block when array notations are used.
6845 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6846 expression after the entire function body is parsed.
6847 (c_parser_expr_no_commas): Delayed creating array notation expressions
6848 to the end of function parsing.
6849 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6850 whole if-statement instead of just the condition.
ab20d992 6851 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6852
edd25645
BI
68532013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6854
6855 PR c/57474
6856 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6857 array to NULL_TREE if they are unused. Also added a check for the
6858 field to be NULL before its fields are used in future.
ab20d992 6859
065ce7f1
RO
68602013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6861
6862 PR bootstrap/57450
6863 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6864 (build_array_notation_expr): Likewise.
6865
36536d79
BI
68662013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6867
6868 * c-typeck.c (build_array_ref): Added a check to see if array's
6869 index is greater than one. If true, then emit an error.
6870 (build_function_call_vec): Exclude error reporting and checking
6871 for builtin array-notation functions.
6872 (convert_arguments): Likewise.
6873 (c_finish_return): Added a check for array notations as a return
6874 expression. If true, then emit an error.
6875 (c_finish_loop): Added a check for array notations in a loop
6876 condition. If true then emit an error.
6877 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6878 (build_binary_op): Added a check for array notation expr inside
6879 op1 and op0. If present, we call another function to find correct
6880 type.
6881 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6882 * c-parser.c (c_parser_compound_statement): Check if array
6883 notation code is used in tree, if so, then transform them into
6884 appropriate C code.
6885 (c_parser_expr_no_commas): Check if array notation is used in LHS
6886 or RHS, if so, then build array notation expression instead of
6887 regular modify.
6888 (c_parser_postfix_expression_after_primary): Added a check for
6889 colon(s) after square braces, if so then handle it like an array
6890 notation. Also, break up array notations in unary op if found.
6891 (c_parser_direct_declarator_inner): Added a check for array
6892 notation.
6893 (c_parser_compound_statement): Added a check for array notation in
6894 a stmt. If one is present, then expand array notation expr.
6895 (c_parser_if_statement): Likewise.
6896 (c_parser_switch_statement): Added a check for array notations in
6897 a switch statement's condition. If true, then output an error.
6898 (c_parser_while_statement): Similarly, but for a while.
6899 (c_parser_do_statement): Similarly, but for a do-while.
6900 (c_parser_for_statement): Similarly, but for a for-loop.
6901 (c_parser_unary_expression): Check if array notation is used in a
6902 pre-increment or pre-decrement expression. If true, then expand
6903 them.
6904 (c_parser_array_notation): New function.
6905 * c-array-notation.c: New file.
6906 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6907
cd192ccc
MS
69082013-05-23 Mike Stump <mikestump@comcast.net>
6909
6910 * c-typeck.c (convert_for_assignment): Handle references to memory
6911 spaces better.
6912
427b248d
JM
69132013-05-16 Jason Merrill <jason@redhat.com>
6914
6915 * Make-lang.in (cc1$(exeext)): Use link mutex.
6916
44d90fe1
PC
69172013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6918
6919 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6920 to simply use OPT_Wpointer_arith.
6921 (build_unary_op): Likewise.
6922
4e7d7b3d
JJ
69232013-04-03 Jakub Jelinek <jakub@redhat.com>
6924
6925 PR c/19449
6926 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6927 argument. If set, or it temporarily for parsing of the first
6928 argument into force_folding_builtin_constant_p.
6929 (c_parser_postfix_expression): Adjust callers.
6930
839b422f
RB
69312013-03-21 Richard Biener <rguenther@suse.de>
6932
6933 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6934 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6935
2ee028f1
MP
69362013-02-12 Marek Polacek <polacek@redhat.com>
6937
6938 PR c/44938
6939 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6940 origtypes to NULL.
6941
8824edff
JJ
69422013-01-24 Jakub Jelinek <jakub@redhat.com>
6943
6944 PR c/56078
6945 * c-typeck.c (set_nonincremental_init_from_string): If
6946 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6947 returned false.
6948 (process_init_element): Likewise.
6949
eadd3d0d
JJ
69502012-12-20 Jakub Jelinek <jakub@redhat.com>
6951
6952 PR c++/55619
6953 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6954 argument, don't call default_function_array_conversion
6955 nor c_fully_fold here.
6956 (c_parser_asm_statement): Adjust callers.
6957 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6958 and outputs here, and call default_function_array_conversion
6959 on inputs that don't need to be addressable.
6960
f8a93a2e
JJ
69612012-12-18 Jakub Jelinek <jakub@redhat.com>
6962
6963 PR c/39464
6964 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6965 warning require that both c_common_unsigned_type as well as
6966 c_common_signed_type is the same for both mvl and mvr types.
6967
9771b263
DN
69682012-11-16 Diego Novillo <dnovillo@google.com>
6969
6970 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6971
6972 * c-common.c: Use new vec API in vec.h.
6973 * c-common.h: Likewise.
6974 * c-gimplify.c: Likewise.
6975 * c-pragma.c: Likewise.
6976 * c-pretty-print.c: Likewise.
6977 * c-pretty-print.h: Likewise.
6978 * c-semantics.c: Likewise.
6979 * c-decl.c: Likewise.
6980 * c-parser.c: Likewise.
6981 * c-tree.h: Likewise.
6982 * c-typeck.c: Likewise.
6983
880661a4
JW
69842012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6985
6986 PR c++/54930
6987 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6988
077d1abe
MLI
69892012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6990
6991 PR c/53066
6992 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6993 shadows a function, unless the variable is a function or a
6994 pointer-to-function.
6995
3a785c97
JJ
69962012-10-12 Jakub Jelinek <jakub@redhat.com>
6997
6998 PR c/54381
6999 * c-parser.c (struct c_tree_loc_pair): Removed.
7000 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7001 add location_t * and tree * arguments, fill in array of 3
7002 sizeof_arg trees and corresponding locs.
7003 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7004 c_parser_expr_list callers.
7005 (c_parser_postfix_expression_after_primary): Likewise. Pass
7006 array of 3 sizeof_arg trees and locs (corresponding to first
7007 3 arguments) to sizeof_pointer_memaccess_warning.
7008
703c8606
LC
70092012-10-09 Lawrence Crowl <crowl@google.com>
7010
7011 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7012 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7013 hash table.
7014
5d9de0d0
PC
70152012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7016
7017 PR c++/54194
7018 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7019 call.
7020
a212e43f
MG
70212012-10-09 Marc Glisse <marc.glisse@inria.fr>
7022
7023 PR c++/54427
7024 * c-typeck.c: Include c-common.h.
7025 (enum stv_conv): Moved to c-common.h.
7026 (scalar_to_vector): Moved to c-common.c.
7027 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7028 * Make-lang.in: c-typeck.c depends on c-common.h.
7029
3b78de56
AC
70302012-10-04 Arnaud Charlet <charlet@adacore.com>
7031
7032 * c-decl.c (c_write_global_declarations): Fix handling of
7033 -fdump-ada-spec*.
7034
78c60e3d
SS
70352012-09-30 Sharad Singhai <singhai@google.com>
7036
7037 * c-decl.c (c_write_global_declarations): Use a different method
7038 to determine if the dump has ben initialized.
7039
9f33203d
JM
70402012-09-14 Joseph Myers <joseph@codesourcery.com>
7041
7042 PR c/54552
7043 * c-typeck.c (c_cast_expr): When casting to a type requiring
7044 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7045 c_fully_fold first.
7046
a27d595d
JM
70472012-09-14 Joseph Myers <joseph@codesourcery.com>
7048
7049 PR c/54103
7050 * c-typeck.c (build_unary_op): Pass original argument of
7051 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7052 any C_MAYBE_CONST_EXPR, if it has integer operands.
7053 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7054 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7055 to c_objc_common_truthvalue_conversion, then remove any
7056 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7057 c_objc_common_truthvalue_conversion not
7058 c_common_truthvalue_conversion.
7059 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7060 call note_integer_operands for arguments with integer operands
7061 that are not integer constants.
7062
9feb29df
JJ
70632012-09-13 Jakub Jelinek <jakub@redhat.com>
7064
7065 PR c/54559
7066 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7067 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7068
d409320c
JJ
70692012-08-31 Jakub Jelinek <jakub@redhat.com>
7070
7071 PR c/54428
7072 * c-convert.c (convert): Don't call fold_convert_loc if
7073 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7074 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7075 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7076
6265d07c
JJ
70772012-08-24 Jakub Jelinek <jakub@redhat.com>
7078
7079 PR c/54355
7080 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7081 for nested and empty_ok arguments in the call to
7082 c_parser_declaration_or_fndef.
7083
1a4049e7
JJ
70842012-08-17 Jakub Jelinek <jakub@redhat.com>
7085
7086 * c-tree.h (c_last_sizeof_arg): Declare.
7087 * c-parser.c (struct c_tree_loc_pair): New type.
7088 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7089 non-NULL.
7090 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7091 (c_parser_postfix_expression_after_primary): Likewise. Call
7092 sizeof_pointer_memaccess_warning if needed.
7093 (sizeof_ptr_memacc_comptypes): New function.
7094 * c-typeck.c (c_last_sizeof_arg): New global variable.
7095 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7096
0229aee9
UB
70972012-07-24 Uros Bizjak <ubizjak@gmail.com>
7098
7099 * c-lang.h (lang_decl): Add variable_size GTY option.
7100
7ee2468b
SB
71012012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7102
7103 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7104 * Make-lang.in: Fix dependencies.
7105
d4a10d0a
SB
71062012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7107
7108 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7109 and add language Makefile hooks.
7110 * config-lang.in: New file.
7111 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7112 add the required "normal" config-lang.in rules.
7113 * c-lang.h: Moved from gcc/ to here.
7114 * c-tree.h: Likewise.
7115 * c-objc-common.c: Likewise.
7116 * c-objc-common.h: Likewise.
7117 * c-typeck.c: Likewise.
7118 * c-convert.c: Likewise.
7119 * c-lang.c: Likewise.
7120 * c-aux-info.c: Likewise.
7121 * c-errors.c: Likewise.
7122 * gccspec.c: Likewise.
7123 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7124 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7125\f
8d9254fc 7126Copyright (C) 2012-2020 Free Software Foundation, Inc.
d4a10d0a
SB
7127
7128Copying and distribution of this file, with or without modification,
7129are permitted in any medium without royalty provided the copyright
7130notice and this notice are preserved.
This page took 2.865235 seconds and 5 git commands to generate.