1 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3 * c-decl.c: Replace "source_location" with "location_t".
5 * c-typeck.c: Likewise.
6 * gimple-parser.c: Likewise.
8 2018-11-09 Jakub Jelinek <jakub@redhat.com>
10 * c-parser.c (c_parser_omp_clause_final): Use
11 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
12 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
13 parsing instead of c_parser_paren_condition.
14 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
15 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
16 c_fully_fold instead of c_parser_condition.
17 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
18 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
19 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
20 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
21 c_parser_expr_no_commas instead of c_parser_expression.
23 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
24 reduction clause with inscan modifier.
26 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
27 clauses other than atomic_default_mem_order.
29 2018-11-08 Jakub Jelinek <jakub@redhat.com>
31 * c-parser.c: Include memmode.h.
32 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
33 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
34 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
35 task_reduction clauses.
36 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
37 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
38 section, or lvalue assignment expression.
39 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
40 (c_parser_omp_clause_lastprivate): Parse optional
41 conditional: modifier.
42 (c_parser_omp_clause_hint): Require constant integer expression rather
43 than just integer expression.
44 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
46 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
47 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
48 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
50 (c_parser_omp_clause_depend): Parse iterator modifier and handle
51 iterators. Parse mutexinoutset and depobj kinds.
52 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
54 (c_parser_omp_all_clauses): Likewise. Handle
55 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
56 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
57 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
58 default memory order from requires directive if any. Adjust
59 c_finish_omp_atomic caller.
60 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
61 (c_parser_omp_flush): Parse flush with memory-order-clause.
62 (c_parser_omp_for_loop): Allow NE_EXPR even in
63 OpenMP loops, adjust c_finish_omp_for caller.
64 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
65 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
66 Allow to be called while parsing combined parallel master.
67 Parse combined master taskloop{, simd}.
68 (c_parser_omp_parallel): Parse combined
69 parallel master{, taskloop{, simd}} constructs.
70 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
71 (OMP_TASKGROUP_CLAUSE_MASK): Define.
72 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
73 (OMP_TASKWAIT_CLAUSE_MASK): Define.
74 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
75 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
76 around teams body. Use SET_EXPR_LOCATION.
77 (c_parser_omp_target_data): Allow target data
78 with only use_device_ptr clauses.
79 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
80 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
81 (c_parser_omp_requires): New function.
82 (c_finish_taskloop_clauses): New function.
83 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
84 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
85 declaration. Disallow in_reduction clause when combined with parallel
87 (c_parser_omp_construct): Adjust c_parser_omp_master and
88 c_parser_omp_taskgroup callers.
89 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
91 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
92 like OMP_CLAUSE_REDUCTION.
93 (handle_omp_array_sections): Likewise. Call save_expr on array
94 reductions before calling build_index_type. Handle depend clauses
96 (struct c_find_omp_var_s): New type.
97 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
98 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
99 with static, runtime or auto schedule kinds. Call save_expr for whole
100 array reduction sizes. Diagnose reductions with zero sized elements
101 or variable length structures. Diagnose nogroup clause used with
102 reduction clause(s). Handle depend clause with
103 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
104 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
105 some different type for other kinds. Use build_unary_op with
106 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
107 Handle depend clauses with iterators. Remove no longer needed special
108 case that predetermined const qualified vars may be specified in
109 firstprivate clause. Complain if const qualified vars are mentioned
110 in data-sharing clauses other than firstprivate or shared. Use
111 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
112 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
113 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
114 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
116 2018-10-29 David Malcolm <dmalcolm@redhat.com>
118 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
119 logic for change to name_hint::operator bool.
120 (undeclared_variable): Likewise.
121 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
122 (c_parser_parameter_declaration): Likewise.
124 2018-10-17 Joseph Myers <joseph@codesourcery.com>
126 * c-errors.c (pedwarn_c11): New function.
127 * c-parser.c (disable_extension_diagnostics): Save
128 warn_c11_c2x_compat and set it to 0.
129 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
130 (c_parser_static_assert_declaration_no_semi): Handle
131 _Static_assert without string constant.
132 * c-tree.h (pedwarn_c11): New prototype.
134 2018-10-17 David Malcolm <dmalcolm@redhat.com>
136 * Make-lang.in (selftest-c): New.
137 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
138 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
139 from gcc/Makefile.in.
141 2018-10-02 Richard Biener <rguenther@suse.de>
143 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
145 2018-09-26 Joseph Myers <joseph@codesourcery.com>
148 * c-typeck.c (build_binary_op): Use excess precision for
149 comparisons of integers and floating-point for C11 and later.
151 2018-09-26 Martin Jambor <mjambor@suse.cz>
154 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
157 2018-09-17 David Malcolm <dmalcolm@redhat.com>
159 * c-objc-common.c (range_label_for_type_mismatch::get_text):
160 Update for new param.
161 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
164 2018-09-17 Martin Jambor <mjambor@suse.cz>
167 * c-parser.c: (warn_for_abs): New function.
168 (c_parser_postfix_expression_after_primary): Call it.
170 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
172 * c-typeck.c (digest_init): Shorten overlength strings.
174 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
176 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
178 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
180 * c-decl.c (finish_decl): Call braced_list_to_string here ...
181 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
183 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
185 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
186 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
188 2018-08-27 David Malcolm <dmalcolm@redhat.com>
191 * c-decl.c (implicitly_declare): Update call to
192 maybe_add_include_fixit to suggest overriding the location, as it
194 * c-objc-common.c (c_tree_printer): Update for conversion of
195 show_caret_p to a tri-state.
197 2018-08-27 Martin Liska <mliska@suse.cz>
199 * c-decl.c (locate_old_decl): Use new function
200 fndecl_built_in_p and remove check for FUNCTION_DECL if
202 (diagnose_mismatched_decls): Likewise.
203 (merge_decls): Likewise.
204 (warn_if_shadowing): Likewise.
205 (pushdecl): Likewise.
206 (implicitly_declare): Likewise.
207 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
208 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
209 * c-typeck.c (build_function_call_vec): Likewise.
210 (convert_arguments): Likewise.
212 2018-08-20 David Malcolm <dmalcolm@redhat.com>
215 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
216 (diagnose_mismatched_decls): Likewise, in various places.
217 (warn_if_shadowing): Likewise.
218 (implicit_decl_warning): Likewise.
219 (implicitly_declare): Likewise.
220 (undeclared_variable): Likewise.
221 (declare_label): Likewise.
222 (grokdeclarator): Likewise.
223 (start_function): Likewise.
224 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
225 (c_parser_parameter_declaration): Likewise.
226 (c_parser_binary_expression): Likewise.
227 * c-typeck.c (c_expr_sizeof_expr): Likewise.
228 (parser_build_binary_op): Likewise.
229 (build_unary_op): Likewise.
230 (error_init): Likewise.
231 (pedwarn_init): Likewise.
232 (warning_init): Likewise.
233 (convert_for_assignment): Likewise.
235 2018-08-15 David Malcolm <dmalcolm@redhat.com>
237 * c-objc-common.c: Include "gcc-rich-location.h".
238 (c_tree_printer): Move implemenation of '%T' to...
239 (print_type): ...this new function.
240 (range_label_for_type_mismatch::get_text): New function.
241 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
242 range for the various ic_argpass cases.
243 (class maybe_range_label_for_tree_type_mismatch): New class.
244 (build_binary_op): Use it when calling binary_op_error.
246 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
248 * c-decl.c (start_decl): Do not warn if variables is named as main
249 and is a local variable.
251 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
254 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
255 objects of unknown size.
257 2018-08-13 Martin Sebor <msebor@redhat.com>
259 PR tree-optimization/71625
260 * c-parser.c (c_parser_declaration_or_fndef): Call
261 braced_list_to_string.
263 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
266 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
269 2018-08-01 Martin Sebor <msebor@redhat.com>
271 PR tree-optimization/86650
272 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
273 and TREE_BLOCK (t) from within percent_K_format to this callsite.
275 2018-08-01 Jakub Jelinek <jakub@redhat.com>
278 * c-typeck.c (init_field_decl_cmp): New function.
279 (output_pending_init_elements): Use it for field comparisons
280 instead of pure bit_position comparisons.
282 2018-07-12 Jakub Jelinek <jakub@redhat.com>
284 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
285 type here, instead add "omp declare target implicit" attribute.
286 (finish_decl): Diagnose vars without mappable type here.
288 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
289 Thomas Schwinge <thomas@codesourcery.com>
290 Cesar Philippidis <cesar@codesourcery.com>
292 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
293 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
294 to their non-present_or_* counterparts. Make 'self' an alias to
295 PRAGMA_OACC_CLAUSE_HOST.
296 (c_parser_oacc_data_clause): Update GOMP mappings for
297 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
298 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
299 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
300 Remove support for present_or_* clauses.
301 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
302 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
303 (OACC_DECLARE_CLAUSE_MASK): Likewise.
304 (OACC_DATA_CLAUSE_MASK): Likewise.
305 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
306 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
307 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
308 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
309 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
311 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
313 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
314 * gimple-parser.c (c_parser_gimple_statement): Likewise.
315 (c_parser_gimple_unary_expression): Likewise.
317 2018-06-15 Jakub Jelinek <jakub@redhat.com>
320 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
321 before doing POINTER_DIFF_EXPR.
323 2018-06-07 Marek Polacek <polacek@redhat.com>
326 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
327 for loop initial declarations.
329 2018-05-30 David Pagan <dave.pagan@oracle.com>
332 * c-decl.c (grokdeclarator): Update check for return type warnings.
333 (start_function): Likewise.
334 (finish_function): Likewise.
335 * c-typeck.c (c_finish_return): Update check for return type warnings.
336 Pass OPT_Wreturn_type to pedwarn when appropriate.
338 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
340 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
343 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
345 * gimple-parser.c: Include internal-fn.h.
346 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
347 (c_parser_gimple_call_internal): New function.
348 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
349 Fix typos in comment.
351 2018-05-10 Jakub Jelinek <jakub@redhat.com>
354 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
355 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
357 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
358 fold_offsetof_1, pass argtype as TYPE to it and drop the
361 2018-05-02 David Pagan <dave.pagan@oracle.com>
364 * c-decl.c (old_style_parameter_scope): New function.
365 * c-parser.c (c_parser_postfix_expression): Check for statement
366 expressions in old-style function parameter list declarations.
367 * c-parser.h (old_style_parameter_scope): New extern declaration.
369 2018-04-25 Jakub Jelinek <jakub@redhat.com>
372 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
373 it is not TREE_STATIC.
374 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
375 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
376 its COMPOUND_LITERAL_EXPR_DECL.
378 2018-03-21 Joseph Myers <joseph@codesourcery.com>
380 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
381 where all functions return the same _FloatN or _FloatNx type,
382 treat integer types as _Float64 instead of double.
384 2018-03-21 Jakub Jelinek <jakub@redhat.com>
387 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
388 building vector comparison, diagnose it and return error_mark_node.
390 2018-03-15 Jakub Jelinek <jakub@redhat.com>
393 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
394 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
395 INTEGER_TYPE element type.
397 2018-03-13 David Pagan <dave.pagan@oracle.com>
400 * c-typeck.c (output_init_element): Ensure field initializer
401 expression is always evaluated if there are side effects.
403 2018-03-06 Jakub Jelinek <jakub@redhat.com>
406 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
407 !building_stmt_list_p ().
409 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
412 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
413 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
414 and include the BIND_EXPR in the list of things that need to be
417 2018-02-09 Nathan Sidwell <nathan@acm.org>
420 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
421 to strict_aliasing_warning.
423 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
425 * c-typeck.c (really_start_incremental_init, push_init_level,
426 set_nonincremental_init, output_init_element, process_init_element):
427 Use DECL_UNNAMED_BIT_FIELD.
429 2018-01-31 Marek Polacek <polacek@redhat.com>
432 * c-parser.c (c_parser_compound_statement_nostart): Call
433 expansion_point_location_if_in_system_header.
435 2018-01-17 David Malcolm <dmalcolm@redhat.com>
438 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
441 2018-01-13 Jakub Jelinek <jakub@redhat.com>
444 * c-tree.h (decl_constant_value_1): Add a bool argument.
445 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
446 returning a CONSTRUCTOR if it is true. Use error_operand_p.
447 (decl_constant_value): Adjust caller.
448 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
449 decl_constant_value_1 as IN_INIT. Otherwise, punt if
450 decl_constant_value returns initializer that has BLKmode or
452 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
455 Alan Hayward <alan.hayward@arm.com>
456 David Sherwood <david.sherwood@arm.com>
458 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
459 TYPE_VECTOR_SUBPARTS.
461 2018-01-03 Jakub Jelinek <jakub@redhat.com>
463 Update copyright years.
465 2018-01-01 Jakub Jelinek <jakub@redhat.com>
468 * c-parser.c (c_parser_braced_init, c_parser_initelt,
469 c_parser_conditional_expression, c_parser_cast_expression,
470 c_parser_sizeof_expression, c_parser_alignof_expression,
471 c_parser_postfix_expression, c_parser_omp_declare_reduction,
472 c_parser_transaction_expression): Use set_error () method instead
473 of setting value member to error_mark_node.
475 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
477 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
478 and _Float<N>X built-in functions.
480 2017-12-22 Jakub Jelinek <jakub@redhat.com>
483 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
484 TYPE_STUB_DECL and call rest_of_type_compilation before processing
485 incomplete vars rather than after it.
488 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
489 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
490 and consider empty ones if there are no other stmts. For
491 -Wunused-value walk all statements before the one only followed by
494 2017-12-22 Mike Stump <mikestump@comcast.net>
495 Eric Botcazou <ebotcazou@adacore.com>
497 * c-parser.c (c_parser_while_statement): Add unroll parameter and
498 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
499 (c_parser_do_statement): Likewise.
500 (c_parser_for_statement): Likewise.
501 (c_parser_statement_after_labels): Adjust calls to above.
502 (c_parse_pragma_ivdep): New static function.
503 (c_parser_pragma_unroll): Likewise.
504 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
505 <PRAGMA_UNROLL>: New case.
507 2017-12-19 Jakub Jelinek <jakub@redhat.com>
509 * c-typeck.c (comptypes_internal, function_types_compatible_p,
510 perform_integral_promotions, digest_init): Replace Yoda conditions
511 with typical order conditions.
512 * c-decl.c (check_bitfield_type_and_width): Likewise.
514 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
516 * c-typeck.c (c_safe_arg_type_equiv_p,
517 c_safe_function_type_cast_p): New function.
518 (build_c_cast): Implement -Wcast-function-type.
520 2017-12-14 Richard Biener <rguenther@suse.de>
523 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
524 like REALPART_EXPR for the behavior of whether its operand
527 2017-12-12 Marek Polacek <polacek@redhat.com>
530 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
532 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
534 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
535 * c-parser.c (add_debug_begin_stmt): New.
536 (c_parser_declaration_or_fndef): Call it.
537 (c_parser_compound_statement_nostart): Likewise.
538 (c_parser_statement_after_labels): Likewise.
539 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
541 2017-12-07 Joseph Myers <joseph@codesourcery.com>
543 * c-decl.c (build_compound_literal): Add parameter alignas_align
544 and set alignment of decl if nonzero.
545 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
546 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
548 (c_parser_struct_declaration): Update syntax comment.
549 (c_parser_type_name): Add alignas_ok argument and pass it to
551 (c_parser_cast_expression): Pass true to c_parser_type_name and
552 give error if a cast used an _Alignas specifier.
553 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
554 give error if sizeof (type-name) used an _Alignas specifier.
555 (c_parser_alignof_expression): Pass true to c_parser_type_name and
556 give error if _Alignof (type-name) used an _Alignas specifier.
557 (c_parser_postfix_expression_after_paren_type): Check specified
558 alignment for a compound literal and pass it to
559 build_compound_literal.
560 * c-parser.h (c_parser_type_name): Update prototype.
561 * c-tree.h (build_compound_literal): Update prototype.
563 2017-12-07 Martin Sebor <msebor@redhat.com>
566 * c-decl.c (c_decl_attributes): Look up existing declaration and
567 pass it to decl_attributes.
569 2017-12-06 David Malcolm <dmalcolm@redhat.com>
572 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
573 reserved for use by the implementation.
575 2017-12-06 David Malcolm <dmalcolm@redhat.com>
577 * c-decl.c: Include "c-family/c-spellcheck.h".
579 2017-12-05 Martin Liska <mliska@suse.cz>
580 Jakub Jelinek <jakub@redhat.com>
582 * c-typeck.c (pointer_diff): Add new argument and instrument
584 (build_binary_op): Similar for pointer comparison.
586 2017-12-01 Jakub Jelinek <jakub@redhat.com>
589 * c-parser.c: Include tree-iterator.h.
590 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
591 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
595 * c-tree.h (decl_constant_value_1): Declare.
596 * c-typeck.c (decl_constant_value_1): New function.
597 (decl_constant_value): Use it.
598 * c-fold.c (c_fully_fold_internal): If in_init, use
599 decl_constant_value_1 instead of decl_constant_value.
601 2017-11-30 Jakub Jelinek <jakub@redhat.com>
603 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
605 2017-11-28 Jakub Jelinek <jakub@redhat.com>
608 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
609 c_switch_covers_all_cases_p returns true.
611 2017-11-28 Julia Koval <julia.koval@intel.com>
612 Sebastian Peryt <sebastian.peryt@intel.com>
614 * Make-lang.in (c/c-array-notation.o): Remove.
615 * c-array-notation.c: Delete.
616 * c-decl.c: Remove cilkplus condition.
617 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
618 c_parser_cilk_verify_simd, c_parser_array_notation,
619 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
620 c_parser_cilk_simd_fn_vector_attrs,
621 c_finish_cilk_simd_fn_tokens): Delete.
622 (c_parser_declaration_or_fndef): Remove cilkplus condition.
623 (c_parser_direct_declarator_inner): Ditto.
624 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
625 (c_parser_attributes, c_parser_compound_statement,
626 c_parser_statement_after_labels, c_parser_if_statement,
627 c_parser_switch_statement, c_parser_while_statement,
628 c_parser_do_statement, c_parser_for_statement,
629 c_parser_unary_expression, c_parser_postfix_expression,
630 c_parser_postfix_expression_after_primary,
631 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
632 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
634 * c-typeck.c (build_array_ref, build_function_call_vec,
636 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
637 c_finish_loop, build_binary_op): Remove cilkplus support.
639 2017-11-28 Jakub Jelinek <jakub@redhat.com>
641 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
644 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
646 * Make-lang.in (c.install-plugin): Install backend import library.
648 2017-11-23 Jakub Jelinek <jakub@redhat.com>
650 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
653 2017-11-23 Mike Stump <mikestump@comcast.net>
654 Eric Botcazou <ebotcazou@adacore.com>
656 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
658 (c_parser_do_statement): Likewise.
659 (c_parser_for_statement): Likewise.
661 2017-11-22 David Malcolm <dmalcolm@redhat.com>
664 * c-objc-common.c (c_tree_printer): Convert penultimate param from
665 bool to bool *. Within '%T' handling, if showing an "aka", use
666 "quoted" param to add appropriate quoting.
668 2017-11-22 Marek Polacek <polacek@redhat.com>
673 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
675 2017-11-21 David Malcolm <dmalcolm@redhat.com>
678 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
679 earlier failed lookups.
681 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
683 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
684 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
686 2017-11-20 David Malcolm <dmalcolm@redhat.com>
689 * c-decl.c: Include "c-family/known-headers.h".
690 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
692 (class suggest_missing_header): Move to known-header.h.
693 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
694 than get_c_name_hint.
696 2017-11-20 David Malcolm <dmalcolm@redhat.com>
698 * c-decl.c (get_c_name_hint): New function.
699 (class suggest_missing_header): New class.
700 (lookup_name_fuzzy): Call get_c_name_hint and use it to
701 suggest missing headers to the user.
703 2017-11-20 David Malcolm <dmalcolm@redhat.com>
705 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
706 Include "c-family/name-hint.h"
707 (implicit_decl_warning): Convert "hint" from
708 const char * to name_hint. Pass location to
709 lookup_name_fuzzy. Suppress any deferred diagnostic if the
710 warning was not printed.
711 (undeclared_variable): Likewise for "guessed_id".
712 (lookup_name_fuzzy): Convert return type from const char *
713 to name_hint. Add location_t param.
714 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
715 Include "c-family/name-hint.h"
716 (c_parser_declaration_or_fndef): Convert "hint" from
717 const char * to name_hint. Pass location to lookup_name_fuzzy.
718 (c_parser_parameter_declaration): Likewise.
720 2017-11-19 Jakub Jelinek <jakub@redhat.com>
724 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
726 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
727 handle_omp_array_sections): Likewise.
728 (digest_init): Don't call decl_constant_value_for_optimization.
729 * c-tree.h (decl_constant_value_for_optimization): Removed.
730 * c-fold.c (c_fold_array_ref): New function.
731 (c_fully_fold_internal): Add LVAL argument, propagate it through
732 recursive calls. For VAR_P call decl_constant_value and
733 unshare if not LVAL and either optimizing or IN_INIT. Remove
734 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
735 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
736 (c_fully_fold): Add LVAL argument, pass it through to
737 c_fully_fold_internal.
738 (decl_constant_value_for_optimization): Removed.
740 2017-11-15 Joseph Myers <joseph@codesourcery.com>
743 * c-parser.c (check_tgmath_function): New function.
744 (enum tgmath_parm_kind): New enum.
745 (c_parser_postfix_expression): Handle __builtin_tgmath.
747 2017-10-31 David Malcolm <dmalcolm@redhat.com>
749 * c-decl.c (implicit_decl_warning): Update for renaming of
750 pedwarn_at_rich_loc and warning_at_rich_loc.
751 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
752 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
753 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
754 (c_parser_struct_or_union_specifier): Likewise for renaming of
756 (c_parser_parameter_declaration): Likewise for renaming of
758 * c-typeck.c (build_component_ref): Likewise.
759 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
760 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
761 (set_init_label): Likewise for renaming of error_at_rich_loc.
763 2017-10-30 Richard Biener <rguenther@suse.de>
765 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
768 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
770 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
771 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
773 2017-10-25 David Malcolm <dmalcolm@redhat.com>
776 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
779 2017-10-25 Jakub Jelinek <jakub@redhat.com>
782 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
783 newdecl to corresponding __builtin_ if any.
785 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
788 * c-decl.c (diagnose_mismatched_decls): Use
789 OPT_Wbuiltin_declaration_mismatch.
791 2017-10-12 David Malcolm <dmalcolm@redhat.com>
793 * c-parser.c (c_parser_require): Add "type_is_unique" param and
794 use it to guard calls to maybe_suggest_missing_token_insertion.
795 (c_parser_parms_list_declarator): Override default value of new
796 "type_is_unique" param to c_parser_require.
797 (c_parser_asm_statement): Likewise.
798 * c-parser.h (c_parser_require): Add "type_is_unique" param,
801 2017-10-11 Nathan Sidwell <nathan@acm.org>
803 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
805 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
807 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
808 operating on trees as wide_ints.
809 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
810 (c_tree_equal): Likewise.
812 2017-10-04 David Malcolm <dmalcolm@redhat.com>
814 * c-decl.c (push_parm_decl): Store c_parm's location into the
816 (build_c_parm): Add "loc" param and store it within the c_parm.
817 * c-parser.c (struct c_parser): Add "last_token_location" field.
818 (c_parser_consume_token): Store location of the token into the
820 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
821 when handling a FUNCTION_DECL, if it doesn't already have them.
822 (c_parser_parameter_declaration): Generate a location for the
823 parameter, and pass it to the call to build_c_parm.
824 * c-tree.h (struct c_parm): Add field "loc".
825 (build_c_parm): Add location_t param.
826 * c-typeck.c (get_fndecl_argument_location): New function.
827 (inform_for_arg): New function.
828 (convert_for_assignment): Use inform_for_arg when dealing with
831 2017-09-29 Jakub Jelinek <jakub@redhat.com>
833 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
835 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
836 don't SET_DECL_C_BIT_FIELD here.
839 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
840 instead of trying to set just TREE_READONLY manually.
842 2017-09-16 Tom de Vries <tom@codesourcery.com>
845 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
848 2017-09-15 Joseph Myers <joseph@codesourcery.com>
851 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
853 (build_conditional_expr): For C11, generate result with excess
854 precision when one argument is an integer and the other is of a
855 type using excess precision.
857 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
859 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
861 2017-09-13 Marek Polacek <polacek@redhat.com>
864 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
865 than expr.original_type.
867 2017-09-12 Nathan Sidwell <nathan@acm.org>
869 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
870 resort_sorted_fields): Moved from c-family/c-common.c.
871 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
873 2017-09-01 Joseph Myers <joseph@codesourcery.com>
876 * c-typeck.c (build_atomic_assign): Handle argument with excess
877 precision. Ensure any EXCESS_PRECISION_EXPR is present in
878 argument passed to build_binary_op and convert_for_assignment but
879 not for call to c_fully_fold.
880 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
881 Ensure build_binary_op is called with argument with original
882 semantic type. Avoid calling c_fully_fold with an
883 EXCESS_PRECISION_EXPR from build_binary_op.
885 2017-09-01 Jakub Jelinek <jakub@redhat.com>
888 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
890 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
891 Alan Hayward <alan.hayward@arm.com>
892 David Sherwood <david.sherwood@arm.com>
894 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
895 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
896 m1 and m2 to the signed equivalent of a fixed-point
899 2017-08-24 David Malcolm <dmalcolm@redhat.com>
901 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
902 than CAN_HAVE_LOCATION_P when determining whether to use the
903 location_t value within "value".
905 2017-08-21 David Malcolm <dmalcolm@redhat.com>
907 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
908 rather than peeking the location of the first token.
909 * c-tree.h (c_expr::get_location): New method.
911 2017-08-21 David Malcolm <dmalcolm@redhat.com>
913 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
914 to check_function_arguments.
916 2017-08-18 Marek Polacek <polacek@redhat.com>
918 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
921 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
924 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
925 (check_bitfield_type_and_width): Don't allow bit-field with
926 warn_if_not_aligned type.
928 2017-08-14 Martin Sebor <msebor@redhat.com>
931 * c-objc-common.c (c_objc_common_init): Handle 'G'.
933 2017-08-11 Marek Polacek <polacek@redhat.com>
936 * c-decl.c (pushtag): Only print inform if the warning was printed.
937 (grokdeclarator): Likewise.
939 2017-08-10 David Malcolm <dmalcolm@redhat.com>
941 * c-parser.c (c_parser_error): Rename to...
942 (c_parser_error_richloc): ...this, making static, and adding
943 "richloc" parameter, passing it to the c_parse_error call,
944 rather than calling c_parser_set_source_position_from_token.
945 (c_parser_error): Reintroduce, reimplementing in terms of the
946 above, converting return type from void to bool.
947 (class token_pair): New class.
948 (struct matching_paren_traits): New struct.
949 (matching_parens): New typedef.
950 (struct matching_brace_traits): New struct.
951 (matching_braces): New typedef.
952 (get_matching_symbol): New function.
953 (c_parser_require): Add param MATCHING_LOCATION, using it to
954 highlight matching "opening" tokens for missing "closing" tokens.
955 (c_parser_skip_until_found): Likewise.
956 (c_parser_static_assert_declaration_no_semi): Convert explicit
957 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
958 class matching_parens, so that the pertinent open parenthesis is
959 highlighted when there are problems locating the close
961 (c_parser_struct_or_union_specifier): Likewise.
962 (c_parser_typeof_specifier): Likewise.
963 (c_parser_alignas_specifier): Likewise.
964 (c_parser_simple_asm_expr): Likewise.
965 (c_parser_braced_init): Likewise, for matching_braces.
966 (c_parser_paren_condition): Likewise, for matching_parens.
967 (c_parser_switch_statement): Likewise.
968 (c_parser_for_statement): Likewise.
969 (c_parser_asm_statement): Likewise.
970 (c_parser_asm_operands): Likewise.
971 (c_parser_cast_expression): Likewise.
972 (c_parser_sizeof_expression): Likewise.
973 (c_parser_alignof_expression): Likewise.
974 (c_parser_generic_selection): Likewise.
975 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
976 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
977 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
978 In case CPP_OPEN_PAREN, pass loc_open_paren to the
979 c_parser_skip_until_found call.
980 (c_parser_objc_class_definition): Use class matching_parens as
982 (c_parser_objc_method_decl): Likewise.
983 (c_parser_objc_try_catch_finally_statement): Likewise.
984 (c_parser_objc_synchronized_statement): Likewise.
985 (c_parser_objc_at_property_declaration): Likewise.
986 (c_parser_oacc_wait_list): Likewise.
987 (c_parser_omp_var_list_parens): Likewise.
988 (c_parser_omp_clause_collapse): Likewise.
989 (c_parser_omp_clause_default): Likewise.
990 (c_parser_omp_clause_if): Likewise.
991 (c_parser_omp_clause_num_threads): Likewise.
992 (c_parser_omp_clause_num_tasks): Likewise.
993 (c_parser_omp_clause_grainsize): Likewise.
994 (c_parser_omp_clause_priority): Likewise.
995 (c_parser_omp_clause_hint): Likewise.
996 (c_parser_omp_clause_defaultmap): Likewise.
997 (c_parser_oacc_single_int_clause): Likewise.
998 (c_parser_omp_clause_ordered): Likewise.
999 (c_parser_omp_clause_reduction): Likewise.
1000 (c_parser_omp_clause_schedule): Likewise.
1001 (c_parser_omp_clause_num_teams): Likewise.
1002 (c_parser_omp_clause_thread_limit): Likewise.
1003 (c_parser_omp_clause_aligned): Likewise.
1004 (c_parser_omp_clause_linear): Likewise.
1005 (c_parser_omp_clause_safelen): Likewise.
1006 (c_parser_omp_clause_simdlen): Likewise.
1007 (c_parser_omp_clause_depend): Likewise.
1008 (c_parser_omp_clause_map): Likewise.
1009 (c_parser_omp_clause_device): Likewise.
1010 (c_parser_omp_clause_dist_schedule): Likewise.
1011 (c_parser_omp_clause_proc_bind): Likewise.
1012 (c_parser_omp_clause_uniform): Likewise.
1013 (c_parser_omp_for_loop): Likewise.
1014 (c_parser_cilk_clause_vectorlength): Likewise.
1015 (c_parser_cilk_clause_linear): Likewise.
1016 (c_parser_transaction_expression): Likewise.
1017 * c-parser.h (c_parser_require): Add param matching_location with
1018 default UNKNOWN_LOCATION.
1019 (c_parser_error): Convert return type from void to bool.
1020 (c_parser_skip_until_found): Add param matching_location with
1021 default UNKNOWN_LOCATION.
1023 2017-08-09 Marek Polacek <polacek@redhat.com>
1025 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1026 * c-tree.h (build_external_ref): Update declaration.
1027 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1028 (build_external_ref): Change the type of a parameter to bool.
1029 (parser_build_binary_op): Use true/false instead of 1/0.
1030 (pointer_diff): Likewise.
1031 (build_modify_expr): Likewise.
1032 (set_designator): Change the type of a parameter to bool.
1033 (set_init_index): Use true/false instead of 1/0.
1034 (set_init_label): Likewise.
1035 (output_init_element): Change the type of a parameter to bool.
1036 (output_pending_init_elements): Use true/false instead of 1/0.
1037 (process_init_element): Likewise.
1038 (build_binary_op): Change the type of a parameter to bool.
1040 2017-08-09 Marek Polacek <polacek@redhat.com>
1043 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1044 Call emit_diagnostic_valist instead of pedwarn.
1045 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1046 Print the relevant types in diagnostics.
1048 2017-08-09 Marek Polacek <polacek@redhat.com>
1051 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1052 build_conditional_expr.
1053 * c-parser.c (c_parser_conditional_expression): Create locations for
1054 EXP1 and EXP2 from their source ranges. Pass the locations down to
1055 build_conditional_expr.
1056 * c-tree.h (build_conditional_expr): Update declaration.
1057 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1058 For -Wsign-compare, also print the types.
1060 2017-08-08 Martin Liska <mliska@suse.cz>
1062 * c-convert.c: Include header files.
1063 * c-typeck.c: Likewise.
1065 2017-08-07 Martin Liska <mliska@suse.cz>
1067 * c-parser.c (c_parser_attributes): Canonicalize name of an
1070 2017-08-02 Marek Polacek <polacek@redhat.com>
1073 * c-parser.c (c_parser_unary_expression): Use set_error.
1077 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1078 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1080 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1081 Martin Liska <mliska@suse.cz>
1083 * c-typeck.c (c_finish_goto_label): Build gimple predict
1086 2017-07-31 Martin Liska <mliska@suse.cz>
1089 * c-convert.c (convert): Guard condition with flag_sanitize_p
1090 also with current_function_decl non-null equality.
1091 * c-decl.c (grokdeclarator): Likewise.
1092 * c-typeck.c (build_binary_op): Likewise.
1094 2017-07-25 Marek Polacek <polacek@redhat.com>
1096 * c-decl.c (grokfield): Remove local variable.
1098 2017-07-25 Marek Polacek <polacek@redhat.com>
1101 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1102 macro expansion if the body is in { }.
1103 (c_parser_while_statement): Likewise.
1104 (c_parser_for_statement): Likewise.
1106 2017-07-18 Nathan Sidwell <nathan@acm.org>
1108 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1110 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1112 * c-decl.c (implicitly_declare): When suggesting a missing
1113 #include, provide a fix-it hint.
1115 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1117 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1118 and call that instead.
1119 * c-tree.h (selftest::run_c_tests): New decl.
1121 2017-06-26 Marek Polacek <polacek@redhat.com>
1124 * c-parser.c (c_parser_if_body): Set the location of the
1125 body of the conditional after parsing all the labels. Call
1126 warn_for_multistatement_macros.
1127 (c_parser_else_body): Likewise.
1128 (c_parser_switch_statement): Likewise.
1129 (c_parser_while_statement): Likewise.
1130 (c_parser_for_statement): Likewise.
1131 (c_parser_statement): Add a default argument. Save the location
1132 after labels have been parsed.
1133 (c_parser_c99_block_statement): Likewise.
1135 2017-06-19 Richard Biener <rguenther@suse.de>
1137 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1138 negated _Literals to parse _Literal (int) -1.
1140 2017-06-13 Martin Liska <mliska@suse.cz>
1143 * c-convert.c (convert): Use sanitize_flags_p.
1144 * c-decl.c (grokdeclarator): Likewise.
1145 * c-typeck.c (convert_for_assignment): Likewise.
1146 (c_finish_return): Likewise.
1147 (build_binary_op): Likewise.
1149 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1152 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1153 to sizetype before size_binop.
1155 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1157 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1160 2017-06-06 Marek Polacek <polacek@redhat.com>
1163 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1165 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1167 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1169 * c-parser.c (c_parser_binary_expression): Implement the
1170 -Wsizeof_pointer_div warning.
1171 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1172 from a parenthesized expression.
1173 (c_parser_expr_list): Use c_last_sizeof_loc.
1174 * c-tree.h (c_last_sizeof_loc): New external.
1175 * c-typeck.c (c_last_sizeof_loc): New variable.
1176 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1178 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1181 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1183 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1185 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1188 2017-05-24 Martin Sebor <msebor@redhat.com>
1191 * c-fold.c (c_fully_fold_internal): Adjust.
1192 * c-typeck.c (parser_build_unary_op): Adjust.
1194 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1196 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1197 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1200 2017-05-23 Marek Polacek <polacek@redhat.com>
1202 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1205 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1207 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1208 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1209 it returned invariant. Call tree_invariant_p unconditionally
1210 afterwards to decide whether to return expr or op0.
1212 2017-05-22 Nathan Sidwell <nathan@acm.org>
1214 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1216 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1218 * c-parser.c (c_parser_omp_clause_default): Handle
1219 "OMP_CLAUSE_DEFAULT_PRESENT".
1221 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1223 * config-lang.in (gtfiles): Add c-family/c-format.c.
1225 2017-05-18 Nathan Sidwell <nathan@acm.org>
1227 * c-decl.c (pushdecl_top_level): Delete unused function.
1229 2017-05-18 Marek Polacek <polacek@redhat.com>
1231 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1232 (check_earlier_gotos): Likewise.
1233 (define_label): Likewise.
1234 (pending_xref_error): Likewise.
1235 (smallest_type_quals_location): Likewise.
1236 (grokdeclarator): Likewise.
1237 (grokparms): Likewise.
1238 (identifier_global_value): Likewise.
1239 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1240 (find_init_member): Likewise.
1242 2017-05-18 Marek Polacek <polacek@redhat.com>
1244 * c-decl.c (start_decl): Use false/true instead of 0/1.
1245 (grokdeclarator): Likewise.
1246 (finish_struct): Likewise.
1247 (start_function): Change the return type to bool. Use false/true
1249 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1250 * c-tree.h (start_function): Update.
1251 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1252 (set_designator): Change the return type to bool. Use false/true
1255 2017-05-17 Marek Polacek <polacek@redhat.com>
1257 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1258 * c-typeck.c: Likewise.
1260 2017-05-17 Marek Polacek <polacek@redhat.com>
1263 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1264 DECL_IGNORED_P even for non-static compound literals.
1266 2017-05-17 Martin Liska <mliska@suse.cz>
1268 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1269 use it instead of int type.
1271 2017-05-17 Marek Polacek <polacek@redhat.com>
1273 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1275 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1276 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1277 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1278 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1280 (c_parser_conditional_expression): Likewise.
1281 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1282 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1283 (process_init_element): Likewise.
1284 (build_binary_op): Likewise.
1285 (handle_omp_array_sections_1): Likewise.
1287 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1289 * c-parser.c (c_parser_omp_clause_num_gangs)
1290 (c_parser_omp_clause_num_workers)
1291 (c_parser_omp_clause_vector_length): Merge functions into...
1292 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1295 2017-05-11 Nathan Sidwell <nathan@acm.org>
1297 * gimple-parser.c: Don't #include tree-dump.h.
1299 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1302 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1304 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1307 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1308 incorrect __MEM syntax.
1310 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1313 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1316 2017-05-09 Nathan Sidwell <nathan@acm.org>
1318 * c-tree.h (pushdecl): Declare.
1320 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1322 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1323 with diagnostic_report_diagnostic.
1324 * c-errors.c (pedwarn_c99): Likewise.
1325 (pedwarn_c90): Likewise.
1327 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1330 * c-gimplify.c (c_gimplify_expr): Remove calls to
1331 cilk_gimplifY_call_params_in_spawned_fn.
1333 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1335 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1336 hint for removing extra semicolon.
1338 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1341 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1342 enabled, set specs->type to integer_type_node.
1344 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1346 * c-array-notation.c: Fix typo in comment.
1348 2017-03-29 Marek Polacek <polacek@redhat.com>
1351 * c-decl.c (finish_decl): Check VAR_P.
1353 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1356 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1357 * c-typeck.c (c_mark_addressable): Likewise. Look through
1358 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1360 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1362 2017-03-23 Marek Polacek <polacek@redhat.com>
1364 * c-tree.h: Remove a C_RID_YYCODE reference.
1366 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1369 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1370 optional COMPOUND_EXPR with ubsan instrumentation.
1372 2017-03-17 Marek Polacek <polacek@redhat.com>
1374 * c-parser.c: Add C11 references.
1376 2017-03-15 Marek Polacek <polacek@redhat.com>
1378 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1380 2017-03-11 Marek Polacek <polacek@redhat.com>
1382 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1384 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1386 PR translation/79848
1387 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1389 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1391 2017-03-09 Marek Polacek <polacek@redhat.com>
1394 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1395 parameter declarations with initializers.
1397 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1400 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1403 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1406 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1407 for "may only be used in compound statements" diagnostics, change it
1408 such that the same translatable string is used for all pragmas. For
1409 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1411 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1412 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1413 "may only be used in compound statements" diagnostics, such that the
1414 same translatable string is used for all pragmas.
1416 2017-03-04 Marek Polacek <polacek@redhat.com>
1419 * c-decl.c (implicit_decl_warning): Add missing space.
1421 2017-03-03 Marek Polacek <polacek@redhat.com>
1424 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1425 current_function_prototype_arg_types is error_mark_node. Fix
1426 formatting. Use TREE_VALUE instead of TREE_TYPE.
1428 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1431 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1432 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1433 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1437 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1438 instead of %<_Generic>.
1439 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1440 (c_parser_omp_target_exit_data): Use %<release%> instead of
1443 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1445 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1446 instead of just cond ? "..." : "...".
1447 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1448 for "enter"/"exit" keyword.
1449 (c_finish_oacc_routine): Don't use %s to supply portions of the
1452 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1455 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1456 handle -Wrestrict here.
1457 * c-typeck.c (build_function_call_vec): Adjust
1458 check_function_arguments caller.
1460 2017-02-23 Richard Biener <rguenther@suse.de>
1463 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1464 to initialize c_exprs to return.
1465 (c_parser_gimple_binary_expression): Likewise.
1466 (c_parser_gimple_unary_expression): Likewise.
1467 (c_parser_gimple_postfix_expression): Likewise.
1469 2017-02-22 Marek Polacek <polacek@redhat.com>
1472 * c-typeck.c (convert_arguments): Handle error_mark_node.
1474 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1476 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1477 value of c_parser_parse_ssa_name against error_mark_node and emit
1478 error if ssa name is anonymous and written as default definition.
1480 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1482 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1485 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1488 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1489 ignore #pragma omp target even when not followed by identifier.
1491 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1493 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1494 (c_parser_gimple_unary_expression): Likewise.
1496 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1498 * c-parser.c (c_parser_oacc_declare): Add missing space in
1501 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1504 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1505 set_c_expr_source_range when parsing ssa-name.
1507 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1508 Richard Biener <rguenther@suse.de>
1510 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1511 building IL when arguments are error_mark_node.
1512 (c_parser_gimple_unary_expression): Likewise.
1513 (c_parser_gimple_if_stmt): Likewise.
1514 (c_parser_gimple_switch_stmt): Likewise.
1515 (c_parser_gimple_return_stmt): Likewise.
1516 (c_parser_parse_ssa_name): When name lookup fails do not build
1517 an SSA name. Use undeclared rather than not declared in error
1520 2017-02-09 Marek Polacek <polacek@redhat.com>
1523 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1524 instead of c_parser_skip_until_found.
1526 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1529 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1530 symtab_node::get on automatic variables.
1532 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1533 Chung-Lin Tang <cltang@codesourcery.com>
1535 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1536 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1538 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1540 2017-02-07 Richard Biener <rguenther@suse.de>
1542 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1543 (c_parser_gimple_postfix_expression_after_primary):
1544 Do not use c_build_function_call_vec to avoid folding and promotion.
1547 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1550 * c-decl.c (pop_scope): Pass main_input_filename to
1551 build_translation_unit_decl.
1553 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1555 * c-parser.c: Include "read-rtl-function.h" and
1557 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1558 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1559 production. Update for renaming of field "gimple_pass" to
1560 "gimple_or_rtl_pass". If __RTL was seen, call
1561 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1562 to an auto_timevar, to cope with early exit.
1563 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1564 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1565 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1567 (c_parser_parse_rtl_body): New function.
1568 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1569 (struct c_declspecs): Rename field "gimple_pass" to
1570 "gimple_or_rtl_pass". Add field "rtl_p".
1571 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1572 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1573 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1574 (c_parser_gimple_or_rtl_pass_list): ...this.
1576 2017-01-20 Marek Polacek <polacek@redhat.com>
1579 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1581 2017-01-13 Richard Biener <rguenther@suse.de>
1583 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1586 2017-01-13 Richard Biener <rguenther@suse.de>
1588 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1589 _Literal ( type-name ) number.
1591 2017-01-12 Richard Biener <rguenther@suse.de>
1593 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1596 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1599 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1602 2017-01-11 Richard Biener <rguenther@suse.de>
1605 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1606 returns on parse errors.
1608 2017-01-04 Marek Polacek <polacek@redhat.com>
1611 * c-parser.c (c_parser_postfix_expression): Mark zero character
1612 constants by setting original_type in c_expr.
1613 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1614 with a zero character constant.
1615 (char_type_p): New function.
1617 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1619 * c-parser.c (c_parser_declaration_or_fndef): Create a
1620 rich_location at init_loc and parse it to start_init.
1621 (last_init_list_comma): New global.
1622 (c_parser_braced_init): Update last_init_list_comma when parsing
1623 commas. Pass it to pop_init_level. Pass location of closing
1624 brace to pop_init_level.
1625 (c_parser_postfix_expression_after_paren_type): Create a
1626 rich_location at type_loc and parse it to start_init.
1627 (c_parser_omp_declare_reduction): Likewise for loc.
1628 * c-tree.h (start_init): Add rich_location * param.
1629 (pop_init_level): Add location_t param.
1630 * c-typeck.c (struct initializer_stack): Add field
1631 "missing_brace_richloc".
1632 (start_init): Add richloc param, use it to initialize
1633 the stack node's missing_brace_richloc.
1634 (last_init_list_comma): New decl.
1635 (finish_implicit_inits): Pass last_init_list_comma to
1637 (push_init_level): When finding missing open braces, add fix-it
1638 hints to the richloc.
1639 (pop_init_level): Add "insert_before" param and pass it
1640 when calling pop_init_level. Add fixits about missing
1641 close braces to any richloc. Use the richloc for the
1642 -Wmissing-braces warning.
1643 (set_designator): Pass last_init_list_comma to pop_init_level.
1644 (process_init_element): Likewise.
1646 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1648 Update copyright years.
1650 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1653 * c-typeck.c (build_function_call_vec): If check_function_arguments
1654 returns true, set TREE_NO_WARNING on CALL_EXPR.
1657 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1658 to *expr instead of overwriting it.
1660 2016-12-20 Richard Biener <rguenther@suse.de>
1662 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1664 (c_parser_gimple_statement): Only build assigns for non-error
1666 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1668 2016-12-14 Martin Jambor <mjambor@suse.cz>
1670 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1672 (c_finish_oacc_routine): Adjusted call to
1673 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1674 to use their new names.
1675 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1677 (c_parser_oacc_update): Likewise.
1678 (c_parser_omp_simd): Likewise.
1679 (c_parser_omp_target_update): Likewise.
1680 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1681 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1683 (c_finish_omp_cancellation_point): Likewise.
1684 * gimple-parser.c: Do not include omp-low.h
1686 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1687 James Norris <jnorris@codesourcery.com>
1689 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1690 EXIT_DATA,WAIT} are not used in compound statements.
1691 (c_parser_oacc_enter_exit_data): Update diagnostics.
1693 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1696 * c-decl.c (diagnose_mismatched_decls): Use
1697 OPT_Wbuiltin_declaration_mismatch here too.
1699 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1700 Alan Hayward <alan.hayward@arm.com>
1701 David Sherwood <david.sherwood@arm.com>
1703 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1704 (make_label, finish_struct): Likewise.
1706 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1707 Richard Biener <rguenther@suse.de>
1709 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1710 * config-lang.in (gtfiles): Add c/c-parser.h.
1711 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1712 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1713 * c-parser.c (enum c_id_kind, struct c_token,
1714 c_parser_next_token_is, c_parser_next_token_is_not,
1715 c_parser_next_token_is_keyword,
1716 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1718 * c-parser.h: ... new header.
1719 * c-parser.c: Include c-parser.h and gimple-parser.h.
1720 (c_parser_peek_token, c_parser_peek_2nd_token,
1721 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1722 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1723 c_parser_error, c_parser_require, c_parser_skip_until_found,
1724 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1725 c_parser_type_name): Export.
1726 (c_parser_tokens_buf): New function.
1727 (c_parser_error): Likewise.
1728 (c_parser_set_error): Likewise.
1729 (c_parser_declspecs): Handle RID_GIMPLE.
1730 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1731 via c_parser_parse_gimple_body.
1732 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1733 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1734 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1735 c_parser_error, c_parser_require, c_parser_skip_until_found,
1736 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1737 c_parser_type_name): Declare.
1738 (struct c_parser): Declare forward.
1739 (c_parser_tokens_buf): Declare.
1740 (c_parser_error): Likewise.
1741 (c_parser_set_error): Likewise.
1742 * gimple-parser.c: New file.
1743 * gimple-parser.h: Likewise.
1745 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1748 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1751 2016-09-11 Le-Chun Wu <lcwu@google.com>
1752 Mark Wielaard <mjw@redhat.com>
1754 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1755 to the given -Wshadow= variant.
1757 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1759 * c-typeck.c: Include memmodel.h.
1761 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1764 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1765 instead of lhd_return_null_tree_v.
1767 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1770 * c-decl.c (smallest_type_quals_location): New static function.
1771 (grokdeclarator): Try to find the correct location for an ignored
1774 2016-09-26 Marek Polacek <polacek@redhat.com>
1777 * c-decl.c (pop_scope): Add gcc_fallthrough.
1779 2016-09-26 Marek Polacek <polacek@redhat.com>
1782 * c-parser.c (struct c_token): Add flags field.
1783 (c_lex_one_token): Pass it to c_lex_with_flags.
1784 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1785 into IFN_FALLTHROUGH.
1786 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1787 attribute fallthrough after a case label or default label.
1788 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1790 2016-09-24 Marek Polacek <polacek@redhat.com>
1793 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1794 have boolean value. Warn about ++/-- on booleans.
1796 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1798 * c-parser.c (incomplete_record_decls): Remove unnecessary
1799 = vNULL initialization of file scope vec.
1801 2016-09-16 Marek Polacek <polacek@redhat.com>
1803 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1805 2016-09-14 Marek Polacek <polacek@redhat.com>
1807 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1808 (fix_array_notation_expr): Likewise.
1809 * c-decl.c (finish_decl): Likewise.
1810 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1811 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1812 (function_to_pointer_conversion): Use false instead of 0.
1813 (convert_lvalue_to_rvalue): Likewise.
1814 (parser_build_unary_op): Likewise.
1815 (build_atomic_assign): Likewise.
1816 (build_unary_op): Change nonconvert parameter type to bool, use
1817 true/false instead of 1/0.
1818 (build_binary_op): Use true instead of 1.
1820 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1822 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1823 of add_fixit_insert to add_fixit_insert_before.
1825 2016-09-13 Marek Polacek <polacek@redhat.com>
1827 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1830 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1833 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1834 COMPOUND_EXPR to warn_for_omitted_condop.
1836 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1838 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1839 c_get_substring_location for this new langhook.
1841 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1844 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1846 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1847 instead of mark_exp_read on low_bound/length expression.
1848 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1849 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1850 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1851 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1852 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1853 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1854 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1855 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1856 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1857 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1858 instead of mark_expr_read.
1859 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1860 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1861 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1862 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1863 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1864 array section bases outside of depend clause, for depend clause
1865 use convert_lvalue_to_rvalue on the base.
1866 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1867 linear, aligned, map, to and from clauses.
1868 (c_omp_clause_copy_ctor): New function.
1870 2016-09-01 Marek Polacek <polacek@redhat.com>
1873 * c-typeck.c (composite_type): Add FALLTHRU comment.
1875 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1877 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1878 to the insertion fixits for "struct", "union", and "enum".
1880 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1882 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1883 rather than add_fixit_misspelled_id.
1884 (undeclared_variable): Likewise.
1885 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1886 now-redundant "here" params from add_fixit_insert method calls.
1887 (c_parser_parameter_declaration): Likewise.
1888 * c-typeck.c (build_component_ref): Remove now-redundant range
1889 param from add_fixit_replace method calls.
1891 2016-08-25 Marek Polacek <polacek@redhat.com>
1893 * c-typeck.c (parser_build_binary_op): Pass LHS to
1894 warn_logical_not_parentheses.
1896 2016-08-25 Marek Polacek <polacek@redhat.com>
1899 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1900 or _FloatN or _FloatNx is not supported.
1901 (finish_declspecs): Set type to integer_type_node when _FloatN or
1902 _FloatNx is not supported.
1904 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1907 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1908 (struct c_declspecs): Add field floatn_nx_idx.
1909 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1910 and _FloatNx type specifiers.
1911 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1912 (c_parser_declspecs, c_parser_attribute_any_word)
1913 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1914 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1915 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1916 narrower than double.
1918 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1919 Martin Liska <mliska@suse.cz>
1922 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1923 % to determine val element to change. Assert that
1924 wchar_bytes * charwidth fits into val array.
1926 2016-08-12 Marek Polacek <polacek@redhat.com>
1929 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1930 (c_parser_postfix_expression): Likewise.
1931 * c-typeck.c (build_unary_op): Adjust fall through comment.
1932 (c_mark_addressable): Likewise.
1934 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1937 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1938 array member through typedef, for orig_qual_indirect == 0 clear
1941 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1944 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1945 this up to selftest::run_c_tests.
1946 (selftest::run_c_tests): New function.
1948 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1950 * c-parser.c (struct oacc_routine_data): Add error_seen and
1951 fndecl_seen members.
1952 (c_finish_oacc_routine): Use these.
1953 (c_parser_declaration_or_fndef): Adjust.
1954 (c_parser_oacc_routine): Likewise. Support more C language
1955 constructs, and improve diagnostics. Move pragma context
1957 (c_parser_pragma): ... here.
1959 * c-parser.c (struct oacc_routine_data): New.
1960 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1962 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1963 declare target" attribute.
1965 2016-08-01 Jan Beulich <jbeulich@suse.com>
1967 * c-fold.c (c_fully_fold_internal): Also emit shift count
1968 warnings for vector types.
1969 * c-typeck.c (build_binary_op): Likewise.
1971 2016-07-29 Marek Polacek <polacek@redhat.com>
1974 * c-decl.c (finish_struct): Rephrase an error message.
1977 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1978 to error node for invalid code.
1981 * c-decl.c (implicitly_declare): Return decl early not only for
1982 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1984 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1987 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1988 on GNU extern inline functions.
1990 2016-07-29 Marek Polacek <polacek@redhat.com>
1993 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1996 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1998 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2000 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2002 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2004 (best_macro_match): Likewise, converting from a typedef to a
2006 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2007 (lookup_name_fuzzy): Update for change of best_macro_match to a
2008 subclass with a ctor that calls cpp_forall_identifiers.
2010 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2012 * c-decl.c (implicit_decl_warning): Update for conversion of
2013 return type of lookup_name_fuzzy to const char *.
2014 (undeclared_variable): Likewise.
2015 (lookup_name_fuzzy): Convert return type from tree to
2017 * c-parser.c (c_parser_declaration_or_fndef): Update for
2018 conversion of return type of lookup_name_fuzzy to const char *.
2019 (c_parser_parameter_declaration): Likewise.
2021 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2023 * c-parser.c (c_parser_oacc_declare): Don't scan for
2025 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2026 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2027 zero-length subarrays.
2029 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2032 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2033 instead of FUZZY_LOOKUP_NAME.
2034 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2035 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2037 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2040 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2042 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2044 * c-parser.c (c_parser_generic_selection): Make type of variable
2046 (c_parser_omp_declare_simd): Likewise.
2048 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2050 * c-decl.c (struct c_struct_parse_info): Change member types
2051 from vec to auto_vec.
2052 (start_struct): Adjust.
2053 (finish_struct): Likewise.
2055 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2058 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2060 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2062 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2063 Move pragma context checking into...
2064 (c_parser_omp_cancellation_point): ... here, and improve
2065 diagnostic messages.
2066 * c-typeck.c (c_finish_omp_cancel)
2067 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2069 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2072 * c-typeck.c (c_build_qualified_type): Don't clear
2073 C_TYPE_INCOMPLETE_VARS for the main variant.
2075 2016-06-28 Martin Sebor <msebor@redhat.com>
2078 * c-typeck.c (output_init_element): Diagnose incompatible types
2079 before non-constant initializers.
2081 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2083 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2085 2016-06-23 Andi Kleen <ak@linux.intel.com>
2087 * Make-lang.in: Add support for autofdo.
2089 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2092 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2093 (implicit_decl_warning): When issuing warnings for implicit
2094 declarations, attempt to provide a suggestion via
2096 (undeclared_variable): Likewise when issuing errors.
2097 (lookup_name_in_scope): Likewise.
2098 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2099 (best_macro_match): New typedef.
2100 (find_closest_macro_cpp_cb): New function.
2101 (lookup_name_fuzzy): New function.
2102 * c-parser.c: Include gcc-rich-location.h.
2103 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2104 (c_keyword_starts_typename): ...this new function.
2105 (c_parser_declaration_or_fndef): When issuing errors about
2106 missing "struct" etc, add a fixit. For other kinds of errors,
2107 attempt to provide a suggestion via lookup_name_fuzzy.
2108 (c_parser_parms_declarator): When looking ahead to detect typos in
2109 type names, also reject CPP_KEYWORD.
2110 (c_parser_parameter_declaration): When issuing errors about
2111 unknown type names, attempt to provide a suggestion via
2113 * c-tree.h (c_keyword_starts_typename): New prototype.
2115 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2118 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2119 c_common_type returns error_mark_node.
2121 2016-06-19 Martin Sebor <msebor@redhat.com>
2124 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2125 __alignof__ (expression).
2127 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2129 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2131 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2133 * c-typeck.c (build_component_ref): Simplify fixit code by
2134 using gcc_rich_location::add_fixit_misspelled_id.
2135 (set_init_label): Likewise.
2137 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2139 * c-parser.c (c_parser_initelt): Provide location of name for new
2140 location_t param of set_init_label.
2141 * c-tree.h (set_init_label): Add location_t param.
2142 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2143 param and use it when issuing error messages about unrecognized
2144 field names. Attempt to provide a fixit hint if appropriate,
2145 otherwise update the error message to provide the type name.
2147 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2150 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2153 2016-06-08 Martin Sebor <msebor@redhat.com>
2154 Jakub Jelinek <jakub@redhat.com>
2158 * c-typeck.c (convert_arguments): Don't promote last argument
2159 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2161 2016-06-08 Marek Polacek <polacek@redhat.com>
2164 * c-decl.c (grokdeclarator): Check TYPE_P.
2167 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2170 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2172 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2173 and structure element reference, capture the location of the
2174 element name token and pass it to build_component_ref.
2175 (c_parser_postfix_expression_after_primary): Likewise for
2176 structure element dereference.
2177 (c_parser_omp_variable_list): Likewise for
2178 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2179 * c-tree.h (build_component_ref): Add location_t param.
2180 * c-typeck.c (build_component_ref): Add location_t param
2181 COMPONENT_LOC. Use it, if available, when issuing hints about
2182 mispelled member names to provide a fixit replacement hint.
2184 2016-06-06 Marek Polacek <polacek@redhat.com>
2187 * c-parser.c (c_parser_direct_declarator): Set location.
2189 2016-06-06 Marek Polacek <polacek@redhat.com>
2191 * c-typeck.c (comptypes_internal): Handle comparisons of
2192 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2193 TYPE_REF_CAN_ALIAS_ALL.
2195 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2197 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2198 arguments as addressable when async clause exists.
2200 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2203 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2204 when combined with target construct.
2206 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2208 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2209 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2211 2016-05-25 Marek Polacek <polacek@redhat.com>
2214 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2217 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2219 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2221 * c-parser.c (c_parser_oacc_declare): Add support for
2222 GOMP_MAP_FIRSTPRIVATE_POINTER.
2223 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2224 argument with enum c_omp_region_type ort.
2225 (handle_omp_array_sections): Likewise. Update call to
2226 handle_omp_array_sections_1.
2227 (c_finish_omp_clauses): Add specific errors and warning messages for
2228 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2229 call to handle_omp_array_sections.
2231 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2233 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2235 2016-05-24 Richard Biener <rguenther@suse.de>
2239 * c-typeck.c (build_array_ref): Do not complain about indexing
2240 non-lvalue vectors. Adjust for function name change.
2242 2016-05-20 Martin Sebor <msebor@redhat.com>
2245 * c-typeck.c (error_init): Use
2246 expansion_point_location_if_in_system_header.
2247 (warning_init): Same.
2249 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2252 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2254 (c_parser_postfix_expression): Likewise.
2255 * c-tree.h (c_expr::set_error): New method.
2256 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2257 that result's range is initialized.
2259 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2261 * c-typeck.c (parser_build_unary_op): Fix formatting.
2263 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2265 * c-decl.c (grokdeclarator): Remove errmsg and use of
2266 targetm.invalid_return_type.
2267 (grokparms): Remove errmsg and use of
2268 targetm.invalid_parameter_type.
2270 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2272 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2273 function return type.
2275 2016-05-12 Marek Polacek <polacek@redhat.com>
2278 * c-decl.c (build_compound_literal): Pass LOC down to
2279 c_incomplete_type_error.
2280 * c-tree.h (require_complete_type): Adjust declaration.
2281 (c_incomplete_type_error): Likewise.
2282 * c-typeck.c (require_complete_type): Add location parameter, pass it
2283 down to c_incomplete_type_error.
2284 (c_incomplete_type_error): Add location parameter, pass it down to
2286 (build_component_ref): Pass location down to c_incomplete_type_error.
2287 (default_conversion): Pass location down to require_complete_type.
2288 (build_array_ref): Likewise.
2289 (build_function_call_vec): Likewise.
2290 (convert_arguments): Likewise.
2291 (build_unary_op): Likewise.
2292 (build_c_cast): Likewise.
2293 (build_modify_expr): Likewise.
2294 (convert_for_assignment): Likewise.
2295 (c_finish_omp_clauses): Likewise.
2297 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2300 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2302 * c-errors.c (pedwarn_c90): Return true if warned.
2303 * c-tree.h (pedwarn_c90): Change return type to bool.
2304 (enum c_declspec_word): Add new enumerator cdw_atomic.
2306 2016-05-11 Marek Polacek <polacek@redhat.com>
2309 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2310 diagnose_mismatched_attributes and call it.
2312 2016-05-10 Marek Polacek <polacek@redhat.com>
2315 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2316 on a declaration following the definition.
2318 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2320 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2321 parse it through to c_parser_c99_block_statement.
2322 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2325 2016-05-04 Marek Polacek <polacek@redhat.com>
2327 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2330 2016-05-04 Marek Polacek <polacek@redhat.com>
2333 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2334 for macro expansions.
2336 2016-05-03 Marek Polacek <polacek@redhat.com>
2339 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2340 check_builtin_function_arguments.
2342 2016-05-03 Richard Biener <rguenther@suse.de>
2344 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2345 the checksum from the previous stage.
2347 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2349 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2350 c_finish_omp_clauses.
2351 (c_parser_omp_all_clauses): Likewise.
2352 (c_parser_oacc_cache): Likewise.
2353 (c_parser_oacc_loop): Likewise.
2354 (omp_split_clauses): Likewise.
2355 (c_parser_omp_declare_target): Likewise.
2356 (c_parser_cilk_all_clauses): Likewise.
2357 (c_parser_cilk_for): Likewise.
2358 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2359 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2361 2016-05-02 Marek Polacek <polacek@redhat.com>
2364 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2367 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2370 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2371 OACC_LOOP_CLAUSE_MASK.
2372 (c_parser_oacc_kernels_parallel): Update call to
2373 c_oacc_split_loop_clauses.
2375 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2377 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2378 argument to build_modify_expr in two cases.
2380 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2382 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2383 warn_for_memset instead of warning directly here.
2385 2016-04-26 Marek Polacek <polacek@redhat.com>
2388 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2390 (c_parser_for_statement): ... here.
2391 (c_parser_if_statement): Use it.
2392 (c_parser_switch_statement): Use it.
2393 (c_parser_while_statement): Use it.
2396 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2398 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2401 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2402 instead of c_finish_cilk_clauses.
2403 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2404 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2405 floating-point variables in the linear clause for Cilk Plus.
2407 2016-04-18 Michael Matz <matz@suse.de>
2409 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2410 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2412 2016-04-15 Marek Polacek <polacek@redhat.com>
2415 * c-typeck.c (build_unary_op): Pass location down to error and
2418 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2421 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2423 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2424 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2425 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2426 Adjust c_parser_pragma callers.
2427 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2429 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2431 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2432 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2433 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2434 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2435 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2436 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2437 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2438 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2440 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2441 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2444 2016-04-13 Marek Polacek <polacek@redhat.com>
2447 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2449 (c_parser_statement): Likewise.
2450 (c_parser_c99_block_statement): Likewise.
2451 (c_parser_while_statement): Likewise.
2452 (c_parser_for_statement): Likewise.
2453 (c_parser_if_body): Don't set IF_P here.
2454 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2455 about dangling else here.
2456 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2457 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2458 warn about dangling else here.
2460 2016-04-04 Marek Polacek <polacek@redhat.com>
2463 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2465 2016-03-31 Marek Polacek <polacek@redhat.com>
2468 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2470 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2473 * c-parser.c (c_parser_postfix_expression): Set the source range
2474 for uses of "__builtin_types_compatible_p".
2476 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2479 * c-typeck.c (composite_type): Don't count void_list_node
2480 into len, if the list is terminated by void_list_node, start
2481 with void_list_node instead of NULL for newargs. Stop
2484 2016-03-16 Marek Polacek <polacek@redhat.com>
2487 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2488 nested functions returning VM types.
2490 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2492 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2493 when calling c_finish_omp_clauses.
2495 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2498 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2501 2016-03-04 Marek Polacek <polacek@redhat.com>
2504 * c-parser.c (c_parser_postfix_expression): Call
2505 c_parser_cast_expression rather than c_parser_postfix_expression.
2507 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2511 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2512 of incomplete decls to error_mark_node.
2514 2016-02-24 Marek Polacek <polacek@redhat.com>
2517 * c-decl.c (finish_decl): Don't update the copy of the type of a
2518 different decl type.
2520 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2523 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2524 in id_kind reclassification.
2526 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2529 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2531 2016-02-16 James Norris <jnorris@codesourcery.com>
2534 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2536 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2538 * c-decl.c (build_null_declspecs): Zero the entire struct.
2541 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2542 callers changed. If nested_p is true, use it to call
2543 finish_implicit_inits.
2544 * c-tree.h (finish_implicit_inits): Declare.
2545 * c-typeck.c (finish_implicit_inits): New function. Move code
2547 (push_init_level): ... here.
2548 (set_designator, process_init_element): Call finish_implicit_inits.
2550 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2553 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2554 arguments for -Waddress warning.
2556 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2559 * c-decl.c (finish_enum): When honoring mode attribute,
2560 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2562 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2565 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2566 all type variants, not just TYPE_MAIN_VARIANT.
2568 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2571 * c-decl.c (c_write_global_declarations_1): Warn with
2572 warn_unused_function if static prototype without definition
2575 2016-01-27 Marek Polacek <polacek@redhat.com>
2578 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2579 to unsigned, if needed. Add -Wsign-compare warning.
2581 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2583 PR tree-optimization/69483
2584 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2586 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2589 * c-tree.h (incomplete_record_decls): Declare.
2590 * c-parser.c (incomplete_record_decls): Define.
2591 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2592 report error if any decl has zero size.
2593 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2594 or enum type to incomplete_record_decls.
2596 2016-01-14 Tom de Vries <tom@codesourcery.com>
2598 PR tree-optimization/68773
2599 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2602 2016-01-14 Marek Polacek <polacek@redhat.com>
2605 * c-decl.c (grokdeclarator): Provide more information for invalid
2608 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2610 * c-parser.c (c_parser_unary_expression): For dereferences, build
2611 a combined location before calling build_indirect_ref, so that
2612 error reports cover the full range, manually updating the c_expr
2615 2016-01-06 Marek Polacek <polacek@redhat.com>
2618 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2619 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2622 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2624 Update copyright years.
2626 2016-01-04 Marek Polacek <polacek@redhat.com>
2629 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2630 optimization to use __atomic_fetch_* built-in if possible.
2632 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2634 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2636 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2639 2015-12-22 Marek Polacek <polacek@redhat.com>
2642 * c-typeck.c (build_component_ref): Warn when acessing elements of
2643 atomic structures or unions.
2645 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2647 * c-typeck.c: Include "gcc-rich-location.h".
2648 (build_binary_op): In the two places that call binary_op_error,
2649 create a gcc_rich_location and populate it with the location of
2650 the binary op and its two operands.
2652 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2654 * c-parser.c (c_parser_statement_after_labels): When calling
2655 c_finish_return, Use the return expression's location if it has
2656 one, falling back to the location of the first token within it.
2657 * c-typeck.c (c_finish_return): When issuing warnings about
2658 the incorrect presence/absence of a return value, issue a note
2659 showing the declaration of the function.
2661 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2663 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2665 (c_parser_peek_nth_token): New function.
2666 (c_parser_peek_conflict_marker): New function.
2667 (c_parser_error): Detect conflict markers and report them as such.
2669 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2671 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2672 to preserve range information for the primary expression
2673 in the call to c_parser_postfix_expression_after_primary.
2675 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2677 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2678 expression location, falling back on the first token location,
2679 rather than always using the latter.
2681 2015-12-16 Marek Polacek <polacek@redhat.com>
2684 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2687 2015-12-15 Marek Polacek <polacek@redhat.com>
2690 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2693 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2695 * c-parser.c (c_parser_alignof_expression): Capture location of
2696 closing parenthesis (if any), or of end of unary expression, and
2697 use it to build a src_range for the expression.
2699 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2702 * c-parser.c (c_parser_get_builtin_args): Add
2703 "out_close_paren_loc" param, and write back to it.
2704 (c_parser_postfix_expression): Capture the closing
2705 parenthesis location for RID_CHOOSE_EXPR,
2706 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2707 RID_BUILTIN_SHUFFLE and use it to set the source range
2708 for such expressions; within RID_BUILTIN_COMPLEX set
2709 the underlying location.
2711 2015-12-07 Marek Polacek <polacek@redhat.com>
2714 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2715 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2717 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2719 * c-tree.h (c_build_va_arg): Adjust prototype.
2720 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2721 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2722 parameter, adjust throughout and issue an error if EXPR is a component
2723 with reverse storage order.
2725 2015-12-02 Jason Merrill <jason@redhat.com>
2727 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2728 (c_fully_fold_internal, decl_constant_value_for_optimization):
2729 Move from c-common.c.
2730 * c-tree.h: Declare decl_constant_value_for_optimization.
2731 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2733 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2736 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2737 following link from declarator to next declarator. Track original
2738 qualified type and pass it to c_build_qualified_type.
2739 * c-typeck.c (c_build_qualified_type): Add arguments
2740 orig_qual_type and orig_qual_indirect.
2742 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2744 * c-parser.c (c_parser_omp_clause_name)
2745 (c_parser_oacc_all_clauses): Alphabetical sorting.
2747 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2750 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2753 2015-12-01 Julian Brown <julian@codesourcery.com>
2754 Cesar Philippidis <cesar@codesourcery.com>
2755 James Norris <James_Norris@mentor.com>
2757 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2758 (c_parser_oacc_clause_use_device): New function.
2759 (c_parser_oacc_all_clauses): Add use_device support.
2760 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2761 (c_parser_oacc_host_data): New function.
2762 (c_parser_omp_construct): Add host_data support.
2763 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2764 * c-typeck.c (c_finish_oacc_host_data): New function.
2765 (c_finish_omp_clauses): Add use_device support.
2767 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2770 * c-decl.c: Set TYPE_PACKED in variants.
2772 2015-11-27 Martin Liska <mliska@suse.cz>
2775 * c-array-notation.c (fix_builtin_array_notation_fn):
2776 Use release_vec_vec instead of vec::release.
2777 (build_array_notation_expr): Likewise.
2778 (fix_conditional_array_notations_1): Likewise.
2779 (fix_array_notation_expr): Likewise.
2780 (fix_array_notation_call_expr): Likewise.
2782 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2785 * c-parser.c (c_parser_compound_statement_nostart): If
2786 last_label is true, use pragma_stmt instead of pragma_compound
2787 as second c_parser_pragma argument.
2788 (c_parser_omp_ordered, c_parser_omp_target_update,
2789 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2790 false as second argument to c_parser_skip_to_pragma_eol after
2791 diagnosing standalone directives used in pragma_stmt context.
2793 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2795 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2796 with "if (ENABLE_OFFLOADING)".
2798 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2801 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2802 for various Objective-C constructs: Class.name syntax,
2803 @selector(), @protocol(), @encode(), and [] message syntax.
2805 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2808 * c-typeck.c (should_suggest_deref_p): New function.
2809 (build_component_ref): Special-case POINTER_TYPE when
2810 generating a "not a structure of union" error message, and
2811 suggest a "->" rather than a ".", providing a fix-it hint.
2813 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2815 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2816 candidate into a new function, find_closest_identifier.
2818 2015-11-19 Marek Polacek <polacek@redhat.com>
2821 * c-typeck.c (parser_build_binary_op): Properly handle
2822 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2824 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2826 * c-parser.c (set_c_expr_source_range): Bulletproof both
2827 overloaded implementations against NULL expr->value.
2828 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2830 (c_parser_unary_expression): Likewise when handling addresses of
2832 (c_parser_postfix_expression): Likewise for statement expressions,
2833 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2834 __builtin_va_arg, and for __builtin_offset_of.
2835 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2836 src_range using the range of the braced initializer.
2837 (c_parser_transaction_expression): Set src_range for "ret" to a
2838 sane pair of values.
2840 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2842 * c-parser.c (c_finish_omp_declare_simd): Look for
2843 "simd" attribute as well. Update error message.
2845 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2847 * c-parser.c (c_parser_omp_declare_target): Adjust.
2849 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2851 * c-typeck.c (c_finish_omp_clauses): Don't mark
2852 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2854 2015-11-14 Marek Polacek <polacek@redhat.com>
2856 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2857 * c-typeck.c: Likewise.
2859 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2861 * c-decl.c (warn_defaults_to): Pass line_table to
2863 * c-errors.c (pedwarn_c99): Likewise.
2864 (pedwarn_c90): Likewise.
2865 * c-parser.c (set_c_expr_source_range): New functions.
2866 (c_token::get_range): New method.
2867 (c_token::get_finish): New method.
2868 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2869 based on the range from the start of the LHS to the end of the
2871 (c_parser_conditional_expression): Likewise, based on the range
2872 from the start of the cond.value to the end of exp2.value.
2873 (c_parser_binary_expression): Call set_c_expr_source_range on
2874 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2875 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2876 based on the cast_loc through to the end of the expr.
2877 (c_parser_unary_expression): Likewise, based on the
2878 op_loc through to the end of op.
2879 (c_parser_sizeof_expression) Likewise, based on the start of the
2880 sizeof token through to either the closing paren or the end of
2882 (c_parser_postfix_expression): Likewise, using the token range,
2883 or from the open paren through to the close paren for
2884 parenthesized expressions.
2885 (c_parser_postfix_expression_after_primary): Likewise, for
2886 various kinds of expression.
2887 * c-tree.h (struct c_expr): Add field "src_range".
2888 (c_expr::get_start): New method.
2889 (c_expr::get_finish): New method.
2890 (set_c_expr_source_range): New decls.
2891 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2892 on ret for prefix unary ops.
2893 (parser_build_binary_op): Likewise, running from the start of
2894 arg1.value through to the end of arg2.value.
2896 2015-11-13 Marek Polacek <polacek@redhat.com>
2899 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2901 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2903 * c-typeck.c: Include spellcheck.h.
2904 (lookup_field_fuzzy_find_candidates): New function.
2905 (lookup_field_fuzzy): New function.
2906 (build_component_ref): If the field was not found, try using
2907 lookup_field_fuzzy and potentially offer a suggestion.
2909 2015-11-12 James Norris <jnorris@codesourcery.com>
2910 Joseph Myers <joseph@codesourcery.com>
2912 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2913 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2914 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2915 and PRAGMA_OMP_CLAUSE_LINK.
2916 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2917 and PRAGMA_OACC_CLAUSE_LINK.
2918 (OACC_DECLARE_CLAUSE_MASK): New definition.
2919 (c_parser_oacc_declare): New function.
2921 2015-11-12 Marek Polacek <polacek@redhat.com>
2924 * c-parser.c (c_parser_for_statement): Reclassify the token in
2927 2015-11-11 Marek Polacek <polacek@redhat.com>
2931 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2932 checking the size of an array.
2934 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2936 * c-array-notation.c: Remove unused header files.
2937 * c-aux-info.c: Likewise.
2938 * c-convert.c: Likewise.
2939 * c-decl.c: Likewise.
2940 * c-errors.c: Likewise.
2941 * c-lang.c: Likewise.
2942 * c-objc-common.c: Likewise.
2943 * c-parser.c: Likewise.
2944 * c-typeck.c: Likewise.
2945 * gccspec.c: Likewise.
2947 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2948 Cesar Philippidis <cesar@codesourcery.com>
2949 James Norris <jnorris@codesourcery.com>
2950 Julian Brown <julian@codesourcery.com>
2951 Nathan Sidwell <nathan@codesourcery.com>
2954 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2956 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2957 (c_parser_pragma): Parse 'acc routine'.
2958 (OACC_ROUTINE_CLAUSE_MARK): Define.
2959 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2961 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2964 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2965 location of the backward-goto to the start of the loop body.
2967 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2970 * c-parser.c (c_parser_while_statement): Finish the loop before
2971 parsing ahead for misleading indentation.
2972 (c_parser_for_statement): Likewise.
2974 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2976 * c-decl.c (finish_struct): If the structure has reverse storage
2977 order, rewrite the type of array fields with scalar component. Call
2978 maybe_apply_pragma_scalar_storage_order on entry.
2979 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2980 errors on bit-fields and reverse SSO here and not...
2981 (c_mark_addressable): ...here.
2982 (output_init_element): Adjust call to initializer_constant_valid_p.
2983 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2985 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2987 * c-decl.c (warn_defaults_to): Update for change in signature
2988 of diagnostic_set_info.
2989 * c-errors.c (pedwarn_c99): Likewise.
2990 (pedwarn_c90): Likewise.
2991 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2992 for textinfo::set_location.
2994 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2995 Thomas Schwinge <thomas@codesourcery.com>
2996 James Norris <jnorris@codesourcery.com>
2998 * c-parser.c (c_parser_omp_clause_name): Add support for
2999 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3000 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3001 default(none) in OpenACC.
3002 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3004 (c_parser_oacc_clause_tile): New function.
3005 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3006 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3007 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3009 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3010 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3012 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3013 (c_parser_oacc_update): Update the error message for missing clauses.
3014 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3015 and OMP_CLAUSE_INDEPENDENT.
3017 2015-11-05 Marek Polacek <polacek@redhat.com>
3020 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3021 deal with pre-evaluation on invalid types.
3023 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3024 Ilya Verbin <ilya.verbin@intel.com>
3026 * c-parser.c: Include context.h and gimple-expr.h.
3027 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3028 monotonic together with nonmonotonic.
3029 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3030 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3031 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3032 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3033 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3034 expressions on combined target teams before the target.
3035 (c_parser_omp_declare_target): If decl has "omp declare target" or
3036 "omp declare target link" attribute, and cgraph or varpool node already
3037 exists, then set corresponding flags. Call c_finish_omp_clauses
3038 in the parenthesized extended-list syntax case.
3039 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3041 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3042 on OMP_CLAUSE_REDUCTION array sections.
3043 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3044 into the constant offset, or for variable low-bound using
3045 POINTER_PLUS_EXPR. For structure element based array sections use
3046 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3047 (c_finish_omp_clauses): Drop generic_field_head, structure
3048 elements are now always mapped even as array section bases,
3049 diagnose same var in data sharing and mapping clauses. Diagnose if
3050 linear step on declare simd is neither a constant nor a uniform
3051 parameter. Look through POINTER_PLUS_EXPR for array section
3052 reductions. Diagnose the same var or function appearing multiple
3053 times on the same directive. Fix up wording for the to clause if t
3054 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3055 modifier on kinds other than dynamic or guided or nonmonotonic
3056 modifier together with ordered clause.
3058 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3059 Chung-Lin Tang <cltang@codesourcery.com>
3061 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3063 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3065 * c-array-notation.c: Reorder #include's and remove duplicates.
3066 * c-aux-info.c: Likewise.
3067 * c-convert.c: Likewise.
3068 * c-decl.c: Likewise.
3069 * c-errors.c: Likewise.
3070 * c-lang.c: Likewise.
3071 * c-objc-common.c: Likewise.
3072 * c-parser.c: Likewise.
3073 * c-typeck.c: Likewise.
3075 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3078 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3079 after calling build_qualified_type.
3081 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3082 Thomas Schwinge <thomas@codesourcery.com>
3083 James Norris <jnorris@codesourcery.com>
3084 Joseph Myers <joseph@codesourcery.com>
3085 Julian Brown <julian@codesourcery.com>
3086 Bernd Schmidt <bschmidt@redhat.com>
3088 * c-parser.c (c_parser_oacc_shape_clause): New.
3089 (c_parser_oacc_simple_clause): New.
3090 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3091 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3093 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3094 James Norris <jnorris@codesourcery.com>
3095 Cesar Philippidis <cesar@codesourcery.com>
3099 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3100 parameters, and handle these. Adjust all users.
3101 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3103 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3105 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3107 (c_finish_omp_construct): Declare function.
3108 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3109 Merge functions into...
3110 (c_finish_omp_construct): ... this new function.
3112 2015-10-22 Richard Biener <rguenther@suse.de>
3114 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3115 before folding a MINUS_EXPR.
3117 2015-10-21 Marek Polacek <polacek@redhat.com>
3120 * c-decl.c (start_function): Warn about vararg functions without
3123 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3125 * c-typeck.c (build_conditional_expr): Use boolean vector
3126 type for vector comparison.
3127 (build_vec_cmp): New.
3128 (build_binary_op): Use build_vec_cmp for comparison.
3130 2015-10-20 Marek Polacek <polacek@redhat.com>
3132 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3134 2015-10-20 Marek Polacek <polacek@redhat.com>
3137 * c-parser.c (c_parser_attributes): Break out of the loop if the
3138 token after an attribute isn't a comma.
3140 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3141 Aldy Hernandez <aldyh@redhat.com>
3143 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3144 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3145 (c_parser_omp_variable_list): Handle structure elements for
3146 map, to and from clauses. Handle array sections in reduction
3147 clause. Formatting fixes.
3148 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3149 if clause modifiers.
3150 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3151 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3152 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3153 c_parser_omp_clause_is_device_ptr): New functions.
3154 (c_parser_omp_clause_ordered): Parse optional parameter.
3155 (c_parser_omp_clause_reduction): Handle array reductions.
3156 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3157 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3159 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3160 (c_parser_omp_clause_depend_sink): New function.
3161 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3162 (c_parser_omp_clause_map): Parse release/delete map kinds and
3163 optional always modifier.
3164 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3165 and c_finish_omp_clauses callers.
3166 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3167 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3168 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3169 (OMP_CRITICAL_CLAUSE_MASK): Define.
3170 (c_parser_omp_critical): Parse critical clauses.
3171 (c_parser_omp_for_loop): Handle doacross loops, adjust
3172 c_finish_omp_for and c_finish_omp_clauses callers.
3173 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3174 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3175 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3176 (c_parser_omp_for): Disallow ordered clause when combined with
3177 distribute. Disallow linear clause when combined with distribute
3178 and not combined with simd.
3179 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3180 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3181 parse clauses and if depend clause is found, don't parse a body.
3182 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3183 Allow target parallel without for after it.
3184 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3185 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3186 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3188 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3189 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3190 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3191 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3193 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3194 defaultmap and is_device_ptr clauses.
3195 (c_parser_omp_target): Parse target parallel and target simd. Set
3196 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3197 and target exit data. Diagnose invalid map kinds.
3198 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3199 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3201 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3203 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3204 (c_parser_omp_taskloop): New function.
3205 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3206 handle PRAGMA_OMP_TASKLOOP.
3207 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3208 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3209 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3210 Add IS_OMP argument, handle structure element bases, diagnose
3211 bitfields, pass IS_OMP recursively, diagnose known zero length
3212 array sections in depend clauses, handle array sections in reduction
3213 clause, diagnose negative length even for pointers.
3214 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3215 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3216 array sections in reduction clause, set
3217 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3218 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3219 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3220 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3222 2015-10-06 Marek Polacek <polacek@redhat.com>
3224 * c-parser.c (c_parser_statement_after_labels): Use
3225 protected_set_expr_location.
3226 (c_parser_omp_clause_num_gangs): Likewise.
3227 (c_parser_omp_clause_num_threads): Likewise.
3228 (c_parser_omp_clause_num_workers): Likewise.
3229 (c_parser_omp_clause_vector_length): Likewise.
3230 (c_parser_omp_clause_num_teams): Likewise.
3231 (c_parser_omp_clause_thread_limit): Likewise.
3232 * c-typeck.c (build_c_cast): Likewise.
3233 (c_cast_expr): Likewise.
3235 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3237 * c-typeck.c (c_tree_equal): Use real_equal instead of
3240 2015-10-04 Jason Merrill <jason@redhat.com>
3242 * c-parser.c (c_lex_one_token): Handle @synchronized.
3243 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3244 can change whether the function is transaction_safe.
3246 2015-10-02 Marek Polacek <polacek@redhat.com>
3249 * c-typeck.c (convert_for_assignment): Use the expansion point
3250 location throughout.
3252 2015-10-02 Marek Polacek <polacek@redhat.com>
3255 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3256 and pass it down to c_parser_if_statement.
3257 (c_parser_else_body): Add CHAIN parameter and pass it down to
3258 c_parser_statement_after_labels.
3259 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3260 duplicated if-else-if conditions.
3262 2015-10-01 Marek Polacek <polacek@redhat.com>
3264 * c-typeck.c (convert_for_assignment): Improve commentary.
3266 2015-09-30 Marek Polacek <polacek@redhat.com>
3269 * c-typeck.c (c_finish_return): Use the expansion point location for
3270 certain "return with value" warnings.
3272 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3274 * c-parser.c (pragma_lex): Add loc argument.
3276 2015-09-15 Marek Polacek <polacek@redhat.com>
3279 * c-decl.c (tag_exists_p): New function.
3280 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3281 struct/union/enum keywords are missing.
3282 * c-tree.h (tag_exists_p): Declare.
3284 2015-09-15 Marek Polacek <polacek@redhat.com>
3286 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3287 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3288 Return NULL_TREE instead of 0.
3289 (lookup_name): Return NULL_TREE instead of 0.
3290 (lookup_name_in_scope): Likewise.
3291 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3292 (parser_xref_tag): Use false instead of 0.
3293 (start_struct): Use true instead of 1.
3294 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3296 2015-09-14 Marek Polacek <polacek@redhat.com>
3298 * c-typeck.c (set_nonincremental_init_from_string): Use
3299 HOST_WIDE_INT_M1U when shifting a negative value.
3301 2015-09-09 Mark Wielaard <mjw@redhat.com>
3303 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3306 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3309 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3310 into OMP_FOR_PRE_BODY rather than before the loop.
3312 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3315 * c-parser.c (c_parser_oacc_all_clauses,
3316 c_parser_omp_all_clauses): Remove invalid clause from
3317 list of clauses even if parser->error is set.
3320 * c-parser.c (c_parser_omp_clause_aligned,
3321 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3323 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3327 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3328 instead of c_parser_unary_expression. If the result is !lvalue_p,
3329 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3331 2015-09-04 Marek Polacek <polacek@redhat.com>
3334 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3336 2015-09-03 Martin Sebor <msebor@redhat.com>
3339 * c-typeck.c (convert_arguments, parser_build_unary_op,
3340 build_conditional_expr, c_cast_expr, convert_for_assignment,
3341 build_binary_op, _objc_common_truthvalue_conversion): Call
3343 (c_decl_implicit): Define.
3345 2015-09-02 Marek Polacek <polacek@redhat.com>
3348 * c-parser.c (c_parser_enum_specifier): Give a better error for
3351 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3353 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3355 2015-08-12 Marek Polacek <polacek@redhat.com>
3357 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3360 2015-08-03 Marek Polacek <polacek@redhat.com>
3363 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3365 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3367 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3369 * c-parser.c (c_parser_if_body): Take token_indent_info
3370 argument. Call warn_for_misleading_indentation even when the
3371 body is a semicolon. Extract token_indent_infos corresponding
3372 to the guard, body and next tokens. Adjust call to
3373 warn_for_misleading_indentation accordingly.
3374 (c_parser_else_body): Likewise.
3375 (c_parser_if_statement): Likewise.
3376 (c_parser_while_statement): Likewise.
3377 (c_parser_for_statement): Likewise.
3379 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3380 Manuel López-Ibáñez <manu@gcc.gnu.org>
3382 * c-decl.c (get_parm_info): Remove static var. Update warning
3385 2015-07-27 Marek Polacek <polacek@redhat.com>
3389 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3391 2015-07-20 Marek Polacek <polacek@redhat.com>
3394 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3395 (build_binary_op): Warn about left shift overflows.
3397 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3399 * c-array-notation.c: Adjust includes for flags.h changes.
3400 * c-objc-common.c: Likewise.
3402 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3404 * c-array-notation.c: Adjust includes.
3405 * c-aux-info.c: Likewise.
3406 * c-convert.c: Likewise.
3407 * c-decl.c: Likewise.
3408 * c-errors.c: Likewise.
3409 * c-lang.c: Likewise.
3410 * c-objc-common.c: Likewise.
3411 * c-parser.c: Likewise.
3412 * c-typeck.c: Likewise.
3414 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3417 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3419 2015-06-29 Marek Polacek <polacek@redhat.com>
3422 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3423 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3424 about -Wswitch-bool here.
3425 (do_case): Update c_add_case_label call.
3426 (c_finish_case): Update c_do_switch_warnings call.
3428 2015-06-27 Marek Polacek <polacek@redhat.com>
3430 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3432 2015-06-26 Marek Polacek <polacek@redhat.com>
3434 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3436 * c-typeck.c (array_to_pointer_conversion): Likewise.
3437 (build_unary_op): Likewise.
3438 (c_finish_return): Likewise.
3440 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3442 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3443 * c-parser.c: Likewise.
3445 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3447 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3448 instead of pointer_hash.
3449 (detect_field_duplicates): Likewise.
3451 2015-06-25 Marek Polacek <polacek@redhat.com>
3453 * c-array-notation.c: Use VAR_P throughout.
3454 * c-decl.c: Likewise.
3455 * c-objc-common.c: Likewise.
3456 * c-parser.c: Likewise.
3457 * c-typeck.c: Likewise.
3459 2015-06-25 Marek Polacek <polacek@redhat.com>
3461 * c-decl.c: Use is_global_var throughout.
3462 * c-parser.c: Likewise.
3463 * c-typeck.c: Likewise.
3465 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3467 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3468 * c-aux-info.c: Likewise.
3469 * c-convert.c: Likewise.
3470 * c-decl.c: Likewise.
3471 * c-errors.c: Likewise.
3472 * c-lang.c: Likewise.
3473 * c-objc-common.c: Likewise.
3474 * c-parser.c: Likewise.
3475 * c-typeck.c: Likewise.
3477 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3480 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3483 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3485 * c-decl.c (pop_scope): Register the main translation unit
3486 through the new debug hook.
3488 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3490 * c-array-notation.c : Adjust include files.
3491 * c-aux-info.c : Likewise.
3492 * c-convert.c : Likewise.
3493 * c-decl.c : Likewise.
3494 * c-errors.c : Likewise.
3495 * c-lang.c : Likewise.
3496 * c-lang.h : Likewise.
3497 * c-objc-common.c : Likewise.
3498 * c-parser.c : Likewise.
3499 * c-typeck.c : Likewise.
3501 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3503 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3504 immediately clobber it.
3505 (c_write_global_declarations_1): Remove call to
3506 check_global_declaration_1.
3507 (c_write_global_declarations_2): Remove.
3508 (c_write_final_cleanups): Rename from c_write_global_declarations.
3509 Remove call to finalize_compilation_unit.
3510 Remove calls to debugging hooks.
3511 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3512 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3513 * c-tree.h: Remove c_write_global_declarations.
3515 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3517 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3518 * c-aux-info.c: Likewise.
3519 * c-convert.c: Likewise.
3520 * c-decl.c: Likewise.
3521 * c-errors.c: Likewise.
3522 * c-lang.c: Likewise.
3523 * c-objc-common.c: Likewise.
3524 * c-parser.c: Likewise.
3525 * c-typeck.c: Likewise.
3527 2015-06-04 Marek Polacek <polacek@redhat.com>
3530 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3533 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3535 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3536 Warn for empty struct.
3537 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3539 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3541 * c-decl.c (start_function): Call plugin before parsing.
3542 (finish_function): Call plugin after parsing.
3544 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3547 * c-decl.c (merge_decls): Merge DECL_COMMON.
3549 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3551 * Make-lang.in (check_gcc_pallelize): Define.
3553 2015-05-22 Marek Polacek <polacek@redhat.com>
3556 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3559 2015-05-21 Marek Polacek <polacek@redhat.com>
3561 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3564 2015-05-20 Marek Polacek <polacek@redhat.com>
3566 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3567 * c-typeck.c: Likewise.
3569 2015-05-19 Marek Polacek <polacek@redhat.com>
3571 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3573 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3576 * c-parser.c (c_parser_omp_for_loop): Don't add
3577 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3578 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3579 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3582 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3584 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3587 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3590 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3593 2015-05-14 Marek Polacek <polacek@redhat.com>
3597 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3600 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3602 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3603 to add a call to warn_for_misleading_indentation.
3604 (c_parser_else_body): Likewise, adding param "else_loc".
3605 (c_parser_if_statement): Check for misleading indentation.
3606 (c_parser_while_statement): Likewise.
3607 (c_parser_for_statement): Likewise.
3609 2015-05-08 Marek Polacek <polacek@redhat.com>
3612 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3613 (output_init_element): Likewise.
3615 2015-05-07 Marek Polacek <polacek@redhat.com>
3618 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3621 2015-04-30 Marek Polacek <polacek@redhat.com>
3623 * c-typeck.c (set_init_label): Call error_at instead of error and
3626 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3629 * c-typeck.c (c_build_va_arg): Clarify the error message.
3631 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3633 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3634 OMP_STANDALONE_CLAUSES.
3636 2015-04-28 Marek Polacek <polacek@redhat.com>
3638 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3640 2015-04-28 Marek Polacek <polacek@redhat.com>
3643 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3645 2015-04-25 Marek Polacek <polacek@redhat.com>
3648 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3651 2015-04-23 Marek Polacek <polacek@redhat.com>
3654 * c-decl.c (set_labels_context_r): New function.
3655 (store_parm_decls): Call it via walk_tree_without_duplicates.
3656 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3657 instead of create_tmp_var. Build TARGET_EXPR instead of
3659 (build_atomic_assign): Use create_tmp_var_raw instead of
3660 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3662 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3664 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3665 (c_parser_omp_target_update): Add missed %> to error_at ().
3667 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3670 * c-decl.c (c_default_pointer_mode): Remove definition.
3671 * c-tree.h (c_default_pointer_mode): Remove declaration.
3673 2015-03-27 Tobias Burnus <burnus@net-b.de>
3676 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3678 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3679 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3680 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3682 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3684 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3685 attribute for DECL_EXTERNAL VAR_DECLs.
3687 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3689 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3692 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3695 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3696 before preparing arguments to warn_logical_not_parentheses.
3698 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3701 * c-typeck.c (parser_build_binary_op): Don't warn for
3702 !!x == y or !b == y where b is _Bool.
3704 2015-03-09 Marek Polacek <polacek@redhat.com>
3706 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3707 * c-decl.c (grokdeclarator): Likewise.
3708 * c-typeck.c (build_binary_op): Likewise.
3710 2015-02-27 Marek Polacek <polacek@redhat.com>
3713 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3715 2015-02-14 Marek Polacek <polacek@redhat.com>
3718 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3719 declared through a typedef name.
3721 2015-02-13 Marek Polacek <polacek@redhat.com>
3724 * c-decl.c (grokdeclarator): Print also the type when giving
3725 the error message about array's incomplete element type.
3727 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3730 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3731 check in the POP macro.
3733 2015-02-09 Marek Polacek <polacek@redhat.com>
3736 * c-typeck.c (process_init_element): Don't always wrap
3737 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3738 initializing a range of elements.
3740 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3744 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3746 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3748 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3749 processing enum declaration.
3751 2015-01-29 Marek Polacek <polacek@redhat.com>
3754 * c-typeck.c (pop_init_level): If constructor_elements has
3755 exactly one element with integer_zerop value, set constructor_zeroinit
3756 to 1. Remove braces around warning_init call.
3758 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3761 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3762 of FUNCTION_DECLs with error_mark_node.
3764 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3767 * c-typeck.c (convert_arguments): Return -1 if there are
3768 error_args, even if we've diagnosed too many arguments.
3770 2015-01-21 Richard Biener <rguenther@suse.de>
3773 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3774 for builtins the user declared correctly.
3776 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3777 Bernd Schmidt <bernds@codesourcery.com>
3778 Cesar Philippidis <cesar@codesourcery.com>
3779 James Norris <jnorris@codesourcery.com>
3780 Jakub Jelinek <jakub@redhat.com>
3781 Ilmir Usmanov <i.usmanov@samsung.com>
3783 * c-parser.c: Include "gomp-constants.h".
3784 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3785 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3786 Use OMP_CLAUSE_SET_MAP_KIND.
3787 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3788 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3789 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3790 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3791 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3792 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3793 "copyout", "create", "delete", "deviceptr", "gang", "host",
3794 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3795 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3796 "present_or_create", "pcreate", "seq", "self", "vector",
3797 "vector_length", "wait", "worker".
3798 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3799 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3800 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3801 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3802 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3803 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3804 (c_parser_oacc_data_clause_deviceptr)
3805 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3806 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3807 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3808 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3809 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3810 (c_parser_oacc_parallel, c_parser_oacc_update)
3811 (c_parser_oacc_wait): New functions.
3812 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3813 (c_finish_oacc_data): New prototypes.
3814 * c-typeck.c: Include "gomp-constants.h".
3815 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3816 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3817 OMP_CLAUSE_SET_MAP_KIND.
3818 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3819 (c_finish_oacc_data): New functions.
3820 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3821 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3822 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3823 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3824 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3825 GOMP_MAP_FORCE_DEVICEPTR.
3827 2015-01-09 Michael Collison <michael.collison@linaro.org>
3829 * c-array-notation.c: Include hash-set.h, machmode.h,
3830 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3831 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3832 * c-aux-info.c: Ditto.
3833 * c-convert.c: Ditto.
3835 * c-errors.c: Ditto.
3836 * c-lang.c: Dittoxs.
3837 * c-objc-common.c: Ditto.
3838 * c-parser.c: Ditto.
3839 * c-typeck.c: Include hash-set.h, machmode.h,
3840 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3841 fold-const.h, wide-int.h, inchash.h, real.h and
3842 fixed-value.h due to flattening of tree.h.
3844 2015-01-07 Marek Polacek <polacek@redhat.com>
3847 * c-typeck.c (process_init_element): Disallow initialization of
3848 a flexible array member with a string constant if the structure
3851 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3854 * c-typeck.c (convert_for_assignment, c_finish_return): For
3855 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3856 types also set in_late_binary_op around convert call.
3857 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3858 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3859 result on expr as last argument to ubsan_instrument_float_cast,
3860 if in_late_binary_op, don't use c_save_expr but save_expr.
3862 Update copyright years.
3864 2015-01-05 Marek Polacek <polacek@redhat.com>
3867 * c-typeck.c (build_array_ref): Pass loc down to
3868 warn_array_subscript_with_type_char.
3870 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3872 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3873 (common-pointer-type): For pointers to arrays take qualifiers from
3875 (build_conditional_expr): Add warnings for lost qualifiers.
3876 (comp-target-types): Allow pointers to arrays with different qualifiers.
3877 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3878 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3879 to PEDWARN_FOR_QUALIFIERS.
3881 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3884 * c-convert.c: Include ubsan.h.
3885 (convert): For real -> integral casts and
3886 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3887 instead instrument the float cast directly.
3889 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3891 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3892 c_finish_stmt_expr): Remove NULL last argument from
3893 create_tmp_var_raw and create_tmp_var calls.
3894 * c-array-notation.c (fix_builtin_array_notation_fn,
3895 build_array_notation_expr, fix_conditional_array_notations_1,
3896 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3898 2014-11-28 Marek Polacek <polacek@redhat.com>
3901 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3902 convert the right operand to integer type.
3904 2014-11-25 Marek Polacek <polacek@redhat.com>
3907 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3908 for inline functions.
3910 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3913 * c-typeck.c (build_array_ref): Adjust
3914 convert_vector_to_pointer_for_subscript caller. If it returns true,
3915 call non_lvalue_loc on the result.
3917 2014-11-11 Richard Biener <rguenther@suse.de>
3919 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3922 2014-11-10 Andi Kleen <ak@linux.intel.com>
3925 * c-parser.c (c_parser_statement_after_labels): Call
3927 (c_parser_if_statement): Dito.
3928 (c_parser_switch_statement): Dito.
3929 (c_parser_while_statement): Dito.
3930 (c_parser_do_statement): Dito.
3931 (c_parser_for_statement): Dito.
3932 * c-typeck.c (c_finish_loop): Dito.
3934 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3936 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3937 OPT_Wshift_count_overflow in the warnings.
3939 2014-10-30 Marek Polacek <polacek@redhat.com>
3941 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3942 print the stripped version as well, if they're not the same.
3944 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3946 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3949 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3951 * c-decl.c: Adjust include files.
3952 * c-parser.c: Ditto.
3954 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3955 Tom Tromey <tromey@redhat.com>
3957 * c-tree.h (enum c_oracle_request): New.
3958 (c_binding_oracle_function): New typedef.
3959 (c_binding_oracle, c_pushtag, c_bind): Declare.
3960 * c-decl.c (c_binding_oracle): New global.
3961 (I_SYMBOL_CHECKED): New macro.
3962 (i_symbol_binding): New function.
3963 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3964 (I_TAG_CHECKED): New macro.
3965 (i_tag_binding): New function.
3966 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3967 (I_LABEL_CHECKED): New macro.
3968 (i_label_binding): New function.
3969 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3970 (c_print_identifier): Save and restore c_binding_oracle.
3971 (c_pushtag, c_bind): New functions.
3973 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3975 * c-typeck.c: Adjust include files.
3977 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3980 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3981 initialization here...
3982 (c_initialize_diagnostics): ... but here. Set defaults after
3983 building pretty-printer.
3985 2014-10-23 Marek Polacek <polacek@redhat.com>
3988 * c-decl.c (pop_scope): Don't print warning in external_scope.
3990 2014-10-19 Marek Polacek <polacek@redhat.com>
3993 * c-typeck.c (output_init_element): Allow initializing objects with
3994 static storage duration with compound literals even in C99 and add
3997 2014-10-17 Marek Polacek <polacek@redhat.com>
4000 * c-typeck.c (digest_init): Allow initializing objects with static
4001 storage duration with compound literals even in C99 and add pedwarn
4004 2014-10-17 Marek Polacek <polacek@redhat.com>
4007 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4008 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4009 error multiple times. Print the type.
4011 2014-10-17 Marek Polacek <polacek@redhat.com>
4014 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4017 2014-10-17 Marek Polacek <polacek@redhat.com>
4019 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4020 (start_function): Use OPT_Wimplicit_int instead of 0.
4021 (store_parm_decls_oldstyle): Likewise.
4023 2014-10-17 Alan Modra <amodra@gmail.com>
4026 * c-decl.c (merge_decls): Don't merge section name or tls model
4027 to newdecl symtab node, instead merge to olddecl. Override
4028 existing olddecl section name. Set tls_model for all thread-local
4029 vars, not just OMP thread-private ones. Remove incorrect comment.
4031 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4033 * c-decl.c: Adjust include files.
4035 2014-10-14 DJ Delorie <dj@redhat.com>
4037 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4038 (c_token_starts_typename): Check all __intN, not just __int128.
4039 (c_token_starts_declspecs): Likewise.
4040 (c_parser_declspecs): Likewise.
4041 (c_parser_attribute_any_word): Likewise.
4042 (c_parser_objc_selector): Likewise.
4043 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4044 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4046 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4048 (finish_declspecs): Likewise.
4050 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4052 * c-parser.c (c_parser_all_labels): New function to replace
4054 (c_parser_statement): Call the new function.
4056 2014-10-09 Marek Polacek <polacek@redhat.com>
4059 * c-typeck.c (pop_init_level): Don't warn about initializing
4062 2014-10-07 Marek Polacek <polacek@redhat.com>
4065 * c-decl.c (header_for_builtin_fn): New function.
4066 (implicitly_declare): Suggest which header to include.
4068 2014-10-07 Marek Polacek <polacek@redhat.com>
4070 * c-convert.c (convert): Use error_operand_p.
4071 * c-typeck.c (require_complete_type): Likewise.
4072 (really_atomic_lvalue): Likewise.
4073 (digest_init): Likewise.
4074 (handle_omp_array_sections_1): Likewise.
4076 2014-10-03 Marek Polacek <polacek@redhat.com>
4079 * c-decl.c (pop_scope): Don't warn about "inline function declared
4080 but never defined" for functions marked with gnu_inline attribute.
4082 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4085 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4086 on low_bound and length.
4088 2014-09-24 Marek Polacek <polacek@redhat.com>
4092 * c-parser.c: Don't define CPP_KEYWORD.
4093 (c_parser_switch_statement): Pass original type to c_finish_case.
4094 * c-tree.h (c_finish_case): Update declaration.
4095 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4096 conditionally to c_do_switch_warnings.
4098 2014-09-03 Marek Polacek <polacek@redhat.com>
4101 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4104 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4105 Balaji V. Iyer <balaji.v.iyer@intel.com>
4106 Igor Zamyatin <igor.zamyatin@intel.com>
4108 * c-parser.c (c_parser_cilk_for): New function.
4109 (c_parser_cilk_grainsize): Likewise.
4110 (c_get_temp_regvar): Likewise.
4111 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4112 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4113 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4114 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4117 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4119 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4120 with using HOST_WIDE_INT without truncation to 'int'
4122 2014-08-22 Marek Polacek <polacek@redhat.com>
4125 * c-typeck.c (parser_build_binary_op): Adjust call to
4126 warn_logical_not_parentheses.
4128 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4131 * c-parser.c (c_parser_array_notation): Check for correct
4132 type of an array added.
4134 2014-08-19 Marek Polacek <polacek@redhat.com>
4137 * c-typeck.c (build_binary_op): If either operand of a comparison
4138 is a boolean expression, call maybe_warn_bool_compare.
4140 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4143 * c-typeck.c (build_c_cast): Do a conversion even when the
4144 TYPE_MAIN_VARIANTs are the same.
4146 2014-08-19 Marek Polacek <polacek@redhat.com>
4148 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4149 pedwarn_c99 instead of pedwarn.
4150 (grokfield): Likewise.
4151 (warn_defaults_to): New function.
4152 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4153 Unconditionally call pedwarn_c99 instead of pedwarn.
4154 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4155 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4156 check flag_isoc11 before.
4157 * c-errors.c (pedwarn_c99): Change the return type to bool.
4158 Handle -Wc99-c11-compat.
4159 * c-parser.c (disable_extension_diagnostics): Handle
4160 warn_c99_c11_compat.
4161 (restore_extension_diagnostics): Likewise.
4162 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4163 instead of pedwarn, don't check flag_isoc11 before.
4164 (c_parser_declspecs): Likewise.
4165 (c_parser_alignas_specifier): Likewise.
4166 (c_parser_alignof_expression): Likewise.
4167 (c_parser_generic_selection): Likewise.
4168 * c-tree.h (pedwarn_c99): Update declaration.
4169 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4172 2014-08-19 Marek Polacek <polacek@redhat.com>
4174 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4176 * c-errors.c: Include "opts.h".
4177 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4178 * c-parser.c (disable_extension_diagnostics): Handle negative value
4179 of warn_c90_c99_compat, too.
4180 (restore_extension_diagnostics): Likewise.
4181 (c_parser_compound_statement_nostart): Pass
4182 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4184 2014-08-12 Marek Polacek <polacek@redhat.com>
4186 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4188 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4190 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4192 2014-08-10 Marek Polacek <polacek@redhat.com>
4195 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4196 Call pedwarn_c90 instead of pedwarn.
4197 (check_bitfield_type_and_width): Likewise.
4198 (declspecs_add_qual): Likewise.
4199 (declspecs_add_type): Likewise.
4200 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4201 Adjust to only call pedwarn_c90.
4202 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4203 pedwarn_c90 instead of pedwarn.
4204 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4205 * c-parser.c (disable_extension_diagnostics): Handle
4206 warn_c90_c99_compat.
4207 (restore_extension_diagnostics): Likewise.
4208 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4209 pedwarn_c90 instead of pedwarn.
4210 (c_parser_initelt): Likewise.
4211 (c_parser_postfix_expression): Likewise.
4212 (c_parser_postfix_expression_after_paren_type): Likewise.
4213 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4214 * c-tree.h: Fix formatting.
4215 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4216 pedwarn_c90 instead of pedwarn.
4218 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4220 * c-typeck.c: Remove include of pointer-set.h.
4222 2014-08-07 Marek Polacek <polacek@redhat.com>
4224 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4226 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4228 * c-typeck.c: Use hash_map instead of pointer_map.
4230 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4232 * c-decl.c: Use hash_set instead of pointer_set.
4234 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4237 * c-array-notation.c (expand_array_notations): Handling
4240 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4243 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4246 2014-07-30 Tom Tromey <tromey@redhat.com>
4248 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4250 (really_start_incremental_init, push_init_level): Initialize
4252 (pop_init_level): Set global designator_depth.
4253 (process_init_element): Check for designated_init attribute.
4255 2014-07-20 Marek Polacek <polacek@redhat.com>
4258 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4259 (implicitly_declare): Pass location to implicit_decl_warning.
4261 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4264 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4265 If non-NULL, call c_parser_check_literal_zero.
4266 (c_parser_check_literal_zero): New function.
4267 (c_parser_postfix_expression_after_primary): Adjust
4268 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4270 2014-07-06 Marek Polacek <polacek@redhat.com>
4273 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4274 * c-tree.h (C_ARRAY_PARAMETER): Define.
4275 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4278 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4279 Chen Gang <gang.chen.5i5j@gmail.com>
4281 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4284 2014-07-01 Marek Polacek <polacek@redhat.com>
4286 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4287 instead of 0 to WARN_FOR_ASSIGNMENT.
4289 2014-07-01 Marek Polacek <polacek@redhat.com>
4292 * c-typeck.c (convert_for_assignment): Pass
4293 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4295 2014-06-30 Marek Polacek <polacek@redhat.com>
4297 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4298 has no_sanitize_undefined attribute.
4300 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4303 * c-array-notation.c (fix_builtin_array_notation_fn):
4304 Check for 0 arguments in builtin call. Check that bultin argument is
4306 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4309 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4311 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4312 qualifiers in __auto_type for atomic types.
4313 (c_parser_typeof_specifier): Discard all type qualifiers in
4314 __typeof__ for atomic types.
4316 2014-06-25 Marek Polacek <polacek@redhat.com>
4319 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4320 the return expression to c_finish_return.
4322 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4324 * c-typeck.c (c_finish_omp_clauses): Make sure
4325 OMP_CLAUSE_LINEAR_STEP has correct type.
4327 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4331 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4333 * c-parser.c (c_parser_omp_for_loop): For
4334 #pragma omp parallel for simd move lastprivate clause from parallel
4335 to for rather than simd.
4337 2014-06-23 Marek Polacek <polacek@redhat.com>
4339 * c-typeck.c (parser_build_binary_op): Don't call
4340 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4342 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4344 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4345 * c-decl.c (merge_decls): Likewise.
4347 2014-06-09 Marek Polacek <polacek@redhat.com>
4350 * c-typeck.c (error_init): Call inform instead of error_at.
4351 (pedwarn_init): Call inform instead of pedwarn.
4352 (warning_init): Call inform instead of warning_at.
4354 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4356 * c-decl.c (merge_decls): Use set_decl_section_name.
4357 (duplicate_decls): Remove node if it exists.
4359 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4362 * c-typeck.c (push_init_level, process_init_element,
4363 pop_init_level): Correct check for zero initialization, move
4364 missing brace warning to respect zero initialization.
4366 2014-06-05 Marek Polacek <polacek@redhat.com>
4369 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4371 2014-06-05 Marek Polacek <polacek@redhat.com>
4374 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4375 on the left hand side operand of a comparison.
4377 2014-06-05 Marek Polacek <polacek@redhat.com>
4380 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4381 Print note only if the warning was printed.
4383 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4386 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4389 2014-06-03 Marek Polacek <polacek@redhat.com>
4392 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4394 * c-tree.h (c_start_case): Update.
4395 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4396 switch condition has boolean value.
4398 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4400 * c-decl.c: Include builtins.h.
4401 * c-parser.c: Likewise.
4403 2014-05-27 Marek Polacek <polacek@redhat.com>
4406 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4407 error and warning calls to error_at and warning_at. Pass location of
4408 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4409 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4410 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4412 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4415 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4416 function parameters.
4418 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4420 * c-decl.c (merge_decls): Preserve symtab node pointers.
4421 (duplicate_decls): Free new decl.
4423 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4425 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4428 * c-parser.c (c_parser_omp_target): Return bool values.
4430 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4432 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4433 num_teams_loc variable to num_thread_limit_loc.
4435 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4437 * c-array-notation.c (expand_array_notations): Use void_node
4438 instead of void_zero_node.
4440 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4442 * c-decl.c (finish_struct): Adjust.
4443 (finish_enum): Likewise.
4445 (record_inline_static): Likewise.
4446 (push_scope): Likewise.
4447 (make_label): Likewise.
4448 (lookup_label_for_goto): Likewise.
4449 (finish_struct): Likewise.
4450 (finish_enum): Likewise.
4451 (store_parm_decls): Likewise.
4452 (c_push_function_context): Likewise.
4453 * c-lang.h: Remove usage of variable_size gty attribute.
4454 * c-parser.c (c_parse_init): Adjust.
4455 (c_parse_file): Likewise.
4457 2014-05-13 Marek Polacek <polacek@redhat.com>
4460 * c-typeck.c (convert_for_assignment): Pass location to
4461 WARN_FOR_ASSIGNMENT instead of input_location.
4463 2014-05-10 Marek Polacek <polacek@redhat.com>
4465 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4466 maybe_warn_string_init.
4467 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4468 maybe_warn_string_init.
4469 * c-tree.h (maybe_warn_string_init): Update declaration.
4470 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4471 Call pedwarn_init with loc instead of with input_location.
4472 (digest_init): Pass init_loc to maybe_warn_string_init.
4473 (pop_init_level): Call pedwarn_init with loc instead of with
4475 (set_init_index): Likewise.
4476 (process_init_element): Likewise.
4478 2014-05-09 Marek Polacek <polacek@redhat.com>
4481 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4482 (c_parser_initelt): Pass location to set_init_label. Pass array index
4483 location to set_init_index.
4484 * c-tree.h (push_init_level): Update declaration.
4485 (pop_init_level): Likewise.
4486 (set_init_index): Likewise.
4487 (set_init_label): Likewise.
4488 * c-typeck.c (error_init): Add location parameter. Call error_at
4490 (digest_init): Pass init_loc to error_init.
4491 (really_start_incremental_init):
4492 (push_init_level): Add location parameter. Pass loc to pop_init_level
4494 (pop_init_level): Likewise.
4495 (set_designator): Add location parameter. Pass loc to pop_init_level,
4496 push_init_level, and error_init.
4497 (set_init_index): Add location parameter. Pass loc to error_init and
4499 (set_init_label): Likewise.
4500 (output_init_element): Pass loc to error_init.
4501 (process_init_element): Pass loc to error_init, pop_init_level,
4502 pedwarn_init, and push_init_level.
4504 2014-05-09 Marek Polacek <polacek@redhat.com>
4507 * c-parser.c (c_parser_attributes): Parse the arguments as an
4508 expression-list if the attribute takes identifier.
4510 2014-05-08 Marek Polacek <polacek@redhat.com>
4513 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4516 2014-05-08 Marek Polacek <polacek@redhat.com>
4519 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4522 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4523 Mike Stump <mikestump@comcast.net>
4524 Richard Sandiford <rdsandiford@googlemail.com>
4526 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4527 (finish_enum): Use wide-int interfaces.
4528 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4529 * c-typeck.c (build_c_cast): Likewise.
4530 (set_nonincremental_init_from_string): Likewise.
4531 (c_tree_equal): Likewise.
4533 2014-05-02 Marek Polacek <polacek@redhat.com>
4536 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4537 Return size_one_node when the type is not complete.
4538 (pointer_diff): Remove comment.
4539 (build_unary_op): Improve error messages.
4541 2014-05-02 Marek Polacek <polacek@redhat.com>
4543 * c-typeck.c (c_finish_return): Separate warning_at calls.
4545 2014-05-02 Marek Polacek <polacek@redhat.com>
4547 * c-tree.h (error_init): Remove declaration.
4548 (pedwarn_init): Likewise.
4549 * c-typeck.c (error_init): Make static and move above.
4550 (pedwarn_init): Likewise.
4551 (warning_init): Move above.
4552 (maybe_warn_string_init): Likewise.
4554 2014-05-01 Jeff Law <law@redhat.com>
4558 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4559 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4562 2014-05-02 Marek Polacek <polacek@redhat.com>
4565 * c-typeck.c (push_init_level): Set constructor_designated to
4566 p->designated for structures.
4568 2014-05-01 Marek Polacek <polacek@redhat.com>
4571 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4572 function-definition has an attribute after the declarator.
4574 2014-05-01 Marek Polacek <polacek@redhat.com>
4577 * c-typeck.c (warning_init): Add location_t parameter. Call
4578 warning_at instead of warning.
4579 (push_init_level): Pass input_location to warning_init.
4580 (add_pending_init): Add location_t parameter. Pass loc to
4582 (set_nonincremental_init): Pass input_location to add_pending_init.
4583 (set_nonincremental_init_from_string): Likewise.
4584 (output_init_element): Pass loc to warning_init and to
4587 2014-05-01 Marek Polacek <polacek@redhat.com>
4590 * c-typeck.c (c_finish_return): Distinguish between label and variable
4591 when warning about returning local address.
4593 2014-05-01 Marek Polacek <polacek@redhat.com>
4596 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4599 2014-05-01 Marek Polacek <polacek@redhat.com>
4602 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4603 instead of 0 to WARN_FOR_QUALIFIERS.
4605 2014-05-01 Marek Polacek <polacek@redhat.com>
4608 * c-typeck.c (default_conversion): Use better location for
4611 2014-04-30 Marek Polacek <polacek@redhat.com>
4613 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4614 also when SANITIZE_FLOAT_DIVIDE is on.
4616 2014-04-30 Marek Polacek <polacek@redhat.com>
4619 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4620 and pedwarn_init. Use loc insted of input_location.
4622 2014-04-30 Marek Polacek <polacek@redhat.com>
4625 * c-typeck.c (build_binary_op): Use location when warning about
4628 2014-04-25 Marek Polacek <polacek@redhat.com>
4631 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4632 always_inline/noinline and hot/cold attributes.
4634 2014-04-25 Marek Polacek <polacek@redhat.com>
4637 * c-parser.c (c_parser_initelt): Pass input_location to
4638 process_init_element.
4639 (c_parser_initval): Pass loc to process_init_element.
4640 * c-tree.h (process_init_element): Adjust declaration.
4641 * c-typeck.c (push_init_level): Pass input_location to
4642 process_init_element.
4643 (pop_init_level): Likewise.
4644 (set_designator): Likewise.
4645 (output_init_element): Add location_t parameter. Pass loc to
4647 (output_pending_init_elements): Pass input_location to
4648 output_init_element.
4649 (process_init_element): Add location_t parameter. Pass loc to
4650 output_init_element.
4652 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4654 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4655 atomic-clause, allow comma in between atomic-clause and
4658 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4661 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4662 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4664 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4667 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4668 create_tmp_var instead build_decl for creating temps.
4669 (build_array_notation_expr): Likewise.
4670 (fix_conditional_array_notations_1): Likewise.
4671 (fix_array_notation_expr): Likewise.
4672 (fix_array_notation_call_expr): Likewise.
4674 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4677 * c-tree.h (c_build_function_call_vec): New prototype.
4678 * c-typeck.c (build_function_call_vec): Don't call
4679 resolve_overloaded_builtin here.
4680 (c_build_function_call_vec): New wrapper function around
4681 build_function_call_vec. Call resolve_overloaded_builtin here.
4682 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4683 Call c_build_function_call_vec instead of build_function_call_vec.
4684 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4685 * c-decl.c (finish_decl): Likewise.
4687 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4690 * c-typeck.c: Use correct format string in cast-qual warning
4692 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4694 * c-decl.c (c_decl_attributes): Use
4695 lang_hooks.types.omp_mappable_type.
4696 * c-typeck.c (c_finish_omp_clauses): Likewise.
4698 2014-03-06 Marek Polacek <polacek@redhat.com>
4701 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4702 of checking tree code.
4704 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4706 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4707 (c_parser_parameter_declaration): Likewise.
4709 2014-02-19 Marek Polacek <polacek@redhat.com>
4712 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4713 Call mark_exp_read on exp.value.
4714 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4715 TREE_ADDRESSABLE on old instead of val.
4716 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4718 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4720 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4721 C_EXPR_APPEND by vec_safe_push.
4722 * c-tree.h (C_EXPR_APPEND): Remove.
4724 2014-01-31 Marek Polacek <polacek@redhat.com>
4727 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4728 build_function_call_vec.
4729 (build_function_call): Likewise.
4730 (build_atomic_assign): Likewise.
4731 (build_function_call_vec): Add arg_loc parameter. Use it.
4732 (convert_arguments): Likewise.
4733 (convert_for_assignment): Rename rhs_loc to expr_loc.
4734 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4735 (c_parser_objc_keywordexpr): Likewise.
4736 (c_parser_postfix_expression_after_primary): Call
4737 build_function_call_vec with expr_loc rather than op_loc.
4738 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4739 build_function_call_vec.
4740 (c_parser_expr_list): Add locations parameter. Fill it with locations
4741 of function arguments.
4742 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4744 2014-01-30 Marek Polacek <polacek@redhat.com>
4747 * c-typeck.c (build_function_call_vec): Use loc parameter.
4748 (convert_arguments): Add location parameter. Use it.
4749 (ep_convert_and_check): Likewise.
4750 (build_atomic_assign): Adjust convert_for_assignment call.
4751 (build_modify_expr): Likewise.
4752 (digest_init): Likewise.
4753 (c_finish_return): Likewise.
4754 (build_conditional_expr): Adjust ep_convert_and_check calls.
4755 (convert_for_assignment): Add rhs_loc parameter. Use it.
4756 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4759 2014-01-30 Richard Biener <rguenther@suse.de>
4762 * c-typeck.c (build_function_call_vec): Do not replace calls
4763 to a function via an incompatible type with a runtime abort.
4765 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4767 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4768 flag_enable_cilkplus with flag_cilkplus.
4769 (c_parser_direct_declarator_inner): Likewise.
4770 (c_parser_attribute_any_word): Likewise.
4771 (c_parser_attributes): Likewise.
4772 (c_parser_compound_statement): Likewise.
4773 (c_parser_statement_after_labels): Likewise.
4774 (c_parser_if_statement): Likewise.
4775 (c_parser_switch_statement): Likewise.
4776 (c_parser_do_statement): Likewise.
4777 (c_parser_for_statement): Likewise.
4778 (c_parser_unary_expression): Likewise.
4779 (c_parser_postfix_expression): Likewise.
4780 (c_parser_postfix_expression_after_primary): Likewise.
4781 (c_parser_postfix_expression_after_primary): Likewise.
4782 (c_parser_omp_clause_name): Likewise.
4783 (c_finish_omp_declare_simd): Likewise.
4784 (c_parser_cilk_verify_simd): Likewise.
4785 * c-typeck.c (build_array_ref): Likewise.
4786 (build_function_call_vec): Likewise.
4787 (convert_arguments): Likewise.
4788 (build_compound_expr): Likewise.
4789 (c_finish_return): Likewise.
4790 (c_finish_if_stmt): Likewise.
4791 (c_finish_loop): Likewise.
4792 (build_binary_op): Likewise.
4794 2014-01-23 Marek Polacek <polacek@redhat.com>
4797 * c-typeck.c (parser_build_binary_op): Use location instead of
4799 (build_binary_op): Pass location to shorten_compare.
4801 2014-01-23 Marek Polacek <polacek@redhat.com>
4804 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4807 2014-01-23 Marek Polacek <polacek@redhat.com>
4810 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4811 of a comma expression.
4812 (emit_side_effect_warnings): Likewise.
4814 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4817 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4818 function to use walk_tree and moved a lot of its functionality to
4819 expand_array_notations.
4820 (expand_array_notations): New function.
4822 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4824 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4825 attribute an attribute without value.
4827 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4830 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4831 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4833 2014-01-22 Marek Polacek <polacek@redhat.com>
4836 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4837 of remove_c_maybe_const_expr on op1 and op2.
4839 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4842 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4843 effects, preevaluate rhs using SAVE_EXPR first.
4845 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4848 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4849 statements with if-elseif statements.
4851 2014-01-06 Marek Polacek <polacek@redhat.com>
4854 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4855 defined bit-field types only in ISO C.
4857 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4859 Update copyright years
4861 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4863 * c-array-notation.c: Use the standard form for the copyright notice.
4865 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4867 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4868 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4869 field in parser is not empty. If not-empty, call the function
4870 c_parser_finish_omp_declare_simd.
4871 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4872 between SIMD-enabled functions and #pragma simd. Added new parameter.
4873 (c_parser_cilk_all_clauses): Modified the usage of the function
4874 c_parser_cilk_clause_vectorlength as mentioned above.
4875 (c_parser_cilk_simd_fn_vector_attrs): New function.
4876 (c_finish_cilk_simd_fn_tokens): Likewise.
4877 (is_cilkplus_vector_p): Likewise.
4878 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4879 "nomask," and "mask" strings in clause name.
4880 (c_parser_omp_all_clauses): Added 3 new case statements:
4881 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4882 PRAGMA_CILK_CLAUSE_NOMASK.
4883 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4884 check for vector attribute and if so call the function
4885 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4886 called the function c_finish_cilk_simd_fn_tokens.
4887 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4888 parser field is non-empty. If so, parse them as you would parse
4889 the omp declare simd pragma.
4890 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4891 Added a check when step is a parameter and flag it as error.
4892 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4893 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4896 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4898 * c-parser.c (c_parser_omp_parallel): Fix description.
4900 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4902 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4903 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4904 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4905 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4907 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4910 * c-parser.c (c_parser_alignas_specifier): Use
4911 c_sizeof_or_alignof_type instead of c_alignof.
4912 (c_parser_alignof_expression): Likewise, with min_alignof
4913 parameter depending on alignof spelling used.
4915 2013-12-04 Marek Polacek <polacek@redhat.com>
4918 * c-decl.c (start_function): Don't warn for missing prototype for
4921 2013-12-03 Marek Polacek <polacek@redhat.com>
4924 * c-decl.c (build_compound_literal): Allow compound literals with
4925 empty initial value.
4927 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4930 * c-typeck.c (build_modify_expr): Diagnose assignment to
4931 expression with array type.
4933 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4936 * c-typeck.c (process_init_element): Do not treat a string as
4937 initializing a whole array when used with a designator for an
4940 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4943 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4944 an inline function following a static declaration.
4946 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4949 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4950 to p_name before calling c_parser_omp_teams instead of after.
4951 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4952 argument. Remove unused p_name variable.
4954 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4955 Jakub Jelinek <jakub@redhat.com>
4957 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4958 external_scope is NULL.
4960 2013-11-27 Tom de Vries <tom@codesourcery.com>
4961 Marc Glisse <marc.glisse@inria.fr>
4964 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4966 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4968 * c-typeck.c: Add required include files from gimple.h.
4970 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4972 * c-decl.c (define_label, shadow_tag_warned)
4973 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4974 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4975 (declspecs_add_type): Remove use of in_system_header macro.
4976 * c-parser.c (c_parser_unary_expression): Likewise.
4977 * c-typeck.c (store_init_value, process_init_element)
4978 (c_start_case): Likewise.
4980 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4983 * c-parser.c (c_parser_set_source_position_from_token): Remove
4984 reference to in_system_header from comment.
4986 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4988 * c-decl.c (grokdeclarator): Update comment to refer to
4989 tree_to_[su]hwi rather than tree_low_cst.
4991 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4993 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4994 tree_to_uhwi throughout.
4996 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4998 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5001 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5003 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5006 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5008 * c-parser.c (c_parser_cilk_simd): New.
5009 (c_parser_cilk_verify_simd): New.
5010 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5011 (c_parser_omp_for_loop): Add case for NE_EXPR.
5012 Set c_break_label for CILK_SIMD.
5013 (c_parser_cilk_clause_vectorlength): New.
5014 (c_parser_cilk_clause_linear): New.
5015 (c_parser_cilk_clause_name): New.
5016 (c_parser_cilk_all_clauses): New.
5017 * c-typeck.c (build_unary_op): Pass location argument to
5019 (build_modify_expr): Same.
5020 (build_asm_expr): Same.
5021 (c_finish_bc_stmt): Error on break/continue in loops.
5023 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5025 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5027 2013-11-14 Diego Novillo <dnovillo@google.com>
5029 * c-decl.c: Include print-tree.h.
5030 Include stor-layout.h.
5033 Include stringpool.h.
5034 * c-lang.c: Include fold-const.h.
5035 * c-parser.c: Include stringpool.h.
5037 Include stor-layout.h.
5039 Include trans-mem.h.
5040 * c-typeck.c: Include stor-layout.h.
5041 Include trans-mem.h.
5045 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5047 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5048 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5050 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5051 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5053 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5054 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5055 (c_parser_declarator, c_parser_direct_declarator_inner)
5056 (c_parser_parameter_declaration, c_parser_type_name): All callers
5058 (c_parser_declaration_or_fndef): Handle declarations with type
5059 determined from the initializer.
5061 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5063 * c-typeck.c: Include gimplify.h.
5065 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5067 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5068 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5070 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5071 or _Thread_local as appropriate in diagnostics.
5072 (build_null_declspecs): Initialize ret->thread_gnu_p.
5073 (declspecs_add_scspec): Handle either __thread or _Thread_local
5074 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5075 pedantic. Do not disallow _Thread_local extern and _Thread_local
5078 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5079 Andrew MacLeod <amacleod@redhat.com>
5081 * c-aux-info.c (gen_type): Handle atomic qualifier.
5082 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5083 qualifiers when compating types.
5084 (shadow_tag_warned): Handle atomic_p in declspecs.
5085 (quals_from_declspecs): Likewise.
5086 (start_decl): Use c_type_promotes_to when promoting argument
5088 (grokdeclarator): Handle _Atomic.
5089 (get_parm_info): Diagnose any qualifier on "void" as only
5091 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5092 comparing types. Use c_type_promotes_to when promoting argument
5094 (finish_function): Use c_type_promotes_to when promoting argument
5096 (build_null_declspecs): Handle atomic_p in declspecs.
5097 (declspecs_add_qual): Handle RID_ATOMIC.
5098 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5099 (c_token_starts_declspecs): Handle RID_ATOMIC.
5100 (c_parser_declspecs): Handle atomic type specifiers and
5102 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5103 from types of expressions with atomic type.
5104 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5105 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5106 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5107 (c_parser_statement_after_labels, c_parser_switch_statement)
5108 (c_parser_for_statement, c_parser_expr_no_commas)
5109 (c_parser_conditional_expression, c_parser_binary_expression)
5110 (c_parser_cast_expression, c_parser_unary_expression)
5111 (c_parser_postfix_expression)
5112 (c_parser_postfix_expression_after_primary, c_parser_expression):
5113 Use convert_lvalue_to_rvalue.
5114 (c_parser_expression_conv, c_parser_expr_list): Document
5115 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5116 (c_parser_objc_synchronized_statement): Use
5117 convert_lvalue_to_rvalue.
5118 (c_parser_objc_selector): Handle RID_ATOMIC.
5119 (c_parser_objc_receiver, c_parser_array_notation): Use
5120 convert_lvalue_to_rvalue.
5121 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5122 _Atomic (type-name).
5123 (struct c_declspecs): Add atomic_p field.
5124 (convert_lvalue_to_rvalue): Declare.
5125 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5126 corresponding atomic types.
5127 (qualify_type): Don't add _Atomic qualifiers from second argument.
5128 (comp_target_types): Do not allow _Atomic mismatches.
5129 (type_lists_compatible_p): Do not remove atomic qualifiers when
5131 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5132 (build_atomic_assign): New functions.
5133 (build_unary_op): Use build_atomic_assign for atomic increment and
5135 (build_conditional_expr): Do not treat _Atomic void as a qualified
5137 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5138 (find_anonymous_field_with_type, convert_to_anonymous_field)
5139 (convert_for_assignment): Do not remove atomic qualifiers when
5141 (digest_init): Do not accept initialization of arrays of atomic
5142 elements by string constants.
5143 (build_asm_expr): Use convert_lvalue_to_rvalue.
5144 (build_binary_op): Do not treat _Atomic void as a qualified
5147 2013-11-06 DJ Delorie <dj@redhat.com>
5149 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5150 both explicit and builtin, print the location of the explicit one.
5152 2013-11-05 Tobias Burnus <burnus@net-b.de>
5154 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5155 c_parser_omp_distribute, c_parser_omp_teams,
5156 c_parser_omp_target, c_parser_omp_declare): Handle
5159 2013-11-03 Marek Polacek <polacek@redhat.com>
5161 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5163 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5165 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5166 check_dup_generic at the end, unless remove is true.
5167 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5169 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5171 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5173 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5174 with decl that is not pointer nor array.
5176 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5178 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5179 a spawning function is found.
5180 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5181 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5182 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5183 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5185 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5186 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5188 (c_finish_return): Added a check to reject _Cilk_spawn in return
5190 (build_cilk_spawn): New function.
5191 (build_cilk_sync): Likewise.
5192 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5194 2013-10-27 Tobias Burnus <burnus@net-b.de>
5197 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5198 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5199 (c_parser_statement_after_labels): Update calls.
5201 2013-10-24 Tobias Burnus <burnus@net-b.de>
5204 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5205 Handle PRAGMA_IVDEP.
5206 (c_parser_statement_after_labels): Update call.
5208 2013-10-24 Marek Polacek <polacek@redhat.com>
5210 * c-parser.c (c_parser_struct_declaration): Add a comment.
5211 (c_parser_declarator): Don't allow _Alignas here.
5213 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5215 * c-parser.c: Include omp-low.h.
5216 * c-typeck.c: Likewise.
5218 2013-10-17 Marek Polacek <polacek@redhat.com>
5221 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5222 Document syntax of the array-declarator.
5223 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5225 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5226 (c_parser_struct_declaration): Likewise.
5227 (c_parser_declarator): Likewise.
5228 (c_parser_direct_declarator_inner): Likewise.
5229 (c_parser_parameter_declaration): Likewise.
5230 (c_parser_type_name): Likewise.
5232 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5234 * c-lang.h (current_omp_declare_target_attribute): New extern
5236 * c-parser.c: Include c-lang.h.
5237 (struct c_parser): Change tokens to c_token *.
5238 Add tokens_buf field. Change tokens_avail type to unsigned int.
5239 (c_parser_consume_token): If parser->tokens isn't
5240 &parser->tokens_buf[0], increment parser->tokens.
5241 (c_parser_consume_pragma): Likewise.
5242 (enum pragma_context): Add pragma_struct and pragma_param.
5243 (c_parser_external_declaration): Adjust
5244 c_parser_declaration_or_fndef caller.
5245 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5246 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5247 Adjust recursive call.
5248 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5250 (c_parser_parameter_declaration): Use pragma_param instead of
5252 (c_parser_compound_statement_nostart, c_parser_label,
5253 c_parser_for_statement): Adjust
5254 c_parser_declaration_or_fndef callers.
5255 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5256 it through to c_parser_conditional_expression.
5257 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5258 pass it through to c_parser_binary_expression. Adjust recursive
5260 (c_parser_binary_expression): Remove prec argument, add
5261 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5262 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5263 binop matches it, use build2 instead of parser_build_binary_op.
5264 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5265 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5266 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5267 Handle pragma_struct and pragma_param the same as pragma_external.
5268 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5269 (c_parser_omp_variable_list): Parse array sections for
5270 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5271 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5272 (c_parser_omp_clause_reduction): Handle user defined reductions.
5273 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5274 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5275 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5276 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5277 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5278 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5279 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5280 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5281 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5282 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5283 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5284 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5285 (c_parser_omp_for_loop): Add CODE argument, pass it through
5286 to c_finish_omp_for. Change last argument to cclauses,
5287 and adjust uses to grab parallel clauses from the array of all
5288 the split clauses. Adjust c_parser_binary_expression,
5289 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5290 (omp_split_clauses): New function.
5291 (c_parser_omp_simd): New function.
5292 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5293 Allow the function to be called also when parsing combined constructs,
5294 and call c_parser_omp_simd when parsing for simd.
5295 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5296 #pragma omp section, require exactly one structured-block instead of
5297 sequence of statements.
5298 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5299 Allow the function to be called also when parsing combined constructs.
5300 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5301 Allow the function to be called also when parsing combined
5303 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5304 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5305 c_parser_omp_teams, c_parser_omp_target_data,
5306 c_parser_omp_target_update, c_parser_omp_target,
5307 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5308 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5309 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5310 (c_parser_omp_construct): Add p_name and mask vars. Handle
5311 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5312 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5313 and c_parser_omp_sections callers.
5314 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5315 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5316 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5317 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5318 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5320 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5321 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5322 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5323 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5324 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5325 * c-typeck.c: Include tree-inline.h.
5326 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5327 handle_omp_array_sections_1, handle_omp_array_sections,
5328 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5329 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5330 user defined reductions.
5331 (c_tree_equal): New function.
5332 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5333 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5334 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5335 c_check_omp_declare_reduction_r): New prototypes.
5336 * c-decl.c (current_omp_declare_target_attribute): New variable.
5337 (c_decl_attributes): New function.
5338 (start_decl, start_function): Use it instead of decl_attributes.
5339 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5340 c_omp_reduction_decl, c_omp_reduction_lookup,
5341 c_check_omp_declare_reduction_r): New functions.
5343 2013-09-25 Tom Tromey <tromey@redhat.com>
5345 * Make-lang.in (c/gccspec.o): Remove.
5346 (CFLAGS-c/gccspec.o): New variable.
5347 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5348 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5349 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5351 2013-09-25 Tom Tromey <tromey@redhat.com>
5353 * Make-lang.in (c/gccspec.o): Don't use subshell.
5355 2013-09-18 Marek Polacek <polacek@redhat.com>
5358 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5359 Remove unnecessary check.
5361 2013-09-18 Marek Polacek <polacek@redhat.com>
5364 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5365 no_sanitize_undefined attribute.
5367 2013-09-13 Kai Tietz <ktietz@redhat.com>
5370 * c-decl.c (c_builtin_function_ext_scope): Remove
5371 wrong assumption that it is never called on prexisting
5374 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5376 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5378 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5380 * c-objc-common.c (c_tree_printer): Tidy.
5382 2013-08-30 Marek Polacek <polacek@redhat.com>
5384 * c-typeck.c (build_binary_op): Add division by zero and shift
5387 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5388 Joseph Myers <joseph@codesourcery.com>
5391 * c-typeck.c (c_common_type): Prefer double_type_node over
5392 other REAL_TYPE types with the same precision.
5393 (convert_arguments): Likewise.
5395 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5397 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5398 (c_initialize_diagnostics): Call a destructor for the early printer.
5400 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5402 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5403 printer initialization.
5405 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5408 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5409 check for truth values.
5410 (expand_array_notation_exprs): Added truth values case. Removed an
5411 unwanted else. Added for-loop to walk through subtrees in default
5414 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5416 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5418 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5420 * c-parser.c (struct c_generic_association): Fix typo.
5422 2013-07-23 Tom Tromey <tromey@redhat.com>
5423 Joseph Myers <joseph@codesourcery.com>
5425 * c-parser.c (struct c_generic_association): New.
5426 (c_generic_association_d): New typedef.
5427 (c_parser_generic_selection): New function.
5428 (c_parser_postfix_expression): Handle RID_GENERIC.
5430 2013-07-13 Jason Merrill <jason@redhat.com>
5433 * c-decl.c (finish_struct): Check for too-large class.
5435 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5438 * c-typeck.c (set_init_index): When folding, check for index overflow.
5440 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5442 * c-parser.c (c_parser_array_notation): Removed rejection of array
5443 notations in an array of function pointers.
5445 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5447 * c-array-notation.c (make_triplet_val_inv): New function.
5448 (create_cmp_incr): Likewise.
5449 (create_array_refs): Likewise.
5450 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5451 Also modularized common parts between functions and called the function.
5452 (build_array_notation_expr): Likewise.
5453 (fix_conditional_array_notations_1): Likewise.
5454 (fix_array_notation_expr): Likewise.
5455 (fix_array_notation_call_expr): Likewise.
5457 2013-06-18 Marek Polacek <polacek@redhat.com>
5460 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5462 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5464 * c-array-notation.c (build_array_notation_expr): Reject array notation
5465 mismatch between LHS and RHS even inside a call_expr. Also, removed
5466 a couple while statements that were dead code.
5468 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5470 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5471 excessive precision expressions in function parameters. Also removed
5472 couple unwanted while statements.
5474 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5476 * c-array-notation.c (expand_array_notation_exprs): Added
5477 ARRAY_NOTATION_REF case.
5479 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5481 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5482 function to c-family/array-notation-common.c.
5483 (is_cilkplus_reduce_builtin): Likewise.
5484 (find_rank): Likewise.
5485 (extract_array_notation_exprs): Likewise.
5486 (replace_array_notations): Likewise.
5487 (find_inv_trees): Likewise.
5488 (replace_inv_trees): Likewise.
5489 (contains_array_notation_expr): Likewise.
5490 (find_correct_array_notation_type): Likewise.
5491 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5492 (struct inv_list): Moved this to c-family/array-notation-common.c.
5493 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5495 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5497 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5498 reduction functions outside the for-loop. Added a check if the fundecl
5499 is non-NULL. Finally, removed an unwanted if-statement, and made the
5502 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5504 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5505 condition of the if-statement matches the rank of else-block and then-
5506 block when array notations are used.
5507 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5508 expression after the entire function body is parsed.
5509 (c_parser_expr_no_commas): Delayed creating array notation expressions
5510 to the end of function parsing.
5511 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5512 whole if-statement instead of just the condition.
5513 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5515 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5518 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5519 array to NULL_TREE if they are unused. Also added a check for the
5520 field to be NULL before its fields are used in future.
5522 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5525 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5526 (build_array_notation_expr): Likewise.
5528 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5530 * c-typeck.c (build_array_ref): Added a check to see if array's
5531 index is greater than one. If true, then emit an error.
5532 (build_function_call_vec): Exclude error reporting and checking
5533 for builtin array-notation functions.
5534 (convert_arguments): Likewise.
5535 (c_finish_return): Added a check for array notations as a return
5536 expression. If true, then emit an error.
5537 (c_finish_loop): Added a check for array notations in a loop
5538 condition. If true then emit an error.
5539 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5540 (build_binary_op): Added a check for array notation expr inside
5541 op1 and op0. If present, we call another function to find correct
5543 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5544 * c-parser.c (c_parser_compound_statement): Check if array
5545 notation code is used in tree, if so, then transform them into
5547 (c_parser_expr_no_commas): Check if array notation is used in LHS
5548 or RHS, if so, then build array notation expression instead of
5550 (c_parser_postfix_expression_after_primary): Added a check for
5551 colon(s) after square braces, if so then handle it like an array
5552 notation. Also, break up array notations in unary op if found.
5553 (c_parser_direct_declarator_inner): Added a check for array
5555 (c_parser_compound_statement): Added a check for array notation in
5556 a stmt. If one is present, then expand array notation expr.
5557 (c_parser_if_statement): Likewise.
5558 (c_parser_switch_statement): Added a check for array notations in
5559 a switch statement's condition. If true, then output an error.
5560 (c_parser_while_statement): Similarly, but for a while.
5561 (c_parser_do_statement): Similarly, but for a do-while.
5562 (c_parser_for_statement): Similarly, but for a for-loop.
5563 (c_parser_unary_expression): Check if array notation is used in a
5564 pre-increment or pre-decrement expression. If true, then expand
5566 (c_parser_array_notation): New function.
5567 * c-array-notation.c: New file.
5568 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5570 2013-05-23 Mike Stump <mikestump@comcast.net>
5572 * c-typeck.c (convert_for_assignment): Handle references to memory
5575 2013-05-16 Jason Merrill <jason@redhat.com>
5577 * Make-lang.in (cc1$(exeext)): Use link mutex.
5579 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5581 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5582 to simply use OPT_Wpointer_arith.
5583 (build_unary_op): Likewise.
5585 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5588 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5589 argument. If set, or it temporarily for parsing of the first
5590 argument into force_folding_builtin_constant_p.
5591 (c_parser_postfix_expression): Adjust callers.
5593 2013-03-21 Richard Biener <rguenther@suse.de>
5595 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5596 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5598 2013-02-12 Marek Polacek <polacek@redhat.com>
5601 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5604 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5607 * c-typeck.c (set_nonincremental_init_from_string): If
5608 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5610 (process_init_element): Likewise.
5612 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5615 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5616 argument, don't call default_function_array_conversion
5617 nor c_fully_fold here.
5618 (c_parser_asm_statement): Adjust callers.
5619 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5620 and outputs here, and call default_function_array_conversion
5621 on inputs that don't need to be addressable.
5623 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5626 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5627 warning require that both c_common_unsigned_type as well as
5628 c_common_signed_type is the same for both mvl and mvr types.
5630 2012-11-16 Diego Novillo <dnovillo@google.com>
5632 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5634 * c-common.c: Use new vec API in vec.h.
5635 * c-common.h: Likewise.
5636 * c-gimplify.c: Likewise.
5637 * c-pragma.c: Likewise.
5638 * c-pretty-print.c: Likewise.
5639 * c-pretty-print.h: Likewise.
5640 * c-semantics.c: Likewise.
5641 * c-decl.c: Likewise.
5642 * c-parser.c: Likewise.
5643 * c-tree.h: Likewise.
5644 * c-typeck.c: Likewise.
5646 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5649 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5651 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5654 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5655 shadows a function, unless the variable is a function or a
5656 pointer-to-function.
5658 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5661 * c-parser.c (struct c_tree_loc_pair): Removed.
5662 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5663 add location_t * and tree * arguments, fill in array of 3
5664 sizeof_arg trees and corresponding locs.
5665 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5666 c_parser_expr_list callers.
5667 (c_parser_postfix_expression_after_primary): Likewise. Pass
5668 array of 3 sizeof_arg trees and locs (corresponding to first
5669 3 arguments) to sizeof_pointer_memaccess_warning.
5671 2012-10-09 Lawrence Crowl <crowl@google.com>
5673 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5674 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5677 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5680 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5683 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5686 * c-typeck.c: Include c-common.h.
5687 (enum stv_conv): Moved to c-common.h.
5688 (scalar_to_vector): Moved to c-common.c.
5689 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5690 * Make-lang.in: c-typeck.c depends on c-common.h.
5692 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5694 * c-decl.c (c_write_global_declarations): Fix handling of
5697 2012-09-30 Sharad Singhai <singhai@google.com>
5699 * c-decl.c (c_write_global_declarations): Use a different method
5700 to determine if the dump has ben initialized.
5702 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5705 * c-typeck.c (c_cast_expr): When casting to a type requiring
5706 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5709 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5712 * c-typeck.c (build_unary_op): Pass original argument of
5713 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5714 any C_MAYBE_CONST_EXPR, if it has integer operands.
5715 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5716 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5717 to c_objc_common_truthvalue_conversion, then remove any
5718 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5719 c_objc_common_truthvalue_conversion not
5720 c_common_truthvalue_conversion.
5721 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5722 call note_integer_operands for arguments with integer operands
5723 that are not integer constants.
5725 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5728 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5729 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5731 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5734 * c-convert.c (convert): Don't call fold_convert_loc if
5735 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5736 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5737 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5739 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5742 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5743 for nested and empty_ok arguments in the call to
5744 c_parser_declaration_or_fndef.
5746 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5748 * c-tree.h (c_last_sizeof_arg): Declare.
5749 * c-parser.c (struct c_tree_loc_pair): New type.
5750 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5752 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5753 (c_parser_postfix_expression_after_primary): Likewise. Call
5754 sizeof_pointer_memaccess_warning if needed.
5755 (sizeof_ptr_memacc_comptypes): New function.
5756 * c-typeck.c (c_last_sizeof_arg): New global variable.
5757 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5759 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5761 * c-lang.h (lang_decl): Add variable_size GTY option.
5763 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5765 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5766 * Make-lang.in: Fix dependencies.
5768 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5770 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5771 and add language Makefile hooks.
5772 * config-lang.in: New file.
5773 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5774 add the required "normal" config-lang.in rules.
5775 * c-lang.h: Moved from gcc/ to here.
5776 * c-tree.h: Likewise.
5777 * c-objc-common.c: Likewise.
5778 * c-objc-common.h: Likewise.
5779 * c-typeck.c: Likewise.
5780 * c-convert.c: Likewise.
5781 * c-lang.c: Likewise.
5782 * c-aux-info.c: Likewise.
5783 * c-errors.c: Likewise.
5784 * gccspec.c: Likewise.
5785 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5786 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5788 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5790 Copying and distribution of this file, with or without modification,
5791 are permitted in any medium without royalty provided the copyright
5792 notice and this notice are preserved.