1 2018-12-04 James Norris <jnorris@codesourcery.com>
2 Cesar Philippidis <cesar@codesourcery.com>
3 Julian Brown <julian@codesourcery.com>
5 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
8 2018-11-30 Richard Biener <rguenther@suse.de>
10 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
11 _Literal (type) { ... } as empty aggregate or vector constructor.
13 2018-11-29 Martin Sebor <msebor@redhat.com>
16 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
17 (convert_arguments): Add comments. Pass additional argument to
20 2018-11-29 Martin Sebor <msebor@redhat.com>
24 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
26 2018-11-23 Martin Sebor <msebor@redhat.com>
29 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
30 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
32 2018-11-20 Martin Sebor <msebor@redhat.com>
34 * c-parser.c (c_parser_has_attribute_expression): New function.
35 (c_parser_attribute): New function.
36 (c_parser_attributes): Move code into c_parser_attribute.
37 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
39 2018-11-15 Martin Sebor <msebor@redhat.com>
42 * c-decl.c (header_for_builtin_fn): Declare.
43 (diagnose_mismatched_decls): Diagnose declarations of built-in
44 functions without a prototype.
45 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
46 (convert_argument): Same.
47 (convert_arguments): Factor code out into convert_argument.
48 Detect mismatches between built-in formal arguments in calls
49 to built-in without prototype.
50 (build_conditional_expr): Same.
51 (type_or_builtin_type): New function.
52 (convert_for_assignment): Add argument. Conditionally issue
53 warnings instead of errors for mismatches.
55 2018-11-13 David Malcolm <dmalcolm@redhat.com>
57 * c-decl.c: Replace "source_location" with "location_t".
59 * c-typeck.c: Likewise.
60 * gimple-parser.c: Likewise.
62 2018-11-09 Jakub Jelinek <jakub@redhat.com>
64 * c-parser.c (c_parser_omp_clause_final): Use
65 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
66 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
67 parsing instead of c_parser_paren_condition.
68 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
69 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
70 c_fully_fold instead of c_parser_condition.
71 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
72 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
73 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
74 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
75 c_parser_expr_no_commas instead of c_parser_expression.
77 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
78 reduction clause with inscan modifier.
80 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
81 clauses other than atomic_default_mem_order.
83 2018-11-08 Jakub Jelinek <jakub@redhat.com>
85 * c-parser.c: Include memmode.h.
86 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
87 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
88 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
89 task_reduction clauses.
90 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
91 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
92 section, or lvalue assignment expression.
93 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
94 (c_parser_omp_clause_lastprivate): Parse optional
95 conditional: modifier.
96 (c_parser_omp_clause_hint): Require constant integer expression rather
97 than just integer expression.
98 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
100 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
101 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
102 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
104 (c_parser_omp_clause_depend): Parse iterator modifier and handle
105 iterators. Parse mutexinoutset and depobj kinds.
106 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
108 (c_parser_omp_all_clauses): Likewise. Handle
109 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
110 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
111 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
112 default memory order from requires directive if any. Adjust
113 c_finish_omp_atomic caller.
114 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
115 (c_parser_omp_flush): Parse flush with memory-order-clause.
116 (c_parser_omp_for_loop): Allow NE_EXPR even in
117 OpenMP loops, adjust c_finish_omp_for caller.
118 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
119 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
120 Allow to be called while parsing combined parallel master.
121 Parse combined master taskloop{, simd}.
122 (c_parser_omp_parallel): Parse combined
123 parallel master{, taskloop{, simd}} constructs.
124 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
125 (OMP_TASKGROUP_CLAUSE_MASK): Define.
126 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
127 (OMP_TASKWAIT_CLAUSE_MASK): Define.
128 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
129 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
130 around teams body. Use SET_EXPR_LOCATION.
131 (c_parser_omp_target_data): Allow target data
132 with only use_device_ptr clauses.
133 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
134 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
135 (c_parser_omp_requires): New function.
136 (c_finish_taskloop_clauses): New function.
137 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
138 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
139 declaration. Disallow in_reduction clause when combined with parallel
141 (c_parser_omp_construct): Adjust c_parser_omp_master and
142 c_parser_omp_taskgroup callers.
143 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
145 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
146 like OMP_CLAUSE_REDUCTION.
147 (handle_omp_array_sections): Likewise. Call save_expr on array
148 reductions before calling build_index_type. Handle depend clauses
150 (struct c_find_omp_var_s): New type.
151 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
152 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
153 with static, runtime or auto schedule kinds. Call save_expr for whole
154 array reduction sizes. Diagnose reductions with zero sized elements
155 or variable length structures. Diagnose nogroup clause used with
156 reduction clause(s). Handle depend clause with
157 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
158 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
159 some different type for other kinds. Use build_unary_op with
160 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
161 Handle depend clauses with iterators. Remove no longer needed special
162 case that predetermined const qualified vars may be specified in
163 firstprivate clause. Complain if const qualified vars are mentioned
164 in data-sharing clauses other than firstprivate or shared. Use
165 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
166 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
167 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
168 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
170 2018-10-29 David Malcolm <dmalcolm@redhat.com>
172 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
173 logic for change to name_hint::operator bool.
174 (undeclared_variable): Likewise.
175 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
176 (c_parser_parameter_declaration): Likewise.
178 2018-10-17 Joseph Myers <joseph@codesourcery.com>
180 * c-errors.c (pedwarn_c11): New function.
181 * c-parser.c (disable_extension_diagnostics): Save
182 warn_c11_c2x_compat and set it to 0.
183 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
184 (c_parser_static_assert_declaration_no_semi): Handle
185 _Static_assert without string constant.
186 * c-tree.h (pedwarn_c11): New prototype.
188 2018-10-17 David Malcolm <dmalcolm@redhat.com>
190 * Make-lang.in (selftest-c): New.
191 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
192 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
193 from gcc/Makefile.in.
195 2018-10-02 Richard Biener <rguenther@suse.de>
197 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
199 2018-09-26 Joseph Myers <joseph@codesourcery.com>
202 * c-typeck.c (build_binary_op): Use excess precision for
203 comparisons of integers and floating-point for C11 and later.
205 2018-09-26 Martin Jambor <mjambor@suse.cz>
208 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
211 2018-09-17 David Malcolm <dmalcolm@redhat.com>
213 * c-objc-common.c (range_label_for_type_mismatch::get_text):
214 Update for new param.
215 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
218 2018-09-17 Martin Jambor <mjambor@suse.cz>
221 * c-parser.c: (warn_for_abs): New function.
222 (c_parser_postfix_expression_after_primary): Call it.
224 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
226 * c-typeck.c (digest_init): Shorten overlength strings.
228 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
230 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
232 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
234 * c-decl.c (finish_decl): Call braced_list_to_string here ...
235 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
237 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
239 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
240 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
242 2018-08-27 David Malcolm <dmalcolm@redhat.com>
245 * c-decl.c (implicitly_declare): Update call to
246 maybe_add_include_fixit to suggest overriding the location, as it
248 * c-objc-common.c (c_tree_printer): Update for conversion of
249 show_caret_p to a tri-state.
251 2018-08-27 Martin Liska <mliska@suse.cz>
253 * c-decl.c (locate_old_decl): Use new function
254 fndecl_built_in_p and remove check for FUNCTION_DECL if
256 (diagnose_mismatched_decls): Likewise.
257 (merge_decls): Likewise.
258 (warn_if_shadowing): Likewise.
259 (pushdecl): Likewise.
260 (implicitly_declare): Likewise.
261 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
262 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
263 * c-typeck.c (build_function_call_vec): Likewise.
264 (convert_arguments): Likewise.
266 2018-08-20 David Malcolm <dmalcolm@redhat.com>
269 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
270 (diagnose_mismatched_decls): Likewise, in various places.
271 (warn_if_shadowing): Likewise.
272 (implicit_decl_warning): Likewise.
273 (implicitly_declare): Likewise.
274 (undeclared_variable): Likewise.
275 (declare_label): Likewise.
276 (grokdeclarator): Likewise.
277 (start_function): Likewise.
278 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
279 (c_parser_parameter_declaration): Likewise.
280 (c_parser_binary_expression): Likewise.
281 * c-typeck.c (c_expr_sizeof_expr): Likewise.
282 (parser_build_binary_op): Likewise.
283 (build_unary_op): Likewise.
284 (error_init): Likewise.
285 (pedwarn_init): Likewise.
286 (warning_init): Likewise.
287 (convert_for_assignment): Likewise.
289 2018-08-15 David Malcolm <dmalcolm@redhat.com>
291 * c-objc-common.c: Include "gcc-rich-location.h".
292 (c_tree_printer): Move implemenation of '%T' to...
293 (print_type): ...this new function.
294 (range_label_for_type_mismatch::get_text): New function.
295 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
296 range for the various ic_argpass cases.
297 (class maybe_range_label_for_tree_type_mismatch): New class.
298 (build_binary_op): Use it when calling binary_op_error.
300 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
302 * c-decl.c (start_decl): Do not warn if variables is named as main
303 and is a local variable.
305 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
308 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
309 objects of unknown size.
311 2018-08-13 Martin Sebor <msebor@redhat.com>
313 PR tree-optimization/71625
314 * c-parser.c (c_parser_declaration_or_fndef): Call
315 braced_list_to_string.
317 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
320 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
323 2018-08-01 Martin Sebor <msebor@redhat.com>
325 PR tree-optimization/86650
326 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
327 and TREE_BLOCK (t) from within percent_K_format to this callsite.
329 2018-08-01 Jakub Jelinek <jakub@redhat.com>
332 * c-typeck.c (init_field_decl_cmp): New function.
333 (output_pending_init_elements): Use it for field comparisons
334 instead of pure bit_position comparisons.
336 2018-07-12 Jakub Jelinek <jakub@redhat.com>
338 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
339 type here, instead add "omp declare target implicit" attribute.
340 (finish_decl): Diagnose vars without mappable type here.
342 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
343 Thomas Schwinge <thomas@codesourcery.com>
344 Cesar Philippidis <cesar@codesourcery.com>
346 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
347 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
348 to their non-present_or_* counterparts. Make 'self' an alias to
349 PRAGMA_OACC_CLAUSE_HOST.
350 (c_parser_oacc_data_clause): Update GOMP mappings for
351 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
352 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
353 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
354 Remove support for present_or_* clauses.
355 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
356 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
357 (OACC_DECLARE_CLAUSE_MASK): Likewise.
358 (OACC_DATA_CLAUSE_MASK): Likewise.
359 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
360 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
361 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
362 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
363 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
365 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
367 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
368 * gimple-parser.c (c_parser_gimple_statement): Likewise.
369 (c_parser_gimple_unary_expression): Likewise.
371 2018-06-15 Jakub Jelinek <jakub@redhat.com>
374 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
375 before doing POINTER_DIFF_EXPR.
377 2018-06-07 Marek Polacek <polacek@redhat.com>
380 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
381 for loop initial declarations.
383 2018-05-30 David Pagan <dave.pagan@oracle.com>
386 * c-decl.c (grokdeclarator): Update check for return type warnings.
387 (start_function): Likewise.
388 (finish_function): Likewise.
389 * c-typeck.c (c_finish_return): Update check for return type warnings.
390 Pass OPT_Wreturn_type to pedwarn when appropriate.
392 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
394 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
397 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
399 * gimple-parser.c: Include internal-fn.h.
400 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
401 (c_parser_gimple_call_internal): New function.
402 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
403 Fix typos in comment.
405 2018-05-10 Jakub Jelinek <jakub@redhat.com>
408 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
409 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
411 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
412 fold_offsetof_1, pass argtype as TYPE to it and drop the
415 2018-05-02 David Pagan <dave.pagan@oracle.com>
418 * c-decl.c (old_style_parameter_scope): New function.
419 * c-parser.c (c_parser_postfix_expression): Check for statement
420 expressions in old-style function parameter list declarations.
421 * c-parser.h (old_style_parameter_scope): New extern declaration.
423 2018-04-25 Jakub Jelinek <jakub@redhat.com>
426 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
427 it is not TREE_STATIC.
428 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
429 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
430 its COMPOUND_LITERAL_EXPR_DECL.
432 2018-03-21 Joseph Myers <joseph@codesourcery.com>
434 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
435 where all functions return the same _FloatN or _FloatNx type,
436 treat integer types as _Float64 instead of double.
438 2018-03-21 Jakub Jelinek <jakub@redhat.com>
441 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
442 building vector comparison, diagnose it and return error_mark_node.
444 2018-03-15 Jakub Jelinek <jakub@redhat.com>
447 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
448 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
449 INTEGER_TYPE element type.
451 2018-03-13 David Pagan <dave.pagan@oracle.com>
454 * c-typeck.c (output_init_element): Ensure field initializer
455 expression is always evaluated if there are side effects.
457 2018-03-06 Jakub Jelinek <jakub@redhat.com>
460 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
461 !building_stmt_list_p ().
463 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
466 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
467 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
468 and include the BIND_EXPR in the list of things that need to be
471 2018-02-09 Nathan Sidwell <nathan@acm.org>
474 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
475 to strict_aliasing_warning.
477 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
479 * c-typeck.c (really_start_incremental_init, push_init_level,
480 set_nonincremental_init, output_init_element, process_init_element):
481 Use DECL_UNNAMED_BIT_FIELD.
483 2018-01-31 Marek Polacek <polacek@redhat.com>
486 * c-parser.c (c_parser_compound_statement_nostart): Call
487 expansion_point_location_if_in_system_header.
489 2018-01-17 David Malcolm <dmalcolm@redhat.com>
492 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
495 2018-01-13 Jakub Jelinek <jakub@redhat.com>
498 * c-tree.h (decl_constant_value_1): Add a bool argument.
499 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
500 returning a CONSTRUCTOR if it is true. Use error_operand_p.
501 (decl_constant_value): Adjust caller.
502 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
503 decl_constant_value_1 as IN_INIT. Otherwise, punt if
504 decl_constant_value returns initializer that has BLKmode or
506 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
508 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
509 Alan Hayward <alan.hayward@arm.com>
510 David Sherwood <david.sherwood@arm.com>
512 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
513 TYPE_VECTOR_SUBPARTS.
515 2018-01-03 Jakub Jelinek <jakub@redhat.com>
517 Update copyright years.
519 2018-01-01 Jakub Jelinek <jakub@redhat.com>
522 * c-parser.c (c_parser_braced_init, c_parser_initelt,
523 c_parser_conditional_expression, c_parser_cast_expression,
524 c_parser_sizeof_expression, c_parser_alignof_expression,
525 c_parser_postfix_expression, c_parser_omp_declare_reduction,
526 c_parser_transaction_expression): Use set_error () method instead
527 of setting value member to error_mark_node.
529 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
531 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
532 and _Float<N>X built-in functions.
534 2017-12-22 Jakub Jelinek <jakub@redhat.com>
537 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
538 TYPE_STUB_DECL and call rest_of_type_compilation before processing
539 incomplete vars rather than after it.
542 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
543 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
544 and consider empty ones if there are no other stmts. For
545 -Wunused-value walk all statements before the one only followed by
548 2017-12-22 Mike Stump <mikestump@comcast.net>
549 Eric Botcazou <ebotcazou@adacore.com>
551 * c-parser.c (c_parser_while_statement): Add unroll parameter and
552 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
553 (c_parser_do_statement): Likewise.
554 (c_parser_for_statement): Likewise.
555 (c_parser_statement_after_labels): Adjust calls to above.
556 (c_parse_pragma_ivdep): New static function.
557 (c_parser_pragma_unroll): Likewise.
558 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
559 <PRAGMA_UNROLL>: New case.
561 2017-12-19 Jakub Jelinek <jakub@redhat.com>
563 * c-typeck.c (comptypes_internal, function_types_compatible_p,
564 perform_integral_promotions, digest_init): Replace Yoda conditions
565 with typical order conditions.
566 * c-decl.c (check_bitfield_type_and_width): Likewise.
568 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
570 * c-typeck.c (c_safe_arg_type_equiv_p,
571 c_safe_function_type_cast_p): New function.
572 (build_c_cast): Implement -Wcast-function-type.
574 2017-12-14 Richard Biener <rguenther@suse.de>
577 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
578 like REALPART_EXPR for the behavior of whether its operand
581 2017-12-12 Marek Polacek <polacek@redhat.com>
584 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
586 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
588 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
589 * c-parser.c (add_debug_begin_stmt): New.
590 (c_parser_declaration_or_fndef): Call it.
591 (c_parser_compound_statement_nostart): Likewise.
592 (c_parser_statement_after_labels): Likewise.
593 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
595 2017-12-07 Joseph Myers <joseph@codesourcery.com>
597 * c-decl.c (build_compound_literal): Add parameter alignas_align
598 and set alignment of decl if nonzero.
599 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
600 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
602 (c_parser_struct_declaration): Update syntax comment.
603 (c_parser_type_name): Add alignas_ok argument and pass it to
605 (c_parser_cast_expression): Pass true to c_parser_type_name and
606 give error if a cast used an _Alignas specifier.
607 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
608 give error if sizeof (type-name) used an _Alignas specifier.
609 (c_parser_alignof_expression): Pass true to c_parser_type_name and
610 give error if _Alignof (type-name) used an _Alignas specifier.
611 (c_parser_postfix_expression_after_paren_type): Check specified
612 alignment for a compound literal and pass it to
613 build_compound_literal.
614 * c-parser.h (c_parser_type_name): Update prototype.
615 * c-tree.h (build_compound_literal): Update prototype.
617 2017-12-07 Martin Sebor <msebor@redhat.com>
620 * c-decl.c (c_decl_attributes): Look up existing declaration and
621 pass it to decl_attributes.
623 2017-12-06 David Malcolm <dmalcolm@redhat.com>
626 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
627 reserved for use by the implementation.
629 2017-12-06 David Malcolm <dmalcolm@redhat.com>
631 * c-decl.c: Include "c-family/c-spellcheck.h".
633 2017-12-05 Martin Liska <mliska@suse.cz>
634 Jakub Jelinek <jakub@redhat.com>
636 * c-typeck.c (pointer_diff): Add new argument and instrument
638 (build_binary_op): Similar for pointer comparison.
640 2017-12-01 Jakub Jelinek <jakub@redhat.com>
643 * c-parser.c: Include tree-iterator.h.
644 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
645 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
649 * c-tree.h (decl_constant_value_1): Declare.
650 * c-typeck.c (decl_constant_value_1): New function.
651 (decl_constant_value): Use it.
652 * c-fold.c (c_fully_fold_internal): If in_init, use
653 decl_constant_value_1 instead of decl_constant_value.
655 2017-11-30 Jakub Jelinek <jakub@redhat.com>
657 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
659 2017-11-28 Jakub Jelinek <jakub@redhat.com>
662 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
663 c_switch_covers_all_cases_p returns true.
665 2017-11-28 Julia Koval <julia.koval@intel.com>
666 Sebastian Peryt <sebastian.peryt@intel.com>
668 * Make-lang.in (c/c-array-notation.o): Remove.
669 * c-array-notation.c: Delete.
670 * c-decl.c: Remove cilkplus condition.
671 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
672 c_parser_cilk_verify_simd, c_parser_array_notation,
673 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
674 c_parser_cilk_simd_fn_vector_attrs,
675 c_finish_cilk_simd_fn_tokens): Delete.
676 (c_parser_declaration_or_fndef): Remove cilkplus condition.
677 (c_parser_direct_declarator_inner): Ditto.
678 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
679 (c_parser_attributes, c_parser_compound_statement,
680 c_parser_statement_after_labels, c_parser_if_statement,
681 c_parser_switch_statement, c_parser_while_statement,
682 c_parser_do_statement, c_parser_for_statement,
683 c_parser_unary_expression, c_parser_postfix_expression,
684 c_parser_postfix_expression_after_primary,
685 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
686 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
688 * c-typeck.c (build_array_ref, build_function_call_vec,
690 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
691 c_finish_loop, build_binary_op): Remove cilkplus support.
693 2017-11-28 Jakub Jelinek <jakub@redhat.com>
695 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
698 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
700 * Make-lang.in (c.install-plugin): Install backend import library.
702 2017-11-23 Jakub Jelinek <jakub@redhat.com>
704 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
707 2017-11-23 Mike Stump <mikestump@comcast.net>
708 Eric Botcazou <ebotcazou@adacore.com>
710 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
712 (c_parser_do_statement): Likewise.
713 (c_parser_for_statement): Likewise.
715 2017-11-22 David Malcolm <dmalcolm@redhat.com>
718 * c-objc-common.c (c_tree_printer): Convert penultimate param from
719 bool to bool *. Within '%T' handling, if showing an "aka", use
720 "quoted" param to add appropriate quoting.
722 2017-11-22 Marek Polacek <polacek@redhat.com>
727 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
729 2017-11-21 David Malcolm <dmalcolm@redhat.com>
732 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
733 earlier failed lookups.
735 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
737 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
738 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
740 2017-11-20 David Malcolm <dmalcolm@redhat.com>
743 * c-decl.c: Include "c-family/known-headers.h".
744 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
746 (class suggest_missing_header): Move to known-header.h.
747 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
748 than get_c_name_hint.
750 2017-11-20 David Malcolm <dmalcolm@redhat.com>
752 * c-decl.c (get_c_name_hint): New function.
753 (class suggest_missing_header): New class.
754 (lookup_name_fuzzy): Call get_c_name_hint and use it to
755 suggest missing headers to the user.
757 2017-11-20 David Malcolm <dmalcolm@redhat.com>
759 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
760 Include "c-family/name-hint.h"
761 (implicit_decl_warning): Convert "hint" from
762 const char * to name_hint. Pass location to
763 lookup_name_fuzzy. Suppress any deferred diagnostic if the
764 warning was not printed.
765 (undeclared_variable): Likewise for "guessed_id".
766 (lookup_name_fuzzy): Convert return type from const char *
767 to name_hint. Add location_t param.
768 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
769 Include "c-family/name-hint.h"
770 (c_parser_declaration_or_fndef): Convert "hint" from
771 const char * to name_hint. Pass location to lookup_name_fuzzy.
772 (c_parser_parameter_declaration): Likewise.
774 2017-11-19 Jakub Jelinek <jakub@redhat.com>
778 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
780 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
781 handle_omp_array_sections): Likewise.
782 (digest_init): Don't call decl_constant_value_for_optimization.
783 * c-tree.h (decl_constant_value_for_optimization): Removed.
784 * c-fold.c (c_fold_array_ref): New function.
785 (c_fully_fold_internal): Add LVAL argument, propagate it through
786 recursive calls. For VAR_P call decl_constant_value and
787 unshare if not LVAL and either optimizing or IN_INIT. Remove
788 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
789 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
790 (c_fully_fold): Add LVAL argument, pass it through to
791 c_fully_fold_internal.
792 (decl_constant_value_for_optimization): Removed.
794 2017-11-15 Joseph Myers <joseph@codesourcery.com>
797 * c-parser.c (check_tgmath_function): New function.
798 (enum tgmath_parm_kind): New enum.
799 (c_parser_postfix_expression): Handle __builtin_tgmath.
801 2017-10-31 David Malcolm <dmalcolm@redhat.com>
803 * c-decl.c (implicit_decl_warning): Update for renaming of
804 pedwarn_at_rich_loc and warning_at_rich_loc.
805 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
806 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
807 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
808 (c_parser_struct_or_union_specifier): Likewise for renaming of
810 (c_parser_parameter_declaration): Likewise for renaming of
812 * c-typeck.c (build_component_ref): Likewise.
813 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
814 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
815 (set_init_label): Likewise for renaming of error_at_rich_loc.
817 2017-10-30 Richard Biener <rguenther@suse.de>
819 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
822 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
824 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
825 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
827 2017-10-25 David Malcolm <dmalcolm@redhat.com>
830 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
833 2017-10-25 Jakub Jelinek <jakub@redhat.com>
836 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
837 newdecl to corresponding __builtin_ if any.
839 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
842 * c-decl.c (diagnose_mismatched_decls): Use
843 OPT_Wbuiltin_declaration_mismatch.
845 2017-10-12 David Malcolm <dmalcolm@redhat.com>
847 * c-parser.c (c_parser_require): Add "type_is_unique" param and
848 use it to guard calls to maybe_suggest_missing_token_insertion.
849 (c_parser_parms_list_declarator): Override default value of new
850 "type_is_unique" param to c_parser_require.
851 (c_parser_asm_statement): Likewise.
852 * c-parser.h (c_parser_require): Add "type_is_unique" param,
855 2017-10-11 Nathan Sidwell <nathan@acm.org>
857 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
859 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
861 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
862 operating on trees as wide_ints.
863 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
864 (c_tree_equal): Likewise.
866 2017-10-04 David Malcolm <dmalcolm@redhat.com>
868 * c-decl.c (push_parm_decl): Store c_parm's location into the
870 (build_c_parm): Add "loc" param and store it within the c_parm.
871 * c-parser.c (struct c_parser): Add "last_token_location" field.
872 (c_parser_consume_token): Store location of the token into the
874 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
875 when handling a FUNCTION_DECL, if it doesn't already have them.
876 (c_parser_parameter_declaration): Generate a location for the
877 parameter, and pass it to the call to build_c_parm.
878 * c-tree.h (struct c_parm): Add field "loc".
879 (build_c_parm): Add location_t param.
880 * c-typeck.c (get_fndecl_argument_location): New function.
881 (inform_for_arg): New function.
882 (convert_for_assignment): Use inform_for_arg when dealing with
885 2017-09-29 Jakub Jelinek <jakub@redhat.com>
887 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
889 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
890 don't SET_DECL_C_BIT_FIELD here.
893 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
894 instead of trying to set just TREE_READONLY manually.
896 2017-09-16 Tom de Vries <tom@codesourcery.com>
899 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
902 2017-09-15 Joseph Myers <joseph@codesourcery.com>
905 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
907 (build_conditional_expr): For C11, generate result with excess
908 precision when one argument is an integer and the other is of a
909 type using excess precision.
911 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
913 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
915 2017-09-13 Marek Polacek <polacek@redhat.com>
918 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
919 than expr.original_type.
921 2017-09-12 Nathan Sidwell <nathan@acm.org>
923 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
924 resort_sorted_fields): Moved from c-family/c-common.c.
925 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
927 2017-09-01 Joseph Myers <joseph@codesourcery.com>
930 * c-typeck.c (build_atomic_assign): Handle argument with excess
931 precision. Ensure any EXCESS_PRECISION_EXPR is present in
932 argument passed to build_binary_op and convert_for_assignment but
933 not for call to c_fully_fold.
934 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
935 Ensure build_binary_op is called with argument with original
936 semantic type. Avoid calling c_fully_fold with an
937 EXCESS_PRECISION_EXPR from build_binary_op.
939 2017-09-01 Jakub Jelinek <jakub@redhat.com>
942 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
944 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
945 Alan Hayward <alan.hayward@arm.com>
946 David Sherwood <david.sherwood@arm.com>
948 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
949 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
950 m1 and m2 to the signed equivalent of a fixed-point
953 2017-08-24 David Malcolm <dmalcolm@redhat.com>
955 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
956 than CAN_HAVE_LOCATION_P when determining whether to use the
957 location_t value within "value".
959 2017-08-21 David Malcolm <dmalcolm@redhat.com>
961 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
962 rather than peeking the location of the first token.
963 * c-tree.h (c_expr::get_location): New method.
965 2017-08-21 David Malcolm <dmalcolm@redhat.com>
967 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
968 to check_function_arguments.
970 2017-08-18 Marek Polacek <polacek@redhat.com>
972 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
975 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
978 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
979 (check_bitfield_type_and_width): Don't allow bit-field with
980 warn_if_not_aligned type.
982 2017-08-14 Martin Sebor <msebor@redhat.com>
985 * c-objc-common.c (c_objc_common_init): Handle 'G'.
987 2017-08-11 Marek Polacek <polacek@redhat.com>
990 * c-decl.c (pushtag): Only print inform if the warning was printed.
991 (grokdeclarator): Likewise.
993 2017-08-10 David Malcolm <dmalcolm@redhat.com>
995 * c-parser.c (c_parser_error): Rename to...
996 (c_parser_error_richloc): ...this, making static, and adding
997 "richloc" parameter, passing it to the c_parse_error call,
998 rather than calling c_parser_set_source_position_from_token.
999 (c_parser_error): Reintroduce, reimplementing in terms of the
1000 above, converting return type from void to bool.
1001 (class token_pair): New class.
1002 (struct matching_paren_traits): New struct.
1003 (matching_parens): New typedef.
1004 (struct matching_brace_traits): New struct.
1005 (matching_braces): New typedef.
1006 (get_matching_symbol): New function.
1007 (c_parser_require): Add param MATCHING_LOCATION, using it to
1008 highlight matching "opening" tokens for missing "closing" tokens.
1009 (c_parser_skip_until_found): Likewise.
1010 (c_parser_static_assert_declaration_no_semi): Convert explicit
1011 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1012 class matching_parens, so that the pertinent open parenthesis is
1013 highlighted when there are problems locating the close
1015 (c_parser_struct_or_union_specifier): Likewise.
1016 (c_parser_typeof_specifier): Likewise.
1017 (c_parser_alignas_specifier): Likewise.
1018 (c_parser_simple_asm_expr): Likewise.
1019 (c_parser_braced_init): Likewise, for matching_braces.
1020 (c_parser_paren_condition): Likewise, for matching_parens.
1021 (c_parser_switch_statement): Likewise.
1022 (c_parser_for_statement): Likewise.
1023 (c_parser_asm_statement): Likewise.
1024 (c_parser_asm_operands): Likewise.
1025 (c_parser_cast_expression): Likewise.
1026 (c_parser_sizeof_expression): Likewise.
1027 (c_parser_alignof_expression): Likewise.
1028 (c_parser_generic_selection): Likewise.
1029 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1030 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1031 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1032 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1033 c_parser_skip_until_found call.
1034 (c_parser_objc_class_definition): Use class matching_parens as
1036 (c_parser_objc_method_decl): Likewise.
1037 (c_parser_objc_try_catch_finally_statement): Likewise.
1038 (c_parser_objc_synchronized_statement): Likewise.
1039 (c_parser_objc_at_property_declaration): Likewise.
1040 (c_parser_oacc_wait_list): Likewise.
1041 (c_parser_omp_var_list_parens): Likewise.
1042 (c_parser_omp_clause_collapse): Likewise.
1043 (c_parser_omp_clause_default): Likewise.
1044 (c_parser_omp_clause_if): Likewise.
1045 (c_parser_omp_clause_num_threads): Likewise.
1046 (c_parser_omp_clause_num_tasks): Likewise.
1047 (c_parser_omp_clause_grainsize): Likewise.
1048 (c_parser_omp_clause_priority): Likewise.
1049 (c_parser_omp_clause_hint): Likewise.
1050 (c_parser_omp_clause_defaultmap): Likewise.
1051 (c_parser_oacc_single_int_clause): Likewise.
1052 (c_parser_omp_clause_ordered): Likewise.
1053 (c_parser_omp_clause_reduction): Likewise.
1054 (c_parser_omp_clause_schedule): Likewise.
1055 (c_parser_omp_clause_num_teams): Likewise.
1056 (c_parser_omp_clause_thread_limit): Likewise.
1057 (c_parser_omp_clause_aligned): Likewise.
1058 (c_parser_omp_clause_linear): Likewise.
1059 (c_parser_omp_clause_safelen): Likewise.
1060 (c_parser_omp_clause_simdlen): Likewise.
1061 (c_parser_omp_clause_depend): Likewise.
1062 (c_parser_omp_clause_map): Likewise.
1063 (c_parser_omp_clause_device): Likewise.
1064 (c_parser_omp_clause_dist_schedule): Likewise.
1065 (c_parser_omp_clause_proc_bind): Likewise.
1066 (c_parser_omp_clause_uniform): Likewise.
1067 (c_parser_omp_for_loop): Likewise.
1068 (c_parser_cilk_clause_vectorlength): Likewise.
1069 (c_parser_cilk_clause_linear): Likewise.
1070 (c_parser_transaction_expression): Likewise.
1071 * c-parser.h (c_parser_require): Add param matching_location with
1072 default UNKNOWN_LOCATION.
1073 (c_parser_error): Convert return type from void to bool.
1074 (c_parser_skip_until_found): Add param matching_location with
1075 default UNKNOWN_LOCATION.
1077 2017-08-09 Marek Polacek <polacek@redhat.com>
1079 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1080 * c-tree.h (build_external_ref): Update declaration.
1081 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1082 (build_external_ref): Change the type of a parameter to bool.
1083 (parser_build_binary_op): Use true/false instead of 1/0.
1084 (pointer_diff): Likewise.
1085 (build_modify_expr): Likewise.
1086 (set_designator): Change the type of a parameter to bool.
1087 (set_init_index): Use true/false instead of 1/0.
1088 (set_init_label): Likewise.
1089 (output_init_element): Change the type of a parameter to bool.
1090 (output_pending_init_elements): Use true/false instead of 1/0.
1091 (process_init_element): Likewise.
1092 (build_binary_op): Change the type of a parameter to bool.
1094 2017-08-09 Marek Polacek <polacek@redhat.com>
1097 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1098 Call emit_diagnostic_valist instead of pedwarn.
1099 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1100 Print the relevant types in diagnostics.
1102 2017-08-09 Marek Polacek <polacek@redhat.com>
1105 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1106 build_conditional_expr.
1107 * c-parser.c (c_parser_conditional_expression): Create locations for
1108 EXP1 and EXP2 from their source ranges. Pass the locations down to
1109 build_conditional_expr.
1110 * c-tree.h (build_conditional_expr): Update declaration.
1111 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1112 For -Wsign-compare, also print the types.
1114 2017-08-08 Martin Liska <mliska@suse.cz>
1116 * c-convert.c: Include header files.
1117 * c-typeck.c: Likewise.
1119 2017-08-07 Martin Liska <mliska@suse.cz>
1121 * c-parser.c (c_parser_attributes): Canonicalize name of an
1124 2017-08-02 Marek Polacek <polacek@redhat.com>
1127 * c-parser.c (c_parser_unary_expression): Use set_error.
1131 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1132 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1134 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1135 Martin Liska <mliska@suse.cz>
1137 * c-typeck.c (c_finish_goto_label): Build gimple predict
1140 2017-07-31 Martin Liska <mliska@suse.cz>
1143 * c-convert.c (convert): Guard condition with flag_sanitize_p
1144 also with current_function_decl non-null equality.
1145 * c-decl.c (grokdeclarator): Likewise.
1146 * c-typeck.c (build_binary_op): Likewise.
1148 2017-07-25 Marek Polacek <polacek@redhat.com>
1150 * c-decl.c (grokfield): Remove local variable.
1152 2017-07-25 Marek Polacek <polacek@redhat.com>
1155 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1156 macro expansion if the body is in { }.
1157 (c_parser_while_statement): Likewise.
1158 (c_parser_for_statement): Likewise.
1160 2017-07-18 Nathan Sidwell <nathan@acm.org>
1162 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1164 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1166 * c-decl.c (implicitly_declare): When suggesting a missing
1167 #include, provide a fix-it hint.
1169 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1171 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1172 and call that instead.
1173 * c-tree.h (selftest::run_c_tests): New decl.
1175 2017-06-26 Marek Polacek <polacek@redhat.com>
1178 * c-parser.c (c_parser_if_body): Set the location of the
1179 body of the conditional after parsing all the labels. Call
1180 warn_for_multistatement_macros.
1181 (c_parser_else_body): Likewise.
1182 (c_parser_switch_statement): Likewise.
1183 (c_parser_while_statement): Likewise.
1184 (c_parser_for_statement): Likewise.
1185 (c_parser_statement): Add a default argument. Save the location
1186 after labels have been parsed.
1187 (c_parser_c99_block_statement): Likewise.
1189 2017-06-19 Richard Biener <rguenther@suse.de>
1191 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1192 negated _Literals to parse _Literal (int) -1.
1194 2017-06-13 Martin Liska <mliska@suse.cz>
1197 * c-convert.c (convert): Use sanitize_flags_p.
1198 * c-decl.c (grokdeclarator): Likewise.
1199 * c-typeck.c (convert_for_assignment): Likewise.
1200 (c_finish_return): Likewise.
1201 (build_binary_op): Likewise.
1203 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1206 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1207 to sizetype before size_binop.
1209 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1211 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1214 2017-06-06 Marek Polacek <polacek@redhat.com>
1217 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1219 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1221 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1223 * c-parser.c (c_parser_binary_expression): Implement the
1224 -Wsizeof_pointer_div warning.
1225 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1226 from a parenthesized expression.
1227 (c_parser_expr_list): Use c_last_sizeof_loc.
1228 * c-tree.h (c_last_sizeof_loc): New external.
1229 * c-typeck.c (c_last_sizeof_loc): New variable.
1230 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1232 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1235 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1237 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1239 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1242 2017-05-24 Martin Sebor <msebor@redhat.com>
1245 * c-fold.c (c_fully_fold_internal): Adjust.
1246 * c-typeck.c (parser_build_unary_op): Adjust.
1248 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1250 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1251 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1254 2017-05-23 Marek Polacek <polacek@redhat.com>
1256 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1259 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1261 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1262 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1263 it returned invariant. Call tree_invariant_p unconditionally
1264 afterwards to decide whether to return expr or op0.
1266 2017-05-22 Nathan Sidwell <nathan@acm.org>
1268 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1270 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1272 * c-parser.c (c_parser_omp_clause_default): Handle
1273 "OMP_CLAUSE_DEFAULT_PRESENT".
1275 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1277 * config-lang.in (gtfiles): Add c-family/c-format.c.
1279 2017-05-18 Nathan Sidwell <nathan@acm.org>
1281 * c-decl.c (pushdecl_top_level): Delete unused function.
1283 2017-05-18 Marek Polacek <polacek@redhat.com>
1285 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1286 (check_earlier_gotos): Likewise.
1287 (define_label): Likewise.
1288 (pending_xref_error): Likewise.
1289 (smallest_type_quals_location): Likewise.
1290 (grokdeclarator): Likewise.
1291 (grokparms): Likewise.
1292 (identifier_global_value): Likewise.
1293 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1294 (find_init_member): Likewise.
1296 2017-05-18 Marek Polacek <polacek@redhat.com>
1298 * c-decl.c (start_decl): Use false/true instead of 0/1.
1299 (grokdeclarator): Likewise.
1300 (finish_struct): Likewise.
1301 (start_function): Change the return type to bool. Use false/true
1303 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1304 * c-tree.h (start_function): Update.
1305 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1306 (set_designator): Change the return type to bool. Use false/true
1309 2017-05-17 Marek Polacek <polacek@redhat.com>
1311 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1312 * c-typeck.c: Likewise.
1314 2017-05-17 Marek Polacek <polacek@redhat.com>
1317 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1318 DECL_IGNORED_P even for non-static compound literals.
1320 2017-05-17 Martin Liska <mliska@suse.cz>
1322 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1323 use it instead of int type.
1325 2017-05-17 Marek Polacek <polacek@redhat.com>
1327 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1329 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1330 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1331 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1332 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1334 (c_parser_conditional_expression): Likewise.
1335 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1336 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1337 (process_init_element): Likewise.
1338 (build_binary_op): Likewise.
1339 (handle_omp_array_sections_1): Likewise.
1341 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1343 * c-parser.c (c_parser_omp_clause_num_gangs)
1344 (c_parser_omp_clause_num_workers)
1345 (c_parser_omp_clause_vector_length): Merge functions into...
1346 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1349 2017-05-11 Nathan Sidwell <nathan@acm.org>
1351 * gimple-parser.c: Don't #include tree-dump.h.
1353 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1356 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1358 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1361 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1362 incorrect __MEM syntax.
1364 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1367 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1370 2017-05-09 Nathan Sidwell <nathan@acm.org>
1372 * c-tree.h (pushdecl): Declare.
1374 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1376 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1377 with diagnostic_report_diagnostic.
1378 * c-errors.c (pedwarn_c99): Likewise.
1379 (pedwarn_c90): Likewise.
1381 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1384 * c-gimplify.c (c_gimplify_expr): Remove calls to
1385 cilk_gimplifY_call_params_in_spawned_fn.
1387 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1389 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1390 hint for removing extra semicolon.
1392 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1395 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1396 enabled, set specs->type to integer_type_node.
1398 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1400 * c-array-notation.c: Fix typo in comment.
1402 2017-03-29 Marek Polacek <polacek@redhat.com>
1405 * c-decl.c (finish_decl): Check VAR_P.
1407 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1410 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1411 * c-typeck.c (c_mark_addressable): Likewise. Look through
1412 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1414 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1416 2017-03-23 Marek Polacek <polacek@redhat.com>
1418 * c-tree.h: Remove a C_RID_YYCODE reference.
1420 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1423 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1424 optional COMPOUND_EXPR with ubsan instrumentation.
1426 2017-03-17 Marek Polacek <polacek@redhat.com>
1428 * c-parser.c: Add C11 references.
1430 2017-03-15 Marek Polacek <polacek@redhat.com>
1432 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1434 2017-03-11 Marek Polacek <polacek@redhat.com>
1436 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1438 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1440 PR translation/79848
1441 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1443 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1445 2017-03-09 Marek Polacek <polacek@redhat.com>
1448 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1449 parameter declarations with initializers.
1451 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1454 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1457 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1460 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1461 for "may only be used in compound statements" diagnostics, change it
1462 such that the same translatable string is used for all pragmas. For
1463 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1465 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1466 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1467 "may only be used in compound statements" diagnostics, such that the
1468 same translatable string is used for all pragmas.
1470 2017-03-04 Marek Polacek <polacek@redhat.com>
1473 * c-decl.c (implicit_decl_warning): Add missing space.
1475 2017-03-03 Marek Polacek <polacek@redhat.com>
1478 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1479 current_function_prototype_arg_types is error_mark_node. Fix
1480 formatting. Use TREE_VALUE instead of TREE_TYPE.
1482 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1485 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1486 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1487 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1491 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1492 instead of %<_Generic>.
1493 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1494 (c_parser_omp_target_exit_data): Use %<release%> instead of
1497 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1499 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1500 instead of just cond ? "..." : "...".
1501 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1502 for "enter"/"exit" keyword.
1503 (c_finish_oacc_routine): Don't use %s to supply portions of the
1506 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1509 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1510 handle -Wrestrict here.
1511 * c-typeck.c (build_function_call_vec): Adjust
1512 check_function_arguments caller.
1514 2017-02-23 Richard Biener <rguenther@suse.de>
1517 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1518 to initialize c_exprs to return.
1519 (c_parser_gimple_binary_expression): Likewise.
1520 (c_parser_gimple_unary_expression): Likewise.
1521 (c_parser_gimple_postfix_expression): Likewise.
1523 2017-02-22 Marek Polacek <polacek@redhat.com>
1526 * c-typeck.c (convert_arguments): Handle error_mark_node.
1528 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1530 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1531 value of c_parser_parse_ssa_name against error_mark_node and emit
1532 error if ssa name is anonymous and written as default definition.
1534 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1536 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1539 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1542 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1543 ignore #pragma omp target even when not followed by identifier.
1545 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1547 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1548 (c_parser_gimple_unary_expression): Likewise.
1550 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1552 * c-parser.c (c_parser_oacc_declare): Add missing space in
1555 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1558 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1559 set_c_expr_source_range when parsing ssa-name.
1561 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1562 Richard Biener <rguenther@suse.de>
1564 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1565 building IL when arguments are error_mark_node.
1566 (c_parser_gimple_unary_expression): Likewise.
1567 (c_parser_gimple_if_stmt): Likewise.
1568 (c_parser_gimple_switch_stmt): Likewise.
1569 (c_parser_gimple_return_stmt): Likewise.
1570 (c_parser_parse_ssa_name): When name lookup fails do not build
1571 an SSA name. Use undeclared rather than not declared in error
1574 2017-02-09 Marek Polacek <polacek@redhat.com>
1577 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1578 instead of c_parser_skip_until_found.
1580 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1583 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1584 symtab_node::get on automatic variables.
1586 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1587 Chung-Lin Tang <cltang@codesourcery.com>
1589 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1590 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1592 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1594 2017-02-07 Richard Biener <rguenther@suse.de>
1596 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1597 (c_parser_gimple_postfix_expression_after_primary):
1598 Do not use c_build_function_call_vec to avoid folding and promotion.
1601 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1604 * c-decl.c (pop_scope): Pass main_input_filename to
1605 build_translation_unit_decl.
1607 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1609 * c-parser.c: Include "read-rtl-function.h" and
1611 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1612 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1613 production. Update for renaming of field "gimple_pass" to
1614 "gimple_or_rtl_pass". If __RTL was seen, call
1615 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1616 to an auto_timevar, to cope with early exit.
1617 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1618 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1619 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1621 (c_parser_parse_rtl_body): New function.
1622 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1623 (struct c_declspecs): Rename field "gimple_pass" to
1624 "gimple_or_rtl_pass". Add field "rtl_p".
1625 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1626 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1627 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1628 (c_parser_gimple_or_rtl_pass_list): ...this.
1630 2017-01-20 Marek Polacek <polacek@redhat.com>
1633 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1635 2017-01-13 Richard Biener <rguenther@suse.de>
1637 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1640 2017-01-13 Richard Biener <rguenther@suse.de>
1642 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1643 _Literal ( type-name ) number.
1645 2017-01-12 Richard Biener <rguenther@suse.de>
1647 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1650 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1653 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1656 2017-01-11 Richard Biener <rguenther@suse.de>
1659 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1660 returns on parse errors.
1662 2017-01-04 Marek Polacek <polacek@redhat.com>
1665 * c-parser.c (c_parser_postfix_expression): Mark zero character
1666 constants by setting original_type in c_expr.
1667 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1668 with a zero character constant.
1669 (char_type_p): New function.
1671 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1673 * c-parser.c (c_parser_declaration_or_fndef): Create a
1674 rich_location at init_loc and parse it to start_init.
1675 (last_init_list_comma): New global.
1676 (c_parser_braced_init): Update last_init_list_comma when parsing
1677 commas. Pass it to pop_init_level. Pass location of closing
1678 brace to pop_init_level.
1679 (c_parser_postfix_expression_after_paren_type): Create a
1680 rich_location at type_loc and parse it to start_init.
1681 (c_parser_omp_declare_reduction): Likewise for loc.
1682 * c-tree.h (start_init): Add rich_location * param.
1683 (pop_init_level): Add location_t param.
1684 * c-typeck.c (struct initializer_stack): Add field
1685 "missing_brace_richloc".
1686 (start_init): Add richloc param, use it to initialize
1687 the stack node's missing_brace_richloc.
1688 (last_init_list_comma): New decl.
1689 (finish_implicit_inits): Pass last_init_list_comma to
1691 (push_init_level): When finding missing open braces, add fix-it
1692 hints to the richloc.
1693 (pop_init_level): Add "insert_before" param and pass it
1694 when calling pop_init_level. Add fixits about missing
1695 close braces to any richloc. Use the richloc for the
1696 -Wmissing-braces warning.
1697 (set_designator): Pass last_init_list_comma to pop_init_level.
1698 (process_init_element): Likewise.
1700 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1702 Update copyright years.
1704 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1707 * c-typeck.c (build_function_call_vec): If check_function_arguments
1708 returns true, set TREE_NO_WARNING on CALL_EXPR.
1711 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1712 to *expr instead of overwriting it.
1714 2016-12-20 Richard Biener <rguenther@suse.de>
1716 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1718 (c_parser_gimple_statement): Only build assigns for non-error
1720 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1722 2016-12-14 Martin Jambor <mjambor@suse.cz>
1724 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1726 (c_finish_oacc_routine): Adjusted call to
1727 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1728 to use their new names.
1729 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1731 (c_parser_oacc_update): Likewise.
1732 (c_parser_omp_simd): Likewise.
1733 (c_parser_omp_target_update): Likewise.
1734 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1735 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1737 (c_finish_omp_cancellation_point): Likewise.
1738 * gimple-parser.c: Do not include omp-low.h
1740 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1741 James Norris <jnorris@codesourcery.com>
1743 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1744 EXIT_DATA,WAIT} are not used in compound statements.
1745 (c_parser_oacc_enter_exit_data): Update diagnostics.
1747 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1750 * c-decl.c (diagnose_mismatched_decls): Use
1751 OPT_Wbuiltin_declaration_mismatch here too.
1753 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1754 Alan Hayward <alan.hayward@arm.com>
1755 David Sherwood <david.sherwood@arm.com>
1757 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1758 (make_label, finish_struct): Likewise.
1760 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1761 Richard Biener <rguenther@suse.de>
1763 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1764 * config-lang.in (gtfiles): Add c/c-parser.h.
1765 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1766 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1767 * c-parser.c (enum c_id_kind, struct c_token,
1768 c_parser_next_token_is, c_parser_next_token_is_not,
1769 c_parser_next_token_is_keyword,
1770 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1772 * c-parser.h: ... new header.
1773 * c-parser.c: Include c-parser.h and gimple-parser.h.
1774 (c_parser_peek_token, c_parser_peek_2nd_token,
1775 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1776 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1777 c_parser_error, c_parser_require, c_parser_skip_until_found,
1778 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1779 c_parser_type_name): Export.
1780 (c_parser_tokens_buf): New function.
1781 (c_parser_error): Likewise.
1782 (c_parser_set_error): Likewise.
1783 (c_parser_declspecs): Handle RID_GIMPLE.
1784 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1785 via c_parser_parse_gimple_body.
1786 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1787 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1788 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1789 c_parser_error, c_parser_require, c_parser_skip_until_found,
1790 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1791 c_parser_type_name): Declare.
1792 (struct c_parser): Declare forward.
1793 (c_parser_tokens_buf): Declare.
1794 (c_parser_error): Likewise.
1795 (c_parser_set_error): Likewise.
1796 * gimple-parser.c: New file.
1797 * gimple-parser.h: Likewise.
1799 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1802 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1805 2016-09-11 Le-Chun Wu <lcwu@google.com>
1806 Mark Wielaard <mjw@redhat.com>
1808 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1809 to the given -Wshadow= variant.
1811 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1813 * c-typeck.c: Include memmodel.h.
1815 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1818 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1819 instead of lhd_return_null_tree_v.
1821 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1824 * c-decl.c (smallest_type_quals_location): New static function.
1825 (grokdeclarator): Try to find the correct location for an ignored
1828 2016-09-26 Marek Polacek <polacek@redhat.com>
1831 * c-decl.c (pop_scope): Add gcc_fallthrough.
1833 2016-09-26 Marek Polacek <polacek@redhat.com>
1836 * c-parser.c (struct c_token): Add flags field.
1837 (c_lex_one_token): Pass it to c_lex_with_flags.
1838 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1839 into IFN_FALLTHROUGH.
1840 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1841 attribute fallthrough after a case label or default label.
1842 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1844 2016-09-24 Marek Polacek <polacek@redhat.com>
1847 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1848 have boolean value. Warn about ++/-- on booleans.
1850 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1852 * c-parser.c (incomplete_record_decls): Remove unnecessary
1853 = vNULL initialization of file scope vec.
1855 2016-09-16 Marek Polacek <polacek@redhat.com>
1857 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1859 2016-09-14 Marek Polacek <polacek@redhat.com>
1861 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1862 (fix_array_notation_expr): Likewise.
1863 * c-decl.c (finish_decl): Likewise.
1864 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1865 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1866 (function_to_pointer_conversion): Use false instead of 0.
1867 (convert_lvalue_to_rvalue): Likewise.
1868 (parser_build_unary_op): Likewise.
1869 (build_atomic_assign): Likewise.
1870 (build_unary_op): Change nonconvert parameter type to bool, use
1871 true/false instead of 1/0.
1872 (build_binary_op): Use true instead of 1.
1874 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1876 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1877 of add_fixit_insert to add_fixit_insert_before.
1879 2016-09-13 Marek Polacek <polacek@redhat.com>
1881 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1884 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1887 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1888 COMPOUND_EXPR to warn_for_omitted_condop.
1890 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1892 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1893 c_get_substring_location for this new langhook.
1895 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1898 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1900 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1901 instead of mark_exp_read on low_bound/length expression.
1902 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1903 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1904 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1905 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1906 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1907 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1908 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1909 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1910 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1911 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1912 instead of mark_expr_read.
1913 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1914 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1915 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1916 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1917 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1918 array section bases outside of depend clause, for depend clause
1919 use convert_lvalue_to_rvalue on the base.
1920 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1921 linear, aligned, map, to and from clauses.
1922 (c_omp_clause_copy_ctor): New function.
1924 2016-09-01 Marek Polacek <polacek@redhat.com>
1927 * c-typeck.c (composite_type): Add FALLTHRU comment.
1929 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1931 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1932 to the insertion fixits for "struct", "union", and "enum".
1934 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1936 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1937 rather than add_fixit_misspelled_id.
1938 (undeclared_variable): Likewise.
1939 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1940 now-redundant "here" params from add_fixit_insert method calls.
1941 (c_parser_parameter_declaration): Likewise.
1942 * c-typeck.c (build_component_ref): Remove now-redundant range
1943 param from add_fixit_replace method calls.
1945 2016-08-25 Marek Polacek <polacek@redhat.com>
1947 * c-typeck.c (parser_build_binary_op): Pass LHS to
1948 warn_logical_not_parentheses.
1950 2016-08-25 Marek Polacek <polacek@redhat.com>
1953 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1954 or _FloatN or _FloatNx is not supported.
1955 (finish_declspecs): Set type to integer_type_node when _FloatN or
1956 _FloatNx is not supported.
1958 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1961 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1962 (struct c_declspecs): Add field floatn_nx_idx.
1963 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1964 and _FloatNx type specifiers.
1965 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1966 (c_parser_declspecs, c_parser_attribute_any_word)
1967 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1968 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1969 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1970 narrower than double.
1972 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1973 Martin Liska <mliska@suse.cz>
1976 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1977 % to determine val element to change. Assert that
1978 wchar_bytes * charwidth fits into val array.
1980 2016-08-12 Marek Polacek <polacek@redhat.com>
1983 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1984 (c_parser_postfix_expression): Likewise.
1985 * c-typeck.c (build_unary_op): Adjust fall through comment.
1986 (c_mark_addressable): Likewise.
1988 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1991 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1992 array member through typedef, for orig_qual_indirect == 0 clear
1995 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1998 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1999 this up to selftest::run_c_tests.
2000 (selftest::run_c_tests): New function.
2002 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2004 * c-parser.c (struct oacc_routine_data): Add error_seen and
2005 fndecl_seen members.
2006 (c_finish_oacc_routine): Use these.
2007 (c_parser_declaration_or_fndef): Adjust.
2008 (c_parser_oacc_routine): Likewise. Support more C language
2009 constructs, and improve diagnostics. Move pragma context
2011 (c_parser_pragma): ... here.
2013 * c-parser.c (struct oacc_routine_data): New.
2014 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2016 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2017 declare target" attribute.
2019 2016-08-01 Jan Beulich <jbeulich@suse.com>
2021 * c-fold.c (c_fully_fold_internal): Also emit shift count
2022 warnings for vector types.
2023 * c-typeck.c (build_binary_op): Likewise.
2025 2016-07-29 Marek Polacek <polacek@redhat.com>
2028 * c-decl.c (finish_struct): Rephrase an error message.
2031 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2032 to error node for invalid code.
2035 * c-decl.c (implicitly_declare): Return decl early not only for
2036 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2038 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2041 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2042 on GNU extern inline functions.
2044 2016-07-29 Marek Polacek <polacek@redhat.com>
2047 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2050 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2052 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2054 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2056 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2058 (best_macro_match): Likewise, converting from a typedef to a
2060 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2061 (lookup_name_fuzzy): Update for change of best_macro_match to a
2062 subclass with a ctor that calls cpp_forall_identifiers.
2064 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2066 * c-decl.c (implicit_decl_warning): Update for conversion of
2067 return type of lookup_name_fuzzy to const char *.
2068 (undeclared_variable): Likewise.
2069 (lookup_name_fuzzy): Convert return type from tree to
2071 * c-parser.c (c_parser_declaration_or_fndef): Update for
2072 conversion of return type of lookup_name_fuzzy to const char *.
2073 (c_parser_parameter_declaration): Likewise.
2075 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2077 * c-parser.c (c_parser_oacc_declare): Don't scan for
2079 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2080 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2081 zero-length subarrays.
2083 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2086 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2087 instead of FUZZY_LOOKUP_NAME.
2088 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2089 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2091 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2094 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2096 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2098 * c-parser.c (c_parser_generic_selection): Make type of variable
2100 (c_parser_omp_declare_simd): Likewise.
2102 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2104 * c-decl.c (struct c_struct_parse_info): Change member types
2105 from vec to auto_vec.
2106 (start_struct): Adjust.
2107 (finish_struct): Likewise.
2109 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2112 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2114 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2116 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2117 Move pragma context checking into...
2118 (c_parser_omp_cancellation_point): ... here, and improve
2119 diagnostic messages.
2120 * c-typeck.c (c_finish_omp_cancel)
2121 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2123 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2126 * c-typeck.c (c_build_qualified_type): Don't clear
2127 C_TYPE_INCOMPLETE_VARS for the main variant.
2129 2016-06-28 Martin Sebor <msebor@redhat.com>
2132 * c-typeck.c (output_init_element): Diagnose incompatible types
2133 before non-constant initializers.
2135 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2137 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2139 2016-06-23 Andi Kleen <ak@linux.intel.com>
2141 * Make-lang.in: Add support for autofdo.
2143 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2146 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2147 (implicit_decl_warning): When issuing warnings for implicit
2148 declarations, attempt to provide a suggestion via
2150 (undeclared_variable): Likewise when issuing errors.
2151 (lookup_name_in_scope): Likewise.
2152 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2153 (best_macro_match): New typedef.
2154 (find_closest_macro_cpp_cb): New function.
2155 (lookup_name_fuzzy): New function.
2156 * c-parser.c: Include gcc-rich-location.h.
2157 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2158 (c_keyword_starts_typename): ...this new function.
2159 (c_parser_declaration_or_fndef): When issuing errors about
2160 missing "struct" etc, add a fixit. For other kinds of errors,
2161 attempt to provide a suggestion via lookup_name_fuzzy.
2162 (c_parser_parms_declarator): When looking ahead to detect typos in
2163 type names, also reject CPP_KEYWORD.
2164 (c_parser_parameter_declaration): When issuing errors about
2165 unknown type names, attempt to provide a suggestion via
2167 * c-tree.h (c_keyword_starts_typename): New prototype.
2169 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2172 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2173 c_common_type returns error_mark_node.
2175 2016-06-19 Martin Sebor <msebor@redhat.com>
2178 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2179 __alignof__ (expression).
2181 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2183 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2185 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2187 * c-typeck.c (build_component_ref): Simplify fixit code by
2188 using gcc_rich_location::add_fixit_misspelled_id.
2189 (set_init_label): Likewise.
2191 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2193 * c-parser.c (c_parser_initelt): Provide location of name for new
2194 location_t param of set_init_label.
2195 * c-tree.h (set_init_label): Add location_t param.
2196 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2197 param and use it when issuing error messages about unrecognized
2198 field names. Attempt to provide a fixit hint if appropriate,
2199 otherwise update the error message to provide the type name.
2201 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2204 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2207 2016-06-08 Martin Sebor <msebor@redhat.com>
2208 Jakub Jelinek <jakub@redhat.com>
2212 * c-typeck.c (convert_arguments): Don't promote last argument
2213 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2215 2016-06-08 Marek Polacek <polacek@redhat.com>
2218 * c-decl.c (grokdeclarator): Check TYPE_P.
2221 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2224 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2226 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2227 and structure element reference, capture the location of the
2228 element name token and pass it to build_component_ref.
2229 (c_parser_postfix_expression_after_primary): Likewise for
2230 structure element dereference.
2231 (c_parser_omp_variable_list): Likewise for
2232 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2233 * c-tree.h (build_component_ref): Add location_t param.
2234 * c-typeck.c (build_component_ref): Add location_t param
2235 COMPONENT_LOC. Use it, if available, when issuing hints about
2236 mispelled member names to provide a fixit replacement hint.
2238 2016-06-06 Marek Polacek <polacek@redhat.com>
2241 * c-parser.c (c_parser_direct_declarator): Set location.
2243 2016-06-06 Marek Polacek <polacek@redhat.com>
2245 * c-typeck.c (comptypes_internal): Handle comparisons of
2246 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2247 TYPE_REF_CAN_ALIAS_ALL.
2249 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2251 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2252 arguments as addressable when async clause exists.
2254 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2257 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2258 when combined with target construct.
2260 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2262 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2263 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2265 2016-05-25 Marek Polacek <polacek@redhat.com>
2268 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2271 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2273 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2275 * c-parser.c (c_parser_oacc_declare): Add support for
2276 GOMP_MAP_FIRSTPRIVATE_POINTER.
2277 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2278 argument with enum c_omp_region_type ort.
2279 (handle_omp_array_sections): Likewise. Update call to
2280 handle_omp_array_sections_1.
2281 (c_finish_omp_clauses): Add specific errors and warning messages for
2282 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2283 call to handle_omp_array_sections.
2285 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2287 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2289 2016-05-24 Richard Biener <rguenther@suse.de>
2293 * c-typeck.c (build_array_ref): Do not complain about indexing
2294 non-lvalue vectors. Adjust for function name change.
2296 2016-05-20 Martin Sebor <msebor@redhat.com>
2299 * c-typeck.c (error_init): Use
2300 expansion_point_location_if_in_system_header.
2301 (warning_init): Same.
2303 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2306 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2308 (c_parser_postfix_expression): Likewise.
2309 * c-tree.h (c_expr::set_error): New method.
2310 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2311 that result's range is initialized.
2313 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2315 * c-typeck.c (parser_build_unary_op): Fix formatting.
2317 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2319 * c-decl.c (grokdeclarator): Remove errmsg and use of
2320 targetm.invalid_return_type.
2321 (grokparms): Remove errmsg and use of
2322 targetm.invalid_parameter_type.
2324 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2326 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2327 function return type.
2329 2016-05-12 Marek Polacek <polacek@redhat.com>
2332 * c-decl.c (build_compound_literal): Pass LOC down to
2333 c_incomplete_type_error.
2334 * c-tree.h (require_complete_type): Adjust declaration.
2335 (c_incomplete_type_error): Likewise.
2336 * c-typeck.c (require_complete_type): Add location parameter, pass it
2337 down to c_incomplete_type_error.
2338 (c_incomplete_type_error): Add location parameter, pass it down to
2340 (build_component_ref): Pass location down to c_incomplete_type_error.
2341 (default_conversion): Pass location down to require_complete_type.
2342 (build_array_ref): Likewise.
2343 (build_function_call_vec): Likewise.
2344 (convert_arguments): Likewise.
2345 (build_unary_op): Likewise.
2346 (build_c_cast): Likewise.
2347 (build_modify_expr): Likewise.
2348 (convert_for_assignment): Likewise.
2349 (c_finish_omp_clauses): Likewise.
2351 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2354 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2356 * c-errors.c (pedwarn_c90): Return true if warned.
2357 * c-tree.h (pedwarn_c90): Change return type to bool.
2358 (enum c_declspec_word): Add new enumerator cdw_atomic.
2360 2016-05-11 Marek Polacek <polacek@redhat.com>
2363 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2364 diagnose_mismatched_attributes and call it.
2366 2016-05-10 Marek Polacek <polacek@redhat.com>
2369 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2370 on a declaration following the definition.
2372 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2374 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2375 parse it through to c_parser_c99_block_statement.
2376 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2379 2016-05-04 Marek Polacek <polacek@redhat.com>
2381 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2384 2016-05-04 Marek Polacek <polacek@redhat.com>
2387 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2388 for macro expansions.
2390 2016-05-03 Marek Polacek <polacek@redhat.com>
2393 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2394 check_builtin_function_arguments.
2396 2016-05-03 Richard Biener <rguenther@suse.de>
2398 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2399 the checksum from the previous stage.
2401 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2403 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2404 c_finish_omp_clauses.
2405 (c_parser_omp_all_clauses): Likewise.
2406 (c_parser_oacc_cache): Likewise.
2407 (c_parser_oacc_loop): Likewise.
2408 (omp_split_clauses): Likewise.
2409 (c_parser_omp_declare_target): Likewise.
2410 (c_parser_cilk_all_clauses): Likewise.
2411 (c_parser_cilk_for): Likewise.
2412 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2413 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2415 2016-05-02 Marek Polacek <polacek@redhat.com>
2418 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2421 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2424 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2425 OACC_LOOP_CLAUSE_MASK.
2426 (c_parser_oacc_kernels_parallel): Update call to
2427 c_oacc_split_loop_clauses.
2429 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2431 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2432 argument to build_modify_expr in two cases.
2434 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2436 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2437 warn_for_memset instead of warning directly here.
2439 2016-04-26 Marek Polacek <polacek@redhat.com>
2442 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2444 (c_parser_for_statement): ... here.
2445 (c_parser_if_statement): Use it.
2446 (c_parser_switch_statement): Use it.
2447 (c_parser_while_statement): Use it.
2450 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2452 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2455 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2456 instead of c_finish_cilk_clauses.
2457 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2458 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2459 floating-point variables in the linear clause for Cilk Plus.
2461 2016-04-18 Michael Matz <matz@suse.de>
2463 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2464 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2466 2016-04-15 Marek Polacek <polacek@redhat.com>
2469 * c-typeck.c (build_unary_op): Pass location down to error and
2472 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2475 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2477 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2478 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2479 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2480 Adjust c_parser_pragma callers.
2481 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2483 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2485 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2486 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2487 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2488 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2489 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2490 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2491 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2492 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2494 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2495 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2498 2016-04-13 Marek Polacek <polacek@redhat.com>
2501 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2503 (c_parser_statement): Likewise.
2504 (c_parser_c99_block_statement): Likewise.
2505 (c_parser_while_statement): Likewise.
2506 (c_parser_for_statement): Likewise.
2507 (c_parser_if_body): Don't set IF_P here.
2508 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2509 about dangling else here.
2510 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2511 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2512 warn about dangling else here.
2514 2016-04-04 Marek Polacek <polacek@redhat.com>
2517 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2519 2016-03-31 Marek Polacek <polacek@redhat.com>
2522 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2524 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2527 * c-parser.c (c_parser_postfix_expression): Set the source range
2528 for uses of "__builtin_types_compatible_p".
2530 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2533 * c-typeck.c (composite_type): Don't count void_list_node
2534 into len, if the list is terminated by void_list_node, start
2535 with void_list_node instead of NULL for newargs. Stop
2538 2016-03-16 Marek Polacek <polacek@redhat.com>
2541 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2542 nested functions returning VM types.
2544 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2546 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2547 when calling c_finish_omp_clauses.
2549 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2552 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2555 2016-03-04 Marek Polacek <polacek@redhat.com>
2558 * c-parser.c (c_parser_postfix_expression): Call
2559 c_parser_cast_expression rather than c_parser_postfix_expression.
2561 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2565 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2566 of incomplete decls to error_mark_node.
2568 2016-02-24 Marek Polacek <polacek@redhat.com>
2571 * c-decl.c (finish_decl): Don't update the copy of the type of a
2572 different decl type.
2574 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2577 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2578 in id_kind reclassification.
2580 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2583 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2585 2016-02-16 James Norris <jnorris@codesourcery.com>
2588 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2590 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2592 * c-decl.c (build_null_declspecs): Zero the entire struct.
2595 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2596 callers changed. If nested_p is true, use it to call
2597 finish_implicit_inits.
2598 * c-tree.h (finish_implicit_inits): Declare.
2599 * c-typeck.c (finish_implicit_inits): New function. Move code
2601 (push_init_level): ... here.
2602 (set_designator, process_init_element): Call finish_implicit_inits.
2604 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2607 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2608 arguments for -Waddress warning.
2610 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2613 * c-decl.c (finish_enum): When honoring mode attribute,
2614 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2616 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2619 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2620 all type variants, not just TYPE_MAIN_VARIANT.
2622 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2625 * c-decl.c (c_write_global_declarations_1): Warn with
2626 warn_unused_function if static prototype without definition
2629 2016-01-27 Marek Polacek <polacek@redhat.com>
2632 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2633 to unsigned, if needed. Add -Wsign-compare warning.
2635 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2637 PR tree-optimization/69483
2638 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2640 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2643 * c-tree.h (incomplete_record_decls): Declare.
2644 * c-parser.c (incomplete_record_decls): Define.
2645 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2646 report error if any decl has zero size.
2647 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2648 or enum type to incomplete_record_decls.
2650 2016-01-14 Tom de Vries <tom@codesourcery.com>
2652 PR tree-optimization/68773
2653 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2656 2016-01-14 Marek Polacek <polacek@redhat.com>
2659 * c-decl.c (grokdeclarator): Provide more information for invalid
2662 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2664 * c-parser.c (c_parser_unary_expression): For dereferences, build
2665 a combined location before calling build_indirect_ref, so that
2666 error reports cover the full range, manually updating the c_expr
2669 2016-01-06 Marek Polacek <polacek@redhat.com>
2672 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2673 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2676 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2678 Update copyright years.
2680 2016-01-04 Marek Polacek <polacek@redhat.com>
2683 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2684 optimization to use __atomic_fetch_* built-in if possible.
2686 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2688 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2690 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2693 2015-12-22 Marek Polacek <polacek@redhat.com>
2696 * c-typeck.c (build_component_ref): Warn when acessing elements of
2697 atomic structures or unions.
2699 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2701 * c-typeck.c: Include "gcc-rich-location.h".
2702 (build_binary_op): In the two places that call binary_op_error,
2703 create a gcc_rich_location and populate it with the location of
2704 the binary op and its two operands.
2706 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2708 * c-parser.c (c_parser_statement_after_labels): When calling
2709 c_finish_return, Use the return expression's location if it has
2710 one, falling back to the location of the first token within it.
2711 * c-typeck.c (c_finish_return): When issuing warnings about
2712 the incorrect presence/absence of a return value, issue a note
2713 showing the declaration of the function.
2715 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2717 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2719 (c_parser_peek_nth_token): New function.
2720 (c_parser_peek_conflict_marker): New function.
2721 (c_parser_error): Detect conflict markers and report them as such.
2723 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2725 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2726 to preserve range information for the primary expression
2727 in the call to c_parser_postfix_expression_after_primary.
2729 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2731 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2732 expression location, falling back on the first token location,
2733 rather than always using the latter.
2735 2015-12-16 Marek Polacek <polacek@redhat.com>
2738 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2741 2015-12-15 Marek Polacek <polacek@redhat.com>
2744 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2747 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2749 * c-parser.c (c_parser_alignof_expression): Capture location of
2750 closing parenthesis (if any), or of end of unary expression, and
2751 use it to build a src_range for the expression.
2753 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2756 * c-parser.c (c_parser_get_builtin_args): Add
2757 "out_close_paren_loc" param, and write back to it.
2758 (c_parser_postfix_expression): Capture the closing
2759 parenthesis location for RID_CHOOSE_EXPR,
2760 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2761 RID_BUILTIN_SHUFFLE and use it to set the source range
2762 for such expressions; within RID_BUILTIN_COMPLEX set
2763 the underlying location.
2765 2015-12-07 Marek Polacek <polacek@redhat.com>
2768 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2769 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2771 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2773 * c-tree.h (c_build_va_arg): Adjust prototype.
2774 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2775 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2776 parameter, adjust throughout and issue an error if EXPR is a component
2777 with reverse storage order.
2779 2015-12-02 Jason Merrill <jason@redhat.com>
2781 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2782 (c_fully_fold_internal, decl_constant_value_for_optimization):
2783 Move from c-common.c.
2784 * c-tree.h: Declare decl_constant_value_for_optimization.
2785 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2787 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2790 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2791 following link from declarator to next declarator. Track original
2792 qualified type and pass it to c_build_qualified_type.
2793 * c-typeck.c (c_build_qualified_type): Add arguments
2794 orig_qual_type and orig_qual_indirect.
2796 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2798 * c-parser.c (c_parser_omp_clause_name)
2799 (c_parser_oacc_all_clauses): Alphabetical sorting.
2801 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2804 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2807 2015-12-01 Julian Brown <julian@codesourcery.com>
2808 Cesar Philippidis <cesar@codesourcery.com>
2809 James Norris <James_Norris@mentor.com>
2811 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2812 (c_parser_oacc_clause_use_device): New function.
2813 (c_parser_oacc_all_clauses): Add use_device support.
2814 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2815 (c_parser_oacc_host_data): New function.
2816 (c_parser_omp_construct): Add host_data support.
2817 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2818 * c-typeck.c (c_finish_oacc_host_data): New function.
2819 (c_finish_omp_clauses): Add use_device support.
2821 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2824 * c-decl.c: Set TYPE_PACKED in variants.
2826 2015-11-27 Martin Liska <mliska@suse.cz>
2829 * c-array-notation.c (fix_builtin_array_notation_fn):
2830 Use release_vec_vec instead of vec::release.
2831 (build_array_notation_expr): Likewise.
2832 (fix_conditional_array_notations_1): Likewise.
2833 (fix_array_notation_expr): Likewise.
2834 (fix_array_notation_call_expr): Likewise.
2836 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2839 * c-parser.c (c_parser_compound_statement_nostart): If
2840 last_label is true, use pragma_stmt instead of pragma_compound
2841 as second c_parser_pragma argument.
2842 (c_parser_omp_ordered, c_parser_omp_target_update,
2843 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2844 false as second argument to c_parser_skip_to_pragma_eol after
2845 diagnosing standalone directives used in pragma_stmt context.
2847 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2849 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2850 with "if (ENABLE_OFFLOADING)".
2852 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2855 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2856 for various Objective-C constructs: Class.name syntax,
2857 @selector(), @protocol(), @encode(), and [] message syntax.
2859 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2862 * c-typeck.c (should_suggest_deref_p): New function.
2863 (build_component_ref): Special-case POINTER_TYPE when
2864 generating a "not a structure of union" error message, and
2865 suggest a "->" rather than a ".", providing a fix-it hint.
2867 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2869 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2870 candidate into a new function, find_closest_identifier.
2872 2015-11-19 Marek Polacek <polacek@redhat.com>
2875 * c-typeck.c (parser_build_binary_op): Properly handle
2876 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2878 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2880 * c-parser.c (set_c_expr_source_range): Bulletproof both
2881 overloaded implementations against NULL expr->value.
2882 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2884 (c_parser_unary_expression): Likewise when handling addresses of
2886 (c_parser_postfix_expression): Likewise for statement expressions,
2887 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2888 __builtin_va_arg, and for __builtin_offset_of.
2889 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2890 src_range using the range of the braced initializer.
2891 (c_parser_transaction_expression): Set src_range for "ret" to a
2892 sane pair of values.
2894 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2896 * c-parser.c (c_finish_omp_declare_simd): Look for
2897 "simd" attribute as well. Update error message.
2899 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2901 * c-parser.c (c_parser_omp_declare_target): Adjust.
2903 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2905 * c-typeck.c (c_finish_omp_clauses): Don't mark
2906 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2908 2015-11-14 Marek Polacek <polacek@redhat.com>
2910 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2911 * c-typeck.c: Likewise.
2913 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2915 * c-decl.c (warn_defaults_to): Pass line_table to
2917 * c-errors.c (pedwarn_c99): Likewise.
2918 (pedwarn_c90): Likewise.
2919 * c-parser.c (set_c_expr_source_range): New functions.
2920 (c_token::get_range): New method.
2921 (c_token::get_finish): New method.
2922 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2923 based on the range from the start of the LHS to the end of the
2925 (c_parser_conditional_expression): Likewise, based on the range
2926 from the start of the cond.value to the end of exp2.value.
2927 (c_parser_binary_expression): Call set_c_expr_source_range on
2928 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2929 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2930 based on the cast_loc through to the end of the expr.
2931 (c_parser_unary_expression): Likewise, based on the
2932 op_loc through to the end of op.
2933 (c_parser_sizeof_expression) Likewise, based on the start of the
2934 sizeof token through to either the closing paren or the end of
2936 (c_parser_postfix_expression): Likewise, using the token range,
2937 or from the open paren through to the close paren for
2938 parenthesized expressions.
2939 (c_parser_postfix_expression_after_primary): Likewise, for
2940 various kinds of expression.
2941 * c-tree.h (struct c_expr): Add field "src_range".
2942 (c_expr::get_start): New method.
2943 (c_expr::get_finish): New method.
2944 (set_c_expr_source_range): New decls.
2945 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2946 on ret for prefix unary ops.
2947 (parser_build_binary_op): Likewise, running from the start of
2948 arg1.value through to the end of arg2.value.
2950 2015-11-13 Marek Polacek <polacek@redhat.com>
2953 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2955 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2957 * c-typeck.c: Include spellcheck.h.
2958 (lookup_field_fuzzy_find_candidates): New function.
2959 (lookup_field_fuzzy): New function.
2960 (build_component_ref): If the field was not found, try using
2961 lookup_field_fuzzy and potentially offer a suggestion.
2963 2015-11-12 James Norris <jnorris@codesourcery.com>
2964 Joseph Myers <joseph@codesourcery.com>
2966 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2967 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2968 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2969 and PRAGMA_OMP_CLAUSE_LINK.
2970 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2971 and PRAGMA_OACC_CLAUSE_LINK.
2972 (OACC_DECLARE_CLAUSE_MASK): New definition.
2973 (c_parser_oacc_declare): New function.
2975 2015-11-12 Marek Polacek <polacek@redhat.com>
2978 * c-parser.c (c_parser_for_statement): Reclassify the token in
2981 2015-11-11 Marek Polacek <polacek@redhat.com>
2985 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2986 checking the size of an array.
2988 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2990 * c-array-notation.c: Remove unused header files.
2991 * c-aux-info.c: Likewise.
2992 * c-convert.c: Likewise.
2993 * c-decl.c: Likewise.
2994 * c-errors.c: Likewise.
2995 * c-lang.c: Likewise.
2996 * c-objc-common.c: Likewise.
2997 * c-parser.c: Likewise.
2998 * c-typeck.c: Likewise.
2999 * gccspec.c: Likewise.
3001 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3002 Cesar Philippidis <cesar@codesourcery.com>
3003 James Norris <jnorris@codesourcery.com>
3004 Julian Brown <julian@codesourcery.com>
3005 Nathan Sidwell <nathan@codesourcery.com>
3008 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3010 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3011 (c_parser_pragma): Parse 'acc routine'.
3012 (OACC_ROUTINE_CLAUSE_MARK): Define.
3013 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3015 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3018 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3019 location of the backward-goto to the start of the loop body.
3021 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3024 * c-parser.c (c_parser_while_statement): Finish the loop before
3025 parsing ahead for misleading indentation.
3026 (c_parser_for_statement): Likewise.
3028 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3030 * c-decl.c (finish_struct): If the structure has reverse storage
3031 order, rewrite the type of array fields with scalar component. Call
3032 maybe_apply_pragma_scalar_storage_order on entry.
3033 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3034 errors on bit-fields and reverse SSO here and not...
3035 (c_mark_addressable): ...here.
3036 (output_init_element): Adjust call to initializer_constant_valid_p.
3037 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3039 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3041 * c-decl.c (warn_defaults_to): Update for change in signature
3042 of diagnostic_set_info.
3043 * c-errors.c (pedwarn_c99): Likewise.
3044 (pedwarn_c90): Likewise.
3045 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3046 for textinfo::set_location.
3048 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3049 Thomas Schwinge <thomas@codesourcery.com>
3050 James Norris <jnorris@codesourcery.com>
3052 * c-parser.c (c_parser_omp_clause_name): Add support for
3053 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3054 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3055 default(none) in OpenACC.
3056 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3058 (c_parser_oacc_clause_tile): New function.
3059 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3060 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3061 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3063 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3064 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3066 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3067 (c_parser_oacc_update): Update the error message for missing clauses.
3068 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3069 and OMP_CLAUSE_INDEPENDENT.
3071 2015-11-05 Marek Polacek <polacek@redhat.com>
3074 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3075 deal with pre-evaluation on invalid types.
3077 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3078 Ilya Verbin <ilya.verbin@intel.com>
3080 * c-parser.c: Include context.h and gimple-expr.h.
3081 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3082 monotonic together with nonmonotonic.
3083 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3084 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3085 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3086 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3087 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3088 expressions on combined target teams before the target.
3089 (c_parser_omp_declare_target): If decl has "omp declare target" or
3090 "omp declare target link" attribute, and cgraph or varpool node already
3091 exists, then set corresponding flags. Call c_finish_omp_clauses
3092 in the parenthesized extended-list syntax case.
3093 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3095 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3096 on OMP_CLAUSE_REDUCTION array sections.
3097 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3098 into the constant offset, or for variable low-bound using
3099 POINTER_PLUS_EXPR. For structure element based array sections use
3100 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3101 (c_finish_omp_clauses): Drop generic_field_head, structure
3102 elements are now always mapped even as array section bases,
3103 diagnose same var in data sharing and mapping clauses. Diagnose if
3104 linear step on declare simd is neither a constant nor a uniform
3105 parameter. Look through POINTER_PLUS_EXPR for array section
3106 reductions. Diagnose the same var or function appearing multiple
3107 times on the same directive. Fix up wording for the to clause if t
3108 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3109 modifier on kinds other than dynamic or guided or nonmonotonic
3110 modifier together with ordered clause.
3112 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3113 Chung-Lin Tang <cltang@codesourcery.com>
3115 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3117 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3119 * c-array-notation.c: Reorder #include's and remove duplicates.
3120 * c-aux-info.c: Likewise.
3121 * c-convert.c: Likewise.
3122 * c-decl.c: Likewise.
3123 * c-errors.c: Likewise.
3124 * c-lang.c: Likewise.
3125 * c-objc-common.c: Likewise.
3126 * c-parser.c: Likewise.
3127 * c-typeck.c: Likewise.
3129 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3132 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3133 after calling build_qualified_type.
3135 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3136 Thomas Schwinge <thomas@codesourcery.com>
3137 James Norris <jnorris@codesourcery.com>
3138 Joseph Myers <joseph@codesourcery.com>
3139 Julian Brown <julian@codesourcery.com>
3140 Bernd Schmidt <bschmidt@redhat.com>
3142 * c-parser.c (c_parser_oacc_shape_clause): New.
3143 (c_parser_oacc_simple_clause): New.
3144 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3145 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3147 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3148 James Norris <jnorris@codesourcery.com>
3149 Cesar Philippidis <cesar@codesourcery.com>
3153 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3154 parameters, and handle these. Adjust all users.
3155 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3157 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3159 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3161 (c_finish_omp_construct): Declare function.
3162 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3163 Merge functions into...
3164 (c_finish_omp_construct): ... this new function.
3166 2015-10-22 Richard Biener <rguenther@suse.de>
3168 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3169 before folding a MINUS_EXPR.
3171 2015-10-21 Marek Polacek <polacek@redhat.com>
3174 * c-decl.c (start_function): Warn about vararg functions without
3177 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3179 * c-typeck.c (build_conditional_expr): Use boolean vector
3180 type for vector comparison.
3181 (build_vec_cmp): New.
3182 (build_binary_op): Use build_vec_cmp for comparison.
3184 2015-10-20 Marek Polacek <polacek@redhat.com>
3186 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3188 2015-10-20 Marek Polacek <polacek@redhat.com>
3191 * c-parser.c (c_parser_attributes): Break out of the loop if the
3192 token after an attribute isn't a comma.
3194 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3195 Aldy Hernandez <aldyh@redhat.com>
3197 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3198 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3199 (c_parser_omp_variable_list): Handle structure elements for
3200 map, to and from clauses. Handle array sections in reduction
3201 clause. Formatting fixes.
3202 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3203 if clause modifiers.
3204 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3205 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3206 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3207 c_parser_omp_clause_is_device_ptr): New functions.
3208 (c_parser_omp_clause_ordered): Parse optional parameter.
3209 (c_parser_omp_clause_reduction): Handle array reductions.
3210 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3211 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3213 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3214 (c_parser_omp_clause_depend_sink): New function.
3215 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3216 (c_parser_omp_clause_map): Parse release/delete map kinds and
3217 optional always modifier.
3218 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3219 and c_finish_omp_clauses callers.
3220 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3221 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3222 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3223 (OMP_CRITICAL_CLAUSE_MASK): Define.
3224 (c_parser_omp_critical): Parse critical clauses.
3225 (c_parser_omp_for_loop): Handle doacross loops, adjust
3226 c_finish_omp_for and c_finish_omp_clauses callers.
3227 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3228 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3229 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3230 (c_parser_omp_for): Disallow ordered clause when combined with
3231 distribute. Disallow linear clause when combined with distribute
3232 and not combined with simd.
3233 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3234 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3235 parse clauses and if depend clause is found, don't parse a body.
3236 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3237 Allow target parallel without for after it.
3238 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3239 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3240 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3242 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3243 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3244 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3245 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3247 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3248 defaultmap and is_device_ptr clauses.
3249 (c_parser_omp_target): Parse target parallel and target simd. Set
3250 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3251 and target exit data. Diagnose invalid map kinds.
3252 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3253 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3255 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3257 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3258 (c_parser_omp_taskloop): New function.
3259 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3260 handle PRAGMA_OMP_TASKLOOP.
3261 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3262 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3263 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3264 Add IS_OMP argument, handle structure element bases, diagnose
3265 bitfields, pass IS_OMP recursively, diagnose known zero length
3266 array sections in depend clauses, handle array sections in reduction
3267 clause, diagnose negative length even for pointers.
3268 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3269 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3270 array sections in reduction clause, set
3271 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3272 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3273 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3274 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3276 2015-10-06 Marek Polacek <polacek@redhat.com>
3278 * c-parser.c (c_parser_statement_after_labels): Use
3279 protected_set_expr_location.
3280 (c_parser_omp_clause_num_gangs): Likewise.
3281 (c_parser_omp_clause_num_threads): Likewise.
3282 (c_parser_omp_clause_num_workers): Likewise.
3283 (c_parser_omp_clause_vector_length): Likewise.
3284 (c_parser_omp_clause_num_teams): Likewise.
3285 (c_parser_omp_clause_thread_limit): Likewise.
3286 * c-typeck.c (build_c_cast): Likewise.
3287 (c_cast_expr): Likewise.
3289 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3291 * c-typeck.c (c_tree_equal): Use real_equal instead of
3294 2015-10-04 Jason Merrill <jason@redhat.com>
3296 * c-parser.c (c_lex_one_token): Handle @synchronized.
3297 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3298 can change whether the function is transaction_safe.
3300 2015-10-02 Marek Polacek <polacek@redhat.com>
3303 * c-typeck.c (convert_for_assignment): Use the expansion point
3304 location throughout.
3306 2015-10-02 Marek Polacek <polacek@redhat.com>
3309 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3310 and pass it down to c_parser_if_statement.
3311 (c_parser_else_body): Add CHAIN parameter and pass it down to
3312 c_parser_statement_after_labels.
3313 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3314 duplicated if-else-if conditions.
3316 2015-10-01 Marek Polacek <polacek@redhat.com>
3318 * c-typeck.c (convert_for_assignment): Improve commentary.
3320 2015-09-30 Marek Polacek <polacek@redhat.com>
3323 * c-typeck.c (c_finish_return): Use the expansion point location for
3324 certain "return with value" warnings.
3326 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3328 * c-parser.c (pragma_lex): Add loc argument.
3330 2015-09-15 Marek Polacek <polacek@redhat.com>
3333 * c-decl.c (tag_exists_p): New function.
3334 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3335 struct/union/enum keywords are missing.
3336 * c-tree.h (tag_exists_p): Declare.
3338 2015-09-15 Marek Polacek <polacek@redhat.com>
3340 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3341 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3342 Return NULL_TREE instead of 0.
3343 (lookup_name): Return NULL_TREE instead of 0.
3344 (lookup_name_in_scope): Likewise.
3345 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3346 (parser_xref_tag): Use false instead of 0.
3347 (start_struct): Use true instead of 1.
3348 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3350 2015-09-14 Marek Polacek <polacek@redhat.com>
3352 * c-typeck.c (set_nonincremental_init_from_string): Use
3353 HOST_WIDE_INT_M1U when shifting a negative value.
3355 2015-09-09 Mark Wielaard <mjw@redhat.com>
3357 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3360 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3363 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3364 into OMP_FOR_PRE_BODY rather than before the loop.
3366 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3369 * c-parser.c (c_parser_oacc_all_clauses,
3370 c_parser_omp_all_clauses): Remove invalid clause from
3371 list of clauses even if parser->error is set.
3374 * c-parser.c (c_parser_omp_clause_aligned,
3375 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3377 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3381 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3382 instead of c_parser_unary_expression. If the result is !lvalue_p,
3383 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3385 2015-09-04 Marek Polacek <polacek@redhat.com>
3388 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3390 2015-09-03 Martin Sebor <msebor@redhat.com>
3393 * c-typeck.c (convert_arguments, parser_build_unary_op,
3394 build_conditional_expr, c_cast_expr, convert_for_assignment,
3395 build_binary_op, _objc_common_truthvalue_conversion): Call
3397 (c_decl_implicit): Define.
3399 2015-09-02 Marek Polacek <polacek@redhat.com>
3402 * c-parser.c (c_parser_enum_specifier): Give a better error for
3405 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3407 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3409 2015-08-12 Marek Polacek <polacek@redhat.com>
3411 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3414 2015-08-03 Marek Polacek <polacek@redhat.com>
3417 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3419 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3421 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3423 * c-parser.c (c_parser_if_body): Take token_indent_info
3424 argument. Call warn_for_misleading_indentation even when the
3425 body is a semicolon. Extract token_indent_infos corresponding
3426 to the guard, body and next tokens. Adjust call to
3427 warn_for_misleading_indentation accordingly.
3428 (c_parser_else_body): Likewise.
3429 (c_parser_if_statement): Likewise.
3430 (c_parser_while_statement): Likewise.
3431 (c_parser_for_statement): Likewise.
3433 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3434 Manuel López-Ibáñez <manu@gcc.gnu.org>
3436 * c-decl.c (get_parm_info): Remove static var. Update warning
3439 2015-07-27 Marek Polacek <polacek@redhat.com>
3443 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3445 2015-07-20 Marek Polacek <polacek@redhat.com>
3448 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3449 (build_binary_op): Warn about left shift overflows.
3451 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3453 * c-array-notation.c: Adjust includes for flags.h changes.
3454 * c-objc-common.c: Likewise.
3456 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3458 * c-array-notation.c: Adjust includes.
3459 * c-aux-info.c: Likewise.
3460 * c-convert.c: Likewise.
3461 * c-decl.c: Likewise.
3462 * c-errors.c: Likewise.
3463 * c-lang.c: Likewise.
3464 * c-objc-common.c: Likewise.
3465 * c-parser.c: Likewise.
3466 * c-typeck.c: Likewise.
3468 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3471 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3473 2015-06-29 Marek Polacek <polacek@redhat.com>
3476 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3477 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3478 about -Wswitch-bool here.
3479 (do_case): Update c_add_case_label call.
3480 (c_finish_case): Update c_do_switch_warnings call.
3482 2015-06-27 Marek Polacek <polacek@redhat.com>
3484 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3486 2015-06-26 Marek Polacek <polacek@redhat.com>
3488 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3490 * c-typeck.c (array_to_pointer_conversion): Likewise.
3491 (build_unary_op): Likewise.
3492 (c_finish_return): Likewise.
3494 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3496 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3497 * c-parser.c: Likewise.
3499 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3501 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3502 instead of pointer_hash.
3503 (detect_field_duplicates): Likewise.
3505 2015-06-25 Marek Polacek <polacek@redhat.com>
3507 * c-array-notation.c: Use VAR_P throughout.
3508 * c-decl.c: Likewise.
3509 * c-objc-common.c: Likewise.
3510 * c-parser.c: Likewise.
3511 * c-typeck.c: Likewise.
3513 2015-06-25 Marek Polacek <polacek@redhat.com>
3515 * c-decl.c: Use is_global_var throughout.
3516 * c-parser.c: Likewise.
3517 * c-typeck.c: Likewise.
3519 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3521 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3522 * c-aux-info.c: Likewise.
3523 * c-convert.c: Likewise.
3524 * c-decl.c: Likewise.
3525 * c-errors.c: Likewise.
3526 * c-lang.c: Likewise.
3527 * c-objc-common.c: Likewise.
3528 * c-parser.c: Likewise.
3529 * c-typeck.c: Likewise.
3531 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3534 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3537 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3539 * c-decl.c (pop_scope): Register the main translation unit
3540 through the new debug hook.
3542 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3544 * c-array-notation.c : Adjust include files.
3545 * c-aux-info.c : Likewise.
3546 * c-convert.c : Likewise.
3547 * c-decl.c : Likewise.
3548 * c-errors.c : Likewise.
3549 * c-lang.c : Likewise.
3550 * c-lang.h : Likewise.
3551 * c-objc-common.c : Likewise.
3552 * c-parser.c : Likewise.
3553 * c-typeck.c : Likewise.
3555 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3557 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3558 immediately clobber it.
3559 (c_write_global_declarations_1): Remove call to
3560 check_global_declaration_1.
3561 (c_write_global_declarations_2): Remove.
3562 (c_write_final_cleanups): Rename from c_write_global_declarations.
3563 Remove call to finalize_compilation_unit.
3564 Remove calls to debugging hooks.
3565 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3566 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3567 * c-tree.h: Remove c_write_global_declarations.
3569 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3571 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3572 * c-aux-info.c: Likewise.
3573 * c-convert.c: Likewise.
3574 * c-decl.c: Likewise.
3575 * c-errors.c: Likewise.
3576 * c-lang.c: Likewise.
3577 * c-objc-common.c: Likewise.
3578 * c-parser.c: Likewise.
3579 * c-typeck.c: Likewise.
3581 2015-06-04 Marek Polacek <polacek@redhat.com>
3584 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3587 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3589 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3590 Warn for empty struct.
3591 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3593 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3595 * c-decl.c (start_function): Call plugin before parsing.
3596 (finish_function): Call plugin after parsing.
3598 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3601 * c-decl.c (merge_decls): Merge DECL_COMMON.
3603 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3605 * Make-lang.in (check_gcc_pallelize): Define.
3607 2015-05-22 Marek Polacek <polacek@redhat.com>
3610 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3613 2015-05-21 Marek Polacek <polacek@redhat.com>
3615 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3618 2015-05-20 Marek Polacek <polacek@redhat.com>
3620 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3621 * c-typeck.c: Likewise.
3623 2015-05-19 Marek Polacek <polacek@redhat.com>
3625 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3627 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3630 * c-parser.c (c_parser_omp_for_loop): Don't add
3631 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3632 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3633 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3636 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3638 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3641 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3644 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3647 2015-05-14 Marek Polacek <polacek@redhat.com>
3651 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3654 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3656 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3657 to add a call to warn_for_misleading_indentation.
3658 (c_parser_else_body): Likewise, adding param "else_loc".
3659 (c_parser_if_statement): Check for misleading indentation.
3660 (c_parser_while_statement): Likewise.
3661 (c_parser_for_statement): Likewise.
3663 2015-05-08 Marek Polacek <polacek@redhat.com>
3666 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3667 (output_init_element): Likewise.
3669 2015-05-07 Marek Polacek <polacek@redhat.com>
3672 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3675 2015-04-30 Marek Polacek <polacek@redhat.com>
3677 * c-typeck.c (set_init_label): Call error_at instead of error and
3680 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3683 * c-typeck.c (c_build_va_arg): Clarify the error message.
3685 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3687 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3688 OMP_STANDALONE_CLAUSES.
3690 2015-04-28 Marek Polacek <polacek@redhat.com>
3692 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3694 2015-04-28 Marek Polacek <polacek@redhat.com>
3697 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3699 2015-04-25 Marek Polacek <polacek@redhat.com>
3702 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3705 2015-04-23 Marek Polacek <polacek@redhat.com>
3708 * c-decl.c (set_labels_context_r): New function.
3709 (store_parm_decls): Call it via walk_tree_without_duplicates.
3710 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3711 instead of create_tmp_var. Build TARGET_EXPR instead of
3713 (build_atomic_assign): Use create_tmp_var_raw instead of
3714 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3716 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3718 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3719 (c_parser_omp_target_update): Add missed %> to error_at ().
3721 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3724 * c-decl.c (c_default_pointer_mode): Remove definition.
3725 * c-tree.h (c_default_pointer_mode): Remove declaration.
3727 2015-03-27 Tobias Burnus <burnus@net-b.de>
3730 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3732 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3733 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3734 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3736 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3738 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3739 attribute for DECL_EXTERNAL VAR_DECLs.
3741 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3743 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3746 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3749 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3750 before preparing arguments to warn_logical_not_parentheses.
3752 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3755 * c-typeck.c (parser_build_binary_op): Don't warn for
3756 !!x == y or !b == y where b is _Bool.
3758 2015-03-09 Marek Polacek <polacek@redhat.com>
3760 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3761 * c-decl.c (grokdeclarator): Likewise.
3762 * c-typeck.c (build_binary_op): Likewise.
3764 2015-02-27 Marek Polacek <polacek@redhat.com>
3767 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3769 2015-02-14 Marek Polacek <polacek@redhat.com>
3772 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3773 declared through a typedef name.
3775 2015-02-13 Marek Polacek <polacek@redhat.com>
3778 * c-decl.c (grokdeclarator): Print also the type when giving
3779 the error message about array's incomplete element type.
3781 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3784 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3785 check in the POP macro.
3787 2015-02-09 Marek Polacek <polacek@redhat.com>
3790 * c-typeck.c (process_init_element): Don't always wrap
3791 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3792 initializing a range of elements.
3794 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3798 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3800 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3802 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3803 processing enum declaration.
3805 2015-01-29 Marek Polacek <polacek@redhat.com>
3808 * c-typeck.c (pop_init_level): If constructor_elements has
3809 exactly one element with integer_zerop value, set constructor_zeroinit
3810 to 1. Remove braces around warning_init call.
3812 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3815 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3816 of FUNCTION_DECLs with error_mark_node.
3818 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3821 * c-typeck.c (convert_arguments): Return -1 if there are
3822 error_args, even if we've diagnosed too many arguments.
3824 2015-01-21 Richard Biener <rguenther@suse.de>
3827 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3828 for builtins the user declared correctly.
3830 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3831 Bernd Schmidt <bernds@codesourcery.com>
3832 Cesar Philippidis <cesar@codesourcery.com>
3833 James Norris <jnorris@codesourcery.com>
3834 Jakub Jelinek <jakub@redhat.com>
3835 Ilmir Usmanov <i.usmanov@samsung.com>
3837 * c-parser.c: Include "gomp-constants.h".
3838 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3839 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3840 Use OMP_CLAUSE_SET_MAP_KIND.
3841 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3842 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3843 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3844 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3845 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3846 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3847 "copyout", "create", "delete", "deviceptr", "gang", "host",
3848 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3849 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3850 "present_or_create", "pcreate", "seq", "self", "vector",
3851 "vector_length", "wait", "worker".
3852 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3853 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3854 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3855 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3856 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3857 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3858 (c_parser_oacc_data_clause_deviceptr)
3859 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3860 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3861 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3862 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3863 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3864 (c_parser_oacc_parallel, c_parser_oacc_update)
3865 (c_parser_oacc_wait): New functions.
3866 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3867 (c_finish_oacc_data): New prototypes.
3868 * c-typeck.c: Include "gomp-constants.h".
3869 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3870 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3871 OMP_CLAUSE_SET_MAP_KIND.
3872 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3873 (c_finish_oacc_data): New functions.
3874 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3875 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3876 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3877 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3878 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3879 GOMP_MAP_FORCE_DEVICEPTR.
3881 2015-01-09 Michael Collison <michael.collison@linaro.org>
3883 * c-array-notation.c: Include hash-set.h, machmode.h,
3884 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3885 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3886 * c-aux-info.c: Ditto.
3887 * c-convert.c: Ditto.
3889 * c-errors.c: Ditto.
3890 * c-lang.c: Dittoxs.
3891 * c-objc-common.c: Ditto.
3892 * c-parser.c: Ditto.
3893 * c-typeck.c: Include hash-set.h, machmode.h,
3894 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3895 fold-const.h, wide-int.h, inchash.h, real.h and
3896 fixed-value.h due to flattening of tree.h.
3898 2015-01-07 Marek Polacek <polacek@redhat.com>
3901 * c-typeck.c (process_init_element): Disallow initialization of
3902 a flexible array member with a string constant if the structure
3905 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3908 * c-typeck.c (convert_for_assignment, c_finish_return): For
3909 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3910 types also set in_late_binary_op around convert call.
3911 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3912 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3913 result on expr as last argument to ubsan_instrument_float_cast,
3914 if in_late_binary_op, don't use c_save_expr but save_expr.
3916 Update copyright years.
3918 2015-01-05 Marek Polacek <polacek@redhat.com>
3921 * c-typeck.c (build_array_ref): Pass loc down to
3922 warn_array_subscript_with_type_char.
3924 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3926 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3927 (common-pointer-type): For pointers to arrays take qualifiers from
3929 (build_conditional_expr): Add warnings for lost qualifiers.
3930 (comp-target-types): Allow pointers to arrays with different qualifiers.
3931 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3932 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3933 to PEDWARN_FOR_QUALIFIERS.
3935 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3938 * c-convert.c: Include ubsan.h.
3939 (convert): For real -> integral casts and
3940 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3941 instead instrument the float cast directly.
3943 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3945 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3946 c_finish_stmt_expr): Remove NULL last argument from
3947 create_tmp_var_raw and create_tmp_var calls.
3948 * c-array-notation.c (fix_builtin_array_notation_fn,
3949 build_array_notation_expr, fix_conditional_array_notations_1,
3950 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3952 2014-11-28 Marek Polacek <polacek@redhat.com>
3955 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3956 convert the right operand to integer type.
3958 2014-11-25 Marek Polacek <polacek@redhat.com>
3961 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3962 for inline functions.
3964 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3967 * c-typeck.c (build_array_ref): Adjust
3968 convert_vector_to_pointer_for_subscript caller. If it returns true,
3969 call non_lvalue_loc on the result.
3971 2014-11-11 Richard Biener <rguenther@suse.de>
3973 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3976 2014-11-10 Andi Kleen <ak@linux.intel.com>
3979 * c-parser.c (c_parser_statement_after_labels): Call
3981 (c_parser_if_statement): Dito.
3982 (c_parser_switch_statement): Dito.
3983 (c_parser_while_statement): Dito.
3984 (c_parser_do_statement): Dito.
3985 (c_parser_for_statement): Dito.
3986 * c-typeck.c (c_finish_loop): Dito.
3988 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3990 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3991 OPT_Wshift_count_overflow in the warnings.
3993 2014-10-30 Marek Polacek <polacek@redhat.com>
3995 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3996 print the stripped version as well, if they're not the same.
3998 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4000 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4003 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4005 * c-decl.c: Adjust include files.
4006 * c-parser.c: Ditto.
4008 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4009 Tom Tromey <tromey@redhat.com>
4011 * c-tree.h (enum c_oracle_request): New.
4012 (c_binding_oracle_function): New typedef.
4013 (c_binding_oracle, c_pushtag, c_bind): Declare.
4014 * c-decl.c (c_binding_oracle): New global.
4015 (I_SYMBOL_CHECKED): New macro.
4016 (i_symbol_binding): New function.
4017 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4018 (I_TAG_CHECKED): New macro.
4019 (i_tag_binding): New function.
4020 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4021 (I_LABEL_CHECKED): New macro.
4022 (i_label_binding): New function.
4023 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4024 (c_print_identifier): Save and restore c_binding_oracle.
4025 (c_pushtag, c_bind): New functions.
4027 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4029 * c-typeck.c: Adjust include files.
4031 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4034 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4035 initialization here...
4036 (c_initialize_diagnostics): ... but here. Set defaults after
4037 building pretty-printer.
4039 2014-10-23 Marek Polacek <polacek@redhat.com>
4042 * c-decl.c (pop_scope): Don't print warning in external_scope.
4044 2014-10-19 Marek Polacek <polacek@redhat.com>
4047 * c-typeck.c (output_init_element): Allow initializing objects with
4048 static storage duration with compound literals even in C99 and add
4051 2014-10-17 Marek Polacek <polacek@redhat.com>
4054 * c-typeck.c (digest_init): Allow initializing objects with static
4055 storage duration with compound literals even in C99 and add pedwarn
4058 2014-10-17 Marek Polacek <polacek@redhat.com>
4061 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4062 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4063 error multiple times. Print the type.
4065 2014-10-17 Marek Polacek <polacek@redhat.com>
4068 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4071 2014-10-17 Marek Polacek <polacek@redhat.com>
4073 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4074 (start_function): Use OPT_Wimplicit_int instead of 0.
4075 (store_parm_decls_oldstyle): Likewise.
4077 2014-10-17 Alan Modra <amodra@gmail.com>
4080 * c-decl.c (merge_decls): Don't merge section name or tls model
4081 to newdecl symtab node, instead merge to olddecl. Override
4082 existing olddecl section name. Set tls_model for all thread-local
4083 vars, not just OMP thread-private ones. Remove incorrect comment.
4085 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4087 * c-decl.c: Adjust include files.
4089 2014-10-14 DJ Delorie <dj@redhat.com>
4091 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4092 (c_token_starts_typename): Check all __intN, not just __int128.
4093 (c_token_starts_declspecs): Likewise.
4094 (c_parser_declspecs): Likewise.
4095 (c_parser_attribute_any_word): Likewise.
4096 (c_parser_objc_selector): Likewise.
4097 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4098 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4100 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4102 (finish_declspecs): Likewise.
4104 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4106 * c-parser.c (c_parser_all_labels): New function to replace
4108 (c_parser_statement): Call the new function.
4110 2014-10-09 Marek Polacek <polacek@redhat.com>
4113 * c-typeck.c (pop_init_level): Don't warn about initializing
4116 2014-10-07 Marek Polacek <polacek@redhat.com>
4119 * c-decl.c (header_for_builtin_fn): New function.
4120 (implicitly_declare): Suggest which header to include.
4122 2014-10-07 Marek Polacek <polacek@redhat.com>
4124 * c-convert.c (convert): Use error_operand_p.
4125 * c-typeck.c (require_complete_type): Likewise.
4126 (really_atomic_lvalue): Likewise.
4127 (digest_init): Likewise.
4128 (handle_omp_array_sections_1): Likewise.
4130 2014-10-03 Marek Polacek <polacek@redhat.com>
4133 * c-decl.c (pop_scope): Don't warn about "inline function declared
4134 but never defined" for functions marked with gnu_inline attribute.
4136 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4139 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4140 on low_bound and length.
4142 2014-09-24 Marek Polacek <polacek@redhat.com>
4146 * c-parser.c: Don't define CPP_KEYWORD.
4147 (c_parser_switch_statement): Pass original type to c_finish_case.
4148 * c-tree.h (c_finish_case): Update declaration.
4149 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4150 conditionally to c_do_switch_warnings.
4152 2014-09-03 Marek Polacek <polacek@redhat.com>
4155 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4158 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4159 Balaji V. Iyer <balaji.v.iyer@intel.com>
4160 Igor Zamyatin <igor.zamyatin@intel.com>
4162 * c-parser.c (c_parser_cilk_for): New function.
4163 (c_parser_cilk_grainsize): Likewise.
4164 (c_get_temp_regvar): Likewise.
4165 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4166 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4167 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4168 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4171 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4173 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4174 with using HOST_WIDE_INT without truncation to 'int'
4176 2014-08-22 Marek Polacek <polacek@redhat.com>
4179 * c-typeck.c (parser_build_binary_op): Adjust call to
4180 warn_logical_not_parentheses.
4182 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4185 * c-parser.c (c_parser_array_notation): Check for correct
4186 type of an array added.
4188 2014-08-19 Marek Polacek <polacek@redhat.com>
4191 * c-typeck.c (build_binary_op): If either operand of a comparison
4192 is a boolean expression, call maybe_warn_bool_compare.
4194 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4197 * c-typeck.c (build_c_cast): Do a conversion even when the
4198 TYPE_MAIN_VARIANTs are the same.
4200 2014-08-19 Marek Polacek <polacek@redhat.com>
4202 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4203 pedwarn_c99 instead of pedwarn.
4204 (grokfield): Likewise.
4205 (warn_defaults_to): New function.
4206 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4207 Unconditionally call pedwarn_c99 instead of pedwarn.
4208 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4209 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4210 check flag_isoc11 before.
4211 * c-errors.c (pedwarn_c99): Change the return type to bool.
4212 Handle -Wc99-c11-compat.
4213 * c-parser.c (disable_extension_diagnostics): Handle
4214 warn_c99_c11_compat.
4215 (restore_extension_diagnostics): Likewise.
4216 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4217 instead of pedwarn, don't check flag_isoc11 before.
4218 (c_parser_declspecs): Likewise.
4219 (c_parser_alignas_specifier): Likewise.
4220 (c_parser_alignof_expression): Likewise.
4221 (c_parser_generic_selection): Likewise.
4222 * c-tree.h (pedwarn_c99): Update declaration.
4223 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4226 2014-08-19 Marek Polacek <polacek@redhat.com>
4228 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4230 * c-errors.c: Include "opts.h".
4231 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4232 * c-parser.c (disable_extension_diagnostics): Handle negative value
4233 of warn_c90_c99_compat, too.
4234 (restore_extension_diagnostics): Likewise.
4235 (c_parser_compound_statement_nostart): Pass
4236 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4238 2014-08-12 Marek Polacek <polacek@redhat.com>
4240 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4242 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4244 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4246 2014-08-10 Marek Polacek <polacek@redhat.com>
4249 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4250 Call pedwarn_c90 instead of pedwarn.
4251 (check_bitfield_type_and_width): Likewise.
4252 (declspecs_add_qual): Likewise.
4253 (declspecs_add_type): Likewise.
4254 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4255 Adjust to only call pedwarn_c90.
4256 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4257 pedwarn_c90 instead of pedwarn.
4258 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4259 * c-parser.c (disable_extension_diagnostics): Handle
4260 warn_c90_c99_compat.
4261 (restore_extension_diagnostics): Likewise.
4262 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4263 pedwarn_c90 instead of pedwarn.
4264 (c_parser_initelt): Likewise.
4265 (c_parser_postfix_expression): Likewise.
4266 (c_parser_postfix_expression_after_paren_type): Likewise.
4267 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4268 * c-tree.h: Fix formatting.
4269 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4270 pedwarn_c90 instead of pedwarn.
4272 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4274 * c-typeck.c: Remove include of pointer-set.h.
4276 2014-08-07 Marek Polacek <polacek@redhat.com>
4278 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4280 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4282 * c-typeck.c: Use hash_map instead of pointer_map.
4284 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4286 * c-decl.c: Use hash_set instead of pointer_set.
4288 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4291 * c-array-notation.c (expand_array_notations): Handling
4294 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4297 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4300 2014-07-30 Tom Tromey <tromey@redhat.com>
4302 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4304 (really_start_incremental_init, push_init_level): Initialize
4306 (pop_init_level): Set global designator_depth.
4307 (process_init_element): Check for designated_init attribute.
4309 2014-07-20 Marek Polacek <polacek@redhat.com>
4312 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4313 (implicitly_declare): Pass location to implicit_decl_warning.
4315 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4318 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4319 If non-NULL, call c_parser_check_literal_zero.
4320 (c_parser_check_literal_zero): New function.
4321 (c_parser_postfix_expression_after_primary): Adjust
4322 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4324 2014-07-06 Marek Polacek <polacek@redhat.com>
4327 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4328 * c-tree.h (C_ARRAY_PARAMETER): Define.
4329 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4332 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4333 Chen Gang <gang.chen.5i5j@gmail.com>
4335 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4338 2014-07-01 Marek Polacek <polacek@redhat.com>
4340 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4341 instead of 0 to WARN_FOR_ASSIGNMENT.
4343 2014-07-01 Marek Polacek <polacek@redhat.com>
4346 * c-typeck.c (convert_for_assignment): Pass
4347 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4349 2014-06-30 Marek Polacek <polacek@redhat.com>
4351 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4352 has no_sanitize_undefined attribute.
4354 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4357 * c-array-notation.c (fix_builtin_array_notation_fn):
4358 Check for 0 arguments in builtin call. Check that bultin argument is
4360 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4363 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4365 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4366 qualifiers in __auto_type for atomic types.
4367 (c_parser_typeof_specifier): Discard all type qualifiers in
4368 __typeof__ for atomic types.
4370 2014-06-25 Marek Polacek <polacek@redhat.com>
4373 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4374 the return expression to c_finish_return.
4376 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4378 * c-typeck.c (c_finish_omp_clauses): Make sure
4379 OMP_CLAUSE_LINEAR_STEP has correct type.
4381 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4385 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4387 * c-parser.c (c_parser_omp_for_loop): For
4388 #pragma omp parallel for simd move lastprivate clause from parallel
4389 to for rather than simd.
4391 2014-06-23 Marek Polacek <polacek@redhat.com>
4393 * c-typeck.c (parser_build_binary_op): Don't call
4394 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4396 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4398 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4399 * c-decl.c (merge_decls): Likewise.
4401 2014-06-09 Marek Polacek <polacek@redhat.com>
4404 * c-typeck.c (error_init): Call inform instead of error_at.
4405 (pedwarn_init): Call inform instead of pedwarn.
4406 (warning_init): Call inform instead of warning_at.
4408 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4410 * c-decl.c (merge_decls): Use set_decl_section_name.
4411 (duplicate_decls): Remove node if it exists.
4413 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4416 * c-typeck.c (push_init_level, process_init_element,
4417 pop_init_level): Correct check for zero initialization, move
4418 missing brace warning to respect zero initialization.
4420 2014-06-05 Marek Polacek <polacek@redhat.com>
4423 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4425 2014-06-05 Marek Polacek <polacek@redhat.com>
4428 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4429 on the left hand side operand of a comparison.
4431 2014-06-05 Marek Polacek <polacek@redhat.com>
4434 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4435 Print note only if the warning was printed.
4437 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4440 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4443 2014-06-03 Marek Polacek <polacek@redhat.com>
4446 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4448 * c-tree.h (c_start_case): Update.
4449 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4450 switch condition has boolean value.
4452 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4454 * c-decl.c: Include builtins.h.
4455 * c-parser.c: Likewise.
4457 2014-05-27 Marek Polacek <polacek@redhat.com>
4460 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4461 error and warning calls to error_at and warning_at. Pass location of
4462 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4463 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4464 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4466 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4469 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4470 function parameters.
4472 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4474 * c-decl.c (merge_decls): Preserve symtab node pointers.
4475 (duplicate_decls): Free new decl.
4477 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4479 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4482 * c-parser.c (c_parser_omp_target): Return bool values.
4484 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4486 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4487 num_teams_loc variable to num_thread_limit_loc.
4489 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4491 * c-array-notation.c (expand_array_notations): Use void_node
4492 instead of void_zero_node.
4494 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4496 * c-decl.c (finish_struct): Adjust.
4497 (finish_enum): Likewise.
4499 (record_inline_static): Likewise.
4500 (push_scope): Likewise.
4501 (make_label): Likewise.
4502 (lookup_label_for_goto): Likewise.
4503 (finish_struct): Likewise.
4504 (finish_enum): Likewise.
4505 (store_parm_decls): Likewise.
4506 (c_push_function_context): Likewise.
4507 * c-lang.h: Remove usage of variable_size gty attribute.
4508 * c-parser.c (c_parse_init): Adjust.
4509 (c_parse_file): Likewise.
4511 2014-05-13 Marek Polacek <polacek@redhat.com>
4514 * c-typeck.c (convert_for_assignment): Pass location to
4515 WARN_FOR_ASSIGNMENT instead of input_location.
4517 2014-05-10 Marek Polacek <polacek@redhat.com>
4519 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4520 maybe_warn_string_init.
4521 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4522 maybe_warn_string_init.
4523 * c-tree.h (maybe_warn_string_init): Update declaration.
4524 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4525 Call pedwarn_init with loc instead of with input_location.
4526 (digest_init): Pass init_loc to maybe_warn_string_init.
4527 (pop_init_level): Call pedwarn_init with loc instead of with
4529 (set_init_index): Likewise.
4530 (process_init_element): Likewise.
4532 2014-05-09 Marek Polacek <polacek@redhat.com>
4535 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4536 (c_parser_initelt): Pass location to set_init_label. Pass array index
4537 location to set_init_index.
4538 * c-tree.h (push_init_level): Update declaration.
4539 (pop_init_level): Likewise.
4540 (set_init_index): Likewise.
4541 (set_init_label): Likewise.
4542 * c-typeck.c (error_init): Add location parameter. Call error_at
4544 (digest_init): Pass init_loc to error_init.
4545 (really_start_incremental_init):
4546 (push_init_level): Add location parameter. Pass loc to pop_init_level
4548 (pop_init_level): Likewise.
4549 (set_designator): Add location parameter. Pass loc to pop_init_level,
4550 push_init_level, and error_init.
4551 (set_init_index): Add location parameter. Pass loc to error_init and
4553 (set_init_label): Likewise.
4554 (output_init_element): Pass loc to error_init.
4555 (process_init_element): Pass loc to error_init, pop_init_level,
4556 pedwarn_init, and push_init_level.
4558 2014-05-09 Marek Polacek <polacek@redhat.com>
4561 * c-parser.c (c_parser_attributes): Parse the arguments as an
4562 expression-list if the attribute takes identifier.
4564 2014-05-08 Marek Polacek <polacek@redhat.com>
4567 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4570 2014-05-08 Marek Polacek <polacek@redhat.com>
4573 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4576 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4577 Mike Stump <mikestump@comcast.net>
4578 Richard Sandiford <rdsandiford@googlemail.com>
4580 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4581 (finish_enum): Use wide-int interfaces.
4582 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4583 * c-typeck.c (build_c_cast): Likewise.
4584 (set_nonincremental_init_from_string): Likewise.
4585 (c_tree_equal): Likewise.
4587 2014-05-02 Marek Polacek <polacek@redhat.com>
4590 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4591 Return size_one_node when the type is not complete.
4592 (pointer_diff): Remove comment.
4593 (build_unary_op): Improve error messages.
4595 2014-05-02 Marek Polacek <polacek@redhat.com>
4597 * c-typeck.c (c_finish_return): Separate warning_at calls.
4599 2014-05-02 Marek Polacek <polacek@redhat.com>
4601 * c-tree.h (error_init): Remove declaration.
4602 (pedwarn_init): Likewise.
4603 * c-typeck.c (error_init): Make static and move above.
4604 (pedwarn_init): Likewise.
4605 (warning_init): Move above.
4606 (maybe_warn_string_init): Likewise.
4608 2014-05-01 Jeff Law <law@redhat.com>
4612 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4613 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4616 2014-05-02 Marek Polacek <polacek@redhat.com>
4619 * c-typeck.c (push_init_level): Set constructor_designated to
4620 p->designated for structures.
4622 2014-05-01 Marek Polacek <polacek@redhat.com>
4625 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4626 function-definition has an attribute after the declarator.
4628 2014-05-01 Marek Polacek <polacek@redhat.com>
4631 * c-typeck.c (warning_init): Add location_t parameter. Call
4632 warning_at instead of warning.
4633 (push_init_level): Pass input_location to warning_init.
4634 (add_pending_init): Add location_t parameter. Pass loc to
4636 (set_nonincremental_init): Pass input_location to add_pending_init.
4637 (set_nonincremental_init_from_string): Likewise.
4638 (output_init_element): Pass loc to warning_init and to
4641 2014-05-01 Marek Polacek <polacek@redhat.com>
4644 * c-typeck.c (c_finish_return): Distinguish between label and variable
4645 when warning about returning local address.
4647 2014-05-01 Marek Polacek <polacek@redhat.com>
4650 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4653 2014-05-01 Marek Polacek <polacek@redhat.com>
4656 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4657 instead of 0 to WARN_FOR_QUALIFIERS.
4659 2014-05-01 Marek Polacek <polacek@redhat.com>
4662 * c-typeck.c (default_conversion): Use better location for
4665 2014-04-30 Marek Polacek <polacek@redhat.com>
4667 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4668 also when SANITIZE_FLOAT_DIVIDE is on.
4670 2014-04-30 Marek Polacek <polacek@redhat.com>
4673 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4674 and pedwarn_init. Use loc insted of input_location.
4676 2014-04-30 Marek Polacek <polacek@redhat.com>
4679 * c-typeck.c (build_binary_op): Use location when warning about
4682 2014-04-25 Marek Polacek <polacek@redhat.com>
4685 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4686 always_inline/noinline and hot/cold attributes.
4688 2014-04-25 Marek Polacek <polacek@redhat.com>
4691 * c-parser.c (c_parser_initelt): Pass input_location to
4692 process_init_element.
4693 (c_parser_initval): Pass loc to process_init_element.
4694 * c-tree.h (process_init_element): Adjust declaration.
4695 * c-typeck.c (push_init_level): Pass input_location to
4696 process_init_element.
4697 (pop_init_level): Likewise.
4698 (set_designator): Likewise.
4699 (output_init_element): Add location_t parameter. Pass loc to
4701 (output_pending_init_elements): Pass input_location to
4702 output_init_element.
4703 (process_init_element): Add location_t parameter. Pass loc to
4704 output_init_element.
4706 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4708 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4709 atomic-clause, allow comma in between atomic-clause and
4712 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4715 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4716 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4718 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4721 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4722 create_tmp_var instead build_decl for creating temps.
4723 (build_array_notation_expr): Likewise.
4724 (fix_conditional_array_notations_1): Likewise.
4725 (fix_array_notation_expr): Likewise.
4726 (fix_array_notation_call_expr): Likewise.
4728 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4731 * c-tree.h (c_build_function_call_vec): New prototype.
4732 * c-typeck.c (build_function_call_vec): Don't call
4733 resolve_overloaded_builtin here.
4734 (c_build_function_call_vec): New wrapper function around
4735 build_function_call_vec. Call resolve_overloaded_builtin here.
4736 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4737 Call c_build_function_call_vec instead of build_function_call_vec.
4738 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4739 * c-decl.c (finish_decl): Likewise.
4741 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4744 * c-typeck.c: Use correct format string in cast-qual warning
4746 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4748 * c-decl.c (c_decl_attributes): Use
4749 lang_hooks.types.omp_mappable_type.
4750 * c-typeck.c (c_finish_omp_clauses): Likewise.
4752 2014-03-06 Marek Polacek <polacek@redhat.com>
4755 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4756 of checking tree code.
4758 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4760 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4761 (c_parser_parameter_declaration): Likewise.
4763 2014-02-19 Marek Polacek <polacek@redhat.com>
4766 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4767 Call mark_exp_read on exp.value.
4768 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4769 TREE_ADDRESSABLE on old instead of val.
4770 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4772 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4774 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4775 C_EXPR_APPEND by vec_safe_push.
4776 * c-tree.h (C_EXPR_APPEND): Remove.
4778 2014-01-31 Marek Polacek <polacek@redhat.com>
4781 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4782 build_function_call_vec.
4783 (build_function_call): Likewise.
4784 (build_atomic_assign): Likewise.
4785 (build_function_call_vec): Add arg_loc parameter. Use it.
4786 (convert_arguments): Likewise.
4787 (convert_for_assignment): Rename rhs_loc to expr_loc.
4788 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4789 (c_parser_objc_keywordexpr): Likewise.
4790 (c_parser_postfix_expression_after_primary): Call
4791 build_function_call_vec with expr_loc rather than op_loc.
4792 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4793 build_function_call_vec.
4794 (c_parser_expr_list): Add locations parameter. Fill it with locations
4795 of function arguments.
4796 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4798 2014-01-30 Marek Polacek <polacek@redhat.com>
4801 * c-typeck.c (build_function_call_vec): Use loc parameter.
4802 (convert_arguments): Add location parameter. Use it.
4803 (ep_convert_and_check): Likewise.
4804 (build_atomic_assign): Adjust convert_for_assignment call.
4805 (build_modify_expr): Likewise.
4806 (digest_init): Likewise.
4807 (c_finish_return): Likewise.
4808 (build_conditional_expr): Adjust ep_convert_and_check calls.
4809 (convert_for_assignment): Add rhs_loc parameter. Use it.
4810 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4813 2014-01-30 Richard Biener <rguenther@suse.de>
4816 * c-typeck.c (build_function_call_vec): Do not replace calls
4817 to a function via an incompatible type with a runtime abort.
4819 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4821 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4822 flag_enable_cilkplus with flag_cilkplus.
4823 (c_parser_direct_declarator_inner): Likewise.
4824 (c_parser_attribute_any_word): Likewise.
4825 (c_parser_attributes): Likewise.
4826 (c_parser_compound_statement): Likewise.
4827 (c_parser_statement_after_labels): Likewise.
4828 (c_parser_if_statement): Likewise.
4829 (c_parser_switch_statement): Likewise.
4830 (c_parser_do_statement): Likewise.
4831 (c_parser_for_statement): Likewise.
4832 (c_parser_unary_expression): Likewise.
4833 (c_parser_postfix_expression): Likewise.
4834 (c_parser_postfix_expression_after_primary): Likewise.
4835 (c_parser_postfix_expression_after_primary): Likewise.
4836 (c_parser_omp_clause_name): Likewise.
4837 (c_finish_omp_declare_simd): Likewise.
4838 (c_parser_cilk_verify_simd): Likewise.
4839 * c-typeck.c (build_array_ref): Likewise.
4840 (build_function_call_vec): Likewise.
4841 (convert_arguments): Likewise.
4842 (build_compound_expr): Likewise.
4843 (c_finish_return): Likewise.
4844 (c_finish_if_stmt): Likewise.
4845 (c_finish_loop): Likewise.
4846 (build_binary_op): Likewise.
4848 2014-01-23 Marek Polacek <polacek@redhat.com>
4851 * c-typeck.c (parser_build_binary_op): Use location instead of
4853 (build_binary_op): Pass location to shorten_compare.
4855 2014-01-23 Marek Polacek <polacek@redhat.com>
4858 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4861 2014-01-23 Marek Polacek <polacek@redhat.com>
4864 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4865 of a comma expression.
4866 (emit_side_effect_warnings): Likewise.
4868 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4871 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4872 function to use walk_tree and moved a lot of its functionality to
4873 expand_array_notations.
4874 (expand_array_notations): New function.
4876 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4878 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4879 attribute an attribute without value.
4881 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4884 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4885 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4887 2014-01-22 Marek Polacek <polacek@redhat.com>
4890 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4891 of remove_c_maybe_const_expr on op1 and op2.
4893 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4896 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4897 effects, preevaluate rhs using SAVE_EXPR first.
4899 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4902 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4903 statements with if-elseif statements.
4905 2014-01-06 Marek Polacek <polacek@redhat.com>
4908 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4909 defined bit-field types only in ISO C.
4911 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4913 Update copyright years
4915 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4917 * c-array-notation.c: Use the standard form for the copyright notice.
4919 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4921 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4922 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4923 field in parser is not empty. If not-empty, call the function
4924 c_parser_finish_omp_declare_simd.
4925 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4926 between SIMD-enabled functions and #pragma simd. Added new parameter.
4927 (c_parser_cilk_all_clauses): Modified the usage of the function
4928 c_parser_cilk_clause_vectorlength as mentioned above.
4929 (c_parser_cilk_simd_fn_vector_attrs): New function.
4930 (c_finish_cilk_simd_fn_tokens): Likewise.
4931 (is_cilkplus_vector_p): Likewise.
4932 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4933 "nomask," and "mask" strings in clause name.
4934 (c_parser_omp_all_clauses): Added 3 new case statements:
4935 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4936 PRAGMA_CILK_CLAUSE_NOMASK.
4937 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4938 check for vector attribute and if so call the function
4939 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4940 called the function c_finish_cilk_simd_fn_tokens.
4941 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4942 parser field is non-empty. If so, parse them as you would parse
4943 the omp declare simd pragma.
4944 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4945 Added a check when step is a parameter and flag it as error.
4946 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4947 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4950 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4952 * c-parser.c (c_parser_omp_parallel): Fix description.
4954 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4956 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4957 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4958 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4959 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4961 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4964 * c-parser.c (c_parser_alignas_specifier): Use
4965 c_sizeof_or_alignof_type instead of c_alignof.
4966 (c_parser_alignof_expression): Likewise, with min_alignof
4967 parameter depending on alignof spelling used.
4969 2013-12-04 Marek Polacek <polacek@redhat.com>
4972 * c-decl.c (start_function): Don't warn for missing prototype for
4975 2013-12-03 Marek Polacek <polacek@redhat.com>
4978 * c-decl.c (build_compound_literal): Allow compound literals with
4979 empty initial value.
4981 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4984 * c-typeck.c (build_modify_expr): Diagnose assignment to
4985 expression with array type.
4987 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4990 * c-typeck.c (process_init_element): Do not treat a string as
4991 initializing a whole array when used with a designator for an
4994 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4997 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4998 an inline function following a static declaration.
5000 2013-11-28 Jakub Jelinek <jakub@redhat.com>
5003 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5004 to p_name before calling c_parser_omp_teams instead of after.
5005 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5006 argument. Remove unused p_name variable.
5008 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5009 Jakub Jelinek <jakub@redhat.com>
5011 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5012 external_scope is NULL.
5014 2013-11-27 Tom de Vries <tom@codesourcery.com>
5015 Marc Glisse <marc.glisse@inria.fr>
5018 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5020 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5022 * c-typeck.c: Add required include files from gimple.h.
5024 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5026 * c-decl.c (define_label, shadow_tag_warned)
5027 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5028 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5029 (declspecs_add_type): Remove use of in_system_header macro.
5030 * c-parser.c (c_parser_unary_expression): Likewise.
5031 * c-typeck.c (store_init_value, process_init_element)
5032 (c_start_case): Likewise.
5034 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5037 * c-parser.c (c_parser_set_source_position_from_token): Remove
5038 reference to in_system_header from comment.
5040 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5042 * c-decl.c (grokdeclarator): Update comment to refer to
5043 tree_to_[su]hwi rather than tree_low_cst.
5045 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5047 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5048 tree_to_uhwi throughout.
5050 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5052 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5055 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5057 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5060 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5062 * c-parser.c (c_parser_cilk_simd): New.
5063 (c_parser_cilk_verify_simd): New.
5064 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5065 (c_parser_omp_for_loop): Add case for NE_EXPR.
5066 Set c_break_label for CILK_SIMD.
5067 (c_parser_cilk_clause_vectorlength): New.
5068 (c_parser_cilk_clause_linear): New.
5069 (c_parser_cilk_clause_name): New.
5070 (c_parser_cilk_all_clauses): New.
5071 * c-typeck.c (build_unary_op): Pass location argument to
5073 (build_modify_expr): Same.
5074 (build_asm_expr): Same.
5075 (c_finish_bc_stmt): Error on break/continue in loops.
5077 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5079 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5081 2013-11-14 Diego Novillo <dnovillo@google.com>
5083 * c-decl.c: Include print-tree.h.
5084 Include stor-layout.h.
5087 Include stringpool.h.
5088 * c-lang.c: Include fold-const.h.
5089 * c-parser.c: Include stringpool.h.
5091 Include stor-layout.h.
5093 Include trans-mem.h.
5094 * c-typeck.c: Include stor-layout.h.
5095 Include trans-mem.h.
5099 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5101 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5102 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5104 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5105 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5107 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5108 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5109 (c_parser_declarator, c_parser_direct_declarator_inner)
5110 (c_parser_parameter_declaration, c_parser_type_name): All callers
5112 (c_parser_declaration_or_fndef): Handle declarations with type
5113 determined from the initializer.
5115 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5117 * c-typeck.c: Include gimplify.h.
5119 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5121 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5122 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5124 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5125 or _Thread_local as appropriate in diagnostics.
5126 (build_null_declspecs): Initialize ret->thread_gnu_p.
5127 (declspecs_add_scspec): Handle either __thread or _Thread_local
5128 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5129 pedantic. Do not disallow _Thread_local extern and _Thread_local
5132 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5133 Andrew MacLeod <amacleod@redhat.com>
5135 * c-aux-info.c (gen_type): Handle atomic qualifier.
5136 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5137 qualifiers when compating types.
5138 (shadow_tag_warned): Handle atomic_p in declspecs.
5139 (quals_from_declspecs): Likewise.
5140 (start_decl): Use c_type_promotes_to when promoting argument
5142 (grokdeclarator): Handle _Atomic.
5143 (get_parm_info): Diagnose any qualifier on "void" as only
5145 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5146 comparing types. Use c_type_promotes_to when promoting argument
5148 (finish_function): Use c_type_promotes_to when promoting argument
5150 (build_null_declspecs): Handle atomic_p in declspecs.
5151 (declspecs_add_qual): Handle RID_ATOMIC.
5152 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5153 (c_token_starts_declspecs): Handle RID_ATOMIC.
5154 (c_parser_declspecs): Handle atomic type specifiers and
5156 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5157 from types of expressions with atomic type.
5158 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5159 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5160 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5161 (c_parser_statement_after_labels, c_parser_switch_statement)
5162 (c_parser_for_statement, c_parser_expr_no_commas)
5163 (c_parser_conditional_expression, c_parser_binary_expression)
5164 (c_parser_cast_expression, c_parser_unary_expression)
5165 (c_parser_postfix_expression)
5166 (c_parser_postfix_expression_after_primary, c_parser_expression):
5167 Use convert_lvalue_to_rvalue.
5168 (c_parser_expression_conv, c_parser_expr_list): Document
5169 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5170 (c_parser_objc_synchronized_statement): Use
5171 convert_lvalue_to_rvalue.
5172 (c_parser_objc_selector): Handle RID_ATOMIC.
5173 (c_parser_objc_receiver, c_parser_array_notation): Use
5174 convert_lvalue_to_rvalue.
5175 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5176 _Atomic (type-name).
5177 (struct c_declspecs): Add atomic_p field.
5178 (convert_lvalue_to_rvalue): Declare.
5179 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5180 corresponding atomic types.
5181 (qualify_type): Don't add _Atomic qualifiers from second argument.
5182 (comp_target_types): Do not allow _Atomic mismatches.
5183 (type_lists_compatible_p): Do not remove atomic qualifiers when
5185 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5186 (build_atomic_assign): New functions.
5187 (build_unary_op): Use build_atomic_assign for atomic increment and
5189 (build_conditional_expr): Do not treat _Atomic void as a qualified
5191 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5192 (find_anonymous_field_with_type, convert_to_anonymous_field)
5193 (convert_for_assignment): Do not remove atomic qualifiers when
5195 (digest_init): Do not accept initialization of arrays of atomic
5196 elements by string constants.
5197 (build_asm_expr): Use convert_lvalue_to_rvalue.
5198 (build_binary_op): Do not treat _Atomic void as a qualified
5201 2013-11-06 DJ Delorie <dj@redhat.com>
5203 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5204 both explicit and builtin, print the location of the explicit one.
5206 2013-11-05 Tobias Burnus <burnus@net-b.de>
5208 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5209 c_parser_omp_distribute, c_parser_omp_teams,
5210 c_parser_omp_target, c_parser_omp_declare): Handle
5213 2013-11-03 Marek Polacek <polacek@redhat.com>
5215 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5217 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5219 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5220 check_dup_generic at the end, unless remove is true.
5221 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5223 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5225 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5227 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5228 with decl that is not pointer nor array.
5230 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5232 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5233 a spawning function is found.
5234 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5235 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5236 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5237 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5239 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5240 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5242 (c_finish_return): Added a check to reject _Cilk_spawn in return
5244 (build_cilk_spawn): New function.
5245 (build_cilk_sync): Likewise.
5246 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5248 2013-10-27 Tobias Burnus <burnus@net-b.de>
5251 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5252 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5253 (c_parser_statement_after_labels): Update calls.
5255 2013-10-24 Tobias Burnus <burnus@net-b.de>
5258 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5259 Handle PRAGMA_IVDEP.
5260 (c_parser_statement_after_labels): Update call.
5262 2013-10-24 Marek Polacek <polacek@redhat.com>
5264 * c-parser.c (c_parser_struct_declaration): Add a comment.
5265 (c_parser_declarator): Don't allow _Alignas here.
5267 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5269 * c-parser.c: Include omp-low.h.
5270 * c-typeck.c: Likewise.
5272 2013-10-17 Marek Polacek <polacek@redhat.com>
5275 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5276 Document syntax of the array-declarator.
5277 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5279 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5280 (c_parser_struct_declaration): Likewise.
5281 (c_parser_declarator): Likewise.
5282 (c_parser_direct_declarator_inner): Likewise.
5283 (c_parser_parameter_declaration): Likewise.
5284 (c_parser_type_name): Likewise.
5286 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5288 * c-lang.h (current_omp_declare_target_attribute): New extern
5290 * c-parser.c: Include c-lang.h.
5291 (struct c_parser): Change tokens to c_token *.
5292 Add tokens_buf field. Change tokens_avail type to unsigned int.
5293 (c_parser_consume_token): If parser->tokens isn't
5294 &parser->tokens_buf[0], increment parser->tokens.
5295 (c_parser_consume_pragma): Likewise.
5296 (enum pragma_context): Add pragma_struct and pragma_param.
5297 (c_parser_external_declaration): Adjust
5298 c_parser_declaration_or_fndef caller.
5299 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5300 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5301 Adjust recursive call.
5302 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5304 (c_parser_parameter_declaration): Use pragma_param instead of
5306 (c_parser_compound_statement_nostart, c_parser_label,
5307 c_parser_for_statement): Adjust
5308 c_parser_declaration_or_fndef callers.
5309 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5310 it through to c_parser_conditional_expression.
5311 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5312 pass it through to c_parser_binary_expression. Adjust recursive
5314 (c_parser_binary_expression): Remove prec argument, add
5315 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5316 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5317 binop matches it, use build2 instead of parser_build_binary_op.
5318 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5319 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5320 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5321 Handle pragma_struct and pragma_param the same as pragma_external.
5322 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5323 (c_parser_omp_variable_list): Parse array sections for
5324 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5325 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5326 (c_parser_omp_clause_reduction): Handle user defined reductions.
5327 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5328 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5329 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5330 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5331 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5332 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5333 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5334 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5335 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5336 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5337 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5338 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5339 (c_parser_omp_for_loop): Add CODE argument, pass it through
5340 to c_finish_omp_for. Change last argument to cclauses,
5341 and adjust uses to grab parallel clauses from the array of all
5342 the split clauses. Adjust c_parser_binary_expression,
5343 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5344 (omp_split_clauses): New function.
5345 (c_parser_omp_simd): New function.
5346 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5347 Allow the function to be called also when parsing combined constructs,
5348 and call c_parser_omp_simd when parsing for simd.
5349 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5350 #pragma omp section, require exactly one structured-block instead of
5351 sequence of statements.
5352 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5353 Allow the function to be called also when parsing combined constructs.
5354 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5355 Allow the function to be called also when parsing combined
5357 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5358 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5359 c_parser_omp_teams, c_parser_omp_target_data,
5360 c_parser_omp_target_update, c_parser_omp_target,
5361 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5362 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5363 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5364 (c_parser_omp_construct): Add p_name and mask vars. Handle
5365 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5366 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5367 and c_parser_omp_sections callers.
5368 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5369 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5370 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5371 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5372 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5374 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5375 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5376 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5377 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5378 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5379 * c-typeck.c: Include tree-inline.h.
5380 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5381 handle_omp_array_sections_1, handle_omp_array_sections,
5382 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5383 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5384 user defined reductions.
5385 (c_tree_equal): New function.
5386 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5387 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5388 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5389 c_check_omp_declare_reduction_r): New prototypes.
5390 * c-decl.c (current_omp_declare_target_attribute): New variable.
5391 (c_decl_attributes): New function.
5392 (start_decl, start_function): Use it instead of decl_attributes.
5393 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5394 c_omp_reduction_decl, c_omp_reduction_lookup,
5395 c_check_omp_declare_reduction_r): New functions.
5397 2013-09-25 Tom Tromey <tromey@redhat.com>
5399 * Make-lang.in (c/gccspec.o): Remove.
5400 (CFLAGS-c/gccspec.o): New variable.
5401 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5402 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5403 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5405 2013-09-25 Tom Tromey <tromey@redhat.com>
5407 * Make-lang.in (c/gccspec.o): Don't use subshell.
5409 2013-09-18 Marek Polacek <polacek@redhat.com>
5412 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5413 Remove unnecessary check.
5415 2013-09-18 Marek Polacek <polacek@redhat.com>
5418 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5419 no_sanitize_undefined attribute.
5421 2013-09-13 Kai Tietz <ktietz@redhat.com>
5424 * c-decl.c (c_builtin_function_ext_scope): Remove
5425 wrong assumption that it is never called on prexisting
5428 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5430 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5432 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5434 * c-objc-common.c (c_tree_printer): Tidy.
5436 2013-08-30 Marek Polacek <polacek@redhat.com>
5438 * c-typeck.c (build_binary_op): Add division by zero and shift
5441 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5442 Joseph Myers <joseph@codesourcery.com>
5445 * c-typeck.c (c_common_type): Prefer double_type_node over
5446 other REAL_TYPE types with the same precision.
5447 (convert_arguments): Likewise.
5449 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5451 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5452 (c_initialize_diagnostics): Call a destructor for the early printer.
5454 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5456 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5457 printer initialization.
5459 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5462 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5463 check for truth values.
5464 (expand_array_notation_exprs): Added truth values case. Removed an
5465 unwanted else. Added for-loop to walk through subtrees in default
5468 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5470 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5472 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5474 * c-parser.c (struct c_generic_association): Fix typo.
5476 2013-07-23 Tom Tromey <tromey@redhat.com>
5477 Joseph Myers <joseph@codesourcery.com>
5479 * c-parser.c (struct c_generic_association): New.
5480 (c_generic_association_d): New typedef.
5481 (c_parser_generic_selection): New function.
5482 (c_parser_postfix_expression): Handle RID_GENERIC.
5484 2013-07-13 Jason Merrill <jason@redhat.com>
5487 * c-decl.c (finish_struct): Check for too-large class.
5489 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5492 * c-typeck.c (set_init_index): When folding, check for index overflow.
5494 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5496 * c-parser.c (c_parser_array_notation): Removed rejection of array
5497 notations in an array of function pointers.
5499 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5501 * c-array-notation.c (make_triplet_val_inv): New function.
5502 (create_cmp_incr): Likewise.
5503 (create_array_refs): Likewise.
5504 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5505 Also modularized common parts between functions and called the function.
5506 (build_array_notation_expr): Likewise.
5507 (fix_conditional_array_notations_1): Likewise.
5508 (fix_array_notation_expr): Likewise.
5509 (fix_array_notation_call_expr): Likewise.
5511 2013-06-18 Marek Polacek <polacek@redhat.com>
5514 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5516 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5518 * c-array-notation.c (build_array_notation_expr): Reject array notation
5519 mismatch between LHS and RHS even inside a call_expr. Also, removed
5520 a couple while statements that were dead code.
5522 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5524 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5525 excessive precision expressions in function parameters. Also removed
5526 couple unwanted while statements.
5528 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5530 * c-array-notation.c (expand_array_notation_exprs): Added
5531 ARRAY_NOTATION_REF case.
5533 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5535 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5536 function to c-family/array-notation-common.c.
5537 (is_cilkplus_reduce_builtin): Likewise.
5538 (find_rank): Likewise.
5539 (extract_array_notation_exprs): Likewise.
5540 (replace_array_notations): Likewise.
5541 (find_inv_trees): Likewise.
5542 (replace_inv_trees): Likewise.
5543 (contains_array_notation_expr): Likewise.
5544 (find_correct_array_notation_type): Likewise.
5545 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5546 (struct inv_list): Moved this to c-family/array-notation-common.c.
5547 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5549 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5551 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5552 reduction functions outside the for-loop. Added a check if the fundecl
5553 is non-NULL. Finally, removed an unwanted if-statement, and made the
5556 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5558 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5559 condition of the if-statement matches the rank of else-block and then-
5560 block when array notations are used.
5561 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5562 expression after the entire function body is parsed.
5563 (c_parser_expr_no_commas): Delayed creating array notation expressions
5564 to the end of function parsing.
5565 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5566 whole if-statement instead of just the condition.
5567 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5569 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5572 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5573 array to NULL_TREE if they are unused. Also added a check for the
5574 field to be NULL before its fields are used in future.
5576 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5579 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5580 (build_array_notation_expr): Likewise.
5582 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5584 * c-typeck.c (build_array_ref): Added a check to see if array's
5585 index is greater than one. If true, then emit an error.
5586 (build_function_call_vec): Exclude error reporting and checking
5587 for builtin array-notation functions.
5588 (convert_arguments): Likewise.
5589 (c_finish_return): Added a check for array notations as a return
5590 expression. If true, then emit an error.
5591 (c_finish_loop): Added a check for array notations in a loop
5592 condition. If true then emit an error.
5593 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5594 (build_binary_op): Added a check for array notation expr inside
5595 op1 and op0. If present, we call another function to find correct
5597 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5598 * c-parser.c (c_parser_compound_statement): Check if array
5599 notation code is used in tree, if so, then transform them into
5601 (c_parser_expr_no_commas): Check if array notation is used in LHS
5602 or RHS, if so, then build array notation expression instead of
5604 (c_parser_postfix_expression_after_primary): Added a check for
5605 colon(s) after square braces, if so then handle it like an array
5606 notation. Also, break up array notations in unary op if found.
5607 (c_parser_direct_declarator_inner): Added a check for array
5609 (c_parser_compound_statement): Added a check for array notation in
5610 a stmt. If one is present, then expand array notation expr.
5611 (c_parser_if_statement): Likewise.
5612 (c_parser_switch_statement): Added a check for array notations in
5613 a switch statement's condition. If true, then output an error.
5614 (c_parser_while_statement): Similarly, but for a while.
5615 (c_parser_do_statement): Similarly, but for a do-while.
5616 (c_parser_for_statement): Similarly, but for a for-loop.
5617 (c_parser_unary_expression): Check if array notation is used in a
5618 pre-increment or pre-decrement expression. If true, then expand
5620 (c_parser_array_notation): New function.
5621 * c-array-notation.c: New file.
5622 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5624 2013-05-23 Mike Stump <mikestump@comcast.net>
5626 * c-typeck.c (convert_for_assignment): Handle references to memory
5629 2013-05-16 Jason Merrill <jason@redhat.com>
5631 * Make-lang.in (cc1$(exeext)): Use link mutex.
5633 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5635 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5636 to simply use OPT_Wpointer_arith.
5637 (build_unary_op): Likewise.
5639 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5642 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5643 argument. If set, or it temporarily for parsing of the first
5644 argument into force_folding_builtin_constant_p.
5645 (c_parser_postfix_expression): Adjust callers.
5647 2013-03-21 Richard Biener <rguenther@suse.de>
5649 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5650 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5652 2013-02-12 Marek Polacek <polacek@redhat.com>
5655 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5658 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5661 * c-typeck.c (set_nonincremental_init_from_string): If
5662 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5664 (process_init_element): Likewise.
5666 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5669 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5670 argument, don't call default_function_array_conversion
5671 nor c_fully_fold here.
5672 (c_parser_asm_statement): Adjust callers.
5673 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5674 and outputs here, and call default_function_array_conversion
5675 on inputs that don't need to be addressable.
5677 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5680 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5681 warning require that both c_common_unsigned_type as well as
5682 c_common_signed_type is the same for both mvl and mvr types.
5684 2012-11-16 Diego Novillo <dnovillo@google.com>
5686 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5688 * c-common.c: Use new vec API in vec.h.
5689 * c-common.h: Likewise.
5690 * c-gimplify.c: Likewise.
5691 * c-pragma.c: Likewise.
5692 * c-pretty-print.c: Likewise.
5693 * c-pretty-print.h: Likewise.
5694 * c-semantics.c: Likewise.
5695 * c-decl.c: Likewise.
5696 * c-parser.c: Likewise.
5697 * c-tree.h: Likewise.
5698 * c-typeck.c: Likewise.
5700 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5703 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5705 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5708 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5709 shadows a function, unless the variable is a function or a
5710 pointer-to-function.
5712 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5715 * c-parser.c (struct c_tree_loc_pair): Removed.
5716 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5717 add location_t * and tree * arguments, fill in array of 3
5718 sizeof_arg trees and corresponding locs.
5719 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5720 c_parser_expr_list callers.
5721 (c_parser_postfix_expression_after_primary): Likewise. Pass
5722 array of 3 sizeof_arg trees and locs (corresponding to first
5723 3 arguments) to sizeof_pointer_memaccess_warning.
5725 2012-10-09 Lawrence Crowl <crowl@google.com>
5727 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5728 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5731 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5734 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5737 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5740 * c-typeck.c: Include c-common.h.
5741 (enum stv_conv): Moved to c-common.h.
5742 (scalar_to_vector): Moved to c-common.c.
5743 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5744 * Make-lang.in: c-typeck.c depends on c-common.h.
5746 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5748 * c-decl.c (c_write_global_declarations): Fix handling of
5751 2012-09-30 Sharad Singhai <singhai@google.com>
5753 * c-decl.c (c_write_global_declarations): Use a different method
5754 to determine if the dump has ben initialized.
5756 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5759 * c-typeck.c (c_cast_expr): When casting to a type requiring
5760 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5763 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5766 * c-typeck.c (build_unary_op): Pass original argument of
5767 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5768 any C_MAYBE_CONST_EXPR, if it has integer operands.
5769 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5770 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5771 to c_objc_common_truthvalue_conversion, then remove any
5772 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5773 c_objc_common_truthvalue_conversion not
5774 c_common_truthvalue_conversion.
5775 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5776 call note_integer_operands for arguments with integer operands
5777 that are not integer constants.
5779 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5782 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5783 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5785 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5788 * c-convert.c (convert): Don't call fold_convert_loc if
5789 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5790 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5791 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5793 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5796 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5797 for nested and empty_ok arguments in the call to
5798 c_parser_declaration_or_fndef.
5800 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5802 * c-tree.h (c_last_sizeof_arg): Declare.
5803 * c-parser.c (struct c_tree_loc_pair): New type.
5804 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5806 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5807 (c_parser_postfix_expression_after_primary): Likewise. Call
5808 sizeof_pointer_memaccess_warning if needed.
5809 (sizeof_ptr_memacc_comptypes): New function.
5810 * c-typeck.c (c_last_sizeof_arg): New global variable.
5811 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5813 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5815 * c-lang.h (lang_decl): Add variable_size GTY option.
5817 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5819 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5820 * Make-lang.in: Fix dependencies.
5822 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5824 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5825 and add language Makefile hooks.
5826 * config-lang.in: New file.
5827 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5828 add the required "normal" config-lang.in rules.
5829 * c-lang.h: Moved from gcc/ to here.
5830 * c-tree.h: Likewise.
5831 * c-objc-common.c: Likewise.
5832 * c-objc-common.h: Likewise.
5833 * c-typeck.c: Likewise.
5834 * c-convert.c: Likewise.
5835 * c-lang.c: Likewise.
5836 * c-aux-info.c: Likewise.
5837 * c-errors.c: Likewise.
5838 * gccspec.c: Likewise.
5839 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5840 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5842 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5844 Copying and distribution of this file, with or without modification,
5845 are permitted in any medium without royalty provided the copyright
5846 notice and this notice are preserved.