]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Make memory copy functions scalar storage order barriers
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f60ee68d
GA
12020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2
3 * c-parser.c (c_parser_statement_after_labels): Pass correct
4 parameters to c_parser_do_statement.
5
56638b9b
GA
62020-06-16 Jakub Jelinek <jakub@redhat.com>
7
8 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
9 c_in_omp_for.
10 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
11 premature c_fully_fold. Defer explicit c_fully_fold calls to after
12 c_finish_omp_for.
13 * c-tree.h (c_in_omp_for): Declare.
14 * c-typeck.c (c_in_omp_for): Define.
15 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
16 (digest_init): Likewise.
17 (build_binary_op): Likewise.
18
192020-06-16 Jakub Jelinek <jakub@redhat.com>
20
21 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
22 from kind by comma rather than colon.
23
1a59f3db
GA
242020-06-05 Mark Wielaard <mark@klomp.org>
25
26 * c-decl.c (implicit_decl_warning): When warned and olddecl is
27 an undeclared builtin, then add a fixit header hint, if found.
28 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
29 warning_at about implicit builtin declaration type mismatch.
30
9a5b7438
GA
312020-06-03 Mark Wielaard <mark@klomp.org>
32
33 * c-parser.c (struct c_parser): Add seen_string_literal
34 bitfield.
35 (c_parser_consume_token): Reset seen_string_literal.
36 (c_parser_error_richloc): Add name_hint if seen_string_literal
37 and next token is a CPP_NAME and we have a missing header
38 suggestion for the name.
39 (c_parser_string_literal): Set seen_string_literal.
40
412020-06-03 Mark Wielaard <mark@klomp.org>
42
43 * c-parser.c (c_parser_postfix_expression_after_primary): Add
44 scope with matching_parens after CPP_OPEN_PAREN.
45
462020-06-03 Tobias Burnus <tobias@codesourcery.com>
47
48 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
49
53ffb43a
GA
502020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
51
52 * Make-lang.in: Remove extra slash.
53
8f66f175
ML
542020-05-19 Martin Liska <mliska@suse.cz>
55
56 * c-parser.c: Fix typo.
57
49ddde69
JJ
582020-05-14 Jakub Jelinek <jakub@redhat.com>
59
60 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
61
eb72dc66
RB
622020-05-07 Richard Biener <rguenther@suse.de>
63
64 PR middle-end/94703
65 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
66 DECL_GIMPLE_REG_P.
67
bf915591
JJ
682020-04-30 Jakub Jelinek <jakub@redhat.com>
69
70 PR c/94842
71 * c-decl.c (set_labels_context_r): In addition to context-less
72 LABEL_DECLs adjust also LABEL_DECLs with context equal to
73 parent function if any.
74 (store_parm_decls): Adjust comment.
75
e1113ffb
JJ
762020-04-19 Jakub Jelinek <jakub@redhat.com>
77
78 PR objc/94637
79 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
80 two CPP_COLON tokens.
81
2e389749
JJ
822020-04-17 Jakub Jelinek <jakub@redhat.com>
83
84 PR other/94629
85 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
86 to data.clauses.
87
2dc9294c
JJ
882020-04-15 Jakub Jelinek <jakub@redhat.com>
89
90 PR c/94593
91 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
92 requires directive when not at file scope.
93
13e41d8b
TB
942020-04-08 Tobias Burnus <tobias@codesourcery.com>
95
96 PR middle-end/94120
97 * c-decl.c (c_check_in_current_scope): New function.
98 * c-tree.h (c_check_in_current_scope): Declare it.
99 * c-parser.c (c_parser_oacc_declare): Add check that variables
100 are declared in the same scope as the directive. Fix handling
101 of namespace vars.
102
4df50a05
JJ
1032020-04-07 Jakub Jelinek <jakub@redhat.com>
104
105 PR c++/94512
106 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
107 if c_parser_omp_master succeeded.
108
5db9e893
JJ
1092020-03-23 Jakub Jelinek <jakub@redhat.com>
110
111 PR gcov-profile/94029
112 PR c/94239
113 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
114 the function_start_locus location. Don't do that afterwards for the
115 __GIMPLE body parsing.
116
9def91e9
JJ
1172020-03-19 Jakub Jelinek <jakub@redhat.com>
118
119 PR gcov-profile/94029
120 * c-tree.h (finish_function): Add location_t argument defaulted to
121 input_location.
122 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
123 set it to the locus of closing } if non-NULL.
124 (c_parser_compound_statement_nostart): Return locus of closing }.
125 (c_parser_parse_rtl_body): Likewise.
126 (c_parser_declaration_or_fndef): Propagate locus of closing } to
127 finish_function.
128 * c-decl.c (finish_function): Add end_loc argument, use it instead of
129 input_location to set function_end_locus.
130
046c5890
JJ
1312020-03-17 Jakub Jelinek <jakub@redhat.com>
132
133 PR c/94172
134 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
135 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
136 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
137 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
138 ENUMERAL_TYPEs.
139 (finish_incomplete_vars): New function, moved from finish_struct. Use
140 relayout_decl instead of layout_decl.
141 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
142 being TYPE_VFIELD. Use finish_incomplete_vars.
143 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
144 finish_incomplete_vars.
145 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
146 also on ENUMERAL_TYPEs.
147
c015ff8c
JJ
1482020-03-16 Jakub Jelinek <jakub@redhat.com>
149
150 PR c/94179
151 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
152
f2e9fe5f
MS
1532020-03-13 Martin Sebor <msebor@redhat.com>
154
155 PR c/94040
156 * c-decl.c (builtin_structptr_type_count): New constant.
157 (match_builtin_function_types): Reject decls that are incompatible
158 in types pointed to by pointers.
159 (diagnose_mismatched_decls): Adjust comments.
160
c9d70946
JM
1612020-03-05 Joseph Myers <joseph@codesourcery.com>
162
163 PR c/93577
164 * c-typeck.c (pop_init_level): Do not diagnose initializers as
165 empty when initialized type is error_mark_node.
166 (set_designator, process_init_element): Ignore initializers for
167 elements of a variable-size type or of error_mark_node.
168
726e292d
MS
1692020-03-01 Martin Sebor <msebor@redhat.com>
170
171 PR middle-end/93926
172 * c-decl.c (types_close_enough_to_match): New function.
173 (match_builtin_function_types):
174 (diagnose_mismatched_decls): Add missing inform call to a warning.
175
a499c2f8
MS
1762020-03-01 Martin Sebor <msebor@redhat.com>
177
178 PR c/93812
179 * c-typeck.c (build_functype_attribute_variant): New function.
180 (composite_type): Call it.
181
9c3da8cc
JJ
1822020-02-25 Jakub Jelinek <jakub@redhat.com>
183
184 PR other/93912
185 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
186 Rename last argument from probablity to probability.
187
bacdd5e9
JJ
1882020-02-13 Jakub Jelinek <jakub@redhat.com>
189
190 PR c/93576
191 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
192 *expr if it has side effects.
193
f9eb0973
JL
1942020-01-30 Jeff Law <law@redhat.com>
195
196 PR c/88660
197 * c-parser.c (c_parser_switch_statement): Make sure to request
198 marking the switch expr as used.
199
ac68e287
JM
2002020-01-22 Joseph Myers <joseph@codesourcery.com>
201
202 PR c/93348
203 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
204 argument with integer operands.
205
852f0ae8
KK
2062020-01-16 Kerem Kat <keremkat@gmail.com>
207
208 PR c/92833
209 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
210 to support 4 available tokens.
211
e2346a33
JM
2122020-01-15 Joseph Myers <joseph@codesourcery.com>
213
214 PR c/93072
215 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
216 determine whether to set DECL_CONTEXT.
217
3d77686d
JM
2182020-01-13 Joseph Myers <joseph@codesourcery.com>
219
220 PR c/93241
221 * c-typeck.c (build_c_cast): Check for expressions with integer
222 operands that can occur in an unevaluated part of an integer
223 constant expression and call note_integer_operands as needed.
224
f74c4b2c
RB
2252019-01-08 Richard Biener <rguenther@suse.de>
226
227 PR middle-end/93199
228 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
229 permanently.
230
8d9254fc
JJ
2312020-01-01 Jakub Jelinek <jakub@redhat.com>
232
233 Update copyright years.
234
39292e25
EB
2352019-12-20 Eric Botcazou <ebotcazou@adacore.com>
236
237 * c-decl.c (collect_source_ref_cb): Delete.
238 (for_each_global_decl): Rename into...
239 (collect_source_refs): ...this. Call collect_source_ref directly.
240 (c_parse_final_cleanups): Always call collect_source_ref on the main
241 input filename.
242
519d7496
JB
2432019-12-19 Julian Brown <julian@codesourcery.com>
244 Cesar Philippidis <cesar@codesourcery.com>
245
246 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
247 detach clauses.
248 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
249 Allow deref (->) in variable lists if true.
250 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
251 Pass to c_parser_omp_variable_list.
252 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
253 call to c_parser_omp_variable_list.
254 (c_parser_oacc_all_clauses): Support attach and detach clauses.
255 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
256 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
257 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
258 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
259 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
260 and detach. Support deref.
261 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
262 GOMP_MAP_ALWAYS_POINTER for OpenACC.
263 (c_oacc_check_attachments): New function.
264 (c_finish_omp_clauses): Check attach/detach arguments for being
265 pointers using above. Support deref.
266
a6163563
JB
2672019-12-19 Julian Brown <julian@codesourcery.com>
268 Maciej W. Rozycki <macro@codesourcery.com>
269 Tobias Burnus <tobias@codesourcery.com>
270 Thomas Schwinge <thomas@codesourcery.com>
271
272 * c-parser.c (c_parser_omp_clause_name): Support no_create.
273 (c_parser_oacc_data_clause): Likewise.
274 (c_parser_oacc_all_clauses): Likewise.
275 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
276 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
277 PRAGMA_OACC_CLAUSE_NO_CREATE.
278 * c-typeck.c (handle_omp_array_sections): Support
279 GOMP_MAP_NO_ALLOC.
280
d68f5d45
DM
2812019-12-09 David Malcolm <dmalcolm@redhat.com>
282
283 * c-objc-common.c (range_label_for_type_mismatch::get_text):
284 Replace label_text ctor calls.
285
4691bf46
JM
2862019-12-04 Joseph Myers <joseph@codesourcery.com>
287
288 PR c/36941
289 PR c/88827
290 * c-typeck.c (convert_lvalue_to_rvalue): Call
291 require_complete_type for arguments not of void types.
292 (build_indirect_ref): Do not diagnose dereferencing pointers to
293 incomplete types.
294 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
295
85d11957
JM
2962019-12-03 Joseph Myers <joseph@codesourcery.com>
297
298 PR c/88704
299 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
300 old-style parameter definitions.
301
4569f8b3
SL
3022019-12-01 Sandra Loosemore <sandra@codesourcery.com>
303
304 PR target/92499
305
306 * c-decl.c (flexible_array_type_p): Move to common code.
307
65ef05d0
RS
3082019-11-30 Richard Sandiford <richard.sandiford@arm.com>
309
310 * c-decl.c (start_decl): Allow initialization of variables whose
311 size is a POLY_INT_CST.
312 (finish_decl): Use verify_type_context to check whether the target
313 allows variables with a particular type to have static or thread-local
314 storage duration. Don't raise a second error if such variables do
315 not have a constant size.
316 (grokdeclarator): Use verify_type_context to check whether the
317 target allows fields or array elements to have a particular type.
318 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
319 the target allows pointer difference for the types involved.
320 (build_unary_op): Likewise for pointer increment and decrement.
321
34b43828
JM
3222019-11-29 Joseph Myers <joseph@codesourcery.com>
323
324 * c-parser.c (struct c_parser): Add members raw_tokens and
325 raw_tokens_used.
326 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
327 using previously-lexed raw tokens.
328 (c_parser_peek_nth_token_raw)
329 (c_parser_check_balanced_raw_token_sequence): New functions.
330 (c_parser_nth_token_starts_std_attributes): Use
331 c_parser_check_balanced_raw_token_sequence for Objective-C.
332
5b8d9367
JM
3332019-11-25 Joseph Myers <joseph@codesourcery.com>
334
335 PR c/91985
336 * c-decl.c (finish_declspecs): Use int instead of decimal
337 floating-point types if decimal floating-point not supported.
338
1723e1be
JM
3392019-11-25 Joseph Myers <joseph@codesourcery.com>
340
341 * c-tree.h (struct c_declarator): Use a structure for id member.
342 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
343 declarators at the start, not when handling individual declarators
344 later. Use u.id.id instead of u.id.
345 (grokfield): Use u.id.id instead of u.id.
346 (build_id_declarator): Set u.id.id and u.id.attrs.
347 (finish_declspecs): Handle postfix attributes in case of typedef
348 name or typeof used.
349 * c-parser.c (c_parser_direct_declarator)
350 (c_parser_direct_declarator_inner): Place declarator for
351 attributes inside that for function or array, not outside. Set
352 u.id.attrs for identifiers.
353 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
354 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
355 instead of u.id.
356
bdaf8be1
JJ
3572019-11-22 Jakub Jelinek <jakub@redhat.com>
358
359 PR c/90677
360 * c-decl.c (identifier_global_tag): Define.
361
3e00ba47
RB
3622019-11-20 Richard Biener <rguenther@suse.de>
363
364 PR c/92088
365 * c-decl.c (grokdeclarator): Prevent inlining of nested
366 function with VLA arguments.
367
8c5b727a
JM
3682019-11-20 Joseph Myers <joseph@codesourcery.com>
369
370 * c-decl.c (c_warn_type_attributes): New function.
371 (groktypename, grokdeclarator, finish_declspecs): Call
372 c_warn_type_attributes before applying attributes to types.
373 * c-tree.h (c_warn_type_attributes): Declare.
374
192961ff
JM
3752019-11-19 Joseph Myers <joseph@codesourcery.com>
376
377 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
378 standard attributes.
379 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
380 pedwarn for unknown standard attributes and return error_mark_node
381 for them.
382
20a38017
MM
3832019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
384
385 * c-parser.c (c_parser_parse_rtl_body): Always call
386 run_rtl_passes, even if startwith pass is not provided.
387
d5fbe5e0
JM
3882019-11-15 Joseph Myers <joseph@codesourcery.com>
389
390 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
391 duplicate standard attributes.
392
97cc1187
JM
3932019-11-15 Joseph Myers <joseph@codesourcery.com>
394
395 * c-decl.c (std_attribute_table): Add maybe_unused.
396
f8aea5e3
JM
3972019-11-15 Joseph Myers <joseph@codesourcery.com>
398
399 * c-decl.c (std_attribute_table): Add fallthrough.
400 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
401 attribute at top level.
402
2cc94aa8
JM
4032019-11-15 Joseph Myers <joseph@codesourcery.com>
404
405 * c-decl.c (std_attribute_table): New.
406 (c_init_decl_processing): Register attributes from
407 std_attribute_table.
408 * c-parser.c (c_parser_attribute_arguments): Add arguments
409 require_string and allow_empty_args. All callers changed.
410 (c_parser_std_attribute): Set require_string argument for
411 "deprecated" attribute.
412
7c5890cc
JM
4132019-11-14 Joseph Myers <joseph@codesourcery.com>
414
415 * c-parser.c (c_parser_postfix_expression)
416 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
417 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
418
e8738f4e
RS
4192019-11-14 Richard Sandiford <richard.sandiford@arm.com>
420
421 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
422 of build_same_sized_truth_vector_type.
423 (build_vec_cmp): Likewise.
424
b2417b59
JJ
4252019-11-14 Jakub Jelinek <jakub@redhat.com>
426
bedb7f04
JJ
427 * c-parser.c (c_parser_omp_context_selector): Don't require score
428 argument to fit into shwi, just to be INTEGER_CST. Diagnose
429 negative score.
430
b2417b59
JJ
431 * c-parser.c (c_parser_omp_context_selector): Rename
432 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
433 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
434 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
435 and string literals.
436
4e03c3a7
JM
4372019-11-14 Joseph Myers <joseph@codesourcery.com>
438
439 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
440 ctsk_tagfirstref_attrs.
441 (struct c_declspecs): Update description of attrs. Add
442 postfix_attrs and non_std_attrs_seen_p. Increase size of
443 typespec_kind bit-field.
444 (c_warn_unused_attributes): New declaration.
445 (parser_xref_tag): Update prototype.
446 * c-decl.c (c_warn_unused_attributes): New function.
447 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
448 ctsk_tagref_attrs. Handle attribute declarations.
449 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
450 (grokdeclarator): Handle standard attributes.
451 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
452 attributes to incomplete type reference.
453 (xref_tag): Update call to parser_xref_tag.
454 (declspecs_add_addrspace, declspecs_add_type)
455 (declspecs_add_scspec, declspecs_add_attrs): Set
456 non_std_attrs_seen_p.
457 (finish_declspecs): Apply postfix standard attributes to type.
458 * c-parser.c (c_token_starts_declspecs)
459 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
460 (c_parser_next_tokens_start_declaration): Update comments.
461 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
462 parser->tokens[2] to parser->tokens[1].
463 (c_parser_nth_token_starts_std_attributes)
464 (c_parser_std_attribute_specifier_sequence): New functions.
465 (c_parser_declaration_or_fndef): Add arguments have_attrs and
466 attrs. All callers changed. Handle standard attributes.
467 (c_parser_parms_declarator, c_parser_parms_list_declarator)
468 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
469 All callers changed.
470 (c_parser_declspecs): Add arguments start_std_attr_ok and
471 end_std_attr_ok. All callers changed. Handle standard
472 attributes.
473 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
474 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
475 (c_parser_compound_statement_nostart, c_parser_all_labels)
476 (c_parser_label, c_parser_statement, c_parser_for_statement):
477 Handle standard attributes.
478 * c-parser.h (c_parser_declspecs): Update prototype.
479 * gimple-parser.c (c_parser_gimple_declaration): Update call to
480 c_parser_declspecs.
481
0c29cac4
ML
4822019-11-12 Martin Liska <mliska@suse.cz>
483
484 * gimple-parser.c: Do not include params.h.
485
028d4092
ML
4862019-11-12 Martin Liska <mliska@suse.cz>
487
488 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
489 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
490 macro.
491
62aee289
MR
4922019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
493 Frederik Harwath <frederik@codesourcery.com>
494
495 gcc/c/
496 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
497 (c_parser_oacc_kernels_parallel): Rename function to...
498 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
499 (c_parser_omp_construct): Update accordingly.
500
501
7cec9588
JJ
5022019-11-11 Jakub Jelinek <jakub@redhat.com>
503
504 * c-parser.c (c_parser_translation_unit): Diagnose declare target
505 without corresponding end declare target.
506
f486280c
RS
5072019-11-08 Richard Sandiford <richard.sandiford@arm.com>
508
509 * c-convert.c (convert): Only handle vector conversions if one of
510 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
511 allows it.
512 * c-typeck.c (build_array_ref): Only allow vector indexing if the
513 vectors satisfy gnu_vector_type_p.
514 (build_unary_op): Only allow unary operators to be applied to
515 vectors if they satisfy gnu_vector_type_p.
516 (digest_init): Only allow by-element initialization of vectors
517 if they satisfy gnu_vector_type_p.
518 (really_start_incremental_init): Likewise.
519 (push_init_level): Likewise.
520 (pop_init_level): Likewise.
521 (process_init_element): Likewise.
522 (build_binary_op): Only allow binary operators to be applied to
523 vectors if they satisfy gnu_vector_type_p.
524
017c6491
JM
5252019-11-08 Joseph Myers <joseph@codesourcery.com>
526
527 * c-decl.c (grokparms): Convert () in a function definition to
528 (void) for C2x.
529 (store_parm_decls_oldstyle): Pedwarn for C2x.
530 (store_parm_decls): Update comment about () not generating a
531 prototype.
532
c01bd174
JM
5332019-11-07 Joseph Myers <joseph@codesourcery.com>
534
535 * c-parser.c (c_parser_attribute_arguments): New function.
536 Factored out of c_parser_gnu_attribute.
537 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
538 (c_parser_balanced_token_sequence, c_parser_std_attribute)
539 (c_parser_std_attribute_specifier): New functions.
540 (c_parser_transaction_attributes): Use
541 c_parser_std_attribute_specifier.
542
471c5330
JM
5432019-11-07 Joseph Myers <joseph@codesourcery.com>
544
545 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
546 lex_joined_string and translate_strings_p.
547 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
548 c_lex_with_flags.
549 (c_parser_string_literal): New function.
550 (c_parser_static_assert_declaration_no_semi): Use
551 c_parser_string_literal. Do not set lex_untranslated_string.
552 (c_parser_asm_string_literal): Use c_parser_string_literal.
553 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
554 (c_parser_gnu_attributes): Set and restore translate_strings_p
555 instead of lex_untranslated_string.
556 (c_parser_asm_statement): Do not set lex_untranslated_string.
557 (c_parser_asm_operands): Likewise.
558 (c_parser_has_attribute_expression): Set and restore
559 translate_strings_p instead of lex_untranslated_string.
560 (c_parser_postfix_expression): Use c_parser_string_literal.
561 (pragma_lex): Likewise.
562 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
563 (c_parse_file): Set translate_strings_p.
564 * gimple-parser.c (c_parser_gimple_postfix_expression)
565 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
566 * c-parser.c (c_parser_string_literal): Declare function.
567
d0c464d2
JJ
5682019-11-02 Jakub Jelinek <jakub@redhat.com>
569
570 * c-parser.c (c_finish_omp_declare_variant): Use
571 omp_get_context_selector instead of c_omp_get_context_selector.
572
ac2cfa6c
RS
5732019-10-29 Richard Sandiford <richard.sandiford@arm.com>
574
575 * c-tree.h (c_simulate_enum_decl): Declare.
576 * c-decl.c (c_simulate_enum_decl): New function.
577 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
578
74078538
RS
5792019-10-29 Richard Sandiford <richard.sandiford@arm.com>
580
581 * c-tree.h (c_simulate_builtin_function_decl): Declare.
582 * c-decl.c (c_simulate_builtin_function_decl): New function.
583 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
584 to the above.
585
ad1539d5
MS
5862019-10-28 Martin Sebor <msebor@redhat.com>
587
588 PR c/66970
589 * c-decl.c (names_builtin_p): Define a new function.
590
cb73e4e7
RB
5912019-10-28 Richard Biener <rguenther@suse.de>
592
593 PR c/92249
594 * gimple-parser.c (c_parser_parse_gimple_body): Make
595 current_bb the entry block initially to easier recover
596 from errors.
597 (c_parser_gimple_compound_statement): Adjust.
598
135df52c
JJ
5992019-10-24 Jakub Jelinek <jakub@redhat.com>
600
601 * c-parser.c (c_finish_omp_declare_variant): Use
602 omp_context_selector_matches instead of
603 c_omp_context_selector_matches.
604 * c-decl.c (c_decl_attributes): Add "omp declare target block"
605 attribute in between declare target and end declare target
606 pragmas.
607
783bfe5e
JM
6082019-10-15 Joseph Myers <joseph@codesourcery.com>
609
610 * c-parser.c (c_parser_attribute_any_word): Rename to
611 c_parser_gnu_attribute_any_word. All callers changed.
612 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
613 callers changed.
614 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
615 callers changed.
616 (c_parser_declaration_or_fndef, c_parser_declspecs)
617 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
618 (c_parser_struct_declaration, c_parser_declarator)
619 (c_parser_gnu_attribute, c_parser_compound_statement)
620 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
621 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
622 attribute-related syntax productions.
623
56898e43
RS
6242019-10-14 Richard Sandiford <richard.sandiford@arm.com>
625
626 * c-objc-common.c (useful_aka_type_p): Replace with...
627 (get_aka_type): ...this new function. Given the original type,
628 decide which aka type to print (if any). Only look through typedefs
629 if user_facing_original_type_p.
630 (print_type): Update accordingly.
631
b9424661
JJ
6322019-10-14 Jakub Jelinek <jakub@redhat.com>
633
634 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
635 into int NESTED, if it is 2, diagnose missing commas in between
636 clauses.
637 (c_parser_omp_context_selector): Pass 2 as last argument to
638 c_parser_omp_all_clauses.
639
20de9568
JJ
6402019-10-12 Jakub Jelinek <jakub@redhat.com>
641
642 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
643 For simd properties, put them directly into TREE_VALUE.
644 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
645 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
646 add "omp declare variant base" attribute rather than
647 "omp declare variant".
648
fe2bc27c
JM
6492019-10-11 Joseph Myers <joseph@codesourcery.com>
650
651 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
652
94e7f906
JJ
6532019-10-10 Jakub Jelinek <jakub@redhat.com>
654
655 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
656 true, terminate processing on closing paren and don't skip to end of
657 pragma line.
658 (c_parser_omp_declare_simd): Handle also declare variant.
659 (omp_construct_selectors, omp_device_selectors,
660 omp_implementation_selectors, omp_user_selectors): New variables.
661 (c_parser_omp_context_selector,
662 c_parser_omp_context_selector_specification,
663 c_finish_omp_declare_variant): New functions.
664 (c_finish_omp_declare_simd): Handle both declare simd and
665 declare variant.
666 (c_parser_omp_declare): Handle declare variant.
667
93313b94
JM
6682019-10-02 Joseph Myers <joseph@codesourcery.com>
669
670 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
671 CPP_COLON tokens.
672
55879815
RS
6732019-10-01 Richard Sandiford <richard.sandiford@arm.com>
674
675 * c-objc-common.c (useful_aka_type_p): New function.
676 (print_type): Use it to decide whether an aka type is worth printing.
677
59bc434a
JJ
6782019-09-27 Jakub Jelinek <jakub@redhat.com>
679
680 PR c++/88203
681 * c-parser.c (c_parser_predefined_identifier): New function.
682 (c_parser_postfix_expression): Use it.
683 (c_parser_omp_variable_list): Parse predefined identifiers.
684 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
685 in shared and firstprivate clauses, even when they are predetermined
686 shared.
687
c6447c20
RS
6882019-09-27 Richard Sandiford <richard.sandiford@arm.com>
689
690 * c-typeck.c (build_function_call_vec): Take the original function
691 decl as an optional final parameter. Pass all built-in calls to
692 check_builtin_function_arguments.
693
522da4c2
EB
6942019-09-20 Eric Botcazou <ebotcazou@adacore.com>
695
696 PR c/91815
697 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
698 of identifiers in the external scope only for variables and functions.
699
68e2c199
PK
7002019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
701
702 PR c/78736
703 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
704
22f8849d
IS
7052019-08-23 Iain Sandoe <iain@sandoe.co.uk>
706
707 PR pch/61250
708 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
709 after determining that the first token is not
710 PRAGMA_GCC_PCH_PREPROCESS.
711
db376f45
EB
7122019-08-22 Eric Botcazou <ebotcazou@adacore.com>
713
714 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
715 FUNCTION_DECL to the right value in the presence of nested declarators.
716
4d732405
RS
7172019-08-13 Richard Sandiford <richard.sandiford@arm.com>
718
719 PR middle-end/91421
720 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
721
cb1180d5
RS
7222019-08-13 Richard Sandiford <richard.sandiford@arm.com>
723
724 PR middle-end/91421
725 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
726 of a built_in_function.
727 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
728
77eb117f
JJ
7292019-08-10 Jakub Jelinek <jakub@redhat.com>
730
731 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
732 (c_parser_omp_clause_device_type): New function.
733 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
734 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
735 (c_parser_omp_declare_target): Handle device_type clauses. Remove
736 diagnostics for declare target with clauses nested in clause-less
737 declare target declaration-definition-seq.
738 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
739
2c3b8bad
JJ
7402019-08-09 Jakub Jelinek <jakub@redhat.com>
741
bb522e2e
JJ
742 * c-parser.c (check_no_duplicate_clause): Simplify using
743 omp_find_clause.
744 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
745 directive name modifiers.
746 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
747
2c3b8bad
JJ
748 PR c/91401
749 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
750 check_no_duplicate_clause call. Comment it out, instead emit a
751 warning for duplicate dist_schedule clauses.
752
99769e7f
RS
7532019-08-08 Richard Sandiford <richard.sandiford@arm.com>
754
755 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
756
8860d270
JJ
7572019-08-08 Jakub Jelinek <jakub@redhat.com>
758
759 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
760 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
761 instead of generic_head to track duplicates.
762
398e3feb
JJ
7632019-08-07 Jakub Jelinek <jakub@redhat.com>
764
765 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
766 (c_parser_omp_clause_use_device_addr): New function.
767 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
768 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
769 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
770 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
771 map or use_device_* clauses.
772 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
773 in OpenMP, require pointer type rather than pointer or array type.
774 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
775
a28351e7
JJ
7762019-07-31 Jakub Jelinek <jakub@redhat.com>
777
778 PR c/91192
779 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
780 even if finish is UNKNOWN_LOCATION, just use start as finish in that
781 case.
782
6343b6bf
ML
7832019-07-25 Martin Liska <mliska@suse.cz>
784 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
785
786 PR c++/23383
787 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
788
cb50701e
ML
7892019-07-25 Martin Liska <mliska@suse.cz>
790
791 * c-decl.c (merge_decls): Use new macros
792 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
793
62e3e66f
RB
7942019-07-23 Richard Biener <rguenther@suse.de>
795
796 PR tree-optimization/83518
797 * gimple-parser.c (c_parser_parse_gimple_body): When we have
798 a CFG also rebuild cgraph edges.
799
554a530f
JJ
8002019-07-20 Jakub Jelinek <jakub@redhat.com>
801
802 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
803 (c_parser_omp_clause_bind): New function.
804 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
805 (OMP_LOOP_CLAUSE_MASK): Define.
806 (c_parser_omp_loop): New function.
807 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
808 loop combined with parallel or teams.
809 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
810 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
811
d119bf79
RS
8122019-07-18 Richard Sandiford <richard.sandiford@arm.com>
813
814 PR c/53633
815 * c-decl.c (finish_function): Check targetm.warn_func_return
816 before issuing a -Wreturn-type warning.
817
ab20d992 8182019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
819
820 * gimple-parser.c (c_parser_gimple_try_stmt): New.
821 (c_parser_compound_statement): Call it.
822
1fdd6f04
JJ
8232019-07-12 Jakub Jelinek <jakub@redhat.com>
824
825 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
826 (c_parser_omp_clause_order): New function.
827 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
828 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
829 PRAGMA_OMP_CLAUSE_ORDER.
830 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
831
8389386c
RB
8322019-07-10 Richard Biener <rguenther@suse.de>
833
834 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
835 _Literal (int *) &x for address literals.
836
99b1c316
MS
8372019-07-09 Martin Sebor <msebor@redhat.com>
838
839 PR c++/61339
840 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
841 to class.
842 (field_decl_cmp): Same.
843 * c-parser.c (c_parser_struct_or_union_specifier): Same.
844 * c-tree.h: Same.
845 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
846
6c1dae73
MS
8472019-07-09 Martin Sebor <msebor@redhat.com>
848
849 PR c++/61339
850 * c-decl.c: Change class-key from class to struct and vice versa
851 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
852 * gimple-parser.c: Same.
853
69b5279e
RB
8542019-07-01 Richard Biener <rguenther@suse.de>
855
856 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
857 _Literal (char *) &"foo" for address literals pointing to
858 STRING_CSTs.
859
ab20d992
JJ
8602019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
861
862 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
863 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
864 C incompatibility if alternate "__intN__" form is used.
865
1e3d475e
MS
8662019-06-24 Martin Sebor <msebor@redhat.com>
867
868 * c-typeck.c (build_binary_op): Hyphenate floating-point.
869
bf38f7e9
JJ
8702019-06-10 Jakub Jelinek <jakub@redhat.com>
871
872 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
873 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
874 (c_parser_omp_scan_loop_body): New function.
875 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
876 inscan reduction clauses.
877 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
878 non-inscan reductions on the same construct, or inscan reductions with
879 ordered or schedule clauses, or inscan array reductions.
880
65985d78
MS
8812019-06-05 Martin Sebor <msebor@redhat.com>
882
883 PR c/90737
884 * c-typeck.c (c_finish_return): Only consider functions returning
885 pointers as candidates for -Wreturn-local-addr.
886
0ecf545c
MS
8872019-06-05 Martin Sebor <msebor@redhat.com>
888
889 * c-decl.c (start_decl): Adjust quoting and hyphenation
890 in diagnostics.
891 (finish_decl): Same.
892 (finish_enum): Same.
893 (start_function): Same.
894 (declspecs_add_type): Same.
895 * c-parser.c (warn_for_abs): Same.
896 * c-typeck.c (build_binary_op): Same.
897
e03436e7
TS
8982019-05-17 Thomas Schwinge <thomas@codesourcery.com>
899
b48f44bf
TS
900 PR c/89433
901 * c-parser.c (c_finish_oacc_routine): Rework checking if already
902 marked with an OpenACC 'routine' directive.
903
5bf04509
TS
904 PR c/89433
905 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
906 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
907
e03436e7
TS
908 PR c/89433
909 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
910 clauses from "omp declare target" attribute.
911
a9c697b8
MS
9122019-05-16 Martin Sebor <msebor@redhat.com>
913
ab20d992
JJ
914 * c-decl.c (start_decl): Quote keywords, operators, and
915 types in diagnostics.
916 (finish_decl): Same.
917 * c-parser.c (c_parser_asm_statement): Same.
918 (c_parser_conditional_expression): Same.
919 (c_parser_transaction_cancel): Same.
920 * c-typeck.c (c_common_type): Same.
921 (build_conditional_expr): Same.
922 (digest_init): Same.
923 (process_init_element): Same.
924 (build_binary_op): Same.
a9c697b8 925
c4499192
RB
9262019-05-17 Richard Biener <rguenther@suse.de>
927
928 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
929 (c_parser_gimple_unary_expression): Likewise.
930 (c_parser_gimple_parentized_ternary_expression): New function.
931
adfe6e4b
RB
9322019-05-16 Richard Biener <rguenther@suse.de>
933
934 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
935 (c_parser_gimple_unary_expression): Likewise.
936
186dabf2
RB
9372019-05-15 Richard Biener <rguenther@suse.de>
938
939 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
940 __BIT_FIELD_REF.
941
1158c5b4
RB
9422019-05-14 Richard Biener <rguenther@suse.de>
943
944 * gimple-parser.c (c_parser_gimple_statement): Remove
945 questionable auto-promotion to VIEW_CONVERT_EXPR.
946 (c_parser_gimple_typespec): Split out from __MEM parsing.
947 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
948 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
949 as __VIEW_CONVERT with -gimple.
950
fd4485aa
ML
9512019-05-09 Martin Liska <mliska@suse.cz>
952
953 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
954 __MAX.
955 (c_parser_gimple_unary_expression): Parse also binary expression
956 __MIN and __MAX.
957 (c_parser_gimple_parentized_binary_expression): New function.
958
d276406a
ML
9592019-05-09 Martin Liska <mliska@suse.cz>
960
961 * gimple-parser.c (struct gimple_parser): Add probability.
962 for gimple_parser_edge.
963 (gimple_parser::push_edge): Add new argument probability.
964 (c_parser_gimple_parse_bb_spec): Parse also probability
965 if present.
966 (c_parser_parse_gimple_body): Set edge probability.
967 (c_parser_gimple_compound_statement): Consume token
968 before calling c_parser_gimple_goto_stmt.
969 Parse BB counts.
970 (c_parser_gimple_statement): Pass new argument.
971 (c_parser_gimple_goto_stmt): Likewise.
972 (c_parser_gimple_if_stmt): Likewise.
973 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
974 * c-parser.c (c_parser_declaration_or_fndef): Pass
975 hot_bb_threshold argument.
976 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
977 field.
978 (c_parser_gimple_parse_bb_spec_edge_probability): New.
979
f179b64e
JJ
9802019-04-26 Jakub Jelinek <jakub@redhat.com>
981
982 PR debug/90197
983 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
984 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
985 (c_parser_do_statement): Likewise.
986 (c_parser_for_statement): Likewise. Formatting fixes.
987 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
988 emit DEBUG_BEGIN_STMTs if needed.
989
e7178413
JJ
9902019-04-19 Jakub Jelinek <jakub@redhat.com>
991
c280b7ee
JJ
992 PR c/89888
993 * c-typeck.c (struct c_switch): Remove outside_range_p member.
994 (c_start_case): Don't clear it.
995 (do_case): Adjust c_add_case_label caller.
996 (c_finish_case): Adjust c_do_switch_warnings caller.
997
e7178413
JJ
998 PR c++/90108
999 * c-decl.c (merge_decls): If remove is main variant and
1000 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1001 variant that has newdecl as TYPE_NAME if any.
1002
60a2c645
JJ
10032019-04-12 Jakub Jelinek <jakub@redhat.com>
1004
1005 PR c/89933
1006 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1007 don't try to remove it from the variant list, but instead assert
1008 it has no variants.
1009
2a82beaa
RB
10102019-04-01 Richard Biener <rguenther@suse.de>
1011
1012 PR c/71598
1013 * c-tree.h (c_get_alias_set): Declare.
1014 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1015 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1016 as the underlying integer type.
1017
bec1da64
MS
10182019-03-19 Martin Sebor <msebor@redhat.com>
1019
1020 PR tree-optimization/89688
1021 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1022 kinds of initializers.
1023
855cd9b1
JJ
10242019-03-19 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR c/89734
1027 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1028 return type even if quals_used is 0. Formatting fixes.
1029
baa09dc5
RB
10302019-03-14 Richard Biener <rguenther@suse.de>
1031
1032 * c-tree.h (enum c_declspec_il): New.
1033 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1034 enum bitfield.
1035 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1036 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1037 (c_parser_declspecs): Adjust.
1038 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1039 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1040 and bitmap.h.
1041 (struct gimple_parser): New.
1042 (gimple_parser::push_edge): New method.
1043 (c_parser_gimple_parse_bb_spec): New helper.
1044 (c_parser_parse_gimple_body): Get start pass and IL specification.
1045 Initialize SSA and CFG.
1046 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1047 Build a gimple_parser parsing state and pass it along.
1048 (c_parser_gimple_statement): Change intermittend __PHI internal
1049 function argument for the edge.
1050 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1051 (c_parser_gimple_goto_stmt): Record edges to build.
1052 (c_parser_gimple_if_stmt): Likewise.
1053 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1054 (c_parser_gimple_or_rtl_pass_list): Likewise.
1055
a3f9f006
ML
10562019-03-11 Martin Liska <mliska@suse.cz>
1057
1058 * c-decl.c (check_for_loop_decls): Wrap an option name
1059 in a string format message and fix GNU coding style.
1060 * c-parser.c (c_parser_declspecs): Likewise.
1061
1db01ff9
JJ
10622019-03-08 Jakub Jelinek <jakub@redhat.com>
1063
1064 PR tree-optimization/89550
1065 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1066 returned true.
1067 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1068 or warning returned true.
1069
66dcb747
JJ
10702019-02-28 Jakub Jelinek <jakub@redhat.com>
1071
1072 PR c/89525
1073 * c-typeck.c (convert_arguments): Call inform_declaration only if
1074 the previous warning_at call returned true.
1075
2263c9f2
TS
10762019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1077
1078 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1079 parameter. Adjust all users.
1080 (c_parser_oacc_simple_clause): Replace parser with loc formal
1081 parameter. Adjust all users.
1082
ab20d992 10832019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1084
1085 PR c/87924
1086 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1087 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1088
5f88ba10
JJ
10892019-02-15 Jakub Jelinek <jakub@redhat.com>
1090
1091 PR c/89340
1092 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1093 before c_decl_attributes rather than after it.
1094
cfc30fd1
JJ
10952019-02-06 Jakub Jelinek <jakub@redhat.com>
1096
1097 PR c/89211
1098 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1099 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1100 instead of 3 nested ifs.
1101
fbe83e6b
JM
11022019-02-06 Joseph Myers <joseph@codesourcery.com>
1103
1104 PR c/88584
1105 * c-decl.c (finish_decl): Do not complete array types for arrays
1106 with external linkage not at file scope.
1107
f461f938
RB
11082019-02-05 Richard Biener <rguenther@suse.de>
1109
1110 PR c/88606
1111 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1112 all type variants when not supported.
1113
fe509359
JJ
11142019-01-30 Jakub Jelinek <jakub@redhat.com>
1115
1116 PR c/89061
1117 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1118 * c-decl.c (decl_jump_unsafe): Return false for
1119 C_DECL_COMPOUND_LITERAL_P decls.
1120 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1121
6a335b96
JJ
11222019-01-29 Jakub Jelinek <jakub@redhat.com>
1123
f4b7e754
JJ
1124 PR c/89045
1125 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1126 scope.
1127
6a335b96
JJ
1128 PR c/86125
1129 * c-decl.c (last_fileptr_type): Remove.
1130 (last_structptr_types): New variable.
1131 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1132 {old,new}rettype instead of the types themselves. Assert
1133 last_structptr_types array has the same number of elements
1134 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1135 argument oldtype and newtype. Instead of handling
1136 just fileptr_type_node specially, handle all builtin_structptr_types
1137 pointer nodes. Formatting fix.
1138
d8b5a1a0
MS
11392019-01-24 Martin Sebor <msebor@redhat.com>
1140
1141 PR c/86125
1142 PR c/88886
1143 PR middle-end/86308
1144 * c-decl.c (match_builtin_function_types): Add arguments.
1145 (diagnose_mismatched_decls): Diagnose mismatched declarations
1146 of built-ins more strictly.
1147
e21c4491
JJ
11482019-01-24 Jakub Jelinek <jakub@redhat.com>
1149
1150 PR c++/88976
1151 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1152 on #pragma omp cancel with different modifiers.
1153
420183d9
L
11542019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1155
1156 PR c/51628
1157 PR c/88664
1158 * c-typeck.c (convert_for_assignment): Upate the
1159 warn_for_address_or_pointer_of_packed_member call.
1160
17ad43dd
TH
11612019-01-16 Tom Honermann <tom@honermann.net>
1162 Jason Merrill <jason@redhat.com>
1163
1164 * c-typeck.c (digest_init): Revised the error message produced for
1165 ill-formed cases of array initialization with a string literal.
1166 (error_init): Make variadic.
1167
5f07d78a
JJ
11682019-01-12 Jakub Jelinek <jakub@redhat.com>
1169
1170 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1171
c4581bbf
JJ
11722019-01-07 Jakub Jelinek <jakub@redhat.com>
1173
1174 PR c/88701
1175 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1176 if current_function_decl is non-NULL.
1177
65c5b1eb
JM
11782019-01-07 Joseph Myers <joseph@codesourcery.com>
1179
1180 PR c/88720
1181 PR c/88726
1182 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1183 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1184 functions declared but never defined only for external scope, not
1185 for other scopes.
1186
d8fcab68
JJ
11872019-01-07 Jakub Jelinek <jakub@redhat.com>
1188
1189 PR c++/85052
1190 * c-parser.c (c_parser_postfix_expression): Parse
1191 __builtin_convertvector.
1192
a5544970
JJ
11932019-01-01 Jakub Jelinek <jakub@redhat.com>
1194
1195 Update copyright years.
1196
da77eace
L
11972018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1198
1199 PR c/51628
1200 * c-typeck.c (convert_for_assignment): Call
1201 warn_for_address_or_pointer_of_packed_member.
1202
1edf8866
SB
12032018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1204
1205 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1206 a more specific error message (instead of just falling through).
1207
db4fd626
SB
12082018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1209
1210 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1211 asm qualifier is first seen; use that to give nicer "duplicate asm
1212 qualifier" messages. Delete 'quals" variable, instead pass the
1213 "is_volatile_ flag to build_asm_stmt directly.
1214 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1215 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1216
9c9cfcbb
SB
12172018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1218
1219 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1220 "done" boolean variable.
1221
a14feb3c
DM
12222018-12-19 David Malcolm <dmalcolm@redhat.com>
1223
1224 PR c++/87504
1225 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1226 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1227 (build_binary_op): Use struct op_location_t and
1228 class binary_op_rich_location.
1229
6d939173
JJ
12302018-12-11 Jakub Jelinek <jakub@redhat.com>
1231
1232 PR sanitizer/88426
1233 * c-convert.c (convert): Call c_fully_fold before calling
1234 ubsan_instrument_float_cast.
1235
b7055028
SB
12362018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1237
1238 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1239 setting "quals".
1240
5b76e75f
SB
12412018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1242
1243 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1244 after asm. Pass a flag for it to build_asm_expr.
1245 * c-tree.h (build_asm_expr): Update declaration.
1246 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1247 set ASM_INLINE_P.
1248
30bd42b9
SB
12492018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1250
1251 PR inline-asm/55681
1252 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1253 combination of volatile and goto, in any order, without repetitions.
1254
9df6c0e4
JB
12552018-12-04 James Norris <jnorris@codesourcery.com>
1256 Cesar Philippidis <cesar@codesourcery.com>
1257 Julian Brown <julian@codesourcery.com>
1258
1259 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1260 code.
1261
f44697b7
RB
12622018-11-30 Richard Biener <rguenther@suse.de>
1263
1264 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1265 _Literal (type) { ... } as empty aggregate or vector constructor.
1266
550dfbdc
MS
12672018-11-29 Martin Sebor <msebor@redhat.com>
1268
1269 PR c/88091
1270 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1271 (convert_arguments): Add comments. Pass additional argument to
1272 the function above.
1273
673670da
MS
12742018-11-29 Martin Sebor <msebor@redhat.com>
1275
1276 PR c/88172
1277 PR testsuite/88208
1278 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1279
db1d09b0
MS
12802018-11-23 Martin Sebor <msebor@redhat.com>
1281
1282 PR testsuite/88098
1283 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1284 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1285
98f08eb8
MS
12862018-11-20 Martin Sebor <msebor@redhat.com>
1287
1288 * c-parser.c (c_parser_has_attribute_expression): New function.
1289 (c_parser_attribute): New function.
1290 (c_parser_attributes): Move code into c_parser_attribute.
1291 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1292
cd5da983
MS
12932018-11-15 Martin Sebor <msebor@redhat.com>
1294
1295 PR c/83656
1296 * c-decl.c (header_for_builtin_fn): Declare.
1297 (diagnose_mismatched_decls): Diagnose declarations of built-in
1298 functions without a prototype.
1299 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1300 (convert_argument): Same.
1301 (convert_arguments): Factor code out into convert_argument.
1302 Detect mismatches between built-in formal arguments in calls
1303 to built-in without prototype.
1304 (build_conditional_expr): Same.
1305 (type_or_builtin_type): New function.
1306 (convert_for_assignment): Add argument. Conditionally issue
1307 warnings instead of errors for mismatches.
1308
620e594b
DM
13092018-11-13 David Malcolm <dmalcolm@redhat.com>
1310
1311 * c-decl.c: Replace "source_location" with "location_t".
1312 * c-tree.h: Likewise.
1313 * c-typeck.c: Likewise.
1314 * gimple-parser.c: Likewise.
1315
3179ebae
JJ
13162018-11-09 Jakub Jelinek <jakub@redhat.com>
1317
81a227c6
JJ
1318 * c-parser.c (c_parser_omp_clause_final): Use
1319 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1320 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1321 parsing instead of c_parser_paren_condition.
1322 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1323 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1324 c_fully_fold instead of c_parser_condition.
1325 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1326 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1327 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1328 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1329 c_parser_expr_no_commas instead of c_parser_expression.
1330
98c91c56
JJ
1331 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1332 reduction clause with inscan modifier.
1333
3179ebae
JJ
1334 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1335 clauses other than atomic_default_mem_order.
1336
28567c40
JJ
13372018-11-08 Jakub Jelinek <jakub@redhat.com>
1338
1339 * c-parser.c: Include memmode.h.
1340 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1341 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1342 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1343 task_reduction clauses.
1344 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1345 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1346 section, or lvalue assignment expression.
1347 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1348 (c_parser_omp_clause_lastprivate): Parse optional
1349 conditional: modifier.
1350 (c_parser_omp_clause_hint): Require constant integer expression rather
1351 than just integer expression.
1352 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1353 clause.
1354 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1355 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1356 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1357 functions.
1358 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1359 iterators. Parse mutexinoutset and depobj kinds.
1360 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1361 callers.
1362 (c_parser_omp_all_clauses): Likewise. Handle
1363 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1364 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1365 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1366 default memory order from requires directive if any. Adjust
1367 c_finish_omp_atomic caller.
1368 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1369 (c_parser_omp_flush): Parse flush with memory-order-clause.
1370 (c_parser_omp_for_loop): Allow NE_EXPR even in
1371 OpenMP loops, adjust c_finish_omp_for caller.
1372 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1373 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1374 Allow to be called while parsing combined parallel master.
1375 Parse combined master taskloop{, simd}.
1376 (c_parser_omp_parallel): Parse combined
1377 parallel master{, taskloop{, simd}} constructs.
1378 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1379 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1380 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1381 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1382 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1383 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1384 around teams body. Use SET_EXPR_LOCATION.
1385 (c_parser_omp_target_data): Allow target data
1386 with only use_device_ptr clauses.
1387 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1388 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1389 (c_parser_omp_requires): New function.
1390 (c_finish_taskloop_clauses): New function.
1391 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1392 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1393 declaration. Disallow in_reduction clause when combined with parallel
1394 master.
1395 (c_parser_omp_construct): Adjust c_parser_omp_master and
1396 c_parser_omp_taskgroup callers.
1397 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1398 other than cancel.
1399 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1400 like OMP_CLAUSE_REDUCTION.
1401 (handle_omp_array_sections): Likewise. Call save_expr on array
1402 reductions before calling build_index_type. Handle depend clauses
1403 with iterators.
1404 (struct c_find_omp_var_s): New type.
1405 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1406 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1407 with static, runtime or auto schedule kinds. Call save_expr for whole
1408 array reduction sizes. Diagnose reductions with zero sized elements
1409 or variable length structures. Diagnose nogroup clause used with
1410 reduction clause(s). Handle depend clause with
1411 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1412 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1413 some different type for other kinds. Use build_unary_op with
1414 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1415 Handle depend clauses with iterators. Remove no longer needed special
1416 case that predetermined const qualified vars may be specified in
1417 firstprivate clause. Complain if const qualified vars are mentioned
1418 in data-sharing clauses other than firstprivate or shared. Use
1419 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1420 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1421 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1422 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1423
7e2de6df
DM
14242018-10-29 David Malcolm <dmalcolm@redhat.com>
1425
1426 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1427 logic for change to name_hint::operator bool.
1428 (undeclared_variable): Likewise.
1429 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1430 (c_parser_parameter_declaration): Likewise.
1431
9f936c86
JM
14322018-10-17 Joseph Myers <joseph@codesourcery.com>
1433
1434 * c-errors.c (pedwarn_c11): New function.
1435 * c-parser.c (disable_extension_diagnostics): Save
1436 warn_c11_c2x_compat and set it to 0.
1437 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1438 (c_parser_static_assert_declaration_no_semi): Handle
1439 _Static_assert without string constant.
1440 * c-tree.h (pedwarn_c11): New prototype.
1441
033eb567
DM
14422018-10-17 David Malcolm <dmalcolm@redhat.com>
1443
1444 * Make-lang.in (selftest-c): New.
1445 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1446 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1447 from gcc/Makefile.in.
1448
0edf3afe
RB
14492018-10-02 Richard Biener <rguenther@suse.de>
1450
1451 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1452
8313a764
JM
14532018-09-26 Joseph Myers <joseph@codesourcery.com>
1454
1455 PR c/87390
1456 * c-typeck.c (build_binary_op): Use excess precision for
1457 comparisons of integers and floating-point for C11 and later.
1458
ce6f0888
MJ
14592018-09-26 Martin Jambor <mjambor@suse.cz>
1460
1461 PR c/87347
1462 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1463 comment.
ce6f0888 1464
9c4a4b3c
DM
14652018-09-17 David Malcolm <dmalcolm@redhat.com>
1466
1467 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1468 Update for new param.
1469 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1470 Likewise.
1471
80c6d1f4
MJ
14722018-09-17 Martin Jambor <mjambor@suse.cz>
1473
1474 PR c/63886
1475 * c-parser.c: (warn_for_abs): New function.
1476 (c_parser_postfix_expression_after_primary): Call it.
1477
4a426e36
BE
14782018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1479
1480 * c-typeck.c (digest_init): Shorten overlength strings.
1481
6d900107
BE
14822018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1483
1484 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1485
b5764229
BE
14862018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1487
1488 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1489 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1490
22eea6b2
AM
14912018-08-30 Alexander Monakov <amonakov@ispras.ru>
1492
1493 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1494 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1495
85204e23
DM
14962018-08-27 David Malcolm <dmalcolm@redhat.com>
1497
1498 PR 87091
1499 * c-decl.c (implicitly_declare): Update call to
1500 maybe_add_include_fixit to suggest overriding the location, as it
1501 is for a note.
1502 * c-objc-common.c (c_tree_printer): Update for conversion of
1503 show_caret_p to a tri-state.
1504
3d78e008
ML
15052018-08-27 Martin Liska <mliska@suse.cz>
1506
1507 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1508 fndecl_built_in_p and remove check for FUNCTION_DECL if
1509 possible.
3d78e008
ML
1510 (diagnose_mismatched_decls): Likewise.
1511 (merge_decls): Likewise.
1512 (warn_if_shadowing): Likewise.
1513 (pushdecl): Likewise.
1514 (implicitly_declare): Likewise.
1515 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1516 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1517 * c-typeck.c (build_function_call_vec): Likewise.
1518 (convert_arguments): Likewise.
1519
097f82ec
DM
15202018-08-20 David Malcolm <dmalcolm@redhat.com>
1521
1522 PR other/84889
1523 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1524 (diagnose_mismatched_decls): Likewise, in various places.
1525 (warn_if_shadowing): Likewise.
1526 (implicit_decl_warning): Likewise.
1527 (implicitly_declare): Likewise.
1528 (undeclared_variable): Likewise.
1529 (declare_label): Likewise.
1530 (grokdeclarator): Likewise.
1531 (start_function): Likewise.
1532 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1533 (c_parser_parameter_declaration): Likewise.
1534 (c_parser_binary_expression): Likewise.
1535 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1536 (parser_build_binary_op): Likewise.
1537 (build_unary_op): Likewise.
1538 (error_init): Likewise.
1539 (pedwarn_init): Likewise.
1540 (warning_init): Likewise.
1541 (convert_for_assignment): Likewise.
1542
96e6ae57
DM
15432018-08-15 David Malcolm <dmalcolm@redhat.com>
1544
1545 * c-objc-common.c: Include "gcc-rich-location.h".
1546 (c_tree_printer): Move implemenation of '%T' to...
1547 (print_type): ...this new function.
1548 (range_label_for_type_mismatch::get_text): New function.
1549 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1550 range for the various ic_argpass cases.
1551 (class maybe_range_label_for_tree_type_mismatch): New class.
1552 (build_binary_op): Use it when calling binary_op_error.
1553
0cd020ae 15542018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1555
0cd020ae
PK
1556 * c-decl.c (start_decl): Do not warn if variables is named as main
1557 and is a local variable.
1558
72733314
IS
15592018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1560
1561 PR c/19315
1562 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1563 objects of unknown size.
1564
23aa9f7c
MS
15652018-08-13 Martin Sebor <msebor@redhat.com>
1566
1567 PR tree-optimization/71625
1568 * c-parser.c (c_parser_declaration_or_fndef): Call
1569 braced_list_to_string.
1570
e5e7e50d
BH
15712018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1572
1573 PR c/86690
1574 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1575 errors.
1576
8a45b051
MS
15772018-08-01 Martin Sebor <msebor@redhat.com>
1578
1579 PR tree-optimization/86650
1580 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1581 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1582
5922dcb5
JJ
15832018-08-01 Jakub Jelinek <jakub@redhat.com>
1584
1585 PR c/85704
1586 * c-typeck.c (init_field_decl_cmp): New function.
1587 (output_pending_init_elements): Use it for field comparisons
1588 instead of pure bit_position comparisons.
1589
9b452033
JJ
15902018-07-12 Jakub Jelinek <jakub@redhat.com>
1591
1592 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1593 type here, instead add "omp declare target implicit" attribute.
1594 (finish_decl): Diagnose vars without mappable type here.
1595
ab20d992
JJ
15962018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1597 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1598 Cesar Philippidis <cesar@codesourcery.com>
1599
1600 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1601 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1602 to their non-present_or_* counterparts. Make 'self' an alias to
1603 PRAGMA_OACC_CLAUSE_HOST.
1604 (c_parser_oacc_data_clause): Update GOMP mappings for
1605 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1606 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1607 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1608 Remove support for present_or_* clauses.
1609 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1610 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1611 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1612 (OACC_DATA_CLAUSE_MASK): Likewise.
1613 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1614 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1615 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1616 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1617 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1618
e197e64e
KV
16192018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1620
1621 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1622 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1623 (c_parser_gimple_unary_expression): Likewise.
1624
487f2f61
JJ
16252018-06-15 Jakub Jelinek <jakub@redhat.com>
1626
1627 PR c/86093
1628 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1629 before doing POINTER_DIFF_EXPR.
1630
e4d44a37
MP
16312018-06-07 Marek Polacek <polacek@redhat.com>
1632
1633 PR c/85318
1634 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1635 for loop initial declarations.
1636
b67b9225
DP
16372018-05-30 David Pagan <dave.pagan@oracle.com>
1638
1639 PR c/55976
1640 * c-decl.c (grokdeclarator): Update check for return type warnings.
1641 (start_function): Likewise.
1642 (finish_function): Likewise.
1643 * c-typeck.c (c_finish_return): Update check for return type warnings.
1644 Pass OPT_Wreturn_type to pedwarn when appropriate.
1645
c566cc9f
RS
16462018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1647
1648 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1649 __FMA_EXPR handlng.
1650
e4f81565
RS
16512018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1652
1653 * gimple-parser.c: Include internal-fn.h.
1654 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1655 (c_parser_gimple_call_internal): New function.
1656 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1657 Fix typos in comment.
1658
79e7b1fe
JJ
16592018-05-10 Jakub Jelinek <jakub@redhat.com>
1660
1661 PR c++/85662
1662 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1663 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1664 fold_convert_loc.
1665 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1666 fold_offsetof_1, pass argtype as TYPE to it and drop the
1667 fold_convert_loc.
1668
f7584c81
DP
16692018-05-02 David Pagan <dave.pagan@oracle.com>
1670
1671 PR c/30552
1672 * c-decl.c (old_style_parameter_scope): New function.
1673 * c-parser.c (c_parser_postfix_expression): Check for statement
1674 expressions in old-style function parameter list declarations.
1675 * c-parser.h (old_style_parameter_scope): New extern declaration.
1676
b33a0cb3
JJ
16772018-04-25 Jakub Jelinek <jakub@redhat.com>
1678
1679 PR sanitizer/84307
1680 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1681 it is not TREE_STATIC.
1682 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1683 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1684 its COMPOUND_LITERAL_EXPR_DECL.
1685
c5c5822a
JM
16862018-03-21 Joseph Myers <joseph@codesourcery.com>
1687
1688 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1689 where all functions return the same _FloatN or _FloatNx type,
1690 treat integer types as _Float64 instead of double.
1691
aa1c9429
JJ
16922018-03-21 Jakub Jelinek <jakub@redhat.com>
1693
1694 PR c/84999
1695 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1696 building vector comparison, diagnose it and return error_mark_node.
1697
9bb45a95
JJ
16982018-03-15 Jakub Jelinek <jakub@redhat.com>
1699
1700 PR c/84853
1701 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1702 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1703 INTEGER_TYPE element type.
1704
ada6bad9
DP
17052018-03-13 David Pagan <dave.pagan@oracle.com>
1706
1707 PR c/46921
1708 * c-typeck.c (output_init_element): Ensure field initializer
1709 expression is always evaluated if there are side effects.
1710
849bbdb9
JJ
17112018-03-06 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR c/84721
1714 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1715 !building_stmt_list_p ().
1716
d74641bd
RS
17172018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1718
1719 PR c/84305
1720 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1721 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1722 and include the BIND_EXPR in the list of things that need to be
1723 pre-evaluated.
1724
0444aa9c
NS
17252018-02-09 Nathan Sidwell <nathan@acm.org>
1726
1727 PR c/84293
1728 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1729 to strict_aliasing_warning.
1730
7c30b12a
PC
17312018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1732
1733 * c-typeck.c (really_start_incremental_init, push_init_level,
1734 set_nonincremental_init, output_init_element, process_init_element):
1735 Use DECL_UNNAMED_BIT_FIELD.
1736
2be4dfcb
MP
17372018-01-31 Marek Polacek <polacek@redhat.com>
1738
1739 PR c/81779
1740 * c-parser.c (c_parser_compound_statement_nostart): Call
1741 expansion_point_location_if_in_system_header.
1742
bb9869d5
DM
17432018-01-17 David Malcolm <dmalcolm@redhat.com>
1744
1745 PR c++/83814
1746 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1747 the C part.
1748
b4923738
JJ
17492018-01-13 Jakub Jelinek <jakub@redhat.com>
1750
1751 PR c/83801
1752 * c-tree.h (decl_constant_value_1): Add a bool argument.
1753 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1754 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1755 (decl_constant_value): Adjust caller.
1756 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1757 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1758 decl_constant_value returns initializer that has BLKmode or
1759 array type.
1760 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1761
928686b1
RS
17622018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1763 Alan Hayward <alan.hayward@arm.com>
1764 David Sherwood <david.sherwood@arm.com>
1765
1766 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1767 TYPE_VECTOR_SUBPARTS.
1768
85ec4feb
JJ
17692018-01-03 Jakub Jelinek <jakub@redhat.com>
1770
1771 Update copyright years.
1772
913884f7
JJ
17732018-01-01 Jakub Jelinek <jakub@redhat.com>
1774
1775 PR c/83595
1776 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1777 c_parser_conditional_expression, c_parser_cast_expression,
1778 c_parser_sizeof_expression, c_parser_alignof_expression,
1779 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1780 c_parser_transaction_expression): Use set_error () method instead
1781 of setting value member to error_mark_node.
1782
c6cfa2bf
MM
17832017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1784
1785 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1786 and _Float<N>X built-in functions.
1787
11d29d63
JJ
17882017-12-22 Jakub Jelinek <jakub@redhat.com>
1789
14ec014e
JJ
1790 PR debug/83550
1791 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1792 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1793 incomplete vars rather than after it.
1794
11d29d63
JJ
1795 PR debug/83547
1796 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1797 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1798 and consider empty ones if there are no other stmts. For
1799 -Wunused-value walk all statements before the one only followed by
1800 DEBUG_BEGIN_STMTs.
1801
170a8bd6 18022017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1803 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1804
1805 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1806 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1807 (c_parser_do_statement): Likewise.
1808 (c_parser_for_statement): Likewise.
1809 (c_parser_statement_after_labels): Adjust calls to above.
1810 (c_parse_pragma_ivdep): New static function.
1811 (c_parser_pragma_unroll): Likewise.
1812 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1813 <PRAGMA_UNROLL>: New case.
1814
01512446
JJ
18152017-12-19 Jakub Jelinek <jakub@redhat.com>
1816
1817 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1818 perform_integral_promotions, digest_init): Replace Yoda conditions
1819 with typical order conditions.
1820 * c-decl.c (check_bitfield_type_and_width): Likewise.
1821
c65e18d3
BE
18222017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1823
1824 * c-typeck.c (c_safe_arg_type_equiv_p,
1825 c_safe_function_type_cast_p): New function.
1826 (build_c_cast): Implement -Wcast-function-type.
1827
b7280579
RB
18282017-12-14 Richard Biener <rguenther@suse.de>
1829
1830 PR c/83415
1831 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1832 like REALPART_EXPR for the behavior of whether its operand
1833 is an lvalue.
1834
49e6a6c0
MP
18352017-12-12 Marek Polacek <polacek@redhat.com>
1836
1837 PR c/82679
1838 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1839
ab20d992 18402017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1841
1842 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1843 * c-parser.c (add_debug_begin_stmt): New.
1844 (c_parser_declaration_or_fndef): Call it.
1845 (c_parser_compound_statement_nostart): Likewise.
1846 (c_parser_statement_after_labels): Likewise.
1847 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1848
4b2b493f
JM
18492017-12-07 Joseph Myers <joseph@codesourcery.com>
1850
1851 * c-decl.c (build_compound_literal): Add parameter alignas_align
1852 and set alignment of decl if nonzero.
1853 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1854 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1855 qualifier.
1856 (c_parser_struct_declaration): Update syntax comment.
1857 (c_parser_type_name): Add alignas_ok argument and pass it to
1858 c_parser_declspecs.
1859 (c_parser_cast_expression): Pass true to c_parser_type_name and
1860 give error if a cast used an _Alignas specifier.
1861 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1862 give error if sizeof (type-name) used an _Alignas specifier.
1863 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1864 give error if _Alignof (type-name) used an _Alignas specifier.
1865 (c_parser_postfix_expression_after_paren_type): Check specified
1866 alignment for a compound literal and pass it to
1867 build_compound_literal.
1868 * c-parser.h (c_parser_type_name): Update prototype.
1869 * c-tree.h (build_compound_literal): Update prototype.
1870
5d9ae53d
MS
18712017-12-07 Martin Sebor <msebor@redhat.com>
1872
1873 PR c/81544
1874 * c-decl.c (c_decl_attributes): Look up existing declaration and
1875 pass it to decl_attributes.
1876
c79144f8
DM
18772017-12-06 David Malcolm <dmalcolm@redhat.com>
1878
1879 PR c/83236
1880 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1881 reserved for use by the implementation.
1882
613bc14f
DM
18832017-12-06 David Malcolm <dmalcolm@redhat.com>
1884
1885 * c-decl.c: Include "c-family/c-spellcheck.h".
1886
05abad4c
ML
18872017-12-05 Martin Liska <mliska@suse.cz>
1888 Jakub Jelinek <jakub@redhat.com>
1889
1890 * c-typeck.c (pointer_diff): Add new argument and instrument
1891 pointer subtraction.
1892 (build_binary_op): Similar for pointer comparison.
1893
cc6534d4
JJ
18942017-12-01 Jakub Jelinek <jakub@redhat.com>
1895
65791f42
JJ
1896 PR c/79153
1897 * c-parser.c: Include tree-iterator.h.
1898 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1899 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1900 on it.
1901
cc6534d4
JJ
1902 PR c/83222
1903 * c-tree.h (decl_constant_value_1): Declare.
1904 * c-typeck.c (decl_constant_value_1): New function.
1905 (decl_constant_value): Use it.
1906 * c-fold.c (c_fully_fold_internal): If in_init, use
1907 decl_constant_value_1 instead of decl_constant_value.
1908
5de73c05
JJ
19092017-11-30 Jakub Jelinek <jakub@redhat.com>
1910
1911 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1912
058f0b9e
JJ
19132017-11-28 Jakub Jelinek <jakub@redhat.com>
1914
1915 PR sanitizer/81275
1916 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1917 c_switch_covers_all_cases_p returns true.
1918
5e9d6aa4 19192017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1920 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1921
1922 * Make-lang.in (c/c-array-notation.o): Remove.
1923 * c-array-notation.c: Delete.
1924 * c-decl.c: Remove cilkplus condition.
1925 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1926 c_parser_cilk_verify_simd, c_parser_array_notation,
1927 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1928 c_parser_cilk_simd_fn_vector_attrs,
1929 c_finish_cilk_simd_fn_tokens): Delete.
1930 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1931 (c_parser_direct_declarator_inner): Ditto.
1932 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1933 (c_parser_attributes, c_parser_compound_statement,
1934 c_parser_statement_after_labels, c_parser_if_statement,
1935 c_parser_switch_statement, c_parser_while_statement,
1936 c_parser_do_statement, c_parser_for_statement,
1937 c_parser_unary_expression, c_parser_postfix_expression,
1938 c_parser_postfix_expression_after_primary,
1939 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1940 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1941 support.
1942 * c-typeck.c (build_array_ref, build_function_call_vec,
1943 convert_arguments,
1944 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1945 c_finish_loop, build_binary_op): Remove cilkplus support.
1946
9e851845
JJ
19472017-11-28 Jakub Jelinek <jakub@redhat.com>
1948
1949 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1950 of build3.
1951
ab20d992 19522017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1953
1954 * Make-lang.in (c.install-plugin): Install backend import library.
1955
41521dee
JJ
19562017-11-23 Jakub Jelinek <jakub@redhat.com>
1957
1958 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1959 pragma_stmt context.
1960
ac9effed
EB
19612017-11-23 Mike Stump <mikestump@comcast.net>
1962 Eric Botcazou <ebotcazou@adacore.com>
1963
1964 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1965 ANNOTATE_EXPR.
1966 (c_parser_do_statement): Likewise.
1967 (c_parser_for_statement): Likewise.
1968
ce95abc4
DM
19692017-11-22 David Malcolm <dmalcolm@redhat.com>
1970
1971 PR c++/62170
1972 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1973 bool to bool *. Within '%T' handling, if showing an "aka", use
1974 "quoted" param to add appropriate quoting.
1975
974aedcc
MP
19762017-11-22 Marek Polacek <polacek@redhat.com>
1977
1978 PR c++/60336
1979 PR middle-end/67239
1980 PR target/68355
1981 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1982
d4300cc6
DM
19832017-11-21 David Malcolm <dmalcolm@redhat.com>
1984
1985 PR c/83056
1986 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1987 earlier failed lookups.
1988
1af4ebf5
MG
19892017-11-21 Marc Glisse <marc.glisse@inria.fr>
1990
1991 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1992 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1993
26edace6
DM
19942017-11-20 David Malcolm <dmalcolm@redhat.com>
1995
1996 PR c/81404
1997 * c-decl.c: Include "c-family/known-headers.h".
1998 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1999 to known-headers.cc.
2000 (class suggest_missing_header): Move to known-header.h.
2001 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2002 than get_c_name_hint.
2003
b1212255
DM
20042017-11-20 David Malcolm <dmalcolm@redhat.com>
2005
2006 * c-decl.c (get_c_name_hint): New function.
2007 (class suggest_missing_header): New class.
2008 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2009 suggest missing headers to the user.
2010
6c7a259b
DM
20112017-11-20 David Malcolm <dmalcolm@redhat.com>
2012
2013 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2014 Include "c-family/name-hint.h"
2015 (implicit_decl_warning): Convert "hint" from
2016 const char * to name_hint. Pass location to
2017 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2018 warning was not printed.
2019 (undeclared_variable): Likewise for "guessed_id".
2020 (lookup_name_fuzzy): Convert return type from const char *
2021 to name_hint. Add location_t param.
2022 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2023 Include "c-family/name-hint.h"
2024 (c_parser_declaration_or_fndef): Convert "hint" from
2025 const char * to name_hint. Pass location to lookup_name_fuzzy.
2026 (c_parser_parameter_declaration): Likewise.
2027
f9c59f7e
JJ
20282017-11-19 Jakub Jelinek <jakub@redhat.com>
2029
2030 PR c/66618
2031 PR c/69960
2032 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2033 where needed.
2034 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2035 handle_omp_array_sections): Likewise.
2036 (digest_init): Don't call decl_constant_value_for_optimization.
2037 * c-tree.h (decl_constant_value_for_optimization): Removed.
2038 * c-fold.c (c_fold_array_ref): New function.
2039 (c_fully_fold_internal): Add LVAL argument, propagate it through
2040 recursive calls. For VAR_P call decl_constant_value and
2041 unshare if not LVAL and either optimizing or IN_INIT. Remove
2042 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2043 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2044 (c_fully_fold): Add LVAL argument, pass it through to
2045 c_fully_fold_internal.
2046 (decl_constant_value_for_optimization): Removed.
2047
3ca0dc60
JM
20482017-11-15 Joseph Myers <joseph@codesourcery.com>
2049
2050 PR c/81156
2051 * c-parser.c (check_tgmath_function): New function.
2052 (enum tgmath_parm_kind): New enum.
2053 (c_parser_postfix_expression): Handle __builtin_tgmath.
2054
64a5912c
DM
20552017-10-31 David Malcolm <dmalcolm@redhat.com>
2056
2057 * c-decl.c (implicit_decl_warning): Update for renaming of
2058 pedwarn_at_rich_loc and warning_at_rich_loc.
2059 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2060 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2061 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2062 (c_parser_struct_or_union_specifier): Likewise for renaming of
2063 pedwarn_at_rich_loc.
2064 (c_parser_parameter_declaration): Likewise for renaming of
2065 error_at_rich_loc.
2066 * c-typeck.c (build_component_ref): Likewise.
2067 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2068 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2069 (set_init_label): Likewise for renaming of error_at_rich_loc.
2070
c1136864
RB
20712017-10-30 Richard Biener <rguenther@suse.de>
2072
2073 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2074 stmts.
2075
ee5fd23a
MM
20762017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2077
2078 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2079 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2080
1a59ccf2
DM
20812017-10-25 David Malcolm <dmalcolm@redhat.com>
2082
2083 PR c/7356
2084 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2085 semicolons.
2086
bc1a75dd
JJ
20872017-10-25 Jakub Jelinek <jakub@redhat.com>
2088
2089 PR libstdc++/81706
2090 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2091 newdecl to corresponding __builtin_ if any.
2092
ff1ff960
PC
20932017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2094
2095 PR c++/82466
2096 * c-decl.c (diagnose_mismatched_decls): Use
2097 OPT_Wbuiltin_declaration_mismatch.
2098
62e1c678
DM
20992017-10-12 David Malcolm <dmalcolm@redhat.com>
2100
2101 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2102 use it to guard calls to maybe_suggest_missing_token_insertion.
2103 (c_parser_parms_list_declarator): Override default value of new
2104 "type_is_unique" param to c_parser_require.
2105 (c_parser_asm_statement): Likewise.
2106 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2107 defaulting to true.
2108
a92f6726
NS
21092017-10-11 Nathan Sidwell <nathan@acm.org>
2110
2111 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2112
8e6cdc90
RS
21132017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2114
2115 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2116 operating on trees as wide_ints.
2117 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2118 (c_tree_equal): Likewise.
2119
8139a48e
DM
21202017-10-04 David Malcolm <dmalcolm@redhat.com>
2121
2122 * c-decl.c (push_parm_decl): Store c_parm's location into the
2123 PARAM_DECL.
2124 (build_c_parm): Add "loc" param and store it within the c_parm.
2125 * c-parser.c (struct c_parser): Add "last_token_location" field.
2126 (c_parser_consume_token): Store location of the token into the
2127 new field.
2128 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2129 when handling a FUNCTION_DECL, if it doesn't already have them.
2130 (c_parser_parameter_declaration): Generate a location for the
2131 parameter, and pass it to the call to build_c_parm.
2132 * c-tree.h (struct c_parm): Add field "loc".
2133 (build_c_parm): Add location_t param.
2134 * c-typeck.c (get_fndecl_argument_location): New function.
2135 (inform_for_arg): New function.
2136 (convert_for_assignment): Use inform_for_arg when dealing with
2137 ic_argpass.
2138
2a389958
JJ
21392017-09-29 Jakub Jelinek <jakub@redhat.com>
2140
7d386d45
JJ
2141 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2142 width is non-NULL.
2143 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2144 don't SET_DECL_C_BIT_FIELD here.
2145
2a389958
JJ
2146 PR c/82340
2147 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2148 instead of trying to set just TREE_READONLY manually.
2149
ebc6a85e
TV
21502017-09-16 Tom de Vries <tom@codesourcery.com>
2151
2152 PR c/81875
2153 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2154 cond itself.
2155
bb75facd
JM
21562017-09-15 Joseph Myers <joseph@codesourcery.com>
2157
2158 PR c/82071
2159 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2160 for C11.
2161 (build_conditional_expr): For C11, generate result with excess
2162 precision when one argument is an integer and the other is of a
2163 type using excess precision.
2164
1d933576
BE
21652017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2166
2167 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2168
267bbb6f
MP
21692017-09-13 Marek Polacek <polacek@redhat.com>
2170
2171 PR c/82167
2172 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2173 than expr.original_type.
2174
6836632e
NS
21752017-09-12 Nathan Sidwell <nathan@acm.org>
2176
2177 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2178 resort_sorted_fields): Moved from c-family/c-common.c.
2179 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2180
e035be33
JM
21812017-09-01 Joseph Myers <joseph@codesourcery.com>
2182
2183 PR c/82071
2184 * c-typeck.c (build_atomic_assign): Handle argument with excess
2185 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2186 argument passed to build_binary_op and convert_for_assignment but
2187 not for call to c_fully_fold.
2188 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2189 Ensure build_binary_op is called with argument with original
2190 semantic type. Avoid calling c_fully_fold with an
2191 EXCESS_PRECISION_EXPR from build_binary_op.
2192
d2e05fcb
JJ
21932017-09-01 Jakub Jelinek <jakub@redhat.com>
2194
2195 PR c/81887
2196 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2197
b397965c
RS
21982017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2199 Alan Hayward <alan.hayward@arm.com>
2200 David Sherwood <david.sherwood@arm.com>
2201
2202 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2203 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2204 m1 and m2 to the signed equivalent of a fixed-point
2205 SCALAR_TYPE_MODE.
2206
14e18d71
DM
22072017-08-24 David Malcolm <dmalcolm@redhat.com>
2208
2209 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2210 than CAN_HAVE_LOCATION_P when determining whether to use the
2211 location_t value within "value".
2212
7f204c0f
DM
22132017-08-21 David Malcolm <dmalcolm@redhat.com>
2214
2215 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2216 rather than peeking the location of the first token.
2217 * c-tree.h (c_expr::get_location): New method.
2218
2f687306
DM
22192017-08-21 David Malcolm <dmalcolm@redhat.com>
2220
2221 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2222 to check_function_arguments.
2223
3e7b80d7
MP
22242017-08-18 Marek Polacek <polacek@redhat.com>
2225
2226 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2227 commentary.
2228
00aa1fa2
L
22292017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2230
2231 PR c/53037
2232 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2233 (check_bitfield_type_and_width): Don't allow bit-field with
2234 warn_if_not_aligned type.
2235
da67acb9
MS
22362017-08-14 Martin Sebor <msebor@redhat.com>
2237
2238 PR c/81117
2239 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2240
bb85aa74
MP
22412017-08-11 Marek Polacek <polacek@redhat.com>
2242
2243 PR c/81795
2244 * c-decl.c (pushtag): Only print inform if the warning was printed.
2245 (grokdeclarator): Likewise.
2246
32129a17
DM
22472017-08-10 David Malcolm <dmalcolm@redhat.com>
2248
2249 * c-parser.c (c_parser_error): Rename to...
2250 (c_parser_error_richloc): ...this, making static, and adding
2251 "richloc" parameter, passing it to the c_parse_error call,
2252 rather than calling c_parser_set_source_position_from_token.
2253 (c_parser_error): Reintroduce, reimplementing in terms of the
2254 above, converting return type from void to bool.
2255 (class token_pair): New class.
2256 (struct matching_paren_traits): New struct.
2257 (matching_parens): New typedef.
2258 (struct matching_brace_traits): New struct.
2259 (matching_braces): New typedef.
2260 (get_matching_symbol): New function.
2261 (c_parser_require): Add param MATCHING_LOCATION, using it to
2262 highlight matching "opening" tokens for missing "closing" tokens.
2263 (c_parser_skip_until_found): Likewise.
2264 (c_parser_static_assert_declaration_no_semi): Convert explicit
2265 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2266 class matching_parens, so that the pertinent open parenthesis is
2267 highlighted when there are problems locating the close
2268 parenthesis.
2269 (c_parser_struct_or_union_specifier): Likewise.
2270 (c_parser_typeof_specifier): Likewise.
2271 (c_parser_alignas_specifier): Likewise.
2272 (c_parser_simple_asm_expr): Likewise.
2273 (c_parser_braced_init): Likewise, for matching_braces.
2274 (c_parser_paren_condition): Likewise, for matching_parens.
2275 (c_parser_switch_statement): Likewise.
2276 (c_parser_for_statement): Likewise.
2277 (c_parser_asm_statement): Likewise.
2278 (c_parser_asm_operands): Likewise.
2279 (c_parser_cast_expression): Likewise.
2280 (c_parser_sizeof_expression): Likewise.
2281 (c_parser_alignof_expression): Likewise.
2282 (c_parser_generic_selection): Likewise.
2283 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2284 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2285 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2286 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2287 c_parser_skip_until_found call.
2288 (c_parser_objc_class_definition): Use class matching_parens as
2289 above.
2290 (c_parser_objc_method_decl): Likewise.
2291 (c_parser_objc_try_catch_finally_statement): Likewise.
2292 (c_parser_objc_synchronized_statement): Likewise.
2293 (c_parser_objc_at_property_declaration): Likewise.
2294 (c_parser_oacc_wait_list): Likewise.
2295 (c_parser_omp_var_list_parens): Likewise.
2296 (c_parser_omp_clause_collapse): Likewise.
2297 (c_parser_omp_clause_default): Likewise.
2298 (c_parser_omp_clause_if): Likewise.
2299 (c_parser_omp_clause_num_threads): Likewise.
2300 (c_parser_omp_clause_num_tasks): Likewise.
2301 (c_parser_omp_clause_grainsize): Likewise.
2302 (c_parser_omp_clause_priority): Likewise.
2303 (c_parser_omp_clause_hint): Likewise.
2304 (c_parser_omp_clause_defaultmap): Likewise.
2305 (c_parser_oacc_single_int_clause): Likewise.
2306 (c_parser_omp_clause_ordered): Likewise.
2307 (c_parser_omp_clause_reduction): Likewise.
2308 (c_parser_omp_clause_schedule): Likewise.
2309 (c_parser_omp_clause_num_teams): Likewise.
2310 (c_parser_omp_clause_thread_limit): Likewise.
2311 (c_parser_omp_clause_aligned): Likewise.
2312 (c_parser_omp_clause_linear): Likewise.
2313 (c_parser_omp_clause_safelen): Likewise.
2314 (c_parser_omp_clause_simdlen): Likewise.
2315 (c_parser_omp_clause_depend): Likewise.
2316 (c_parser_omp_clause_map): Likewise.
2317 (c_parser_omp_clause_device): Likewise.
2318 (c_parser_omp_clause_dist_schedule): Likewise.
2319 (c_parser_omp_clause_proc_bind): Likewise.
2320 (c_parser_omp_clause_uniform): Likewise.
2321 (c_parser_omp_for_loop): Likewise.
2322 (c_parser_cilk_clause_vectorlength): Likewise.
2323 (c_parser_cilk_clause_linear): Likewise.
2324 (c_parser_transaction_expression): Likewise.
2325 * c-parser.h (c_parser_require): Add param matching_location with
2326 default UNKNOWN_LOCATION.
2327 (c_parser_error): Convert return type from void to bool.
2328 (c_parser_skip_until_found): Add param matching_location with
2329 default UNKNOWN_LOCATION.
2330
30af3a2b
MP
23312017-08-09 Marek Polacek <polacek@redhat.com>
2332
2333 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2334 * c-tree.h (build_external_ref): Update declaration.
2335 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2336 (build_external_ref): Change the type of a parameter to bool.
2337 (parser_build_binary_op): Use true/false instead of 1/0.
2338 (pointer_diff): Likewise.
2339 (build_modify_expr): Likewise.
2340 (set_designator): Change the type of a parameter to bool.
2341 (set_init_index): Use true/false instead of 1/0.
2342 (set_init_label): Likewise.
2343 (output_init_element): Change the type of a parameter to bool.
2344 (output_pending_init_elements): Use true/false instead of 1/0.
2345 (process_init_element): Likewise.
2346 (build_binary_op): Change the type of a parameter to bool.
2347
296c53ac
MP
23482017-08-09 Marek Polacek <polacek@redhat.com>
2349
2350 PR c/81233
2351 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2352 Call emit_diagnostic_valist instead of pedwarn.
2353 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2354 Print the relevant types in diagnostics.
2355
a32c8316
MP
23562017-08-09 Marek Polacek <polacek@redhat.com>
2357
2358 PR c/81417
2359 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2360 build_conditional_expr.
a32c8316
MP
2361 * c-parser.c (c_parser_conditional_expression): Create locations for
2362 EXP1 and EXP2 from their source ranges. Pass the locations down to
2363 build_conditional_expr.
2364 * c-tree.h (build_conditional_expr): Update declaration.
2365 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2366 For -Wsign-compare, also print the types.
2367
314e6352
ML
23682017-08-08 Martin Liska <mliska@suse.cz>
2369
2370 * c-convert.c: Include header files.
2371 * c-typeck.c: Likewise.
2372
577eec56
ML
23732017-08-07 Martin Liska <mliska@suse.cz>
2374
2375 * c-parser.c (c_parser_attributes): Canonicalize name of an
2376 attribute.
2377
f7b6353a
MP
23782017-08-02 Marek Polacek <polacek@redhat.com>
2379
2380 PR c/81289
2381 * c-parser.c (c_parser_unary_expression): Use set_error.
2382
8a6eab34
MP
2383 PR c/81448
2384 PR c/81306
2385 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2386 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2387
ab20d992 23882017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2389 Martin Liska <mliska@suse.cz>
2390
2391 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2392 statement.
7fef86d3 2393
f34ebeb2
ML
23942017-07-31 Martin Liska <mliska@suse.cz>
2395
2396 PR sanitize/81530
2397 * c-convert.c (convert): Guard condition with flag_sanitize_p
2398 also with current_function_decl non-null equality.
2399 * c-decl.c (grokdeclarator): Likewise.
2400 * c-typeck.c (build_binary_op): Likewise.
2401
8595f67b
MP
24022017-07-25 Marek Polacek <polacek@redhat.com>
2403
2404 * c-decl.c (grokfield): Remove local variable.
2405
d49718d6
MP
24062017-07-25 Marek Polacek <polacek@redhat.com>
2407
2408 PR c/81364
2409 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2410 macro expansion if the body is in { }.
2411 (c_parser_while_statement): Likewise.
2412 (c_parser_for_statement): Likewise.
2413
ff22eb12
NS
24142017-07-18 Nathan Sidwell <nathan@acm.org>
2415
2416 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2417
eea77d1f
DM
24182017-07-14 David Malcolm <dmalcolm@redhat.com>
2419
2420 * c-decl.c (implicitly_declare): When suggesting a missing
2421 #include, provide a fix-it hint.
2422
b6f43128
DM
24232017-07-06 David Malcolm <dmalcolm@redhat.com>
2424
2425 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2426 and call that instead.
2427 * c-tree.h (selftest::run_c_tests): New decl.
2428
3e2becc4
MP
24292017-06-26 Marek Polacek <polacek@redhat.com>
2430
2431 PR c/80116
2432 * c-parser.c (c_parser_if_body): Set the location of the
2433 body of the conditional after parsing all the labels. Call
2434 warn_for_multistatement_macros.
2435 (c_parser_else_body): Likewise.
2436 (c_parser_switch_statement): Likewise.
2437 (c_parser_while_statement): Likewise.
2438 (c_parser_for_statement): Likewise.
2439 (c_parser_statement): Add a default argument. Save the location
2440 after labels have been parsed.
2441 (c_parser_c99_block_statement): Likewise.
2442
343ae898
RB
24432017-06-19 Richard Biener <rguenther@suse.de>
2444
2445 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2446 negated _Literals to parse _Literal (int) -1.
2447
45b2222a
ML
24482017-06-13 Martin Liska <mliska@suse.cz>
2449
2450 PR sanitize/78204
2451 * c-convert.c (convert): Use sanitize_flags_p.
2452 * c-decl.c (grokdeclarator): Likewise.
2453 * c-typeck.c (convert_for_assignment): Likewise.
2454 (c_finish_return): Likewise.
2455 (build_binary_op): Likewise.
2456
8ab7005b
JJ
24572017-06-08 Jakub Jelinek <jakub@redhat.com>
2458
2459 PR c/81006
2460 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2461 to sizetype before size_binop.
2462
363dc72c
JJ
24632017-06-07 Jakub Jelinek <jakub@redhat.com>
2464
2465 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2466 of TDI_generic.
2467
dc949728
MP
24682017-06-06 Marek Polacek <polacek@redhat.com>
2469
2470 PR c/79983
2471 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2472 ref.
2473 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2474
40ffd95f
BE
24752017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2476
2477 * c-parser.c (c_parser_binary_expression): Implement the
2478 -Wsizeof_pointer_div warning.
2479 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2480 from a parenthesized expression.
2481 (c_parser_expr_list): Use c_last_sizeof_loc.
2482 * c-tree.h (c_last_sizeof_loc): New external.
2483 * c-typeck.c (c_last_sizeof_loc): New variable.
2484 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2485
9fc5e7a4
MM
24862017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2487
2488 PR testsuite/80580
2489 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2490
f012c8ef
DM
24912017-05-30 David Malcolm <dmalcolm@redhat.com>
2492
2493 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2494 parameters.
2495
3cd211af
MS
24962017-05-24 Martin Sebor <msebor@redhat.com>
2497
2498 PR c/80731
2499 * c-fold.c (c_fully_fold_internal): Adjust.
2500 * c-typeck.c (parser_build_unary_op): Adjust.
2501
fd71a9a2
TS
25022017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2503
2504 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2505 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2506 "VECTOR_LENGTH".
2507
92fa0f9e
MP
25082017-05-23 Marek Polacek <polacek@redhat.com>
2509
2510 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2511 quotes.
2512
d11c168a
JJ
25132017-05-22 Jakub Jelinek <jakub@redhat.com>
2514
2515 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2516 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2517 it returned invariant. Call tree_invariant_p unconditionally
2518 afterwards to decide whether to return expr or op0.
2519
58aca9d9
NS
25202017-05-22 Nathan Sidwell <nathan@acm.org>
2521
2522 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2523
7fd549d2
TS
25242017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2525
2526 * c-parser.c (c_parser_omp_clause_default): Handle
2527 "OMP_CLAUSE_DEFAULT_PRESENT".
2528
6ecd2339
BE
25292017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2530
2531 * config-lang.in (gtfiles): Add c-family/c-format.c.
2532
8a57ecff
NS
25332017-05-18 Nathan Sidwell <nathan@acm.org>
2534
2535 * c-decl.c (pushdecl_top_level): Delete unused function.
2536
6574d78e
MP
25372017-05-18 Marek Polacek <polacek@redhat.com>
2538
2539 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2540 (check_earlier_gotos): Likewise.
2541 (define_label): Likewise.
2542 (pending_xref_error): Likewise.
2543 (smallest_type_quals_location): Likewise.
2544 (grokdeclarator): Likewise.
2545 (grokparms): Likewise.
2546 (identifier_global_value): Likewise.
2547 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2548 (find_init_member): Likewise.
2549
e3455240
MP
25502017-05-18 Marek Polacek <polacek@redhat.com>
2551
2552 * c-decl.c (start_decl): Use false/true instead of 0/1.
2553 (grokdeclarator): Likewise.
2554 (finish_struct): Likewise.
2555 (start_function): Change the return type to bool. Use false/true
2556 instead of 0/1.
2557 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2558 * c-tree.h (start_function): Update.
2559 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2560 (set_designator): Change the return type to bool. Use false/true
2561 instead of 0/1.
2562
3fa8871b
MP
25632017-05-17 Marek Polacek <polacek@redhat.com>
2564
2565 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2566 * c-typeck.c: Likewise.
2567
142473df
MP
25682017-05-17 Marek Polacek <polacek@redhat.com>
2569
2570 PR sanitizer/80659
2571 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2572 DECL_IGNORED_P even for non-static compound literals.
2573
1a817418
ML
25742017-05-17 Martin Liska <mliska@suse.cz>
2575
2576 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2577 use it instead of int type.
2578
b2fa0a8b
MP
25792017-05-17 Marek Polacek <polacek@redhat.com>
2580
2581 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2582 call c_fully_fold.
2583 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2584 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2585 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2586 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2587 save_expr.
2588 (c_parser_conditional_expression): Likewise.
2589 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2590 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2591 (process_init_element): Likewise.
2592 (build_binary_op): Likewise.
2593 (handle_omp_array_sections_1): Likewise.
2594
1e47f02b
TS
25952017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2596
2597 * c-parser.c (c_parser_omp_clause_num_gangs)
2598 (c_parser_omp_clause_num_workers)
2599 (c_parser_omp_clause_vector_length): Merge functions into...
2600 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2601 all users.
2602
c24e924f
NS
26032017-05-11 Nathan Sidwell <nathan@acm.org>
2604
2605 * gimple-parser.c: Don't #include tree-dump.h.
2606
c587104e
MM
26072017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2608
2609 PR testsuite/80580
2610 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2611
67ac9a9d
MM
26122017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2613
2614 PR testsuite/80580
2615 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2616 incorrect __MEM syntax.
2617
ac4eb40f
MM
26182017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2619
2620 PR testsuite/80580
2621 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2622 type of unary '*'.
2623
641da50a
NS
26242017-05-09 Nathan Sidwell <nathan@acm.org>
2625
2626 * c-tree.h (pushdecl): Declare.
2627
56d35585
DM
26282017-05-05 David Malcolm <dmalcolm@redhat.com>
2629
2630 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2631 with diagnostic_report_diagnostic.
2632 * c-errors.c (pedwarn_c99): Likewise.
2633 (pedwarn_c90): Likewise.
2634
815d9cc6
XR
26352017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2636
92a285c1 2637 PR c++/80038
815d9cc6
XR
2638 * c-gimplify.c (c_gimplify_expr): Remove calls to
2639 cilk_gimplifY_call_params_in_spawned_fn.
2640
1c4ea66f
DM
26412017-04-25 David Malcolm <dmalcolm@redhat.com>
2642
2643 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2644 hint for removing extra semicolon.
2645
666f7903
JJ
26462017-04-21 Jakub Jelinek <jakub@redhat.com>
2647
2648 PR c/80468
2649 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2650 enabled, set specs->type to integer_type_node.
2651
5764ee3c
JW
26522017-04-03 Jonathan Wakely <jwakely@redhat.com>
2653
2654 * c-array-notation.c: Fix typo in comment.
2655
10fa8dfb
MP
26562017-03-29 Marek Polacek <polacek@redhat.com>
2657
2658 PR c/79730
2659 * c-decl.c (finish_decl): Check VAR_P.
2660
a9e4a1a5
JJ
26612017-03-27 Jakub Jelinek <jakub@redhat.com>
2662
2663 PR middle-end/80162
2664 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2665 * c-typeck.c (c_mark_addressable): Likewise. Look through
2666 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2667 to ARRAY_TYPE.
2668 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2669
ee3ff394
MP
26702017-03-23 Marek Polacek <polacek@redhat.com>
2671
2672 * c-tree.h: Remove a C_RID_YYCODE reference.
2673
4d1b8e70
JJ
26742017-03-21 Jakub Jelinek <jakub@redhat.com>
2675
2676 PR c/80097
2677 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2678 optional COMPOUND_EXPR with ubsan instrumentation.
2679
31dc71a8
MP
26802017-03-17 Marek Polacek <polacek@redhat.com>
2681
2682 * c-parser.c: Add C11 references.
2683
d579c385
MP
26842017-03-15 Marek Polacek <polacek@redhat.com>
2685
2686 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2687
85059a38
MP
26882017-03-11 Marek Polacek <polacek@redhat.com>
2689
2690 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2691
2f6f187a
DM
26922017-03-10 David Malcolm <dmalcolm@redhat.com>
2693
2694 PR translation/79848
2695 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2696 "%qs".
2697 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2698
36618428
MP
26992017-03-09 Marek Polacek <polacek@redhat.com>
2700
2701 PR sanitizer/79757
2702 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2703 parameter declarations with initializers.
2704
01e5af5a
JJ
27052017-03-09 Jakub Jelinek <jakub@redhat.com>
2706
2707 PR c/79969
2708 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2709 TYPE_STUB_DECL.
2710
a71dbc63
JJ
27112017-03-07 Jakub Jelinek <jakub@redhat.com>
2712
2713 PR c/79834
2714 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2715 for "may only be used in compound statements" diagnostics, change it
2716 such that the same translatable string is used for all pragmas. For
2717 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2718 diagnostics.
2719 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2720 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2721 "may only be used in compound statements" diagnostics, such that the
2722 same translatable string is used for all pragmas.
2723
1ff4bae6
MP
27242017-03-04 Marek Polacek <polacek@redhat.com>
2725
2726 PR c/79847
2727 * c-decl.c (implicit_decl_warning): Add missing space.
2728
7f5a7d78
MP
27292017-03-03 Marek Polacek <polacek@redhat.com>
2730
2731 PR c/79758
2732 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2733 current_function_prototype_arg_types is error_mark_node. Fix
2734 formatting. Use TREE_VALUE instead of TREE_TYPE.
2735
883c8f06
JJ
27362017-03-03 Jakub Jelinek <jakub@redhat.com>
2737
79c9b7a8
JJ
2738 PR c/79837
2739 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2740 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2741 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2742 diagnostics.
2743
883c8f06
JJ
2744 PR c/79836
2745 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2746 instead of %<_Generic>.
2747 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2748 (c_parser_omp_target_exit_data): Use %<release%> instead of
2749 %<release>.
2750
324ff1a0
JJ
27512017-02-28 Jakub Jelinek <jakub@redhat.com>
2752
2753 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2754 instead of just cond ? "..." : "...".
2755 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2756 for "enter"/"exit" keyword.
2757 (c_finish_oacc_routine): Don't use %s to supply portions of the
2758 message.
2759
4227c9ad
JJ
27602017-02-24 Jakub Jelinek <jakub@redhat.com>
2761
2762 PR c++/79588
2763 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2764 handle -Wrestrict here.
2765 * c-typeck.c (build_function_call_vec): Adjust
2766 check_function_arguments caller.
2767
5d972e66
RB
27682017-02-23 Richard Biener <rguenther@suse.de>
2769
2770 PR c/79684
2771 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2772 to initialize c_exprs to return.
2773 (c_parser_gimple_binary_expression): Likewise.
2774 (c_parser_gimple_unary_expression): Likewise.
2775 (c_parser_gimple_postfix_expression): Likewise.
2776
61ac5ebe
MP
27772017-02-22 Marek Polacek <polacek@redhat.com>
2778
2779 PR c/79662
2780 * c-typeck.c (convert_arguments): Handle error_mark_node.
2781
41d1b0b1
PK
27822017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2783
2784 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2785 value of c_parser_parse_ssa_name against error_mark_node and emit
2786 error if ssa name is anonymous and written as default definition.
2787
eab1f169
PK
27882017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2789
2790 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2791 FMA_EXPR.
2792
bcac0b4d
JJ
27932017-02-16 Jakub Jelinek <jakub@redhat.com>
2794
2795 PR c++/79512
2796 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2797 ignore #pragma omp target even when not followed by identifier.
2798
1be33173
PK
27992017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2800
2801 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2802 (c_parser_gimple_unary_expression): Likewise.
2803
aa326bfb
JJ
28042017-02-13 Jakub Jelinek <jakub@redhat.com>
2805
2806 * c-parser.c (c_parser_oacc_declare): Add missing space in
2807 diagnostics.
2808
8a398bc5
PK
28092017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2810
2811 PR c/79478
2812 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2813 set_c_expr_source_range when parsing ssa-name.
2814
3dcde5ef 28152017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2816 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2817
2818 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2819 building IL when arguments are error_mark_node.
2820 (c_parser_gimple_unary_expression): Likewise.
2821 (c_parser_gimple_if_stmt): Likewise.
2822 (c_parser_gimple_switch_stmt): Likewise.
2823 (c_parser_gimple_return_stmt): Likewise.
2824 (c_parser_parse_ssa_name): When name lookup fails do not build
2825 an SSA name. Use undeclared rather than not declared in error
2826 reporting.
2827
192b048b
MP
28282017-02-09 Marek Polacek <polacek@redhat.com>
2829
2830 PR c/79428
2831 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2832 instead of c_parser_skip_until_found.
2833
56f71478
JJ
28342017-02-09 Jakub Jelinek <jakub@redhat.com>
2835
2836 PR c/79431
2837 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2838 symtab_node::get on automatic variables.
2839
02889d23
CLT
28402016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2841 Chung-Lin Tang <cltang@codesourcery.com>
2842
2843 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2844 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2845 semantic checking.
2846 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2847
7af4b20d
RB
28482017-02-07 Richard Biener <rguenther@suse.de>
2849
2850 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2851 (c_parser_gimple_postfix_expression_after_primary):
2852 Do not use c_build_function_call_vec to avoid folding and promotion.
2853 Simplify.
2854
e5e391d6
MO
28552017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2856
2857 PR lto/79061
2858 * c-decl.c (pop_scope): Pass main_input_filename to
2859 build_translation_unit_decl.
2860
c2e84327
DM
28612017-01-24 David Malcolm <dmalcolm@redhat.com>
2862
2863 * c-parser.c: Include "read-rtl-function.h" and
2864 "run-rtl-passes.h".
2865 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2866 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2867 production. Update for renaming of field "gimple_pass" to
2868 "gimple_or_rtl_pass". If __RTL was seen, call
2869 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2870 to an auto_timevar, to cope with early exit.
2871 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2872 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2873 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2874 Handle RID_RTL.
2875 (c_parser_parse_rtl_body): New function.
2876 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2877 (struct c_declspecs): Rename field "gimple_pass" to
2878 "gimple_or_rtl_pass". Add field "rtl_p".
2879 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2880 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2881 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2882 (c_parser_gimple_or_rtl_pass_list): ...this.
2883
2ebd93e1
MP
28842017-01-20 Marek Polacek <polacek@redhat.com>
2885
2886 PR c/64279
2887 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2888
b1c95bb5
RB
28892017-01-13 Richard Biener <rguenther@suse.de>
2890
2891 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2892 nops.
2893
25329913
RB
28942017-01-13 Richard Biener <rguenther@suse.de>
2895
2896 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2897 _Literal ( type-name ) number.
2898
6bb4ea5c
RB
28992017-01-12 Richard Biener <rguenther@suse.de>
2900
2901 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2902 __MEM.
2903
6b5b4e9c
JJ
29042017-01-11 Jakub Jelinek <jakub@redhat.com>
2905
2906 PR c++/72813
2907 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2908 PCH file.
2909
e3252775
RB
29102017-01-11 Richard Biener <rguenther@suse.de>
2911
2912 PR bootstrap/79052
2913 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2914 returns on parse errors.
2915
a9342885
MP
29162017-01-04 Marek Polacek <polacek@redhat.com>
2917
2918 PR c++/64767
2919 * c-parser.c (c_parser_postfix_expression): Mark zero character
2920 constants by setting original_type in c_expr.
2921 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2922 with a zero character constant.
2923 (char_type_p): New function.
2924
5dd9a9d0
DM
29252017-01-04 David Malcolm <dmalcolm@redhat.com>
2926
2927 * c-parser.c (c_parser_declaration_or_fndef): Create a
2928 rich_location at init_loc and parse it to start_init.
2929 (last_init_list_comma): New global.
2930 (c_parser_braced_init): Update last_init_list_comma when parsing
2931 commas. Pass it to pop_init_level. Pass location of closing
2932 brace to pop_init_level.
2933 (c_parser_postfix_expression_after_paren_type): Create a
2934 rich_location at type_loc and parse it to start_init.
2935 (c_parser_omp_declare_reduction): Likewise for loc.
2936 * c-tree.h (start_init): Add rich_location * param.
2937 (pop_init_level): Add location_t param.
2938 * c-typeck.c (struct initializer_stack): Add field
2939 "missing_brace_richloc".
2940 (start_init): Add richloc param, use it to initialize
2941 the stack node's missing_brace_richloc.
2942 (last_init_list_comma): New decl.
2943 (finish_implicit_inits): Pass last_init_list_comma to
2944 pop_init_level.
2945 (push_init_level): When finding missing open braces, add fix-it
2946 hints to the richloc.
2947 (pop_init_level): Add "insert_before" param and pass it
2948 when calling pop_init_level. Add fixits about missing
2949 close braces to any richloc. Use the richloc for the
2950 -Wmissing-braces warning.
2951 (set_designator): Pass last_init_list_comma to pop_init_level.
2952 (process_init_element): Likewise.
2953
cbe34bb5
JJ
29542017-01-01 Jakub Jelinek <jakub@redhat.com>
2955
2956 Update copyright years.
2957
d17680f3
JJ
29582016-12-21 Jakub Jelinek <jakub@redhat.com>
2959
0dba7960
JJ
2960 PR bootstrap/78817
2961 * c-typeck.c (build_function_call_vec): If check_function_arguments
2962 returns true, set TREE_NO_WARNING on CALL_EXPR.
2963
d17680f3
JJ
2964 PR c/77767
2965 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2966 to *expr instead of overwriting it.
2967
aa90531e
RB
29682016-12-20 Richard Biener <rguenther@suse.de>
2969
2970 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2971 error recovery.
2972 (c_parser_gimple_statement): Only build assigns for non-error
2973 stmts.
2974 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2975
629b3d75
MJ
29762016-12-14 Martin Jambor <mjambor@suse.cz>
2977
2978 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2979 omp-low.h.
2980 (c_finish_oacc_routine): Adjusted call to
2981 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2982 to use their new names.
2983 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2984 use its new name.
2985 (c_parser_oacc_update): Likewise.
2986 (c_parser_omp_simd): Likewise.
2987 (c_parser_omp_target_update): Likewise.
2988 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2989 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2990 name.
2991 (c_finish_omp_cancellation_point): Likewise.
2992 * gimple-parser.c: Do not include omp-low.h
2993
c5af52eb
CP
29942016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2995 James Norris <jnorris@codesourcery.com>
2996
2997 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2998 EXIT_DATA,WAIT} are not used in compound statements.
2999 (c_parser_oacc_enter_exit_data): Update diagnostics.
3000
48330c93
BE
30012016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3002
3003 PR c++/71973
3004 * c-decl.c (diagnose_mismatched_decls): Use
3005 OPT_Wbuiltin_declaration_mismatch here too.
3006
899ca90e 30072016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3008 Alan Hayward <alan.hayward@arm.com>
3009 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3010
3011 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3012 (make_label, finish_struct): Likewise.
3013
1ee62b92 30142016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3015 Richard Biener <rguenther@suse.de>
22b15758 3016
8e745a17
JJ
3017 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3018 * config-lang.in (gtfiles): Add c/c-parser.h.
3019 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3020 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3021 * c-parser.c (enum c_id_kind, struct c_token,
3022 c_parser_next_token_is, c_parser_next_token_is_not,
3023 c_parser_next_token_is_keyword,
3024 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3025 Split out to ...
3026 * c-parser.h: ... new header.
3027 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3028 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3029 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3030 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3031 c_parser_error, c_parser_require, c_parser_skip_until_found,
3032 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3033 c_parser_type_name): Export.
3034 (c_parser_tokens_buf): New function.
3035 (c_parser_error): Likewise.
3036 (c_parser_set_error): Likewise.
3037 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3038 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3039 via c_parser_parse_gimple_body.
8e745a17
JJ
3040 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3041 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3042 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3043 c_parser_error, c_parser_require, c_parser_skip_until_found,
3044 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3045 c_parser_type_name): Declare.
1ee62b92
PG
3046 (struct c_parser): Declare forward.
3047 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3048 (c_parser_error): Likewise.
3049 (c_parser_set_error): Likewise.
3050 * gimple-parser.c: New file.
3051 * gimple-parser.h: Likewise.
1ee62b92 3052
22b15758
UB
30532016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3054
3055 PR c/35503
3056 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3057 warn_for_restrict.
3058
84ff4775
LCW
30592016-09-11 Le-Chun Wu <lcwu@google.com>
3060 Mark Wielaard <mjw@redhat.com>
3061
3062 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3063 to the given -Wshadow= variant.
3064
4d0cdd0c
TP
30652016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3066
3067 * c-typeck.c: Include memmodel.h.
3068
1202f33e
JJ
30692016-10-13 Jakub Jelinek <jakub@redhat.com>
3070
3071 PR target/77957
3072 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3073 instead of lhd_return_null_tree_v.
3074
8a14afd0
BS
30752016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3076
3077 PR c++/69733
3078 * c-decl.c (smallest_type_quals_location): New static function.
3079 (grokdeclarator): Try to find the correct location for an ignored
3080 qualifier.
3081
81fea426
MP
30822016-09-26 Marek Polacek <polacek@redhat.com>
3083
3084 PR c/7652
3085 * c-decl.c (pop_scope): Add gcc_fallthrough.
3086
30872016-09-26 Marek Polacek <polacek@redhat.com>
3088
3089 PR c/7652
3090 * c-parser.c (struct c_token): Add flags field.
3091 (c_lex_one_token): Pass it to c_lex_with_flags.
3092 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3093 into IFN_FALLTHROUGH.
3094 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3095 attribute fallthrough after a case label or default label.
3096 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3097
9a2300e9
MP
30982016-09-24 Marek Polacek <polacek@redhat.com>
3099
3100 PR c/77490
3101 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3102 have boolean value. Warn about ++/-- on booleans.
3103
7de76362
JJ
31042016-09-23 Jakub Jelinek <jakub@redhat.com>
3105
3106 * c-parser.c (incomplete_record_decls): Remove unnecessary
3107 = vNULL initialization of file scope vec.
3108
5b73d2ab
MP
31092016-09-16 Marek Polacek <polacek@redhat.com>
3110
3111 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3112
e51fbec3
MP
31132016-09-14 Marek Polacek <polacek@redhat.com>
3114
3115 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3116 (fix_array_notation_expr): Likewise.
3117 * c-decl.c (finish_decl): Likewise.
3118 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3119 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3120 (function_to_pointer_conversion): Use false instead of 0.
3121 (convert_lvalue_to_rvalue): Likewise.
3122 (parser_build_unary_op): Likewise.
3123 (build_atomic_assign): Likewise.
3124 (build_unary_op): Change nonconvert parameter type to bool, use
3125 true/false instead of 1/0.
3126 (build_binary_op): Use true instead of 1.
3127
254830ba
DM
31282016-09-13 David Malcolm <dmalcolm@redhat.com>
3129
3130 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3131 of add_fixit_insert to add_fixit_insert_before.
3132
4c13ba17
MP
31332016-09-13 Marek Polacek <polacek@redhat.com>
3134
3135 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3136 it.
3137
54dcdb88
BE
31382016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3139
3140 PR c++/77496
3141 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3142 COMPOUND_EXPR to warn_for_omitted_condop.
3143
e5106e27
DM
31442016-09-07 David Malcolm <dmalcolm@redhat.com>
3145
3146 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3147 c_get_substring_location for this new langhook.
3148
9dc5773f
JJ
31492016-09-02 Jakub Jelinek <jakub@redhat.com>
3150
3151 PR c/65467
3152 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3153 flag_openmp.
3154 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3155 instead of mark_exp_read on low_bound/length expression.
3156 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3157 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3158 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3159 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3160 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3161 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3162 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3163 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3164 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3165 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3166 instead of mark_expr_read.
3167 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3168 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3169 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3170 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3171 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3172 array section bases outside of depend clause, for depend clause
3173 use convert_lvalue_to_rvalue on the base.
3174 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3175 linear, aligned, map, to and from clauses.
3176 (c_omp_clause_copy_ctor): New function.
3177
295844f6
MP
31782016-09-01 Marek Polacek <polacek@redhat.com>
3179
3180 PR c/7652
3181 * c-typeck.c (composite_type): Add FALLTHRU comment.
3182
089af25c
DM
31832016-08-31 David Malcolm <dmalcolm@redhat.com>
3184
3185 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3186 to the insertion fixits for "struct", "union", and "enum".
3187
f9087798
DM
31882016-08-30 David Malcolm <dmalcolm@redhat.com>
3189
3190 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3191 rather than add_fixit_misspelled_id.
3192 (undeclared_variable): Likewise.
3193 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3194 now-redundant "here" params from add_fixit_insert method calls.
3195 (c_parser_parameter_declaration): Likewise.
3196 * c-typeck.c (build_component_ref): Remove now-redundant range
3197 param from add_fixit_replace method calls.
3198
ebef225f
MP
31992016-08-25 Marek Polacek <polacek@redhat.com>
3200
3201 * c-typeck.c (parser_build_binary_op): Pass LHS to
3202 warn_logical_not_parentheses.
3203
fe377a48
MP
32042016-08-25 Marek Polacek <polacek@redhat.com>
3205
3206 PR c/77323
3207 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3208 or _FloatN or _FloatNx is not supported.
3209 (finish_declspecs): Set type to integer_type_node when _FloatN or
3210 _FloatNx is not supported.
3211
c65699ef
JM
32122016-08-19 Joseph Myers <joseph@codesourcery.com>
3213
3214 PR c/32187
3215 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3216 (struct c_declspecs): Add field floatn_nx_idx.
3217 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3218 and _FloatNx type specifiers.
3219 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3220 (c_parser_declspecs, c_parser_attribute_any_word)
3221 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3222 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3223 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3224 narrower than double.
3225
2f1364c2
JJ
32262016-08-12 Jakub Jelinek <jakub@redhat.com>
3227 Martin Liska <mliska@suse.cz>
3228
3229 PR c/67410
3230 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3231 % to determine val element to change. Assert that
3232 wchar_bytes * charwidth fits into val array.
3233
191816a3
MP
32342016-08-12 Marek Polacek <polacek@redhat.com>
3235
3236 PR c/7652
3237 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3238 (c_parser_postfix_expression): Likewise.
3239 * c-typeck.c (build_unary_op): Adjust fall through comment.
3240 (c_mark_addressable): Likewise.
3241
b95a64bb
JJ
32422016-08-11 Jakub Jelinek <jakub@redhat.com>
3243
3244 PR c/72816
3245 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3246 array member through typedef, for orig_qual_indirect == 0 clear
3247 orig_qual_type.
3248
895aa8e1
DM
32492016-08-08 David Malcolm <dmalcolm@redhat.com>
3250
3251 PR c/64955
3252 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3253 this up to selftest::run_c_tests.
3254 (selftest::run_c_tests): New function.
3255
0b212d8c
TS
32562016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3257
ae9281fc
TS
3258 * c-parser.c (struct oacc_routine_data): Add error_seen and
3259 fndecl_seen members.
3260 (c_finish_oacc_routine): Use these.
3261 (c_parser_declaration_or_fndef): Adjust.
3262 (c_parser_oacc_routine): Likewise. Support more C language
3263 constructs, and improve diagnostics. Move pragma context
3264 checking...
3265 (c_parser_pragma): ... here.
3266
0b212d8c
TS
3267 * c-parser.c (struct oacc_routine_data): New.
3268 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3269 Simplify code.
3270 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3271 declare target" attribute.
3272
76e2c821
JB
32732016-08-01 Jan Beulich <jbeulich@suse.com>
3274
3275 * c-fold.c (c_fully_fold_internal): Also emit shift count
3276 warnings for vector types.
3277 * c-typeck.c (build_binary_op): Likewise.
3278
f618a472
MP
32792016-07-29 Marek Polacek <polacek@redhat.com>
3280
3281 PR c/71742
3282 * c-decl.c (finish_struct): Rephrase an error message.
3283
efd0786f
MP
3284 PR c/71853
3285 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3286 to error node for invalid code.
3287
e00dceaf
MP
3288 PR c/71573
3289 * c-decl.c (implicitly_declare): Return decl early not only for
3290 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3291
673a107a
JJ
32922016-07-29 Jakub Jelinek <jakub@redhat.com>
3293
3294 PR c/71969
3295 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3296 on GNU extern inline functions.
3297
a5b5c8b6
MP
32982016-07-29 Marek Polacek <polacek@redhat.com>
3299
3300 PR c/71583
3301 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3302 check expr.value.
3303
e3fe09c1
UB
33042016-07-22 Uros Bizjak <ubizjak@gmail.com>
3305
3306 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3307
7c8f7eaa
DM
33082016-07-20 David Malcolm <dmalcolm@redhat.com>
3309
3310 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3311 spellcheck-tree.h
3312 (best_macro_match): Likewise, converting from a typedef to a
3313 subclass.
3314 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3315 (lookup_name_fuzzy): Update for change of best_macro_match to a
3316 subclass with a ctor that calls cpp_forall_identifiers.
3317
de6a69ee
DM
33182016-07-20 David Malcolm <dmalcolm@redhat.com>
3319
3320 * c-decl.c (implicit_decl_warning): Update for conversion of
3321 return type of lookup_name_fuzzy to const char *.
3322 (undeclared_variable): Likewise.
3323 (lookup_name_fuzzy): Convert return type from tree to
3324 const char *.
3325 * c-parser.c (c_parser_declaration_or_fndef): Update for
3326 conversion of return type of lookup_name_fuzzy to const char *.
3327 (c_parser_parameter_declaration): Likewise.
3328
b1c9c068
CP
33292016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3330
3331 * c-parser.c (c_parser_oacc_declare): Don't scan for
3332 GOMP_MAP_POINTER.
3333 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3334 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3335 zero-length subarrays.
3336
ddbbcb19
JJ
33372016-07-15 Jakub Jelinek <jakub@redhat.com>
3338
3339 PR c/71858
3340 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3341 instead of FUZZY_LOOKUP_NAME.
3342 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3343 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3344
dd36b877
JJ
33452016-07-14 Jakub Jelinek <jakub@redhat.com>
3346
3347 PR c/71858
3348 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3349
8c681247
TS
33502016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3351
3352 * c-parser.c (c_parser_generic_selection): Make type of variable
3353 auto_vec.
3354 (c_parser_omp_declare_simd): Likewise.
3355
bf4fa671
TS
33562016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3357
3358 * c-decl.c (struct c_struct_parse_info): Change member types
3359 from vec to auto_vec.
3360 (start_struct): Adjust.
3361 (finish_struct): Likewise.
3362
557e8c49
JJ
33632016-07-02 Jakub Jelinek <jakub@redhat.com>
3364
3365 PR c/71719
3366 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3367
54d19c3b
TS
33682016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3369
3370 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3371 Move pragma context checking into...
3372 (c_parser_omp_cancellation_point): ... here, and improve
3373 diagnostic messages.
3374 * c-typeck.c (c_finish_omp_cancel)
3375 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3376
152ef731
JJ
33772016-06-29 Jakub Jelinek <jakub@redhat.com>
3378
3379 PR c/71685
3380 * c-typeck.c (c_build_qualified_type): Don't clear
3381 C_TYPE_INCOMPLETE_VARS for the main variant.
3382
33832016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3384
3385 PR c/71552
3386 * c-typeck.c (output_init_element): Diagnose incompatible types
3387 before non-constant initializers.
3388
e9ac1f86
JJ
33892016-06-28 Jakub Jelinek <jakub@redhat.com>
3390
3391 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3392
277d7ee0
AK
33932016-06-23 Andi Kleen <ak@linux.intel.com>
3394
3395 * Make-lang.in: Add support for autofdo.
3396
1a4f11c8
DM
33972016-06-22 David Malcolm <dmalcolm@redhat.com>
3398
3399 PR c/70339
3400 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3401 (implicit_decl_warning): When issuing warnings for implicit
3402 declarations, attempt to provide a suggestion via
3403 lookup_name_fuzzy.
3404 (undeclared_variable): Likewise when issuing errors.
3405 (lookup_name_in_scope): Likewise.
3406 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3407 (best_macro_match): New typedef.
3408 (find_closest_macro_cpp_cb): New function.
3409 (lookup_name_fuzzy): New function.
3410 * c-parser.c: Include gcc-rich-location.h.
3411 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3412 (c_keyword_starts_typename): ...this new function.
3413 (c_parser_declaration_or_fndef): When issuing errors about
3414 missing "struct" etc, add a fixit. For other kinds of errors,
3415 attempt to provide a suggestion via lookup_name_fuzzy.
3416 (c_parser_parms_declarator): When looking ahead to detect typos in
3417 type names, also reject CPP_KEYWORD.
3418 (c_parser_parameter_declaration): When issuing errors about
3419 unknown type names, attempt to provide a suggestion via
3420 lookup_name_fuzzy.
3421 * c-tree.h (c_keyword_starts_typename): New prototype.
3422
5a578671
JM
34232016-06-20 Joseph Myers <joseph@codesourcery.com>
3424
3425 PR c/71601
3426 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3427 c_common_type returns error_mark_node.
3428
3f8257db 34292016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3430
3431 PR c/69507
3432 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3433 __alignof__ (expression).
3434
6a3f203c
DM
34352016-06-14 David Malcolm <dmalcolm@redhat.com>
3436
3437 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3438
264757fb
DM
34392016-06-14 David Malcolm <dmalcolm@redhat.com>
3440
3441 * c-typeck.c (build_component_ref): Simplify fixit code by
3442 using gcc_rich_location::add_fixit_misspelled_id.
3443 (set_init_label): Likewise.
3444
f7e4f2e3
DM
34452016-06-13 David Malcolm <dmalcolm@redhat.com>
3446
3447 * c-parser.c (c_parser_initelt): Provide location of name for new
3448 location_t param of set_init_label.
3449 * c-tree.h (set_init_label): Add location_t param.
3450 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3451 param and use it when issuing error messages about unrecognized
3452 field names. Attempt to provide a fixit hint if appropriate,
3453 otherwise update the error message to provide the type name.
3454
4b1ffdb1
TS
34552016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3456
3457 PR c/71381
3458 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3459 Loosen checking.
3460
44a845ca
MS
34612016-06-08 Martin Sebor <msebor@redhat.com>
3462 Jakub Jelinek <jakub@redhat.com>
3463
3464 PR c++/70507
3465 PR c/68120
3466 * c-typeck.c (convert_arguments): Don't promote last argument
3467 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3468
92a5f2ba
MP
34692016-06-08 Marek Polacek <polacek@redhat.com>
3470
3471 PR c/71418
3472 * c-decl.c (grokdeclarator): Check TYPE_P.
3473
08203f73
MP
3474 PR c/71426
3475 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3476 code.
3477
6ffd47b7
DM
34782016-06-07 David Malcolm <dmalcolm@redhat.com>
3479
3480 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3481 and structure element reference, capture the location of the
3482 element name token and pass it to build_component_ref.
3483 (c_parser_postfix_expression_after_primary): Likewise for
3484 structure element dereference.
3485 (c_parser_omp_variable_list): Likewise for
3486 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3487 * c-tree.h (build_component_ref): Add location_t param.
3488 * c-typeck.c (build_component_ref): Add location_t param
3489 COMPONENT_LOC. Use it, if available, when issuing hints about
3490 mispelled member names to provide a fixit replacement hint.
3491
1f40cff3
MP
34922016-06-06 Marek Polacek <polacek@redhat.com>
3493
3494 PR c/71362
3495 * c-parser.c (c_parser_direct_declarator): Set location.
3496
5545a907
MP
34972016-06-06 Marek Polacek <polacek@redhat.com>
3498
3499 * c-typeck.c (comptypes_internal): Handle comparisons of
3500 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3501 TYPE_REF_CAN_ALIAS_ALL.
3502
b605f663
CLT
35032016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3504
3505 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3506 arguments as addressable when async clause exists.
3507
00631022
JJ
35082016-05-30 Jakub Jelinek <jakub@redhat.com>
3509
3510 PR c++/71349
3511 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3512 when combined with target construct.
3513
7211a097
JJ
35142016-05-26 Jakub Jelinek <jakub@redhat.com>
3515
3516 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3517 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3518
95efe6b6
MP
35192016-05-25 Marek Polacek <polacek@redhat.com>
3520
3521 PR c/71265
3522 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3523
a23faf7a
MP
3524 PR c/71266
3525 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3526
e46c7770
CP
35272016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3528
3529 * c-parser.c (c_parser_oacc_declare): Add support for
3530 GOMP_MAP_FIRSTPRIVATE_POINTER.
3531 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3532 argument with enum c_omp_region_type ort.
3533 (handle_omp_array_sections): Likewise. Update call to
3534 handle_omp_array_sections_1.
3535 (c_finish_omp_clauses): Add specific errors and warning messages for
3536 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3537 call to handle_omp_array_sections.
3538
a04e69c0
TS
35392016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3540
3541 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3542
f17a223d
RB
35432016-05-24 Richard Biener <rguenther@suse.de>
3544
3545 PR middle-end/70434
3546 PR c/69504
3547 * c-typeck.c (build_array_ref): Do not complain about indexing
3548 non-lvalue vectors. Adjust for function name change.
3549
79063edd
MS
35502016-05-20 Martin Sebor <msebor@redhat.com>
3551
3552 PR c/71115
3553 * c-typeck.c (error_init): Use
3554 expansion_point_location_if_in_system_header.
3555 (warning_init): Same.
3556
8a40fef3
DM
35572016-05-19 David Malcolm <dmalcolm@redhat.com>
3558
3559 PR c/71171
3560 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3561 in error-handling.
3562 (c_parser_postfix_expression): Likewise.
3563 * c-tree.h (c_expr::set_error): New method.
3564 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3565 that result's range is initialized.
3566
e9892350
JG
35672016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3568
3569 * c-typeck.c (parser_build_unary_op): Fix formatting.
3570
8fad45f5
MW
35712016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3572
3573 * c-decl.c (grokdeclarator): Remove errmsg and use of
3574 targetm.invalid_return_type.
3575 (grokparms): Remove errmsg and use of
3576 targetm.invalid_parameter_type.
3577
aa4b467b
JM
35782016-05-13 Joseph Myers <joseph@codesourcery.com>
3579
3580 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3581 function return type.
3582
4f2e1536
MP
35832016-05-12 Marek Polacek <polacek@redhat.com>
3584
3585 PR c/70756
3586 * c-decl.c (build_compound_literal): Pass LOC down to
3587 c_incomplete_type_error.
3588 * c-tree.h (require_complete_type): Adjust declaration.
3589 (c_incomplete_type_error): Likewise.
3590 * c-typeck.c (require_complete_type): Add location parameter, pass it
3591 down to c_incomplete_type_error.
3592 (c_incomplete_type_error): Add location parameter, pass it down to
3593 error_at.
3594 (build_component_ref): Pass location down to c_incomplete_type_error.
3595 (default_conversion): Pass location down to require_complete_type.
3596 (build_array_ref): Likewise.
3597 (build_function_call_vec): Likewise.
3598 (convert_arguments): Likewise.
3599 (build_unary_op): Likewise.
3600 (build_c_cast): Likewise.
3601 (build_modify_expr): Likewise.
3602 (convert_for_assignment): Likewise.
3603 (c_finish_omp_clauses): Likewise.
3604
d6e83a8d
MM
36052016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3606
3607 PR c/43651
3608 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3609 is enabled.
3610 * c-errors.c (pedwarn_c90): Return true if warned.
3611 * c-tree.h (pedwarn_c90): Change return type to bool.
3612 (enum c_declspec_word): Add new enumerator cdw_atomic.
3613
5c3a10fb
MP
36142016-05-11 Marek Polacek <polacek@redhat.com>
3615
3616 PR c++/71024
3617 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3618 diagnose_mismatched_attributes and call it.
3619
cf68d92c
MP
36202016-05-10 Marek Polacek <polacek@redhat.com>
3621
3622 PR c/70255
3623 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3624 on a declaration following the definition.
3625
351f85c5
JJ
36262016-05-05 Jakub Jelinek <jakub@redhat.com>
3627
3628 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3629 parse it through to c_parser_c99_block_statement.
3630 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3631 caller.
3632
deef7113
MP
36332016-05-04 Marek Polacek <polacek@redhat.com>
3634
3635 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3636 OPT_Wdangling_else.
3637
de55efd5
MP
36382016-05-04 Marek Polacek <polacek@redhat.com>
3639
3640 PR c/48778
3641 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3642 for macro expansions.
3643
79ce98bc
MP
36442016-05-03 Marek Polacek <polacek@redhat.com>
3645
3646 PR c/70859
3647 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3648 check_builtin_function_arguments.
3649
fb2647aa
RB
36502016-05-03 Richard Biener <rguenther@suse.de>
3651
3652 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3653 the checksum from the previous stage.
3654
77886428
CP
36552016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3656
3657 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3658 c_finish_omp_clauses.
3659 (c_parser_omp_all_clauses): Likewise.
3660 (c_parser_oacc_cache): Likewise.
3661 (c_parser_oacc_loop): Likewise.
3662 (omp_split_clauses): Likewise.
3663 (c_parser_omp_declare_target): Likewise.
3664 (c_parser_cilk_all_clauses): Likewise.
3665 (c_parser_cilk_for): Likewise.
3666 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3667 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3668
7176a4a0
MP
36692016-05-02 Marek Polacek <polacek@redhat.com>
3670
3671 PR c/70851
3672 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3673 incomplete type.
3674
e7ff0319
CP
36752016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3676
3677 PR middle-end/70626
3678 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3679 OACC_LOOP_CLAUSE_MASK.
3680 (c_parser_oacc_kernels_parallel): Update call to
3681 c_oacc_split_loop_clauses.
3682
9f405ce1
AM
36832016-04-28 Andrew MacLeod <amacleod@redhat.com>
3684
3685 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3686 argument to build_modify_expr in two cases.
3687
c1e1f433
BS
36882016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3689
3690 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3691 warn_for_memset instead of warning directly here.
3692
2448a956
MP
36932016-04-26 Marek Polacek <polacek@redhat.com>
3694
3695 PR c/67784
3696 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3697 out of ...
3698 (c_parser_for_statement): ... here.
3699 (c_parser_if_statement): Use it.
3700 (c_parser_switch_statement): Use it.
3701 (c_parser_while_statement): Use it.
3702
b02a5e26
MP
3703 PR c/70791
3704 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3705
477d4906
IV
37062016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3707
3708 PR c++/69363
3709 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3710 instead of c_finish_cilk_clauses.
3711 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3712 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3713 floating-point variables in the linear clause for Cilk Plus.
3714
fe37c7af
MM
37152016-04-18 Michael Matz <matz@suse.de>
3716
3717 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3718 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3719
949505a9
MP
37202016-04-15 Marek Polacek <polacek@redhat.com>
3721
3722 PR c/70671
3723 * c-typeck.c (build_unary_op): Pass location down to error and
3724 warning call.
3725
dda1bf61
JJ
37262016-04-15 Jakub Jelinek <jakub@redhat.com>
3727
3728 PR c/70436
3729 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3730 where needed.
3731 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3732 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3733 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3734 Adjust c_parser_pragma callers.
3735 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3736 caller.
3737 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3738 c_parser_statement.
3739 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3740 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3741 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3742 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3743 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3744 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3745 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3746 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3747 down where needed.
3748 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3749 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3750 calls.
3751
99cd9857
MP
37522016-04-13 Marek Polacek <polacek@redhat.com>
3753
3754 PR c/70436
3755 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3756 adjust callers.
3757 (c_parser_statement): Likewise.
3758 (c_parser_c99_block_statement): Likewise.
3759 (c_parser_while_statement): Likewise.
3760 (c_parser_for_statement): Likewise.
3761 (c_parser_if_body): Don't set IF_P here.
3762 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3763 about dangling else here.
3764 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3765 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3766 warn about dangling else here.
3767
f13355da
MP
37682016-04-04 Marek Polacek <polacek@redhat.com>
3769
3770 PR c/70307
3771 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3772
5fde6a45
MP
37732016-03-31 Marek Polacek <polacek@redhat.com>
3774
3775 PR c/70297
3776 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3777
4bbf545b
DM
37782016-03-18 David Malcolm <dmalcolm@redhat.com>
3779
3780 PR c/70281
3781 * c-parser.c (c_parser_postfix_expression): Set the source range
3782 for uses of "__builtin_types_compatible_p".
3783
fcc2b74f
JJ
37842016-03-17 Jakub Jelinek <jakub@redhat.com>
3785
3786 PR c/70280
3787 * c-typeck.c (composite_type): Don't count void_list_node
3788 into len, if the list is terminated by void_list_node, start
3789 with void_list_node instead of NULL for newargs. Stop
3790 at void_list_node.
3791
ab4c578f
MP
37922016-03-16 Marek Polacek <polacek@redhat.com>
3793
3794 PR c/70093
3795 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3796 nested functions returning VM types.
3797
96b3c82d
CP
37982016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3799
3800 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3801 when calling c_finish_omp_clauses.
3802
29b9828f
BS
38032016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3804
3805 PR c/69824
3806 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3807 for later.
3808
7ff6ca38
MP
38092016-03-04 Marek Polacek <polacek@redhat.com>
3810
3811 PR c/69798
3812 * c-parser.c (c_parser_postfix_expression): Call
3813 c_parser_cast_expression rather than c_parser_postfix_expression.
3814
686e2237
JJ
38152016-03-01 Jakub Jelinek <jakub@redhat.com>
3816
3817 PR c/69796
3818 PR c/69974
3819 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3820 of incomplete decls to error_mark_node.
3821
0b05329b
MP
38222016-02-24 Marek Polacek <polacek@redhat.com>
3823
3824 PR c/69819
3825 * c-decl.c (finish_decl): Don't update the copy of the type of a
3826 different decl type.
3827
067fbd8b
JJ
38282016-02-23 Jakub Jelinek <jakub@redhat.com>
3829
3830 PR objc/69844
3831 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3832 in id_kind reclassification.
3833
bf14eba2
JJ
38342016-02-16 Jakub Jelinek <jakub@redhat.com>
3835
3836 PR c/69835
3837 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3838
ba539195
JN
38392016-02-16 James Norris <jnorris@codesourcery.com>
3840
3841 PR c/64748
3842 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3843
16595a1f
BS
38442016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3845
f48dfe98
BS
3846 * c-decl.c (build_null_declspecs): Zero the entire struct.
3847
16595a1f
BS
3848 PR c/69522
3849 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3850 callers changed. If nested_p is true, use it to call
3851 finish_implicit_inits.
3852 * c-tree.h (finish_implicit_inits): Declare.
3853 * c-typeck.c (finish_implicit_inits): New function. Move code
3854 from ...
3855 (push_init_level): ... here.
3856 (set_designator, process_init_element): Call finish_implicit_inits.
3857
66756373
JJ
38582016-02-11 Jakub Jelinek <jakub@redhat.com>
3859
3860 PR c/69768
3861 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3862 arguments for -Waddress warning.
3863
1066e9b5
JJ
38642016-02-04 Jakub Jelinek <jakub@redhat.com>
3865
3866 PR c/69669
3867 * c-decl.c (finish_enum): When honoring mode attribute,
3868 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3869
3a5d2ba4
JJ
38702016-01-29 Jakub Jelinek <jakub@redhat.com>
3871
3872 PR debug/69518
3873 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3874 all type variants, not just TYPE_MAIN_VARIANT.
3875
cbdd8ae0
JJ
38762016-01-27 Jakub Jelinek <jakub@redhat.com>
3877
3878 PR debug/66869
3879 * c-decl.c (c_write_global_declarations_1): Warn with
3880 warn_unused_function if static prototype without definition
3881 is not C_DECL_USED.
3882
fa74a4bc
MP
38832016-01-27 Marek Polacek <polacek@redhat.com>
3884
3885 PR c/68062
3886 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3887 to unsigned, if needed. Add -Wsign-compare warning.
3888
13f92e8d
JJ
38892016-01-26 Jakub Jelinek <jakub@redhat.com>
3890
3891 PR tree-optimization/69483
3892 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3893
cd8e73dc 38942016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3895
3896 PR c/24293
3897 * c-tree.h (incomplete_record_decls): Declare.
3898 * c-parser.c (incomplete_record_decls): Define.
3899 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3900 report error if any decl has zero size.
3901 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3902 or enum type to incomplete_record_decls.
3903
e6d6ec9e
TV
39042016-01-14 Tom de Vries <tom@codesourcery.com>
3905
3906 PR tree-optimization/68773
3907 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3908 set force_output.
3909
00083992
MP
39102016-01-14 Marek Polacek <polacek@redhat.com>
3911
3912 PR c/69262
3913 * c-decl.c (grokdeclarator): Provide more information for invalid
3914 array declarations.
3915
7443cf13
DM
39162016-01-06 David Malcolm <dmalcolm@redhat.com>
3917
3918 * c-parser.c (c_parser_unary_expression): For dereferences, build
3919 a combined location before calling build_indirect_ref, so that
3920 error reports cover the full range, manually updating the c_expr
3921 src_range.
3922
6b131d5b
MP
39232016-01-06 Marek Polacek <polacek@redhat.com>
3924
3925 PR sanitizer/69099
3926 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3927 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3928 NULL.
3929
818ab71a
JJ
39302016-01-04 Jakub Jelinek <jakub@redhat.com>
3931
3932 Update copyright years.
3933
2fe0a208
MP
39342016-01-04 Marek Polacek <polacek@redhat.com>
3935
3936 PR c/68908
3937 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3938 optimization to use __atomic_fetch_* built-in if possible.
3939
c7b48c8a
TS
39402015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3941
3942 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3943 into...
3944 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3945 all users.
3946
fda5652f
MP
39472015-12-22 Marek Polacek <polacek@redhat.com>
3948
3949 PR c/69002
3950 * c-typeck.c (build_component_ref): Warn when acessing elements of
3951 atomic structures or unions.
3952
745e411d
DM
39532015-12-21 David Malcolm <dmalcolm@redhat.com>
3954
3955 * c-typeck.c: Include "gcc-rich-location.h".
3956 (build_binary_op): In the two places that call binary_op_error,
3957 create a gcc_rich_location and populate it with the location of
3958 the binary op and its two operands.
3959
94c40e19
DM
39602015-12-16 David Malcolm <dmalcolm@redhat.com>
3961
3962 * c-parser.c (c_parser_statement_after_labels): When calling
3963 c_finish_return, Use the return expression's location if it has
3964 one, falling back to the location of the first token within it.
3965 * c-typeck.c (c_finish_return): When issuing warnings about
3966 the incorrect presence/absence of a return value, issue a note
3967 showing the declaration of the function.
3968
de67c4c3
DM
39692015-12-16 David Malcolm <dmalcolm@redhat.com>
3970
3971 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3972 to 4.
3973 (c_parser_peek_nth_token): New function.
3974 (c_parser_peek_conflict_marker): New function.
3975 (c_parser_error): Detect conflict markers and report them as such.
3976
a10704e1
DM
39772015-12-16 David Malcolm <dmalcolm@redhat.com>
3978
3979 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3980 to preserve range information for the primary expression
3981 in the call to c_parser_postfix_expression_after_primary.
3982
8062bca6
DM
39832015-12-16 David Malcolm <dmalcolm@redhat.com>
3984
3985 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3986 expression location, falling back on the first token location,
3987 rather than always using the latter.
3988
d06f8b75
MP
39892015-12-16 Marek Polacek <polacek@redhat.com>
3990
3991 PR c/64637
3992 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3993 available.
3994
2994fb91
MP
39952015-12-15 Marek Polacek <polacek@redhat.com>
3996
3997 PR c/68907
3998 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3999 artificial decl.
4000
a1b93f8d
DM
40012015-12-08 David Malcolm <dmalcolm@redhat.com>
4002
4003 * c-parser.c (c_parser_alignof_expression): Capture location of
4004 closing parenthesis (if any), or of end of unary expression, and
4005 use it to build a src_range for the expression.
4006
46c6e1e2
DM
40072015-12-08 David Malcolm <dmalcolm@redhat.com>
4008
4009 PR c/68757
4010 * c-parser.c (c_parser_get_builtin_args): Add
4011 "out_close_paren_loc" param, and write back to it.
4012 (c_parser_postfix_expression): Capture the closing
4013 parenthesis location for RID_CHOOSE_EXPR,
4014 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4015 RID_BUILTIN_SHUFFLE and use it to set the source range
4016 for such expressions; within RID_BUILTIN_COMPLEX set
4017 the underlying location.
4018
66189108
MP
40192015-12-07 Marek Polacek <polacek@redhat.com>
4020
4021 PR c/68668
4022 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4023 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4024
f187980b
EB
40252015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4026
4027 * c-tree.h (c_build_va_arg): Adjust prototype.
4028 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4029 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4030 parameter, adjust throughout and issue an error if EXPR is a component
4031 with reverse storage order.
4032
4250754e
JM
40332015-12-02 Jason Merrill <jason@redhat.com>
4034
4035 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4036 (c_fully_fold_internal, decl_constant_value_for_optimization):
4037 Move from c-common.c.
4038 * c-tree.h: Declare decl_constant_value_for_optimization.
4039 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4040
e9e32ee6
JM
40412015-12-02 Joseph Myers <joseph@codesourcery.com>
4042
4043 PR c/68162
4044 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4045 following link from declarator to next declarator. Track original
4046 qualified type and pass it to c_build_qualified_type.
4047 * c-typeck.c (c_build_qualified_type): Add arguments
4048 orig_qual_type and orig_qual_indirect.
4049
ff7a55bf
TS
40502015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4051
4052 * c-parser.c (c_parser_omp_clause_name)
4053 (c_parser_oacc_all_clauses): Alphabetical sorting.
4054
657e4e47
JJ
40552015-12-02 Jakub Jelinek <jakub@redhat.com>
4056
4057 PR c/68533
4058 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4059 for diagnostics.
4060
37d5ad46
JB
40612015-12-01 Julian Brown <julian@codesourcery.com>
4062 Cesar Philippidis <cesar@codesourcery.com>
4063 James Norris <James_Norris@mentor.com>
4064
4065 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4066 (c_parser_oacc_clause_use_device): New function.
4067 (c_parser_oacc_all_clauses): Add use_device support.
4068 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4069 (c_parser_oacc_host_data): New function.
4070 (c_parser_omp_construct): Add host_data support.
4071 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4072 * c-typeck.c (c_finish_oacc_host_data): New function.
4073 (c_finish_omp_clauses): Add use_device support.
4074
a4850ce9
JH
40752015-11-29 Jan Hubicka <hubicka@ucw.cz>
4076
4077 PR c/67106
4078 * c-decl.c: Set TYPE_PACKED in variants.
4079
b58d3df2
ML
40802015-11-27 Martin Liska <mliska@suse.cz>
4081
4082 PR c++/68312
4083 * c-array-notation.c (fix_builtin_array_notation_fn):
4084 Use release_vec_vec instead of vec::release.
4085 (build_array_notation_expr): Likewise.
4086 (fix_conditional_array_notations_1): Likewise.
4087 (fix_array_notation_expr): Likewise.
4088 (fix_array_notation_call_expr): Likewise.
4089
aec17bfe
JJ
40902015-11-27 Jakub Jelinek <jakub@redhat.com>
4091
4092 PR c/63326
4093 * c-parser.c (c_parser_compound_statement_nostart): If
4094 last_label is true, use pragma_stmt instead of pragma_compound
4095 as second c_parser_pragma argument.
4096 (c_parser_omp_ordered, c_parser_omp_target_update,
4097 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4098 false as second argument to c_parser_skip_to_pragma_eol after
4099 diagnosing standalone directives used in pragma_stmt context.
4100
688c4de0
IV
41012015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4102
4103 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4104 with "if (ENABLE_OFFLOADING)".
4105
cbd03aee
DM
41062015-11-23 David Malcolm <dmalcolm@redhat.com>
4107
4108 PR objc/68438
4109 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4110 for various Objective-C constructs: Class.name syntax,
4111 @selector(), @protocol(), @encode(), and [] message syntax.
4112
a87a86e1
DM
41132015-11-20 David Malcolm <dmalcolm@redhat.com>
4114
4115 PR 62314
4116 * c-typeck.c (should_suggest_deref_p): New function.
4117 (build_component_ref): Special-case POINTER_TYPE when
4118 generating a "not a structure of union" error message, and
4119 suggest a "->" rather than a ".", providing a fix-it hint.
4120
8ece8dfb
DM
41212015-11-19 David Malcolm <dmalcolm@redhat.com>
4122
4123 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4124 candidate into a new function, find_closest_identifier.
4125
433068cc
MP
41262015-11-19 Marek Polacek <polacek@redhat.com>
4127
4128 PR c/68412
4129 * c-typeck.c (parser_build_binary_op): Properly handle
4130 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4131
bef08b71
DM
41322015-11-17 David Malcolm <dmalcolm@redhat.com>
4133
4134 * c-parser.c (set_c_expr_source_range): Bulletproof both
4135 overloaded implementations against NULL expr->value.
4136 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4137 values.
4138 (c_parser_unary_expression): Likewise when handling addresses of
4139 labels.
4140 (c_parser_postfix_expression): Likewise for statement expressions,
4141 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4142 __builtin_va_arg, and for __builtin_offset_of.
4143 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4144 src_range using the range of the braced initializer.
4145 (c_parser_transaction_expression): Set src_range for "ret" to a
4146 sane pair of values.
4147
fff77217
KY
41482015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4149
4150 * c-parser.c (c_finish_omp_declare_simd): Look for
4151 "simd" attribute as well. Update error message.
4152
1d899da2
TS
41532015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4154
4155 * c-parser.c (c_parser_omp_declare_target): Adjust.
4156
e4606348
JJ
41572015-11-14 Jakub Jelinek <jakub@redhat.com>
4158
4159 * c-typeck.c (c_finish_omp_clauses): Don't mark
4160 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4161
3e636daf
MP
41622015-11-14 Marek Polacek <polacek@redhat.com>
4163
4164 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4165 * c-typeck.c: Likewise.
4166
ebedc9a3
DM
41672015-11-13 David Malcolm <dmalcolm@redhat.com>
4168
4169 * c-decl.c (warn_defaults_to): Pass line_table to
4170 rich_location ctor.
4171 * c-errors.c (pedwarn_c99): Likewise.
4172 (pedwarn_c90): Likewise.
4173 * c-parser.c (set_c_expr_source_range): New functions.
4174 (c_token::get_range): New method.
4175 (c_token::get_finish): New method.
4176 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4177 based on the range from the start of the LHS to the end of the
4178 RHS.
4179 (c_parser_conditional_expression): Likewise, based on the range
4180 from the start of the cond.value to the end of exp2.value.
4181 (c_parser_binary_expression): Call set_c_expr_source_range on
4182 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4183 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4184 based on the cast_loc through to the end of the expr.
4185 (c_parser_unary_expression): Likewise, based on the
4186 op_loc through to the end of op.
4187 (c_parser_sizeof_expression) Likewise, based on the start of the
4188 sizeof token through to either the closing paren or the end of
4189 expr.
4190 (c_parser_postfix_expression): Likewise, using the token range,
4191 or from the open paren through to the close paren for
4192 parenthesized expressions.
4193 (c_parser_postfix_expression_after_primary): Likewise, for
4194 various kinds of expression.
4195 * c-tree.h (struct c_expr): Add field "src_range".
4196 (c_expr::get_start): New method.
4197 (c_expr::get_finish): New method.
4198 (set_c_expr_source_range): New decls.
4199 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4200 on ret for prefix unary ops.
4201 (parser_build_binary_op): Likewise, running from the start of
4202 arg1.value through to the end of arg2.value.
4203
ec8b536f
MP
42042015-11-13 Marek Polacek <polacek@redhat.com>
4205
4206 PR c/68320
4207 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4208
277fe616
DM
42092015-11-13 David Malcolm <dmalcolm@redhat.com>
4210
4211 * c-typeck.c: Include spellcheck.h.
4212 (lookup_field_fuzzy_find_candidates): New function.
4213 (lookup_field_fuzzy): New function.
4214 (build_component_ref): If the field was not found, try using
4215 lookup_field_fuzzy and potentially offer a suggestion.
4216
6e232ba4
JN
42172015-11-12 James Norris <jnorris@codesourcery.com>
4218 Joseph Myers <joseph@codesourcery.com>
4219
4220 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4221 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4222 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4223 and PRAGMA_OMP_CLAUSE_LINK.
4224 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4225 and PRAGMA_OACC_CLAUSE_LINK.
4226 (OACC_DECLARE_CLAUSE_MASK): New definition.
4227 (c_parser_oacc_declare): New function.
4228
9be4f715
MP
42292015-11-12 Marek Polacek <polacek@redhat.com>
4230
4231 PR c/67784
4232 * c-parser.c (c_parser_for_statement): Reclassify the token in
4233 a correct scope.
4234
e78bede6
MP
42352015-11-11 Marek Polacek <polacek@redhat.com>
4236
4237 PR c/68107
4238 PR c++/68266
4239 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4240 checking the size of an array.
4241
69f293c9
AM
42422015-11-11 Andrew MacLeod <amacleod@redhat.com>
4243
4244 * c-array-notation.c: Remove unused header files.
4245 * c-aux-info.c: Likewise.
4246 * c-convert.c: Likewise.
4247 * c-decl.c: Likewise.
4248 * c-errors.c: Likewise.
4249 * c-lang.c: Likewise.
4250 * c-objc-common.c: Likewise.
4251 * c-parser.c: Likewise.
4252 * c-typeck.c: Likewise.
4253 * gccspec.c: Likewise.
4254
3a40d81d
NS
42552015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4256 Cesar Philippidis <cesar@codesourcery.com>
4257 James Norris <jnorris@codesourcery.com>
4258 Julian Brown <julian@codesourcery.com>
4259 Nathan Sidwell <nathan@codesourcery.com>
4260
3a40d81d
NS
4261 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4262 routine arg.
4263 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4264 (c_parser_pragma): Parse 'acc routine'.
4265 (OACC_ROUTINE_CLAUSE_MARK): Define.
4266 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4267
fc402eec
AA
42682015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4269
4270 PR debug/67192
4271 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4272 location of the backward-goto to the start of the loop body.
4273
f6b0b3db
AA
42742015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4275
4276 PR debug/67192
4277 * c-parser.c (c_parser_while_statement): Finish the loop before
4278 parsing ahead for misleading indentation.
4279 (c_parser_for_statement): Likewise.
4280
ee45a32d
EB
42812015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4282
4283 * c-decl.c (finish_struct): If the structure has reverse storage
4284 order, rewrite the type of array fields with scalar component. Call
4285 maybe_apply_pragma_scalar_storage_order on entry.
4286 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4287 errors on bit-fields and reverse SSO here and not...
4288 (c_mark_addressable): ...here.
4289 (output_init_element): Adjust call to initializer_constant_valid_p.
4290 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4291
8a645150
DM
42922015-11-06 David Malcolm <dmalcolm@redhat.com>
4293
4294 * c-decl.c (warn_defaults_to): Update for change in signature
4295 of diagnostic_set_info.
4296 * c-errors.c (pedwarn_c99): Likewise.
4297 (pedwarn_c90): Likewise.
4298 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4299 for textinfo::set_location.
4300
7a5e4956
CP
43012015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4302 Thomas Schwinge <thomas@codesourcery.com>
4303 James Norris <jnorris@codesourcery.com>
4304
4305 * c-parser.c (c_parser_omp_clause_name): Add support for
4306 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4307 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4308 default(none) in OpenACC.
4309 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4310 arguments.
4311 (c_parser_oacc_clause_tile): New function.
4312 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4313 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4314 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4315 TILE}.
4316 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4317 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4318 FIRSTPRIVATE}.
4319 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4320 (c_parser_oacc_update): Update the error message for missing clauses.
4321 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4322 and OMP_CLAUSE_INDEPENDENT.
4323
bfcfbfa0
MP
43242015-11-05 Marek Polacek <polacek@redhat.com>
4325
4326 PR c/68090
4327 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4328 deal with pre-evaluation on invalid types.
4329
e01d41e5
JJ
43302015-11-05 Jakub Jelinek <jakub@redhat.com>
4331 Ilya Verbin <ilya.verbin@intel.com>
4332
4333 * c-parser.c: Include context.h and gimple-expr.h.
4334 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4335 monotonic together with nonmonotonic.
4336 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4337 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4338 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4339 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4340 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4341 expressions on combined target teams before the target.
4342 (c_parser_omp_declare_target): If decl has "omp declare target" or
4343 "omp declare target link" attribute, and cgraph or varpool node already
4344 exists, then set corresponding flags. Call c_finish_omp_clauses
4345 in the parenthesized extended-list syntax case.
4346 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4347 declare target.
4348 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4349 on OMP_CLAUSE_REDUCTION array sections.
4350 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4351 into the constant offset, or for variable low-bound using
4352 POINTER_PLUS_EXPR. For structure element based array sections use
4353 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4354 (c_finish_omp_clauses): Drop generic_field_head, structure
4355 elements are now always mapped even as array section bases,
4356 diagnose same var in data sharing and mapping clauses. Diagnose if
4357 linear step on declare simd is neither a constant nor a uniform
4358 parameter. Look through POINTER_PLUS_EXPR for array section
4359 reductions. Diagnose the same var or function appearing multiple
4360 times on the same directive. Fix up wording for the to clause if t
4361 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4362 modifier on kinds other than dynamic or guided or nonmonotonic
4363 modifier together with ordered clause.
4364
4bf9e5a8
TS
43652015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4366 Chung-Lin Tang <cltang@codesourcery.com>
4367
4368 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4369
2adfab87
AM
43702015-10-29 Andrew MacLeod <amacleod@redhat.com>
4371
4372 * c-array-notation.c: Reorder #include's and remove duplicates.
4373 * c-aux-info.c: Likewise.
4374 * c-convert.c: Likewise.
4375 * c-decl.c: Likewise.
4376 * c-errors.c: Likewise.
4377 * c-lang.c: Likewise.
4378 * c-objc-common.c: Likewise.
4379 * c-parser.c: Likewise.
4380 * c-typeck.c: Likewise.
4381
e922069e
JW
43822015-10-26 Jim Wilson <jim.wilson@linaro.org>
4383
4384 PR debug/66068
4385 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4386 after calling build_qualified_type.
4387
765dd391
CP
43882015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4389 Thomas Schwinge <thomas@codesourcery.com>
4390 James Norris <jnorris@codesourcery.com>
4391 Joseph Myers <joseph@codesourcery.com>
4392 Julian Brown <julian@codesourcery.com>
4393 Bernd Schmidt <bschmidt@redhat.com>
4394
4395 * c-parser.c (c_parser_oacc_shape_clause): New.
4396 (c_parser_oacc_simple_clause): New.
4397 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4398 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4399
88bae6f4
TS
44002015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4401 James Norris <jnorris@codesourcery.com>
4402 Cesar Philippidis <cesar@codesourcery.com>
4403
4404 PR c/64765
4405 PR c/64880
4406 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4407 parameters, and handle these. Adjust all users.
4408 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4409 into...
4410 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4411 all users.
4412 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4413 declare functions.
4414 (c_finish_omp_construct): Declare function.
4415 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4416 Merge functions into...
4417 (c_finish_omp_construct): ... this new function.
4418
a8fc2579
RB
44192015-10-22 Richard Biener <rguenther@suse.de>
4420
4421 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4422 before folding a MINUS_EXPR.
4423
e9122ef6
MP
44242015-10-21 Marek Polacek <polacek@redhat.com>
4425
4426 PR c/68024
4427 * c-decl.c (start_function): Warn about vararg functions without
4428 a prototype.
4429
9f47c7e5
IE
44302015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4431
4432 * c-typeck.c (build_conditional_expr): Use boolean vector
4433 type for vector comparison.
4434 (build_vec_cmp): New.
4435 (build_binary_op): Use build_vec_cmp for comparison.
4436
fa60eeb9
MP
44372015-10-20 Marek Polacek <polacek@redhat.com>
4438
4439 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4440
2c7020eb
MP
44412015-10-20 Marek Polacek <polacek@redhat.com>
4442
4443 PR c/67964
4444 * c-parser.c (c_parser_attributes): Break out of the loop if the
4445 token after an attribute isn't a comma.
4446
d9a6bd32
JJ
44472015-10-13 Jakub Jelinek <jakub@redhat.com>
4448 Aldy Hernandez <aldyh@redhat.com>
4449
4450 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4451 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4452 (c_parser_omp_variable_list): Handle structure elements for
4453 map, to and from clauses. Handle array sections in reduction
4454 clause. Formatting fixes.
4455 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4456 if clause modifiers.
4457 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4458 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4459 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4460 c_parser_omp_clause_is_device_ptr): New functions.
4461 (c_parser_omp_clause_ordered): Parse optional parameter.
4462 (c_parser_omp_clause_reduction): Handle array reductions.
4463 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4464 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4465 functions.
4466 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4467 (c_parser_omp_clause_depend_sink): New function.
4468 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4469 (c_parser_omp_clause_map): Parse release/delete map kinds and
4470 optional always modifier.
4471 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4472 and c_finish_omp_clauses callers.
4473 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4474 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4475 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4476 (OMP_CRITICAL_CLAUSE_MASK): Define.
4477 (c_parser_omp_critical): Parse critical clauses.
4478 (c_parser_omp_for_loop): Handle doacross loops, adjust
4479 c_finish_omp_for and c_finish_omp_clauses callers.
4480 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4481 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4482 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4483 (c_parser_omp_for): Disallow ordered clause when combined with
4484 distribute. Disallow linear clause when combined with distribute
4485 and not combined with simd.
4486 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4487 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4488 parse clauses and if depend clause is found, don't parse a body.
4489 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4490 Allow target parallel without for after it.
4491 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4492 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4493 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4494 invalid kinds.
4495 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4496 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4497 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4498 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4499 functions.
4500 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4501 defaultmap and is_device_ptr clauses.
4502 (c_parser_omp_target): Parse target parallel and target simd. Set
4503 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4504 and target exit data. Diagnose invalid map kinds.
4505 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4506 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4507 construct.
4508 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4509 &omp_priv.
4510 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4511 (c_parser_omp_taskloop): New function.
4512 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4513 handle PRAGMA_OMP_TASKLOOP.
4514 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4515 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4516 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4517 Add IS_OMP argument, handle structure element bases, diagnose
4518 bitfields, pass IS_OMP recursively, diagnose known zero length
4519 array sections in depend clauses, handle array sections in reduction
4520 clause, diagnose negative length even for pointers.
4521 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4522 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4523 array sections in reduction clause, set
4524 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4525 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4526 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4527 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4528
21ba0cea
MP
45292015-10-06 Marek Polacek <polacek@redhat.com>
4530
4531 * c-parser.c (c_parser_statement_after_labels): Use
4532 protected_set_expr_location.
4533 (c_parser_omp_clause_num_gangs): Likewise.
4534 (c_parser_omp_clause_num_threads): Likewise.
4535 (c_parser_omp_clause_num_workers): Likewise.
4536 (c_parser_omp_clause_vector_length): Likewise.
4537 (c_parser_omp_clause_num_teams): Likewise.
4538 (c_parser_omp_clause_thread_limit): Likewise.
4539 * c-typeck.c (build_c_cast): Likewise.
4540 (c_cast_expr): Likewise.
4541
624d31fe
RS
45422015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4543
4544 * c-typeck.c (c_tree_equal): Use real_equal instead of
4545 REAL_VALUES_EQUAL.
4546
b8fd7909
JM
45472015-10-04 Jason Merrill <jason@redhat.com>
4548
4549 * c-parser.c (c_lex_one_token): Handle @synchronized.
4550 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4551 can change whether the function is transaction_safe.
4552
1c7485af
MP
45532015-10-02 Marek Polacek <polacek@redhat.com>
4554
4555 PR c/67730
4556 * c-typeck.c (convert_for_assignment): Use the expansion point
4557 location throughout.
4558
3e3b8d63
MP
45592015-10-02 Marek Polacek <polacek@redhat.com>
4560
4561 PR c/64249
4562 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4563 and pass it down to c_parser_if_statement.
4564 (c_parser_else_body): Add CHAIN parameter and pass it down to
4565 c_parser_statement_after_labels.
4566 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4567 duplicated if-else-if conditions.
4568
aabef2de
MP
45692015-10-01 Marek Polacek <polacek@redhat.com>
4570
4571 * c-typeck.c (convert_for_assignment): Improve commentary.
4572
de8ddd5f
MP
45732015-09-30 Marek Polacek <polacek@redhat.com>
4574
4575 PR c/67730
4576 * c-typeck.c (c_finish_return): Use the expansion point location for
4577 certain "return with value" warnings.
4578
c4914de6
MLI
45792015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4580
4581 * c-parser.c (pragma_lex): Add loc argument.
4582
0e36f5c7
MP
45832015-09-15 Marek Polacek <polacek@redhat.com>
4584
4585 PR c/67580
4586 * c-decl.c (tag_exists_p): New function.
4587 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4588 struct/union/enum keywords are missing.
4589 * c-tree.h (tag_exists_p): Declare.
4590
2f3bb934
MP
45912015-09-15 Marek Polacek <polacek@redhat.com>
4592
4593 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4594 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4595 Return NULL_TREE instead of 0.
4596 (lookup_name): Return NULL_TREE instead of 0.
4597 (lookup_name_in_scope): Likewise.
4598 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4599 (parser_xref_tag): Use false instead of 0.
4600 (start_struct): Use true instead of 1.
4601 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4602
aa256c4a
MP
46032015-09-14 Marek Polacek <polacek@redhat.com>
4604
4605 * c-typeck.c (set_nonincremental_init_from_string): Use
4606 HOST_WIDE_INT_M1U when shifting a negative value.
4607
dbb68221
MW
46082015-09-09 Mark Wielaard <mjw@redhat.com>
4609
4610 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4611 parm against NULL.
4612
a8a098ac
JJ
46132015-09-10 Jakub Jelinek <jakub@redhat.com>
4614
4615 PR c/67502
4616 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4617 into OMP_FOR_PRE_BODY rather than before the loop.
4618
f4b189d5
JJ
46192015-09-09 Jakub Jelinek <jakub@redhat.com>
4620
0bb99c11
JJ
4621 PR c/67501
4622 * c-parser.c (c_parser_oacc_all_clauses,
4623 c_parser_omp_all_clauses): Remove invalid clause from
4624 list of clauses even if parser->error is set.
4625
fce5e5e3
JJ
4626 PR c/67500
4627 * c-parser.c (c_parser_omp_clause_aligned,
4628 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4629 test for errors.
4630 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4631 error_mark_node.
4632
f4b189d5
JJ
4633 PR c/67495
4634 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4635 instead of c_parser_unary_expression. If the result is !lvalue_p,
4636 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4637
b2aaf235
MP
46382015-09-04 Marek Polacek <polacek@redhat.com>
4639
4640 PR sanitizer/67279
4641 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4642
1807ffc1
MS
46432015-09-03 Martin Sebor <msebor@redhat.com>
4644
4645 PR c/66516
8b652e65
JJ
4646 * c-typeck.c (convert_arguments, parser_build_unary_op,
4647 build_conditional_expr, c_cast_expr, convert_for_assignment,
4648 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4649 reject_gcc_builtin.
4650 (c_decl_implicit): Define.
4651
d04ff417
MP
46522015-09-02 Marek Polacek <polacek@redhat.com>
4653
4654 PR c/67432
4655 * c-parser.c (c_parser_enum_specifier): Give a better error for
4656 an empty enum.
4657
a79683d5
TS
46582015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4659
4660 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4661
191a6b94
MP
46622015-08-12 Marek Polacek <polacek@redhat.com>
4663
4664 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4665 LOC to it.
4666
420a9d9b
MP
46672015-08-03 Marek Polacek <polacek@redhat.com>
4668
4669 PR c/67088
4670 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4671 Use it.
4672 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4673
992118a1
PP
46742015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4675
4676 * c-parser.c (c_parser_if_body): Take token_indent_info
4677 argument. Call warn_for_misleading_indentation even when the
4678 body is a semicolon. Extract token_indent_infos corresponding
4679 to the guard, body and next tokens. Adjust call to
4680 warn_for_misleading_indentation accordingly.
4681 (c_parser_else_body): Likewise.
4682 (c_parser_if_statement): Likewise.
4683 (c_parser_while_statement): Likewise.
4684 (c_parser_for_statement): Likewise.
4685
46308474
LFSM
46862015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4687 Manuel López-Ibáñez <manu@gcc.gnu.org>
4688
4689 * c-decl.c (get_parm_info): Remove static var. Update warning
4690 message.
4691
05b28fd6
MP
46922015-07-27 Marek Polacek <polacek@redhat.com>
4693
4694 PR c++/66555
4695 PR c/54979
4696 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4697
451b5e48
MP
46982015-07-20 Marek Polacek <polacek@redhat.com>
4699
4700 PR c++/55095
4701 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4702 (build_binary_op): Warn about left shift overflows.
4703
1916bcb5
AM
47042015-07-09 Andrew MacLeod <amacleod@redhat.com>
4705
4706 * c-array-notation.c: Adjust includes for flags.h changes.
4707 * c-objc-common.c: Likewise.
4708
c7131fb2
AM
47092015-07-07 Andrew MacLeod <amacleod@redhat.com>
4710
4711 * c-array-notation.c: Adjust includes.
4712 * c-aux-info.c: Likewise.
4713 * c-convert.c: Likewise.
4714 * c-decl.c: Likewise.
4715 * c-errors.c: Likewise.
4716 * c-lang.c: Likewise.
4717 * c-objc-common.c: Likewise.
4718 * c-parser.c: Likewise.
4719 * c-typeck.c: Likewise.
4720
da2e71c9
MLI
47212015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4722
4723 PR fortran/66605
4724 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4725
b155cfd9
MP
47262015-06-29 Marek Polacek <polacek@redhat.com>
4727
4728 PR c/66322
4729 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4730 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4731 about -Wswitch-bool here.
4732 (do_case): Update c_add_case_label call.
4733 (c_finish_case): Update c_do_switch_warnings call.
4734
31521951
MP
47352015-06-27 Marek Polacek <polacek@redhat.com>
4736
4737 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4738
22d03525
MP
47392015-06-26 Marek Polacek <polacek@redhat.com>
4740
4741 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4742 INDIRECT_REF_P.
4743 * c-typeck.c (array_to_pointer_conversion): Likewise.
4744 (build_unary_op): Likewise.
4745 (c_finish_return): Likewise.
4746
f0889939
AM
47472015-06-25 Andrew MacLeod <amacleod@redhat.com>
4748
4749 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4750 * c-parser.c: Likewise.
4751
8d67ee55
RS
47522015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4753
4754 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4755 instead of pointer_hash.
4756 (detect_field_duplicates): Likewise.
4757
0ae9bd27
MP
47582015-06-25 Marek Polacek <polacek@redhat.com>
4759
4760 * c-array-notation.c: Use VAR_P throughout.
4761 * c-decl.c: Likewise.
4762 * c-objc-common.c: Likewise.
4763 * c-parser.c: Likewise.
4764 * c-typeck.c: Likewise.
4765
62f9079a
MP
47662015-06-25 Marek Polacek <polacek@redhat.com>
4767
4768 * c-decl.c: Use is_global_var throughout.
4769 * c-parser.c: Likewise.
4770 * c-typeck.c: Likewise.
4771
abb226c9
AM
47722015-06-17 Andrew MacLeod <amacleod@redhat.com>
4773
4774 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4775 * c-aux-info.c: Likewise.
4776 * c-convert.c: Likewise.
4777 * c-decl.c: Likewise.
4778 * c-errors.c: Likewise.
4779 * c-lang.c: Likewise.
4780 * c-objc-common.c: Likewise.
4781 * c-parser.c: Likewise.
4782 * c-typeck.c: Likewise.
4783
8cbababc
JH
47842015-06-11 Jan Hubicka <hubicka@ucw.cz>
4785
4786 PR middle-end/66325
4787 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4788 variants.
4789
a0349665
PMR
47902015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4791
4792 * c-decl.c (pop_scope): Register the main translation unit
4793 through the new debug hook.
4794
13fdf2e2
AM
47952015-06-08 Andrew MacLeod <amacleod@redhat.com>
4796
4797 * c-array-notation.c : Adjust include files.
4798 * c-aux-info.c : Likewise.
4799 * c-convert.c : Likewise.
4800 * c-decl.c : Likewise.
4801 * c-errors.c : Likewise.
4802 * c-lang.c : Likewise.
4803 * c-lang.h : Likewise.
4804 * c-objc-common.c : Likewise.
4805 * c-parser.c : Likewise.
4806 * c-typeck.c : Likewise.
4807
d7438551
AH
48082015-06-05 Aldy Hernandez <aldyh@redhat.com>
4809
4810 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4811 immediately clobber it.
4812 (c_write_global_declarations_1): Remove call to
4813 check_global_declaration_1.
4814 (c_write_global_declarations_2): Remove.
4815 (c_write_final_cleanups): Rename from c_write_global_declarations.
4816 Remove call to finalize_compilation_unit.
4817 Remove calls to debugging hooks.
4818 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4819 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4820 * c-tree.h: Remove c_write_global_declarations.
4821
ecb9f223
AM
48222015-06-04 Andrew MacLeod <amacleod@redhat.com>
4823
4824 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4825 * c-aux-info.c: Likewise.
4826 * c-convert.c: Likewise.
4827 * c-decl.c: Likewise.
4828 * c-errors.c: Likewise.
4829 * c-lang.c: Likewise.
4830 * c-objc-common.c: Likewise.
4831 * c-parser.c: Likewise.
4832 * c-typeck.c: Likewise.
4833
9482b620
MP
48342015-06-04 Marek Polacek <polacek@redhat.com>
4835
4836 PR c/66341
4837 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4838 it is a lvalue.
4839
bc51ace3
PK
48402015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4841
4842 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4843 Warn for empty struct.
4844 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4845
ea5b45b6
AT
48462015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4847
4848 * c-decl.c (start_function): Call plugin before parsing.
4849 (finish_function): Call plugin after parsing.
4850
c2d47482
PK
48512015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4852
4853 PR c/49551
4854 * c-decl.c (merge_decls): Merge DECL_COMMON.
4855
a95492ab
JW
48562015-05-22 Jim Wilson <jim.wilson@linaro.org>
4857
4858 * Make-lang.in (check_gcc_pallelize): Define.
4859
fd5c817a
MP
48602015-05-22 Marek Polacek <polacek@redhat.com>
4861
4862 PR c/47043
4863 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4864 attributes.
4865
c7b70a3c
MP
48662015-05-21 Marek Polacek <polacek@redhat.com>
4867
4868 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4869 DECL_BUILT_IN.
4870
21b634ae
MP
48712015-05-20 Marek Polacek <polacek@redhat.com>
4872
4873 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4874 * c-typeck.c: Likewise.
4875
296a8c2f
MP
48762015-05-19 Marek Polacek <polacek@redhat.com>
4877
4878 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4879
41b37d5e
JJ
48802015-05-19 Jakub Jelinek <jakub@redhat.com>
4881
4882 PR middle-end/66199
4883 * c-parser.c (c_parser_omp_for_loop): Don't add
4884 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4885 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4886 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4887 constructs.
4888
fab27f52
MM
48892015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4890
4891 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4892 swaps.
fab27f52 4893
40de31cf
MLI
48942015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4895
4896 PR fortran/44054
4897 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4898 accessor function.
4899
3aa3c9fc
MP
49002015-05-14 Marek Polacek <polacek@redhat.com>
4901
4902 PR c/66066
4903 PR c/66127
4904 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4905 rather than with 0.
4906
c3388e62
DM
49072015-05-12 David Malcolm <dmalcolm@redhat.com>
4908
4909 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4910 to add a call to warn_for_misleading_indentation.
4911 (c_parser_else_body): Likewise, adding param "else_loc".
4912 (c_parser_if_statement): Check for misleading indentation.
4913 (c_parser_while_statement): Likewise.
4914 (c_parser_for_statement): Likewise.
4915
755e528f
MP
49162015-05-08 Marek Polacek <polacek@redhat.com>
4917
4918 PR c/64918
4919 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4920 (output_init_element): Likewise.
4921
0173bd2a
MP
49222015-05-07 Marek Polacek <polacek@redhat.com>
4923
4924 PR c/65179
4925 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4926 value.
4927
9babc352
MP
49282015-04-30 Marek Polacek <polacek@redhat.com>
4929
4930 * c-typeck.c (set_init_label): Call error_at instead of error and
4931 pass LOC to it.
4932
ac9f18db
MP
4933 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4934 the type of a decl.
4935
ec3fba51
MP
4936 * c-typeck.c (c_build_va_arg): Clarify the error message.
4937
b811915d
TS
49382015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4939
4940 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4941 OMP_STANDALONE_CLAUSES.
4942
f3075008
MP
49432015-04-28 Marek Polacek <polacek@redhat.com>
4944
4945 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4946
4e81b788
MP
49472015-04-28 Marek Polacek <polacek@redhat.com>
4948
4949 PR c/65901
4950 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4951
6c1db78e
MP
49522015-04-25 Marek Polacek <polacek@redhat.com>
4953
4954 PR c/52085
4955 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4956 attribute.
4957
5c4abbb8
MP
49582015-04-23 Marek Polacek <polacek@redhat.com>
4959
4960 PR c/65345
4961 * c-decl.c (set_labels_context_r): New function.
4962 (store_parm_decls): Call it via walk_tree_without_duplicates.
4963 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4964 instead of create_tmp_var. Build TARGET_EXPR instead of
4965 COMPOUND_EXPR.
4966 (build_atomic_assign): Use create_tmp_var_raw instead of
4967 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4968
06aca1d5
IV
49692015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4970
4971 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4972 (c_parser_omp_target_update): Add missed %> to error_at ().
4973
8fba1830
BRF
49742015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4975
4976 PR target/55143
4977 * c-decl.c (c_default_pointer_mode): Remove definition.
4978 * c-tree.h (c_default_pointer_mode): Remove declaration.
4979
62021f64
TB
49802015-03-27 Tobias Burnus <burnus@net-b.de>
4981
4982 PR c/65586
4983 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4984 error out.
4985 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4986 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4987 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4988
9b65e171
JJ
49892015-03-19 Jakub Jelinek <jakub@redhat.com>
4990
4991 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4992 attribute for DECL_EXTERNAL VAR_DECLs.
4993
17958621
JJ
49942015-03-11 Jakub Jelinek <jakub@redhat.com>
4995
4996 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4997 argument.
4998
7ccb1a11
JJ
49992015-03-10 Jakub Jelinek <jakub@redhat.com>
5000
5001 PR c/65120
5002 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5003 before preparing arguments to warn_logical_not_parentheses.
5004
01177669
JJ
50052015-03-09 Jakub Jelinek <jakub@redhat.com>
5006
5007 PR c/65120
5008 * c-typeck.c (parser_build_binary_op): Don't warn for
5009 !!x == y or !b == y where b is _Bool.
5010
802ac282
MP
50112015-03-09 Marek Polacek <polacek@redhat.com>
5012
5013 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5014 * c-decl.c (grokdeclarator): Likewise.
5015 * c-typeck.c (build_binary_op): Likewise.
5016
e5165b60
MP
50172015-02-27 Marek Polacek <polacek@redhat.com>
5018
5019 PR c/65228
5020 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5021
065d214c
MP
50222015-02-14 Marek Polacek <polacek@redhat.com>
5023
5024 PR c/64768
5025 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5026 declared through a typedef name.
5027
e5d9235b
MP
50282015-02-13 Marek Polacek <polacek@redhat.com>
5029
5030 PR c/65050
5031 * c-decl.c (grokdeclarator): Print also the type when giving
5032 the error message about array's incomplete element type.
5033
fa01ffcc
JJ
50342015-02-11 Jakub Jelinek <jakub@redhat.com>
5035
5036 PR c/64824
5037 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5038 check in the POP macro.
5039
c3e38a03
MP
50402015-02-09 Marek Polacek <polacek@redhat.com>
5041
5042 PR c/64856
5043 * c-typeck.c (process_init_element): Don't always wrap
5044 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5045 initializing a range of elements.
5046
4886ec8e
JJ
50472015-02-04 Jakub Jelinek <jakub@redhat.com>
5048
5049 PR c/64824
5050 PR c/64868
5051 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5052
c3e38a03 50532015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5054
5055 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5056 processing enum declaration.
5057
7b33f0c8
MP
50582015-01-29 Marek Polacek <polacek@redhat.com>
5059
5060 PR c/64709
5061 * c-typeck.c (pop_init_level): If constructor_elements has
5062 exactly one element with integer_zerop value, set constructor_zeroinit
5063 to 1. Remove braces around warning_init call.
5064
dea63e49
JJ
50652015-01-27 Jakub Jelinek <jakub@redhat.com>
5066
5067 PR c/64766
5068 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5069 of FUNCTION_DECLs with error_mark_node.
5070
d38f7dce
JJ
50712015-01-26 Jakub Jelinek <jakub@redhat.com>
5072
5073 PR c/64778
5074 * c-typeck.c (convert_arguments): Return -1 if there are
5075 error_args, even if we've diagnosed too many arguments.
5076
cbf5d0e7
RB
50772015-01-21 Richard Biener <rguenther@suse.de>
5078
5079 PR middle-end/64313
5080 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5081 for builtins the user declared correctly.
5082
41dbbb37
TS
50832015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5084 Bernd Schmidt <bernds@codesourcery.com>
5085 Cesar Philippidis <cesar@codesourcery.com>
5086 James Norris <jnorris@codesourcery.com>
5087 Jakub Jelinek <jakub@redhat.com>
5088 Ilmir Usmanov <i.usmanov@samsung.com>
5089
5090 * c-parser.c: Include "gomp-constants.h".
5091 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5092 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5093 Use OMP_CLAUSE_SET_MAP_KIND.
5094 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5095 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5096 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5097 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5098 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5099 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5100 "copyout", "create", "delete", "deviceptr", "gang", "host",
5101 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5102 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5103 "present_or_create", "pcreate", "seq", "self", "vector",
5104 "vector_length", "wait", "worker".
5105 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5106 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5107 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5108 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5109 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5110 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5111 (c_parser_oacc_data_clause_deviceptr)
5112 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5113 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5114 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5115 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5116 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5117 (c_parser_oacc_parallel, c_parser_oacc_update)
5118 (c_parser_oacc_wait): New functions.
5119 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5120 (c_finish_oacc_data): New prototypes.
5121 * c-typeck.c: Include "gomp-constants.h".
5122 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5123 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5124 OMP_CLAUSE_SET_MAP_KIND.
5125 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5126 (c_finish_oacc_data): New functions.
5127 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5128 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5129 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5130 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5131 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5132 GOMP_MAP_FORCE_DEVICEPTR.
5133
adfac8df
JJ
51342015-01-09 Michael Collison <michael.collison@linaro.org>
5135
5136 * c-array-notation.c: Include hash-set.h, machmode.h,
5137 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5138 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5139 * c-aux-info.c: Ditto.
5140 * c-convert.c: Ditto.
5141 * c-decl.c: Ditto.
5142 * c-errors.c: Ditto.
5143 * c-lang.c: Dittoxs.
5144 * c-objc-common.c: Ditto.
5145 * c-parser.c: Ditto.
5146 * c-typeck.c: Include hash-set.h, machmode.h,
5147 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5148 fold-const.h, wide-int.h, inchash.h, real.h and
5149 fixed-value.h due to flattening of tree.h.
5150
2cc901dc
MP
51512015-01-07 Marek Polacek <polacek@redhat.com>
5152
5153 PR c/64417
5154 * c-typeck.c (process_init_element): Disallow initialization of
5155 a flexible array member with a string constant if the structure
5156 is in an array.
5157
5624e564
JJ
51582015-01-05 Jakub Jelinek <jakub@redhat.com>
5159
e5341100
JJ
5160 PR sanitizer/64344
5161 * c-typeck.c (convert_for_assignment, c_finish_return): For
5162 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5163 types also set in_late_binary_op around convert call.
5164 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5165 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5166 result on expr as last argument to ubsan_instrument_float_cast,
5167 if in_late_binary_op, don't use c_save_expr but save_expr.
5168
5624e564
JJ
5169 Update copyright years.
5170
5bd012f8
MP
51712015-01-05 Marek Polacek <polacek@redhat.com>
5172
5173 PR c/64423
5174 * c-typeck.c (build_array_ref): Pass loc down to
5175 warn_array_subscript_with_type_char.
5176
3f8257db 51772014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5178
5179 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5180 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5181 element type.
8e745a17 5182 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5183 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5184 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5185 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5186 to PEDWARN_FOR_QUALIFIERS.
768952be 5187
8f94a8c4
JJ
51882014-12-17 Jakub Jelinek <jakub@redhat.com>
5189
5190 PR sanitizer/64289
5191 * c-convert.c: Include ubsan.h.
5192 (convert): For real -> integral casts and
5193 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5194 instead instrument the float cast directly.
5195
b731b390
JJ
51962014-11-29 Jakub Jelinek <jakub@redhat.com>
5197
5198 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5199 c_finish_stmt_expr): Remove NULL last argument from
5200 create_tmp_var_raw and create_tmp_var calls.
5201 * c-array-notation.c (fix_builtin_array_notation_fn,
5202 build_array_notation_expr, fix_conditional_array_notations_1,
5203 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5204
541e35a6
MP
52052014-11-28 Marek Polacek <polacek@redhat.com>
5206
5207 PR c/63862
5208 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5209 convert the right operand to integer type.
5210
b286be94
MP
52112014-11-25 Marek Polacek <polacek@redhat.com>
5212
5213 PR c/63877
5214 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5215 for inline functions.
5216
aa7da51a
JJ
52172014-11-21 Jakub Jelinek <jakub@redhat.com>
5218
5219 PR target/63764
5220 * c-typeck.c (build_array_ref): Adjust
5221 convert_vector_to_pointer_for_subscript caller. If it returns true,
5222 call non_lvalue_loc on the result.
5223
d876207f
RB
52242014-11-11 Richard Biener <rguenther@suse.de>
5225
5226 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5227 to true.
5228
e5e44252
AK
52292014-11-10 Andi Kleen <ak@linux.intel.com>
5230
5231 PR c/60804
5232 * c-parser.c (c_parser_statement_after_labels): Call
5233 check_no_cilk.
5234 (c_parser_if_statement): Dito.
5235 (c_parser_switch_statement): Dito.
5236 (c_parser_while_statement): Dito.
5237 (c_parser_do_statement): Dito.
5238 (c_parser_for_statement): Dito.
5239 * c-typeck.c (c_finish_loop): Dito.
5240
13c21655
PC
52412014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5242
5243 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5244 OPT_Wshift_count_overflow in the warnings.
5245
2d51fcef
MP
52462014-10-30 Marek Polacek <polacek@redhat.com>
5247
5248 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5249 print the stripped version as well, if they're not the same.
5250
ef4bddc2
RS
52512014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5252
5253 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5254 machine_mode.
5255
c582198b
AM
52562014-10-28 Andrew MacLeod <amacleod@redhat.com>
5257
5258 * c-decl.c: Adjust include files.
5259 * c-parser.c: Ditto.
5260
ddc8de03
PM
52612014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5262 Tom Tromey <tromey@redhat.com>
5263
5264 * c-tree.h (enum c_oracle_request): New.
5265 (c_binding_oracle_function): New typedef.
5266 (c_binding_oracle, c_pushtag, c_bind): Declare.
5267 * c-decl.c (c_binding_oracle): New global.
5268 (I_SYMBOL_CHECKED): New macro.
5269 (i_symbol_binding): New function.
5270 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5271 (I_TAG_CHECKED): New macro.
5272 (i_tag_binding): New function.
5273 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5274 (I_LABEL_CHECKED): New macro.
5275 (i_label_binding): New function.
5276 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5277 (c_print_identifier): Save and restore c_binding_oracle.
5278 (c_pushtag, c_bind): New functions.
5279
60393bbc
AM
52802014-10-27 Andrew MacLeod <amacleod@redhat.com>
5281
5282 * c-typeck.c: Adjust include files.
5283
d723bb7c
MLI
52842014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5285
5286 PR c++/53061
5287 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5288 initialization here...
5289 (c_initialize_diagnostics): ... but here. Set defaults after
5290 building pretty-printer.
5291
1bc5a451
MP
52922014-10-23 Marek Polacek <polacek@redhat.com>
5293
5294 PR c/63626
5295 * c-decl.c (pop_scope): Don't print warning in external_scope.
5296
4435bb92
MP
52972014-10-19 Marek Polacek <polacek@redhat.com>
5298
5299 PR c/63567
5300 * c-typeck.c (output_init_element): Allow initializing objects with
5301 static storage duration with compound literals even in C99 and add
5302 pedwarn for it.
5303
7278465e
MP
53042014-10-17 Marek Polacek <polacek@redhat.com>
5305
5306 PR c/63567
5307 * c-typeck.c (digest_init): Allow initializing objects with static
5308 storage duration with compound literals even in C99 and add pedwarn
5309 for it.
5310
d9b7be2e
MP
53112014-10-17 Marek Polacek <polacek@redhat.com>
5312
5313 PR c/63543
5314 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5315 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5316 error multiple times. Print the type.
5317
f406ae1f
MP
53182014-10-17 Marek Polacek <polacek@redhat.com>
5319
5320 PR c/63549
5321 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5322 type.
5323
92574c7c
MP
53242014-10-17 Marek Polacek <polacek@redhat.com>
5325
5326 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5327 (start_function): Use OPT_Wimplicit_int instead of 0.
5328 (store_parm_decls_oldstyle): Likewise.
5329
1bc4a978
MT
53302014-10-17 Alan Modra <amodra@gmail.com>
5331
5332 PR middle-end/61848
5333 * c-decl.c (merge_decls): Don't merge section name or tls model
5334 to newdecl symtab node, instead merge to olddecl. Override
5335 existing olddecl section name. Set tls_model for all thread-local
5336 vars, not just OMP thread-private ones. Remove incorrect comment.
5337
83685514
AM
53382014-10-16 Andrew MacLeod <amacleod@redhat.com>
5339
5340 * c-decl.c: Adjust include files.
5341
78a7c317
DD
53422014-10-14 DJ Delorie <dj@redhat.com>
5343
5344 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5345 (c_token_starts_typename): Check all __intN, not just __int128.
5346 (c_token_starts_declspecs): Likewise.
5347 (c_parser_declspecs): Likewise.
5348 (c_parser_attribute_any_word): Likewise.
5349 (c_parser_objc_selector): Likewise.
5350 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5351 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5352 is specified.
5353 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5354 __int128.
5355 (finish_declspecs): Likewise.
5356
74d98c1e
AB
53572014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5358
8e745a17 5359 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5360 the duplicate code.
8e745a17 5361 (c_parser_statement): Call the new function.
74d98c1e 5362
84937de2
MP
53632014-10-09 Marek Polacek <polacek@redhat.com>
5364
5365 PR c/63480
5366 * c-typeck.c (pop_init_level): Don't warn about initializing
5367 with { }.
5368
0382aaa0
MP
53692014-10-07 Marek Polacek <polacek@redhat.com>
5370
5371 PR c/59717
5372 * c-decl.c (header_for_builtin_fn): New function.
5373 (implicitly_declare): Suggest which header to include.
5374
7a0ca710
MP
53752014-10-07 Marek Polacek <polacek@redhat.com>
5376
5377 * c-convert.c (convert): Use error_operand_p.
5378 * c-typeck.c (require_complete_type): Likewise.
5379 (really_atomic_lvalue): Likewise.
5380 (digest_init): Likewise.
5381 (handle_omp_array_sections_1): Likewise.
5382
6bc8a126
MP
53832014-10-03 Marek Polacek <polacek@redhat.com>
5384
5385 PR c/63453
5386 * c-decl.c (pop_scope): Don't warn about "inline function declared
5387 but never defined" for functions marked with gnu_inline attribute.
5388
d90c0a59
JJ
53892014-09-25 Jakub Jelinek <jakub@redhat.com>
5390
5391 PR c++/63249
5392 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5393 on low_bound and length.
5394
083e891e
MP
53952014-09-24 Marek Polacek <polacek@redhat.com>
5396
5397 PR c/61405
5398 PR c/53874
5399 * c-parser.c: Don't define CPP_KEYWORD.
5400 (c_parser_switch_statement): Pass original type to c_finish_case.
5401 * c-tree.h (c_finish_case): Update declaration.
5402 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5403 conditionally to c_do_switch_warnings.
5404
8d95fe25
MP
54052014-09-03 Marek Polacek <polacek@redhat.com>
5406
5407 PR c/62024
5408 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5409 conversions.
5410
9a771876
JJ
54112014-09-02 Jakub Jelinek <jakub@redhat.com>
5412 Balaji V. Iyer <balaji.v.iyer@intel.com>
5413 Igor Zamyatin <igor.zamyatin@intel.com>
5414
5415 * c-parser.c (c_parser_cilk_for): New function.
5416 (c_parser_cilk_grainsize): Likewise.
5417 (c_get_temp_regvar): Likewise.
5418 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5419 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5420 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5421 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5422 case.
5423
b7679d96
CG
54242014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5425
5426 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5427 with using HOST_WIDE_INT without truncation to 'int'
5428
59ea0364
MP
54292014-08-22 Marek Polacek <polacek@redhat.com>
5430
5431 PR c++/62199
5432 * c-typeck.c (parser_build_binary_op): Adjust call to
5433 warn_logical_not_parentheses.
5434
671a475e
IZ
54352014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5436
5437 PR other/62008
5438 * c-parser.c (c_parser_array_notation): Check for correct
5439 type of an array added.
5440
04159acf
MP
54412014-08-19 Marek Polacek <polacek@redhat.com>
5442
5443 PR c++/62153
5444 * c-typeck.c (build_binary_op): If either operand of a comparison
5445 is a boolean expression, call maybe_warn_bool_compare.
5446
c77935ee
PP
54472014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5448
5449 PR c/45584
5450 * c-typeck.c (build_c_cast): Do a conversion even when the
5451 TYPE_MAIN_VARIANTs are the same.
5452
35aff4fb
MP
54532014-08-19 Marek Polacek <polacek@redhat.com>
5454
5455 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5456 pedwarn_c99 instead of pedwarn.
5457 (grokfield): Likewise.
5458 (warn_defaults_to): New function.
5459 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5460 Unconditionally call pedwarn_c99 instead of pedwarn.
5461 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5462 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5463 check flag_isoc11 before.
5464 * c-errors.c (pedwarn_c99): Change the return type to bool.
5465 Handle -Wc99-c11-compat.
5466 * c-parser.c (disable_extension_diagnostics): Handle
5467 warn_c99_c11_compat.
5468 (restore_extension_diagnostics): Likewise.
5469 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5470 instead of pedwarn, don't check flag_isoc11 before.
5471 (c_parser_declspecs): Likewise.
5472 (c_parser_alignas_specifier): Likewise.
5473 (c_parser_alignof_expression): Likewise.
5474 (c_parser_generic_selection): Likewise.
5475 * c-tree.h (pedwarn_c99): Update declaration.
5476 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5477 of pedwarn_c99.
5478
177cce46
MP
54792014-08-19 Marek Polacek <polacek@redhat.com>
5480
5481 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5482 to pedwarn_c90.
5483 * c-errors.c: Include "opts.h".
5484 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5485 * c-parser.c (disable_extension_diagnostics): Handle negative value
5486 of warn_c90_c99_compat, too.
5487 (restore_extension_diagnostics): Likewise.
5488 (c_parser_compound_statement_nostart): Pass
5489 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5490
6dc99c33
MP
54912014-08-12 Marek Polacek <polacek@redhat.com>
5492
5493 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5494 Add pedwarn.
5495 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5496 Likewise.
5497 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5498
3f8257db 54992014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5500
5501 PR c/51849
5502 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5503 Call pedwarn_c90 instead of pedwarn.
5504 (check_bitfield_type_and_width): Likewise.
5505 (declspecs_add_qual): Likewise.
5506 (declspecs_add_type): Likewise.
5507 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5508 Adjust to only call pedwarn_c90.
5509 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5510 pedwarn_c90 instead of pedwarn.
5511 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5512 * c-parser.c (disable_extension_diagnostics): Handle
5513 warn_c90_c99_compat.
5514 (restore_extension_diagnostics): Likewise.
5515 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5516 pedwarn_c90 instead of pedwarn.
5517 (c_parser_initelt): Likewise.
5518 (c_parser_postfix_expression): Likewise.
5519 (c_parser_postfix_expression_after_paren_type): Likewise.
5520 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5521 * c-tree.h: Fix formatting.
5522 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5523 pedwarn_c90 instead of pedwarn.
5524
9f25a338
TS
55252014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5526
5527 * c-typeck.c: Remove include of pointer-set.h.
5528
044331a8
MP
55292014-08-07 Marek Polacek <polacek@redhat.com>
5530
5531 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5532
b787e7a2
TS
55332014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5534
5535 * c-typeck.c: Use hash_map instead of pointer_map.
5536
6e2830c3
TS
55372014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5538
5539 * c-decl.c: Use hash_set instead of pointer_set.
5540
a7ee52fb
IZ
55412014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5542
5543 PR middle-end/61455
5544 * c-array-notation.c (expand_array_notations): Handling
5545 of DECL_EXPR added.
5546
b4dfdc11
MG
55472014-07-31 Marc Glisse <marc.glisse@inria.fr>
5548
5549 PR c++/60517
5550 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5551 a local variable.
5552
976d5a22
TT
55532014-07-30 Tom Tromey <tromey@redhat.com>
5554
5555 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5556 field.
5557 (really_start_incremental_init, push_init_level): Initialize
5558 designator_depth.
5559 (pop_init_level): Set global designator_depth.
5560 (process_init_element): Check for designated_init attribute.
5561
30281de2
MP
55622014-07-20 Marek Polacek <polacek@redhat.com>
5563
5564 PR c/61852
5565 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5566 (implicitly_declare): Pass location to implicit_decl_warning.
5567
b108f48f
JJ
55682014-07-14 Jakub Jelinek <jakub@redhat.com>
5569
5570 PR middle-end/61294
5571 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5572 If non-NULL, call c_parser_check_literal_zero.
5573 (c_parser_check_literal_zero): New function.
5574 (c_parser_postfix_expression_after_primary): Adjust
5575 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5576
773ec47f
MP
55772014-07-06 Marek Polacek <polacek@redhat.com>
5578
5579 PR c/6940
5580 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5581 * c-tree.h (C_ARRAY_PARAMETER): Define.
5582 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5583 function parameter.
5584
22e1cf1c 55852014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5586 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5587
5588 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5589 releasing symbol.
5590
52ec0ea3
MP
55912014-07-01 Marek Polacek <polacek@redhat.com>
5592
5593 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5594 instead of 0 to WARN_FOR_ASSIGNMENT.
5595
d5c3d343
MP
55962014-07-01 Marek Polacek <polacek@redhat.com>
5597
5598 PR c/58286
5599 * c-typeck.c (convert_for_assignment): Pass
5600 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5601
6a7253a4
MP
56022014-06-30 Marek Polacek <polacek@redhat.com>
5603
5604 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5605 has no_sanitize_undefined attribute.
5606
5e88a8f4
IZ
56072014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5608
5609 PR middle-end/57541
5610 * c-array-notation.c (fix_builtin_array_notation_fn):
5611 Check for 0 arguments in builtin call. Check that bultin argument is
5612 correct.
5613 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5614 index.
5615
9698b078
SH
56162014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5617
5618 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5619 qualifiers in __auto_type for atomic types.
5620 (c_parser_typeof_specifier): Discard all type qualifiers in
5621 __typeof__ for atomic types.
5622
6e07c515
MP
56232014-06-25 Marek Polacek <polacek@redhat.com>
5624
5625 PR c/61162
5626 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5627 the return expression to c_finish_return.
5628
da6f124d
JJ
56292014-06-25 Jakub Jelinek <jakub@redhat.com>
5630
5631 * c-typeck.c (c_finish_omp_clauses): Make sure
5632 OMP_CLAUSE_LINEAR_STEP has correct type.
5633
c203e8a7
TS
56342014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5635
5636 * c-decl.c: Adjust.
5637
56ad0e38
JJ
56382014-06-24 Jakub Jelinek <jakub@redhat.com>
5639
5640 * c-parser.c (c_parser_omp_for_loop): For
5641 #pragma omp parallel for simd move lastprivate clause from parallel
5642 to for rather than simd.
5643
47c2554f
MP
56442014-06-23 Marek Polacek <polacek@redhat.com>
5645
5646 * c-typeck.c (parser_build_binary_op): Don't call
5647 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5648
56363ffd
JH
56492014-06-15 Jan Hubicka <hubicka@ucw.cz>
5650
5651 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5652 * c-decl.c (merge_decls): Likewise.
5653
d7ff7ae5
MP
56542014-06-09 Marek Polacek <polacek@redhat.com>
5655
5656 PR c/36446
5657 * c-typeck.c (error_init): Call inform instead of error_at.
5658 (pedwarn_init): Call inform instead of pedwarn.
5659 (warning_init): Call inform instead of warning_at.
5660
24d047a3
JH
56612014-06-07 Jan Hubicka <hubicka@ucw.cz>
5662
5663 * c-decl.c (merge_decls): Use set_decl_section_name.
5664 (duplicate_decls): Remove node if it exists.
5665
9bac5cbb
G
56662014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5667
5668 PR c/53119
5669 * c-typeck.c (push_init_level, process_init_element,
5670 pop_init_level): Correct check for zero initialization, move
5671 missing brace warning to respect zero initialization.
5672
8ffcdea8
MP
56732014-06-05 Marek Polacek <polacek@redhat.com>
5674
5675 PR c/56724
5676 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5677
742938c9
MP
56782014-06-05 Marek Polacek <polacek@redhat.com>
5679
5680 PR c/49706
5681 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5682 on the left hand side operand of a comparison.
742938c9 5683
6447c55d
MP
56842014-06-05 Marek Polacek <polacek@redhat.com>
5685
5686 PR c/48062
5687 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5688 Print note only if the warning was printed.
5689
9dc7743c
IZ
56902014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5691
5692 PR c/58942
5693 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5694 with a pointer.
5695
fedfecef
MP
56962014-06-03 Marek Polacek <polacek@redhat.com>
5697
5698 PR c/60439
5699 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5700 c_start_case.
5701 * c-tree.h (c_start_case): Update.
5702 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5703 switch condition has boolean value.
5704
9b2b7279
AM
57052014-06-02 Andrew MacLeod <amacleod@redhat.com>
5706
5707 * c-decl.c: Include builtins.h.
5708 * c-parser.c: Likewise.
5709
5c1bc275
MP
57102014-05-27 Marek Polacek <polacek@redhat.com>
5711
5712 PR c/56724
5713 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5714 error and warning calls to error_at and warning_at. Pass location of
5715 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5716 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5717 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5718
97563bc8
IZ
57192014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5720
5721 PR c/61191
5722 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5723 function parameters.
5724
aede2c10
JH
57252014-05-23 Jan Hubicka <hubicka@ucw.cz>
5726
5727 * c-decl.c (merge_decls): Preserve symtab node pointers.
5728 (duplicate_decls): Free new decl.
5729
edbba2ce
TS
57302014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5731
f3316c6d
TS
5732 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5733 initialization.
5734
edbba2ce
TS
5735 * c-parser.c (c_parser_omp_target): Return bool values.
5736
68c81f24
TS
57372014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5738
5739 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5740 num_teams_loc variable to num_thread_limit_loc.
5741
632f2871
RS
57422014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5743
5744 * c-array-notation.c (expand_array_notations): Use void_node
5745 instead of void_zero_node.
5746
766090c2
TS
57472014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5748
5749 * c-decl.c (finish_struct): Adjust.
5750 (finish_enum): Likewise.
5751 (bind): Adjust.
5752 (record_inline_static): Likewise.
5753 (push_scope): Likewise.
5754 (make_label): Likewise.
5755 (lookup_label_for_goto): Likewise.
5756 (finish_struct): Likewise.
5757 (finish_enum): Likewise.
5758 (store_parm_decls): Likewise.
5759 (c_push_function_context): Likewise.
5760 * c-lang.h: Remove usage of variable_size gty attribute.
5761 * c-parser.c (c_parse_init): Adjust.
5762 (c_parse_file): Likewise.
5763
2b107f6b
MP
57642014-05-13 Marek Polacek <polacek@redhat.com>
5765
5766 PR c/61162
5767 * c-typeck.c (convert_for_assignment): Pass location to
5768 WARN_FOR_ASSIGNMENT instead of input_location.
5769
d033409e
MP
57702014-05-10 Marek Polacek <polacek@redhat.com>
5771
5772 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5773 maybe_warn_string_init.
5774 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5775 maybe_warn_string_init.
5776 * c-tree.h (maybe_warn_string_init): Update declaration.
5777 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5778 Call pedwarn_init with loc instead of with input_location.
5779 (digest_init): Pass init_loc to maybe_warn_string_init.
5780 (pop_init_level): Call pedwarn_init with loc instead of with
5781 input_location.
5782 (set_init_index): Likewise.
5783 (process_init_element): Likewise.
5784
ea58ef42
MP
57852014-05-09 Marek Polacek <polacek@redhat.com>
5786
5787 PR c/61096
5788 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5789 (c_parser_initelt): Pass location to set_init_label. Pass array index
5790 location to set_init_index.
5791 * c-tree.h (push_init_level): Update declaration.
5792 (pop_init_level): Likewise.
5793 (set_init_index): Likewise.
5794 (set_init_label): Likewise.
5795 * c-typeck.c (error_init): Add location parameter. Call error_at
5796 instead of error.
5797 (digest_init): Pass init_loc to error_init.
5798 (really_start_incremental_init):
5799 (push_init_level): Add location parameter. Pass loc to pop_init_level
5800 and error_init.
5801 (pop_init_level): Likewise.
5802 (set_designator): Add location parameter. Pass loc to pop_init_level,
5803 push_init_level, and error_init.
5804 (set_init_index): Add location parameter. Pass loc to error_init and
5805 set_designator.
5806 (set_init_label): Likewise.
5807 (output_init_element): Pass loc to error_init.
5808 (process_init_element): Pass loc to error_init, pop_init_level,
5809 pedwarn_init, and push_init_level.
5810
661a0813
MP
58112014-05-09 Marek Polacek <polacek@redhat.com>
5812
5813 PR c/50459
5814 * c-parser.c (c_parser_attributes): Parse the arguments as an
5815 expression-list if the attribute takes identifier.
5816
2793eeab
MP
58172014-05-08 Marek Polacek <polacek@redhat.com>
5818
5819 PR c/61053
5820 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5821 TYPE_ALIGN_UNIT.
5822
f827930a
MP
58232014-05-08 Marek Polacek <polacek@redhat.com>
5824
5825 PR c/61077
5826 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5827 of main.
5828
1d60af08
KZ
58292014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5830 Mike Stump <mikestump@comcast.net>
5831 Richard Sandiford <rdsandiford@googlemail.com>
5832
5833 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5834 (finish_enum): Use wide-int interfaces.
5835 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5836 * c-typeck.c (build_c_cast): Likewise.
5837 (set_nonincremental_init_from_string): Likewise.
5838 (c_tree_equal): Likewise.
5839
a0e24419
MP
58402014-05-02 Marek Polacek <polacek@redhat.com>
5841
5842 PR c/25801
5843 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5844 Return size_one_node when the type is not complete.
5845 (pointer_diff): Remove comment.
5846 (build_unary_op): Improve error messages.
5847
19fc9faa
MP
58482014-05-02 Marek Polacek <polacek@redhat.com>
5849
5850 * c-typeck.c (c_finish_return): Separate warning_at calls.
5851
63bc4e87
MP
58522014-05-02 Marek Polacek <polacek@redhat.com>
5853
5854 * c-tree.h (error_init): Remove declaration.
5855 (pedwarn_init): Likewise.
5856 * c-typeck.c (error_init): Make static and move above.
5857 (pedwarn_init): Likewise.
5858 (warning_init): Move above.
5859 (maybe_warn_string_init): Likewise.
5860
4bd2511b
JL
58612014-05-01 Jeff Law <law@redhat.com>
5862
5863 Revert:
5864
5865 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5866 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5867 avoid goto.
5868
6a358dcb
MP
58692014-05-02 Marek Polacek <polacek@redhat.com>
5870
5871 PR c/60784
5872 * c-typeck.c (push_init_level): Set constructor_designated to
5873 p->designated for structures.
5874
ae5ebda4
MP
58752014-05-01 Marek Polacek <polacek@redhat.com>
5876
5877 PR c/60915
5878 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5879 function-definition has an attribute after the declarator.
5880
96b40f8d
MP
58812014-05-01 Marek Polacek <polacek@redhat.com>
5882
5883 PR c/60257
5884 * c-typeck.c (warning_init): Add location_t parameter. Call
5885 warning_at instead of warning.
5886 (push_init_level): Pass input_location to warning_init.
5887 (add_pending_init): Add location_t parameter. Pass loc to
5888 warning_init.
5889 (set_nonincremental_init): Pass input_location to add_pending_init.
5890 (set_nonincremental_init_from_string): Likewise.
5891 (output_init_element): Pass loc to warning_init and to
5892 add_pending_init.
5893
32e00768
MP
58942014-05-01 Marek Polacek <polacek@redhat.com>
5895
5896 PR c/43395
5897 * c-typeck.c (c_finish_return): Distinguish between label and variable
5898 when warning about returning local address.
5899
c9379ce2
MP
59002014-05-01 Marek Polacek <polacek@redhat.com>
5901
5902 PR c/29467
5903 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5904 in C89 mode.
5905
d00887e8
MP
59062014-05-01 Marek Polacek <polacek@redhat.com>
5907
5908 PR c/43245
5909 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5910 instead of 0 to WARN_FOR_QUALIFIERS.
5911
5436fa2e
MP
59122014-05-01 Marek Polacek <polacek@redhat.com>
5913
5914 PR c/56989
5915 * c-typeck.c (default_conversion): Use better location for
5916 error call.
5917
f8ed5150
MP
59182014-04-30 Marek Polacek <polacek@redhat.com>
5919
5920 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5921 also when SANITIZE_FLOAT_DIVIDE is on.
5922
8337d1db
MP
59232014-04-30 Marek Polacek <polacek@redhat.com>
5924
5925 PR c/60139
5926 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5927 and pedwarn_init. Use loc insted of input_location.
5928
c4bdc42f
MP
59292014-04-30 Marek Polacek <polacek@redhat.com>
5930
5931 PR c/60351
5932 * c-typeck.c (build_binary_op): Use location when warning about
5933 shift count.
5934
45484dcf
MP
59352014-04-25 Marek Polacek <polacek@redhat.com>
5936
5937 PR c/18079
5938 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5939 always_inline/noinline and hot/cold attributes.
5940
34cf811f
MP
59412014-04-25 Marek Polacek <polacek@redhat.com>
5942
5943 PR c/60114
5944 * c-parser.c (c_parser_initelt): Pass input_location to
5945 process_init_element.
5946 (c_parser_initval): Pass loc to process_init_element.
5947 * c-tree.h (process_init_element): Adjust declaration.
5948 * c-typeck.c (push_init_level): Pass input_location to
5949 process_init_element.
5950 (pop_init_level): Likewise.
5951 (set_designator): Likewise.
5952 (output_init_element): Add location_t parameter. Pass loc to
5953 digest_init.
5954 (output_pending_init_elements): Pass input_location to
5955 output_init_element.
5956 (process_init_element): Add location_t parameter. Pass loc to
5957 output_init_element.
5958
42056eac
JJ
59592014-04-24 Jakub Jelinek <jakub@redhat.com>
5960
5961 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5962 atomic-clause, allow comma in between atomic-clause and
5963 seq_cst.
5964
e162a134
JJ
59652014-04-22 Jakub Jelinek <jakub@redhat.com>
5966
5967 PR c/59073
5968 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5969 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5970
2f6babac
IZ
59712014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5972
5973 PR middle-end/60469
5974 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5975 create_tmp_var instead build_decl for creating temps.
5976 (build_array_notation_expr): Likewise.
5977 (fix_conditional_array_notations_1): Likewise.
5978 (fix_array_notation_expr): Likewise.
5979 (fix_array_notation_call_expr): Likewise.
5980
8edbfaa6
JJ
59812014-03-28 Jakub Jelinek <jakub@redhat.com>
5982
5983 PR c++/60689
5984 * c-tree.h (c_build_function_call_vec): New prototype.
5985 * c-typeck.c (build_function_call_vec): Don't call
5986 resolve_overloaded_builtin here.
5987 (c_build_function_call_vec): New wrapper function around
5988 build_function_call_vec. Call resolve_overloaded_builtin here.
5989 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5990 Call c_build_function_call_vec instead of build_function_call_vec.
5991 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5992 * c-decl.c (finish_decl): Likewise.
5993
7485aeea
MLI
59942014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5995
5996 PR c/55383
5997 * c-typeck.c: Use correct format string in cast-qual warning
5998
b17a8b07
TS
59992014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6000
6001 * c-decl.c (c_decl_attributes): Use
6002 lang_hooks.types.omp_mappable_type.
6003 * c-typeck.c (c_finish_omp_clauses): Likewise.
6004
3af9c5e9
MP
60052014-03-06 Marek Polacek <polacek@redhat.com>
6006
6007 PR c/60197
6008 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6009 of checking tree code.
6010
1c9f5f33
PK
60112014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6012
6013 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6014 (c_parser_parameter_declaration): Likewise.
6015
cc28fc7f
MP
60162014-02-19 Marek Polacek <polacek@redhat.com>
6017
6018 PR c/60195
6019 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6020 Call mark_exp_read on exp.value.
6021 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6022 TREE_ADDRESSABLE on old instead of val.
6023 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6024
b581c05c
PK
60252014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6026
6027 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6028 C_EXPR_APPEND by vec_safe_push.
6029 * c-tree.h (C_EXPR_APPEND): Remove.
6030
81e5eca8
MP
60312014-01-31 Marek Polacek <polacek@redhat.com>
6032
6033 PR c/59963
6034 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6035 build_function_call_vec.
6036 (build_function_call): Likewise.
6037 (build_atomic_assign): Likewise.
6038 (build_function_call_vec): Add arg_loc parameter. Use it.
6039 (convert_arguments): Likewise.
6040 (convert_for_assignment): Rename rhs_loc to expr_loc.
6041 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6042 (c_parser_objc_keywordexpr): Likewise.
6043 (c_parser_postfix_expression_after_primary): Call
6044 build_function_call_vec with expr_loc rather than op_loc.
6045 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6046 build_function_call_vec.
6047 (c_parser_expr_list): Add locations parameter. Fill it with locations
6048 of function arguments.
6049 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6050
68fca595
MP
60512014-01-30 Marek Polacek <polacek@redhat.com>
6052
6053 PR c/59940
6054 * c-typeck.c (build_function_call_vec): Use loc parameter.
6055 (convert_arguments): Add location parameter. Use it.
6056 (ep_convert_and_check): Likewise.
6057 (build_atomic_assign): Adjust convert_for_assignment call.
6058 (build_modify_expr): Likewise.
6059 (digest_init): Likewise.
6060 (c_finish_return): Likewise.
6061 (build_conditional_expr): Adjust ep_convert_and_check calls.
6062 (convert_for_assignment): Add rhs_loc parameter. Use it.
6063 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6064 calls.
6065
fa337f3a
RB
60662014-01-30 Richard Biener <rguenther@suse.de>
6067
6068 PR c/59905
6069 * c-typeck.c (build_function_call_vec): Do not replace calls
6070 to a function via an incompatible type with a runtime abort.
6071
b72271b9
BI
60722014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6073
6074 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6075 flag_enable_cilkplus with flag_cilkplus.
6076 (c_parser_direct_declarator_inner): Likewise.
6077 (c_parser_attribute_any_word): Likewise.
6078 (c_parser_attributes): Likewise.
6079 (c_parser_compound_statement): Likewise.
6080 (c_parser_statement_after_labels): Likewise.
6081 (c_parser_if_statement): Likewise.
6082 (c_parser_switch_statement): Likewise.
6083 (c_parser_do_statement): Likewise.
6084 (c_parser_for_statement): Likewise.
6085 (c_parser_unary_expression): Likewise.
6086 (c_parser_postfix_expression): Likewise.
6087 (c_parser_postfix_expression_after_primary): Likewise.
6088 (c_parser_postfix_expression_after_primary): Likewise.
6089 (c_parser_omp_clause_name): Likewise.
6090 (c_finish_omp_declare_simd): Likewise.
6091 (c_parser_cilk_verify_simd): Likewise.
6092 * c-typeck.c (build_array_ref): Likewise.
6093 (build_function_call_vec): Likewise.
6094 (convert_arguments): Likewise.
6095 (build_compound_expr): Likewise.
6096 (c_finish_return): Likewise.
6097 (c_finish_if_stmt): Likewise.
6098 (c_finish_loop): Likewise.
6099 (build_binary_op): Likewise.
6100
393e8e8b
MP
61012014-01-23 Marek Polacek <polacek@redhat.com>
6102
6103 PR c/59846
6104 * c-typeck.c (parser_build_binary_op): Use location instead of
6105 input_location.
6106 (build_binary_op): Pass location to shorten_compare.
6107
f04dda30
MP
61082014-01-23 Marek Polacek <polacek@redhat.com>
6109
6110 PR c/58346
6111 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6112 an empty aggregate.
6113
789eadcd
MP
61142014-01-23 Marek Polacek <polacek@redhat.com>
6115
6116 PR c/59871
6117 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6118 of a comma expression.
6119 (emit_side_effect_warnings): Likewise.
6120
40f14e9f
BI
61212014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6122
6123 PR c/59825
6124 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6125 function to use walk_tree and moved a lot of its functionality to
6126 expand_array_notations.
6127 (expand_array_notations): New function.
6128
74558dd9
BI
61292014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6130
6131 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6132 attribute an attribute without value.
6133
652fea39
JJ
61342014-01-23 Jakub Jelinek <jakub@redhat.com>
6135
6136 PR middle-end/58809
6137 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6138 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6139
f34f1c87
MP
61402014-01-22 Marek Polacek <polacek@redhat.com>
6141
6142 PR c/59891
6143 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6144 of remove_c_maybe_const_expr on op1 and op2.
6145
241f845a
JJ
61462014-01-15 Jakub Jelinek <jakub@redhat.com>
6147
6148 PR c/58943
6149 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6150 effects, preevaluate rhs using SAVE_EXPR first.
6151
9a74f20c
BI
61522014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6153
6154 PR c++/59631
6155 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6156 statements with if-elseif statements.
6157
96066ce1
MP
61582014-01-06 Marek Polacek <polacek@redhat.com>
6159
6160 PR c/57773
6161 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6162 defined bit-field types only in ISO C.
6163
23a5b65a
RS
61642014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6165
6166 Update copyright years
6167
f9030485
RS
61682014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6169
6170 * c-array-notation.c: Use the standard form for the copyright notice.
6171
41958c28
BI
61722013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6173
6174 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6175 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6176 field in parser is not empty. If not-empty, call the function
6177 c_parser_finish_omp_declare_simd.
6178 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6179 between SIMD-enabled functions and #pragma simd. Added new parameter.
6180 (c_parser_cilk_all_clauses): Modified the usage of the function
6181 c_parser_cilk_clause_vectorlength as mentioned above.
6182 (c_parser_cilk_simd_fn_vector_attrs): New function.
6183 (c_finish_cilk_simd_fn_tokens): Likewise.
6184 (is_cilkplus_vector_p): Likewise.
6185 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6186 "nomask," and "mask" strings in clause name.
6187 (c_parser_omp_all_clauses): Added 3 new case statements:
6188 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6189 PRAGMA_CILK_CLAUSE_NOMASK.
6190 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6191 check for vector attribute and if so call the function
6192 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6193 called the function c_finish_cilk_simd_fn_tokens.
6194 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6195 parser field is non-empty. If so, parse them as you would parse
6196 the omp declare simd pragma.
6197 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6198 Added a check when step is a parameter and flag it as error.
6199 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6200 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6201 pragma_omp_clause.
6202
cef0fd0e
TS
62032013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6204
6205 * c-parser.c (c_parser_omp_parallel): Fix description.
6206
12893402
BI
62072013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6208
6209 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6210 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6211 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6212 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6213
296674db
JM
62142013-12-04 Joseph Myers <joseph@codesourcery.com>
6215
6216 PR c/52023
6217 * c-parser.c (c_parser_alignas_specifier): Use
6218 c_sizeof_or_alignof_type instead of c_alignof.
6219 (c_parser_alignof_expression): Likewise, with min_alignof
6220 parameter depending on alignof spelling used.
6221
edd28054
MP
62222013-12-04 Marek Polacek <polacek@redhat.com>
6223
6224 PR c/54113
6225 * c-decl.c (start_function): Don't warn for missing prototype for
6226 inline functions.
6227
da0fc454
MP
62282013-12-03 Marek Polacek <polacek@redhat.com>
6229
6230 PR c/59351
6231 * c-decl.c (build_compound_literal): Allow compound literals with
6232 empty initial value.
6233
4c2ecab0
JM
62342013-12-02 Joseph Myers <joseph@codesourcery.com>
6235
6236 PR c/58235
6237 * c-typeck.c (build_modify_expr): Diagnose assignment to
6238 expression with array type.
6239
340baef7
JM
62402013-11-29 Joseph Myers <joseph@codesourcery.com>
6241
6242 PR c/42262
6243 * c-typeck.c (process_init_element): Do not treat a string as
6244 initializing a whole array when used with a designator for an
6245 individual element.
6246
6763b9f7
JM
62472013-11-29 Joseph Myers <joseph@codesourcery.com>
6248
6249 PR c/57574
6250 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6251 an inline function following a static declaration.
6252
e7bd1de1
JJ
62532013-11-28 Jakub Jelinek <jakub@redhat.com>
6254
6255 PR c/59310
6256 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6257 to p_name before calling c_parser_omp_teams instead of after.
6258 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6259 argument. Remove unused p_name variable.
6260
0136f8f0
AH
62612013-11-27 Aldy Hernandez <aldyh@redhat.com>
6262 Jakub Jelinek <jakub@redhat.com>
6263
6264 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6265 external_scope is NULL.
6266
241b71bb
TV
62672013-11-27 Tom de Vries <tom@codesourcery.com>
6268 Marc Glisse <marc.glisse@inria.fr>
6269
6270 PR c++/59032
6271 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6272
2fb9a547
AM
62732013-11-22 Andrew MacLeod <amacleod@redhat.com>
6274
6275 * c-typeck.c: Add required include files from gimple.h.
6276
8400e75e
DM
62772013-11-22 David Malcolm <dmalcolm@redhat.com>
6278
6279 * c-decl.c (define_label, shadow_tag_warned)
6280 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6281 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6282 (declspecs_add_type): Remove use of in_system_header macro.
6283 * c-parser.c (c_parser_unary_expression): Likewise.
6284 * c-typeck.c (store_init_value, process_init_element)
6285 (c_start_case): Likewise.
6286
6287 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6288 macro.
6289
6290 * c-parser.c (c_parser_set_source_position_from_token): Remove
6291 reference to in_system_header from comment.
6292
386b1f1f
RS
62932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6294
6295 * c-decl.c (grokdeclarator): Update comment to refer to
6296 tree_to_[su]hwi rather than tree_low_cst.
6297
ae7e9ddd
RS
62982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6299
6300 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6301 tree_to_uhwi throughout.
6302
9439e9a1
RS
63032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6304
6305 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6306 throughout.
6307
9541ffee
RS
63082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6309
6310 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6311 throughout.
6312
c02065fc
AH
63132013-11-15 Aldy Hernandez <aldyh@redhat.com>
6314
6315 * c-parser.c (c_parser_cilk_simd): New.
6316 (c_parser_cilk_verify_simd): New.
6317 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6318 (c_parser_omp_for_loop): Add case for NE_EXPR.
6319 Set c_break_label for CILK_SIMD.
6320 (c_parser_cilk_clause_vectorlength): New.
6321 (c_parser_cilk_clause_linear): New.
6322 (c_parser_cilk_clause_name): New.
6323 (c_parser_cilk_all_clauses): New.
6324 * c-typeck.c (build_unary_op): Pass location argument to
6325 readonly_error.
6326 (build_modify_expr): Same.
6327 (build_asm_expr): Same.
6328 (c_finish_bc_stmt): Error on break/continue in loops.
6329
18f429e2
AM
63302013-11-14 Andrew MacLeod <amacleod@redhat.com>
6331
6332 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6333
d8a2d370
DN
63342013-11-14 Diego Novillo <dnovillo@google.com>
6335
6336 * c-decl.c: Include print-tree.h.
6337 Include stor-layout.h.
6338 Include varasm.h.
6339 Include attribs.h.
6340 Include stringpool.h.
6341 * c-lang.c: Include fold-const.h.
6342 * c-parser.c: Include stringpool.h.
6343 Include attribs.h.
6344 Include stor-layout.h.
6345 Include varasm.h.
6346 Include trans-mem.h.
6347 * c-typeck.c: Include stor-layout.h.
6348 Include trans-mem.h.
6349 Include varasm.h.
6350 Include stmt.h.
6351
38b7bc7f
JM
63522013-11-13 Joseph Myers <joseph@codesourcery.com>
6353
6354 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6355 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6356 __auto_type.
6357 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6358 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6359 RID_AUTO_TYPE.
6360 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6361 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6362 (c_parser_declarator, c_parser_direct_declarator_inner)
6363 (c_parser_parameter_declaration, c_parser_type_name): All callers
6364 changed.
6365 (c_parser_declaration_or_fndef): Handle declarations with type
6366 determined from the initializer.
6367
45b0be94
AM
63682013-11-12 Andrew MacLeod <amacleod@redhat.com>
6369
18f429e2 6370 * c-typeck.c: Include gimplify.h.
45b0be94 6371
582d9b50
JM
63722013-11-12 Joseph Myers <joseph@codesourcery.com>
6373
6374 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6375 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6376 comment.
6377 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6378 or _Thread_local as appropriate in diagnostics.
6379 (build_null_declspecs): Initialize ret->thread_gnu_p.
6380 (declspecs_add_scspec): Handle either __thread or _Thread_local
6381 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6382 pedantic. Do not disallow _Thread_local extern and _Thread_local
6383 static.
6384
267bac10
JM
63852013-11-07 Joseph Myers <joseph@codesourcery.com>
6386 Andrew MacLeod <amacleod@redhat.com>
6387
6388 * c-aux-info.c (gen_type): Handle atomic qualifier.
6389 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6390 qualifiers when compating types.
6391 (shadow_tag_warned): Handle atomic_p in declspecs.
6392 (quals_from_declspecs): Likewise.
6393 (start_decl): Use c_type_promotes_to when promoting argument
6394 types.
6395 (grokdeclarator): Handle _Atomic.
6396 (get_parm_info): Diagnose any qualifier on "void" as only
6397 parameter.
6398 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6399 comparing types. Use c_type_promotes_to when promoting argument
6400 types.
6401 (finish_function): Use c_type_promotes_to when promoting argument
6402 types.
6403 (build_null_declspecs): Handle atomic_p in declspecs.
6404 (declspecs_add_qual): Handle RID_ATOMIC.
6405 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6406 (c_token_starts_declspecs): Handle RID_ATOMIC.
6407 (c_parser_declspecs): Handle atomic type specifiers and
6408 qualifiers.
6409 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6410 from types of expressions with atomic type.
6411 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6412 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6413 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6414 (c_parser_statement_after_labels, c_parser_switch_statement)
6415 (c_parser_for_statement, c_parser_expr_no_commas)
6416 (c_parser_conditional_expression, c_parser_binary_expression)
6417 (c_parser_cast_expression, c_parser_unary_expression)
6418 (c_parser_postfix_expression)
6419 (c_parser_postfix_expression_after_primary, c_parser_expression):
6420 Use convert_lvalue_to_rvalue.
6421 (c_parser_expression_conv, c_parser_expr_list): Document
6422 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6423 (c_parser_objc_synchronized_statement): Use
6424 convert_lvalue_to_rvalue.
6425 (c_parser_objc_selector): Handle RID_ATOMIC.
6426 (c_parser_objc_receiver, c_parser_array_notation): Use
6427 convert_lvalue_to_rvalue.
6428 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6429 _Atomic (type-name).
6430 (struct c_declspecs): Add atomic_p field.
6431 (convert_lvalue_to_rvalue): Declare.
6432 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6433 corresponding atomic types.
6434 (qualify_type): Don't add _Atomic qualifiers from second argument.
6435 (comp_target_types): Do not allow _Atomic mismatches.
6436 (type_lists_compatible_p): Do not remove atomic qualifiers when
6437 comparing types.
6438 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6439 (build_atomic_assign): New functions.
6440 (build_unary_op): Use build_atomic_assign for atomic increment and
6441 decrement.
6442 (build_conditional_expr): Do not treat _Atomic void as a qualified
6443 version of void.
6444 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6445 (find_anonymous_field_with_type, convert_to_anonymous_field)
6446 (convert_for_assignment): Do not remove atomic qualifiers when
6447 comparing types.
6448 (digest_init): Do not accept initialization of arrays of atomic
6449 elements by string constants.
6450 (build_asm_expr): Use convert_lvalue_to_rvalue.
6451 (build_binary_op): Do not treat _Atomic void as a qualified
6452 version of void.
6453
0c249d4b
DD
64542013-11-06 DJ Delorie <dj@redhat.com>
6455
6456 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6457 both explicit and builtin, print the location of the explicit one.
6458
6d7f7e0a
TB
64592013-11-05 Tobias Burnus <burnus@net-b.de>
6460
6461 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6462 c_parser_omp_distribute, c_parser_omp_teams,
6463 c_parser_omp_target, c_parser_omp_declare): Handle
6464 -fopenmp-simd.
6465
b906f4ca
MP
64662013-11-03 Marek Polacek <polacek@redhat.com>
6467
6468 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6469
ee1d5a02
JJ
64702013-11-01 Jakub Jelinek <jakub@redhat.com>
6471
6472 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6473 check_dup_generic at the end, unless remove is true.
6474 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6475 remove = true;.
6476 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6477
5a9785fb
JJ
64782013-10-31 Jakub Jelinek <jakub@redhat.com>
6479
6480 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6481 with decl that is not pointer nor array.
6482
939b37da
BI
64832013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6484
6485 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6486 a spawning function is found.
6487 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6488 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6489 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6490 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6491 case.
6492 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6493 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6494 expr.
6495 (c_finish_return): Added a check to reject _Cilk_spawn in return
6496 expression.
6497 (build_cilk_spawn): New function.
6498 (build_cilk_sync): Likewise.
6499 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6500
d4af74d4
TB
65012013-10-27 Tobias Burnus <burnus@net-b.de>
6502
6503 PR other/33426
6504 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6505 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6506 (c_parser_statement_after_labels): Update calls.
6507
d73749df 65082013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6509
6510 PR other/33426
6511 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6512 Handle PRAGMA_IVDEP.
6513 (c_parser_statement_after_labels): Update call.
6514
f28aa681
MP
65152013-10-24 Marek Polacek <polacek@redhat.com>
6516
6517 * c-parser.c (c_parser_struct_declaration): Add a comment.
6518 (c_parser_declarator): Don't allow _Alignas here.
6519
0645c1a2
AM
65202013-10-17 Andrew MacLeod <amacleod@redhat.com>
6521
6522 * c-parser.c: Include omp-low.h.
6523 * c-typeck.c: Likewise.
6524
568a31f2
MP
65252013-10-17 Marek Polacek <polacek@redhat.com>
6526
6527 PR c/58267
6528 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6529 Document syntax of the array-declarator.
6530 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6531 are not permitted.
6532 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6533 (c_parser_struct_declaration): Likewise.
6534 (c_parser_declarator): Likewise.
6535 (c_parser_direct_declarator_inner): Likewise.
6536 (c_parser_parameter_declaration): Likewise.
6537 (c_parser_type_name): Likewise.
6538
acf0174b
JJ
65392013-10-11 Jakub Jelinek <jakub@redhat.com>
6540
6541 * c-lang.h (current_omp_declare_target_attribute): New extern
6542 decl.
6543 * c-parser.c: Include c-lang.h.
6544 (struct c_parser): Change tokens to c_token *.
6545 Add tokens_buf field. Change tokens_avail type to unsigned int.
6546 (c_parser_consume_token): If parser->tokens isn't
6547 &parser->tokens_buf[0], increment parser->tokens.
6548 (c_parser_consume_pragma): Likewise.
6549 (enum pragma_context): Add pragma_struct and pragma_param.
6550 (c_parser_external_declaration): Adjust
6551 c_parser_declaration_or_fndef caller.
6552 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6553 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6554 Adjust recursive call.
6555 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6556 of pragma_external.
6557 (c_parser_parameter_declaration): Use pragma_param instead of
6558 pragma_external.
6559 (c_parser_compound_statement_nostart, c_parser_label,
6560 c_parser_for_statement): Adjust
6561 c_parser_declaration_or_fndef callers.
6562 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6563 it through to c_parser_conditional_expression.
6564 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6565 pass it through to c_parser_binary_expression. Adjust recursive
6566 call.
6567 (c_parser_binary_expression): Remove prec argument, add
6568 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6569 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6570 binop matches it, use build2 instead of parser_build_binary_op.
6571 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6572 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6573 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6574 Handle pragma_struct and pragma_param the same as pragma_external.
6575 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6576 (c_parser_omp_variable_list): Parse array sections for
6577 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6578 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6579 (c_parser_omp_clause_reduction): Handle user defined reductions.
6580 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6581 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6582 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6583 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6584 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6585 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6586 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6587 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6588 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6589 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6590 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6591 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6592 (c_parser_omp_for_loop): Add CODE argument, pass it through
6593 to c_finish_omp_for. Change last argument to cclauses,
6594 and adjust uses to grab parallel clauses from the array of all
6595 the split clauses. Adjust c_parser_binary_expression,
6596 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6597 (omp_split_clauses): New function.
6598 (c_parser_omp_simd): New function.
6599 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6600 Allow the function to be called also when parsing combined constructs,
6601 and call c_parser_omp_simd when parsing for simd.
6602 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6603 #pragma omp section, require exactly one structured-block instead of
6604 sequence of statements.
6605 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6606 Allow the function to be called also when parsing combined constructs.
6607 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6608 Allow the function to be called also when parsing combined
6609 constructs.
6610 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6611 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6612 c_parser_omp_teams, c_parser_omp_target_data,
6613 c_parser_omp_target_update, c_parser_omp_target,
6614 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6615 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6616 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6617 (c_parser_omp_construct): Add p_name and mask vars. Handle
6618 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6619 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6620 and c_parser_omp_sections callers.
6621 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6622 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6623 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6624 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6625 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6626 OMP_CLAUSE_DEPEND.
6627 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6628 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6629 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6630 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6631 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6632 * c-typeck.c: Include tree-inline.h.
6633 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6634 handle_omp_array_sections_1, handle_omp_array_sections,
6635 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6636 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6637 user defined reductions.
6638 (c_tree_equal): New function.
6639 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6640 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6641 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6642 c_check_omp_declare_reduction_r): New prototypes.
6643 * c-decl.c (current_omp_declare_target_attribute): New variable.
6644 (c_decl_attributes): New function.
6645 (start_decl, start_function): Use it instead of decl_attributes.
6646 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6647 c_omp_reduction_decl, c_omp_reduction_lookup,
6648 c_check_omp_declare_reduction_r): New functions.
6649
0a6c2227
TT
66502013-09-25 Tom Tromey <tromey@redhat.com>
6651
6652 * Make-lang.in (c/gccspec.o): Remove.
6653 (CFLAGS-c/gccspec.o): New variable.
6654 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6655 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6656 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6657
f3bc55f0
TT
66582013-09-25 Tom Tromey <tromey@redhat.com>
6659
6660 * Make-lang.in (c/gccspec.o): Don't use subshell.
6661
a24d975c
MP
66622013-09-18 Marek Polacek <polacek@redhat.com>
6663
6664 PR sanitize/58443
6665 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6666 Remove unnecessary check.
6667
ce6923c5
MP
66682013-09-18 Marek Polacek <polacek@redhat.com>
6669
6670 PR sanitizer/58411
6671 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6672 no_sanitize_undefined attribute.
6673
a1e51df9
KT
66742013-09-13 Kai Tietz <ktietz@redhat.com>
6675
6676 PR target/57848
6677 * c-decl.c (c_builtin_function_ext_scope): Remove
6678 wrong assumption that it is never called on prexisting
6679 symbol.
6680
0af94e6f
JR
66812013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6682
6683 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6684
20059c8b
GDR
66852013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6686
6687 * c-objc-common.c (c_tree_printer): Tidy.
6688
de5a5fa1
MP
66892013-08-30 Marek Polacek <polacek@redhat.com>
6690
6691 * c-typeck.c (build_binary_op): Add division by zero and shift
6692 instrumentation.
6693
2531a1d9 66942013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6695 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6696
6e2bcc98 6697 PR c/35649
2531a1d9
JR
6698 * c-typeck.c (c_common_type): Prefer double_type_node over
6699 other REAL_TYPE types with the same precision.
6700 (convert_arguments): Likewise.
6701
025311c4
GDR
67022013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6703
6704 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6705 (c_initialize_diagnostics): Call a destructor for the early printer.
6706
da6ca2b5
GDR
67072013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6708
6709 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6710 printer initialization.
6711
318cda85 67122013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6713
318cda85
BI
6714 PR c/57490
6715 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6716 check for truth values.
6717 (expand_array_notation_exprs): Added truth values case. Removed an
6718 unwanted else. Added for-loop to walk through subtrees in default
6719 case.
6720
b066401f
GDR
67212013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6722
6723 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6724
fb48aadc
JM
67252013-07-23 Joseph Myers <joseph@codesourcery.com>
6726
6727 * c-parser.c (struct c_generic_association): Fix typo.
6728
433cc7b0
TT
67292013-07-23 Tom Tromey <tromey@redhat.com>
6730 Joseph Myers <joseph@codesourcery.com>
6731
6732 * c-parser.c (struct c_generic_association): New.
6733 (c_generic_association_d): New typedef.
6734 (c_parser_generic_selection): New function.
6735 (c_parser_postfix_expression): Handle RID_GENERIC.
6736
26d40c3d
JM
67372013-07-13 Jason Merrill <jason@redhat.com>
6738
6739 PR c++/57793
6740 * c-decl.c (finish_struct): Check for too-large class.
6741
ecdbd01a 67422013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6743
6744 PR c/57821
6745 * c-typeck.c (set_init_index): When folding, check for index overflow.
6746
1141ed3f
BI
67472013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6748
6749 * c-parser.c (c_parser_array_notation): Removed rejection of array
6750 notations in an array of function pointers.
6751
713b46fa
BI
67522013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6753
6754 * c-array-notation.c (make_triplet_val_inv): New function.
6755 (create_cmp_incr): Likewise.
6756 (create_array_refs): Likewise.
6757 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6758 Also modularized common parts between functions and called the function.
6759 (build_array_notation_expr): Likewise.
6760 (fix_conditional_array_notations_1): Likewise.
6761 (fix_array_notation_expr): Likewise.
6762 (fix_array_notation_call_expr): Likewise.
6763
92f20202
MP
67642013-06-18 Marek Polacek <polacek@redhat.com>
6765
6766 PR c/57630
6767 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6768
73a23b06
BI
67692013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6770
6771 * c-array-notation.c (build_array_notation_expr): Reject array notation
6772 mismatch between LHS and RHS even inside a call_expr. Also, removed
6773 a couple while statements that were dead code.
6774
00b8517d
BI
67752013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6776
6777 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6778 excessive precision expressions in function parameters. Also removed
6779 couple unwanted while statements.
6780
1509bdda
BI
67812013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6782
6783 * c-array-notation.c (expand_array_notation_exprs): Added
6784 ARRAY_NOTATION_REF case.
ab20d992 6785
d60f1706
BI
67862013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6787
6788 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6789 function to c-family/array-notation-common.c.
6790 (is_cilkplus_reduce_builtin): Likewise.
6791 (find_rank): Likewise.
6792 (extract_array_notation_exprs): Likewise.
6793 (replace_array_notations): Likewise.
6794 (find_inv_trees): Likewise.
6795 (replace_inv_trees): Likewise.
6796 (contains_array_notation_expr): Likewise.
6797 (find_correct_array_notation_type): Likewise.
6798 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6799 (struct inv_list): Moved this to c-family/array-notation-common.c.
6800 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6801
6d6efbb3
BI
68022013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6803
6804 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6805 reduction functions outside the for-loop. Added a check if the fundecl
6806 is non-NULL. Finally, removed an unwanted if-statement, and made the
6807 body unconditional.
6808
25c22937
BI
68092013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6810
6811 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6812 condition of the if-statement matches the rank of else-block and then-
6813 block when array notations are used.
6814 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6815 expression after the entire function body is parsed.
6816 (c_parser_expr_no_commas): Delayed creating array notation expressions
6817 to the end of function parsing.
6818 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6819 whole if-statement instead of just the condition.
ab20d992 6820 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6821
edd25645
BI
68222013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6823
6824 PR c/57474
6825 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6826 array to NULL_TREE if they are unused. Also added a check for the
6827 field to be NULL before its fields are used in future.
ab20d992 6828
065ce7f1
RO
68292013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6830
6831 PR bootstrap/57450
6832 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6833 (build_array_notation_expr): Likewise.
6834
36536d79
BI
68352013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6836
6837 * c-typeck.c (build_array_ref): Added a check to see if array's
6838 index is greater than one. If true, then emit an error.
6839 (build_function_call_vec): Exclude error reporting and checking
6840 for builtin array-notation functions.
6841 (convert_arguments): Likewise.
6842 (c_finish_return): Added a check for array notations as a return
6843 expression. If true, then emit an error.
6844 (c_finish_loop): Added a check for array notations in a loop
6845 condition. If true then emit an error.
6846 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6847 (build_binary_op): Added a check for array notation expr inside
6848 op1 and op0. If present, we call another function to find correct
6849 type.
6850 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6851 * c-parser.c (c_parser_compound_statement): Check if array
6852 notation code is used in tree, if so, then transform them into
6853 appropriate C code.
6854 (c_parser_expr_no_commas): Check if array notation is used in LHS
6855 or RHS, if so, then build array notation expression instead of
6856 regular modify.
6857 (c_parser_postfix_expression_after_primary): Added a check for
6858 colon(s) after square braces, if so then handle it like an array
6859 notation. Also, break up array notations in unary op if found.
6860 (c_parser_direct_declarator_inner): Added a check for array
6861 notation.
6862 (c_parser_compound_statement): Added a check for array notation in
6863 a stmt. If one is present, then expand array notation expr.
6864 (c_parser_if_statement): Likewise.
6865 (c_parser_switch_statement): Added a check for array notations in
6866 a switch statement's condition. If true, then output an error.
6867 (c_parser_while_statement): Similarly, but for a while.
6868 (c_parser_do_statement): Similarly, but for a do-while.
6869 (c_parser_for_statement): Similarly, but for a for-loop.
6870 (c_parser_unary_expression): Check if array notation is used in a
6871 pre-increment or pre-decrement expression. If true, then expand
6872 them.
6873 (c_parser_array_notation): New function.
6874 * c-array-notation.c: New file.
6875 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6876
cd192ccc
MS
68772013-05-23 Mike Stump <mikestump@comcast.net>
6878
6879 * c-typeck.c (convert_for_assignment): Handle references to memory
6880 spaces better.
6881
427b248d
JM
68822013-05-16 Jason Merrill <jason@redhat.com>
6883
6884 * Make-lang.in (cc1$(exeext)): Use link mutex.
6885
44d90fe1
PC
68862013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6887
6888 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6889 to simply use OPT_Wpointer_arith.
6890 (build_unary_op): Likewise.
6891
4e7d7b3d
JJ
68922013-04-03 Jakub Jelinek <jakub@redhat.com>
6893
6894 PR c/19449
6895 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6896 argument. If set, or it temporarily for parsing of the first
6897 argument into force_folding_builtin_constant_p.
6898 (c_parser_postfix_expression): Adjust callers.
6899
839b422f
RB
69002013-03-21 Richard Biener <rguenther@suse.de>
6901
6902 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6903 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6904
2ee028f1
MP
69052013-02-12 Marek Polacek <polacek@redhat.com>
6906
6907 PR c/44938
6908 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6909 origtypes to NULL.
6910
8824edff
JJ
69112013-01-24 Jakub Jelinek <jakub@redhat.com>
6912
6913 PR c/56078
6914 * c-typeck.c (set_nonincremental_init_from_string): If
6915 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6916 returned false.
6917 (process_init_element): Likewise.
6918
eadd3d0d
JJ
69192012-12-20 Jakub Jelinek <jakub@redhat.com>
6920
6921 PR c++/55619
6922 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6923 argument, don't call default_function_array_conversion
6924 nor c_fully_fold here.
6925 (c_parser_asm_statement): Adjust callers.
6926 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6927 and outputs here, and call default_function_array_conversion
6928 on inputs that don't need to be addressable.
6929
f8a93a2e
JJ
69302012-12-18 Jakub Jelinek <jakub@redhat.com>
6931
6932 PR c/39464
6933 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6934 warning require that both c_common_unsigned_type as well as
6935 c_common_signed_type is the same for both mvl and mvr types.
6936
9771b263
DN
69372012-11-16 Diego Novillo <dnovillo@google.com>
6938
6939 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6940
6941 * c-common.c: Use new vec API in vec.h.
6942 * c-common.h: Likewise.
6943 * c-gimplify.c: Likewise.
6944 * c-pragma.c: Likewise.
6945 * c-pretty-print.c: Likewise.
6946 * c-pretty-print.h: Likewise.
6947 * c-semantics.c: Likewise.
6948 * c-decl.c: Likewise.
6949 * c-parser.c: Likewise.
6950 * c-tree.h: Likewise.
6951 * c-typeck.c: Likewise.
6952
880661a4
JW
69532012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6954
6955 PR c++/54930
6956 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6957
077d1abe
MLI
69582012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6959
6960 PR c/53066
6961 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6962 shadows a function, unless the variable is a function or a
6963 pointer-to-function.
6964
3a785c97
JJ
69652012-10-12 Jakub Jelinek <jakub@redhat.com>
6966
6967 PR c/54381
6968 * c-parser.c (struct c_tree_loc_pair): Removed.
6969 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6970 add location_t * and tree * arguments, fill in array of 3
6971 sizeof_arg trees and corresponding locs.
6972 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6973 c_parser_expr_list callers.
6974 (c_parser_postfix_expression_after_primary): Likewise. Pass
6975 array of 3 sizeof_arg trees and locs (corresponding to first
6976 3 arguments) to sizeof_pointer_memaccess_warning.
6977
703c8606
LC
69782012-10-09 Lawrence Crowl <crowl@google.com>
6979
6980 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6981 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6982 hash table.
6983
5d9de0d0
PC
69842012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6985
6986 PR c++/54194
6987 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6988 call.
6989
a212e43f
MG
69902012-10-09 Marc Glisse <marc.glisse@inria.fr>
6991
6992 PR c++/54427
6993 * c-typeck.c: Include c-common.h.
6994 (enum stv_conv): Moved to c-common.h.
6995 (scalar_to_vector): Moved to c-common.c.
6996 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6997 * Make-lang.in: c-typeck.c depends on c-common.h.
6998
3b78de56
AC
69992012-10-04 Arnaud Charlet <charlet@adacore.com>
7000
7001 * c-decl.c (c_write_global_declarations): Fix handling of
7002 -fdump-ada-spec*.
7003
78c60e3d
SS
70042012-09-30 Sharad Singhai <singhai@google.com>
7005
7006 * c-decl.c (c_write_global_declarations): Use a different method
7007 to determine if the dump has ben initialized.
7008
9f33203d
JM
70092012-09-14 Joseph Myers <joseph@codesourcery.com>
7010
7011 PR c/54552
7012 * c-typeck.c (c_cast_expr): When casting to a type requiring
7013 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7014 c_fully_fold first.
7015
a27d595d
JM
70162012-09-14 Joseph Myers <joseph@codesourcery.com>
7017
7018 PR c/54103
7019 * c-typeck.c (build_unary_op): Pass original argument of
7020 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7021 any C_MAYBE_CONST_EXPR, if it has integer operands.
7022 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7023 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7024 to c_objc_common_truthvalue_conversion, then remove any
7025 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7026 c_objc_common_truthvalue_conversion not
7027 c_common_truthvalue_conversion.
7028 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7029 call note_integer_operands for arguments with integer operands
7030 that are not integer constants.
7031
9feb29df
JJ
70322012-09-13 Jakub Jelinek <jakub@redhat.com>
7033
7034 PR c/54559
7035 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7036 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7037
d409320c
JJ
70382012-08-31 Jakub Jelinek <jakub@redhat.com>
7039
7040 PR c/54428
7041 * c-convert.c (convert): Don't call fold_convert_loc if
7042 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7043 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7044 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7045
6265d07c
JJ
70462012-08-24 Jakub Jelinek <jakub@redhat.com>
7047
7048 PR c/54355
7049 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7050 for nested and empty_ok arguments in the call to
7051 c_parser_declaration_or_fndef.
7052
1a4049e7
JJ
70532012-08-17 Jakub Jelinek <jakub@redhat.com>
7054
7055 * c-tree.h (c_last_sizeof_arg): Declare.
7056 * c-parser.c (struct c_tree_loc_pair): New type.
7057 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7058 non-NULL.
7059 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7060 (c_parser_postfix_expression_after_primary): Likewise. Call
7061 sizeof_pointer_memaccess_warning if needed.
7062 (sizeof_ptr_memacc_comptypes): New function.
7063 * c-typeck.c (c_last_sizeof_arg): New global variable.
7064 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7065
0229aee9
UB
70662012-07-24 Uros Bizjak <ubizjak@gmail.com>
7067
7068 * c-lang.h (lang_decl): Add variable_size GTY option.
7069
7ee2468b
SB
70702012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7071
7072 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7073 * Make-lang.in: Fix dependencies.
7074
d4a10d0a
SB
70752012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7076
7077 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7078 and add language Makefile hooks.
7079 * config-lang.in: New file.
7080 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7081 add the required "normal" config-lang.in rules.
7082 * c-lang.h: Moved from gcc/ to here.
7083 * c-tree.h: Likewise.
7084 * c-objc-common.c: Likewise.
7085 * c-objc-common.h: Likewise.
7086 * c-typeck.c: Likewise.
7087 * c-convert.c: Likewise.
7088 * c-lang.c: Likewise.
7089 * c-aux-info.c: Likewise.
7090 * c-errors.c: Likewise.
7091 * gccspec.c: Likewise.
7092 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7093 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7094\f
8d9254fc 7095Copyright (C) 2012-2020 Free Software Foundation, Inc.
d4a10d0a
SB
7096
7097Copying and distribution of this file, with or without modification,
7098are permitted in any medium without royalty provided the copyright
7099notice and this notice are preserved.