c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
[gcc.git] / gcc / c / ChangeLog
1 2018-10-02 Richard Biener <rguenther@suse.de>
2
3 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4
5 2018-09-26 Joseph Myers <joseph@codesourcery.com>
6
7 PR c/87390
8 * c-typeck.c (build_binary_op): Use excess precision for
9 comparisons of integers and floating-point for C11 and later.
10
11 2018-09-26 Martin Jambor <mjambor@suse.cz>
12
13 PR c/87347
14 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
15 comment.
16
17 2018-09-17 David Malcolm <dmalcolm@redhat.com>
18
19 * c-objc-common.c (range_label_for_type_mismatch::get_text):
20 Update for new param.
21 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
22 Likewise.
23
24 2018-09-17 Martin Jambor <mjambor@suse.cz>
25
26 PR c/63886
27 * c-parser.c: (warn_for_abs): New function.
28 (c_parser_postfix_expression_after_primary): Call it.
29
30 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
31
32 * c-typeck.c (digest_init): Shorten overlength strings.
33
34 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
35
36 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
37
38 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
39
40 * c-decl.c (finish_decl): Call braced_list_to_string here ...
41 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
42
43 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
44
45 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
46 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
47
48 2018-08-27 David Malcolm <dmalcolm@redhat.com>
49
50 PR 87091
51 * c-decl.c (implicitly_declare): Update call to
52 maybe_add_include_fixit to suggest overriding the location, as it
53 is for a note.
54 * c-objc-common.c (c_tree_printer): Update for conversion of
55 show_caret_p to a tri-state.
56
57 2018-08-27 Martin Liska <mliska@suse.cz>
58
59 * c-decl.c (locate_old_decl): Use new function
60 fndecl_built_in_p and remove check for FUNCTION_DECL if
61 possible.
62 (diagnose_mismatched_decls): Likewise.
63 (merge_decls): Likewise.
64 (warn_if_shadowing): Likewise.
65 (pushdecl): Likewise.
66 (implicitly_declare): Likewise.
67 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
68 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
69 * c-typeck.c (build_function_call_vec): Likewise.
70 (convert_arguments): Likewise.
71
72 2018-08-20 David Malcolm <dmalcolm@redhat.com>
73
74 PR other/84889
75 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
76 (diagnose_mismatched_decls): Likewise, in various places.
77 (warn_if_shadowing): Likewise.
78 (implicit_decl_warning): Likewise.
79 (implicitly_declare): Likewise.
80 (undeclared_variable): Likewise.
81 (declare_label): Likewise.
82 (grokdeclarator): Likewise.
83 (start_function): Likewise.
84 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
85 (c_parser_parameter_declaration): Likewise.
86 (c_parser_binary_expression): Likewise.
87 * c-typeck.c (c_expr_sizeof_expr): Likewise.
88 (parser_build_binary_op): Likewise.
89 (build_unary_op): Likewise.
90 (error_init): Likewise.
91 (pedwarn_init): Likewise.
92 (warning_init): Likewise.
93 (convert_for_assignment): Likewise.
94
95 2018-08-15 David Malcolm <dmalcolm@redhat.com>
96
97 * c-objc-common.c: Include "gcc-rich-location.h".
98 (c_tree_printer): Move implemenation of '%T' to...
99 (print_type): ...this new function.
100 (range_label_for_type_mismatch::get_text): New function.
101 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
102 range for the various ic_argpass cases.
103 (class maybe_range_label_for_tree_type_mismatch): New class.
104 (build_binary_op): Use it when calling binary_op_error.
105
106 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
107
108 * c-decl.c (start_decl): Do not warn if variables is named as main
109 and is a local variable.
110
111 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
112
113 PR c/19315
114 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
115 objects of unknown size.
116
117 2018-08-13 Martin Sebor <msebor@redhat.com>
118
119 PR tree-optimization/71625
120 * c-parser.c (c_parser_declaration_or_fndef): Call
121 braced_list_to_string.
122
123 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
124
125 PR c/86690
126 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
127 errors.
128
129 2018-08-01 Martin Sebor <msebor@redhat.com>
130
131 PR tree-optimization/86650
132 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
133 and TREE_BLOCK (t) from within percent_K_format to this callsite.
134
135 2018-08-01 Jakub Jelinek <jakub@redhat.com>
136
137 PR c/85704
138 * c-typeck.c (init_field_decl_cmp): New function.
139 (output_pending_init_elements): Use it for field comparisons
140 instead of pure bit_position comparisons.
141
142 2018-07-12 Jakub Jelinek <jakub@redhat.com>
143
144 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
145 type here, instead add "omp declare target implicit" attribute.
146 (finish_decl): Diagnose vars without mappable type here.
147
148 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
149 Thomas Schwinge <thomas@codesourcery.com>
150 Cesar Philippidis <cesar@codesourcery.com>
151
152 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
153 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
154 to their non-present_or_* counterparts. Make 'self' an alias to
155 PRAGMA_OACC_CLAUSE_HOST.
156 (c_parser_oacc_data_clause): Update GOMP mappings for
157 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
158 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
159 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
160 Remove support for present_or_* clauses.
161 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
162 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
163 (OACC_DECLARE_CLAUSE_MASK): Likewise.
164 (OACC_DATA_CLAUSE_MASK): Likewise.
165 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
166 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
167 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
168 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
169 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
170
171 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
172
173 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
174 * gimple-parser.c (c_parser_gimple_statement): Likewise.
175 (c_parser_gimple_unary_expression): Likewise.
176
177 2018-06-15 Jakub Jelinek <jakub@redhat.com>
178
179 PR c/86093
180 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
181 before doing POINTER_DIFF_EXPR.
182
183 2018-06-07 Marek Polacek <polacek@redhat.com>
184
185 PR c/85318
186 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
187 for loop initial declarations.
188
189 2018-05-30 David Pagan <dave.pagan@oracle.com>
190
191 PR c/55976
192 * c-decl.c (grokdeclarator): Update check for return type warnings.
193 (start_function): Likewise.
194 (finish_function): Likewise.
195 * c-typeck.c (c_finish_return): Update check for return type warnings.
196 Pass OPT_Wreturn_type to pedwarn when appropriate.
197
198 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
199
200 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
201 __FMA_EXPR handlng.
202
203 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
204
205 * gimple-parser.c: Include internal-fn.h.
206 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
207 (c_parser_gimple_call_internal): New function.
208 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
209 Fix typos in comment.
210
211 2018-05-10 Jakub Jelinek <jakub@redhat.com>
212
213 PR c++/85662
214 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
215 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
216 fold_convert_loc.
217 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
218 fold_offsetof_1, pass argtype as TYPE to it and drop the
219 fold_convert_loc.
220
221 2018-05-02 David Pagan <dave.pagan@oracle.com>
222
223 PR c/30552
224 * c-decl.c (old_style_parameter_scope): New function.
225 * c-parser.c (c_parser_postfix_expression): Check for statement
226 expressions in old-style function parameter list declarations.
227 * c-parser.h (old_style_parameter_scope): New extern declaration.
228
229 2018-04-25 Jakub Jelinek <jakub@redhat.com>
230
231 PR sanitizer/84307
232 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
233 it is not TREE_STATIC.
234 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
235 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
236 its COMPOUND_LITERAL_EXPR_DECL.
237
238 2018-03-21 Joseph Myers <joseph@codesourcery.com>
239
240 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
241 where all functions return the same _FloatN or _FloatNx type,
242 treat integer types as _Float64 instead of double.
243
244 2018-03-21 Jakub Jelinek <jakub@redhat.com>
245
246 PR c/84999
247 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
248 building vector comparison, diagnose it and return error_mark_node.
249
250 2018-03-15 Jakub Jelinek <jakub@redhat.com>
251
252 PR c/84853
253 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
254 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
255 INTEGER_TYPE element type.
256
257 2018-03-13 David Pagan <dave.pagan@oracle.com>
258
259 PR c/46921
260 * c-typeck.c (output_init_element): Ensure field initializer
261 expression is always evaluated if there are side effects.
262
263 2018-03-06 Jakub Jelinek <jakub@redhat.com>
264
265 PR c/84721
266 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
267 !building_stmt_list_p ().
268
269 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
270
271 PR c/84305
272 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
273 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
274 and include the BIND_EXPR in the list of things that need to be
275 pre-evaluated.
276
277 2018-02-09 Nathan Sidwell <nathan@acm.org>
278
279 PR c/84293
280 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
281 to strict_aliasing_warning.
282
283 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
284
285 * c-typeck.c (really_start_incremental_init, push_init_level,
286 set_nonincremental_init, output_init_element, process_init_element):
287 Use DECL_UNNAMED_BIT_FIELD.
288
289 2018-01-31 Marek Polacek <polacek@redhat.com>
290
291 PR c/81779
292 * c-parser.c (c_parser_compound_statement_nostart): Call
293 expansion_point_location_if_in_system_header.
294
295 2018-01-17 David Malcolm <dmalcolm@redhat.com>
296
297 PR c++/83814
298 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
299 the C part.
300
301 2018-01-13 Jakub Jelinek <jakub@redhat.com>
302
303 PR c/83801
304 * c-tree.h (decl_constant_value_1): Add a bool argument.
305 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
306 returning a CONSTRUCTOR if it is true. Use error_operand_p.
307 (decl_constant_value): Adjust caller.
308 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
309 decl_constant_value_1 as IN_INIT. Otherwise, punt if
310 decl_constant_value returns initializer that has BLKmode or
311 array type.
312 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
313
314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
315 Alan Hayward <alan.hayward@arm.com>
316 David Sherwood <david.sherwood@arm.com>
317
318 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
319 TYPE_VECTOR_SUBPARTS.
320
321 2018-01-03 Jakub Jelinek <jakub@redhat.com>
322
323 Update copyright years.
324
325 2018-01-01 Jakub Jelinek <jakub@redhat.com>
326
327 PR c/83595
328 * c-parser.c (c_parser_braced_init, c_parser_initelt,
329 c_parser_conditional_expression, c_parser_cast_expression,
330 c_parser_sizeof_expression, c_parser_alignof_expression,
331 c_parser_postfix_expression, c_parser_omp_declare_reduction,
332 c_parser_transaction_expression): Use set_error () method instead
333 of setting value member to error_mark_node.
334
335 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
336
337 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
338 and _Float<N>X built-in functions.
339
340 2017-12-22 Jakub Jelinek <jakub@redhat.com>
341
342 PR debug/83550
343 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
344 TYPE_STUB_DECL and call rest_of_type_compilation before processing
345 incomplete vars rather than after it.
346
347 PR debug/83547
348 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
349 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
350 and consider empty ones if there are no other stmts. For
351 -Wunused-value walk all statements before the one only followed by
352 DEBUG_BEGIN_STMTs.
353
354 2017-12-22 Mike Stump <mikestump@comcast.net>
355 Eric Botcazou <ebotcazou@adacore.com>
356
357 * c-parser.c (c_parser_while_statement): Add unroll parameter and
358 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
359 (c_parser_do_statement): Likewise.
360 (c_parser_for_statement): Likewise.
361 (c_parser_statement_after_labels): Adjust calls to above.
362 (c_parse_pragma_ivdep): New static function.
363 (c_parser_pragma_unroll): Likewise.
364 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
365 <PRAGMA_UNROLL>: New case.
366
367 2017-12-19 Jakub Jelinek <jakub@redhat.com>
368
369 * c-typeck.c (comptypes_internal, function_types_compatible_p,
370 perform_integral_promotions, digest_init): Replace Yoda conditions
371 with typical order conditions.
372 * c-decl.c (check_bitfield_type_and_width): Likewise.
373
374 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
375
376 * c-typeck.c (c_safe_arg_type_equiv_p,
377 c_safe_function_type_cast_p): New function.
378 (build_c_cast): Implement -Wcast-function-type.
379
380 2017-12-14 Richard Biener <rguenther@suse.de>
381
382 PR c/83415
383 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
384 like REALPART_EXPR for the behavior of whether its operand
385 is an lvalue.
386
387 2017-12-12 Marek Polacek <polacek@redhat.com>
388
389 PR c/82679
390 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
391
392 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
393
394 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
395 * c-parser.c (add_debug_begin_stmt): New.
396 (c_parser_declaration_or_fndef): Call it.
397 (c_parser_compound_statement_nostart): Likewise.
398 (c_parser_statement_after_labels): Likewise.
399 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
400
401 2017-12-07 Joseph Myers <joseph@codesourcery.com>
402
403 * c-decl.c (build_compound_literal): Add parameter alignas_align
404 and set alignment of decl if nonzero.
405 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
406 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
407 qualifier.
408 (c_parser_struct_declaration): Update syntax comment.
409 (c_parser_type_name): Add alignas_ok argument and pass it to
410 c_parser_declspecs.
411 (c_parser_cast_expression): Pass true to c_parser_type_name and
412 give error if a cast used an _Alignas specifier.
413 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
414 give error if sizeof (type-name) used an _Alignas specifier.
415 (c_parser_alignof_expression): Pass true to c_parser_type_name and
416 give error if _Alignof (type-name) used an _Alignas specifier.
417 (c_parser_postfix_expression_after_paren_type): Check specified
418 alignment for a compound literal and pass it to
419 build_compound_literal.
420 * c-parser.h (c_parser_type_name): Update prototype.
421 * c-tree.h (build_compound_literal): Update prototype.
422
423 2017-12-07 Martin Sebor <msebor@redhat.com>
424
425 PR c/81544
426 * c-decl.c (c_decl_attributes): Look up existing declaration and
427 pass it to decl_attributes.
428
429 2017-12-06 David Malcolm <dmalcolm@redhat.com>
430
431 PR c/83236
432 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
433 reserved for use by the implementation.
434
435 2017-12-06 David Malcolm <dmalcolm@redhat.com>
436
437 * c-decl.c: Include "c-family/c-spellcheck.h".
438
439 2017-12-05 Martin Liska <mliska@suse.cz>
440 Jakub Jelinek <jakub@redhat.com>
441
442 * c-typeck.c (pointer_diff): Add new argument and instrument
443 pointer subtraction.
444 (build_binary_op): Similar for pointer comparison.
445
446 2017-12-01 Jakub Jelinek <jakub@redhat.com>
447
448 PR c/79153
449 * c-parser.c: Include tree-iterator.h.
450 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
451 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
452 on it.
453
454 PR c/83222
455 * c-tree.h (decl_constant_value_1): Declare.
456 * c-typeck.c (decl_constant_value_1): New function.
457 (decl_constant_value): Use it.
458 * c-fold.c (c_fully_fold_internal): If in_init, use
459 decl_constant_value_1 instead of decl_constant_value.
460
461 2017-11-30 Jakub Jelinek <jakub@redhat.com>
462
463 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
464
465 2017-11-28 Jakub Jelinek <jakub@redhat.com>
466
467 PR sanitizer/81275
468 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
469 c_switch_covers_all_cases_p returns true.
470
471 2017-11-28 Julia Koval <julia.koval@intel.com>
472 Sebastian Peryt <sebastian.peryt@intel.com>
473
474 * Make-lang.in (c/c-array-notation.o): Remove.
475 * c-array-notation.c: Delete.
476 * c-decl.c: Remove cilkplus condition.
477 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
478 c_parser_cilk_verify_simd, c_parser_array_notation,
479 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
480 c_parser_cilk_simd_fn_vector_attrs,
481 c_finish_cilk_simd_fn_tokens): Delete.
482 (c_parser_declaration_or_fndef): Remove cilkplus condition.
483 (c_parser_direct_declarator_inner): Ditto.
484 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
485 (c_parser_attributes, c_parser_compound_statement,
486 c_parser_statement_after_labels, c_parser_if_statement,
487 c_parser_switch_statement, c_parser_while_statement,
488 c_parser_do_statement, c_parser_for_statement,
489 c_parser_unary_expression, c_parser_postfix_expression,
490 c_parser_postfix_expression_after_primary,
491 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
492 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
493 support.
494 * c-typeck.c (build_array_ref, build_function_call_vec,
495 convert_arguments,
496 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
497 c_finish_loop, build_binary_op): Remove cilkplus support.
498
499 2017-11-28 Jakub Jelinek <jakub@redhat.com>
500
501 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
502 of build3.
503
504 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
505
506 * Make-lang.in (c.install-plugin): Install backend import library.
507
508 2017-11-23 Jakub Jelinek <jakub@redhat.com>
509
510 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
511 pragma_stmt context.
512
513 2017-11-23 Mike Stump <mikestump@comcast.net>
514 Eric Botcazou <ebotcazou@adacore.com>
515
516 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
517 ANNOTATE_EXPR.
518 (c_parser_do_statement): Likewise.
519 (c_parser_for_statement): Likewise.
520
521 2017-11-22 David Malcolm <dmalcolm@redhat.com>
522
523 PR c++/62170
524 * c-objc-common.c (c_tree_printer): Convert penultimate param from
525 bool to bool *. Within '%T' handling, if showing an "aka", use
526 "quoted" param to add appropriate quoting.
527
528 2017-11-22 Marek Polacek <polacek@redhat.com>
529
530 PR c++/60336
531 PR middle-end/67239
532 PR target/68355
533 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
534
535 2017-11-21 David Malcolm <dmalcolm@redhat.com>
536
537 PR c/83056
538 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
539 earlier failed lookups.
540
541 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
542
543 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
544 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
545
546 2017-11-20 David Malcolm <dmalcolm@redhat.com>
547
548 PR c/81404
549 * c-decl.c: Include "c-family/known-headers.h".
550 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
551 to known-headers.cc.
552 (class suggest_missing_header): Move to known-header.h.
553 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
554 than get_c_name_hint.
555
556 2017-11-20 David Malcolm <dmalcolm@redhat.com>
557
558 * c-decl.c (get_c_name_hint): New function.
559 (class suggest_missing_header): New class.
560 (lookup_name_fuzzy): Call get_c_name_hint and use it to
561 suggest missing headers to the user.
562
563 2017-11-20 David Malcolm <dmalcolm@redhat.com>
564
565 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
566 Include "c-family/name-hint.h"
567 (implicit_decl_warning): Convert "hint" from
568 const char * to name_hint. Pass location to
569 lookup_name_fuzzy. Suppress any deferred diagnostic if the
570 warning was not printed.
571 (undeclared_variable): Likewise for "guessed_id".
572 (lookup_name_fuzzy): Convert return type from const char *
573 to name_hint. Add location_t param.
574 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
575 Include "c-family/name-hint.h"
576 (c_parser_declaration_or_fndef): Convert "hint" from
577 const char * to name_hint. Pass location to lookup_name_fuzzy.
578 (c_parser_parameter_declaration): Likewise.
579
580 2017-11-19 Jakub Jelinek <jakub@redhat.com>
581
582 PR c/66618
583 PR c/69960
584 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
585 where needed.
586 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
587 handle_omp_array_sections): Likewise.
588 (digest_init): Don't call decl_constant_value_for_optimization.
589 * c-tree.h (decl_constant_value_for_optimization): Removed.
590 * c-fold.c (c_fold_array_ref): New function.
591 (c_fully_fold_internal): Add LVAL argument, propagate it through
592 recursive calls. For VAR_P call decl_constant_value and
593 unshare if not LVAL and either optimizing or IN_INIT. Remove
594 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
595 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
596 (c_fully_fold): Add LVAL argument, pass it through to
597 c_fully_fold_internal.
598 (decl_constant_value_for_optimization): Removed.
599
600 2017-11-15 Joseph Myers <joseph@codesourcery.com>
601
602 PR c/81156
603 * c-parser.c (check_tgmath_function): New function.
604 (enum tgmath_parm_kind): New enum.
605 (c_parser_postfix_expression): Handle __builtin_tgmath.
606
607 2017-10-31 David Malcolm <dmalcolm@redhat.com>
608
609 * c-decl.c (implicit_decl_warning): Update for renaming of
610 pedwarn_at_rich_loc and warning_at_rich_loc.
611 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
612 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
613 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
614 (c_parser_struct_or_union_specifier): Likewise for renaming of
615 pedwarn_at_rich_loc.
616 (c_parser_parameter_declaration): Likewise for renaming of
617 error_at_rich_loc.
618 * c-typeck.c (build_component_ref): Likewise.
619 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
620 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
621 (set_init_label): Likewise for renaming of error_at_rich_loc.
622
623 2017-10-30 Richard Biener <rguenther@suse.de>
624
625 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
626 stmts.
627
628 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
629
630 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
631 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
632
633 2017-10-25 David Malcolm <dmalcolm@redhat.com>
634
635 PR c/7356
636 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
637 semicolons.
638
639 2017-10-25 Jakub Jelinek <jakub@redhat.com>
640
641 PR libstdc++/81706
642 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
643 newdecl to corresponding __builtin_ if any.
644
645 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
646
647 PR c++/82466
648 * c-decl.c (diagnose_mismatched_decls): Use
649 OPT_Wbuiltin_declaration_mismatch.
650
651 2017-10-12 David Malcolm <dmalcolm@redhat.com>
652
653 * c-parser.c (c_parser_require): Add "type_is_unique" param and
654 use it to guard calls to maybe_suggest_missing_token_insertion.
655 (c_parser_parms_list_declarator): Override default value of new
656 "type_is_unique" param to c_parser_require.
657 (c_parser_asm_statement): Likewise.
658 * c-parser.h (c_parser_require): Add "type_is_unique" param,
659 defaulting to true.
660
661 2017-10-11 Nathan Sidwell <nathan@acm.org>
662
663 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
664
665 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
666
667 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
668 operating on trees as wide_ints.
669 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
670 (c_tree_equal): Likewise.
671
672 2017-10-04 David Malcolm <dmalcolm@redhat.com>
673
674 * c-decl.c (push_parm_decl): Store c_parm's location into the
675 PARAM_DECL.
676 (build_c_parm): Add "loc" param and store it within the c_parm.
677 * c-parser.c (struct c_parser): Add "last_token_location" field.
678 (c_parser_consume_token): Store location of the token into the
679 new field.
680 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
681 when handling a FUNCTION_DECL, if it doesn't already have them.
682 (c_parser_parameter_declaration): Generate a location for the
683 parameter, and pass it to the call to build_c_parm.
684 * c-tree.h (struct c_parm): Add field "loc".
685 (build_c_parm): Add location_t param.
686 * c-typeck.c (get_fndecl_argument_location): New function.
687 (inform_for_arg): New function.
688 (convert_for_assignment): Use inform_for_arg when dealing with
689 ic_argpass.
690
691 2017-09-29 Jakub Jelinek <jakub@redhat.com>
692
693 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
694 width is non-NULL.
695 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
696 don't SET_DECL_C_BIT_FIELD here.
697
698 PR c/82340
699 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
700 instead of trying to set just TREE_READONLY manually.
701
702 2017-09-16 Tom de Vries <tom@codesourcery.com>
703
704 PR c/81875
705 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
706 cond itself.
707
708 2017-09-15 Joseph Myers <joseph@codesourcery.com>
709
710 PR c/82071
711 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
712 for C11.
713 (build_conditional_expr): For C11, generate result with excess
714 precision when one argument is an integer and the other is of a
715 type using excess precision.
716
717 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
718
719 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
720
721 2017-09-13 Marek Polacek <polacek@redhat.com>
722
723 PR c/82167
724 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
725 than expr.original_type.
726
727 2017-09-12 Nathan Sidwell <nathan@acm.org>
728
729 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
730 resort_sorted_fields): Moved from c-family/c-common.c.
731 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
732
733 2017-09-01 Joseph Myers <joseph@codesourcery.com>
734
735 PR c/82071
736 * c-typeck.c (build_atomic_assign): Handle argument with excess
737 precision. Ensure any EXCESS_PRECISION_EXPR is present in
738 argument passed to build_binary_op and convert_for_assignment but
739 not for call to c_fully_fold.
740 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
741 Ensure build_binary_op is called with argument with original
742 semantic type. Avoid calling c_fully_fold with an
743 EXCESS_PRECISION_EXPR from build_binary_op.
744
745 2017-09-01 Jakub Jelinek <jakub@redhat.com>
746
747 PR c/81887
748 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
749
750 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
751 Alan Hayward <alan.hayward@arm.com>
752 David Sherwood <david.sherwood@arm.com>
753
754 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
755 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
756 m1 and m2 to the signed equivalent of a fixed-point
757 SCALAR_TYPE_MODE.
758
759 2017-08-24 David Malcolm <dmalcolm@redhat.com>
760
761 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
762 than CAN_HAVE_LOCATION_P when determining whether to use the
763 location_t value within "value".
764
765 2017-08-21 David Malcolm <dmalcolm@redhat.com>
766
767 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
768 rather than peeking the location of the first token.
769 * c-tree.h (c_expr::get_location): New method.
770
771 2017-08-21 David Malcolm <dmalcolm@redhat.com>
772
773 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
774 to check_function_arguments.
775
776 2017-08-18 Marek Polacek <polacek@redhat.com>
777
778 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
779 commentary.
780
781 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
782
783 PR c/53037
784 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
785 (check_bitfield_type_and_width): Don't allow bit-field with
786 warn_if_not_aligned type.
787
788 2017-08-14 Martin Sebor <msebor@redhat.com>
789
790 PR c/81117
791 * c-objc-common.c (c_objc_common_init): Handle 'G'.
792
793 2017-08-11 Marek Polacek <polacek@redhat.com>
794
795 PR c/81795
796 * c-decl.c (pushtag): Only print inform if the warning was printed.
797 (grokdeclarator): Likewise.
798
799 2017-08-10 David Malcolm <dmalcolm@redhat.com>
800
801 * c-parser.c (c_parser_error): Rename to...
802 (c_parser_error_richloc): ...this, making static, and adding
803 "richloc" parameter, passing it to the c_parse_error call,
804 rather than calling c_parser_set_source_position_from_token.
805 (c_parser_error): Reintroduce, reimplementing in terms of the
806 above, converting return type from void to bool.
807 (class token_pair): New class.
808 (struct matching_paren_traits): New struct.
809 (matching_parens): New typedef.
810 (struct matching_brace_traits): New struct.
811 (matching_braces): New typedef.
812 (get_matching_symbol): New function.
813 (c_parser_require): Add param MATCHING_LOCATION, using it to
814 highlight matching "opening" tokens for missing "closing" tokens.
815 (c_parser_skip_until_found): Likewise.
816 (c_parser_static_assert_declaration_no_semi): Convert explicit
817 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
818 class matching_parens, so that the pertinent open parenthesis is
819 highlighted when there are problems locating the close
820 parenthesis.
821 (c_parser_struct_or_union_specifier): Likewise.
822 (c_parser_typeof_specifier): Likewise.
823 (c_parser_alignas_specifier): Likewise.
824 (c_parser_simple_asm_expr): Likewise.
825 (c_parser_braced_init): Likewise, for matching_braces.
826 (c_parser_paren_condition): Likewise, for matching_parens.
827 (c_parser_switch_statement): Likewise.
828 (c_parser_for_statement): Likewise.
829 (c_parser_asm_statement): Likewise.
830 (c_parser_asm_operands): Likewise.
831 (c_parser_cast_expression): Likewise.
832 (c_parser_sizeof_expression): Likewise.
833 (c_parser_alignof_expression): Likewise.
834 (c_parser_generic_selection): Likewise.
835 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
836 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
837 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
838 In case CPP_OPEN_PAREN, pass loc_open_paren to the
839 c_parser_skip_until_found call.
840 (c_parser_objc_class_definition): Use class matching_parens as
841 above.
842 (c_parser_objc_method_decl): Likewise.
843 (c_parser_objc_try_catch_finally_statement): Likewise.
844 (c_parser_objc_synchronized_statement): Likewise.
845 (c_parser_objc_at_property_declaration): Likewise.
846 (c_parser_oacc_wait_list): Likewise.
847 (c_parser_omp_var_list_parens): Likewise.
848 (c_parser_omp_clause_collapse): Likewise.
849 (c_parser_omp_clause_default): Likewise.
850 (c_parser_omp_clause_if): Likewise.
851 (c_parser_omp_clause_num_threads): Likewise.
852 (c_parser_omp_clause_num_tasks): Likewise.
853 (c_parser_omp_clause_grainsize): Likewise.
854 (c_parser_omp_clause_priority): Likewise.
855 (c_parser_omp_clause_hint): Likewise.
856 (c_parser_omp_clause_defaultmap): Likewise.
857 (c_parser_oacc_single_int_clause): Likewise.
858 (c_parser_omp_clause_ordered): Likewise.
859 (c_parser_omp_clause_reduction): Likewise.
860 (c_parser_omp_clause_schedule): Likewise.
861 (c_parser_omp_clause_num_teams): Likewise.
862 (c_parser_omp_clause_thread_limit): Likewise.
863 (c_parser_omp_clause_aligned): Likewise.
864 (c_parser_omp_clause_linear): Likewise.
865 (c_parser_omp_clause_safelen): Likewise.
866 (c_parser_omp_clause_simdlen): Likewise.
867 (c_parser_omp_clause_depend): Likewise.
868 (c_parser_omp_clause_map): Likewise.
869 (c_parser_omp_clause_device): Likewise.
870 (c_parser_omp_clause_dist_schedule): Likewise.
871 (c_parser_omp_clause_proc_bind): Likewise.
872 (c_parser_omp_clause_uniform): Likewise.
873 (c_parser_omp_for_loop): Likewise.
874 (c_parser_cilk_clause_vectorlength): Likewise.
875 (c_parser_cilk_clause_linear): Likewise.
876 (c_parser_transaction_expression): Likewise.
877 * c-parser.h (c_parser_require): Add param matching_location with
878 default UNKNOWN_LOCATION.
879 (c_parser_error): Convert return type from void to bool.
880 (c_parser_skip_until_found): Add param matching_location with
881 default UNKNOWN_LOCATION.
882
883 2017-08-09 Marek Polacek <polacek@redhat.com>
884
885 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
886 * c-tree.h (build_external_ref): Update declaration.
887 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
888 (build_external_ref): Change the type of a parameter to bool.
889 (parser_build_binary_op): Use true/false instead of 1/0.
890 (pointer_diff): Likewise.
891 (build_modify_expr): Likewise.
892 (set_designator): Change the type of a parameter to bool.
893 (set_init_index): Use true/false instead of 1/0.
894 (set_init_label): Likewise.
895 (output_init_element): Change the type of a parameter to bool.
896 (output_pending_init_elements): Use true/false instead of 1/0.
897 (process_init_element): Likewise.
898 (build_binary_op): Change the type of a parameter to bool.
899
900 2017-08-09 Marek Polacek <polacek@redhat.com>
901
902 PR c/81233
903 * c-typeck.c (pedwarn_init): Make the function take a variable list.
904 Call emit_diagnostic_valist instead of pedwarn.
905 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
906 Print the relevant types in diagnostics.
907
908 2017-08-09 Marek Polacek <polacek@redhat.com>
909
910 PR c/81417
911 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
912 build_conditional_expr.
913 * c-parser.c (c_parser_conditional_expression): Create locations for
914 EXP1 and EXP2 from their source ranges. Pass the locations down to
915 build_conditional_expr.
916 * c-tree.h (build_conditional_expr): Update declaration.
917 * c-typeck.c (build_conditional_expr): Add location_t parameters.
918 For -Wsign-compare, also print the types.
919
920 2017-08-08 Martin Liska <mliska@suse.cz>
921
922 * c-convert.c: Include header files.
923 * c-typeck.c: Likewise.
924
925 2017-08-07 Martin Liska <mliska@suse.cz>
926
927 * c-parser.c (c_parser_attributes): Canonicalize name of an
928 attribute.
929
930 2017-08-02 Marek Polacek <polacek@redhat.com>
931
932 PR c/81289
933 * c-parser.c (c_parser_unary_expression): Use set_error.
934
935 PR c/81448
936 PR c/81306
937 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
938 warnings. Avoid walking MACRO_MAP_LOCATIONS.
939
940 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
941 Martin Liska <mliska@suse.cz>
942
943 * c-typeck.c (c_finish_goto_label): Build gimple predict
944 statement.
945
946 2017-07-31 Martin Liska <mliska@suse.cz>
947
948 PR sanitize/81530
949 * c-convert.c (convert): Guard condition with flag_sanitize_p
950 also with current_function_decl non-null equality.
951 * c-decl.c (grokdeclarator): Likewise.
952 * c-typeck.c (build_binary_op): Likewise.
953
954 2017-07-25 Marek Polacek <polacek@redhat.com>
955
956 * c-decl.c (grokfield): Remove local variable.
957
958 2017-07-25 Marek Polacek <polacek@redhat.com>
959
960 PR c/81364
961 * c-parser.c (c_parser_else_body): Don't warn about multistatement
962 macro expansion if the body is in { }.
963 (c_parser_while_statement): Likewise.
964 (c_parser_for_statement): Likewise.
965
966 2017-07-18 Nathan Sidwell <nathan@acm.org>
967
968 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
969
970 2017-07-14 David Malcolm <dmalcolm@redhat.com>
971
972 * c-decl.c (implicitly_declare): When suggesting a missing
973 #include, provide a fix-it hint.
974
975 2017-07-06 David Malcolm <dmalcolm@redhat.com>
976
977 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
978 and call that instead.
979 * c-tree.h (selftest::run_c_tests): New decl.
980
981 2017-06-26 Marek Polacek <polacek@redhat.com>
982
983 PR c/80116
984 * c-parser.c (c_parser_if_body): Set the location of the
985 body of the conditional after parsing all the labels. Call
986 warn_for_multistatement_macros.
987 (c_parser_else_body): Likewise.
988 (c_parser_switch_statement): Likewise.
989 (c_parser_while_statement): Likewise.
990 (c_parser_for_statement): Likewise.
991 (c_parser_statement): Add a default argument. Save the location
992 after labels have been parsed.
993 (c_parser_c99_block_statement): Likewise.
994
995 2017-06-19 Richard Biener <rguenther@suse.de>
996
997 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
998 negated _Literals to parse _Literal (int) -1.
999
1000 2017-06-13 Martin Liska <mliska@suse.cz>
1001
1002 PR sanitize/78204
1003 * c-convert.c (convert): Use sanitize_flags_p.
1004 * c-decl.c (grokdeclarator): Likewise.
1005 * c-typeck.c (convert_for_assignment): Likewise.
1006 (c_finish_return): Likewise.
1007 (build_binary_op): Likewise.
1008
1009 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1010
1011 PR c/81006
1012 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1013 to sizetype before size_binop.
1014
1015 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1016
1017 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1018 of TDI_generic.
1019
1020 2017-06-06 Marek Polacek <polacek@redhat.com>
1021
1022 PR c/79983
1023 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1024 ref.
1025 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1026
1027 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1028
1029 * c-parser.c (c_parser_binary_expression): Implement the
1030 -Wsizeof_pointer_div warning.
1031 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1032 from a parenthesized expression.
1033 (c_parser_expr_list): Use c_last_sizeof_loc.
1034 * c-tree.h (c_last_sizeof_loc): New external.
1035 * c-typeck.c (c_last_sizeof_loc): New variable.
1036 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1037
1038 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1039
1040 PR testsuite/80580
1041 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1042
1043 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1044
1045 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1046 parameters.
1047
1048 2017-05-24 Martin Sebor <msebor@redhat.com>
1049
1050 PR c/80731
1051 * c-fold.c (c_fully_fold_internal): Adjust.
1052 * c-typeck.c (parser_build_unary_op): Adjust.
1053
1054 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1055
1056 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1057 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1058 "VECTOR_LENGTH".
1059
1060 2017-05-23 Marek Polacek <polacek@redhat.com>
1061
1062 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1063 quotes.
1064
1065 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1066
1067 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1068 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1069 it returned invariant. Call tree_invariant_p unconditionally
1070 afterwards to decide whether to return expr or op0.
1071
1072 2017-05-22 Nathan Sidwell <nathan@acm.org>
1073
1074 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1075
1076 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1077
1078 * c-parser.c (c_parser_omp_clause_default): Handle
1079 "OMP_CLAUSE_DEFAULT_PRESENT".
1080
1081 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1082
1083 * config-lang.in (gtfiles): Add c-family/c-format.c.
1084
1085 2017-05-18 Nathan Sidwell <nathan@acm.org>
1086
1087 * c-decl.c (pushdecl_top_level): Delete unused function.
1088
1089 2017-05-18 Marek Polacek <polacek@redhat.com>
1090
1091 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1092 (check_earlier_gotos): Likewise.
1093 (define_label): Likewise.
1094 (pending_xref_error): Likewise.
1095 (smallest_type_quals_location): Likewise.
1096 (grokdeclarator): Likewise.
1097 (grokparms): Likewise.
1098 (identifier_global_value): Likewise.
1099 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1100 (find_init_member): Likewise.
1101
1102 2017-05-18 Marek Polacek <polacek@redhat.com>
1103
1104 * c-decl.c (start_decl): Use false/true instead of 0/1.
1105 (grokdeclarator): Likewise.
1106 (finish_struct): Likewise.
1107 (start_function): Change the return type to bool. Use false/true
1108 instead of 0/1.
1109 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1110 * c-tree.h (start_function): Update.
1111 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1112 (set_designator): Change the return type to bool. Use false/true
1113 instead of 0/1.
1114
1115 2017-05-17 Marek Polacek <polacek@redhat.com>
1116
1117 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1118 * c-typeck.c: Likewise.
1119
1120 2017-05-17 Marek Polacek <polacek@redhat.com>
1121
1122 PR sanitizer/80659
1123 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1124 DECL_IGNORED_P even for non-static compound literals.
1125
1126 2017-05-17 Martin Liska <mliska@suse.cz>
1127
1128 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1129 use it instead of int type.
1130
1131 2017-05-17 Marek Polacek <polacek@redhat.com>
1132
1133 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1134 call c_fully_fold.
1135 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1136 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1137 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1138 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1139 save_expr.
1140 (c_parser_conditional_expression): Likewise.
1141 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1142 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1143 (process_init_element): Likewise.
1144 (build_binary_op): Likewise.
1145 (handle_omp_array_sections_1): Likewise.
1146
1147 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1148
1149 * c-parser.c (c_parser_omp_clause_num_gangs)
1150 (c_parser_omp_clause_num_workers)
1151 (c_parser_omp_clause_vector_length): Merge functions into...
1152 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1153 all users.
1154
1155 2017-05-11 Nathan Sidwell <nathan@acm.org>
1156
1157 * gimple-parser.c: Don't #include tree-dump.h.
1158
1159 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1160
1161 PR testsuite/80580
1162 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1163
1164 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1165
1166 PR testsuite/80580
1167 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1168 incorrect __MEM syntax.
1169
1170 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1171
1172 PR testsuite/80580
1173 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1174 type of unary '*'.
1175
1176 2017-05-09 Nathan Sidwell <nathan@acm.org>
1177
1178 * c-tree.h (pushdecl): Declare.
1179
1180 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1181
1182 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1183 with diagnostic_report_diagnostic.
1184 * c-errors.c (pedwarn_c99): Likewise.
1185 (pedwarn_c90): Likewise.
1186
1187 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1188
1189 PR c++/80038
1190 * c-gimplify.c (c_gimplify_expr): Remove calls to
1191 cilk_gimplifY_call_params_in_spawned_fn.
1192
1193 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1194
1195 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1196 hint for removing extra semicolon.
1197
1198 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR c/80468
1201 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1202 enabled, set specs->type to integer_type_node.
1203
1204 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1205
1206 * c-array-notation.c: Fix typo in comment.
1207
1208 2017-03-29 Marek Polacek <polacek@redhat.com>
1209
1210 PR c/79730
1211 * c-decl.c (finish_decl): Check VAR_P.
1212
1213 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1214
1215 PR middle-end/80162
1216 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1217 * c-typeck.c (c_mark_addressable): Likewise. Look through
1218 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1219 to ARRAY_TYPE.
1220 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1221
1222 2017-03-23 Marek Polacek <polacek@redhat.com>
1223
1224 * c-tree.h: Remove a C_RID_YYCODE reference.
1225
1226 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1227
1228 PR c/80097
1229 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1230 optional COMPOUND_EXPR with ubsan instrumentation.
1231
1232 2017-03-17 Marek Polacek <polacek@redhat.com>
1233
1234 * c-parser.c: Add C11 references.
1235
1236 2017-03-15 Marek Polacek <polacek@redhat.com>
1237
1238 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1239
1240 2017-03-11 Marek Polacek <polacek@redhat.com>
1241
1242 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1243
1244 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1245
1246 PR translation/79848
1247 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1248 "%qs".
1249 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1250
1251 2017-03-09 Marek Polacek <polacek@redhat.com>
1252
1253 PR sanitizer/79757
1254 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1255 parameter declarations with initializers.
1256
1257 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1258
1259 PR c/79969
1260 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1261 TYPE_STUB_DECL.
1262
1263 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1264
1265 PR c/79834
1266 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1267 for "may only be used in compound statements" diagnostics, change it
1268 such that the same translatable string is used for all pragmas. For
1269 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1270 diagnostics.
1271 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1272 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1273 "may only be used in compound statements" diagnostics, such that the
1274 same translatable string is used for all pragmas.
1275
1276 2017-03-04 Marek Polacek <polacek@redhat.com>
1277
1278 PR c/79847
1279 * c-decl.c (implicit_decl_warning): Add missing space.
1280
1281 2017-03-03 Marek Polacek <polacek@redhat.com>
1282
1283 PR c/79758
1284 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1285 current_function_prototype_arg_types is error_mark_node. Fix
1286 formatting. Use TREE_VALUE instead of TREE_TYPE.
1287
1288 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1289
1290 PR c/79837
1291 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1292 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1293 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1294 diagnostics.
1295
1296 PR c/79836
1297 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1298 instead of %<_Generic>.
1299 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1300 (c_parser_omp_target_exit_data): Use %<release%> instead of
1301 %<release>.
1302
1303 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1304
1305 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1306 instead of just cond ? "..." : "...".
1307 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1308 for "enter"/"exit" keyword.
1309 (c_finish_oacc_routine): Don't use %s to supply portions of the
1310 message.
1311
1312 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1313
1314 PR c++/79588
1315 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1316 handle -Wrestrict here.
1317 * c-typeck.c (build_function_call_vec): Adjust
1318 check_function_arguments caller.
1319
1320 2017-02-23 Richard Biener <rguenther@suse.de>
1321
1322 PR c/79684
1323 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1324 to initialize c_exprs to return.
1325 (c_parser_gimple_binary_expression): Likewise.
1326 (c_parser_gimple_unary_expression): Likewise.
1327 (c_parser_gimple_postfix_expression): Likewise.
1328
1329 2017-02-22 Marek Polacek <polacek@redhat.com>
1330
1331 PR c/79662
1332 * c-typeck.c (convert_arguments): Handle error_mark_node.
1333
1334 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1335
1336 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1337 value of c_parser_parse_ssa_name against error_mark_node and emit
1338 error if ssa name is anonymous and written as default definition.
1339
1340 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1341
1342 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1343 FMA_EXPR.
1344
1345 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1346
1347 PR c++/79512
1348 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1349 ignore #pragma omp target even when not followed by identifier.
1350
1351 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1352
1353 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1354 (c_parser_gimple_unary_expression): Likewise.
1355
1356 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1357
1358 * c-parser.c (c_parser_oacc_declare): Add missing space in
1359 diagnostics.
1360
1361 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1362
1363 PR c/79478
1364 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1365 set_c_expr_source_range when parsing ssa-name.
1366
1367 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1368 Richard Biener <rguenther@suse.de>
1369
1370 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1371 building IL when arguments are error_mark_node.
1372 (c_parser_gimple_unary_expression): Likewise.
1373 (c_parser_gimple_if_stmt): Likewise.
1374 (c_parser_gimple_switch_stmt): Likewise.
1375 (c_parser_gimple_return_stmt): Likewise.
1376 (c_parser_parse_ssa_name): When name lookup fails do not build
1377 an SSA name. Use undeclared rather than not declared in error
1378 reporting.
1379
1380 2017-02-09 Marek Polacek <polacek@redhat.com>
1381
1382 PR c/79428
1383 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1384 instead of c_parser_skip_until_found.
1385
1386 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1387
1388 PR c/79431
1389 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1390 symtab_node::get on automatic variables.
1391
1392 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1393 Chung-Lin Tang <cltang@codesourcery.com>
1394
1395 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1396 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1397 semantic checking.
1398 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1399
1400 2017-02-07 Richard Biener <rguenther@suse.de>
1401
1402 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1403 (c_parser_gimple_postfix_expression_after_primary):
1404 Do not use c_build_function_call_vec to avoid folding and promotion.
1405 Simplify.
1406
1407 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1408
1409 PR lto/79061
1410 * c-decl.c (pop_scope): Pass main_input_filename to
1411 build_translation_unit_decl.
1412
1413 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1414
1415 * c-parser.c: Include "read-rtl-function.h" and
1416 "run-rtl-passes.h".
1417 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1418 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1419 production. Update for renaming of field "gimple_pass" to
1420 "gimple_or_rtl_pass". If __RTL was seen, call
1421 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1422 to an auto_timevar, to cope with early exit.
1423 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1424 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1425 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1426 Handle RID_RTL.
1427 (c_parser_parse_rtl_body): New function.
1428 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1429 (struct c_declspecs): Rename field "gimple_pass" to
1430 "gimple_or_rtl_pass". Add field "rtl_p".
1431 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1432 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1433 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1434 (c_parser_gimple_or_rtl_pass_list): ...this.
1435
1436 2017-01-20 Marek Polacek <polacek@redhat.com>
1437
1438 PR c/64279
1439 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1440
1441 2017-01-13 Richard Biener <rguenther@suse.de>
1442
1443 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1444 nops.
1445
1446 2017-01-13 Richard Biener <rguenther@suse.de>
1447
1448 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1449 _Literal ( type-name ) number.
1450
1451 2017-01-12 Richard Biener <rguenther@suse.de>
1452
1453 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1454 __MEM.
1455
1456 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1457
1458 PR c++/72813
1459 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1460 PCH file.
1461
1462 2017-01-11 Richard Biener <rguenther@suse.de>
1463
1464 PR bootstrap/79052
1465 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1466 returns on parse errors.
1467
1468 2017-01-04 Marek Polacek <polacek@redhat.com>
1469
1470 PR c++/64767
1471 * c-parser.c (c_parser_postfix_expression): Mark zero character
1472 constants by setting original_type in c_expr.
1473 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1474 with a zero character constant.
1475 (char_type_p): New function.
1476
1477 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1478
1479 * c-parser.c (c_parser_declaration_or_fndef): Create a
1480 rich_location at init_loc and parse it to start_init.
1481 (last_init_list_comma): New global.
1482 (c_parser_braced_init): Update last_init_list_comma when parsing
1483 commas. Pass it to pop_init_level. Pass location of closing
1484 brace to pop_init_level.
1485 (c_parser_postfix_expression_after_paren_type): Create a
1486 rich_location at type_loc and parse it to start_init.
1487 (c_parser_omp_declare_reduction): Likewise for loc.
1488 * c-tree.h (start_init): Add rich_location * param.
1489 (pop_init_level): Add location_t param.
1490 * c-typeck.c (struct initializer_stack): Add field
1491 "missing_brace_richloc".
1492 (start_init): Add richloc param, use it to initialize
1493 the stack node's missing_brace_richloc.
1494 (last_init_list_comma): New decl.
1495 (finish_implicit_inits): Pass last_init_list_comma to
1496 pop_init_level.
1497 (push_init_level): When finding missing open braces, add fix-it
1498 hints to the richloc.
1499 (pop_init_level): Add "insert_before" param and pass it
1500 when calling pop_init_level. Add fixits about missing
1501 close braces to any richloc. Use the richloc for the
1502 -Wmissing-braces warning.
1503 (set_designator): Pass last_init_list_comma to pop_init_level.
1504 (process_init_element): Likewise.
1505
1506 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1507
1508 Update copyright years.
1509
1510 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1511
1512 PR bootstrap/78817
1513 * c-typeck.c (build_function_call_vec): If check_function_arguments
1514 returns true, set TREE_NO_WARNING on CALL_EXPR.
1515
1516 PR c/77767
1517 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1518 to *expr instead of overwriting it.
1519
1520 2016-12-20 Richard Biener <rguenther@suse.de>
1521
1522 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1523 error recovery.
1524 (c_parser_gimple_statement): Only build assigns for non-error
1525 stmts.
1526 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1527
1528 2016-12-14 Martin Jambor <mjambor@suse.cz>
1529
1530 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1531 omp-low.h.
1532 (c_finish_oacc_routine): Adjusted call to
1533 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1534 to use their new names.
1535 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1536 use its new name.
1537 (c_parser_oacc_update): Likewise.
1538 (c_parser_omp_simd): Likewise.
1539 (c_parser_omp_target_update): Likewise.
1540 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1541 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1542 name.
1543 (c_finish_omp_cancellation_point): Likewise.
1544 * gimple-parser.c: Do not include omp-low.h
1545
1546 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1547 James Norris <jnorris@codesourcery.com>
1548
1549 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1550 EXIT_DATA,WAIT} are not used in compound statements.
1551 (c_parser_oacc_enter_exit_data): Update diagnostics.
1552
1553 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1554
1555 PR c++/71973
1556 * c-decl.c (diagnose_mismatched_decls): Use
1557 OPT_Wbuiltin_declaration_mismatch here too.
1558
1559 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1560 Alan Hayward <alan.hayward@arm.com>
1561 David Sherwood <david.sherwood@arm.com>
1562
1563 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1564 (make_label, finish_struct): Likewise.
1565
1566 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1567 Richard Biener <rguenther@suse.de>
1568
1569 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1570 * config-lang.in (gtfiles): Add c/c-parser.h.
1571 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1572 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1573 * c-parser.c (enum c_id_kind, struct c_token,
1574 c_parser_next_token_is, c_parser_next_token_is_not,
1575 c_parser_next_token_is_keyword,
1576 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1577 Split out to ...
1578 * c-parser.h: ... new header.
1579 * c-parser.c: Include c-parser.h and gimple-parser.h.
1580 (c_parser_peek_token, c_parser_peek_2nd_token,
1581 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1582 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1583 c_parser_error, c_parser_require, c_parser_skip_until_found,
1584 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1585 c_parser_type_name): Export.
1586 (c_parser_tokens_buf): New function.
1587 (c_parser_error): Likewise.
1588 (c_parser_set_error): Likewise.
1589 (c_parser_declspecs): Handle RID_GIMPLE.
1590 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1591 via c_parser_parse_gimple_body.
1592 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1593 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1594 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1595 c_parser_error, c_parser_require, c_parser_skip_until_found,
1596 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1597 c_parser_type_name): Declare.
1598 (struct c_parser): Declare forward.
1599 (c_parser_tokens_buf): Declare.
1600 (c_parser_error): Likewise.
1601 (c_parser_set_error): Likewise.
1602 * gimple-parser.c: New file.
1603 * gimple-parser.h: Likewise.
1604
1605 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1606
1607 PR c/35503
1608 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1609 warn_for_restrict.
1610
1611 2016-09-11 Le-Chun Wu <lcwu@google.com>
1612 Mark Wielaard <mjw@redhat.com>
1613
1614 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1615 to the given -Wshadow= variant.
1616
1617 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1618
1619 * c-typeck.c: Include memmodel.h.
1620
1621 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1622
1623 PR target/77957
1624 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1625 instead of lhd_return_null_tree_v.
1626
1627 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1628
1629 PR c++/69733
1630 * c-decl.c (smallest_type_quals_location): New static function.
1631 (grokdeclarator): Try to find the correct location for an ignored
1632 qualifier.
1633
1634 2016-09-26 Marek Polacek <polacek@redhat.com>
1635
1636 PR c/7652
1637 * c-decl.c (pop_scope): Add gcc_fallthrough.
1638
1639 2016-09-26 Marek Polacek <polacek@redhat.com>
1640
1641 PR c/7652
1642 * c-parser.c (struct c_token): Add flags field.
1643 (c_lex_one_token): Pass it to c_lex_with_flags.
1644 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1645 into IFN_FALLTHROUGH.
1646 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1647 attribute fallthrough after a case label or default label.
1648 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1649
1650 2016-09-24 Marek Polacek <polacek@redhat.com>
1651
1652 PR c/77490
1653 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1654 have boolean value. Warn about ++/-- on booleans.
1655
1656 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1657
1658 * c-parser.c (incomplete_record_decls): Remove unnecessary
1659 = vNULL initialization of file scope vec.
1660
1661 2016-09-16 Marek Polacek <polacek@redhat.com>
1662
1663 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1664
1665 2016-09-14 Marek Polacek <polacek@redhat.com>
1666
1667 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1668 (fix_array_notation_expr): Likewise.
1669 * c-decl.c (finish_decl): Likewise.
1670 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1671 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1672 (function_to_pointer_conversion): Use false instead of 0.
1673 (convert_lvalue_to_rvalue): Likewise.
1674 (parser_build_unary_op): Likewise.
1675 (build_atomic_assign): Likewise.
1676 (build_unary_op): Change nonconvert parameter type to bool, use
1677 true/false instead of 1/0.
1678 (build_binary_op): Use true instead of 1.
1679
1680 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1681
1682 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1683 of add_fixit_insert to add_fixit_insert_before.
1684
1685 2016-09-13 Marek Polacek <polacek@redhat.com>
1686
1687 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1688 it.
1689
1690 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1691
1692 PR c++/77496
1693 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1694 COMPOUND_EXPR to warn_for_omitted_condop.
1695
1696 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1697
1698 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1699 c_get_substring_location for this new langhook.
1700
1701 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1702
1703 PR c/65467
1704 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1705 flag_openmp.
1706 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1707 instead of mark_exp_read on low_bound/length expression.
1708 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1709 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1710 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1711 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1712 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1713 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1714 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1715 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1716 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1717 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1718 instead of mark_expr_read.
1719 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1720 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1721 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1722 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1723 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1724 array section bases outside of depend clause, for depend clause
1725 use convert_lvalue_to_rvalue on the base.
1726 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1727 linear, aligned, map, to and from clauses.
1728 (c_omp_clause_copy_ctor): New function.
1729
1730 2016-09-01 Marek Polacek <polacek@redhat.com>
1731
1732 PR c/7652
1733 * c-typeck.c (composite_type): Add FALLTHRU comment.
1734
1735 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1736
1737 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1738 to the insertion fixits for "struct", "union", and "enum".
1739
1740 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1741
1742 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1743 rather than add_fixit_misspelled_id.
1744 (undeclared_variable): Likewise.
1745 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1746 now-redundant "here" params from add_fixit_insert method calls.
1747 (c_parser_parameter_declaration): Likewise.
1748 * c-typeck.c (build_component_ref): Remove now-redundant range
1749 param from add_fixit_replace method calls.
1750
1751 2016-08-25 Marek Polacek <polacek@redhat.com>
1752
1753 * c-typeck.c (parser_build_binary_op): Pass LHS to
1754 warn_logical_not_parentheses.
1755
1756 2016-08-25 Marek Polacek <polacek@redhat.com>
1757
1758 PR c/77323
1759 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1760 or _FloatN or _FloatNx is not supported.
1761 (finish_declspecs): Set type to integer_type_node when _FloatN or
1762 _FloatNx is not supported.
1763
1764 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1765
1766 PR c/32187
1767 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1768 (struct c_declspecs): Add field floatn_nx_idx.
1769 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1770 and _FloatNx type specifiers.
1771 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1772 (c_parser_declspecs, c_parser_attribute_any_word)
1773 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1774 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1775 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1776 narrower than double.
1777
1778 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1779 Martin Liska <mliska@suse.cz>
1780
1781 PR c/67410
1782 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1783 % to determine val element to change. Assert that
1784 wchar_bytes * charwidth fits into val array.
1785
1786 2016-08-12 Marek Polacek <polacek@redhat.com>
1787
1788 PR c/7652
1789 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1790 (c_parser_postfix_expression): Likewise.
1791 * c-typeck.c (build_unary_op): Adjust fall through comment.
1792 (c_mark_addressable): Likewise.
1793
1794 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1795
1796 PR c/72816
1797 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1798 array member through typedef, for orig_qual_indirect == 0 clear
1799 orig_qual_type.
1800
1801 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1802
1803 PR c/64955
1804 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1805 this up to selftest::run_c_tests.
1806 (selftest::run_c_tests): New function.
1807
1808 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1809
1810 * c-parser.c (struct oacc_routine_data): Add error_seen and
1811 fndecl_seen members.
1812 (c_finish_oacc_routine): Use these.
1813 (c_parser_declaration_or_fndef): Adjust.
1814 (c_parser_oacc_routine): Likewise. Support more C language
1815 constructs, and improve diagnostics. Move pragma context
1816 checking...
1817 (c_parser_pragma): ... here.
1818
1819 * c-parser.c (struct oacc_routine_data): New.
1820 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1821 Simplify code.
1822 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1823 declare target" attribute.
1824
1825 2016-08-01 Jan Beulich <jbeulich@suse.com>
1826
1827 * c-fold.c (c_fully_fold_internal): Also emit shift count
1828 warnings for vector types.
1829 * c-typeck.c (build_binary_op): Likewise.
1830
1831 2016-07-29 Marek Polacek <polacek@redhat.com>
1832
1833 PR c/71742
1834 * c-decl.c (finish_struct): Rephrase an error message.
1835
1836 PR c/71853
1837 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1838 to error node for invalid code.
1839
1840 PR c/71573
1841 * c-decl.c (implicitly_declare): Return decl early not only for
1842 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1843
1844 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1845
1846 PR c/71969
1847 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1848 on GNU extern inline functions.
1849
1850 2016-07-29 Marek Polacek <polacek@redhat.com>
1851
1852 PR c/71583
1853 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1854 check expr.value.
1855
1856 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1857
1858 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1859
1860 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1861
1862 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1863 spellcheck-tree.h
1864 (best_macro_match): Likewise, converting from a typedef to a
1865 subclass.
1866 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1867 (lookup_name_fuzzy): Update for change of best_macro_match to a
1868 subclass with a ctor that calls cpp_forall_identifiers.
1869
1870 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1871
1872 * c-decl.c (implicit_decl_warning): Update for conversion of
1873 return type of lookup_name_fuzzy to const char *.
1874 (undeclared_variable): Likewise.
1875 (lookup_name_fuzzy): Convert return type from tree to
1876 const char *.
1877 * c-parser.c (c_parser_declaration_or_fndef): Update for
1878 conversion of return type of lookup_name_fuzzy to const char *.
1879 (c_parser_parameter_declaration): Likewise.
1880
1881 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1882
1883 * c-parser.c (c_parser_oacc_declare): Don't scan for
1884 GOMP_MAP_POINTER.
1885 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1886 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1887 zero-length subarrays.
1888
1889 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1890
1891 PR c/71858
1892 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1893 instead of FUZZY_LOOKUP_NAME.
1894 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1895 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1896
1897 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1898
1899 PR c/71858
1900 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1901
1902 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1903
1904 * c-parser.c (c_parser_generic_selection): Make type of variable
1905 auto_vec.
1906 (c_parser_omp_declare_simd): Likewise.
1907
1908 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1909
1910 * c-decl.c (struct c_struct_parse_info): Change member types
1911 from vec to auto_vec.
1912 (start_struct): Adjust.
1913 (finish_struct): Likewise.
1914
1915 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1916
1917 PR c/71719
1918 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1919
1920 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1921
1922 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1923 Move pragma context checking into...
1924 (c_parser_omp_cancellation_point): ... here, and improve
1925 diagnostic messages.
1926 * c-typeck.c (c_finish_omp_cancel)
1927 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1928
1929 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1930
1931 PR c/71685
1932 * c-typeck.c (c_build_qualified_type): Don't clear
1933 C_TYPE_INCOMPLETE_VARS for the main variant.
1934
1935 2016-06-28 Martin Sebor <msebor@redhat.com>
1936
1937 PR c/71552
1938 * c-typeck.c (output_init_element): Diagnose incompatible types
1939 before non-constant initializers.
1940
1941 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1942
1943 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1944
1945 2016-06-23 Andi Kleen <ak@linux.intel.com>
1946
1947 * Make-lang.in: Add support for autofdo.
1948
1949 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1950
1951 PR c/70339
1952 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1953 (implicit_decl_warning): When issuing warnings for implicit
1954 declarations, attempt to provide a suggestion via
1955 lookup_name_fuzzy.
1956 (undeclared_variable): Likewise when issuing errors.
1957 (lookup_name_in_scope): Likewise.
1958 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1959 (best_macro_match): New typedef.
1960 (find_closest_macro_cpp_cb): New function.
1961 (lookup_name_fuzzy): New function.
1962 * c-parser.c: Include gcc-rich-location.h.
1963 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1964 (c_keyword_starts_typename): ...this new function.
1965 (c_parser_declaration_or_fndef): When issuing errors about
1966 missing "struct" etc, add a fixit. For other kinds of errors,
1967 attempt to provide a suggestion via lookup_name_fuzzy.
1968 (c_parser_parms_declarator): When looking ahead to detect typos in
1969 type names, also reject CPP_KEYWORD.
1970 (c_parser_parameter_declaration): When issuing errors about
1971 unknown type names, attempt to provide a suggestion via
1972 lookup_name_fuzzy.
1973 * c-tree.h (c_keyword_starts_typename): New prototype.
1974
1975 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1976
1977 PR c/71601
1978 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1979 c_common_type returns error_mark_node.
1980
1981 2016-06-19 Martin Sebor <msebor@redhat.com>
1982
1983 PR c/69507
1984 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1985 __alignof__ (expression).
1986
1987 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1988
1989 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1990
1991 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1992
1993 * c-typeck.c (build_component_ref): Simplify fixit code by
1994 using gcc_rich_location::add_fixit_misspelled_id.
1995 (set_init_label): Likewise.
1996
1997 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1998
1999 * c-parser.c (c_parser_initelt): Provide location of name for new
2000 location_t param of set_init_label.
2001 * c-tree.h (set_init_label): Add location_t param.
2002 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2003 param and use it when issuing error messages about unrecognized
2004 field names. Attempt to provide a fixit hint if appropriate,
2005 otherwise update the error message to provide the type name.
2006
2007 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2008
2009 PR c/71381
2010 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2011 Loosen checking.
2012
2013 2016-06-08 Martin Sebor <msebor@redhat.com>
2014 Jakub Jelinek <jakub@redhat.com>
2015
2016 PR c++/70507
2017 PR c/68120
2018 * c-typeck.c (convert_arguments): Don't promote last argument
2019 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2020
2021 2016-06-08 Marek Polacek <polacek@redhat.com>
2022
2023 PR c/71418
2024 * c-decl.c (grokdeclarator): Check TYPE_P.
2025
2026 PR c/71426
2027 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2028 code.
2029
2030 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2031
2032 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2033 and structure element reference, capture the location of the
2034 element name token and pass it to build_component_ref.
2035 (c_parser_postfix_expression_after_primary): Likewise for
2036 structure element dereference.
2037 (c_parser_omp_variable_list): Likewise for
2038 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2039 * c-tree.h (build_component_ref): Add location_t param.
2040 * c-typeck.c (build_component_ref): Add location_t param
2041 COMPONENT_LOC. Use it, if available, when issuing hints about
2042 mispelled member names to provide a fixit replacement hint.
2043
2044 2016-06-06 Marek Polacek <polacek@redhat.com>
2045
2046 PR c/71362
2047 * c-parser.c (c_parser_direct_declarator): Set location.
2048
2049 2016-06-06 Marek Polacek <polacek@redhat.com>
2050
2051 * c-typeck.c (comptypes_internal): Handle comparisons of
2052 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2053 TYPE_REF_CAN_ALIAS_ALL.
2054
2055 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2056
2057 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2058 arguments as addressable when async clause exists.
2059
2060 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2061
2062 PR c++/71349
2063 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2064 when combined with target construct.
2065
2066 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2067
2068 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2069 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2070
2071 2016-05-25 Marek Polacek <polacek@redhat.com>
2072
2073 PR c/71265
2074 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2075
2076 PR c/71266
2077 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2078
2079 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2080
2081 * c-parser.c (c_parser_oacc_declare): Add support for
2082 GOMP_MAP_FIRSTPRIVATE_POINTER.
2083 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2084 argument with enum c_omp_region_type ort.
2085 (handle_omp_array_sections): Likewise. Update call to
2086 handle_omp_array_sections_1.
2087 (c_finish_omp_clauses): Add specific errors and warning messages for
2088 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2089 call to handle_omp_array_sections.
2090
2091 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2092
2093 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2094
2095 2016-05-24 Richard Biener <rguenther@suse.de>
2096
2097 PR middle-end/70434
2098 PR c/69504
2099 * c-typeck.c (build_array_ref): Do not complain about indexing
2100 non-lvalue vectors. Adjust for function name change.
2101
2102 2016-05-20 Martin Sebor <msebor@redhat.com>
2103
2104 PR c/71115
2105 * c-typeck.c (error_init): Use
2106 expansion_point_location_if_in_system_header.
2107 (warning_init): Same.
2108
2109 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2110
2111 PR c/71171
2112 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2113 in error-handling.
2114 (c_parser_postfix_expression): Likewise.
2115 * c-tree.h (c_expr::set_error): New method.
2116 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2117 that result's range is initialized.
2118
2119 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2120
2121 * c-typeck.c (parser_build_unary_op): Fix formatting.
2122
2123 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2124
2125 * c-decl.c (grokdeclarator): Remove errmsg and use of
2126 targetm.invalid_return_type.
2127 (grokparms): Remove errmsg and use of
2128 targetm.invalid_parameter_type.
2129
2130 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2131
2132 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2133 function return type.
2134
2135 2016-05-12 Marek Polacek <polacek@redhat.com>
2136
2137 PR c/70756
2138 * c-decl.c (build_compound_literal): Pass LOC down to
2139 c_incomplete_type_error.
2140 * c-tree.h (require_complete_type): Adjust declaration.
2141 (c_incomplete_type_error): Likewise.
2142 * c-typeck.c (require_complete_type): Add location parameter, pass it
2143 down to c_incomplete_type_error.
2144 (c_incomplete_type_error): Add location parameter, pass it down to
2145 error_at.
2146 (build_component_ref): Pass location down to c_incomplete_type_error.
2147 (default_conversion): Pass location down to require_complete_type.
2148 (build_array_ref): Likewise.
2149 (build_function_call_vec): Likewise.
2150 (convert_arguments): Likewise.
2151 (build_unary_op): Likewise.
2152 (build_c_cast): Likewise.
2153 (build_modify_expr): Likewise.
2154 (convert_for_assignment): Likewise.
2155 (c_finish_omp_clauses): Likewise.
2156
2157 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2158
2159 PR c/43651
2160 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2161 is enabled.
2162 * c-errors.c (pedwarn_c90): Return true if warned.
2163 * c-tree.h (pedwarn_c90): Change return type to bool.
2164 (enum c_declspec_word): Add new enumerator cdw_atomic.
2165
2166 2016-05-11 Marek Polacek <polacek@redhat.com>
2167
2168 PR c++/71024
2169 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2170 diagnose_mismatched_attributes and call it.
2171
2172 2016-05-10 Marek Polacek <polacek@redhat.com>
2173
2174 PR c/70255
2175 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2176 on a declaration following the definition.
2177
2178 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2179
2180 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2181 parse it through to c_parser_c99_block_statement.
2182 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2183 caller.
2184
2185 2016-05-04 Marek Polacek <polacek@redhat.com>
2186
2187 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2188 OPT_Wdangling_else.
2189
2190 2016-05-04 Marek Polacek <polacek@redhat.com>
2191
2192 PR c/48778
2193 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2194 for macro expansions.
2195
2196 2016-05-03 Marek Polacek <polacek@redhat.com>
2197
2198 PR c/70859
2199 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2200 check_builtin_function_arguments.
2201
2202 2016-05-03 Richard Biener <rguenther@suse.de>
2203
2204 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2205 the checksum from the previous stage.
2206
2207 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2208
2209 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2210 c_finish_omp_clauses.
2211 (c_parser_omp_all_clauses): Likewise.
2212 (c_parser_oacc_cache): Likewise.
2213 (c_parser_oacc_loop): Likewise.
2214 (omp_split_clauses): Likewise.
2215 (c_parser_omp_declare_target): Likewise.
2216 (c_parser_cilk_all_clauses): Likewise.
2217 (c_parser_cilk_for): Likewise.
2218 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2219 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2220
2221 2016-05-02 Marek Polacek <polacek@redhat.com>
2222
2223 PR c/70851
2224 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2225 incomplete type.
2226
2227 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2228
2229 PR middle-end/70626
2230 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2231 OACC_LOOP_CLAUSE_MASK.
2232 (c_parser_oacc_kernels_parallel): Update call to
2233 c_oacc_split_loop_clauses.
2234
2235 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2236
2237 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2238 argument to build_modify_expr in two cases.
2239
2240 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2241
2242 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2243 warn_for_memset instead of warning directly here.
2244
2245 2016-04-26 Marek Polacek <polacek@redhat.com>
2246
2247 PR c/67784
2248 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2249 out of ...
2250 (c_parser_for_statement): ... here.
2251 (c_parser_if_statement): Use it.
2252 (c_parser_switch_statement): Use it.
2253 (c_parser_while_statement): Use it.
2254
2255 PR c/70791
2256 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2257
2258 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2259
2260 PR c++/69363
2261 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2262 instead of c_finish_cilk_clauses.
2263 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2264 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2265 floating-point variables in the linear clause for Cilk Plus.
2266
2267 2016-04-18 Michael Matz <matz@suse.de>
2268
2269 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2270 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2271
2272 2016-04-15 Marek Polacek <polacek@redhat.com>
2273
2274 PR c/70671
2275 * c-typeck.c (build_unary_op): Pass location down to error and
2276 warning call.
2277
2278 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2279
2280 PR c/70436
2281 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2282 where needed.
2283 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2284 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2285 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2286 Adjust c_parser_pragma callers.
2287 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2288 caller.
2289 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2290 c_parser_statement.
2291 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2292 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2293 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2294 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2295 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2296 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2297 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2298 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2299 down where needed.
2300 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2301 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2302 calls.
2303
2304 2016-04-13 Marek Polacek <polacek@redhat.com>
2305
2306 PR c/70436
2307 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2308 adjust callers.
2309 (c_parser_statement): Likewise.
2310 (c_parser_c99_block_statement): Likewise.
2311 (c_parser_while_statement): Likewise.
2312 (c_parser_for_statement): Likewise.
2313 (c_parser_if_body): Don't set IF_P here.
2314 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2315 about dangling else here.
2316 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2317 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2318 warn about dangling else here.
2319
2320 2016-04-04 Marek Polacek <polacek@redhat.com>
2321
2322 PR c/70307
2323 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2324
2325 2016-03-31 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/70297
2328 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2329
2330 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2331
2332 PR c/70281
2333 * c-parser.c (c_parser_postfix_expression): Set the source range
2334 for uses of "__builtin_types_compatible_p".
2335
2336 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2337
2338 PR c/70280
2339 * c-typeck.c (composite_type): Don't count void_list_node
2340 into len, if the list is terminated by void_list_node, start
2341 with void_list_node instead of NULL for newargs. Stop
2342 at void_list_node.
2343
2344 2016-03-16 Marek Polacek <polacek@redhat.com>
2345
2346 PR c/70093
2347 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2348 nested functions returning VM types.
2349
2350 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2351
2352 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2353 when calling c_finish_omp_clauses.
2354
2355 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2356
2357 PR c/69824
2358 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2359 for later.
2360
2361 2016-03-04 Marek Polacek <polacek@redhat.com>
2362
2363 PR c/69798
2364 * c-parser.c (c_parser_postfix_expression): Call
2365 c_parser_cast_expression rather than c_parser_postfix_expression.
2366
2367 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2368
2369 PR c/69796
2370 PR c/69974
2371 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2372 of incomplete decls to error_mark_node.
2373
2374 2016-02-24 Marek Polacek <polacek@redhat.com>
2375
2376 PR c/69819
2377 * c-decl.c (finish_decl): Don't update the copy of the type of a
2378 different decl type.
2379
2380 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2381
2382 PR objc/69844
2383 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2384 in id_kind reclassification.
2385
2386 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2387
2388 PR c/69835
2389 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2390
2391 2016-02-16 James Norris <jnorris@codesourcery.com>
2392
2393 PR c/64748
2394 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2395
2396 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2397
2398 * c-decl.c (build_null_declspecs): Zero the entire struct.
2399
2400 PR c/69522
2401 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2402 callers changed. If nested_p is true, use it to call
2403 finish_implicit_inits.
2404 * c-tree.h (finish_implicit_inits): Declare.
2405 * c-typeck.c (finish_implicit_inits): New function. Move code
2406 from ...
2407 (push_init_level): ... here.
2408 (set_designator, process_init_element): Call finish_implicit_inits.
2409
2410 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2411
2412 PR c/69768
2413 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2414 arguments for -Waddress warning.
2415
2416 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR c/69669
2419 * c-decl.c (finish_enum): When honoring mode attribute,
2420 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2421
2422 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2423
2424 PR debug/69518
2425 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2426 all type variants, not just TYPE_MAIN_VARIANT.
2427
2428 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2429
2430 PR debug/66869
2431 * c-decl.c (c_write_global_declarations_1): Warn with
2432 warn_unused_function if static prototype without definition
2433 is not C_DECL_USED.
2434
2435 2016-01-27 Marek Polacek <polacek@redhat.com>
2436
2437 PR c/68062
2438 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2439 to unsigned, if needed. Add -Wsign-compare warning.
2440
2441 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2442
2443 PR tree-optimization/69483
2444 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2445
2446 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2447
2448 PR c/24293
2449 * c-tree.h (incomplete_record_decls): Declare.
2450 * c-parser.c (incomplete_record_decls): Define.
2451 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2452 report error if any decl has zero size.
2453 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2454 or enum type to incomplete_record_decls.
2455
2456 2016-01-14 Tom de Vries <tom@codesourcery.com>
2457
2458 PR tree-optimization/68773
2459 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2460 set force_output.
2461
2462 2016-01-14 Marek Polacek <polacek@redhat.com>
2463
2464 PR c/69262
2465 * c-decl.c (grokdeclarator): Provide more information for invalid
2466 array declarations.
2467
2468 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2469
2470 * c-parser.c (c_parser_unary_expression): For dereferences, build
2471 a combined location before calling build_indirect_ref, so that
2472 error reports cover the full range, manually updating the c_expr
2473 src_range.
2474
2475 2016-01-06 Marek Polacek <polacek@redhat.com>
2476
2477 PR sanitizer/69099
2478 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2479 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2480 NULL.
2481
2482 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2483
2484 Update copyright years.
2485
2486 2016-01-04 Marek Polacek <polacek@redhat.com>
2487
2488 PR c/68908
2489 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2490 optimization to use __atomic_fetch_* built-in if possible.
2491
2492 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2493
2494 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2495 into...
2496 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2497 all users.
2498
2499 2015-12-22 Marek Polacek <polacek@redhat.com>
2500
2501 PR c/69002
2502 * c-typeck.c (build_component_ref): Warn when acessing elements of
2503 atomic structures or unions.
2504
2505 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2506
2507 * c-typeck.c: Include "gcc-rich-location.h".
2508 (build_binary_op): In the two places that call binary_op_error,
2509 create a gcc_rich_location and populate it with the location of
2510 the binary op and its two operands.
2511
2512 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2513
2514 * c-parser.c (c_parser_statement_after_labels): When calling
2515 c_finish_return, Use the return expression's location if it has
2516 one, falling back to the location of the first token within it.
2517 * c-typeck.c (c_finish_return): When issuing warnings about
2518 the incorrect presence/absence of a return value, issue a note
2519 showing the declaration of the function.
2520
2521 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2522
2523 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2524 to 4.
2525 (c_parser_peek_nth_token): New function.
2526 (c_parser_peek_conflict_marker): New function.
2527 (c_parser_error): Detect conflict markers and report them as such.
2528
2529 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2530
2531 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2532 to preserve range information for the primary expression
2533 in the call to c_parser_postfix_expression_after_primary.
2534
2535 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2536
2537 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2538 expression location, falling back on the first token location,
2539 rather than always using the latter.
2540
2541 2015-12-16 Marek Polacek <polacek@redhat.com>
2542
2543 PR c/64637
2544 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2545 available.
2546
2547 2015-12-15 Marek Polacek <polacek@redhat.com>
2548
2549 PR c/68907
2550 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2551 artificial decl.
2552
2553 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2554
2555 * c-parser.c (c_parser_alignof_expression): Capture location of
2556 closing parenthesis (if any), or of end of unary expression, and
2557 use it to build a src_range for the expression.
2558
2559 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2560
2561 PR c/68757
2562 * c-parser.c (c_parser_get_builtin_args): Add
2563 "out_close_paren_loc" param, and write back to it.
2564 (c_parser_postfix_expression): Capture the closing
2565 parenthesis location for RID_CHOOSE_EXPR,
2566 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2567 RID_BUILTIN_SHUFFLE and use it to set the source range
2568 for such expressions; within RID_BUILTIN_COMPLEX set
2569 the underlying location.
2570
2571 2015-12-07 Marek Polacek <polacek@redhat.com>
2572
2573 PR c/68668
2574 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2575 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2576
2577 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2578
2579 * c-tree.h (c_build_va_arg): Adjust prototype.
2580 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2581 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2582 parameter, adjust throughout and issue an error if EXPR is a component
2583 with reverse storage order.
2584
2585 2015-12-02 Jason Merrill <jason@redhat.com>
2586
2587 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2588 (c_fully_fold_internal, decl_constant_value_for_optimization):
2589 Move from c-common.c.
2590 * c-tree.h: Declare decl_constant_value_for_optimization.
2591 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2592
2593 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2594
2595 PR c/68162
2596 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2597 following link from declarator to next declarator. Track original
2598 qualified type and pass it to c_build_qualified_type.
2599 * c-typeck.c (c_build_qualified_type): Add arguments
2600 orig_qual_type and orig_qual_indirect.
2601
2602 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2603
2604 * c-parser.c (c_parser_omp_clause_name)
2605 (c_parser_oacc_all_clauses): Alphabetical sorting.
2606
2607 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2608
2609 PR c/68533
2610 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2611 for diagnostics.
2612
2613 2015-12-01 Julian Brown <julian@codesourcery.com>
2614 Cesar Philippidis <cesar@codesourcery.com>
2615 James Norris <James_Norris@mentor.com>
2616
2617 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2618 (c_parser_oacc_clause_use_device): New function.
2619 (c_parser_oacc_all_clauses): Add use_device support.
2620 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2621 (c_parser_oacc_host_data): New function.
2622 (c_parser_omp_construct): Add host_data support.
2623 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2624 * c-typeck.c (c_finish_oacc_host_data): New function.
2625 (c_finish_omp_clauses): Add use_device support.
2626
2627 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2628
2629 PR c/67106
2630 * c-decl.c: Set TYPE_PACKED in variants.
2631
2632 2015-11-27 Martin Liska <mliska@suse.cz>
2633
2634 PR c++/68312
2635 * c-array-notation.c (fix_builtin_array_notation_fn):
2636 Use release_vec_vec instead of vec::release.
2637 (build_array_notation_expr): Likewise.
2638 (fix_conditional_array_notations_1): Likewise.
2639 (fix_array_notation_expr): Likewise.
2640 (fix_array_notation_call_expr): Likewise.
2641
2642 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2643
2644 PR c/63326
2645 * c-parser.c (c_parser_compound_statement_nostart): If
2646 last_label is true, use pragma_stmt instead of pragma_compound
2647 as second c_parser_pragma argument.
2648 (c_parser_omp_ordered, c_parser_omp_target_update,
2649 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2650 false as second argument to c_parser_skip_to_pragma_eol after
2651 diagnosing standalone directives used in pragma_stmt context.
2652
2653 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2654
2655 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2656 with "if (ENABLE_OFFLOADING)".
2657
2658 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2659
2660 PR objc/68438
2661 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2662 for various Objective-C constructs: Class.name syntax,
2663 @selector(), @protocol(), @encode(), and [] message syntax.
2664
2665 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2666
2667 PR 62314
2668 * c-typeck.c (should_suggest_deref_p): New function.
2669 (build_component_ref): Special-case POINTER_TYPE when
2670 generating a "not a structure of union" error message, and
2671 suggest a "->" rather than a ".", providing a fix-it hint.
2672
2673 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2674
2675 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2676 candidate into a new function, find_closest_identifier.
2677
2678 2015-11-19 Marek Polacek <polacek@redhat.com>
2679
2680 PR c/68412
2681 * c-typeck.c (parser_build_binary_op): Properly handle
2682 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2683
2684 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2685
2686 * c-parser.c (set_c_expr_source_range): Bulletproof both
2687 overloaded implementations against NULL expr->value.
2688 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2689 values.
2690 (c_parser_unary_expression): Likewise when handling addresses of
2691 labels.
2692 (c_parser_postfix_expression): Likewise for statement expressions,
2693 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2694 __builtin_va_arg, and for __builtin_offset_of.
2695 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2696 src_range using the range of the braced initializer.
2697 (c_parser_transaction_expression): Set src_range for "ret" to a
2698 sane pair of values.
2699
2700 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2701
2702 * c-parser.c (c_finish_omp_declare_simd): Look for
2703 "simd" attribute as well. Update error message.
2704
2705 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2706
2707 * c-parser.c (c_parser_omp_declare_target): Adjust.
2708
2709 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2710
2711 * c-typeck.c (c_finish_omp_clauses): Don't mark
2712 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2713
2714 2015-11-14 Marek Polacek <polacek@redhat.com>
2715
2716 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2717 * c-typeck.c: Likewise.
2718
2719 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2720
2721 * c-decl.c (warn_defaults_to): Pass line_table to
2722 rich_location ctor.
2723 * c-errors.c (pedwarn_c99): Likewise.
2724 (pedwarn_c90): Likewise.
2725 * c-parser.c (set_c_expr_source_range): New functions.
2726 (c_token::get_range): New method.
2727 (c_token::get_finish): New method.
2728 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2729 based on the range from the start of the LHS to the end of the
2730 RHS.
2731 (c_parser_conditional_expression): Likewise, based on the range
2732 from the start of the cond.value to the end of exp2.value.
2733 (c_parser_binary_expression): Call set_c_expr_source_range on
2734 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2735 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2736 based on the cast_loc through to the end of the expr.
2737 (c_parser_unary_expression): Likewise, based on the
2738 op_loc through to the end of op.
2739 (c_parser_sizeof_expression) Likewise, based on the start of the
2740 sizeof token through to either the closing paren or the end of
2741 expr.
2742 (c_parser_postfix_expression): Likewise, using the token range,
2743 or from the open paren through to the close paren for
2744 parenthesized expressions.
2745 (c_parser_postfix_expression_after_primary): Likewise, for
2746 various kinds of expression.
2747 * c-tree.h (struct c_expr): Add field "src_range".
2748 (c_expr::get_start): New method.
2749 (c_expr::get_finish): New method.
2750 (set_c_expr_source_range): New decls.
2751 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2752 on ret for prefix unary ops.
2753 (parser_build_binary_op): Likewise, running from the start of
2754 arg1.value through to the end of arg2.value.
2755
2756 2015-11-13 Marek Polacek <polacek@redhat.com>
2757
2758 PR c/68320
2759 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2760
2761 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2762
2763 * c-typeck.c: Include spellcheck.h.
2764 (lookup_field_fuzzy_find_candidates): New function.
2765 (lookup_field_fuzzy): New function.
2766 (build_component_ref): If the field was not found, try using
2767 lookup_field_fuzzy and potentially offer a suggestion.
2768
2769 2015-11-12 James Norris <jnorris@codesourcery.com>
2770 Joseph Myers <joseph@codesourcery.com>
2771
2772 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2773 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2774 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2775 and PRAGMA_OMP_CLAUSE_LINK.
2776 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2777 and PRAGMA_OACC_CLAUSE_LINK.
2778 (OACC_DECLARE_CLAUSE_MASK): New definition.
2779 (c_parser_oacc_declare): New function.
2780
2781 2015-11-12 Marek Polacek <polacek@redhat.com>
2782
2783 PR c/67784
2784 * c-parser.c (c_parser_for_statement): Reclassify the token in
2785 a correct scope.
2786
2787 2015-11-11 Marek Polacek <polacek@redhat.com>
2788
2789 PR c/68107
2790 PR c++/68266
2791 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2792 checking the size of an array.
2793
2794 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2795
2796 * c-array-notation.c: Remove unused header files.
2797 * c-aux-info.c: Likewise.
2798 * c-convert.c: Likewise.
2799 * c-decl.c: Likewise.
2800 * c-errors.c: Likewise.
2801 * c-lang.c: Likewise.
2802 * c-objc-common.c: Likewise.
2803 * c-parser.c: Likewise.
2804 * c-typeck.c: Likewise.
2805 * gccspec.c: Likewise.
2806
2807 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2808 Cesar Philippidis <cesar@codesourcery.com>
2809 James Norris <jnorris@codesourcery.com>
2810 Julian Brown <julian@codesourcery.com>
2811 Nathan Sidwell <nathan@codesourcery.com>
2812
2813 c/
2814 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2815 routine arg.
2816 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2817 (c_parser_pragma): Parse 'acc routine'.
2818 (OACC_ROUTINE_CLAUSE_MARK): Define.
2819 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2820
2821 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2822
2823 PR debug/67192
2824 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2825 location of the backward-goto to the start of the loop body.
2826
2827 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2828
2829 PR debug/67192
2830 * c-parser.c (c_parser_while_statement): Finish the loop before
2831 parsing ahead for misleading indentation.
2832 (c_parser_for_statement): Likewise.
2833
2834 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2835
2836 * c-decl.c (finish_struct): If the structure has reverse storage
2837 order, rewrite the type of array fields with scalar component. Call
2838 maybe_apply_pragma_scalar_storage_order on entry.
2839 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2840 errors on bit-fields and reverse SSO here and not...
2841 (c_mark_addressable): ...here.
2842 (output_init_element): Adjust call to initializer_constant_valid_p.
2843 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2844
2845 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2846
2847 * c-decl.c (warn_defaults_to): Update for change in signature
2848 of diagnostic_set_info.
2849 * c-errors.c (pedwarn_c99): Likewise.
2850 (pedwarn_c90): Likewise.
2851 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2852 for textinfo::set_location.
2853
2854 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2855 Thomas Schwinge <thomas@codesourcery.com>
2856 James Norris <jnorris@codesourcery.com>
2857
2858 * c-parser.c (c_parser_omp_clause_name): Add support for
2859 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2860 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2861 default(none) in OpenACC.
2862 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2863 arguments.
2864 (c_parser_oacc_clause_tile): New function.
2865 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2866 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2867 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2868 TILE}.
2869 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2870 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2871 FIRSTPRIVATE}.
2872 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2873 (c_parser_oacc_update): Update the error message for missing clauses.
2874 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2875 and OMP_CLAUSE_INDEPENDENT.
2876
2877 2015-11-05 Marek Polacek <polacek@redhat.com>
2878
2879 PR c/68090
2880 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2881 deal with pre-evaluation on invalid types.
2882
2883 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2884 Ilya Verbin <ilya.verbin@intel.com>
2885
2886 * c-parser.c: Include context.h and gimple-expr.h.
2887 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2888 monotonic together with nonmonotonic.
2889 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2890 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2891 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2892 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2893 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2894 expressions on combined target teams before the target.
2895 (c_parser_omp_declare_target): If decl has "omp declare target" or
2896 "omp declare target link" attribute, and cgraph or varpool node already
2897 exists, then set corresponding flags. Call c_finish_omp_clauses
2898 in the parenthesized extended-list syntax case.
2899 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2900 declare target.
2901 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2902 on OMP_CLAUSE_REDUCTION array sections.
2903 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2904 into the constant offset, or for variable low-bound using
2905 POINTER_PLUS_EXPR. For structure element based array sections use
2906 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2907 (c_finish_omp_clauses): Drop generic_field_head, structure
2908 elements are now always mapped even as array section bases,
2909 diagnose same var in data sharing and mapping clauses. Diagnose if
2910 linear step on declare simd is neither a constant nor a uniform
2911 parameter. Look through POINTER_PLUS_EXPR for array section
2912 reductions. Diagnose the same var or function appearing multiple
2913 times on the same directive. Fix up wording for the to clause if t
2914 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2915 modifier on kinds other than dynamic or guided or nonmonotonic
2916 modifier together with ordered clause.
2917
2918 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2919 Chung-Lin Tang <cltang@codesourcery.com>
2920
2921 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2922
2923 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2924
2925 * c-array-notation.c: Reorder #include's and remove duplicates.
2926 * c-aux-info.c: Likewise.
2927 * c-convert.c: Likewise.
2928 * c-decl.c: Likewise.
2929 * c-errors.c: Likewise.
2930 * c-lang.c: Likewise.
2931 * c-objc-common.c: Likewise.
2932 * c-parser.c: Likewise.
2933 * c-typeck.c: Likewise.
2934
2935 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2936
2937 PR debug/66068
2938 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2939 after calling build_qualified_type.
2940
2941 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2942 Thomas Schwinge <thomas@codesourcery.com>
2943 James Norris <jnorris@codesourcery.com>
2944 Joseph Myers <joseph@codesourcery.com>
2945 Julian Brown <julian@codesourcery.com>
2946 Bernd Schmidt <bschmidt@redhat.com>
2947
2948 * c-parser.c (c_parser_oacc_shape_clause): New.
2949 (c_parser_oacc_simple_clause): New.
2950 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2951 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2952
2953 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2954 James Norris <jnorris@codesourcery.com>
2955 Cesar Philippidis <cesar@codesourcery.com>
2956
2957 PR c/64765
2958 PR c/64880
2959 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2960 parameters, and handle these. Adjust all users.
2961 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2962 into...
2963 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2964 all users.
2965 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2966 declare functions.
2967 (c_finish_omp_construct): Declare function.
2968 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2969 Merge functions into...
2970 (c_finish_omp_construct): ... this new function.
2971
2972 2015-10-22 Richard Biener <rguenther@suse.de>
2973
2974 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2975 before folding a MINUS_EXPR.
2976
2977 2015-10-21 Marek Polacek <polacek@redhat.com>
2978
2979 PR c/68024
2980 * c-decl.c (start_function): Warn about vararg functions without
2981 a prototype.
2982
2983 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2984
2985 * c-typeck.c (build_conditional_expr): Use boolean vector
2986 type for vector comparison.
2987 (build_vec_cmp): New.
2988 (build_binary_op): Use build_vec_cmp for comparison.
2989
2990 2015-10-20 Marek Polacek <polacek@redhat.com>
2991
2992 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2993
2994 2015-10-20 Marek Polacek <polacek@redhat.com>
2995
2996 PR c/67964
2997 * c-parser.c (c_parser_attributes): Break out of the loop if the
2998 token after an attribute isn't a comma.
2999
3000 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3001 Aldy Hernandez <aldyh@redhat.com>
3002
3003 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3004 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3005 (c_parser_omp_variable_list): Handle structure elements for
3006 map, to and from clauses. Handle array sections in reduction
3007 clause. Formatting fixes.
3008 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3009 if clause modifiers.
3010 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3011 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3012 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3013 c_parser_omp_clause_is_device_ptr): New functions.
3014 (c_parser_omp_clause_ordered): Parse optional parameter.
3015 (c_parser_omp_clause_reduction): Handle array reductions.
3016 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3017 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3018 functions.
3019 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3020 (c_parser_omp_clause_depend_sink): New function.
3021 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3022 (c_parser_omp_clause_map): Parse release/delete map kinds and
3023 optional always modifier.
3024 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3025 and c_finish_omp_clauses callers.
3026 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3027 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3028 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3029 (OMP_CRITICAL_CLAUSE_MASK): Define.
3030 (c_parser_omp_critical): Parse critical clauses.
3031 (c_parser_omp_for_loop): Handle doacross loops, adjust
3032 c_finish_omp_for and c_finish_omp_clauses callers.
3033 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3034 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3035 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3036 (c_parser_omp_for): Disallow ordered clause when combined with
3037 distribute. Disallow linear clause when combined with distribute
3038 and not combined with simd.
3039 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3040 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3041 parse clauses and if depend clause is found, don't parse a body.
3042 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3043 Allow target parallel without for after it.
3044 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3045 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3046 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3047 invalid kinds.
3048 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3049 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3050 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3051 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3052 functions.
3053 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3054 defaultmap and is_device_ptr clauses.
3055 (c_parser_omp_target): Parse target parallel and target simd. Set
3056 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3057 and target exit data. Diagnose invalid map kinds.
3058 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3059 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3060 construct.
3061 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3062 &omp_priv.
3063 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3064 (c_parser_omp_taskloop): New function.
3065 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3066 handle PRAGMA_OMP_TASKLOOP.
3067 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3068 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3069 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3070 Add IS_OMP argument, handle structure element bases, diagnose
3071 bitfields, pass IS_OMP recursively, diagnose known zero length
3072 array sections in depend clauses, handle array sections in reduction
3073 clause, diagnose negative length even for pointers.
3074 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3075 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3076 array sections in reduction clause, set
3077 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3078 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3079 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3080 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3081
3082 2015-10-06 Marek Polacek <polacek@redhat.com>
3083
3084 * c-parser.c (c_parser_statement_after_labels): Use
3085 protected_set_expr_location.
3086 (c_parser_omp_clause_num_gangs): Likewise.
3087 (c_parser_omp_clause_num_threads): Likewise.
3088 (c_parser_omp_clause_num_workers): Likewise.
3089 (c_parser_omp_clause_vector_length): Likewise.
3090 (c_parser_omp_clause_num_teams): Likewise.
3091 (c_parser_omp_clause_thread_limit): Likewise.
3092 * c-typeck.c (build_c_cast): Likewise.
3093 (c_cast_expr): Likewise.
3094
3095 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3096
3097 * c-typeck.c (c_tree_equal): Use real_equal instead of
3098 REAL_VALUES_EQUAL.
3099
3100 2015-10-04 Jason Merrill <jason@redhat.com>
3101
3102 * c-parser.c (c_lex_one_token): Handle @synchronized.
3103 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3104 can change whether the function is transaction_safe.
3105
3106 2015-10-02 Marek Polacek <polacek@redhat.com>
3107
3108 PR c/67730
3109 * c-typeck.c (convert_for_assignment): Use the expansion point
3110 location throughout.
3111
3112 2015-10-02 Marek Polacek <polacek@redhat.com>
3113
3114 PR c/64249
3115 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3116 and pass it down to c_parser_if_statement.
3117 (c_parser_else_body): Add CHAIN parameter and pass it down to
3118 c_parser_statement_after_labels.
3119 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3120 duplicated if-else-if conditions.
3121
3122 2015-10-01 Marek Polacek <polacek@redhat.com>
3123
3124 * c-typeck.c (convert_for_assignment): Improve commentary.
3125
3126 2015-09-30 Marek Polacek <polacek@redhat.com>
3127
3128 PR c/67730
3129 * c-typeck.c (c_finish_return): Use the expansion point location for
3130 certain "return with value" warnings.
3131
3132 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3133
3134 * c-parser.c (pragma_lex): Add loc argument.
3135
3136 2015-09-15 Marek Polacek <polacek@redhat.com>
3137
3138 PR c/67580
3139 * c-decl.c (tag_exists_p): New function.
3140 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3141 struct/union/enum keywords are missing.
3142 * c-tree.h (tag_exists_p): Declare.
3143
3144 2015-09-15 Marek Polacek <polacek@redhat.com>
3145
3146 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3147 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3148 Return NULL_TREE instead of 0.
3149 (lookup_name): Return NULL_TREE instead of 0.
3150 (lookup_name_in_scope): Likewise.
3151 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3152 (parser_xref_tag): Use false instead of 0.
3153 (start_struct): Use true instead of 1.
3154 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3155
3156 2015-09-14 Marek Polacek <polacek@redhat.com>
3157
3158 * c-typeck.c (set_nonincremental_init_from_string): Use
3159 HOST_WIDE_INT_M1U when shifting a negative value.
3160
3161 2015-09-09 Mark Wielaard <mjw@redhat.com>
3162
3163 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3164 parm against NULL.
3165
3166 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3167
3168 PR c/67502
3169 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3170 into OMP_FOR_PRE_BODY rather than before the loop.
3171
3172 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3173
3174 PR c/67501
3175 * c-parser.c (c_parser_oacc_all_clauses,
3176 c_parser_omp_all_clauses): Remove invalid clause from
3177 list of clauses even if parser->error is set.
3178
3179 PR c/67500
3180 * c-parser.c (c_parser_omp_clause_aligned,
3181 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3182 test for errors.
3183 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3184 error_mark_node.
3185
3186 PR c/67495
3187 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3188 instead of c_parser_unary_expression. If the result is !lvalue_p,
3189 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3190
3191 2015-09-04 Marek Polacek <polacek@redhat.com>
3192
3193 PR sanitizer/67279
3194 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3195
3196 2015-09-03 Martin Sebor <msebor@redhat.com>
3197
3198 PR c/66516
3199 * c-typeck.c (convert_arguments, parser_build_unary_op,
3200 build_conditional_expr, c_cast_expr, convert_for_assignment,
3201 build_binary_op, _objc_common_truthvalue_conversion): Call
3202 reject_gcc_builtin.
3203 (c_decl_implicit): Define.
3204
3205 2015-09-02 Marek Polacek <polacek@redhat.com>
3206
3207 PR c/67432
3208 * c-parser.c (c_parser_enum_specifier): Give a better error for
3209 an empty enum.
3210
3211 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3212
3213 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3214
3215 2015-08-12 Marek Polacek <polacek@redhat.com>
3216
3217 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3218 LOC to it.
3219
3220 2015-08-03 Marek Polacek <polacek@redhat.com>
3221
3222 PR c/67088
3223 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3224 Use it.
3225 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3226
3227 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3228
3229 * c-parser.c (c_parser_if_body): Take token_indent_info
3230 argument. Call warn_for_misleading_indentation even when the
3231 body is a semicolon. Extract token_indent_infos corresponding
3232 to the guard, body and next tokens. Adjust call to
3233 warn_for_misleading_indentation accordingly.
3234 (c_parser_else_body): Likewise.
3235 (c_parser_if_statement): Likewise.
3236 (c_parser_while_statement): Likewise.
3237 (c_parser_for_statement): Likewise.
3238
3239 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3240 Manuel López-Ibáñez <manu@gcc.gnu.org>
3241
3242 * c-decl.c (get_parm_info): Remove static var. Update warning
3243 message.
3244
3245 2015-07-27 Marek Polacek <polacek@redhat.com>
3246
3247 PR c++/66555
3248 PR c/54979
3249 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3250
3251 2015-07-20 Marek Polacek <polacek@redhat.com>
3252
3253 PR c++/55095
3254 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3255 (build_binary_op): Warn about left shift overflows.
3256
3257 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3258
3259 * c-array-notation.c: Adjust includes for flags.h changes.
3260 * c-objc-common.c: Likewise.
3261
3262 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3263
3264 * c-array-notation.c: Adjust includes.
3265 * c-aux-info.c: Likewise.
3266 * c-convert.c: Likewise.
3267 * c-decl.c: Likewise.
3268 * c-errors.c: Likewise.
3269 * c-lang.c: Likewise.
3270 * c-objc-common.c: Likewise.
3271 * c-parser.c: Likewise.
3272 * c-typeck.c: Likewise.
3273
3274 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3275
3276 PR fortran/66605
3277 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3278
3279 2015-06-29 Marek Polacek <polacek@redhat.com>
3280
3281 PR c/66322
3282 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3283 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3284 about -Wswitch-bool here.
3285 (do_case): Update c_add_case_label call.
3286 (c_finish_case): Update c_do_switch_warnings call.
3287
3288 2015-06-27 Marek Polacek <polacek@redhat.com>
3289
3290 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3291
3292 2015-06-26 Marek Polacek <polacek@redhat.com>
3293
3294 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3295 INDIRECT_REF_P.
3296 * c-typeck.c (array_to_pointer_conversion): Likewise.
3297 (build_unary_op): Likewise.
3298 (c_finish_return): Likewise.
3299
3300 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3301
3302 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3303 * c-parser.c: Likewise.
3304
3305 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3306
3307 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3308 instead of pointer_hash.
3309 (detect_field_duplicates): Likewise.
3310
3311 2015-06-25 Marek Polacek <polacek@redhat.com>
3312
3313 * c-array-notation.c: Use VAR_P throughout.
3314 * c-decl.c: Likewise.
3315 * c-objc-common.c: Likewise.
3316 * c-parser.c: Likewise.
3317 * c-typeck.c: Likewise.
3318
3319 2015-06-25 Marek Polacek <polacek@redhat.com>
3320
3321 * c-decl.c: Use is_global_var throughout.
3322 * c-parser.c: Likewise.
3323 * c-typeck.c: Likewise.
3324
3325 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3326
3327 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3328 * c-aux-info.c: Likewise.
3329 * c-convert.c: Likewise.
3330 * c-decl.c: Likewise.
3331 * c-errors.c: Likewise.
3332 * c-lang.c: Likewise.
3333 * c-objc-common.c: Likewise.
3334 * c-parser.c: Likewise.
3335 * c-typeck.c: Likewise.
3336
3337 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3338
3339 PR middle-end/66325
3340 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3341 variants.
3342
3343 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3344
3345 * c-decl.c (pop_scope): Register the main translation unit
3346 through the new debug hook.
3347
3348 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3349
3350 * c-array-notation.c : Adjust include files.
3351 * c-aux-info.c : Likewise.
3352 * c-convert.c : Likewise.
3353 * c-decl.c : Likewise.
3354 * c-errors.c : Likewise.
3355 * c-lang.c : Likewise.
3356 * c-lang.h : Likewise.
3357 * c-objc-common.c : Likewise.
3358 * c-parser.c : Likewise.
3359 * c-typeck.c : Likewise.
3360
3361 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3362
3363 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3364 immediately clobber it.
3365 (c_write_global_declarations_1): Remove call to
3366 check_global_declaration_1.
3367 (c_write_global_declarations_2): Remove.
3368 (c_write_final_cleanups): Rename from c_write_global_declarations.
3369 Remove call to finalize_compilation_unit.
3370 Remove calls to debugging hooks.
3371 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3372 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3373 * c-tree.h: Remove c_write_global_declarations.
3374
3375 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3376
3377 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3378 * c-aux-info.c: Likewise.
3379 * c-convert.c: Likewise.
3380 * c-decl.c: Likewise.
3381 * c-errors.c: Likewise.
3382 * c-lang.c: Likewise.
3383 * c-objc-common.c: Likewise.
3384 * c-parser.c: Likewise.
3385 * c-typeck.c: Likewise.
3386
3387 2015-06-04 Marek Polacek <polacek@redhat.com>
3388
3389 PR c/66341
3390 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3391 it is a lvalue.
3392
3393 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3394
3395 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3396 Warn for empty struct.
3397 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3398
3399 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3400
3401 * c-decl.c (start_function): Call plugin before parsing.
3402 (finish_function): Call plugin after parsing.
3403
3404 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3405
3406 PR c/49551
3407 * c-decl.c (merge_decls): Merge DECL_COMMON.
3408
3409 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3410
3411 * Make-lang.in (check_gcc_pallelize): Define.
3412
3413 2015-05-22 Marek Polacek <polacek@redhat.com>
3414
3415 PR c/47043
3416 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3417 attributes.
3418
3419 2015-05-21 Marek Polacek <polacek@redhat.com>
3420
3421 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3422 DECL_BUILT_IN.
3423
3424 2015-05-20 Marek Polacek <polacek@redhat.com>
3425
3426 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3427 * c-typeck.c: Likewise.
3428
3429 2015-05-19 Marek Polacek <polacek@redhat.com>
3430
3431 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3432
3433 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3434
3435 PR middle-end/66199
3436 * c-parser.c (c_parser_omp_for_loop): Don't add
3437 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3438 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3439 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3440 constructs.
3441
3442 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3443
3444 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3445 swaps.
3446
3447 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3448
3449 PR fortran/44054
3450 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3451 accessor function.
3452
3453 2015-05-14 Marek Polacek <polacek@redhat.com>
3454
3455 PR c/66066
3456 PR c/66127
3457 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3458 rather than with 0.
3459
3460 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3461
3462 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3463 to add a call to warn_for_misleading_indentation.
3464 (c_parser_else_body): Likewise, adding param "else_loc".
3465 (c_parser_if_statement): Check for misleading indentation.
3466 (c_parser_while_statement): Likewise.
3467 (c_parser_for_statement): Likewise.
3468
3469 2015-05-08 Marek Polacek <polacek@redhat.com>
3470
3471 PR c/64918
3472 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3473 (output_init_element): Likewise.
3474
3475 2015-05-07 Marek Polacek <polacek@redhat.com>
3476
3477 PR c/65179
3478 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3479 value.
3480
3481 2015-04-30 Marek Polacek <polacek@redhat.com>
3482
3483 * c-typeck.c (set_init_label): Call error_at instead of error and
3484 pass LOC to it.
3485
3486 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3487 the type of a decl.
3488
3489 * c-typeck.c (c_build_va_arg): Clarify the error message.
3490
3491 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3492
3493 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3494 OMP_STANDALONE_CLAUSES.
3495
3496 2015-04-28 Marek Polacek <polacek@redhat.com>
3497
3498 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3499
3500 2015-04-28 Marek Polacek <polacek@redhat.com>
3501
3502 PR c/65901
3503 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3504
3505 2015-04-25 Marek Polacek <polacek@redhat.com>
3506
3507 PR c/52085
3508 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3509 attribute.
3510
3511 2015-04-23 Marek Polacek <polacek@redhat.com>
3512
3513 PR c/65345
3514 * c-decl.c (set_labels_context_r): New function.
3515 (store_parm_decls): Call it via walk_tree_without_duplicates.
3516 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3517 instead of create_tmp_var. Build TARGET_EXPR instead of
3518 COMPOUND_EXPR.
3519 (build_atomic_assign): Use create_tmp_var_raw instead of
3520 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3521
3522 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3523
3524 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3525 (c_parser_omp_target_update): Add missed %> to error_at ().
3526
3527 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3528
3529 PR target/55143
3530 * c-decl.c (c_default_pointer_mode): Remove definition.
3531 * c-tree.h (c_default_pointer_mode): Remove declaration.
3532
3533 2015-03-27 Tobias Burnus <burnus@net-b.de>
3534
3535 PR c/65586
3536 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3537 error out.
3538 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3539 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3540 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3541
3542 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3543
3544 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3545 attribute for DECL_EXTERNAL VAR_DECLs.
3546
3547 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3548
3549 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3550 argument.
3551
3552 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3553
3554 PR c/65120
3555 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3556 before preparing arguments to warn_logical_not_parentheses.
3557
3558 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3559
3560 PR c/65120
3561 * c-typeck.c (parser_build_binary_op): Don't warn for
3562 !!x == y or !b == y where b is _Bool.
3563
3564 2015-03-09 Marek Polacek <polacek@redhat.com>
3565
3566 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3567 * c-decl.c (grokdeclarator): Likewise.
3568 * c-typeck.c (build_binary_op): Likewise.
3569
3570 2015-02-27 Marek Polacek <polacek@redhat.com>
3571
3572 PR c/65228
3573 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3574
3575 2015-02-14 Marek Polacek <polacek@redhat.com>
3576
3577 PR c/64768
3578 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3579 declared through a typedef name.
3580
3581 2015-02-13 Marek Polacek <polacek@redhat.com>
3582
3583 PR c/65050
3584 * c-decl.c (grokdeclarator): Print also the type when giving
3585 the error message about array's incomplete element type.
3586
3587 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3588
3589 PR c/64824
3590 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3591 check in the POP macro.
3592
3593 2015-02-09 Marek Polacek <polacek@redhat.com>
3594
3595 PR c/64856
3596 * c-typeck.c (process_init_element): Don't always wrap
3597 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3598 initializing a range of elements.
3599
3600 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3601
3602 PR c/64824
3603 PR c/64868
3604 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3605
3606 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3607
3608 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3609 processing enum declaration.
3610
3611 2015-01-29 Marek Polacek <polacek@redhat.com>
3612
3613 PR c/64709
3614 * c-typeck.c (pop_init_level): If constructor_elements has
3615 exactly one element with integer_zerop value, set constructor_zeroinit
3616 to 1. Remove braces around warning_init call.
3617
3618 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3619
3620 PR c/64766
3621 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3622 of FUNCTION_DECLs with error_mark_node.
3623
3624 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3625
3626 PR c/64778
3627 * c-typeck.c (convert_arguments): Return -1 if there are
3628 error_args, even if we've diagnosed too many arguments.
3629
3630 2015-01-21 Richard Biener <rguenther@suse.de>
3631
3632 PR middle-end/64313
3633 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3634 for builtins the user declared correctly.
3635
3636 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3637 Bernd Schmidt <bernds@codesourcery.com>
3638 Cesar Philippidis <cesar@codesourcery.com>
3639 James Norris <jnorris@codesourcery.com>
3640 Jakub Jelinek <jakub@redhat.com>
3641 Ilmir Usmanov <i.usmanov@samsung.com>
3642
3643 * c-parser.c: Include "gomp-constants.h".
3644 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3645 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3646 Use OMP_CLAUSE_SET_MAP_KIND.
3647 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3648 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3649 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3650 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3651 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3652 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3653 "copyout", "create", "delete", "deviceptr", "gang", "host",
3654 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3655 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3656 "present_or_create", "pcreate", "seq", "self", "vector",
3657 "vector_length", "wait", "worker".
3658 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3659 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3660 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3661 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3662 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3663 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3664 (c_parser_oacc_data_clause_deviceptr)
3665 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3666 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3667 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3668 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3669 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3670 (c_parser_oacc_parallel, c_parser_oacc_update)
3671 (c_parser_oacc_wait): New functions.
3672 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3673 (c_finish_oacc_data): New prototypes.
3674 * c-typeck.c: Include "gomp-constants.h".
3675 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3676 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3677 OMP_CLAUSE_SET_MAP_KIND.
3678 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3679 (c_finish_oacc_data): New functions.
3680 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3681 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3682 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3683 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3684 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3685 GOMP_MAP_FORCE_DEVICEPTR.
3686
3687 2015-01-09 Michael Collison <michael.collison@linaro.org>
3688
3689 * c-array-notation.c: Include hash-set.h, machmode.h,
3690 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3691 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3692 * c-aux-info.c: Ditto.
3693 * c-convert.c: Ditto.
3694 * c-decl.c: Ditto.
3695 * c-errors.c: Ditto.
3696 * c-lang.c: Dittoxs.
3697 * c-objc-common.c: Ditto.
3698 * c-parser.c: Ditto.
3699 * c-typeck.c: Include hash-set.h, machmode.h,
3700 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3701 fold-const.h, wide-int.h, inchash.h, real.h and
3702 fixed-value.h due to flattening of tree.h.
3703
3704 2015-01-07 Marek Polacek <polacek@redhat.com>
3705
3706 PR c/64417
3707 * c-typeck.c (process_init_element): Disallow initialization of
3708 a flexible array member with a string constant if the structure
3709 is in an array.
3710
3711 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3712
3713 PR sanitizer/64344
3714 * c-typeck.c (convert_for_assignment, c_finish_return): For
3715 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3716 types also set in_late_binary_op around convert call.
3717 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3718 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3719 result on expr as last argument to ubsan_instrument_float_cast,
3720 if in_late_binary_op, don't use c_save_expr but save_expr.
3721
3722 Update copyright years.
3723
3724 2015-01-05 Marek Polacek <polacek@redhat.com>
3725
3726 PR c/64423
3727 * c-typeck.c (build_array_ref): Pass loc down to
3728 warn_array_subscript_with_type_char.
3729
3730 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3731
3732 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3733 (common-pointer-type): For pointers to arrays take qualifiers from
3734 element type.
3735 (build_conditional_expr): Add warnings for lost qualifiers.
3736 (comp-target-types): Allow pointers to arrays with different qualifiers.
3737 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3738 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3739 to PEDWARN_FOR_QUALIFIERS.
3740
3741 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3742
3743 PR sanitizer/64289
3744 * c-convert.c: Include ubsan.h.
3745 (convert): For real -> integral casts and
3746 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3747 instead instrument the float cast directly.
3748
3749 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3750
3751 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3752 c_finish_stmt_expr): Remove NULL last argument from
3753 create_tmp_var_raw and create_tmp_var calls.
3754 * c-array-notation.c (fix_builtin_array_notation_fn,
3755 build_array_notation_expr, fix_conditional_array_notations_1,
3756 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3757
3758 2014-11-28 Marek Polacek <polacek@redhat.com>
3759
3760 PR c/63862
3761 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3762 convert the right operand to integer type.
3763
3764 2014-11-25 Marek Polacek <polacek@redhat.com>
3765
3766 PR c/63877
3767 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3768 for inline functions.
3769
3770 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3771
3772 PR target/63764
3773 * c-typeck.c (build_array_ref): Adjust
3774 convert_vector_to_pointer_for_subscript caller. If it returns true,
3775 call non_lvalue_loc on the result.
3776
3777 2014-11-11 Richard Biener <rguenther@suse.de>
3778
3779 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3780 to true.
3781
3782 2014-11-10 Andi Kleen <ak@linux.intel.com>
3783
3784 PR c/60804
3785 * c-parser.c (c_parser_statement_after_labels): Call
3786 check_no_cilk.
3787 (c_parser_if_statement): Dito.
3788 (c_parser_switch_statement): Dito.
3789 (c_parser_while_statement): Dito.
3790 (c_parser_do_statement): Dito.
3791 (c_parser_for_statement): Dito.
3792 * c-typeck.c (c_finish_loop): Dito.
3793
3794 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3795
3796 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3797 OPT_Wshift_count_overflow in the warnings.
3798
3799 2014-10-30 Marek Polacek <polacek@redhat.com>
3800
3801 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3802 print the stripped version as well, if they're not the same.
3803
3804 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3805
3806 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3807 machine_mode.
3808
3809 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3810
3811 * c-decl.c: Adjust include files.
3812 * c-parser.c: Ditto.
3813
3814 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3815 Tom Tromey <tromey@redhat.com>
3816
3817 * c-tree.h (enum c_oracle_request): New.
3818 (c_binding_oracle_function): New typedef.
3819 (c_binding_oracle, c_pushtag, c_bind): Declare.
3820 * c-decl.c (c_binding_oracle): New global.
3821 (I_SYMBOL_CHECKED): New macro.
3822 (i_symbol_binding): New function.
3823 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3824 (I_TAG_CHECKED): New macro.
3825 (i_tag_binding): New function.
3826 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3827 (I_LABEL_CHECKED): New macro.
3828 (i_label_binding): New function.
3829 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3830 (c_print_identifier): Save and restore c_binding_oracle.
3831 (c_pushtag, c_bind): New functions.
3832
3833 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3834
3835 * c-typeck.c: Adjust include files.
3836
3837 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3838
3839 PR c++/53061
3840 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3841 initialization here...
3842 (c_initialize_diagnostics): ... but here. Set defaults after
3843 building pretty-printer.
3844
3845 2014-10-23 Marek Polacek <polacek@redhat.com>
3846
3847 PR c/63626
3848 * c-decl.c (pop_scope): Don't print warning in external_scope.
3849
3850 2014-10-19 Marek Polacek <polacek@redhat.com>
3851
3852 PR c/63567
3853 * c-typeck.c (output_init_element): Allow initializing objects with
3854 static storage duration with compound literals even in C99 and add
3855 pedwarn for it.
3856
3857 2014-10-17 Marek Polacek <polacek@redhat.com>
3858
3859 PR c/63567
3860 * c-typeck.c (digest_init): Allow initializing objects with static
3861 storage duration with compound literals even in C99 and add pedwarn
3862 for it.
3863
3864 2014-10-17 Marek Polacek <polacek@redhat.com>
3865
3866 PR c/63543
3867 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3868 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3869 error multiple times. Print the type.
3870
3871 2014-10-17 Marek Polacek <polacek@redhat.com>
3872
3873 PR c/63549
3874 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3875 type.
3876
3877 2014-10-17 Marek Polacek <polacek@redhat.com>
3878
3879 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3880 (start_function): Use OPT_Wimplicit_int instead of 0.
3881 (store_parm_decls_oldstyle): Likewise.
3882
3883 2014-10-17 Alan Modra <amodra@gmail.com>
3884
3885 PR middle-end/61848
3886 * c-decl.c (merge_decls): Don't merge section name or tls model
3887 to newdecl symtab node, instead merge to olddecl. Override
3888 existing olddecl section name. Set tls_model for all thread-local
3889 vars, not just OMP thread-private ones. Remove incorrect comment.
3890
3891 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3892
3893 * c-decl.c: Adjust include files.
3894
3895 2014-10-14 DJ Delorie <dj@redhat.com>
3896
3897 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3898 (c_token_starts_typename): Check all __intN, not just __int128.
3899 (c_token_starts_declspecs): Likewise.
3900 (c_parser_declspecs): Likewise.
3901 (c_parser_attribute_any_word): Likewise.
3902 (c_parser_objc_selector): Likewise.
3903 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3904 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3905 is specified.
3906 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3907 __int128.
3908 (finish_declspecs): Likewise.
3909
3910 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3911
3912 * c-parser.c (c_parser_all_labels): New function to replace
3913 the duplicate code.
3914 (c_parser_statement): Call the new function.
3915
3916 2014-10-09 Marek Polacek <polacek@redhat.com>
3917
3918 PR c/63480
3919 * c-typeck.c (pop_init_level): Don't warn about initializing
3920 with { }.
3921
3922 2014-10-07 Marek Polacek <polacek@redhat.com>
3923
3924 PR c/59717
3925 * c-decl.c (header_for_builtin_fn): New function.
3926 (implicitly_declare): Suggest which header to include.
3927
3928 2014-10-07 Marek Polacek <polacek@redhat.com>
3929
3930 * c-convert.c (convert): Use error_operand_p.
3931 * c-typeck.c (require_complete_type): Likewise.
3932 (really_atomic_lvalue): Likewise.
3933 (digest_init): Likewise.
3934 (handle_omp_array_sections_1): Likewise.
3935
3936 2014-10-03 Marek Polacek <polacek@redhat.com>
3937
3938 PR c/63453
3939 * c-decl.c (pop_scope): Don't warn about "inline function declared
3940 but never defined" for functions marked with gnu_inline attribute.
3941
3942 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3943
3944 PR c++/63249
3945 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3946 on low_bound and length.
3947
3948 2014-09-24 Marek Polacek <polacek@redhat.com>
3949
3950 PR c/61405
3951 PR c/53874
3952 * c-parser.c: Don't define CPP_KEYWORD.
3953 (c_parser_switch_statement): Pass original type to c_finish_case.
3954 * c-tree.h (c_finish_case): Update declaration.
3955 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3956 conditionally to c_do_switch_warnings.
3957
3958 2014-09-03 Marek Polacek <polacek@redhat.com>
3959
3960 PR c/62024
3961 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3962 conversions.
3963
3964 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3965 Balaji V. Iyer <balaji.v.iyer@intel.com>
3966 Igor Zamyatin <igor.zamyatin@intel.com>
3967
3968 * c-parser.c (c_parser_cilk_for): New function.
3969 (c_parser_cilk_grainsize): Likewise.
3970 (c_get_temp_regvar): Likewise.
3971 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3972 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3973 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3974 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3975 case.
3976
3977 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3978
3979 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3980 with using HOST_WIDE_INT without truncation to 'int'
3981
3982 2014-08-22 Marek Polacek <polacek@redhat.com>
3983
3984 PR c++/62199
3985 * c-typeck.c (parser_build_binary_op): Adjust call to
3986 warn_logical_not_parentheses.
3987
3988 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3989
3990 PR other/62008
3991 * c-parser.c (c_parser_array_notation): Check for correct
3992 type of an array added.
3993
3994 2014-08-19 Marek Polacek <polacek@redhat.com>
3995
3996 PR c++/62153
3997 * c-typeck.c (build_binary_op): If either operand of a comparison
3998 is a boolean expression, call maybe_warn_bool_compare.
3999
4000 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4001
4002 PR c/45584
4003 * c-typeck.c (build_c_cast): Do a conversion even when the
4004 TYPE_MAIN_VARIANTs are the same.
4005
4006 2014-08-19 Marek Polacek <polacek@redhat.com>
4007
4008 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4009 pedwarn_c99 instead of pedwarn.
4010 (grokfield): Likewise.
4011 (warn_defaults_to): New function.
4012 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4013 Unconditionally call pedwarn_c99 instead of pedwarn.
4014 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4015 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4016 check flag_isoc11 before.
4017 * c-errors.c (pedwarn_c99): Change the return type to bool.
4018 Handle -Wc99-c11-compat.
4019 * c-parser.c (disable_extension_diagnostics): Handle
4020 warn_c99_c11_compat.
4021 (restore_extension_diagnostics): Likewise.
4022 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4023 instead of pedwarn, don't check flag_isoc11 before.
4024 (c_parser_declspecs): Likewise.
4025 (c_parser_alignas_specifier): Likewise.
4026 (c_parser_alignof_expression): Likewise.
4027 (c_parser_generic_selection): Likewise.
4028 * c-tree.h (pedwarn_c99): Update declaration.
4029 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4030 of pedwarn_c99.
4031
4032 2014-08-19 Marek Polacek <polacek@redhat.com>
4033
4034 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4035 to pedwarn_c90.
4036 * c-errors.c: Include "opts.h".
4037 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4038 * c-parser.c (disable_extension_diagnostics): Handle negative value
4039 of warn_c90_c99_compat, too.
4040 (restore_extension_diagnostics): Likewise.
4041 (c_parser_compound_statement_nostart): Pass
4042 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4043
4044 2014-08-12 Marek Polacek <polacek@redhat.com>
4045
4046 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4047 Add pedwarn.
4048 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4049 Likewise.
4050 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4051
4052 2014-08-10 Marek Polacek <polacek@redhat.com>
4053
4054 PR c/51849
4055 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4056 Call pedwarn_c90 instead of pedwarn.
4057 (check_bitfield_type_and_width): Likewise.
4058 (declspecs_add_qual): Likewise.
4059 (declspecs_add_type): Likewise.
4060 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4061 Adjust to only call pedwarn_c90.
4062 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4063 pedwarn_c90 instead of pedwarn.
4064 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4065 * c-parser.c (disable_extension_diagnostics): Handle
4066 warn_c90_c99_compat.
4067 (restore_extension_diagnostics): Likewise.
4068 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4069 pedwarn_c90 instead of pedwarn.
4070 (c_parser_initelt): Likewise.
4071 (c_parser_postfix_expression): Likewise.
4072 (c_parser_postfix_expression_after_paren_type): Likewise.
4073 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4074 * c-tree.h: Fix formatting.
4075 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4076 pedwarn_c90 instead of pedwarn.
4077
4078 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4079
4080 * c-typeck.c: Remove include of pointer-set.h.
4081
4082 2014-08-07 Marek Polacek <polacek@redhat.com>
4083
4084 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4085
4086 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4087
4088 * c-typeck.c: Use hash_map instead of pointer_map.
4089
4090 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4091
4092 * c-decl.c: Use hash_set instead of pointer_set.
4093
4094 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4095
4096 PR middle-end/61455
4097 * c-array-notation.c (expand_array_notations): Handling
4098 of DECL_EXPR added.
4099
4100 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4101
4102 PR c++/60517
4103 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4104 a local variable.
4105
4106 2014-07-30 Tom Tromey <tromey@redhat.com>
4107
4108 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4109 field.
4110 (really_start_incremental_init, push_init_level): Initialize
4111 designator_depth.
4112 (pop_init_level): Set global designator_depth.
4113 (process_init_element): Check for designated_init attribute.
4114
4115 2014-07-20 Marek Polacek <polacek@redhat.com>
4116
4117 PR c/61852
4118 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4119 (implicitly_declare): Pass location to implicit_decl_warning.
4120
4121 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4122
4123 PR middle-end/61294
4124 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4125 If non-NULL, call c_parser_check_literal_zero.
4126 (c_parser_check_literal_zero): New function.
4127 (c_parser_postfix_expression_after_primary): Adjust
4128 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4129
4130 2014-07-06 Marek Polacek <polacek@redhat.com>
4131
4132 PR c/6940
4133 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4134 * c-tree.h (C_ARRAY_PARAMETER): Define.
4135 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4136 function parameter.
4137
4138 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4139 Chen Gang <gang.chen.5i5j@gmail.com>
4140
4141 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4142 releasing symbol.
4143
4144 2014-07-01 Marek Polacek <polacek@redhat.com>
4145
4146 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4147 instead of 0 to WARN_FOR_ASSIGNMENT.
4148
4149 2014-07-01 Marek Polacek <polacek@redhat.com>
4150
4151 PR c/58286
4152 * c-typeck.c (convert_for_assignment): Pass
4153 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4154
4155 2014-06-30 Marek Polacek <polacek@redhat.com>
4156
4157 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4158 has no_sanitize_undefined attribute.
4159
4160 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4161
4162 PR middle-end/57541
4163 * c-array-notation.c (fix_builtin_array_notation_fn):
4164 Check for 0 arguments in builtin call. Check that bultin argument is
4165 correct.
4166 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4167 index.
4168
4169 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4170
4171 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4172 qualifiers in __auto_type for atomic types.
4173 (c_parser_typeof_specifier): Discard all type qualifiers in
4174 __typeof__ for atomic types.
4175
4176 2014-06-25 Marek Polacek <polacek@redhat.com>
4177
4178 PR c/61162
4179 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4180 the return expression to c_finish_return.
4181
4182 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4183
4184 * c-typeck.c (c_finish_omp_clauses): Make sure
4185 OMP_CLAUSE_LINEAR_STEP has correct type.
4186
4187 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4188
4189 * c-decl.c: Adjust.
4190
4191 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4192
4193 * c-parser.c (c_parser_omp_for_loop): For
4194 #pragma omp parallel for simd move lastprivate clause from parallel
4195 to for rather than simd.
4196
4197 2014-06-23 Marek Polacek <polacek@redhat.com>
4198
4199 * c-typeck.c (parser_build_binary_op): Don't call
4200 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4201
4202 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4203
4204 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4205 * c-decl.c (merge_decls): Likewise.
4206
4207 2014-06-09 Marek Polacek <polacek@redhat.com>
4208
4209 PR c/36446
4210 * c-typeck.c (error_init): Call inform instead of error_at.
4211 (pedwarn_init): Call inform instead of pedwarn.
4212 (warning_init): Call inform instead of warning_at.
4213
4214 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4215
4216 * c-decl.c (merge_decls): Use set_decl_section_name.
4217 (duplicate_decls): Remove node if it exists.
4218
4219 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4220
4221 PR c/53119
4222 * c-typeck.c (push_init_level, process_init_element,
4223 pop_init_level): Correct check for zero initialization, move
4224 missing brace warning to respect zero initialization.
4225
4226 2014-06-05 Marek Polacek <polacek@redhat.com>
4227
4228 PR c/56724
4229 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4230
4231 2014-06-05 Marek Polacek <polacek@redhat.com>
4232
4233 PR c/49706
4234 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4235 on the left hand side operand of a comparison.
4236
4237 2014-06-05 Marek Polacek <polacek@redhat.com>
4238
4239 PR c/48062
4240 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4241 Print note only if the warning was printed.
4242
4243 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4244
4245 PR c/58942
4246 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4247 with a pointer.
4248
4249 2014-06-03 Marek Polacek <polacek@redhat.com>
4250
4251 PR c/60439
4252 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4253 c_start_case.
4254 * c-tree.h (c_start_case): Update.
4255 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4256 switch condition has boolean value.
4257
4258 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4259
4260 * c-decl.c: Include builtins.h.
4261 * c-parser.c: Likewise.
4262
4263 2014-05-27 Marek Polacek <polacek@redhat.com>
4264
4265 PR c/56724
4266 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4267 error and warning calls to error_at and warning_at. Pass location of
4268 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4269 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4270 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4271
4272 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4273
4274 PR c/61191
4275 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4276 function parameters.
4277
4278 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4279
4280 * c-decl.c (merge_decls): Preserve symtab node pointers.
4281 (duplicate_decls): Free new decl.
4282
4283 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4284
4285 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4286 initialization.
4287
4288 * c-parser.c (c_parser_omp_target): Return bool values.
4289
4290 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4291
4292 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4293 num_teams_loc variable to num_thread_limit_loc.
4294
4295 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4296
4297 * c-array-notation.c (expand_array_notations): Use void_node
4298 instead of void_zero_node.
4299
4300 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4301
4302 * c-decl.c (finish_struct): Adjust.
4303 (finish_enum): Likewise.
4304 (bind): Adjust.
4305 (record_inline_static): Likewise.
4306 (push_scope): Likewise.
4307 (make_label): Likewise.
4308 (lookup_label_for_goto): Likewise.
4309 (finish_struct): Likewise.
4310 (finish_enum): Likewise.
4311 (store_parm_decls): Likewise.
4312 (c_push_function_context): Likewise.
4313 * c-lang.h: Remove usage of variable_size gty attribute.
4314 * c-parser.c (c_parse_init): Adjust.
4315 (c_parse_file): Likewise.
4316
4317 2014-05-13 Marek Polacek <polacek@redhat.com>
4318
4319 PR c/61162
4320 * c-typeck.c (convert_for_assignment): Pass location to
4321 WARN_FOR_ASSIGNMENT instead of input_location.
4322
4323 2014-05-10 Marek Polacek <polacek@redhat.com>
4324
4325 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4326 maybe_warn_string_init.
4327 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4328 maybe_warn_string_init.
4329 * c-tree.h (maybe_warn_string_init): Update declaration.
4330 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4331 Call pedwarn_init with loc instead of with input_location.
4332 (digest_init): Pass init_loc to maybe_warn_string_init.
4333 (pop_init_level): Call pedwarn_init with loc instead of with
4334 input_location.
4335 (set_init_index): Likewise.
4336 (process_init_element): Likewise.
4337
4338 2014-05-09 Marek Polacek <polacek@redhat.com>
4339
4340 PR c/61096
4341 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4342 (c_parser_initelt): Pass location to set_init_label. Pass array index
4343 location to set_init_index.
4344 * c-tree.h (push_init_level): Update declaration.
4345 (pop_init_level): Likewise.
4346 (set_init_index): Likewise.
4347 (set_init_label): Likewise.
4348 * c-typeck.c (error_init): Add location parameter. Call error_at
4349 instead of error.
4350 (digest_init): Pass init_loc to error_init.
4351 (really_start_incremental_init):
4352 (push_init_level): Add location parameter. Pass loc to pop_init_level
4353 and error_init.
4354 (pop_init_level): Likewise.
4355 (set_designator): Add location parameter. Pass loc to pop_init_level,
4356 push_init_level, and error_init.
4357 (set_init_index): Add location parameter. Pass loc to error_init and
4358 set_designator.
4359 (set_init_label): Likewise.
4360 (output_init_element): Pass loc to error_init.
4361 (process_init_element): Pass loc to error_init, pop_init_level,
4362 pedwarn_init, and push_init_level.
4363
4364 2014-05-09 Marek Polacek <polacek@redhat.com>
4365
4366 PR c/50459
4367 * c-parser.c (c_parser_attributes): Parse the arguments as an
4368 expression-list if the attribute takes identifier.
4369
4370 2014-05-08 Marek Polacek <polacek@redhat.com>
4371
4372 PR c/61053
4373 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4374 TYPE_ALIGN_UNIT.
4375
4376 2014-05-08 Marek Polacek <polacek@redhat.com>
4377
4378 PR c/61077
4379 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4380 of main.
4381
4382 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4383 Mike Stump <mikestump@comcast.net>
4384 Richard Sandiford <rdsandiford@googlemail.com>
4385
4386 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4387 (finish_enum): Use wide-int interfaces.
4388 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4389 * c-typeck.c (build_c_cast): Likewise.
4390 (set_nonincremental_init_from_string): Likewise.
4391 (c_tree_equal): Likewise.
4392
4393 2014-05-02 Marek Polacek <polacek@redhat.com>
4394
4395 PR c/25801
4396 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4397 Return size_one_node when the type is not complete.
4398 (pointer_diff): Remove comment.
4399 (build_unary_op): Improve error messages.
4400
4401 2014-05-02 Marek Polacek <polacek@redhat.com>
4402
4403 * c-typeck.c (c_finish_return): Separate warning_at calls.
4404
4405 2014-05-02 Marek Polacek <polacek@redhat.com>
4406
4407 * c-tree.h (error_init): Remove declaration.
4408 (pedwarn_init): Likewise.
4409 * c-typeck.c (error_init): Make static and move above.
4410 (pedwarn_init): Likewise.
4411 (warning_init): Move above.
4412 (maybe_warn_string_init): Likewise.
4413
4414 2014-05-01 Jeff Law <law@redhat.com>
4415
4416 Revert:
4417
4418 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4419 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4420 avoid goto.
4421
4422 2014-05-02 Marek Polacek <polacek@redhat.com>
4423
4424 PR c/60784
4425 * c-typeck.c (push_init_level): Set constructor_designated to
4426 p->designated for structures.
4427
4428 2014-05-01 Marek Polacek <polacek@redhat.com>
4429
4430 PR c/60915
4431 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4432 function-definition has an attribute after the declarator.
4433
4434 2014-05-01 Marek Polacek <polacek@redhat.com>
4435
4436 PR c/60257
4437 * c-typeck.c (warning_init): Add location_t parameter. Call
4438 warning_at instead of warning.
4439 (push_init_level): Pass input_location to warning_init.
4440 (add_pending_init): Add location_t parameter. Pass loc to
4441 warning_init.
4442 (set_nonincremental_init): Pass input_location to add_pending_init.
4443 (set_nonincremental_init_from_string): Likewise.
4444 (output_init_element): Pass loc to warning_init and to
4445 add_pending_init.
4446
4447 2014-05-01 Marek Polacek <polacek@redhat.com>
4448
4449 PR c/43395
4450 * c-typeck.c (c_finish_return): Distinguish between label and variable
4451 when warning about returning local address.
4452
4453 2014-05-01 Marek Polacek <polacek@redhat.com>
4454
4455 PR c/29467
4456 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4457 in C89 mode.
4458
4459 2014-05-01 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/43245
4462 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4463 instead of 0 to WARN_FOR_QUALIFIERS.
4464
4465 2014-05-01 Marek Polacek <polacek@redhat.com>
4466
4467 PR c/56989
4468 * c-typeck.c (default_conversion): Use better location for
4469 error call.
4470
4471 2014-04-30 Marek Polacek <polacek@redhat.com>
4472
4473 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4474 also when SANITIZE_FLOAT_DIVIDE is on.
4475
4476 2014-04-30 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/60139
4479 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4480 and pedwarn_init. Use loc insted of input_location.
4481
4482 2014-04-30 Marek Polacek <polacek@redhat.com>
4483
4484 PR c/60351
4485 * c-typeck.c (build_binary_op): Use location when warning about
4486 shift count.
4487
4488 2014-04-25 Marek Polacek <polacek@redhat.com>
4489
4490 PR c/18079
4491 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4492 always_inline/noinline and hot/cold attributes.
4493
4494 2014-04-25 Marek Polacek <polacek@redhat.com>
4495
4496 PR c/60114
4497 * c-parser.c (c_parser_initelt): Pass input_location to
4498 process_init_element.
4499 (c_parser_initval): Pass loc to process_init_element.
4500 * c-tree.h (process_init_element): Adjust declaration.
4501 * c-typeck.c (push_init_level): Pass input_location to
4502 process_init_element.
4503 (pop_init_level): Likewise.
4504 (set_designator): Likewise.
4505 (output_init_element): Add location_t parameter. Pass loc to
4506 digest_init.
4507 (output_pending_init_elements): Pass input_location to
4508 output_init_element.
4509 (process_init_element): Add location_t parameter. Pass loc to
4510 output_init_element.
4511
4512 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4513
4514 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4515 atomic-clause, allow comma in between atomic-clause and
4516 seq_cst.
4517
4518 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4519
4520 PR c/59073
4521 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4522 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4523
4524 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4525
4526 PR middle-end/60469
4527 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4528 create_tmp_var instead build_decl for creating temps.
4529 (build_array_notation_expr): Likewise.
4530 (fix_conditional_array_notations_1): Likewise.
4531 (fix_array_notation_expr): Likewise.
4532 (fix_array_notation_call_expr): Likewise.
4533
4534 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4535
4536 PR c++/60689
4537 * c-tree.h (c_build_function_call_vec): New prototype.
4538 * c-typeck.c (build_function_call_vec): Don't call
4539 resolve_overloaded_builtin here.
4540 (c_build_function_call_vec): New wrapper function around
4541 build_function_call_vec. Call resolve_overloaded_builtin here.
4542 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4543 Call c_build_function_call_vec instead of build_function_call_vec.
4544 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4545 * c-decl.c (finish_decl): Likewise.
4546
4547 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4548
4549 PR c/55383
4550 * c-typeck.c: Use correct format string in cast-qual warning
4551
4552 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4553
4554 * c-decl.c (c_decl_attributes): Use
4555 lang_hooks.types.omp_mappable_type.
4556 * c-typeck.c (c_finish_omp_clauses): Likewise.
4557
4558 2014-03-06 Marek Polacek <polacek@redhat.com>
4559
4560 PR c/60197
4561 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4562 of checking tree code.
4563
4564 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4565
4566 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4567 (c_parser_parameter_declaration): Likewise.
4568
4569 2014-02-19 Marek Polacek <polacek@redhat.com>
4570
4571 PR c/60195
4572 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4573 Call mark_exp_read on exp.value.
4574 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4575 TREE_ADDRESSABLE on old instead of val.
4576 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4577
4578 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4579
4580 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4581 C_EXPR_APPEND by vec_safe_push.
4582 * c-tree.h (C_EXPR_APPEND): Remove.
4583
4584 2014-01-31 Marek Polacek <polacek@redhat.com>
4585
4586 PR c/59963
4587 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4588 build_function_call_vec.
4589 (build_function_call): Likewise.
4590 (build_atomic_assign): Likewise.
4591 (build_function_call_vec): Add arg_loc parameter. Use it.
4592 (convert_arguments): Likewise.
4593 (convert_for_assignment): Rename rhs_loc to expr_loc.
4594 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4595 (c_parser_objc_keywordexpr): Likewise.
4596 (c_parser_postfix_expression_after_primary): Call
4597 build_function_call_vec with expr_loc rather than op_loc.
4598 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4599 build_function_call_vec.
4600 (c_parser_expr_list): Add locations parameter. Fill it with locations
4601 of function arguments.
4602 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4603
4604 2014-01-30 Marek Polacek <polacek@redhat.com>
4605
4606 PR c/59940
4607 * c-typeck.c (build_function_call_vec): Use loc parameter.
4608 (convert_arguments): Add location parameter. Use it.
4609 (ep_convert_and_check): Likewise.
4610 (build_atomic_assign): Adjust convert_for_assignment call.
4611 (build_modify_expr): Likewise.
4612 (digest_init): Likewise.
4613 (c_finish_return): Likewise.
4614 (build_conditional_expr): Adjust ep_convert_and_check calls.
4615 (convert_for_assignment): Add rhs_loc parameter. Use it.
4616 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4617 calls.
4618
4619 2014-01-30 Richard Biener <rguenther@suse.de>
4620
4621 PR c/59905
4622 * c-typeck.c (build_function_call_vec): Do not replace calls
4623 to a function via an incompatible type with a runtime abort.
4624
4625 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4626
4627 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4628 flag_enable_cilkplus with flag_cilkplus.
4629 (c_parser_direct_declarator_inner): Likewise.
4630 (c_parser_attribute_any_word): Likewise.
4631 (c_parser_attributes): Likewise.
4632 (c_parser_compound_statement): Likewise.
4633 (c_parser_statement_after_labels): Likewise.
4634 (c_parser_if_statement): Likewise.
4635 (c_parser_switch_statement): Likewise.
4636 (c_parser_do_statement): Likewise.
4637 (c_parser_for_statement): Likewise.
4638 (c_parser_unary_expression): Likewise.
4639 (c_parser_postfix_expression): Likewise.
4640 (c_parser_postfix_expression_after_primary): Likewise.
4641 (c_parser_postfix_expression_after_primary): Likewise.
4642 (c_parser_omp_clause_name): Likewise.
4643 (c_finish_omp_declare_simd): Likewise.
4644 (c_parser_cilk_verify_simd): Likewise.
4645 * c-typeck.c (build_array_ref): Likewise.
4646 (build_function_call_vec): Likewise.
4647 (convert_arguments): Likewise.
4648 (build_compound_expr): Likewise.
4649 (c_finish_return): Likewise.
4650 (c_finish_if_stmt): Likewise.
4651 (c_finish_loop): Likewise.
4652 (build_binary_op): Likewise.
4653
4654 2014-01-23 Marek Polacek <polacek@redhat.com>
4655
4656 PR c/59846
4657 * c-typeck.c (parser_build_binary_op): Use location instead of
4658 input_location.
4659 (build_binary_op): Pass location to shorten_compare.
4660
4661 2014-01-23 Marek Polacek <polacek@redhat.com>
4662
4663 PR c/58346
4664 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4665 an empty aggregate.
4666
4667 2014-01-23 Marek Polacek <polacek@redhat.com>
4668
4669 PR c/59871
4670 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4671 of a comma expression.
4672 (emit_side_effect_warnings): Likewise.
4673
4674 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4675
4676 PR c/59825
4677 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4678 function to use walk_tree and moved a lot of its functionality to
4679 expand_array_notations.
4680 (expand_array_notations): New function.
4681
4682 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4683
4684 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4685 attribute an attribute without value.
4686
4687 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4688
4689 PR middle-end/58809
4690 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4691 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4692
4693 2014-01-22 Marek Polacek <polacek@redhat.com>
4694
4695 PR c/59891
4696 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4697 of remove_c_maybe_const_expr on op1 and op2.
4698
4699 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4700
4701 PR c/58943
4702 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4703 effects, preevaluate rhs using SAVE_EXPR first.
4704
4705 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4706
4707 PR c++/59631
4708 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4709 statements with if-elseif statements.
4710
4711 2014-01-06 Marek Polacek <polacek@redhat.com>
4712
4713 PR c/57773
4714 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4715 defined bit-field types only in ISO C.
4716
4717 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4718
4719 Update copyright years
4720
4721 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4722
4723 * c-array-notation.c: Use the standard form for the copyright notice.
4724
4725 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4726
4727 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4728 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4729 field in parser is not empty. If not-empty, call the function
4730 c_parser_finish_omp_declare_simd.
4731 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4732 between SIMD-enabled functions and #pragma simd. Added new parameter.
4733 (c_parser_cilk_all_clauses): Modified the usage of the function
4734 c_parser_cilk_clause_vectorlength as mentioned above.
4735 (c_parser_cilk_simd_fn_vector_attrs): New function.
4736 (c_finish_cilk_simd_fn_tokens): Likewise.
4737 (is_cilkplus_vector_p): Likewise.
4738 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4739 "nomask," and "mask" strings in clause name.
4740 (c_parser_omp_all_clauses): Added 3 new case statements:
4741 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4742 PRAGMA_CILK_CLAUSE_NOMASK.
4743 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4744 check for vector attribute and if so call the function
4745 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4746 called the function c_finish_cilk_simd_fn_tokens.
4747 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4748 parser field is non-empty. If so, parse them as you would parse
4749 the omp declare simd pragma.
4750 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4751 Added a check when step is a parameter and flag it as error.
4752 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4753 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4754 pragma_omp_clause.
4755
4756 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4757
4758 * c-parser.c (c_parser_omp_parallel): Fix description.
4759
4760 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4761
4762 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4763 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4764 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4765 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4766
4767 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4768
4769 PR c/52023
4770 * c-parser.c (c_parser_alignas_specifier): Use
4771 c_sizeof_or_alignof_type instead of c_alignof.
4772 (c_parser_alignof_expression): Likewise, with min_alignof
4773 parameter depending on alignof spelling used.
4774
4775 2013-12-04 Marek Polacek <polacek@redhat.com>
4776
4777 PR c/54113
4778 * c-decl.c (start_function): Don't warn for missing prototype for
4779 inline functions.
4780
4781 2013-12-03 Marek Polacek <polacek@redhat.com>
4782
4783 PR c/59351
4784 * c-decl.c (build_compound_literal): Allow compound literals with
4785 empty initial value.
4786
4787 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4788
4789 PR c/58235
4790 * c-typeck.c (build_modify_expr): Diagnose assignment to
4791 expression with array type.
4792
4793 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4794
4795 PR c/42262
4796 * c-typeck.c (process_init_element): Do not treat a string as
4797 initializing a whole array when used with a designator for an
4798 individual element.
4799
4800 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4801
4802 PR c/57574
4803 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4804 an inline function following a static declaration.
4805
4806 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4807
4808 PR c/59310
4809 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4810 to p_name before calling c_parser_omp_teams instead of after.
4811 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4812 argument. Remove unused p_name variable.
4813
4814 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4815 Jakub Jelinek <jakub@redhat.com>
4816
4817 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4818 external_scope is NULL.
4819
4820 2013-11-27 Tom de Vries <tom@codesourcery.com>
4821 Marc Glisse <marc.glisse@inria.fr>
4822
4823 PR c++/59032
4824 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4825
4826 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4827
4828 * c-typeck.c: Add required include files from gimple.h.
4829
4830 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4831
4832 * c-decl.c (define_label, shadow_tag_warned)
4833 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4834 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4835 (declspecs_add_type): Remove use of in_system_header macro.
4836 * c-parser.c (c_parser_unary_expression): Likewise.
4837 * c-typeck.c (store_init_value, process_init_element)
4838 (c_start_case): Likewise.
4839
4840 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4841 macro.
4842
4843 * c-parser.c (c_parser_set_source_position_from_token): Remove
4844 reference to in_system_header from comment.
4845
4846 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4847
4848 * c-decl.c (grokdeclarator): Update comment to refer to
4849 tree_to_[su]hwi rather than tree_low_cst.
4850
4851 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4852
4853 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4854 tree_to_uhwi throughout.
4855
4856 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4857
4858 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4859 throughout.
4860
4861 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4862
4863 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4864 throughout.
4865
4866 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4867
4868 * c-parser.c (c_parser_cilk_simd): New.
4869 (c_parser_cilk_verify_simd): New.
4870 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4871 (c_parser_omp_for_loop): Add case for NE_EXPR.
4872 Set c_break_label for CILK_SIMD.
4873 (c_parser_cilk_clause_vectorlength): New.
4874 (c_parser_cilk_clause_linear): New.
4875 (c_parser_cilk_clause_name): New.
4876 (c_parser_cilk_all_clauses): New.
4877 * c-typeck.c (build_unary_op): Pass location argument to
4878 readonly_error.
4879 (build_modify_expr): Same.
4880 (build_asm_expr): Same.
4881 (c_finish_bc_stmt): Error on break/continue in loops.
4882
4883 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4884
4885 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4886
4887 2013-11-14 Diego Novillo <dnovillo@google.com>
4888
4889 * c-decl.c: Include print-tree.h.
4890 Include stor-layout.h.
4891 Include varasm.h.
4892 Include attribs.h.
4893 Include stringpool.h.
4894 * c-lang.c: Include fold-const.h.
4895 * c-parser.c: Include stringpool.h.
4896 Include attribs.h.
4897 Include stor-layout.h.
4898 Include varasm.h.
4899 Include trans-mem.h.
4900 * c-typeck.c: Include stor-layout.h.
4901 Include trans-mem.h.
4902 Include varasm.h.
4903 Include stmt.h.
4904
4905 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4906
4907 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4908 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4909 __auto_type.
4910 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4911 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4912 RID_AUTO_TYPE.
4913 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4914 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4915 (c_parser_declarator, c_parser_direct_declarator_inner)
4916 (c_parser_parameter_declaration, c_parser_type_name): All callers
4917 changed.
4918 (c_parser_declaration_or_fndef): Handle declarations with type
4919 determined from the initializer.
4920
4921 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4922
4923 * c-typeck.c: Include gimplify.h.
4924
4925 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4926
4927 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4928 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4929 comment.
4930 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4931 or _Thread_local as appropriate in diagnostics.
4932 (build_null_declspecs): Initialize ret->thread_gnu_p.
4933 (declspecs_add_scspec): Handle either __thread or _Thread_local
4934 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4935 pedantic. Do not disallow _Thread_local extern and _Thread_local
4936 static.
4937
4938 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4939 Andrew MacLeod <amacleod@redhat.com>
4940
4941 * c-aux-info.c (gen_type): Handle atomic qualifier.
4942 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4943 qualifiers when compating types.
4944 (shadow_tag_warned): Handle atomic_p in declspecs.
4945 (quals_from_declspecs): Likewise.
4946 (start_decl): Use c_type_promotes_to when promoting argument
4947 types.
4948 (grokdeclarator): Handle _Atomic.
4949 (get_parm_info): Diagnose any qualifier on "void" as only
4950 parameter.
4951 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4952 comparing types. Use c_type_promotes_to when promoting argument
4953 types.
4954 (finish_function): Use c_type_promotes_to when promoting argument
4955 types.
4956 (build_null_declspecs): Handle atomic_p in declspecs.
4957 (declspecs_add_qual): Handle RID_ATOMIC.
4958 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4959 (c_token_starts_declspecs): Handle RID_ATOMIC.
4960 (c_parser_declspecs): Handle atomic type specifiers and
4961 qualifiers.
4962 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4963 from types of expressions with atomic type.
4964 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4965 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4966 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4967 (c_parser_statement_after_labels, c_parser_switch_statement)
4968 (c_parser_for_statement, c_parser_expr_no_commas)
4969 (c_parser_conditional_expression, c_parser_binary_expression)
4970 (c_parser_cast_expression, c_parser_unary_expression)
4971 (c_parser_postfix_expression)
4972 (c_parser_postfix_expression_after_primary, c_parser_expression):
4973 Use convert_lvalue_to_rvalue.
4974 (c_parser_expression_conv, c_parser_expr_list): Document
4975 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4976 (c_parser_objc_synchronized_statement): Use
4977 convert_lvalue_to_rvalue.
4978 (c_parser_objc_selector): Handle RID_ATOMIC.
4979 (c_parser_objc_receiver, c_parser_array_notation): Use
4980 convert_lvalue_to_rvalue.
4981 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4982 _Atomic (type-name).
4983 (struct c_declspecs): Add atomic_p field.
4984 (convert_lvalue_to_rvalue): Declare.
4985 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4986 corresponding atomic types.
4987 (qualify_type): Don't add _Atomic qualifiers from second argument.
4988 (comp_target_types): Do not allow _Atomic mismatches.
4989 (type_lists_compatible_p): Do not remove atomic qualifiers when
4990 comparing types.
4991 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4992 (build_atomic_assign): New functions.
4993 (build_unary_op): Use build_atomic_assign for atomic increment and
4994 decrement.
4995 (build_conditional_expr): Do not treat _Atomic void as a qualified
4996 version of void.
4997 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4998 (find_anonymous_field_with_type, convert_to_anonymous_field)
4999 (convert_for_assignment): Do not remove atomic qualifiers when
5000 comparing types.
5001 (digest_init): Do not accept initialization of arrays of atomic
5002 elements by string constants.
5003 (build_asm_expr): Use convert_lvalue_to_rvalue.
5004 (build_binary_op): Do not treat _Atomic void as a qualified
5005 version of void.
5006
5007 2013-11-06 DJ Delorie <dj@redhat.com>
5008
5009 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5010 both explicit and builtin, print the location of the explicit one.
5011
5012 2013-11-05 Tobias Burnus <burnus@net-b.de>
5013
5014 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5015 c_parser_omp_distribute, c_parser_omp_teams,
5016 c_parser_omp_target, c_parser_omp_declare): Handle
5017 -fopenmp-simd.
5018
5019 2013-11-03 Marek Polacek <polacek@redhat.com>
5020
5021 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5022
5023 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5024
5025 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5026 check_dup_generic at the end, unless remove is true.
5027 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5028 remove = true;.
5029 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5030
5031 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5032
5033 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5034 with decl that is not pointer nor array.
5035
5036 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5037
5038 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5039 a spawning function is found.
5040 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5041 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5042 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5043 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5044 case.
5045 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5046 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5047 expr.
5048 (c_finish_return): Added a check to reject _Cilk_spawn in return
5049 expression.
5050 (build_cilk_spawn): New function.
5051 (build_cilk_sync): Likewise.
5052 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5053
5054 2013-10-27 Tobias Burnus <burnus@net-b.de>
5055
5056 PR other/33426
5057 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5058 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5059 (c_parser_statement_after_labels): Update calls.
5060
5061 2013-10-24 Tobias Burnus <burnus@net-b.de>
5062
5063 PR other/33426
5064 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5065 Handle PRAGMA_IVDEP.
5066 (c_parser_statement_after_labels): Update call.
5067
5068 2013-10-24 Marek Polacek <polacek@redhat.com>
5069
5070 * c-parser.c (c_parser_struct_declaration): Add a comment.
5071 (c_parser_declarator): Don't allow _Alignas here.
5072
5073 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5074
5075 * c-parser.c: Include omp-low.h.
5076 * c-typeck.c: Likewise.
5077
5078 2013-10-17 Marek Polacek <polacek@redhat.com>
5079
5080 PR c/58267
5081 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5082 Document syntax of the array-declarator.
5083 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5084 are not permitted.
5085 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5086 (c_parser_struct_declaration): Likewise.
5087 (c_parser_declarator): Likewise.
5088 (c_parser_direct_declarator_inner): Likewise.
5089 (c_parser_parameter_declaration): Likewise.
5090 (c_parser_type_name): Likewise.
5091
5092 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5093
5094 * c-lang.h (current_omp_declare_target_attribute): New extern
5095 decl.
5096 * c-parser.c: Include c-lang.h.
5097 (struct c_parser): Change tokens to c_token *.
5098 Add tokens_buf field. Change tokens_avail type to unsigned int.
5099 (c_parser_consume_token): If parser->tokens isn't
5100 &parser->tokens_buf[0], increment parser->tokens.
5101 (c_parser_consume_pragma): Likewise.
5102 (enum pragma_context): Add pragma_struct and pragma_param.
5103 (c_parser_external_declaration): Adjust
5104 c_parser_declaration_or_fndef caller.
5105 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5106 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5107 Adjust recursive call.
5108 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5109 of pragma_external.
5110 (c_parser_parameter_declaration): Use pragma_param instead of
5111 pragma_external.
5112 (c_parser_compound_statement_nostart, c_parser_label,
5113 c_parser_for_statement): Adjust
5114 c_parser_declaration_or_fndef callers.
5115 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5116 it through to c_parser_conditional_expression.
5117 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5118 pass it through to c_parser_binary_expression. Adjust recursive
5119 call.
5120 (c_parser_binary_expression): Remove prec argument, add
5121 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5122 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5123 binop matches it, use build2 instead of parser_build_binary_op.
5124 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5125 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5126 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5127 Handle pragma_struct and pragma_param the same as pragma_external.
5128 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5129 (c_parser_omp_variable_list): Parse array sections for
5130 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5131 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5132 (c_parser_omp_clause_reduction): Handle user defined reductions.
5133 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5134 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5135 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5136 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5137 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5138 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5139 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5140 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5141 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5142 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5143 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5144 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5145 (c_parser_omp_for_loop): Add CODE argument, pass it through
5146 to c_finish_omp_for. Change last argument to cclauses,
5147 and adjust uses to grab parallel clauses from the array of all
5148 the split clauses. Adjust c_parser_binary_expression,
5149 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5150 (omp_split_clauses): New function.
5151 (c_parser_omp_simd): New function.
5152 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5153 Allow the function to be called also when parsing combined constructs,
5154 and call c_parser_omp_simd when parsing for simd.
5155 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5156 #pragma omp section, require exactly one structured-block instead of
5157 sequence of statements.
5158 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5159 Allow the function to be called also when parsing combined constructs.
5160 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5161 Allow the function to be called also when parsing combined
5162 constructs.
5163 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5164 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5165 c_parser_omp_teams, c_parser_omp_target_data,
5166 c_parser_omp_target_update, c_parser_omp_target,
5167 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5168 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5169 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5170 (c_parser_omp_construct): Add p_name and mask vars. Handle
5171 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5172 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5173 and c_parser_omp_sections callers.
5174 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5175 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5176 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5177 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5178 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5179 OMP_CLAUSE_DEPEND.
5180 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5181 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5182 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5183 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5184 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5185 * c-typeck.c: Include tree-inline.h.
5186 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5187 handle_omp_array_sections_1, handle_omp_array_sections,
5188 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5189 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5190 user defined reductions.
5191 (c_tree_equal): New function.
5192 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5193 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5194 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5195 c_check_omp_declare_reduction_r): New prototypes.
5196 * c-decl.c (current_omp_declare_target_attribute): New variable.
5197 (c_decl_attributes): New function.
5198 (start_decl, start_function): Use it instead of decl_attributes.
5199 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5200 c_omp_reduction_decl, c_omp_reduction_lookup,
5201 c_check_omp_declare_reduction_r): New functions.
5202
5203 2013-09-25 Tom Tromey <tromey@redhat.com>
5204
5205 * Make-lang.in (c/gccspec.o): Remove.
5206 (CFLAGS-c/gccspec.o): New variable.
5207 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5208 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5209 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5210
5211 2013-09-25 Tom Tromey <tromey@redhat.com>
5212
5213 * Make-lang.in (c/gccspec.o): Don't use subshell.
5214
5215 2013-09-18 Marek Polacek <polacek@redhat.com>
5216
5217 PR sanitize/58443
5218 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5219 Remove unnecessary check.
5220
5221 2013-09-18 Marek Polacek <polacek@redhat.com>
5222
5223 PR sanitizer/58411
5224 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5225 no_sanitize_undefined attribute.
5226
5227 2013-09-13 Kai Tietz <ktietz@redhat.com>
5228
5229 PR target/57848
5230 * c-decl.c (c_builtin_function_ext_scope): Remove
5231 wrong assumption that it is never called on prexisting
5232 symbol.
5233
5234 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5235
5236 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5237
5238 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5239
5240 * c-objc-common.c (c_tree_printer): Tidy.
5241
5242 2013-08-30 Marek Polacek <polacek@redhat.com>
5243
5244 * c-typeck.c (build_binary_op): Add division by zero and shift
5245 instrumentation.
5246
5247 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5248 Joseph Myers <joseph@codesourcery.com>
5249
5250 PR c/35649
5251 * c-typeck.c (c_common_type): Prefer double_type_node over
5252 other REAL_TYPE types with the same precision.
5253 (convert_arguments): Likewise.
5254
5255 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5256
5257 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5258 (c_initialize_diagnostics): Call a destructor for the early printer.
5259
5260 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5261
5262 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5263 printer initialization.
5264
5265 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5266
5267 PR c/57490
5268 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5269 check for truth values.
5270 (expand_array_notation_exprs): Added truth values case. Removed an
5271 unwanted else. Added for-loop to walk through subtrees in default
5272 case.
5273
5274 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5275
5276 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5277
5278 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5279
5280 * c-parser.c (struct c_generic_association): Fix typo.
5281
5282 2013-07-23 Tom Tromey <tromey@redhat.com>
5283 Joseph Myers <joseph@codesourcery.com>
5284
5285 * c-parser.c (struct c_generic_association): New.
5286 (c_generic_association_d): New typedef.
5287 (c_parser_generic_selection): New function.
5288 (c_parser_postfix_expression): Handle RID_GENERIC.
5289
5290 2013-07-13 Jason Merrill <jason@redhat.com>
5291
5292 PR c++/57793
5293 * c-decl.c (finish_struct): Check for too-large class.
5294
5295 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5296
5297 PR c/57821
5298 * c-typeck.c (set_init_index): When folding, check for index overflow.
5299
5300 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5301
5302 * c-parser.c (c_parser_array_notation): Removed rejection of array
5303 notations in an array of function pointers.
5304
5305 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5306
5307 * c-array-notation.c (make_triplet_val_inv): New function.
5308 (create_cmp_incr): Likewise.
5309 (create_array_refs): Likewise.
5310 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5311 Also modularized common parts between functions and called the function.
5312 (build_array_notation_expr): Likewise.
5313 (fix_conditional_array_notations_1): Likewise.
5314 (fix_array_notation_expr): Likewise.
5315 (fix_array_notation_call_expr): Likewise.
5316
5317 2013-06-18 Marek Polacek <polacek@redhat.com>
5318
5319 PR c/57630
5320 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5321
5322 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5323
5324 * c-array-notation.c (build_array_notation_expr): Reject array notation
5325 mismatch between LHS and RHS even inside a call_expr. Also, removed
5326 a couple while statements that were dead code.
5327
5328 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5329
5330 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5331 excessive precision expressions in function parameters. Also removed
5332 couple unwanted while statements.
5333
5334 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5335
5336 * c-array-notation.c (expand_array_notation_exprs): Added
5337 ARRAY_NOTATION_REF case.
5338
5339 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5340
5341 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5342 function to c-family/array-notation-common.c.
5343 (is_cilkplus_reduce_builtin): Likewise.
5344 (find_rank): Likewise.
5345 (extract_array_notation_exprs): Likewise.
5346 (replace_array_notations): Likewise.
5347 (find_inv_trees): Likewise.
5348 (replace_inv_trees): Likewise.
5349 (contains_array_notation_expr): Likewise.
5350 (find_correct_array_notation_type): Likewise.
5351 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5352 (struct inv_list): Moved this to c-family/array-notation-common.c.
5353 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5354
5355 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5356
5357 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5358 reduction functions outside the for-loop. Added a check if the fundecl
5359 is non-NULL. Finally, removed an unwanted if-statement, and made the
5360 body unconditional.
5361
5362 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5363
5364 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5365 condition of the if-statement matches the rank of else-block and then-
5366 block when array notations are used.
5367 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5368 expression after the entire function body is parsed.
5369 (c_parser_expr_no_commas): Delayed creating array notation expressions
5370 to the end of function parsing.
5371 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5372 whole if-statement instead of just the condition.
5373 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5374
5375 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5376
5377 PR c/57474
5378 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5379 array to NULL_TREE if they are unused. Also added a check for the
5380 field to be NULL before its fields are used in future.
5381
5382 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5383
5384 PR bootstrap/57450
5385 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5386 (build_array_notation_expr): Likewise.
5387
5388 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5389
5390 * c-typeck.c (build_array_ref): Added a check to see if array's
5391 index is greater than one. If true, then emit an error.
5392 (build_function_call_vec): Exclude error reporting and checking
5393 for builtin array-notation functions.
5394 (convert_arguments): Likewise.
5395 (c_finish_return): Added a check for array notations as a return
5396 expression. If true, then emit an error.
5397 (c_finish_loop): Added a check for array notations in a loop
5398 condition. If true then emit an error.
5399 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5400 (build_binary_op): Added a check for array notation expr inside
5401 op1 and op0. If present, we call another function to find correct
5402 type.
5403 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5404 * c-parser.c (c_parser_compound_statement): Check if array
5405 notation code is used in tree, if so, then transform them into
5406 appropriate C code.
5407 (c_parser_expr_no_commas): Check if array notation is used in LHS
5408 or RHS, if so, then build array notation expression instead of
5409 regular modify.
5410 (c_parser_postfix_expression_after_primary): Added a check for
5411 colon(s) after square braces, if so then handle it like an array
5412 notation. Also, break up array notations in unary op if found.
5413 (c_parser_direct_declarator_inner): Added a check for array
5414 notation.
5415 (c_parser_compound_statement): Added a check for array notation in
5416 a stmt. If one is present, then expand array notation expr.
5417 (c_parser_if_statement): Likewise.
5418 (c_parser_switch_statement): Added a check for array notations in
5419 a switch statement's condition. If true, then output an error.
5420 (c_parser_while_statement): Similarly, but for a while.
5421 (c_parser_do_statement): Similarly, but for a do-while.
5422 (c_parser_for_statement): Similarly, but for a for-loop.
5423 (c_parser_unary_expression): Check if array notation is used in a
5424 pre-increment or pre-decrement expression. If true, then expand
5425 them.
5426 (c_parser_array_notation): New function.
5427 * c-array-notation.c: New file.
5428 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5429
5430 2013-05-23 Mike Stump <mikestump@comcast.net>
5431
5432 * c-typeck.c (convert_for_assignment): Handle references to memory
5433 spaces better.
5434
5435 2013-05-16 Jason Merrill <jason@redhat.com>
5436
5437 * Make-lang.in (cc1$(exeext)): Use link mutex.
5438
5439 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5440
5441 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5442 to simply use OPT_Wpointer_arith.
5443 (build_unary_op): Likewise.
5444
5445 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5446
5447 PR c/19449
5448 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5449 argument. If set, or it temporarily for parsing of the first
5450 argument into force_folding_builtin_constant_p.
5451 (c_parser_postfix_expression): Adjust callers.
5452
5453 2013-03-21 Richard Biener <rguenther@suse.de>
5454
5455 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5456 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5457
5458 2013-02-12 Marek Polacek <polacek@redhat.com>
5459
5460 PR c/44938
5461 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5462 origtypes to NULL.
5463
5464 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5465
5466 PR c/56078
5467 * c-typeck.c (set_nonincremental_init_from_string): If
5468 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5469 returned false.
5470 (process_init_element): Likewise.
5471
5472 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5473
5474 PR c++/55619
5475 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5476 argument, don't call default_function_array_conversion
5477 nor c_fully_fold here.
5478 (c_parser_asm_statement): Adjust callers.
5479 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5480 and outputs here, and call default_function_array_conversion
5481 on inputs that don't need to be addressable.
5482
5483 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5484
5485 PR c/39464
5486 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5487 warning require that both c_common_unsigned_type as well as
5488 c_common_signed_type is the same for both mvl and mvr types.
5489
5490 2012-11-16 Diego Novillo <dnovillo@google.com>
5491
5492 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5493
5494 * c-common.c: Use new vec API in vec.h.
5495 * c-common.h: Likewise.
5496 * c-gimplify.c: Likewise.
5497 * c-pragma.c: Likewise.
5498 * c-pretty-print.c: Likewise.
5499 * c-pretty-print.h: Likewise.
5500 * c-semantics.c: Likewise.
5501 * c-decl.c: Likewise.
5502 * c-parser.c: Likewise.
5503 * c-tree.h: Likewise.
5504 * c-typeck.c: Likewise.
5505
5506 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5507
5508 PR c++/54930
5509 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5510
5511 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5512
5513 PR c/53066
5514 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5515 shadows a function, unless the variable is a function or a
5516 pointer-to-function.
5517
5518 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5519
5520 PR c/54381
5521 * c-parser.c (struct c_tree_loc_pair): Removed.
5522 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5523 add location_t * and tree * arguments, fill in array of 3
5524 sizeof_arg trees and corresponding locs.
5525 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5526 c_parser_expr_list callers.
5527 (c_parser_postfix_expression_after_primary): Likewise. Pass
5528 array of 3 sizeof_arg trees and locs (corresponding to first
5529 3 arguments) to sizeof_pointer_memaccess_warning.
5530
5531 2012-10-09 Lawrence Crowl <crowl@google.com>
5532
5533 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5534 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5535 hash table.
5536
5537 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5538
5539 PR c++/54194
5540 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5541 call.
5542
5543 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5544
5545 PR c++/54427
5546 * c-typeck.c: Include c-common.h.
5547 (enum stv_conv): Moved to c-common.h.
5548 (scalar_to_vector): Moved to c-common.c.
5549 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5550 * Make-lang.in: c-typeck.c depends on c-common.h.
5551
5552 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5553
5554 * c-decl.c (c_write_global_declarations): Fix handling of
5555 -fdump-ada-spec*.
5556
5557 2012-09-30 Sharad Singhai <singhai@google.com>
5558
5559 * c-decl.c (c_write_global_declarations): Use a different method
5560 to determine if the dump has ben initialized.
5561
5562 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5563
5564 PR c/54552
5565 * c-typeck.c (c_cast_expr): When casting to a type requiring
5566 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5567 c_fully_fold first.
5568
5569 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5570
5571 PR c/54103
5572 * c-typeck.c (build_unary_op): Pass original argument of
5573 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5574 any C_MAYBE_CONST_EXPR, if it has integer operands.
5575 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5576 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5577 to c_objc_common_truthvalue_conversion, then remove any
5578 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5579 c_objc_common_truthvalue_conversion not
5580 c_common_truthvalue_conversion.
5581 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5582 call note_integer_operands for arguments with integer operands
5583 that are not integer constants.
5584
5585 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5586
5587 PR c/54559
5588 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5589 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5590
5591 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5592
5593 PR c/54428
5594 * c-convert.c (convert): Don't call fold_convert_loc if
5595 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5596 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5597 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5598
5599 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5600
5601 PR c/54355
5602 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5603 for nested and empty_ok arguments in the call to
5604 c_parser_declaration_or_fndef.
5605
5606 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5607
5608 * c-tree.h (c_last_sizeof_arg): Declare.
5609 * c-parser.c (struct c_tree_loc_pair): New type.
5610 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5611 non-NULL.
5612 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5613 (c_parser_postfix_expression_after_primary): Likewise. Call
5614 sizeof_pointer_memaccess_warning if needed.
5615 (sizeof_ptr_memacc_comptypes): New function.
5616 * c-typeck.c (c_last_sizeof_arg): New global variable.
5617 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5618
5619 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5620
5621 * c-lang.h (lang_decl): Add variable_size GTY option.
5622
5623 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5624
5625 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5626 * Make-lang.in: Fix dependencies.
5627
5628 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5629
5630 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5631 and add language Makefile hooks.
5632 * config-lang.in: New file.
5633 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5634 add the required "normal" config-lang.in rules.
5635 * c-lang.h: Moved from gcc/ to here.
5636 * c-tree.h: Likewise.
5637 * c-objc-common.c: Likewise.
5638 * c-objc-common.h: Likewise.
5639 * c-typeck.c: Likewise.
5640 * c-convert.c: Likewise.
5641 * c-lang.c: Likewise.
5642 * c-aux-info.c: Likewise.
5643 * c-errors.c: Likewise.
5644 * gccspec.c: Likewise.
5645 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5646 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5647 \f
5648 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5649
5650 Copying and distribution of this file, with or without modification,
5651 are permitted in any medium without royalty provided the copyright
5652 notice and this notice are preserved.