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