1 2018-11-30 Richard Biener <rguenther@suse.de>
3 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4 _Literal (type) { ... } as empty aggregate or vector constructor.
6 2018-11-29 Martin Sebor <msebor@redhat.com>
9 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
10 (convert_arguments): Add comments. Pass additional argument to
13 2018-11-29 Martin Sebor <msebor@redhat.com>
17 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
19 2018-11-23 Martin Sebor <msebor@redhat.com>
22 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
23 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
25 2018-11-20 Martin Sebor <msebor@redhat.com>
27 * c-parser.c (c_parser_has_attribute_expression): New function.
28 (c_parser_attribute): New function.
29 (c_parser_attributes): Move code into c_parser_attribute.
30 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
32 2018-11-15 Martin Sebor <msebor@redhat.com>
35 * c-decl.c (header_for_builtin_fn): Declare.
36 (diagnose_mismatched_decls): Diagnose declarations of built-in
37 functions without a prototype.
38 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
39 (convert_argument): Same.
40 (convert_arguments): Factor code out into convert_argument.
41 Detect mismatches between built-in formal arguments in calls
42 to built-in without prototype.
43 (build_conditional_expr): Same.
44 (type_or_builtin_type): New function.
45 (convert_for_assignment): Add argument. Conditionally issue
46 warnings instead of errors for mismatches.
48 2018-11-13 David Malcolm <dmalcolm@redhat.com>
50 * c-decl.c: Replace "source_location" with "location_t".
52 * c-typeck.c: Likewise.
53 * gimple-parser.c: Likewise.
55 2018-11-09 Jakub Jelinek <jakub@redhat.com>
57 * c-parser.c (c_parser_omp_clause_final): Use
58 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
59 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
60 parsing instead of c_parser_paren_condition.
61 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
62 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
63 c_fully_fold instead of c_parser_condition.
64 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
65 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
66 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
67 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
68 c_parser_expr_no_commas instead of c_parser_expression.
70 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
71 reduction clause with inscan modifier.
73 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
74 clauses other than atomic_default_mem_order.
76 2018-11-08 Jakub Jelinek <jakub@redhat.com>
78 * c-parser.c: Include memmode.h.
79 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
80 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
81 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
82 task_reduction clauses.
83 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
84 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
85 section, or lvalue assignment expression.
86 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
87 (c_parser_omp_clause_lastprivate): Parse optional
88 conditional: modifier.
89 (c_parser_omp_clause_hint): Require constant integer expression rather
90 than just integer expression.
91 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
93 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
94 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
95 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
97 (c_parser_omp_clause_depend): Parse iterator modifier and handle
98 iterators. Parse mutexinoutset and depobj kinds.
99 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
101 (c_parser_omp_all_clauses): Likewise. Handle
102 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
103 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
104 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
105 default memory order from requires directive if any. Adjust
106 c_finish_omp_atomic caller.
107 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
108 (c_parser_omp_flush): Parse flush with memory-order-clause.
109 (c_parser_omp_for_loop): Allow NE_EXPR even in
110 OpenMP loops, adjust c_finish_omp_for caller.
111 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
112 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
113 Allow to be called while parsing combined parallel master.
114 Parse combined master taskloop{, simd}.
115 (c_parser_omp_parallel): Parse combined
116 parallel master{, taskloop{, simd}} constructs.
117 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
118 (OMP_TASKGROUP_CLAUSE_MASK): Define.
119 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
120 (OMP_TASKWAIT_CLAUSE_MASK): Define.
121 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
122 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
123 around teams body. Use SET_EXPR_LOCATION.
124 (c_parser_omp_target_data): Allow target data
125 with only use_device_ptr clauses.
126 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
127 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
128 (c_parser_omp_requires): New function.
129 (c_finish_taskloop_clauses): New function.
130 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
131 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
132 declaration. Disallow in_reduction clause when combined with parallel
134 (c_parser_omp_construct): Adjust c_parser_omp_master and
135 c_parser_omp_taskgroup callers.
136 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
138 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
139 like OMP_CLAUSE_REDUCTION.
140 (handle_omp_array_sections): Likewise. Call save_expr on array
141 reductions before calling build_index_type. Handle depend clauses
143 (struct c_find_omp_var_s): New type.
144 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
145 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
146 with static, runtime or auto schedule kinds. Call save_expr for whole
147 array reduction sizes. Diagnose reductions with zero sized elements
148 or variable length structures. Diagnose nogroup clause used with
149 reduction clause(s). Handle depend clause with
150 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
151 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
152 some different type for other kinds. Use build_unary_op with
153 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
154 Handle depend clauses with iterators. Remove no longer needed special
155 case that predetermined const qualified vars may be specified in
156 firstprivate clause. Complain if const qualified vars are mentioned
157 in data-sharing clauses other than firstprivate or shared. Use
158 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
159 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
160 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
161 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
163 2018-10-29 David Malcolm <dmalcolm@redhat.com>
165 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
166 logic for change to name_hint::operator bool.
167 (undeclared_variable): Likewise.
168 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
169 (c_parser_parameter_declaration): Likewise.
171 2018-10-17 Joseph Myers <joseph@codesourcery.com>
173 * c-errors.c (pedwarn_c11): New function.
174 * c-parser.c (disable_extension_diagnostics): Save
175 warn_c11_c2x_compat and set it to 0.
176 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
177 (c_parser_static_assert_declaration_no_semi): Handle
178 _Static_assert without string constant.
179 * c-tree.h (pedwarn_c11): New prototype.
181 2018-10-17 David Malcolm <dmalcolm@redhat.com>
183 * Make-lang.in (selftest-c): New.
184 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
185 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
186 from gcc/Makefile.in.
188 2018-10-02 Richard Biener <rguenther@suse.de>
190 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
192 2018-09-26 Joseph Myers <joseph@codesourcery.com>
195 * c-typeck.c (build_binary_op): Use excess precision for
196 comparisons of integers and floating-point for C11 and later.
198 2018-09-26 Martin Jambor <mjambor@suse.cz>
201 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
204 2018-09-17 David Malcolm <dmalcolm@redhat.com>
206 * c-objc-common.c (range_label_for_type_mismatch::get_text):
207 Update for new param.
208 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
211 2018-09-17 Martin Jambor <mjambor@suse.cz>
214 * c-parser.c: (warn_for_abs): New function.
215 (c_parser_postfix_expression_after_primary): Call it.
217 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
219 * c-typeck.c (digest_init): Shorten overlength strings.
221 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
223 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
225 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
227 * c-decl.c (finish_decl): Call braced_list_to_string here ...
228 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
230 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
232 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
233 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
235 2018-08-27 David Malcolm <dmalcolm@redhat.com>
238 * c-decl.c (implicitly_declare): Update call to
239 maybe_add_include_fixit to suggest overriding the location, as it
241 * c-objc-common.c (c_tree_printer): Update for conversion of
242 show_caret_p to a tri-state.
244 2018-08-27 Martin Liska <mliska@suse.cz>
246 * c-decl.c (locate_old_decl): Use new function
247 fndecl_built_in_p and remove check for FUNCTION_DECL if
249 (diagnose_mismatched_decls): Likewise.
250 (merge_decls): Likewise.
251 (warn_if_shadowing): Likewise.
252 (pushdecl): Likewise.
253 (implicitly_declare): Likewise.
254 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
255 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
256 * c-typeck.c (build_function_call_vec): Likewise.
257 (convert_arguments): Likewise.
259 2018-08-20 David Malcolm <dmalcolm@redhat.com>
262 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
263 (diagnose_mismatched_decls): Likewise, in various places.
264 (warn_if_shadowing): Likewise.
265 (implicit_decl_warning): Likewise.
266 (implicitly_declare): Likewise.
267 (undeclared_variable): Likewise.
268 (declare_label): Likewise.
269 (grokdeclarator): Likewise.
270 (start_function): Likewise.
271 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
272 (c_parser_parameter_declaration): Likewise.
273 (c_parser_binary_expression): Likewise.
274 * c-typeck.c (c_expr_sizeof_expr): Likewise.
275 (parser_build_binary_op): Likewise.
276 (build_unary_op): Likewise.
277 (error_init): Likewise.
278 (pedwarn_init): Likewise.
279 (warning_init): Likewise.
280 (convert_for_assignment): Likewise.
282 2018-08-15 David Malcolm <dmalcolm@redhat.com>
284 * c-objc-common.c: Include "gcc-rich-location.h".
285 (c_tree_printer): Move implemenation of '%T' to...
286 (print_type): ...this new function.
287 (range_label_for_type_mismatch::get_text): New function.
288 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
289 range for the various ic_argpass cases.
290 (class maybe_range_label_for_tree_type_mismatch): New class.
291 (build_binary_op): Use it when calling binary_op_error.
293 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
295 * c-decl.c (start_decl): Do not warn if variables is named as main
296 and is a local variable.
298 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
301 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
302 objects of unknown size.
304 2018-08-13 Martin Sebor <msebor@redhat.com>
306 PR tree-optimization/71625
307 * c-parser.c (c_parser_declaration_or_fndef): Call
308 braced_list_to_string.
310 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
313 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
316 2018-08-01 Martin Sebor <msebor@redhat.com>
318 PR tree-optimization/86650
319 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
320 and TREE_BLOCK (t) from within percent_K_format to this callsite.
322 2018-08-01 Jakub Jelinek <jakub@redhat.com>
325 * c-typeck.c (init_field_decl_cmp): New function.
326 (output_pending_init_elements): Use it for field comparisons
327 instead of pure bit_position comparisons.
329 2018-07-12 Jakub Jelinek <jakub@redhat.com>
331 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
332 type here, instead add "omp declare target implicit" attribute.
333 (finish_decl): Diagnose vars without mappable type here.
335 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
336 Thomas Schwinge <thomas@codesourcery.com>
337 Cesar Philippidis <cesar@codesourcery.com>
339 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
340 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
341 to their non-present_or_* counterparts. Make 'self' an alias to
342 PRAGMA_OACC_CLAUSE_HOST.
343 (c_parser_oacc_data_clause): Update GOMP mappings for
344 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
345 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
346 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
347 Remove support for present_or_* clauses.
348 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
349 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
350 (OACC_DECLARE_CLAUSE_MASK): Likewise.
351 (OACC_DATA_CLAUSE_MASK): Likewise.
352 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
353 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
354 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
355 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
356 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
358 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
360 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
361 * gimple-parser.c (c_parser_gimple_statement): Likewise.
362 (c_parser_gimple_unary_expression): Likewise.
364 2018-06-15 Jakub Jelinek <jakub@redhat.com>
367 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
368 before doing POINTER_DIFF_EXPR.
370 2018-06-07 Marek Polacek <polacek@redhat.com>
373 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
374 for loop initial declarations.
376 2018-05-30 David Pagan <dave.pagan@oracle.com>
379 * c-decl.c (grokdeclarator): Update check for return type warnings.
380 (start_function): Likewise.
381 (finish_function): Likewise.
382 * c-typeck.c (c_finish_return): Update check for return type warnings.
383 Pass OPT_Wreturn_type to pedwarn when appropriate.
385 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
387 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
390 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
392 * gimple-parser.c: Include internal-fn.h.
393 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
394 (c_parser_gimple_call_internal): New function.
395 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
396 Fix typos in comment.
398 2018-05-10 Jakub Jelinek <jakub@redhat.com>
401 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
402 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
404 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
405 fold_offsetof_1, pass argtype as TYPE to it and drop the
408 2018-05-02 David Pagan <dave.pagan@oracle.com>
411 * c-decl.c (old_style_parameter_scope): New function.
412 * c-parser.c (c_parser_postfix_expression): Check for statement
413 expressions in old-style function parameter list declarations.
414 * c-parser.h (old_style_parameter_scope): New extern declaration.
416 2018-04-25 Jakub Jelinek <jakub@redhat.com>
419 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
420 it is not TREE_STATIC.
421 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
422 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
423 its COMPOUND_LITERAL_EXPR_DECL.
425 2018-03-21 Joseph Myers <joseph@codesourcery.com>
427 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
428 where all functions return the same _FloatN or _FloatNx type,
429 treat integer types as _Float64 instead of double.
431 2018-03-21 Jakub Jelinek <jakub@redhat.com>
434 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
435 building vector comparison, diagnose it and return error_mark_node.
437 2018-03-15 Jakub Jelinek <jakub@redhat.com>
440 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
441 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
442 INTEGER_TYPE element type.
444 2018-03-13 David Pagan <dave.pagan@oracle.com>
447 * c-typeck.c (output_init_element): Ensure field initializer
448 expression is always evaluated if there are side effects.
450 2018-03-06 Jakub Jelinek <jakub@redhat.com>
453 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
454 !building_stmt_list_p ().
456 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
459 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
460 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
461 and include the BIND_EXPR in the list of things that need to be
464 2018-02-09 Nathan Sidwell <nathan@acm.org>
467 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
468 to strict_aliasing_warning.
470 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
472 * c-typeck.c (really_start_incremental_init, push_init_level,
473 set_nonincremental_init, output_init_element, process_init_element):
474 Use DECL_UNNAMED_BIT_FIELD.
476 2018-01-31 Marek Polacek <polacek@redhat.com>
479 * c-parser.c (c_parser_compound_statement_nostart): Call
480 expansion_point_location_if_in_system_header.
482 2018-01-17 David Malcolm <dmalcolm@redhat.com>
485 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
488 2018-01-13 Jakub Jelinek <jakub@redhat.com>
491 * c-tree.h (decl_constant_value_1): Add a bool argument.
492 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
493 returning a CONSTRUCTOR if it is true. Use error_operand_p.
494 (decl_constant_value): Adjust caller.
495 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
496 decl_constant_value_1 as IN_INIT. Otherwise, punt if
497 decl_constant_value returns initializer that has BLKmode or
499 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
502 Alan Hayward <alan.hayward@arm.com>
503 David Sherwood <david.sherwood@arm.com>
505 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
506 TYPE_VECTOR_SUBPARTS.
508 2018-01-03 Jakub Jelinek <jakub@redhat.com>
510 Update copyright years.
512 2018-01-01 Jakub Jelinek <jakub@redhat.com>
515 * c-parser.c (c_parser_braced_init, c_parser_initelt,
516 c_parser_conditional_expression, c_parser_cast_expression,
517 c_parser_sizeof_expression, c_parser_alignof_expression,
518 c_parser_postfix_expression, c_parser_omp_declare_reduction,
519 c_parser_transaction_expression): Use set_error () method instead
520 of setting value member to error_mark_node.
522 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
524 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
525 and _Float<N>X built-in functions.
527 2017-12-22 Jakub Jelinek <jakub@redhat.com>
530 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
531 TYPE_STUB_DECL and call rest_of_type_compilation before processing
532 incomplete vars rather than after it.
535 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
536 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
537 and consider empty ones if there are no other stmts. For
538 -Wunused-value walk all statements before the one only followed by
541 2017-12-22 Mike Stump <mikestump@comcast.net>
542 Eric Botcazou <ebotcazou@adacore.com>
544 * c-parser.c (c_parser_while_statement): Add unroll parameter and
545 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
546 (c_parser_do_statement): Likewise.
547 (c_parser_for_statement): Likewise.
548 (c_parser_statement_after_labels): Adjust calls to above.
549 (c_parse_pragma_ivdep): New static function.
550 (c_parser_pragma_unroll): Likewise.
551 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
552 <PRAGMA_UNROLL>: New case.
554 2017-12-19 Jakub Jelinek <jakub@redhat.com>
556 * c-typeck.c (comptypes_internal, function_types_compatible_p,
557 perform_integral_promotions, digest_init): Replace Yoda conditions
558 with typical order conditions.
559 * c-decl.c (check_bitfield_type_and_width): Likewise.
561 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
563 * c-typeck.c (c_safe_arg_type_equiv_p,
564 c_safe_function_type_cast_p): New function.
565 (build_c_cast): Implement -Wcast-function-type.
567 2017-12-14 Richard Biener <rguenther@suse.de>
570 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
571 like REALPART_EXPR for the behavior of whether its operand
574 2017-12-12 Marek Polacek <polacek@redhat.com>
577 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
579 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
581 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
582 * c-parser.c (add_debug_begin_stmt): New.
583 (c_parser_declaration_or_fndef): Call it.
584 (c_parser_compound_statement_nostart): Likewise.
585 (c_parser_statement_after_labels): Likewise.
586 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
588 2017-12-07 Joseph Myers <joseph@codesourcery.com>
590 * c-decl.c (build_compound_literal): Add parameter alignas_align
591 and set alignment of decl if nonzero.
592 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
593 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
595 (c_parser_struct_declaration): Update syntax comment.
596 (c_parser_type_name): Add alignas_ok argument and pass it to
598 (c_parser_cast_expression): Pass true to c_parser_type_name and
599 give error if a cast used an _Alignas specifier.
600 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
601 give error if sizeof (type-name) used an _Alignas specifier.
602 (c_parser_alignof_expression): Pass true to c_parser_type_name and
603 give error if _Alignof (type-name) used an _Alignas specifier.
604 (c_parser_postfix_expression_after_paren_type): Check specified
605 alignment for a compound literal and pass it to
606 build_compound_literal.
607 * c-parser.h (c_parser_type_name): Update prototype.
608 * c-tree.h (build_compound_literal): Update prototype.
610 2017-12-07 Martin Sebor <msebor@redhat.com>
613 * c-decl.c (c_decl_attributes): Look up existing declaration and
614 pass it to decl_attributes.
616 2017-12-06 David Malcolm <dmalcolm@redhat.com>
619 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
620 reserved for use by the implementation.
622 2017-12-06 David Malcolm <dmalcolm@redhat.com>
624 * c-decl.c: Include "c-family/c-spellcheck.h".
626 2017-12-05 Martin Liska <mliska@suse.cz>
627 Jakub Jelinek <jakub@redhat.com>
629 * c-typeck.c (pointer_diff): Add new argument and instrument
631 (build_binary_op): Similar for pointer comparison.
633 2017-12-01 Jakub Jelinek <jakub@redhat.com>
636 * c-parser.c: Include tree-iterator.h.
637 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
638 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
642 * c-tree.h (decl_constant_value_1): Declare.
643 * c-typeck.c (decl_constant_value_1): New function.
644 (decl_constant_value): Use it.
645 * c-fold.c (c_fully_fold_internal): If in_init, use
646 decl_constant_value_1 instead of decl_constant_value.
648 2017-11-30 Jakub Jelinek <jakub@redhat.com>
650 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
652 2017-11-28 Jakub Jelinek <jakub@redhat.com>
655 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
656 c_switch_covers_all_cases_p returns true.
658 2017-11-28 Julia Koval <julia.koval@intel.com>
659 Sebastian Peryt <sebastian.peryt@intel.com>
661 * Make-lang.in (c/c-array-notation.o): Remove.
662 * c-array-notation.c: Delete.
663 * c-decl.c: Remove cilkplus condition.
664 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
665 c_parser_cilk_verify_simd, c_parser_array_notation,
666 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
667 c_parser_cilk_simd_fn_vector_attrs,
668 c_finish_cilk_simd_fn_tokens): Delete.
669 (c_parser_declaration_or_fndef): Remove cilkplus condition.
670 (c_parser_direct_declarator_inner): Ditto.
671 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
672 (c_parser_attributes, c_parser_compound_statement,
673 c_parser_statement_after_labels, c_parser_if_statement,
674 c_parser_switch_statement, c_parser_while_statement,
675 c_parser_do_statement, c_parser_for_statement,
676 c_parser_unary_expression, c_parser_postfix_expression,
677 c_parser_postfix_expression_after_primary,
678 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
679 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
681 * c-typeck.c (build_array_ref, build_function_call_vec,
683 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
684 c_finish_loop, build_binary_op): Remove cilkplus support.
686 2017-11-28 Jakub Jelinek <jakub@redhat.com>
688 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
691 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
693 * Make-lang.in (c.install-plugin): Install backend import library.
695 2017-11-23 Jakub Jelinek <jakub@redhat.com>
697 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
700 2017-11-23 Mike Stump <mikestump@comcast.net>
701 Eric Botcazou <ebotcazou@adacore.com>
703 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
705 (c_parser_do_statement): Likewise.
706 (c_parser_for_statement): Likewise.
708 2017-11-22 David Malcolm <dmalcolm@redhat.com>
711 * c-objc-common.c (c_tree_printer): Convert penultimate param from
712 bool to bool *. Within '%T' handling, if showing an "aka", use
713 "quoted" param to add appropriate quoting.
715 2017-11-22 Marek Polacek <polacek@redhat.com>
720 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
722 2017-11-21 David Malcolm <dmalcolm@redhat.com>
725 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
726 earlier failed lookups.
728 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
730 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
731 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
733 2017-11-20 David Malcolm <dmalcolm@redhat.com>
736 * c-decl.c: Include "c-family/known-headers.h".
737 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
739 (class suggest_missing_header): Move to known-header.h.
740 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
741 than get_c_name_hint.
743 2017-11-20 David Malcolm <dmalcolm@redhat.com>
745 * c-decl.c (get_c_name_hint): New function.
746 (class suggest_missing_header): New class.
747 (lookup_name_fuzzy): Call get_c_name_hint and use it to
748 suggest missing headers to the user.
750 2017-11-20 David Malcolm <dmalcolm@redhat.com>
752 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
753 Include "c-family/name-hint.h"
754 (implicit_decl_warning): Convert "hint" from
755 const char * to name_hint. Pass location to
756 lookup_name_fuzzy. Suppress any deferred diagnostic if the
757 warning was not printed.
758 (undeclared_variable): Likewise for "guessed_id".
759 (lookup_name_fuzzy): Convert return type from const char *
760 to name_hint. Add location_t param.
761 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
762 Include "c-family/name-hint.h"
763 (c_parser_declaration_or_fndef): Convert "hint" from
764 const char * to name_hint. Pass location to lookup_name_fuzzy.
765 (c_parser_parameter_declaration): Likewise.
767 2017-11-19 Jakub Jelinek <jakub@redhat.com>
771 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
773 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
774 handle_omp_array_sections): Likewise.
775 (digest_init): Don't call decl_constant_value_for_optimization.
776 * c-tree.h (decl_constant_value_for_optimization): Removed.
777 * c-fold.c (c_fold_array_ref): New function.
778 (c_fully_fold_internal): Add LVAL argument, propagate it through
779 recursive calls. For VAR_P call decl_constant_value and
780 unshare if not LVAL and either optimizing or IN_INIT. Remove
781 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
782 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
783 (c_fully_fold): Add LVAL argument, pass it through to
784 c_fully_fold_internal.
785 (decl_constant_value_for_optimization): Removed.
787 2017-11-15 Joseph Myers <joseph@codesourcery.com>
790 * c-parser.c (check_tgmath_function): New function.
791 (enum tgmath_parm_kind): New enum.
792 (c_parser_postfix_expression): Handle __builtin_tgmath.
794 2017-10-31 David Malcolm <dmalcolm@redhat.com>
796 * c-decl.c (implicit_decl_warning): Update for renaming of
797 pedwarn_at_rich_loc and warning_at_rich_loc.
798 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
799 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
800 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
801 (c_parser_struct_or_union_specifier): Likewise for renaming of
803 (c_parser_parameter_declaration): Likewise for renaming of
805 * c-typeck.c (build_component_ref): Likewise.
806 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
807 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
808 (set_init_label): Likewise for renaming of error_at_rich_loc.
810 2017-10-30 Richard Biener <rguenther@suse.de>
812 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
815 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
817 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
818 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
820 2017-10-25 David Malcolm <dmalcolm@redhat.com>
823 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
826 2017-10-25 Jakub Jelinek <jakub@redhat.com>
829 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
830 newdecl to corresponding __builtin_ if any.
832 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
835 * c-decl.c (diagnose_mismatched_decls): Use
836 OPT_Wbuiltin_declaration_mismatch.
838 2017-10-12 David Malcolm <dmalcolm@redhat.com>
840 * c-parser.c (c_parser_require): Add "type_is_unique" param and
841 use it to guard calls to maybe_suggest_missing_token_insertion.
842 (c_parser_parms_list_declarator): Override default value of new
843 "type_is_unique" param to c_parser_require.
844 (c_parser_asm_statement): Likewise.
845 * c-parser.h (c_parser_require): Add "type_is_unique" param,
848 2017-10-11 Nathan Sidwell <nathan@acm.org>
850 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
852 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
854 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
855 operating on trees as wide_ints.
856 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
857 (c_tree_equal): Likewise.
859 2017-10-04 David Malcolm <dmalcolm@redhat.com>
861 * c-decl.c (push_parm_decl): Store c_parm's location into the
863 (build_c_parm): Add "loc" param and store it within the c_parm.
864 * c-parser.c (struct c_parser): Add "last_token_location" field.
865 (c_parser_consume_token): Store location of the token into the
867 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
868 when handling a FUNCTION_DECL, if it doesn't already have them.
869 (c_parser_parameter_declaration): Generate a location for the
870 parameter, and pass it to the call to build_c_parm.
871 * c-tree.h (struct c_parm): Add field "loc".
872 (build_c_parm): Add location_t param.
873 * c-typeck.c (get_fndecl_argument_location): New function.
874 (inform_for_arg): New function.
875 (convert_for_assignment): Use inform_for_arg when dealing with
878 2017-09-29 Jakub Jelinek <jakub@redhat.com>
880 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
882 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
883 don't SET_DECL_C_BIT_FIELD here.
886 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
887 instead of trying to set just TREE_READONLY manually.
889 2017-09-16 Tom de Vries <tom@codesourcery.com>
892 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
895 2017-09-15 Joseph Myers <joseph@codesourcery.com>
898 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
900 (build_conditional_expr): For C11, generate result with excess
901 precision when one argument is an integer and the other is of a
902 type using excess precision.
904 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
906 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
908 2017-09-13 Marek Polacek <polacek@redhat.com>
911 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
912 than expr.original_type.
914 2017-09-12 Nathan Sidwell <nathan@acm.org>
916 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
917 resort_sorted_fields): Moved from c-family/c-common.c.
918 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
920 2017-09-01 Joseph Myers <joseph@codesourcery.com>
923 * c-typeck.c (build_atomic_assign): Handle argument with excess
924 precision. Ensure any EXCESS_PRECISION_EXPR is present in
925 argument passed to build_binary_op and convert_for_assignment but
926 not for call to c_fully_fold.
927 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
928 Ensure build_binary_op is called with argument with original
929 semantic type. Avoid calling c_fully_fold with an
930 EXCESS_PRECISION_EXPR from build_binary_op.
932 2017-09-01 Jakub Jelinek <jakub@redhat.com>
935 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
937 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
938 Alan Hayward <alan.hayward@arm.com>
939 David Sherwood <david.sherwood@arm.com>
941 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
942 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
943 m1 and m2 to the signed equivalent of a fixed-point
946 2017-08-24 David Malcolm <dmalcolm@redhat.com>
948 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
949 than CAN_HAVE_LOCATION_P when determining whether to use the
950 location_t value within "value".
952 2017-08-21 David Malcolm <dmalcolm@redhat.com>
954 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
955 rather than peeking the location of the first token.
956 * c-tree.h (c_expr::get_location): New method.
958 2017-08-21 David Malcolm <dmalcolm@redhat.com>
960 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
961 to check_function_arguments.
963 2017-08-18 Marek Polacek <polacek@redhat.com>
965 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
968 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
971 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
972 (check_bitfield_type_and_width): Don't allow bit-field with
973 warn_if_not_aligned type.
975 2017-08-14 Martin Sebor <msebor@redhat.com>
978 * c-objc-common.c (c_objc_common_init): Handle 'G'.
980 2017-08-11 Marek Polacek <polacek@redhat.com>
983 * c-decl.c (pushtag): Only print inform if the warning was printed.
984 (grokdeclarator): Likewise.
986 2017-08-10 David Malcolm <dmalcolm@redhat.com>
988 * c-parser.c (c_parser_error): Rename to...
989 (c_parser_error_richloc): ...this, making static, and adding
990 "richloc" parameter, passing it to the c_parse_error call,
991 rather than calling c_parser_set_source_position_from_token.
992 (c_parser_error): Reintroduce, reimplementing in terms of the
993 above, converting return type from void to bool.
994 (class token_pair): New class.
995 (struct matching_paren_traits): New struct.
996 (matching_parens): New typedef.
997 (struct matching_brace_traits): New struct.
998 (matching_braces): New typedef.
999 (get_matching_symbol): New function.
1000 (c_parser_require): Add param MATCHING_LOCATION, using it to
1001 highlight matching "opening" tokens for missing "closing" tokens.
1002 (c_parser_skip_until_found): Likewise.
1003 (c_parser_static_assert_declaration_no_semi): Convert explicit
1004 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1005 class matching_parens, so that the pertinent open parenthesis is
1006 highlighted when there are problems locating the close
1008 (c_parser_struct_or_union_specifier): Likewise.
1009 (c_parser_typeof_specifier): Likewise.
1010 (c_parser_alignas_specifier): Likewise.
1011 (c_parser_simple_asm_expr): Likewise.
1012 (c_parser_braced_init): Likewise, for matching_braces.
1013 (c_parser_paren_condition): Likewise, for matching_parens.
1014 (c_parser_switch_statement): Likewise.
1015 (c_parser_for_statement): Likewise.
1016 (c_parser_asm_statement): Likewise.
1017 (c_parser_asm_operands): Likewise.
1018 (c_parser_cast_expression): Likewise.
1019 (c_parser_sizeof_expression): Likewise.
1020 (c_parser_alignof_expression): Likewise.
1021 (c_parser_generic_selection): Likewise.
1022 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1023 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1024 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1025 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1026 c_parser_skip_until_found call.
1027 (c_parser_objc_class_definition): Use class matching_parens as
1029 (c_parser_objc_method_decl): Likewise.
1030 (c_parser_objc_try_catch_finally_statement): Likewise.
1031 (c_parser_objc_synchronized_statement): Likewise.
1032 (c_parser_objc_at_property_declaration): Likewise.
1033 (c_parser_oacc_wait_list): Likewise.
1034 (c_parser_omp_var_list_parens): Likewise.
1035 (c_parser_omp_clause_collapse): Likewise.
1036 (c_parser_omp_clause_default): Likewise.
1037 (c_parser_omp_clause_if): Likewise.
1038 (c_parser_omp_clause_num_threads): Likewise.
1039 (c_parser_omp_clause_num_tasks): Likewise.
1040 (c_parser_omp_clause_grainsize): Likewise.
1041 (c_parser_omp_clause_priority): Likewise.
1042 (c_parser_omp_clause_hint): Likewise.
1043 (c_parser_omp_clause_defaultmap): Likewise.
1044 (c_parser_oacc_single_int_clause): Likewise.
1045 (c_parser_omp_clause_ordered): Likewise.
1046 (c_parser_omp_clause_reduction): Likewise.
1047 (c_parser_omp_clause_schedule): Likewise.
1048 (c_parser_omp_clause_num_teams): Likewise.
1049 (c_parser_omp_clause_thread_limit): Likewise.
1050 (c_parser_omp_clause_aligned): Likewise.
1051 (c_parser_omp_clause_linear): Likewise.
1052 (c_parser_omp_clause_safelen): Likewise.
1053 (c_parser_omp_clause_simdlen): Likewise.
1054 (c_parser_omp_clause_depend): Likewise.
1055 (c_parser_omp_clause_map): Likewise.
1056 (c_parser_omp_clause_device): Likewise.
1057 (c_parser_omp_clause_dist_schedule): Likewise.
1058 (c_parser_omp_clause_proc_bind): Likewise.
1059 (c_parser_omp_clause_uniform): Likewise.
1060 (c_parser_omp_for_loop): Likewise.
1061 (c_parser_cilk_clause_vectorlength): Likewise.
1062 (c_parser_cilk_clause_linear): Likewise.
1063 (c_parser_transaction_expression): Likewise.
1064 * c-parser.h (c_parser_require): Add param matching_location with
1065 default UNKNOWN_LOCATION.
1066 (c_parser_error): Convert return type from void to bool.
1067 (c_parser_skip_until_found): Add param matching_location with
1068 default UNKNOWN_LOCATION.
1070 2017-08-09 Marek Polacek <polacek@redhat.com>
1072 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1073 * c-tree.h (build_external_ref): Update declaration.
1074 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1075 (build_external_ref): Change the type of a parameter to bool.
1076 (parser_build_binary_op): Use true/false instead of 1/0.
1077 (pointer_diff): Likewise.
1078 (build_modify_expr): Likewise.
1079 (set_designator): Change the type of a parameter to bool.
1080 (set_init_index): Use true/false instead of 1/0.
1081 (set_init_label): Likewise.
1082 (output_init_element): Change the type of a parameter to bool.
1083 (output_pending_init_elements): Use true/false instead of 1/0.
1084 (process_init_element): Likewise.
1085 (build_binary_op): Change the type of a parameter to bool.
1087 2017-08-09 Marek Polacek <polacek@redhat.com>
1090 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1091 Call emit_diagnostic_valist instead of pedwarn.
1092 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1093 Print the relevant types in diagnostics.
1095 2017-08-09 Marek Polacek <polacek@redhat.com>
1098 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1099 build_conditional_expr.
1100 * c-parser.c (c_parser_conditional_expression): Create locations for
1101 EXP1 and EXP2 from their source ranges. Pass the locations down to
1102 build_conditional_expr.
1103 * c-tree.h (build_conditional_expr): Update declaration.
1104 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1105 For -Wsign-compare, also print the types.
1107 2017-08-08 Martin Liska <mliska@suse.cz>
1109 * c-convert.c: Include header files.
1110 * c-typeck.c: Likewise.
1112 2017-08-07 Martin Liska <mliska@suse.cz>
1114 * c-parser.c (c_parser_attributes): Canonicalize name of an
1117 2017-08-02 Marek Polacek <polacek@redhat.com>
1120 * c-parser.c (c_parser_unary_expression): Use set_error.
1124 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1125 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1127 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1128 Martin Liska <mliska@suse.cz>
1130 * c-typeck.c (c_finish_goto_label): Build gimple predict
1133 2017-07-31 Martin Liska <mliska@suse.cz>
1136 * c-convert.c (convert): Guard condition with flag_sanitize_p
1137 also with current_function_decl non-null equality.
1138 * c-decl.c (grokdeclarator): Likewise.
1139 * c-typeck.c (build_binary_op): Likewise.
1141 2017-07-25 Marek Polacek <polacek@redhat.com>
1143 * c-decl.c (grokfield): Remove local variable.
1145 2017-07-25 Marek Polacek <polacek@redhat.com>
1148 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1149 macro expansion if the body is in { }.
1150 (c_parser_while_statement): Likewise.
1151 (c_parser_for_statement): Likewise.
1153 2017-07-18 Nathan Sidwell <nathan@acm.org>
1155 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1157 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1159 * c-decl.c (implicitly_declare): When suggesting a missing
1160 #include, provide a fix-it hint.
1162 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1164 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1165 and call that instead.
1166 * c-tree.h (selftest::run_c_tests): New decl.
1168 2017-06-26 Marek Polacek <polacek@redhat.com>
1171 * c-parser.c (c_parser_if_body): Set the location of the
1172 body of the conditional after parsing all the labels. Call
1173 warn_for_multistatement_macros.
1174 (c_parser_else_body): Likewise.
1175 (c_parser_switch_statement): Likewise.
1176 (c_parser_while_statement): Likewise.
1177 (c_parser_for_statement): Likewise.
1178 (c_parser_statement): Add a default argument. Save the location
1179 after labels have been parsed.
1180 (c_parser_c99_block_statement): Likewise.
1182 2017-06-19 Richard Biener <rguenther@suse.de>
1184 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1185 negated _Literals to parse _Literal (int) -1.
1187 2017-06-13 Martin Liska <mliska@suse.cz>
1190 * c-convert.c (convert): Use sanitize_flags_p.
1191 * c-decl.c (grokdeclarator): Likewise.
1192 * c-typeck.c (convert_for_assignment): Likewise.
1193 (c_finish_return): Likewise.
1194 (build_binary_op): Likewise.
1196 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1199 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1200 to sizetype before size_binop.
1202 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1204 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1207 2017-06-06 Marek Polacek <polacek@redhat.com>
1210 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1212 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1214 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1216 * c-parser.c (c_parser_binary_expression): Implement the
1217 -Wsizeof_pointer_div warning.
1218 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1219 from a parenthesized expression.
1220 (c_parser_expr_list): Use c_last_sizeof_loc.
1221 * c-tree.h (c_last_sizeof_loc): New external.
1222 * c-typeck.c (c_last_sizeof_loc): New variable.
1223 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1225 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1228 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1230 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1232 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1235 2017-05-24 Martin Sebor <msebor@redhat.com>
1238 * c-fold.c (c_fully_fold_internal): Adjust.
1239 * c-typeck.c (parser_build_unary_op): Adjust.
1241 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1243 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1244 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1247 2017-05-23 Marek Polacek <polacek@redhat.com>
1249 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1252 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1254 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1255 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1256 it returned invariant. Call tree_invariant_p unconditionally
1257 afterwards to decide whether to return expr or op0.
1259 2017-05-22 Nathan Sidwell <nathan@acm.org>
1261 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1263 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1265 * c-parser.c (c_parser_omp_clause_default): Handle
1266 "OMP_CLAUSE_DEFAULT_PRESENT".
1268 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1270 * config-lang.in (gtfiles): Add c-family/c-format.c.
1272 2017-05-18 Nathan Sidwell <nathan@acm.org>
1274 * c-decl.c (pushdecl_top_level): Delete unused function.
1276 2017-05-18 Marek Polacek <polacek@redhat.com>
1278 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1279 (check_earlier_gotos): Likewise.
1280 (define_label): Likewise.
1281 (pending_xref_error): Likewise.
1282 (smallest_type_quals_location): Likewise.
1283 (grokdeclarator): Likewise.
1284 (grokparms): Likewise.
1285 (identifier_global_value): Likewise.
1286 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1287 (find_init_member): Likewise.
1289 2017-05-18 Marek Polacek <polacek@redhat.com>
1291 * c-decl.c (start_decl): Use false/true instead of 0/1.
1292 (grokdeclarator): Likewise.
1293 (finish_struct): Likewise.
1294 (start_function): Change the return type to bool. Use false/true
1296 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1297 * c-tree.h (start_function): Update.
1298 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1299 (set_designator): Change the return type to bool. Use false/true
1302 2017-05-17 Marek Polacek <polacek@redhat.com>
1304 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1305 * c-typeck.c: Likewise.
1307 2017-05-17 Marek Polacek <polacek@redhat.com>
1310 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1311 DECL_IGNORED_P even for non-static compound literals.
1313 2017-05-17 Martin Liska <mliska@suse.cz>
1315 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1316 use it instead of int type.
1318 2017-05-17 Marek Polacek <polacek@redhat.com>
1320 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1322 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1323 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1324 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1325 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1327 (c_parser_conditional_expression): Likewise.
1328 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1329 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1330 (process_init_element): Likewise.
1331 (build_binary_op): Likewise.
1332 (handle_omp_array_sections_1): Likewise.
1334 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1336 * c-parser.c (c_parser_omp_clause_num_gangs)
1337 (c_parser_omp_clause_num_workers)
1338 (c_parser_omp_clause_vector_length): Merge functions into...
1339 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1342 2017-05-11 Nathan Sidwell <nathan@acm.org>
1344 * gimple-parser.c: Don't #include tree-dump.h.
1346 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1349 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1351 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1354 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1355 incorrect __MEM syntax.
1357 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1360 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1363 2017-05-09 Nathan Sidwell <nathan@acm.org>
1365 * c-tree.h (pushdecl): Declare.
1367 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1369 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1370 with diagnostic_report_diagnostic.
1371 * c-errors.c (pedwarn_c99): Likewise.
1372 (pedwarn_c90): Likewise.
1374 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1377 * c-gimplify.c (c_gimplify_expr): Remove calls to
1378 cilk_gimplifY_call_params_in_spawned_fn.
1380 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1382 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1383 hint for removing extra semicolon.
1385 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1388 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1389 enabled, set specs->type to integer_type_node.
1391 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1393 * c-array-notation.c: Fix typo in comment.
1395 2017-03-29 Marek Polacek <polacek@redhat.com>
1398 * c-decl.c (finish_decl): Check VAR_P.
1400 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1403 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1404 * c-typeck.c (c_mark_addressable): Likewise. Look through
1405 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1407 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1409 2017-03-23 Marek Polacek <polacek@redhat.com>
1411 * c-tree.h: Remove a C_RID_YYCODE reference.
1413 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1416 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1417 optional COMPOUND_EXPR with ubsan instrumentation.
1419 2017-03-17 Marek Polacek <polacek@redhat.com>
1421 * c-parser.c: Add C11 references.
1423 2017-03-15 Marek Polacek <polacek@redhat.com>
1425 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1427 2017-03-11 Marek Polacek <polacek@redhat.com>
1429 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1431 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1433 PR translation/79848
1434 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1436 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1438 2017-03-09 Marek Polacek <polacek@redhat.com>
1441 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1442 parameter declarations with initializers.
1444 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1447 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1450 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1453 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1454 for "may only be used in compound statements" diagnostics, change it
1455 such that the same translatable string is used for all pragmas. For
1456 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1458 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1459 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1460 "may only be used in compound statements" diagnostics, such that the
1461 same translatable string is used for all pragmas.
1463 2017-03-04 Marek Polacek <polacek@redhat.com>
1466 * c-decl.c (implicit_decl_warning): Add missing space.
1468 2017-03-03 Marek Polacek <polacek@redhat.com>
1471 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1472 current_function_prototype_arg_types is error_mark_node. Fix
1473 formatting. Use TREE_VALUE instead of TREE_TYPE.
1475 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1478 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1479 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1480 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1484 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1485 instead of %<_Generic>.
1486 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1487 (c_parser_omp_target_exit_data): Use %<release%> instead of
1490 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1492 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1493 instead of just cond ? "..." : "...".
1494 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1495 for "enter"/"exit" keyword.
1496 (c_finish_oacc_routine): Don't use %s to supply portions of the
1499 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1502 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1503 handle -Wrestrict here.
1504 * c-typeck.c (build_function_call_vec): Adjust
1505 check_function_arguments caller.
1507 2017-02-23 Richard Biener <rguenther@suse.de>
1510 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1511 to initialize c_exprs to return.
1512 (c_parser_gimple_binary_expression): Likewise.
1513 (c_parser_gimple_unary_expression): Likewise.
1514 (c_parser_gimple_postfix_expression): Likewise.
1516 2017-02-22 Marek Polacek <polacek@redhat.com>
1519 * c-typeck.c (convert_arguments): Handle error_mark_node.
1521 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1523 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1524 value of c_parser_parse_ssa_name against error_mark_node and emit
1525 error if ssa name is anonymous and written as default definition.
1527 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1529 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1532 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1535 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1536 ignore #pragma omp target even when not followed by identifier.
1538 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1540 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1541 (c_parser_gimple_unary_expression): Likewise.
1543 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1545 * c-parser.c (c_parser_oacc_declare): Add missing space in
1548 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1551 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1552 set_c_expr_source_range when parsing ssa-name.
1554 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1555 Richard Biener <rguenther@suse.de>
1557 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1558 building IL when arguments are error_mark_node.
1559 (c_parser_gimple_unary_expression): Likewise.
1560 (c_parser_gimple_if_stmt): Likewise.
1561 (c_parser_gimple_switch_stmt): Likewise.
1562 (c_parser_gimple_return_stmt): Likewise.
1563 (c_parser_parse_ssa_name): When name lookup fails do not build
1564 an SSA name. Use undeclared rather than not declared in error
1567 2017-02-09 Marek Polacek <polacek@redhat.com>
1570 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1571 instead of c_parser_skip_until_found.
1573 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1576 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1577 symtab_node::get on automatic variables.
1579 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1580 Chung-Lin Tang <cltang@codesourcery.com>
1582 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1583 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1585 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1587 2017-02-07 Richard Biener <rguenther@suse.de>
1589 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1590 (c_parser_gimple_postfix_expression_after_primary):
1591 Do not use c_build_function_call_vec to avoid folding and promotion.
1594 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1597 * c-decl.c (pop_scope): Pass main_input_filename to
1598 build_translation_unit_decl.
1600 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1602 * c-parser.c: Include "read-rtl-function.h" and
1604 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1605 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1606 production. Update for renaming of field "gimple_pass" to
1607 "gimple_or_rtl_pass". If __RTL was seen, call
1608 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1609 to an auto_timevar, to cope with early exit.
1610 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1611 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1612 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1614 (c_parser_parse_rtl_body): New function.
1615 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1616 (struct c_declspecs): Rename field "gimple_pass" to
1617 "gimple_or_rtl_pass". Add field "rtl_p".
1618 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1619 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1620 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1621 (c_parser_gimple_or_rtl_pass_list): ...this.
1623 2017-01-20 Marek Polacek <polacek@redhat.com>
1626 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1628 2017-01-13 Richard Biener <rguenther@suse.de>
1630 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1633 2017-01-13 Richard Biener <rguenther@suse.de>
1635 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1636 _Literal ( type-name ) number.
1638 2017-01-12 Richard Biener <rguenther@suse.de>
1640 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1643 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1646 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1649 2017-01-11 Richard Biener <rguenther@suse.de>
1652 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1653 returns on parse errors.
1655 2017-01-04 Marek Polacek <polacek@redhat.com>
1658 * c-parser.c (c_parser_postfix_expression): Mark zero character
1659 constants by setting original_type in c_expr.
1660 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1661 with a zero character constant.
1662 (char_type_p): New function.
1664 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1666 * c-parser.c (c_parser_declaration_or_fndef): Create a
1667 rich_location at init_loc and parse it to start_init.
1668 (last_init_list_comma): New global.
1669 (c_parser_braced_init): Update last_init_list_comma when parsing
1670 commas. Pass it to pop_init_level. Pass location of closing
1671 brace to pop_init_level.
1672 (c_parser_postfix_expression_after_paren_type): Create a
1673 rich_location at type_loc and parse it to start_init.
1674 (c_parser_omp_declare_reduction): Likewise for loc.
1675 * c-tree.h (start_init): Add rich_location * param.
1676 (pop_init_level): Add location_t param.
1677 * c-typeck.c (struct initializer_stack): Add field
1678 "missing_brace_richloc".
1679 (start_init): Add richloc param, use it to initialize
1680 the stack node's missing_brace_richloc.
1681 (last_init_list_comma): New decl.
1682 (finish_implicit_inits): Pass last_init_list_comma to
1684 (push_init_level): When finding missing open braces, add fix-it
1685 hints to the richloc.
1686 (pop_init_level): Add "insert_before" param and pass it
1687 when calling pop_init_level. Add fixits about missing
1688 close braces to any richloc. Use the richloc for the
1689 -Wmissing-braces warning.
1690 (set_designator): Pass last_init_list_comma to pop_init_level.
1691 (process_init_element): Likewise.
1693 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1695 Update copyright years.
1697 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1700 * c-typeck.c (build_function_call_vec): If check_function_arguments
1701 returns true, set TREE_NO_WARNING on CALL_EXPR.
1704 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1705 to *expr instead of overwriting it.
1707 2016-12-20 Richard Biener <rguenther@suse.de>
1709 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1711 (c_parser_gimple_statement): Only build assigns for non-error
1713 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1715 2016-12-14 Martin Jambor <mjambor@suse.cz>
1717 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1719 (c_finish_oacc_routine): Adjusted call to
1720 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1721 to use their new names.
1722 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1724 (c_parser_oacc_update): Likewise.
1725 (c_parser_omp_simd): Likewise.
1726 (c_parser_omp_target_update): Likewise.
1727 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1728 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1730 (c_finish_omp_cancellation_point): Likewise.
1731 * gimple-parser.c: Do not include omp-low.h
1733 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1734 James Norris <jnorris@codesourcery.com>
1736 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1737 EXIT_DATA,WAIT} are not used in compound statements.
1738 (c_parser_oacc_enter_exit_data): Update diagnostics.
1740 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1743 * c-decl.c (diagnose_mismatched_decls): Use
1744 OPT_Wbuiltin_declaration_mismatch here too.
1746 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1747 Alan Hayward <alan.hayward@arm.com>
1748 David Sherwood <david.sherwood@arm.com>
1750 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1751 (make_label, finish_struct): Likewise.
1753 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1754 Richard Biener <rguenther@suse.de>
1756 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1757 * config-lang.in (gtfiles): Add c/c-parser.h.
1758 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1759 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1760 * c-parser.c (enum c_id_kind, struct c_token,
1761 c_parser_next_token_is, c_parser_next_token_is_not,
1762 c_parser_next_token_is_keyword,
1763 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1765 * c-parser.h: ... new header.
1766 * c-parser.c: Include c-parser.h and gimple-parser.h.
1767 (c_parser_peek_token, c_parser_peek_2nd_token,
1768 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1769 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1770 c_parser_error, c_parser_require, c_parser_skip_until_found,
1771 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1772 c_parser_type_name): Export.
1773 (c_parser_tokens_buf): New function.
1774 (c_parser_error): Likewise.
1775 (c_parser_set_error): Likewise.
1776 (c_parser_declspecs): Handle RID_GIMPLE.
1777 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1778 via c_parser_parse_gimple_body.
1779 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1780 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1781 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1782 c_parser_error, c_parser_require, c_parser_skip_until_found,
1783 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1784 c_parser_type_name): Declare.
1785 (struct c_parser): Declare forward.
1786 (c_parser_tokens_buf): Declare.
1787 (c_parser_error): Likewise.
1788 (c_parser_set_error): Likewise.
1789 * gimple-parser.c: New file.
1790 * gimple-parser.h: Likewise.
1792 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1795 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1798 2016-09-11 Le-Chun Wu <lcwu@google.com>
1799 Mark Wielaard <mjw@redhat.com>
1801 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1802 to the given -Wshadow= variant.
1804 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1806 * c-typeck.c: Include memmodel.h.
1808 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1811 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1812 instead of lhd_return_null_tree_v.
1814 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1817 * c-decl.c (smallest_type_quals_location): New static function.
1818 (grokdeclarator): Try to find the correct location for an ignored
1821 2016-09-26 Marek Polacek <polacek@redhat.com>
1824 * c-decl.c (pop_scope): Add gcc_fallthrough.
1826 2016-09-26 Marek Polacek <polacek@redhat.com>
1829 * c-parser.c (struct c_token): Add flags field.
1830 (c_lex_one_token): Pass it to c_lex_with_flags.
1831 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1832 into IFN_FALLTHROUGH.
1833 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1834 attribute fallthrough after a case label or default label.
1835 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1837 2016-09-24 Marek Polacek <polacek@redhat.com>
1840 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1841 have boolean value. Warn about ++/-- on booleans.
1843 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1845 * c-parser.c (incomplete_record_decls): Remove unnecessary
1846 = vNULL initialization of file scope vec.
1848 2016-09-16 Marek Polacek <polacek@redhat.com>
1850 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1852 2016-09-14 Marek Polacek <polacek@redhat.com>
1854 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1855 (fix_array_notation_expr): Likewise.
1856 * c-decl.c (finish_decl): Likewise.
1857 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1858 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1859 (function_to_pointer_conversion): Use false instead of 0.
1860 (convert_lvalue_to_rvalue): Likewise.
1861 (parser_build_unary_op): Likewise.
1862 (build_atomic_assign): Likewise.
1863 (build_unary_op): Change nonconvert parameter type to bool, use
1864 true/false instead of 1/0.
1865 (build_binary_op): Use true instead of 1.
1867 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1869 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1870 of add_fixit_insert to add_fixit_insert_before.
1872 2016-09-13 Marek Polacek <polacek@redhat.com>
1874 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1877 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1880 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1881 COMPOUND_EXPR to warn_for_omitted_condop.
1883 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1885 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1886 c_get_substring_location for this new langhook.
1888 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1891 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1893 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1894 instead of mark_exp_read on low_bound/length expression.
1895 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1896 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1897 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1898 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1899 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1900 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1901 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1902 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1903 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1904 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1905 instead of mark_expr_read.
1906 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1907 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1908 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1909 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1910 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1911 array section bases outside of depend clause, for depend clause
1912 use convert_lvalue_to_rvalue on the base.
1913 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1914 linear, aligned, map, to and from clauses.
1915 (c_omp_clause_copy_ctor): New function.
1917 2016-09-01 Marek Polacek <polacek@redhat.com>
1920 * c-typeck.c (composite_type): Add FALLTHRU comment.
1922 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1924 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1925 to the insertion fixits for "struct", "union", and "enum".
1927 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1929 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1930 rather than add_fixit_misspelled_id.
1931 (undeclared_variable): Likewise.
1932 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1933 now-redundant "here" params from add_fixit_insert method calls.
1934 (c_parser_parameter_declaration): Likewise.
1935 * c-typeck.c (build_component_ref): Remove now-redundant range
1936 param from add_fixit_replace method calls.
1938 2016-08-25 Marek Polacek <polacek@redhat.com>
1940 * c-typeck.c (parser_build_binary_op): Pass LHS to
1941 warn_logical_not_parentheses.
1943 2016-08-25 Marek Polacek <polacek@redhat.com>
1946 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1947 or _FloatN or _FloatNx is not supported.
1948 (finish_declspecs): Set type to integer_type_node when _FloatN or
1949 _FloatNx is not supported.
1951 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1954 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1955 (struct c_declspecs): Add field floatn_nx_idx.
1956 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1957 and _FloatNx type specifiers.
1958 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1959 (c_parser_declspecs, c_parser_attribute_any_word)
1960 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1961 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1962 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1963 narrower than double.
1965 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1966 Martin Liska <mliska@suse.cz>
1969 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1970 % to determine val element to change. Assert that
1971 wchar_bytes * charwidth fits into val array.
1973 2016-08-12 Marek Polacek <polacek@redhat.com>
1976 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1977 (c_parser_postfix_expression): Likewise.
1978 * c-typeck.c (build_unary_op): Adjust fall through comment.
1979 (c_mark_addressable): Likewise.
1981 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1984 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1985 array member through typedef, for orig_qual_indirect == 0 clear
1988 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1991 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1992 this up to selftest::run_c_tests.
1993 (selftest::run_c_tests): New function.
1995 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1997 * c-parser.c (struct oacc_routine_data): Add error_seen and
1998 fndecl_seen members.
1999 (c_finish_oacc_routine): Use these.
2000 (c_parser_declaration_or_fndef): Adjust.
2001 (c_parser_oacc_routine): Likewise. Support more C language
2002 constructs, and improve diagnostics. Move pragma context
2004 (c_parser_pragma): ... here.
2006 * c-parser.c (struct oacc_routine_data): New.
2007 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2009 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2010 declare target" attribute.
2012 2016-08-01 Jan Beulich <jbeulich@suse.com>
2014 * c-fold.c (c_fully_fold_internal): Also emit shift count
2015 warnings for vector types.
2016 * c-typeck.c (build_binary_op): Likewise.
2018 2016-07-29 Marek Polacek <polacek@redhat.com>
2021 * c-decl.c (finish_struct): Rephrase an error message.
2024 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2025 to error node for invalid code.
2028 * c-decl.c (implicitly_declare): Return decl early not only for
2029 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2031 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2034 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2035 on GNU extern inline functions.
2037 2016-07-29 Marek Polacek <polacek@redhat.com>
2040 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2043 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2045 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2047 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2049 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2051 (best_macro_match): Likewise, converting from a typedef to a
2053 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2054 (lookup_name_fuzzy): Update for change of best_macro_match to a
2055 subclass with a ctor that calls cpp_forall_identifiers.
2057 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2059 * c-decl.c (implicit_decl_warning): Update for conversion of
2060 return type of lookup_name_fuzzy to const char *.
2061 (undeclared_variable): Likewise.
2062 (lookup_name_fuzzy): Convert return type from tree to
2064 * c-parser.c (c_parser_declaration_or_fndef): Update for
2065 conversion of return type of lookup_name_fuzzy to const char *.
2066 (c_parser_parameter_declaration): Likewise.
2068 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2070 * c-parser.c (c_parser_oacc_declare): Don't scan for
2072 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2073 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2074 zero-length subarrays.
2076 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2079 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2080 instead of FUZZY_LOOKUP_NAME.
2081 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2082 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2084 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2087 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2089 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2091 * c-parser.c (c_parser_generic_selection): Make type of variable
2093 (c_parser_omp_declare_simd): Likewise.
2095 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2097 * c-decl.c (struct c_struct_parse_info): Change member types
2098 from vec to auto_vec.
2099 (start_struct): Adjust.
2100 (finish_struct): Likewise.
2102 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2105 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2107 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2109 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2110 Move pragma context checking into...
2111 (c_parser_omp_cancellation_point): ... here, and improve
2112 diagnostic messages.
2113 * c-typeck.c (c_finish_omp_cancel)
2114 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2116 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2119 * c-typeck.c (c_build_qualified_type): Don't clear
2120 C_TYPE_INCOMPLETE_VARS for the main variant.
2122 2016-06-28 Martin Sebor <msebor@redhat.com>
2125 * c-typeck.c (output_init_element): Diagnose incompatible types
2126 before non-constant initializers.
2128 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2130 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2132 2016-06-23 Andi Kleen <ak@linux.intel.com>
2134 * Make-lang.in: Add support for autofdo.
2136 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2139 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2140 (implicit_decl_warning): When issuing warnings for implicit
2141 declarations, attempt to provide a suggestion via
2143 (undeclared_variable): Likewise when issuing errors.
2144 (lookup_name_in_scope): Likewise.
2145 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2146 (best_macro_match): New typedef.
2147 (find_closest_macro_cpp_cb): New function.
2148 (lookup_name_fuzzy): New function.
2149 * c-parser.c: Include gcc-rich-location.h.
2150 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2151 (c_keyword_starts_typename): ...this new function.
2152 (c_parser_declaration_or_fndef): When issuing errors about
2153 missing "struct" etc, add a fixit. For other kinds of errors,
2154 attempt to provide a suggestion via lookup_name_fuzzy.
2155 (c_parser_parms_declarator): When looking ahead to detect typos in
2156 type names, also reject CPP_KEYWORD.
2157 (c_parser_parameter_declaration): When issuing errors about
2158 unknown type names, attempt to provide a suggestion via
2160 * c-tree.h (c_keyword_starts_typename): New prototype.
2162 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2165 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2166 c_common_type returns error_mark_node.
2168 2016-06-19 Martin Sebor <msebor@redhat.com>
2171 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2172 __alignof__ (expression).
2174 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2176 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2178 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2180 * c-typeck.c (build_component_ref): Simplify fixit code by
2181 using gcc_rich_location::add_fixit_misspelled_id.
2182 (set_init_label): Likewise.
2184 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2186 * c-parser.c (c_parser_initelt): Provide location of name for new
2187 location_t param of set_init_label.
2188 * c-tree.h (set_init_label): Add location_t param.
2189 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2190 param and use it when issuing error messages about unrecognized
2191 field names. Attempt to provide a fixit hint if appropriate,
2192 otherwise update the error message to provide the type name.
2194 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2197 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2200 2016-06-08 Martin Sebor <msebor@redhat.com>
2201 Jakub Jelinek <jakub@redhat.com>
2205 * c-typeck.c (convert_arguments): Don't promote last argument
2206 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2208 2016-06-08 Marek Polacek <polacek@redhat.com>
2211 * c-decl.c (grokdeclarator): Check TYPE_P.
2214 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2217 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2219 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2220 and structure element reference, capture the location of the
2221 element name token and pass it to build_component_ref.
2222 (c_parser_postfix_expression_after_primary): Likewise for
2223 structure element dereference.
2224 (c_parser_omp_variable_list): Likewise for
2225 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2226 * c-tree.h (build_component_ref): Add location_t param.
2227 * c-typeck.c (build_component_ref): Add location_t param
2228 COMPONENT_LOC. Use it, if available, when issuing hints about
2229 mispelled member names to provide a fixit replacement hint.
2231 2016-06-06 Marek Polacek <polacek@redhat.com>
2234 * c-parser.c (c_parser_direct_declarator): Set location.
2236 2016-06-06 Marek Polacek <polacek@redhat.com>
2238 * c-typeck.c (comptypes_internal): Handle comparisons of
2239 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2240 TYPE_REF_CAN_ALIAS_ALL.
2242 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2244 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2245 arguments as addressable when async clause exists.
2247 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2250 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2251 when combined with target construct.
2253 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2255 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2256 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2258 2016-05-25 Marek Polacek <polacek@redhat.com>
2261 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2264 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2266 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2268 * c-parser.c (c_parser_oacc_declare): Add support for
2269 GOMP_MAP_FIRSTPRIVATE_POINTER.
2270 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2271 argument with enum c_omp_region_type ort.
2272 (handle_omp_array_sections): Likewise. Update call to
2273 handle_omp_array_sections_1.
2274 (c_finish_omp_clauses): Add specific errors and warning messages for
2275 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2276 call to handle_omp_array_sections.
2278 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2280 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2282 2016-05-24 Richard Biener <rguenther@suse.de>
2286 * c-typeck.c (build_array_ref): Do not complain about indexing
2287 non-lvalue vectors. Adjust for function name change.
2289 2016-05-20 Martin Sebor <msebor@redhat.com>
2292 * c-typeck.c (error_init): Use
2293 expansion_point_location_if_in_system_header.
2294 (warning_init): Same.
2296 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2299 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2301 (c_parser_postfix_expression): Likewise.
2302 * c-tree.h (c_expr::set_error): New method.
2303 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2304 that result's range is initialized.
2306 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2308 * c-typeck.c (parser_build_unary_op): Fix formatting.
2310 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2312 * c-decl.c (grokdeclarator): Remove errmsg and use of
2313 targetm.invalid_return_type.
2314 (grokparms): Remove errmsg and use of
2315 targetm.invalid_parameter_type.
2317 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2319 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2320 function return type.
2322 2016-05-12 Marek Polacek <polacek@redhat.com>
2325 * c-decl.c (build_compound_literal): Pass LOC down to
2326 c_incomplete_type_error.
2327 * c-tree.h (require_complete_type): Adjust declaration.
2328 (c_incomplete_type_error): Likewise.
2329 * c-typeck.c (require_complete_type): Add location parameter, pass it
2330 down to c_incomplete_type_error.
2331 (c_incomplete_type_error): Add location parameter, pass it down to
2333 (build_component_ref): Pass location down to c_incomplete_type_error.
2334 (default_conversion): Pass location down to require_complete_type.
2335 (build_array_ref): Likewise.
2336 (build_function_call_vec): Likewise.
2337 (convert_arguments): Likewise.
2338 (build_unary_op): Likewise.
2339 (build_c_cast): Likewise.
2340 (build_modify_expr): Likewise.
2341 (convert_for_assignment): Likewise.
2342 (c_finish_omp_clauses): Likewise.
2344 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2347 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2349 * c-errors.c (pedwarn_c90): Return true if warned.
2350 * c-tree.h (pedwarn_c90): Change return type to bool.
2351 (enum c_declspec_word): Add new enumerator cdw_atomic.
2353 2016-05-11 Marek Polacek <polacek@redhat.com>
2356 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2357 diagnose_mismatched_attributes and call it.
2359 2016-05-10 Marek Polacek <polacek@redhat.com>
2362 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2363 on a declaration following the definition.
2365 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2367 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2368 parse it through to c_parser_c99_block_statement.
2369 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2372 2016-05-04 Marek Polacek <polacek@redhat.com>
2374 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2377 2016-05-04 Marek Polacek <polacek@redhat.com>
2380 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2381 for macro expansions.
2383 2016-05-03 Marek Polacek <polacek@redhat.com>
2386 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2387 check_builtin_function_arguments.
2389 2016-05-03 Richard Biener <rguenther@suse.de>
2391 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2392 the checksum from the previous stage.
2394 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2396 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2397 c_finish_omp_clauses.
2398 (c_parser_omp_all_clauses): Likewise.
2399 (c_parser_oacc_cache): Likewise.
2400 (c_parser_oacc_loop): Likewise.
2401 (omp_split_clauses): Likewise.
2402 (c_parser_omp_declare_target): Likewise.
2403 (c_parser_cilk_all_clauses): Likewise.
2404 (c_parser_cilk_for): Likewise.
2405 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2406 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2408 2016-05-02 Marek Polacek <polacek@redhat.com>
2411 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2414 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2417 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2418 OACC_LOOP_CLAUSE_MASK.
2419 (c_parser_oacc_kernels_parallel): Update call to
2420 c_oacc_split_loop_clauses.
2422 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2424 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2425 argument to build_modify_expr in two cases.
2427 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2429 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2430 warn_for_memset instead of warning directly here.
2432 2016-04-26 Marek Polacek <polacek@redhat.com>
2435 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2437 (c_parser_for_statement): ... here.
2438 (c_parser_if_statement): Use it.
2439 (c_parser_switch_statement): Use it.
2440 (c_parser_while_statement): Use it.
2443 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2445 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2448 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2449 instead of c_finish_cilk_clauses.
2450 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2451 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2452 floating-point variables in the linear clause for Cilk Plus.
2454 2016-04-18 Michael Matz <matz@suse.de>
2456 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2457 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2459 2016-04-15 Marek Polacek <polacek@redhat.com>
2462 * c-typeck.c (build_unary_op): Pass location down to error and
2465 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2468 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2470 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2471 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2472 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2473 Adjust c_parser_pragma callers.
2474 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2476 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2478 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2479 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2480 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2481 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2482 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2483 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2484 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2485 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2487 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2488 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2491 2016-04-13 Marek Polacek <polacek@redhat.com>
2494 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2496 (c_parser_statement): Likewise.
2497 (c_parser_c99_block_statement): Likewise.
2498 (c_parser_while_statement): Likewise.
2499 (c_parser_for_statement): Likewise.
2500 (c_parser_if_body): Don't set IF_P here.
2501 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2502 about dangling else here.
2503 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2504 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2505 warn about dangling else here.
2507 2016-04-04 Marek Polacek <polacek@redhat.com>
2510 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2512 2016-03-31 Marek Polacek <polacek@redhat.com>
2515 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2517 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2520 * c-parser.c (c_parser_postfix_expression): Set the source range
2521 for uses of "__builtin_types_compatible_p".
2523 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2526 * c-typeck.c (composite_type): Don't count void_list_node
2527 into len, if the list is terminated by void_list_node, start
2528 with void_list_node instead of NULL for newargs. Stop
2531 2016-03-16 Marek Polacek <polacek@redhat.com>
2534 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2535 nested functions returning VM types.
2537 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2539 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2540 when calling c_finish_omp_clauses.
2542 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2545 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2548 2016-03-04 Marek Polacek <polacek@redhat.com>
2551 * c-parser.c (c_parser_postfix_expression): Call
2552 c_parser_cast_expression rather than c_parser_postfix_expression.
2554 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2558 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2559 of incomplete decls to error_mark_node.
2561 2016-02-24 Marek Polacek <polacek@redhat.com>
2564 * c-decl.c (finish_decl): Don't update the copy of the type of a
2565 different decl type.
2567 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2570 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2571 in id_kind reclassification.
2573 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2576 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2578 2016-02-16 James Norris <jnorris@codesourcery.com>
2581 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2583 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2585 * c-decl.c (build_null_declspecs): Zero the entire struct.
2588 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2589 callers changed. If nested_p is true, use it to call
2590 finish_implicit_inits.
2591 * c-tree.h (finish_implicit_inits): Declare.
2592 * c-typeck.c (finish_implicit_inits): New function. Move code
2594 (push_init_level): ... here.
2595 (set_designator, process_init_element): Call finish_implicit_inits.
2597 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2600 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2601 arguments for -Waddress warning.
2603 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2606 * c-decl.c (finish_enum): When honoring mode attribute,
2607 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2609 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2612 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2613 all type variants, not just TYPE_MAIN_VARIANT.
2615 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2618 * c-decl.c (c_write_global_declarations_1): Warn with
2619 warn_unused_function if static prototype without definition
2622 2016-01-27 Marek Polacek <polacek@redhat.com>
2625 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2626 to unsigned, if needed. Add -Wsign-compare warning.
2628 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2630 PR tree-optimization/69483
2631 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2633 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2636 * c-tree.h (incomplete_record_decls): Declare.
2637 * c-parser.c (incomplete_record_decls): Define.
2638 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2639 report error if any decl has zero size.
2640 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2641 or enum type to incomplete_record_decls.
2643 2016-01-14 Tom de Vries <tom@codesourcery.com>
2645 PR tree-optimization/68773
2646 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2649 2016-01-14 Marek Polacek <polacek@redhat.com>
2652 * c-decl.c (grokdeclarator): Provide more information for invalid
2655 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2657 * c-parser.c (c_parser_unary_expression): For dereferences, build
2658 a combined location before calling build_indirect_ref, so that
2659 error reports cover the full range, manually updating the c_expr
2662 2016-01-06 Marek Polacek <polacek@redhat.com>
2665 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2666 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2669 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2671 Update copyright years.
2673 2016-01-04 Marek Polacek <polacek@redhat.com>
2676 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2677 optimization to use __atomic_fetch_* built-in if possible.
2679 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2681 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2683 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2686 2015-12-22 Marek Polacek <polacek@redhat.com>
2689 * c-typeck.c (build_component_ref): Warn when acessing elements of
2690 atomic structures or unions.
2692 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2694 * c-typeck.c: Include "gcc-rich-location.h".
2695 (build_binary_op): In the two places that call binary_op_error,
2696 create a gcc_rich_location and populate it with the location of
2697 the binary op and its two operands.
2699 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2701 * c-parser.c (c_parser_statement_after_labels): When calling
2702 c_finish_return, Use the return expression's location if it has
2703 one, falling back to the location of the first token within it.
2704 * c-typeck.c (c_finish_return): When issuing warnings about
2705 the incorrect presence/absence of a return value, issue a note
2706 showing the declaration of the function.
2708 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2710 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2712 (c_parser_peek_nth_token): New function.
2713 (c_parser_peek_conflict_marker): New function.
2714 (c_parser_error): Detect conflict markers and report them as such.
2716 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2718 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2719 to preserve range information for the primary expression
2720 in the call to c_parser_postfix_expression_after_primary.
2722 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2724 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2725 expression location, falling back on the first token location,
2726 rather than always using the latter.
2728 2015-12-16 Marek Polacek <polacek@redhat.com>
2731 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2734 2015-12-15 Marek Polacek <polacek@redhat.com>
2737 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2740 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2742 * c-parser.c (c_parser_alignof_expression): Capture location of
2743 closing parenthesis (if any), or of end of unary expression, and
2744 use it to build a src_range for the expression.
2746 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2749 * c-parser.c (c_parser_get_builtin_args): Add
2750 "out_close_paren_loc" param, and write back to it.
2751 (c_parser_postfix_expression): Capture the closing
2752 parenthesis location for RID_CHOOSE_EXPR,
2753 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2754 RID_BUILTIN_SHUFFLE and use it to set the source range
2755 for such expressions; within RID_BUILTIN_COMPLEX set
2756 the underlying location.
2758 2015-12-07 Marek Polacek <polacek@redhat.com>
2761 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2762 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2764 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2766 * c-tree.h (c_build_va_arg): Adjust prototype.
2767 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2768 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2769 parameter, adjust throughout and issue an error if EXPR is a component
2770 with reverse storage order.
2772 2015-12-02 Jason Merrill <jason@redhat.com>
2774 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2775 (c_fully_fold_internal, decl_constant_value_for_optimization):
2776 Move from c-common.c.
2777 * c-tree.h: Declare decl_constant_value_for_optimization.
2778 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2780 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2783 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2784 following link from declarator to next declarator. Track original
2785 qualified type and pass it to c_build_qualified_type.
2786 * c-typeck.c (c_build_qualified_type): Add arguments
2787 orig_qual_type and orig_qual_indirect.
2789 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2791 * c-parser.c (c_parser_omp_clause_name)
2792 (c_parser_oacc_all_clauses): Alphabetical sorting.
2794 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2797 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2800 2015-12-01 Julian Brown <julian@codesourcery.com>
2801 Cesar Philippidis <cesar@codesourcery.com>
2802 James Norris <James_Norris@mentor.com>
2804 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2805 (c_parser_oacc_clause_use_device): New function.
2806 (c_parser_oacc_all_clauses): Add use_device support.
2807 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2808 (c_parser_oacc_host_data): New function.
2809 (c_parser_omp_construct): Add host_data support.
2810 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2811 * c-typeck.c (c_finish_oacc_host_data): New function.
2812 (c_finish_omp_clauses): Add use_device support.
2814 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2817 * c-decl.c: Set TYPE_PACKED in variants.
2819 2015-11-27 Martin Liska <mliska@suse.cz>
2822 * c-array-notation.c (fix_builtin_array_notation_fn):
2823 Use release_vec_vec instead of vec::release.
2824 (build_array_notation_expr): Likewise.
2825 (fix_conditional_array_notations_1): Likewise.
2826 (fix_array_notation_expr): Likewise.
2827 (fix_array_notation_call_expr): Likewise.
2829 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2832 * c-parser.c (c_parser_compound_statement_nostart): If
2833 last_label is true, use pragma_stmt instead of pragma_compound
2834 as second c_parser_pragma argument.
2835 (c_parser_omp_ordered, c_parser_omp_target_update,
2836 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2837 false as second argument to c_parser_skip_to_pragma_eol after
2838 diagnosing standalone directives used in pragma_stmt context.
2840 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2842 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2843 with "if (ENABLE_OFFLOADING)".
2845 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2848 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2849 for various Objective-C constructs: Class.name syntax,
2850 @selector(), @protocol(), @encode(), and [] message syntax.
2852 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2855 * c-typeck.c (should_suggest_deref_p): New function.
2856 (build_component_ref): Special-case POINTER_TYPE when
2857 generating a "not a structure of union" error message, and
2858 suggest a "->" rather than a ".", providing a fix-it hint.
2860 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2862 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2863 candidate into a new function, find_closest_identifier.
2865 2015-11-19 Marek Polacek <polacek@redhat.com>
2868 * c-typeck.c (parser_build_binary_op): Properly handle
2869 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2871 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2873 * c-parser.c (set_c_expr_source_range): Bulletproof both
2874 overloaded implementations against NULL expr->value.
2875 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2877 (c_parser_unary_expression): Likewise when handling addresses of
2879 (c_parser_postfix_expression): Likewise for statement expressions,
2880 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2881 __builtin_va_arg, and for __builtin_offset_of.
2882 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2883 src_range using the range of the braced initializer.
2884 (c_parser_transaction_expression): Set src_range for "ret" to a
2885 sane pair of values.
2887 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2889 * c-parser.c (c_finish_omp_declare_simd): Look for
2890 "simd" attribute as well. Update error message.
2892 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2894 * c-parser.c (c_parser_omp_declare_target): Adjust.
2896 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2898 * c-typeck.c (c_finish_omp_clauses): Don't mark
2899 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2901 2015-11-14 Marek Polacek <polacek@redhat.com>
2903 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2904 * c-typeck.c: Likewise.
2906 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2908 * c-decl.c (warn_defaults_to): Pass line_table to
2910 * c-errors.c (pedwarn_c99): Likewise.
2911 (pedwarn_c90): Likewise.
2912 * c-parser.c (set_c_expr_source_range): New functions.
2913 (c_token::get_range): New method.
2914 (c_token::get_finish): New method.
2915 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2916 based on the range from the start of the LHS to the end of the
2918 (c_parser_conditional_expression): Likewise, based on the range
2919 from the start of the cond.value to the end of exp2.value.
2920 (c_parser_binary_expression): Call set_c_expr_source_range on
2921 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2922 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2923 based on the cast_loc through to the end of the expr.
2924 (c_parser_unary_expression): Likewise, based on the
2925 op_loc through to the end of op.
2926 (c_parser_sizeof_expression) Likewise, based on the start of the
2927 sizeof token through to either the closing paren or the end of
2929 (c_parser_postfix_expression): Likewise, using the token range,
2930 or from the open paren through to the close paren for
2931 parenthesized expressions.
2932 (c_parser_postfix_expression_after_primary): Likewise, for
2933 various kinds of expression.
2934 * c-tree.h (struct c_expr): Add field "src_range".
2935 (c_expr::get_start): New method.
2936 (c_expr::get_finish): New method.
2937 (set_c_expr_source_range): New decls.
2938 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2939 on ret for prefix unary ops.
2940 (parser_build_binary_op): Likewise, running from the start of
2941 arg1.value through to the end of arg2.value.
2943 2015-11-13 Marek Polacek <polacek@redhat.com>
2946 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2948 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2950 * c-typeck.c: Include spellcheck.h.
2951 (lookup_field_fuzzy_find_candidates): New function.
2952 (lookup_field_fuzzy): New function.
2953 (build_component_ref): If the field was not found, try using
2954 lookup_field_fuzzy and potentially offer a suggestion.
2956 2015-11-12 James Norris <jnorris@codesourcery.com>
2957 Joseph Myers <joseph@codesourcery.com>
2959 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2960 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2961 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2962 and PRAGMA_OMP_CLAUSE_LINK.
2963 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2964 and PRAGMA_OACC_CLAUSE_LINK.
2965 (OACC_DECLARE_CLAUSE_MASK): New definition.
2966 (c_parser_oacc_declare): New function.
2968 2015-11-12 Marek Polacek <polacek@redhat.com>
2971 * c-parser.c (c_parser_for_statement): Reclassify the token in
2974 2015-11-11 Marek Polacek <polacek@redhat.com>
2978 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2979 checking the size of an array.
2981 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2983 * c-array-notation.c: Remove unused header files.
2984 * c-aux-info.c: Likewise.
2985 * c-convert.c: Likewise.
2986 * c-decl.c: Likewise.
2987 * c-errors.c: Likewise.
2988 * c-lang.c: Likewise.
2989 * c-objc-common.c: Likewise.
2990 * c-parser.c: Likewise.
2991 * c-typeck.c: Likewise.
2992 * gccspec.c: Likewise.
2994 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2995 Cesar Philippidis <cesar@codesourcery.com>
2996 James Norris <jnorris@codesourcery.com>
2997 Julian Brown <julian@codesourcery.com>
2998 Nathan Sidwell <nathan@codesourcery.com>
3001 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3003 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3004 (c_parser_pragma): Parse 'acc routine'.
3005 (OACC_ROUTINE_CLAUSE_MARK): Define.
3006 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3008 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3011 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3012 location of the backward-goto to the start of the loop body.
3014 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3017 * c-parser.c (c_parser_while_statement): Finish the loop before
3018 parsing ahead for misleading indentation.
3019 (c_parser_for_statement): Likewise.
3021 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3023 * c-decl.c (finish_struct): If the structure has reverse storage
3024 order, rewrite the type of array fields with scalar component. Call
3025 maybe_apply_pragma_scalar_storage_order on entry.
3026 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3027 errors on bit-fields and reverse SSO here and not...
3028 (c_mark_addressable): ...here.
3029 (output_init_element): Adjust call to initializer_constant_valid_p.
3030 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3032 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3034 * c-decl.c (warn_defaults_to): Update for change in signature
3035 of diagnostic_set_info.
3036 * c-errors.c (pedwarn_c99): Likewise.
3037 (pedwarn_c90): Likewise.
3038 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3039 for textinfo::set_location.
3041 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3042 Thomas Schwinge <thomas@codesourcery.com>
3043 James Norris <jnorris@codesourcery.com>
3045 * c-parser.c (c_parser_omp_clause_name): Add support for
3046 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3047 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3048 default(none) in OpenACC.
3049 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3051 (c_parser_oacc_clause_tile): New function.
3052 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3053 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3054 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3056 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3057 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3059 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3060 (c_parser_oacc_update): Update the error message for missing clauses.
3061 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3062 and OMP_CLAUSE_INDEPENDENT.
3064 2015-11-05 Marek Polacek <polacek@redhat.com>
3067 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3068 deal with pre-evaluation on invalid types.
3070 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3071 Ilya Verbin <ilya.verbin@intel.com>
3073 * c-parser.c: Include context.h and gimple-expr.h.
3074 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3075 monotonic together with nonmonotonic.
3076 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3077 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3078 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3079 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3080 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3081 expressions on combined target teams before the target.
3082 (c_parser_omp_declare_target): If decl has "omp declare target" or
3083 "omp declare target link" attribute, and cgraph or varpool node already
3084 exists, then set corresponding flags. Call c_finish_omp_clauses
3085 in the parenthesized extended-list syntax case.
3086 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3088 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3089 on OMP_CLAUSE_REDUCTION array sections.
3090 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3091 into the constant offset, or for variable low-bound using
3092 POINTER_PLUS_EXPR. For structure element based array sections use
3093 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3094 (c_finish_omp_clauses): Drop generic_field_head, structure
3095 elements are now always mapped even as array section bases,
3096 diagnose same var in data sharing and mapping clauses. Diagnose if
3097 linear step on declare simd is neither a constant nor a uniform
3098 parameter. Look through POINTER_PLUS_EXPR for array section
3099 reductions. Diagnose the same var or function appearing multiple
3100 times on the same directive. Fix up wording for the to clause if t
3101 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3102 modifier on kinds other than dynamic or guided or nonmonotonic
3103 modifier together with ordered clause.
3105 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3106 Chung-Lin Tang <cltang@codesourcery.com>
3108 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3110 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3112 * c-array-notation.c: Reorder #include's and remove duplicates.
3113 * c-aux-info.c: Likewise.
3114 * c-convert.c: Likewise.
3115 * c-decl.c: Likewise.
3116 * c-errors.c: Likewise.
3117 * c-lang.c: Likewise.
3118 * c-objc-common.c: Likewise.
3119 * c-parser.c: Likewise.
3120 * c-typeck.c: Likewise.
3122 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3125 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3126 after calling build_qualified_type.
3128 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3129 Thomas Schwinge <thomas@codesourcery.com>
3130 James Norris <jnorris@codesourcery.com>
3131 Joseph Myers <joseph@codesourcery.com>
3132 Julian Brown <julian@codesourcery.com>
3133 Bernd Schmidt <bschmidt@redhat.com>
3135 * c-parser.c (c_parser_oacc_shape_clause): New.
3136 (c_parser_oacc_simple_clause): New.
3137 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3138 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3140 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3141 James Norris <jnorris@codesourcery.com>
3142 Cesar Philippidis <cesar@codesourcery.com>
3146 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3147 parameters, and handle these. Adjust all users.
3148 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3150 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3152 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3154 (c_finish_omp_construct): Declare function.
3155 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3156 Merge functions into...
3157 (c_finish_omp_construct): ... this new function.
3159 2015-10-22 Richard Biener <rguenther@suse.de>
3161 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3162 before folding a MINUS_EXPR.
3164 2015-10-21 Marek Polacek <polacek@redhat.com>
3167 * c-decl.c (start_function): Warn about vararg functions without
3170 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3172 * c-typeck.c (build_conditional_expr): Use boolean vector
3173 type for vector comparison.
3174 (build_vec_cmp): New.
3175 (build_binary_op): Use build_vec_cmp for comparison.
3177 2015-10-20 Marek Polacek <polacek@redhat.com>
3179 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3181 2015-10-20 Marek Polacek <polacek@redhat.com>
3184 * c-parser.c (c_parser_attributes): Break out of the loop if the
3185 token after an attribute isn't a comma.
3187 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3188 Aldy Hernandez <aldyh@redhat.com>
3190 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3191 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3192 (c_parser_omp_variable_list): Handle structure elements for
3193 map, to and from clauses. Handle array sections in reduction
3194 clause. Formatting fixes.
3195 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3196 if clause modifiers.
3197 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3198 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3199 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3200 c_parser_omp_clause_is_device_ptr): New functions.
3201 (c_parser_omp_clause_ordered): Parse optional parameter.
3202 (c_parser_omp_clause_reduction): Handle array reductions.
3203 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3204 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3206 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3207 (c_parser_omp_clause_depend_sink): New function.
3208 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3209 (c_parser_omp_clause_map): Parse release/delete map kinds and
3210 optional always modifier.
3211 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3212 and c_finish_omp_clauses callers.
3213 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3214 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3215 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3216 (OMP_CRITICAL_CLAUSE_MASK): Define.
3217 (c_parser_omp_critical): Parse critical clauses.
3218 (c_parser_omp_for_loop): Handle doacross loops, adjust
3219 c_finish_omp_for and c_finish_omp_clauses callers.
3220 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3221 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3222 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3223 (c_parser_omp_for): Disallow ordered clause when combined with
3224 distribute. Disallow linear clause when combined with distribute
3225 and not combined with simd.
3226 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3227 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3228 parse clauses and if depend clause is found, don't parse a body.
3229 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3230 Allow target parallel without for after it.
3231 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3232 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3233 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3235 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3236 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3237 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3238 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3240 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3241 defaultmap and is_device_ptr clauses.
3242 (c_parser_omp_target): Parse target parallel and target simd. Set
3243 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3244 and target exit data. Diagnose invalid map kinds.
3245 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3246 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3248 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3250 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3251 (c_parser_omp_taskloop): New function.
3252 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3253 handle PRAGMA_OMP_TASKLOOP.
3254 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3255 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3256 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3257 Add IS_OMP argument, handle structure element bases, diagnose
3258 bitfields, pass IS_OMP recursively, diagnose known zero length
3259 array sections in depend clauses, handle array sections in reduction
3260 clause, diagnose negative length even for pointers.
3261 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3262 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3263 array sections in reduction clause, set
3264 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3265 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3266 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3267 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3269 2015-10-06 Marek Polacek <polacek@redhat.com>
3271 * c-parser.c (c_parser_statement_after_labels): Use
3272 protected_set_expr_location.
3273 (c_parser_omp_clause_num_gangs): Likewise.
3274 (c_parser_omp_clause_num_threads): Likewise.
3275 (c_parser_omp_clause_num_workers): Likewise.
3276 (c_parser_omp_clause_vector_length): Likewise.
3277 (c_parser_omp_clause_num_teams): Likewise.
3278 (c_parser_omp_clause_thread_limit): Likewise.
3279 * c-typeck.c (build_c_cast): Likewise.
3280 (c_cast_expr): Likewise.
3282 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3284 * c-typeck.c (c_tree_equal): Use real_equal instead of
3287 2015-10-04 Jason Merrill <jason@redhat.com>
3289 * c-parser.c (c_lex_one_token): Handle @synchronized.
3290 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3291 can change whether the function is transaction_safe.
3293 2015-10-02 Marek Polacek <polacek@redhat.com>
3296 * c-typeck.c (convert_for_assignment): Use the expansion point
3297 location throughout.
3299 2015-10-02 Marek Polacek <polacek@redhat.com>
3302 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3303 and pass it down to c_parser_if_statement.
3304 (c_parser_else_body): Add CHAIN parameter and pass it down to
3305 c_parser_statement_after_labels.
3306 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3307 duplicated if-else-if conditions.
3309 2015-10-01 Marek Polacek <polacek@redhat.com>
3311 * c-typeck.c (convert_for_assignment): Improve commentary.
3313 2015-09-30 Marek Polacek <polacek@redhat.com>
3316 * c-typeck.c (c_finish_return): Use the expansion point location for
3317 certain "return with value" warnings.
3319 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3321 * c-parser.c (pragma_lex): Add loc argument.
3323 2015-09-15 Marek Polacek <polacek@redhat.com>
3326 * c-decl.c (tag_exists_p): New function.
3327 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3328 struct/union/enum keywords are missing.
3329 * c-tree.h (tag_exists_p): Declare.
3331 2015-09-15 Marek Polacek <polacek@redhat.com>
3333 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3334 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3335 Return NULL_TREE instead of 0.
3336 (lookup_name): Return NULL_TREE instead of 0.
3337 (lookup_name_in_scope): Likewise.
3338 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3339 (parser_xref_tag): Use false instead of 0.
3340 (start_struct): Use true instead of 1.
3341 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3343 2015-09-14 Marek Polacek <polacek@redhat.com>
3345 * c-typeck.c (set_nonincremental_init_from_string): Use
3346 HOST_WIDE_INT_M1U when shifting a negative value.
3348 2015-09-09 Mark Wielaard <mjw@redhat.com>
3350 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3353 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3356 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3357 into OMP_FOR_PRE_BODY rather than before the loop.
3359 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3362 * c-parser.c (c_parser_oacc_all_clauses,
3363 c_parser_omp_all_clauses): Remove invalid clause from
3364 list of clauses even if parser->error is set.
3367 * c-parser.c (c_parser_omp_clause_aligned,
3368 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3370 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3374 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3375 instead of c_parser_unary_expression. If the result is !lvalue_p,
3376 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3378 2015-09-04 Marek Polacek <polacek@redhat.com>
3381 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3383 2015-09-03 Martin Sebor <msebor@redhat.com>
3386 * c-typeck.c (convert_arguments, parser_build_unary_op,
3387 build_conditional_expr, c_cast_expr, convert_for_assignment,
3388 build_binary_op, _objc_common_truthvalue_conversion): Call
3390 (c_decl_implicit): Define.
3392 2015-09-02 Marek Polacek <polacek@redhat.com>
3395 * c-parser.c (c_parser_enum_specifier): Give a better error for
3398 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3400 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3402 2015-08-12 Marek Polacek <polacek@redhat.com>
3404 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3407 2015-08-03 Marek Polacek <polacek@redhat.com>
3410 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3412 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3414 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3416 * c-parser.c (c_parser_if_body): Take token_indent_info
3417 argument. Call warn_for_misleading_indentation even when the
3418 body is a semicolon. Extract token_indent_infos corresponding
3419 to the guard, body and next tokens. Adjust call to
3420 warn_for_misleading_indentation accordingly.
3421 (c_parser_else_body): Likewise.
3422 (c_parser_if_statement): Likewise.
3423 (c_parser_while_statement): Likewise.
3424 (c_parser_for_statement): Likewise.
3426 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3427 Manuel López-Ibáñez <manu@gcc.gnu.org>
3429 * c-decl.c (get_parm_info): Remove static var. Update warning
3432 2015-07-27 Marek Polacek <polacek@redhat.com>
3436 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3438 2015-07-20 Marek Polacek <polacek@redhat.com>
3441 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3442 (build_binary_op): Warn about left shift overflows.
3444 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3446 * c-array-notation.c: Adjust includes for flags.h changes.
3447 * c-objc-common.c: Likewise.
3449 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3451 * c-array-notation.c: Adjust includes.
3452 * c-aux-info.c: Likewise.
3453 * c-convert.c: Likewise.
3454 * c-decl.c: Likewise.
3455 * c-errors.c: Likewise.
3456 * c-lang.c: Likewise.
3457 * c-objc-common.c: Likewise.
3458 * c-parser.c: Likewise.
3459 * c-typeck.c: Likewise.
3461 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3464 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3466 2015-06-29 Marek Polacek <polacek@redhat.com>
3469 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3470 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3471 about -Wswitch-bool here.
3472 (do_case): Update c_add_case_label call.
3473 (c_finish_case): Update c_do_switch_warnings call.
3475 2015-06-27 Marek Polacek <polacek@redhat.com>
3477 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3479 2015-06-26 Marek Polacek <polacek@redhat.com>
3481 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3483 * c-typeck.c (array_to_pointer_conversion): Likewise.
3484 (build_unary_op): Likewise.
3485 (c_finish_return): Likewise.
3487 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3489 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3490 * c-parser.c: Likewise.
3492 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3494 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3495 instead of pointer_hash.
3496 (detect_field_duplicates): Likewise.
3498 2015-06-25 Marek Polacek <polacek@redhat.com>
3500 * c-array-notation.c: Use VAR_P throughout.
3501 * c-decl.c: Likewise.
3502 * c-objc-common.c: Likewise.
3503 * c-parser.c: Likewise.
3504 * c-typeck.c: Likewise.
3506 2015-06-25 Marek Polacek <polacek@redhat.com>
3508 * c-decl.c: Use is_global_var throughout.
3509 * c-parser.c: Likewise.
3510 * c-typeck.c: Likewise.
3512 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3514 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3515 * c-aux-info.c: Likewise.
3516 * c-convert.c: Likewise.
3517 * c-decl.c: Likewise.
3518 * c-errors.c: Likewise.
3519 * c-lang.c: Likewise.
3520 * c-objc-common.c: Likewise.
3521 * c-parser.c: Likewise.
3522 * c-typeck.c: Likewise.
3524 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3527 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3530 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3532 * c-decl.c (pop_scope): Register the main translation unit
3533 through the new debug hook.
3535 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3537 * c-array-notation.c : Adjust include files.
3538 * c-aux-info.c : Likewise.
3539 * c-convert.c : Likewise.
3540 * c-decl.c : Likewise.
3541 * c-errors.c : Likewise.
3542 * c-lang.c : Likewise.
3543 * c-lang.h : Likewise.
3544 * c-objc-common.c : Likewise.
3545 * c-parser.c : Likewise.
3546 * c-typeck.c : Likewise.
3548 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3550 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3551 immediately clobber it.
3552 (c_write_global_declarations_1): Remove call to
3553 check_global_declaration_1.
3554 (c_write_global_declarations_2): Remove.
3555 (c_write_final_cleanups): Rename from c_write_global_declarations.
3556 Remove call to finalize_compilation_unit.
3557 Remove calls to debugging hooks.
3558 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3559 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3560 * c-tree.h: Remove c_write_global_declarations.
3562 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3564 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3565 * c-aux-info.c: Likewise.
3566 * c-convert.c: Likewise.
3567 * c-decl.c: Likewise.
3568 * c-errors.c: Likewise.
3569 * c-lang.c: Likewise.
3570 * c-objc-common.c: Likewise.
3571 * c-parser.c: Likewise.
3572 * c-typeck.c: Likewise.
3574 2015-06-04 Marek Polacek <polacek@redhat.com>
3577 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3580 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3582 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3583 Warn for empty struct.
3584 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3586 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3588 * c-decl.c (start_function): Call plugin before parsing.
3589 (finish_function): Call plugin after parsing.
3591 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3594 * c-decl.c (merge_decls): Merge DECL_COMMON.
3596 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3598 * Make-lang.in (check_gcc_pallelize): Define.
3600 2015-05-22 Marek Polacek <polacek@redhat.com>
3603 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3606 2015-05-21 Marek Polacek <polacek@redhat.com>
3608 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3611 2015-05-20 Marek Polacek <polacek@redhat.com>
3613 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3614 * c-typeck.c: Likewise.
3616 2015-05-19 Marek Polacek <polacek@redhat.com>
3618 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3620 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3623 * c-parser.c (c_parser_omp_for_loop): Don't add
3624 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3625 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3626 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3629 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3631 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3634 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3637 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3640 2015-05-14 Marek Polacek <polacek@redhat.com>
3644 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3647 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3649 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3650 to add a call to warn_for_misleading_indentation.
3651 (c_parser_else_body): Likewise, adding param "else_loc".
3652 (c_parser_if_statement): Check for misleading indentation.
3653 (c_parser_while_statement): Likewise.
3654 (c_parser_for_statement): Likewise.
3656 2015-05-08 Marek Polacek <polacek@redhat.com>
3659 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3660 (output_init_element): Likewise.
3662 2015-05-07 Marek Polacek <polacek@redhat.com>
3665 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3668 2015-04-30 Marek Polacek <polacek@redhat.com>
3670 * c-typeck.c (set_init_label): Call error_at instead of error and
3673 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3676 * c-typeck.c (c_build_va_arg): Clarify the error message.
3678 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3680 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3681 OMP_STANDALONE_CLAUSES.
3683 2015-04-28 Marek Polacek <polacek@redhat.com>
3685 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3687 2015-04-28 Marek Polacek <polacek@redhat.com>
3690 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3692 2015-04-25 Marek Polacek <polacek@redhat.com>
3695 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3698 2015-04-23 Marek Polacek <polacek@redhat.com>
3701 * c-decl.c (set_labels_context_r): New function.
3702 (store_parm_decls): Call it via walk_tree_without_duplicates.
3703 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3704 instead of create_tmp_var. Build TARGET_EXPR instead of
3706 (build_atomic_assign): Use create_tmp_var_raw instead of
3707 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3709 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3711 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3712 (c_parser_omp_target_update): Add missed %> to error_at ().
3714 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3717 * c-decl.c (c_default_pointer_mode): Remove definition.
3718 * c-tree.h (c_default_pointer_mode): Remove declaration.
3720 2015-03-27 Tobias Burnus <burnus@net-b.de>
3723 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3725 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3726 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3727 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3729 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3731 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3732 attribute for DECL_EXTERNAL VAR_DECLs.
3734 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3736 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3739 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3742 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3743 before preparing arguments to warn_logical_not_parentheses.
3745 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3748 * c-typeck.c (parser_build_binary_op): Don't warn for
3749 !!x == y or !b == y where b is _Bool.
3751 2015-03-09 Marek Polacek <polacek@redhat.com>
3753 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3754 * c-decl.c (grokdeclarator): Likewise.
3755 * c-typeck.c (build_binary_op): Likewise.
3757 2015-02-27 Marek Polacek <polacek@redhat.com>
3760 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3762 2015-02-14 Marek Polacek <polacek@redhat.com>
3765 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3766 declared through a typedef name.
3768 2015-02-13 Marek Polacek <polacek@redhat.com>
3771 * c-decl.c (grokdeclarator): Print also the type when giving
3772 the error message about array's incomplete element type.
3774 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3777 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3778 check in the POP macro.
3780 2015-02-09 Marek Polacek <polacek@redhat.com>
3783 * c-typeck.c (process_init_element): Don't always wrap
3784 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3785 initializing a range of elements.
3787 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3791 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3793 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3795 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3796 processing enum declaration.
3798 2015-01-29 Marek Polacek <polacek@redhat.com>
3801 * c-typeck.c (pop_init_level): If constructor_elements has
3802 exactly one element with integer_zerop value, set constructor_zeroinit
3803 to 1. Remove braces around warning_init call.
3805 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3808 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3809 of FUNCTION_DECLs with error_mark_node.
3811 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3814 * c-typeck.c (convert_arguments): Return -1 if there are
3815 error_args, even if we've diagnosed too many arguments.
3817 2015-01-21 Richard Biener <rguenther@suse.de>
3820 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3821 for builtins the user declared correctly.
3823 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3824 Bernd Schmidt <bernds@codesourcery.com>
3825 Cesar Philippidis <cesar@codesourcery.com>
3826 James Norris <jnorris@codesourcery.com>
3827 Jakub Jelinek <jakub@redhat.com>
3828 Ilmir Usmanov <i.usmanov@samsung.com>
3830 * c-parser.c: Include "gomp-constants.h".
3831 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3832 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3833 Use OMP_CLAUSE_SET_MAP_KIND.
3834 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3835 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3836 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3837 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3838 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3839 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3840 "copyout", "create", "delete", "deviceptr", "gang", "host",
3841 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3842 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3843 "present_or_create", "pcreate", "seq", "self", "vector",
3844 "vector_length", "wait", "worker".
3845 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3846 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3847 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3848 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3849 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3850 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3851 (c_parser_oacc_data_clause_deviceptr)
3852 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3853 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3854 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3855 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3856 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3857 (c_parser_oacc_parallel, c_parser_oacc_update)
3858 (c_parser_oacc_wait): New functions.
3859 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3860 (c_finish_oacc_data): New prototypes.
3861 * c-typeck.c: Include "gomp-constants.h".
3862 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3863 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3864 OMP_CLAUSE_SET_MAP_KIND.
3865 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3866 (c_finish_oacc_data): New functions.
3867 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3868 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3869 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3870 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3871 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3872 GOMP_MAP_FORCE_DEVICEPTR.
3874 2015-01-09 Michael Collison <michael.collison@linaro.org>
3876 * c-array-notation.c: Include hash-set.h, machmode.h,
3877 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3878 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3879 * c-aux-info.c: Ditto.
3880 * c-convert.c: Ditto.
3882 * c-errors.c: Ditto.
3883 * c-lang.c: Dittoxs.
3884 * c-objc-common.c: Ditto.
3885 * c-parser.c: Ditto.
3886 * c-typeck.c: Include hash-set.h, machmode.h,
3887 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3888 fold-const.h, wide-int.h, inchash.h, real.h and
3889 fixed-value.h due to flattening of tree.h.
3891 2015-01-07 Marek Polacek <polacek@redhat.com>
3894 * c-typeck.c (process_init_element): Disallow initialization of
3895 a flexible array member with a string constant if the structure
3898 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3901 * c-typeck.c (convert_for_assignment, c_finish_return): For
3902 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3903 types also set in_late_binary_op around convert call.
3904 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3905 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3906 result on expr as last argument to ubsan_instrument_float_cast,
3907 if in_late_binary_op, don't use c_save_expr but save_expr.
3909 Update copyright years.
3911 2015-01-05 Marek Polacek <polacek@redhat.com>
3914 * c-typeck.c (build_array_ref): Pass loc down to
3915 warn_array_subscript_with_type_char.
3917 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3919 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3920 (common-pointer-type): For pointers to arrays take qualifiers from
3922 (build_conditional_expr): Add warnings for lost qualifiers.
3923 (comp-target-types): Allow pointers to arrays with different qualifiers.
3924 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3925 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3926 to PEDWARN_FOR_QUALIFIERS.
3928 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3931 * c-convert.c: Include ubsan.h.
3932 (convert): For real -> integral casts and
3933 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3934 instead instrument the float cast directly.
3936 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3938 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3939 c_finish_stmt_expr): Remove NULL last argument from
3940 create_tmp_var_raw and create_tmp_var calls.
3941 * c-array-notation.c (fix_builtin_array_notation_fn,
3942 build_array_notation_expr, fix_conditional_array_notations_1,
3943 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3945 2014-11-28 Marek Polacek <polacek@redhat.com>
3948 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3949 convert the right operand to integer type.
3951 2014-11-25 Marek Polacek <polacek@redhat.com>
3954 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3955 for inline functions.
3957 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3960 * c-typeck.c (build_array_ref): Adjust
3961 convert_vector_to_pointer_for_subscript caller. If it returns true,
3962 call non_lvalue_loc on the result.
3964 2014-11-11 Richard Biener <rguenther@suse.de>
3966 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3969 2014-11-10 Andi Kleen <ak@linux.intel.com>
3972 * c-parser.c (c_parser_statement_after_labels): Call
3974 (c_parser_if_statement): Dito.
3975 (c_parser_switch_statement): Dito.
3976 (c_parser_while_statement): Dito.
3977 (c_parser_do_statement): Dito.
3978 (c_parser_for_statement): Dito.
3979 * c-typeck.c (c_finish_loop): Dito.
3981 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3983 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3984 OPT_Wshift_count_overflow in the warnings.
3986 2014-10-30 Marek Polacek <polacek@redhat.com>
3988 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3989 print the stripped version as well, if they're not the same.
3991 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3993 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3996 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3998 * c-decl.c: Adjust include files.
3999 * c-parser.c: Ditto.
4001 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4002 Tom Tromey <tromey@redhat.com>
4004 * c-tree.h (enum c_oracle_request): New.
4005 (c_binding_oracle_function): New typedef.
4006 (c_binding_oracle, c_pushtag, c_bind): Declare.
4007 * c-decl.c (c_binding_oracle): New global.
4008 (I_SYMBOL_CHECKED): New macro.
4009 (i_symbol_binding): New function.
4010 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4011 (I_TAG_CHECKED): New macro.
4012 (i_tag_binding): New function.
4013 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4014 (I_LABEL_CHECKED): New macro.
4015 (i_label_binding): New function.
4016 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4017 (c_print_identifier): Save and restore c_binding_oracle.
4018 (c_pushtag, c_bind): New functions.
4020 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4022 * c-typeck.c: Adjust include files.
4024 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4027 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4028 initialization here...
4029 (c_initialize_diagnostics): ... but here. Set defaults after
4030 building pretty-printer.
4032 2014-10-23 Marek Polacek <polacek@redhat.com>
4035 * c-decl.c (pop_scope): Don't print warning in external_scope.
4037 2014-10-19 Marek Polacek <polacek@redhat.com>
4040 * c-typeck.c (output_init_element): Allow initializing objects with
4041 static storage duration with compound literals even in C99 and add
4044 2014-10-17 Marek Polacek <polacek@redhat.com>
4047 * c-typeck.c (digest_init): Allow initializing objects with static
4048 storage duration with compound literals even in C99 and add pedwarn
4051 2014-10-17 Marek Polacek <polacek@redhat.com>
4054 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4055 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4056 error multiple times. Print the type.
4058 2014-10-17 Marek Polacek <polacek@redhat.com>
4061 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4064 2014-10-17 Marek Polacek <polacek@redhat.com>
4066 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4067 (start_function): Use OPT_Wimplicit_int instead of 0.
4068 (store_parm_decls_oldstyle): Likewise.
4070 2014-10-17 Alan Modra <amodra@gmail.com>
4073 * c-decl.c (merge_decls): Don't merge section name or tls model
4074 to newdecl symtab node, instead merge to olddecl. Override
4075 existing olddecl section name. Set tls_model for all thread-local
4076 vars, not just OMP thread-private ones. Remove incorrect comment.
4078 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4080 * c-decl.c: Adjust include files.
4082 2014-10-14 DJ Delorie <dj@redhat.com>
4084 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4085 (c_token_starts_typename): Check all __intN, not just __int128.
4086 (c_token_starts_declspecs): Likewise.
4087 (c_parser_declspecs): Likewise.
4088 (c_parser_attribute_any_word): Likewise.
4089 (c_parser_objc_selector): Likewise.
4090 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4091 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4093 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4095 (finish_declspecs): Likewise.
4097 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4099 * c-parser.c (c_parser_all_labels): New function to replace
4101 (c_parser_statement): Call the new function.
4103 2014-10-09 Marek Polacek <polacek@redhat.com>
4106 * c-typeck.c (pop_init_level): Don't warn about initializing
4109 2014-10-07 Marek Polacek <polacek@redhat.com>
4112 * c-decl.c (header_for_builtin_fn): New function.
4113 (implicitly_declare): Suggest which header to include.
4115 2014-10-07 Marek Polacek <polacek@redhat.com>
4117 * c-convert.c (convert): Use error_operand_p.
4118 * c-typeck.c (require_complete_type): Likewise.
4119 (really_atomic_lvalue): Likewise.
4120 (digest_init): Likewise.
4121 (handle_omp_array_sections_1): Likewise.
4123 2014-10-03 Marek Polacek <polacek@redhat.com>
4126 * c-decl.c (pop_scope): Don't warn about "inline function declared
4127 but never defined" for functions marked with gnu_inline attribute.
4129 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4132 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4133 on low_bound and length.
4135 2014-09-24 Marek Polacek <polacek@redhat.com>
4139 * c-parser.c: Don't define CPP_KEYWORD.
4140 (c_parser_switch_statement): Pass original type to c_finish_case.
4141 * c-tree.h (c_finish_case): Update declaration.
4142 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4143 conditionally to c_do_switch_warnings.
4145 2014-09-03 Marek Polacek <polacek@redhat.com>
4148 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4151 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4152 Balaji V. Iyer <balaji.v.iyer@intel.com>
4153 Igor Zamyatin <igor.zamyatin@intel.com>
4155 * c-parser.c (c_parser_cilk_for): New function.
4156 (c_parser_cilk_grainsize): Likewise.
4157 (c_get_temp_regvar): Likewise.
4158 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4159 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4160 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4161 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4164 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4166 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4167 with using HOST_WIDE_INT without truncation to 'int'
4169 2014-08-22 Marek Polacek <polacek@redhat.com>
4172 * c-typeck.c (parser_build_binary_op): Adjust call to
4173 warn_logical_not_parentheses.
4175 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4178 * c-parser.c (c_parser_array_notation): Check for correct
4179 type of an array added.
4181 2014-08-19 Marek Polacek <polacek@redhat.com>
4184 * c-typeck.c (build_binary_op): If either operand of a comparison
4185 is a boolean expression, call maybe_warn_bool_compare.
4187 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4190 * c-typeck.c (build_c_cast): Do a conversion even when the
4191 TYPE_MAIN_VARIANTs are the same.
4193 2014-08-19 Marek Polacek <polacek@redhat.com>
4195 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4196 pedwarn_c99 instead of pedwarn.
4197 (grokfield): Likewise.
4198 (warn_defaults_to): New function.
4199 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4200 Unconditionally call pedwarn_c99 instead of pedwarn.
4201 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4202 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4203 check flag_isoc11 before.
4204 * c-errors.c (pedwarn_c99): Change the return type to bool.
4205 Handle -Wc99-c11-compat.
4206 * c-parser.c (disable_extension_diagnostics): Handle
4207 warn_c99_c11_compat.
4208 (restore_extension_diagnostics): Likewise.
4209 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4210 instead of pedwarn, don't check flag_isoc11 before.
4211 (c_parser_declspecs): Likewise.
4212 (c_parser_alignas_specifier): Likewise.
4213 (c_parser_alignof_expression): Likewise.
4214 (c_parser_generic_selection): Likewise.
4215 * c-tree.h (pedwarn_c99): Update declaration.
4216 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4219 2014-08-19 Marek Polacek <polacek@redhat.com>
4221 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4223 * c-errors.c: Include "opts.h".
4224 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4225 * c-parser.c (disable_extension_diagnostics): Handle negative value
4226 of warn_c90_c99_compat, too.
4227 (restore_extension_diagnostics): Likewise.
4228 (c_parser_compound_statement_nostart): Pass
4229 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4231 2014-08-12 Marek Polacek <polacek@redhat.com>
4233 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4235 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4237 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4239 2014-08-10 Marek Polacek <polacek@redhat.com>
4242 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4243 Call pedwarn_c90 instead of pedwarn.
4244 (check_bitfield_type_and_width): Likewise.
4245 (declspecs_add_qual): Likewise.
4246 (declspecs_add_type): Likewise.
4247 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4248 Adjust to only call pedwarn_c90.
4249 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4250 pedwarn_c90 instead of pedwarn.
4251 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4252 * c-parser.c (disable_extension_diagnostics): Handle
4253 warn_c90_c99_compat.
4254 (restore_extension_diagnostics): Likewise.
4255 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4256 pedwarn_c90 instead of pedwarn.
4257 (c_parser_initelt): Likewise.
4258 (c_parser_postfix_expression): Likewise.
4259 (c_parser_postfix_expression_after_paren_type): Likewise.
4260 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4261 * c-tree.h: Fix formatting.
4262 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4263 pedwarn_c90 instead of pedwarn.
4265 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4267 * c-typeck.c: Remove include of pointer-set.h.
4269 2014-08-07 Marek Polacek <polacek@redhat.com>
4271 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4273 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4275 * c-typeck.c: Use hash_map instead of pointer_map.
4277 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4279 * c-decl.c: Use hash_set instead of pointer_set.
4281 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4284 * c-array-notation.c (expand_array_notations): Handling
4287 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4290 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4293 2014-07-30 Tom Tromey <tromey@redhat.com>
4295 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4297 (really_start_incremental_init, push_init_level): Initialize
4299 (pop_init_level): Set global designator_depth.
4300 (process_init_element): Check for designated_init attribute.
4302 2014-07-20 Marek Polacek <polacek@redhat.com>
4305 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4306 (implicitly_declare): Pass location to implicit_decl_warning.
4308 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4311 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4312 If non-NULL, call c_parser_check_literal_zero.
4313 (c_parser_check_literal_zero): New function.
4314 (c_parser_postfix_expression_after_primary): Adjust
4315 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4317 2014-07-06 Marek Polacek <polacek@redhat.com>
4320 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4321 * c-tree.h (C_ARRAY_PARAMETER): Define.
4322 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4325 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4326 Chen Gang <gang.chen.5i5j@gmail.com>
4328 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4331 2014-07-01 Marek Polacek <polacek@redhat.com>
4333 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4334 instead of 0 to WARN_FOR_ASSIGNMENT.
4336 2014-07-01 Marek Polacek <polacek@redhat.com>
4339 * c-typeck.c (convert_for_assignment): Pass
4340 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4342 2014-06-30 Marek Polacek <polacek@redhat.com>
4344 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4345 has no_sanitize_undefined attribute.
4347 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4350 * c-array-notation.c (fix_builtin_array_notation_fn):
4351 Check for 0 arguments in builtin call. Check that bultin argument is
4353 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4356 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4358 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4359 qualifiers in __auto_type for atomic types.
4360 (c_parser_typeof_specifier): Discard all type qualifiers in
4361 __typeof__ for atomic types.
4363 2014-06-25 Marek Polacek <polacek@redhat.com>
4366 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4367 the return expression to c_finish_return.
4369 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4371 * c-typeck.c (c_finish_omp_clauses): Make sure
4372 OMP_CLAUSE_LINEAR_STEP has correct type.
4374 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4378 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4380 * c-parser.c (c_parser_omp_for_loop): For
4381 #pragma omp parallel for simd move lastprivate clause from parallel
4382 to for rather than simd.
4384 2014-06-23 Marek Polacek <polacek@redhat.com>
4386 * c-typeck.c (parser_build_binary_op): Don't call
4387 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4389 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4391 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4392 * c-decl.c (merge_decls): Likewise.
4394 2014-06-09 Marek Polacek <polacek@redhat.com>
4397 * c-typeck.c (error_init): Call inform instead of error_at.
4398 (pedwarn_init): Call inform instead of pedwarn.
4399 (warning_init): Call inform instead of warning_at.
4401 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4403 * c-decl.c (merge_decls): Use set_decl_section_name.
4404 (duplicate_decls): Remove node if it exists.
4406 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4409 * c-typeck.c (push_init_level, process_init_element,
4410 pop_init_level): Correct check for zero initialization, move
4411 missing brace warning to respect zero initialization.
4413 2014-06-05 Marek Polacek <polacek@redhat.com>
4416 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4418 2014-06-05 Marek Polacek <polacek@redhat.com>
4421 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4422 on the left hand side operand of a comparison.
4424 2014-06-05 Marek Polacek <polacek@redhat.com>
4427 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4428 Print note only if the warning was printed.
4430 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4433 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4436 2014-06-03 Marek Polacek <polacek@redhat.com>
4439 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4441 * c-tree.h (c_start_case): Update.
4442 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4443 switch condition has boolean value.
4445 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4447 * c-decl.c: Include builtins.h.
4448 * c-parser.c: Likewise.
4450 2014-05-27 Marek Polacek <polacek@redhat.com>
4453 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4454 error and warning calls to error_at and warning_at. Pass location of
4455 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4456 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4457 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4459 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4462 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4463 function parameters.
4465 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4467 * c-decl.c (merge_decls): Preserve symtab node pointers.
4468 (duplicate_decls): Free new decl.
4470 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4472 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4475 * c-parser.c (c_parser_omp_target): Return bool values.
4477 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4479 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4480 num_teams_loc variable to num_thread_limit_loc.
4482 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4484 * c-array-notation.c (expand_array_notations): Use void_node
4485 instead of void_zero_node.
4487 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4489 * c-decl.c (finish_struct): Adjust.
4490 (finish_enum): Likewise.
4492 (record_inline_static): Likewise.
4493 (push_scope): Likewise.
4494 (make_label): Likewise.
4495 (lookup_label_for_goto): Likewise.
4496 (finish_struct): Likewise.
4497 (finish_enum): Likewise.
4498 (store_parm_decls): Likewise.
4499 (c_push_function_context): Likewise.
4500 * c-lang.h: Remove usage of variable_size gty attribute.
4501 * c-parser.c (c_parse_init): Adjust.
4502 (c_parse_file): Likewise.
4504 2014-05-13 Marek Polacek <polacek@redhat.com>
4507 * c-typeck.c (convert_for_assignment): Pass location to
4508 WARN_FOR_ASSIGNMENT instead of input_location.
4510 2014-05-10 Marek Polacek <polacek@redhat.com>
4512 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4513 maybe_warn_string_init.
4514 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4515 maybe_warn_string_init.
4516 * c-tree.h (maybe_warn_string_init): Update declaration.
4517 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4518 Call pedwarn_init with loc instead of with input_location.
4519 (digest_init): Pass init_loc to maybe_warn_string_init.
4520 (pop_init_level): Call pedwarn_init with loc instead of with
4522 (set_init_index): Likewise.
4523 (process_init_element): Likewise.
4525 2014-05-09 Marek Polacek <polacek@redhat.com>
4528 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4529 (c_parser_initelt): Pass location to set_init_label. Pass array index
4530 location to set_init_index.
4531 * c-tree.h (push_init_level): Update declaration.
4532 (pop_init_level): Likewise.
4533 (set_init_index): Likewise.
4534 (set_init_label): Likewise.
4535 * c-typeck.c (error_init): Add location parameter. Call error_at
4537 (digest_init): Pass init_loc to error_init.
4538 (really_start_incremental_init):
4539 (push_init_level): Add location parameter. Pass loc to pop_init_level
4541 (pop_init_level): Likewise.
4542 (set_designator): Add location parameter. Pass loc to pop_init_level,
4543 push_init_level, and error_init.
4544 (set_init_index): Add location parameter. Pass loc to error_init and
4546 (set_init_label): Likewise.
4547 (output_init_element): Pass loc to error_init.
4548 (process_init_element): Pass loc to error_init, pop_init_level,
4549 pedwarn_init, and push_init_level.
4551 2014-05-09 Marek Polacek <polacek@redhat.com>
4554 * c-parser.c (c_parser_attributes): Parse the arguments as an
4555 expression-list if the attribute takes identifier.
4557 2014-05-08 Marek Polacek <polacek@redhat.com>
4560 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4563 2014-05-08 Marek Polacek <polacek@redhat.com>
4566 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4569 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4570 Mike Stump <mikestump@comcast.net>
4571 Richard Sandiford <rdsandiford@googlemail.com>
4573 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4574 (finish_enum): Use wide-int interfaces.
4575 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4576 * c-typeck.c (build_c_cast): Likewise.
4577 (set_nonincremental_init_from_string): Likewise.
4578 (c_tree_equal): Likewise.
4580 2014-05-02 Marek Polacek <polacek@redhat.com>
4583 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4584 Return size_one_node when the type is not complete.
4585 (pointer_diff): Remove comment.
4586 (build_unary_op): Improve error messages.
4588 2014-05-02 Marek Polacek <polacek@redhat.com>
4590 * c-typeck.c (c_finish_return): Separate warning_at calls.
4592 2014-05-02 Marek Polacek <polacek@redhat.com>
4594 * c-tree.h (error_init): Remove declaration.
4595 (pedwarn_init): Likewise.
4596 * c-typeck.c (error_init): Make static and move above.
4597 (pedwarn_init): Likewise.
4598 (warning_init): Move above.
4599 (maybe_warn_string_init): Likewise.
4601 2014-05-01 Jeff Law <law@redhat.com>
4605 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4606 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4609 2014-05-02 Marek Polacek <polacek@redhat.com>
4612 * c-typeck.c (push_init_level): Set constructor_designated to
4613 p->designated for structures.
4615 2014-05-01 Marek Polacek <polacek@redhat.com>
4618 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4619 function-definition has an attribute after the declarator.
4621 2014-05-01 Marek Polacek <polacek@redhat.com>
4624 * c-typeck.c (warning_init): Add location_t parameter. Call
4625 warning_at instead of warning.
4626 (push_init_level): Pass input_location to warning_init.
4627 (add_pending_init): Add location_t parameter. Pass loc to
4629 (set_nonincremental_init): Pass input_location to add_pending_init.
4630 (set_nonincremental_init_from_string): Likewise.
4631 (output_init_element): Pass loc to warning_init and to
4634 2014-05-01 Marek Polacek <polacek@redhat.com>
4637 * c-typeck.c (c_finish_return): Distinguish between label and variable
4638 when warning about returning local address.
4640 2014-05-01 Marek Polacek <polacek@redhat.com>
4643 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4646 2014-05-01 Marek Polacek <polacek@redhat.com>
4649 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4650 instead of 0 to WARN_FOR_QUALIFIERS.
4652 2014-05-01 Marek Polacek <polacek@redhat.com>
4655 * c-typeck.c (default_conversion): Use better location for
4658 2014-04-30 Marek Polacek <polacek@redhat.com>
4660 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4661 also when SANITIZE_FLOAT_DIVIDE is on.
4663 2014-04-30 Marek Polacek <polacek@redhat.com>
4666 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4667 and pedwarn_init. Use loc insted of input_location.
4669 2014-04-30 Marek Polacek <polacek@redhat.com>
4672 * c-typeck.c (build_binary_op): Use location when warning about
4675 2014-04-25 Marek Polacek <polacek@redhat.com>
4678 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4679 always_inline/noinline and hot/cold attributes.
4681 2014-04-25 Marek Polacek <polacek@redhat.com>
4684 * c-parser.c (c_parser_initelt): Pass input_location to
4685 process_init_element.
4686 (c_parser_initval): Pass loc to process_init_element.
4687 * c-tree.h (process_init_element): Adjust declaration.
4688 * c-typeck.c (push_init_level): Pass input_location to
4689 process_init_element.
4690 (pop_init_level): Likewise.
4691 (set_designator): Likewise.
4692 (output_init_element): Add location_t parameter. Pass loc to
4694 (output_pending_init_elements): Pass input_location to
4695 output_init_element.
4696 (process_init_element): Add location_t parameter. Pass loc to
4697 output_init_element.
4699 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4701 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4702 atomic-clause, allow comma in between atomic-clause and
4705 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4708 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4709 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4711 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4714 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4715 create_tmp_var instead build_decl for creating temps.
4716 (build_array_notation_expr): Likewise.
4717 (fix_conditional_array_notations_1): Likewise.
4718 (fix_array_notation_expr): Likewise.
4719 (fix_array_notation_call_expr): Likewise.
4721 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4724 * c-tree.h (c_build_function_call_vec): New prototype.
4725 * c-typeck.c (build_function_call_vec): Don't call
4726 resolve_overloaded_builtin here.
4727 (c_build_function_call_vec): New wrapper function around
4728 build_function_call_vec. Call resolve_overloaded_builtin here.
4729 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4730 Call c_build_function_call_vec instead of build_function_call_vec.
4731 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4732 * c-decl.c (finish_decl): Likewise.
4734 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4737 * c-typeck.c: Use correct format string in cast-qual warning
4739 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4741 * c-decl.c (c_decl_attributes): Use
4742 lang_hooks.types.omp_mappable_type.
4743 * c-typeck.c (c_finish_omp_clauses): Likewise.
4745 2014-03-06 Marek Polacek <polacek@redhat.com>
4748 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4749 of checking tree code.
4751 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4753 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4754 (c_parser_parameter_declaration): Likewise.
4756 2014-02-19 Marek Polacek <polacek@redhat.com>
4759 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4760 Call mark_exp_read on exp.value.
4761 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4762 TREE_ADDRESSABLE on old instead of val.
4763 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4765 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4767 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4768 C_EXPR_APPEND by vec_safe_push.
4769 * c-tree.h (C_EXPR_APPEND): Remove.
4771 2014-01-31 Marek Polacek <polacek@redhat.com>
4774 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4775 build_function_call_vec.
4776 (build_function_call): Likewise.
4777 (build_atomic_assign): Likewise.
4778 (build_function_call_vec): Add arg_loc parameter. Use it.
4779 (convert_arguments): Likewise.
4780 (convert_for_assignment): Rename rhs_loc to expr_loc.
4781 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4782 (c_parser_objc_keywordexpr): Likewise.
4783 (c_parser_postfix_expression_after_primary): Call
4784 build_function_call_vec with expr_loc rather than op_loc.
4785 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4786 build_function_call_vec.
4787 (c_parser_expr_list): Add locations parameter. Fill it with locations
4788 of function arguments.
4789 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4791 2014-01-30 Marek Polacek <polacek@redhat.com>
4794 * c-typeck.c (build_function_call_vec): Use loc parameter.
4795 (convert_arguments): Add location parameter. Use it.
4796 (ep_convert_and_check): Likewise.
4797 (build_atomic_assign): Adjust convert_for_assignment call.
4798 (build_modify_expr): Likewise.
4799 (digest_init): Likewise.
4800 (c_finish_return): Likewise.
4801 (build_conditional_expr): Adjust ep_convert_and_check calls.
4802 (convert_for_assignment): Add rhs_loc parameter. Use it.
4803 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4806 2014-01-30 Richard Biener <rguenther@suse.de>
4809 * c-typeck.c (build_function_call_vec): Do not replace calls
4810 to a function via an incompatible type with a runtime abort.
4812 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4814 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4815 flag_enable_cilkplus with flag_cilkplus.
4816 (c_parser_direct_declarator_inner): Likewise.
4817 (c_parser_attribute_any_word): Likewise.
4818 (c_parser_attributes): Likewise.
4819 (c_parser_compound_statement): Likewise.
4820 (c_parser_statement_after_labels): Likewise.
4821 (c_parser_if_statement): Likewise.
4822 (c_parser_switch_statement): Likewise.
4823 (c_parser_do_statement): Likewise.
4824 (c_parser_for_statement): Likewise.
4825 (c_parser_unary_expression): Likewise.
4826 (c_parser_postfix_expression): Likewise.
4827 (c_parser_postfix_expression_after_primary): Likewise.
4828 (c_parser_postfix_expression_after_primary): Likewise.
4829 (c_parser_omp_clause_name): Likewise.
4830 (c_finish_omp_declare_simd): Likewise.
4831 (c_parser_cilk_verify_simd): Likewise.
4832 * c-typeck.c (build_array_ref): Likewise.
4833 (build_function_call_vec): Likewise.
4834 (convert_arguments): Likewise.
4835 (build_compound_expr): Likewise.
4836 (c_finish_return): Likewise.
4837 (c_finish_if_stmt): Likewise.
4838 (c_finish_loop): Likewise.
4839 (build_binary_op): Likewise.
4841 2014-01-23 Marek Polacek <polacek@redhat.com>
4844 * c-typeck.c (parser_build_binary_op): Use location instead of
4846 (build_binary_op): Pass location to shorten_compare.
4848 2014-01-23 Marek Polacek <polacek@redhat.com>
4851 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4854 2014-01-23 Marek Polacek <polacek@redhat.com>
4857 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4858 of a comma expression.
4859 (emit_side_effect_warnings): Likewise.
4861 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4864 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4865 function to use walk_tree and moved a lot of its functionality to
4866 expand_array_notations.
4867 (expand_array_notations): New function.
4869 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4871 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4872 attribute an attribute without value.
4874 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4877 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4878 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4880 2014-01-22 Marek Polacek <polacek@redhat.com>
4883 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4884 of remove_c_maybe_const_expr on op1 and op2.
4886 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4889 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4890 effects, preevaluate rhs using SAVE_EXPR first.
4892 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4895 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4896 statements with if-elseif statements.
4898 2014-01-06 Marek Polacek <polacek@redhat.com>
4901 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4902 defined bit-field types only in ISO C.
4904 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4906 Update copyright years
4908 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4910 * c-array-notation.c: Use the standard form for the copyright notice.
4912 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4914 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4915 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4916 field in parser is not empty. If not-empty, call the function
4917 c_parser_finish_omp_declare_simd.
4918 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4919 between SIMD-enabled functions and #pragma simd. Added new parameter.
4920 (c_parser_cilk_all_clauses): Modified the usage of the function
4921 c_parser_cilk_clause_vectorlength as mentioned above.
4922 (c_parser_cilk_simd_fn_vector_attrs): New function.
4923 (c_finish_cilk_simd_fn_tokens): Likewise.
4924 (is_cilkplus_vector_p): Likewise.
4925 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4926 "nomask," and "mask" strings in clause name.
4927 (c_parser_omp_all_clauses): Added 3 new case statements:
4928 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4929 PRAGMA_CILK_CLAUSE_NOMASK.
4930 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4931 check for vector attribute and if so call the function
4932 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4933 called the function c_finish_cilk_simd_fn_tokens.
4934 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4935 parser field is non-empty. If so, parse them as you would parse
4936 the omp declare simd pragma.
4937 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4938 Added a check when step is a parameter and flag it as error.
4939 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4940 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4943 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4945 * c-parser.c (c_parser_omp_parallel): Fix description.
4947 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4949 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4950 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4951 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4952 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4954 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4957 * c-parser.c (c_parser_alignas_specifier): Use
4958 c_sizeof_or_alignof_type instead of c_alignof.
4959 (c_parser_alignof_expression): Likewise, with min_alignof
4960 parameter depending on alignof spelling used.
4962 2013-12-04 Marek Polacek <polacek@redhat.com>
4965 * c-decl.c (start_function): Don't warn for missing prototype for
4968 2013-12-03 Marek Polacek <polacek@redhat.com>
4971 * c-decl.c (build_compound_literal): Allow compound literals with
4972 empty initial value.
4974 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4977 * c-typeck.c (build_modify_expr): Diagnose assignment to
4978 expression with array type.
4980 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4983 * c-typeck.c (process_init_element): Do not treat a string as
4984 initializing a whole array when used with a designator for an
4987 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4990 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4991 an inline function following a static declaration.
4993 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4996 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4997 to p_name before calling c_parser_omp_teams instead of after.
4998 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4999 argument. Remove unused p_name variable.
5001 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5002 Jakub Jelinek <jakub@redhat.com>
5004 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5005 external_scope is NULL.
5007 2013-11-27 Tom de Vries <tom@codesourcery.com>
5008 Marc Glisse <marc.glisse@inria.fr>
5011 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5013 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5015 * c-typeck.c: Add required include files from gimple.h.
5017 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5019 * c-decl.c (define_label, shadow_tag_warned)
5020 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5021 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5022 (declspecs_add_type): Remove use of in_system_header macro.
5023 * c-parser.c (c_parser_unary_expression): Likewise.
5024 * c-typeck.c (store_init_value, process_init_element)
5025 (c_start_case): Likewise.
5027 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5030 * c-parser.c (c_parser_set_source_position_from_token): Remove
5031 reference to in_system_header from comment.
5033 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5035 * c-decl.c (grokdeclarator): Update comment to refer to
5036 tree_to_[su]hwi rather than tree_low_cst.
5038 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5040 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5041 tree_to_uhwi throughout.
5043 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5045 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5048 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5050 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5053 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5055 * c-parser.c (c_parser_cilk_simd): New.
5056 (c_parser_cilk_verify_simd): New.
5057 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5058 (c_parser_omp_for_loop): Add case for NE_EXPR.
5059 Set c_break_label for CILK_SIMD.
5060 (c_parser_cilk_clause_vectorlength): New.
5061 (c_parser_cilk_clause_linear): New.
5062 (c_parser_cilk_clause_name): New.
5063 (c_parser_cilk_all_clauses): New.
5064 * c-typeck.c (build_unary_op): Pass location argument to
5066 (build_modify_expr): Same.
5067 (build_asm_expr): Same.
5068 (c_finish_bc_stmt): Error on break/continue in loops.
5070 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5072 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5074 2013-11-14 Diego Novillo <dnovillo@google.com>
5076 * c-decl.c: Include print-tree.h.
5077 Include stor-layout.h.
5080 Include stringpool.h.
5081 * c-lang.c: Include fold-const.h.
5082 * c-parser.c: Include stringpool.h.
5084 Include stor-layout.h.
5086 Include trans-mem.h.
5087 * c-typeck.c: Include stor-layout.h.
5088 Include trans-mem.h.
5092 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5094 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5095 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5097 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5098 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5100 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5101 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5102 (c_parser_declarator, c_parser_direct_declarator_inner)
5103 (c_parser_parameter_declaration, c_parser_type_name): All callers
5105 (c_parser_declaration_or_fndef): Handle declarations with type
5106 determined from the initializer.
5108 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5110 * c-typeck.c: Include gimplify.h.
5112 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5114 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5115 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5117 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5118 or _Thread_local as appropriate in diagnostics.
5119 (build_null_declspecs): Initialize ret->thread_gnu_p.
5120 (declspecs_add_scspec): Handle either __thread or _Thread_local
5121 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5122 pedantic. Do not disallow _Thread_local extern and _Thread_local
5125 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5126 Andrew MacLeod <amacleod@redhat.com>
5128 * c-aux-info.c (gen_type): Handle atomic qualifier.
5129 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5130 qualifiers when compating types.
5131 (shadow_tag_warned): Handle atomic_p in declspecs.
5132 (quals_from_declspecs): Likewise.
5133 (start_decl): Use c_type_promotes_to when promoting argument
5135 (grokdeclarator): Handle _Atomic.
5136 (get_parm_info): Diagnose any qualifier on "void" as only
5138 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5139 comparing types. Use c_type_promotes_to when promoting argument
5141 (finish_function): Use c_type_promotes_to when promoting argument
5143 (build_null_declspecs): Handle atomic_p in declspecs.
5144 (declspecs_add_qual): Handle RID_ATOMIC.
5145 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5146 (c_token_starts_declspecs): Handle RID_ATOMIC.
5147 (c_parser_declspecs): Handle atomic type specifiers and
5149 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5150 from types of expressions with atomic type.
5151 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5152 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5153 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5154 (c_parser_statement_after_labels, c_parser_switch_statement)
5155 (c_parser_for_statement, c_parser_expr_no_commas)
5156 (c_parser_conditional_expression, c_parser_binary_expression)
5157 (c_parser_cast_expression, c_parser_unary_expression)
5158 (c_parser_postfix_expression)
5159 (c_parser_postfix_expression_after_primary, c_parser_expression):
5160 Use convert_lvalue_to_rvalue.
5161 (c_parser_expression_conv, c_parser_expr_list): Document
5162 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5163 (c_parser_objc_synchronized_statement): Use
5164 convert_lvalue_to_rvalue.
5165 (c_parser_objc_selector): Handle RID_ATOMIC.
5166 (c_parser_objc_receiver, c_parser_array_notation): Use
5167 convert_lvalue_to_rvalue.
5168 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5169 _Atomic (type-name).
5170 (struct c_declspecs): Add atomic_p field.
5171 (convert_lvalue_to_rvalue): Declare.
5172 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5173 corresponding atomic types.
5174 (qualify_type): Don't add _Atomic qualifiers from second argument.
5175 (comp_target_types): Do not allow _Atomic mismatches.
5176 (type_lists_compatible_p): Do not remove atomic qualifiers when
5178 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5179 (build_atomic_assign): New functions.
5180 (build_unary_op): Use build_atomic_assign for atomic increment and
5182 (build_conditional_expr): Do not treat _Atomic void as a qualified
5184 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5185 (find_anonymous_field_with_type, convert_to_anonymous_field)
5186 (convert_for_assignment): Do not remove atomic qualifiers when
5188 (digest_init): Do not accept initialization of arrays of atomic
5189 elements by string constants.
5190 (build_asm_expr): Use convert_lvalue_to_rvalue.
5191 (build_binary_op): Do not treat _Atomic void as a qualified
5194 2013-11-06 DJ Delorie <dj@redhat.com>
5196 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5197 both explicit and builtin, print the location of the explicit one.
5199 2013-11-05 Tobias Burnus <burnus@net-b.de>
5201 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5202 c_parser_omp_distribute, c_parser_omp_teams,
5203 c_parser_omp_target, c_parser_omp_declare): Handle
5206 2013-11-03 Marek Polacek <polacek@redhat.com>
5208 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5210 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5212 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5213 check_dup_generic at the end, unless remove is true.
5214 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5216 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5218 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5220 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5221 with decl that is not pointer nor array.
5223 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5225 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5226 a spawning function is found.
5227 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5228 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5229 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5230 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5232 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5233 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5235 (c_finish_return): Added a check to reject _Cilk_spawn in return
5237 (build_cilk_spawn): New function.
5238 (build_cilk_sync): Likewise.
5239 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5241 2013-10-27 Tobias Burnus <burnus@net-b.de>
5244 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5245 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5246 (c_parser_statement_after_labels): Update calls.
5248 2013-10-24 Tobias Burnus <burnus@net-b.de>
5251 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5252 Handle PRAGMA_IVDEP.
5253 (c_parser_statement_after_labels): Update call.
5255 2013-10-24 Marek Polacek <polacek@redhat.com>
5257 * c-parser.c (c_parser_struct_declaration): Add a comment.
5258 (c_parser_declarator): Don't allow _Alignas here.
5260 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5262 * c-parser.c: Include omp-low.h.
5263 * c-typeck.c: Likewise.
5265 2013-10-17 Marek Polacek <polacek@redhat.com>
5268 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5269 Document syntax of the array-declarator.
5270 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5272 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5273 (c_parser_struct_declaration): Likewise.
5274 (c_parser_declarator): Likewise.
5275 (c_parser_direct_declarator_inner): Likewise.
5276 (c_parser_parameter_declaration): Likewise.
5277 (c_parser_type_name): Likewise.
5279 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5281 * c-lang.h (current_omp_declare_target_attribute): New extern
5283 * c-parser.c: Include c-lang.h.
5284 (struct c_parser): Change tokens to c_token *.
5285 Add tokens_buf field. Change tokens_avail type to unsigned int.
5286 (c_parser_consume_token): If parser->tokens isn't
5287 &parser->tokens_buf[0], increment parser->tokens.
5288 (c_parser_consume_pragma): Likewise.
5289 (enum pragma_context): Add pragma_struct and pragma_param.
5290 (c_parser_external_declaration): Adjust
5291 c_parser_declaration_or_fndef caller.
5292 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5293 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5294 Adjust recursive call.
5295 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5297 (c_parser_parameter_declaration): Use pragma_param instead of
5299 (c_parser_compound_statement_nostart, c_parser_label,
5300 c_parser_for_statement): Adjust
5301 c_parser_declaration_or_fndef callers.
5302 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5303 it through to c_parser_conditional_expression.
5304 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5305 pass it through to c_parser_binary_expression. Adjust recursive
5307 (c_parser_binary_expression): Remove prec argument, add
5308 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5309 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5310 binop matches it, use build2 instead of parser_build_binary_op.
5311 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5312 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5313 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5314 Handle pragma_struct and pragma_param the same as pragma_external.
5315 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5316 (c_parser_omp_variable_list): Parse array sections for
5317 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5318 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5319 (c_parser_omp_clause_reduction): Handle user defined reductions.
5320 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5321 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5322 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5323 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5324 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5325 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5326 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5327 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5328 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5329 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5330 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5331 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5332 (c_parser_omp_for_loop): Add CODE argument, pass it through
5333 to c_finish_omp_for. Change last argument to cclauses,
5334 and adjust uses to grab parallel clauses from the array of all
5335 the split clauses. Adjust c_parser_binary_expression,
5336 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5337 (omp_split_clauses): New function.
5338 (c_parser_omp_simd): New function.
5339 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5340 Allow the function to be called also when parsing combined constructs,
5341 and call c_parser_omp_simd when parsing for simd.
5342 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5343 #pragma omp section, require exactly one structured-block instead of
5344 sequence of statements.
5345 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5346 Allow the function to be called also when parsing combined constructs.
5347 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5348 Allow the function to be called also when parsing combined
5350 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5351 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5352 c_parser_omp_teams, c_parser_omp_target_data,
5353 c_parser_omp_target_update, c_parser_omp_target,
5354 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5355 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5356 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5357 (c_parser_omp_construct): Add p_name and mask vars. Handle
5358 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5359 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5360 and c_parser_omp_sections callers.
5361 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5362 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5363 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5364 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5365 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5367 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5368 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5369 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5370 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5371 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5372 * c-typeck.c: Include tree-inline.h.
5373 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5374 handle_omp_array_sections_1, handle_omp_array_sections,
5375 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5376 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5377 user defined reductions.
5378 (c_tree_equal): New function.
5379 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5380 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5381 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5382 c_check_omp_declare_reduction_r): New prototypes.
5383 * c-decl.c (current_omp_declare_target_attribute): New variable.
5384 (c_decl_attributes): New function.
5385 (start_decl, start_function): Use it instead of decl_attributes.
5386 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5387 c_omp_reduction_decl, c_omp_reduction_lookup,
5388 c_check_omp_declare_reduction_r): New functions.
5390 2013-09-25 Tom Tromey <tromey@redhat.com>
5392 * Make-lang.in (c/gccspec.o): Remove.
5393 (CFLAGS-c/gccspec.o): New variable.
5394 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5395 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5396 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5398 2013-09-25 Tom Tromey <tromey@redhat.com>
5400 * Make-lang.in (c/gccspec.o): Don't use subshell.
5402 2013-09-18 Marek Polacek <polacek@redhat.com>
5405 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5406 Remove unnecessary check.
5408 2013-09-18 Marek Polacek <polacek@redhat.com>
5411 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5412 no_sanitize_undefined attribute.
5414 2013-09-13 Kai Tietz <ktietz@redhat.com>
5417 * c-decl.c (c_builtin_function_ext_scope): Remove
5418 wrong assumption that it is never called on prexisting
5421 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5423 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5425 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5427 * c-objc-common.c (c_tree_printer): Tidy.
5429 2013-08-30 Marek Polacek <polacek@redhat.com>
5431 * c-typeck.c (build_binary_op): Add division by zero and shift
5434 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5435 Joseph Myers <joseph@codesourcery.com>
5438 * c-typeck.c (c_common_type): Prefer double_type_node over
5439 other REAL_TYPE types with the same precision.
5440 (convert_arguments): Likewise.
5442 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5444 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5445 (c_initialize_diagnostics): Call a destructor for the early printer.
5447 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5449 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5450 printer initialization.
5452 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5455 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5456 check for truth values.
5457 (expand_array_notation_exprs): Added truth values case. Removed an
5458 unwanted else. Added for-loop to walk through subtrees in default
5461 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5463 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5465 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5467 * c-parser.c (struct c_generic_association): Fix typo.
5469 2013-07-23 Tom Tromey <tromey@redhat.com>
5470 Joseph Myers <joseph@codesourcery.com>
5472 * c-parser.c (struct c_generic_association): New.
5473 (c_generic_association_d): New typedef.
5474 (c_parser_generic_selection): New function.
5475 (c_parser_postfix_expression): Handle RID_GENERIC.
5477 2013-07-13 Jason Merrill <jason@redhat.com>
5480 * c-decl.c (finish_struct): Check for too-large class.
5482 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5485 * c-typeck.c (set_init_index): When folding, check for index overflow.
5487 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5489 * c-parser.c (c_parser_array_notation): Removed rejection of array
5490 notations in an array of function pointers.
5492 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5494 * c-array-notation.c (make_triplet_val_inv): New function.
5495 (create_cmp_incr): Likewise.
5496 (create_array_refs): Likewise.
5497 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5498 Also modularized common parts between functions and called the function.
5499 (build_array_notation_expr): Likewise.
5500 (fix_conditional_array_notations_1): Likewise.
5501 (fix_array_notation_expr): Likewise.
5502 (fix_array_notation_call_expr): Likewise.
5504 2013-06-18 Marek Polacek <polacek@redhat.com>
5507 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5509 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5511 * c-array-notation.c (build_array_notation_expr): Reject array notation
5512 mismatch between LHS and RHS even inside a call_expr. Also, removed
5513 a couple while statements that were dead code.
5515 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5517 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5518 excessive precision expressions in function parameters. Also removed
5519 couple unwanted while statements.
5521 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5523 * c-array-notation.c (expand_array_notation_exprs): Added
5524 ARRAY_NOTATION_REF case.
5526 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5528 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5529 function to c-family/array-notation-common.c.
5530 (is_cilkplus_reduce_builtin): Likewise.
5531 (find_rank): Likewise.
5532 (extract_array_notation_exprs): Likewise.
5533 (replace_array_notations): Likewise.
5534 (find_inv_trees): Likewise.
5535 (replace_inv_trees): Likewise.
5536 (contains_array_notation_expr): Likewise.
5537 (find_correct_array_notation_type): Likewise.
5538 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5539 (struct inv_list): Moved this to c-family/array-notation-common.c.
5540 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5542 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5544 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5545 reduction functions outside the for-loop. Added a check if the fundecl
5546 is non-NULL. Finally, removed an unwanted if-statement, and made the
5549 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5551 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5552 condition of the if-statement matches the rank of else-block and then-
5553 block when array notations are used.
5554 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5555 expression after the entire function body is parsed.
5556 (c_parser_expr_no_commas): Delayed creating array notation expressions
5557 to the end of function parsing.
5558 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5559 whole if-statement instead of just the condition.
5560 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5562 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5565 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5566 array to NULL_TREE if they are unused. Also added a check for the
5567 field to be NULL before its fields are used in future.
5569 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5572 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5573 (build_array_notation_expr): Likewise.
5575 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5577 * c-typeck.c (build_array_ref): Added a check to see if array's
5578 index is greater than one. If true, then emit an error.
5579 (build_function_call_vec): Exclude error reporting and checking
5580 for builtin array-notation functions.
5581 (convert_arguments): Likewise.
5582 (c_finish_return): Added a check for array notations as a return
5583 expression. If true, then emit an error.
5584 (c_finish_loop): Added a check for array notations in a loop
5585 condition. If true then emit an error.
5586 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5587 (build_binary_op): Added a check for array notation expr inside
5588 op1 and op0. If present, we call another function to find correct
5590 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5591 * c-parser.c (c_parser_compound_statement): Check if array
5592 notation code is used in tree, if so, then transform them into
5594 (c_parser_expr_no_commas): Check if array notation is used in LHS
5595 or RHS, if so, then build array notation expression instead of
5597 (c_parser_postfix_expression_after_primary): Added a check for
5598 colon(s) after square braces, if so then handle it like an array
5599 notation. Also, break up array notations in unary op if found.
5600 (c_parser_direct_declarator_inner): Added a check for array
5602 (c_parser_compound_statement): Added a check for array notation in
5603 a stmt. If one is present, then expand array notation expr.
5604 (c_parser_if_statement): Likewise.
5605 (c_parser_switch_statement): Added a check for array notations in
5606 a switch statement's condition. If true, then output an error.
5607 (c_parser_while_statement): Similarly, but for a while.
5608 (c_parser_do_statement): Similarly, but for a do-while.
5609 (c_parser_for_statement): Similarly, but for a for-loop.
5610 (c_parser_unary_expression): Check if array notation is used in a
5611 pre-increment or pre-decrement expression. If true, then expand
5613 (c_parser_array_notation): New function.
5614 * c-array-notation.c: New file.
5615 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5617 2013-05-23 Mike Stump <mikestump@comcast.net>
5619 * c-typeck.c (convert_for_assignment): Handle references to memory
5622 2013-05-16 Jason Merrill <jason@redhat.com>
5624 * Make-lang.in (cc1$(exeext)): Use link mutex.
5626 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5628 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5629 to simply use OPT_Wpointer_arith.
5630 (build_unary_op): Likewise.
5632 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5635 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5636 argument. If set, or it temporarily for parsing of the first
5637 argument into force_folding_builtin_constant_p.
5638 (c_parser_postfix_expression): Adjust callers.
5640 2013-03-21 Richard Biener <rguenther@suse.de>
5642 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5643 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5645 2013-02-12 Marek Polacek <polacek@redhat.com>
5648 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5651 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5654 * c-typeck.c (set_nonincremental_init_from_string): If
5655 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5657 (process_init_element): Likewise.
5659 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5662 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5663 argument, don't call default_function_array_conversion
5664 nor c_fully_fold here.
5665 (c_parser_asm_statement): Adjust callers.
5666 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5667 and outputs here, and call default_function_array_conversion
5668 on inputs that don't need to be addressable.
5670 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5673 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5674 warning require that both c_common_unsigned_type as well as
5675 c_common_signed_type is the same for both mvl and mvr types.
5677 2012-11-16 Diego Novillo <dnovillo@google.com>
5679 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5681 * c-common.c: Use new vec API in vec.h.
5682 * c-common.h: Likewise.
5683 * c-gimplify.c: Likewise.
5684 * c-pragma.c: Likewise.
5685 * c-pretty-print.c: Likewise.
5686 * c-pretty-print.h: Likewise.
5687 * c-semantics.c: Likewise.
5688 * c-decl.c: Likewise.
5689 * c-parser.c: Likewise.
5690 * c-tree.h: Likewise.
5691 * c-typeck.c: Likewise.
5693 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5696 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5698 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5701 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5702 shadows a function, unless the variable is a function or a
5703 pointer-to-function.
5705 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5708 * c-parser.c (struct c_tree_loc_pair): Removed.
5709 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5710 add location_t * and tree * arguments, fill in array of 3
5711 sizeof_arg trees and corresponding locs.
5712 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5713 c_parser_expr_list callers.
5714 (c_parser_postfix_expression_after_primary): Likewise. Pass
5715 array of 3 sizeof_arg trees and locs (corresponding to first
5716 3 arguments) to sizeof_pointer_memaccess_warning.
5718 2012-10-09 Lawrence Crowl <crowl@google.com>
5720 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5721 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5724 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5727 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5730 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5733 * c-typeck.c: Include c-common.h.
5734 (enum stv_conv): Moved to c-common.h.
5735 (scalar_to_vector): Moved to c-common.c.
5736 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5737 * Make-lang.in: c-typeck.c depends on c-common.h.
5739 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5741 * c-decl.c (c_write_global_declarations): Fix handling of
5744 2012-09-30 Sharad Singhai <singhai@google.com>
5746 * c-decl.c (c_write_global_declarations): Use a different method
5747 to determine if the dump has ben initialized.
5749 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5752 * c-typeck.c (c_cast_expr): When casting to a type requiring
5753 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5756 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5759 * c-typeck.c (build_unary_op): Pass original argument of
5760 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5761 any C_MAYBE_CONST_EXPR, if it has integer operands.
5762 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5763 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5764 to c_objc_common_truthvalue_conversion, then remove any
5765 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5766 c_objc_common_truthvalue_conversion not
5767 c_common_truthvalue_conversion.
5768 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5769 call note_integer_operands for arguments with integer operands
5770 that are not integer constants.
5772 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5775 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5776 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5778 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5781 * c-convert.c (convert): Don't call fold_convert_loc if
5782 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5783 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5784 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5786 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5789 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5790 for nested and empty_ok arguments in the call to
5791 c_parser_declaration_or_fndef.
5793 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5795 * c-tree.h (c_last_sizeof_arg): Declare.
5796 * c-parser.c (struct c_tree_loc_pair): New type.
5797 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5799 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5800 (c_parser_postfix_expression_after_primary): Likewise. Call
5801 sizeof_pointer_memaccess_warning if needed.
5802 (sizeof_ptr_memacc_comptypes): New function.
5803 * c-typeck.c (c_last_sizeof_arg): New global variable.
5804 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5806 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5808 * c-lang.h (lang_decl): Add variable_size GTY option.
5810 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5812 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5813 * Make-lang.in: Fix dependencies.
5815 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5817 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5818 and add language Makefile hooks.
5819 * config-lang.in: New file.
5820 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5821 add the required "normal" config-lang.in rules.
5822 * c-lang.h: Moved from gcc/ to here.
5823 * c-tree.h: Likewise.
5824 * c-objc-common.c: Likewise.
5825 * c-objc-common.h: Likewise.
5826 * c-typeck.c: Likewise.
5827 * c-convert.c: Likewise.
5828 * c-lang.c: Likewise.
5829 * c-aux-info.c: Likewise.
5830 * c-errors.c: Likewise.
5831 * gccspec.c: Likewise.
5832 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5833 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5835 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5837 Copying and distribution of this file, with or without modification,
5838 are permitted in any medium without royalty provided the copyright
5839 notice and this notice are preserved.