1 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
7 2018-01-13 Jakub Jelinek <jakub@redhat.com>
10 * c-tree.h (decl_constant_value_1): Add a bool argument.
11 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
12 returning a CONSTRUCTOR if it is true. Use error_operand_p.
13 (decl_constant_value): Adjust caller.
14 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
15 decl_constant_value_1 as IN_INIT. Otherwise, punt if
16 decl_constant_value returns initializer that has BLKmode or
18 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
20 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21 Alan Hayward <alan.hayward@arm.com>
22 David Sherwood <david.sherwood@arm.com>
24 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
27 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29 Update copyright years.
31 2018-01-01 Jakub Jelinek <jakub@redhat.com>
34 * c-parser.c (c_parser_braced_init, c_parser_initelt,
35 c_parser_conditional_expression, c_parser_cast_expression,
36 c_parser_sizeof_expression, c_parser_alignof_expression,
37 c_parser_postfix_expression, c_parser_omp_declare_reduction,
38 c_parser_transaction_expression): Use set_error () method instead
39 of setting value member to error_mark_node.
41 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
43 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
44 and _Float<N>X built-in functions.
46 2017-12-22 Jakub Jelinek <jakub@redhat.com>
49 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
50 TYPE_STUB_DECL and call rest_of_type_compilation before processing
51 incomplete vars rather than after it.
54 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
55 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
56 and consider empty ones if there are no other stmts. For
57 -Wunused-value walk all statements before the one only followed by
60 2017-12-22 Mike Stump <mikestump@comcast.net>
61 Eric Botcazou <ebotcazou@adacore.com>
63 * c-parser.c (c_parser_while_statement): Add unroll parameter and
64 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
65 (c_parser_do_statement): Likewise.
66 (c_parser_for_statement): Likewise.
67 (c_parser_statement_after_labels): Adjust calls to above.
68 (c_parse_pragma_ivdep): New static function.
69 (c_parser_pragma_unroll): Likewise.
70 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
71 <PRAGMA_UNROLL>: New case.
73 2017-12-19 Jakub Jelinek <jakub@redhat.com>
75 * c-typeck.c (comptypes_internal, function_types_compatible_p,
76 perform_integral_promotions, digest_init): Replace Yoda conditions
77 with typical order conditions.
78 * c-decl.c (check_bitfield_type_and_width): Likewise.
80 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
82 * c-typeck.c (c_safe_arg_type_equiv_p,
83 c_safe_function_type_cast_p): New function.
84 (build_c_cast): Implement -Wcast-function-type.
86 2017-12-14 Richard Biener <rguenther@suse.de>
89 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
90 like REALPART_EXPR for the behavior of whether its operand
93 2017-12-12 Marek Polacek <polacek@redhat.com>
96 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
98 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
100 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
101 * c-parser.c (add_debug_begin_stmt): New.
102 (c_parser_declaration_or_fndef): Call it.
103 (c_parser_compound_statement_nostart): Likewise.
104 (c_parser_statement_after_labels): Likewise.
105 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
107 2017-12-07 Joseph Myers <joseph@codesourcery.com>
109 * c-decl.c (build_compound_literal): Add parameter alignas_align
110 and set alignment of decl if nonzero.
111 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
112 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
114 (c_parser_struct_declaration): Update syntax comment.
115 (c_parser_type_name): Add alignas_ok argument and pass it to
117 (c_parser_cast_expression): Pass true to c_parser_type_name and
118 give error if a cast used an _Alignas specifier.
119 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
120 give error if sizeof (type-name) used an _Alignas specifier.
121 (c_parser_alignof_expression): Pass true to c_parser_type_name and
122 give error if _Alignof (type-name) used an _Alignas specifier.
123 (c_parser_postfix_expression_after_paren_type): Check specified
124 alignment for a compound literal and pass it to
125 build_compound_literal.
126 * c-parser.h (c_parser_type_name): Update prototype.
127 * c-tree.h (build_compound_literal): Update prototype.
129 2017-12-07 Martin Sebor <msebor@redhat.com>
132 * c-decl.c (c_decl_attributes): Look up existing declaration and
133 pass it to decl_attributes.
135 2017-12-06 David Malcolm <dmalcolm@redhat.com>
138 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
139 reserved for use by the implementation.
141 2017-12-06 David Malcolm <dmalcolm@redhat.com>
143 * c-decl.c: Include "c-family/c-spellcheck.h".
145 2017-12-05 Martin Liska <mliska@suse.cz>
146 Jakub Jelinek <jakub@redhat.com>
148 * c-typeck.c (pointer_diff): Add new argument and instrument
150 (build_binary_op): Similar for pointer comparison.
152 2017-12-01 Jakub Jelinek <jakub@redhat.com>
155 * c-parser.c: Include tree-iterator.h.
156 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
157 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
161 * c-tree.h (decl_constant_value_1): Declare.
162 * c-typeck.c (decl_constant_value_1): New function.
163 (decl_constant_value): Use it.
164 * c-fold.c (c_fully_fold_internal): If in_init, use
165 decl_constant_value_1 instead of decl_constant_value.
167 2017-11-30 Jakub Jelinek <jakub@redhat.com>
169 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
171 2017-11-28 Jakub Jelinek <jakub@redhat.com>
174 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
175 c_switch_covers_all_cases_p returns true.
177 2017-11-28 Julia Koval <julia.koval@intel.com>
178 Sebastian Peryt <sebastian.peryt@intel.com>
180 * Make-lang.in (c/c-array-notation.o): Remove.
181 * c-array-notation.c: Delete.
182 * c-decl.c: Remove cilkplus condition.
183 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
184 c_parser_cilk_verify_simd, c_parser_array_notation,
185 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
186 c_parser_cilk_simd_fn_vector_attrs,
187 c_finish_cilk_simd_fn_tokens): Delete.
188 (c_parser_declaration_or_fndef): Remove cilkplus condition.
189 (c_parser_direct_declarator_inner): Ditto.
190 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
191 (c_parser_attributes, c_parser_compound_statement,
192 c_parser_statement_after_labels, c_parser_if_statement,
193 c_parser_switch_statement, c_parser_while_statement,
194 c_parser_do_statement, c_parser_for_statement,
195 c_parser_unary_expression, c_parser_postfix_expression,
196 c_parser_postfix_expression_after_primary,
197 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
198 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
200 * c-typeck.c (build_array_ref, build_function_call_vec,
202 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
203 c_finish_loop, build_binary_op): Remove cilkplus support.
205 2017-11-28 Jakub Jelinek <jakub@redhat.com>
207 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
210 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
212 * Make-lang.in (c.install-plugin): Install backend import library.
214 2017-11-23 Jakub Jelinek <jakub@redhat.com>
216 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
219 2017-11-23 Mike Stump <mikestump@comcast.net>
220 Eric Botcazou <ebotcazou@adacore.com>
222 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
224 (c_parser_do_statement): Likewise.
225 (c_parser_for_statement): Likewise.
227 2017-11-22 David Malcolm <dmalcolm@redhat.com>
230 * c-objc-common.c (c_tree_printer): Convert penultimate param from
231 bool to bool *. Within '%T' handling, if showing an "aka", use
232 "quoted" param to add appropriate quoting.
234 2017-11-22 Marek Polacek <polacek@redhat.com>
239 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
241 2017-11-21 David Malcolm <dmalcolm@redhat.com>
244 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
245 earlier failed lookups.
247 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
249 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
250 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
252 2017-11-20 David Malcolm <dmalcolm@redhat.com>
255 * c-decl.c: Include "c-family/known-headers.h".
256 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
258 (class suggest_missing_header): Move to known-header.h.
259 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
260 than get_c_name_hint.
262 2017-11-20 David Malcolm <dmalcolm@redhat.com>
264 * c-decl.c (get_c_name_hint): New function.
265 (class suggest_missing_header): New class.
266 (lookup_name_fuzzy): Call get_c_name_hint and use it to
267 suggest missing headers to the user.
269 2017-11-20 David Malcolm <dmalcolm@redhat.com>
271 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
272 Include "c-family/name-hint.h"
273 (implicit_decl_warning): Convert "hint" from
274 const char * to name_hint. Pass location to
275 lookup_name_fuzzy. Suppress any deferred diagnostic if the
276 warning was not printed.
277 (undeclared_variable): Likewise for "guessed_id".
278 (lookup_name_fuzzy): Convert return type from const char *
279 to name_hint. Add location_t param.
280 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
281 Include "c-family/name-hint.h"
282 (c_parser_declaration_or_fndef): Convert "hint" from
283 const char * to name_hint. Pass location to lookup_name_fuzzy.
284 (c_parser_parameter_declaration): Likewise.
286 2017-11-19 Jakub Jelinek <jakub@redhat.com>
290 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
292 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
293 handle_omp_array_sections): Likewise.
294 (digest_init): Don't call decl_constant_value_for_optimization.
295 * c-tree.h (decl_constant_value_for_optimization): Removed.
296 * c-fold.c (c_fold_array_ref): New function.
297 (c_fully_fold_internal): Add LVAL argument, propagate it through
298 recursive calls. For VAR_P call decl_constant_value and
299 unshare if not LVAL and either optimizing or IN_INIT. Remove
300 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
301 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
302 (c_fully_fold): Add LVAL argument, pass it through to
303 c_fully_fold_internal.
304 (decl_constant_value_for_optimization): Removed.
306 2017-11-15 Joseph Myers <joseph@codesourcery.com>
309 * c-parser.c (check_tgmath_function): New function.
310 (enum tgmath_parm_kind): New enum.
311 (c_parser_postfix_expression): Handle __builtin_tgmath.
313 2017-10-31 David Malcolm <dmalcolm@redhat.com>
315 * c-decl.c (implicit_decl_warning): Update for renaming of
316 pedwarn_at_rich_loc and warning_at_rich_loc.
317 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
318 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
319 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
320 (c_parser_struct_or_union_specifier): Likewise for renaming of
322 (c_parser_parameter_declaration): Likewise for renaming of
324 * c-typeck.c (build_component_ref): Likewise.
325 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
326 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
327 (set_init_label): Likewise for renaming of error_at_rich_loc.
329 2017-10-30 Richard Biener <rguenther@suse.de>
331 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
334 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
336 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
337 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
339 2017-10-25 David Malcolm <dmalcolm@redhat.com>
342 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
345 2017-10-25 Jakub Jelinek <jakub@redhat.com>
348 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
349 newdecl to corresponding __builtin_ if any.
351 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
354 * c-decl.c (diagnose_mismatched_decls): Use
355 OPT_Wbuiltin_declaration_mismatch.
357 2017-10-12 David Malcolm <dmalcolm@redhat.com>
359 * c-parser.c (c_parser_require): Add "type_is_unique" param and
360 use it to guard calls to maybe_suggest_missing_token_insertion.
361 (c_parser_parms_list_declarator): Override default value of new
362 "type_is_unique" param to c_parser_require.
363 (c_parser_asm_statement): Likewise.
364 * c-parser.h (c_parser_require): Add "type_is_unique" param,
367 2017-10-11 Nathan Sidwell <nathan@acm.org>
369 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
371 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
373 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
374 operating on trees as wide_ints.
375 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
376 (c_tree_equal): Likewise.
378 2017-10-04 David Malcolm <dmalcolm@redhat.com>
380 * c-decl.c (push_parm_decl): Store c_parm's location into the
382 (build_c_parm): Add "loc" param and store it within the c_parm.
383 * c-parser.c (struct c_parser): Add "last_token_location" field.
384 (c_parser_consume_token): Store location of the token into the
386 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
387 when handling a FUNCTION_DECL, if it doesn't already have them.
388 (c_parser_parameter_declaration): Generate a location for the
389 parameter, and pass it to the call to build_c_parm.
390 * c-tree.h (struct c_parm): Add field "loc".
391 (build_c_parm): Add location_t param.
392 * c-typeck.c (get_fndecl_argument_location): New function.
393 (inform_for_arg): New function.
394 (convert_for_assignment): Use inform_for_arg when dealing with
397 2017-09-29 Jakub Jelinek <jakub@redhat.com>
399 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
401 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
402 don't SET_DECL_C_BIT_FIELD here.
405 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
406 instead of trying to set just TREE_READONLY manually.
408 2017-09-16 Tom de Vries <tom@codesourcery.com>
411 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
414 2017-09-15 Joseph Myers <joseph@codesourcery.com>
417 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
419 (build_conditional_expr): For C11, generate result with excess
420 precision when one argument is an integer and the other is of a
421 type using excess precision.
423 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
425 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
427 2017-09-13 Marek Polacek <polacek@redhat.com>
430 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
431 than expr.original_type.
433 2017-09-12 Nathan Sidwell <nathan@acm.org>
435 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
436 resort_sorted_fields): Moved from c-family/c-common.c.
437 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
439 2017-09-01 Joseph Myers <joseph@codesourcery.com>
442 * c-typeck.c (build_atomic_assign): Handle argument with excess
443 precision. Ensure any EXCESS_PRECISION_EXPR is present in
444 argument passed to build_binary_op and convert_for_assignment but
445 not for call to c_fully_fold.
446 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
447 Ensure build_binary_op is called with argument with original
448 semantic type. Avoid calling c_fully_fold with an
449 EXCESS_PRECISION_EXPR from build_binary_op.
451 2017-09-01 Jakub Jelinek <jakub@redhat.com>
454 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
456 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
457 Alan Hayward <alan.hayward@arm.com>
458 David Sherwood <david.sherwood@arm.com>
460 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
461 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
462 m1 and m2 to the signed equivalent of a fixed-point
465 2017-08-24 David Malcolm <dmalcolm@redhat.com>
467 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
468 than CAN_HAVE_LOCATION_P when determining whether to use the
469 location_t value within "value".
471 2017-08-21 David Malcolm <dmalcolm@redhat.com>
473 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
474 rather than peeking the location of the first token.
475 * c-tree.h (c_expr::get_location): New method.
477 2017-08-21 David Malcolm <dmalcolm@redhat.com>
479 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
480 to check_function_arguments.
482 2017-08-18 Marek Polacek <polacek@redhat.com>
484 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
487 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
490 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
491 (check_bitfield_type_and_width): Don't allow bit-field with
492 warn_if_not_aligned type.
494 2017-08-14 Martin Sebor <msebor@redhat.com>
497 * c-objc-common.c (c_objc_common_init): Handle 'G'.
499 2017-08-11 Marek Polacek <polacek@redhat.com>
502 * c-decl.c (pushtag): Only print inform if the warning was printed.
503 (grokdeclarator): Likewise.
505 2017-08-10 David Malcolm <dmalcolm@redhat.com>
507 * c-parser.c (c_parser_error): Rename to...
508 (c_parser_error_richloc): ...this, making static, and adding
509 "richloc" parameter, passing it to the c_parse_error call,
510 rather than calling c_parser_set_source_position_from_token.
511 (c_parser_error): Reintroduce, reimplementing in terms of the
512 above, converting return type from void to bool.
513 (class token_pair): New class.
514 (struct matching_paren_traits): New struct.
515 (matching_parens): New typedef.
516 (struct matching_brace_traits): New struct.
517 (matching_braces): New typedef.
518 (get_matching_symbol): New function.
519 (c_parser_require): Add param MATCHING_LOCATION, using it to
520 highlight matching "opening" tokens for missing "closing" tokens.
521 (c_parser_skip_until_found): Likewise.
522 (c_parser_static_assert_declaration_no_semi): Convert explicit
523 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
524 class matching_parens, so that the pertinent open parenthesis is
525 highlighted when there are problems locating the close
527 (c_parser_struct_or_union_specifier): Likewise.
528 (c_parser_typeof_specifier): Likewise.
529 (c_parser_alignas_specifier): Likewise.
530 (c_parser_simple_asm_expr): Likewise.
531 (c_parser_braced_init): Likewise, for matching_braces.
532 (c_parser_paren_condition): Likewise, for matching_parens.
533 (c_parser_switch_statement): Likewise.
534 (c_parser_for_statement): Likewise.
535 (c_parser_asm_statement): Likewise.
536 (c_parser_asm_operands): Likewise.
537 (c_parser_cast_expression): Likewise.
538 (c_parser_sizeof_expression): Likewise.
539 (c_parser_alignof_expression): Likewise.
540 (c_parser_generic_selection): Likewise.
541 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
542 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
543 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
544 In case CPP_OPEN_PAREN, pass loc_open_paren to the
545 c_parser_skip_until_found call.
546 (c_parser_objc_class_definition): Use class matching_parens as
548 (c_parser_objc_method_decl): Likewise.
549 (c_parser_objc_try_catch_finally_statement): Likewise.
550 (c_parser_objc_synchronized_statement): Likewise.
551 (c_parser_objc_at_property_declaration): Likewise.
552 (c_parser_oacc_wait_list): Likewise.
553 (c_parser_omp_var_list_parens): Likewise.
554 (c_parser_omp_clause_collapse): Likewise.
555 (c_parser_omp_clause_default): Likewise.
556 (c_parser_omp_clause_if): Likewise.
557 (c_parser_omp_clause_num_threads): Likewise.
558 (c_parser_omp_clause_num_tasks): Likewise.
559 (c_parser_omp_clause_grainsize): Likewise.
560 (c_parser_omp_clause_priority): Likewise.
561 (c_parser_omp_clause_hint): Likewise.
562 (c_parser_omp_clause_defaultmap): Likewise.
563 (c_parser_oacc_single_int_clause): Likewise.
564 (c_parser_omp_clause_ordered): Likewise.
565 (c_parser_omp_clause_reduction): Likewise.
566 (c_parser_omp_clause_schedule): Likewise.
567 (c_parser_omp_clause_num_teams): Likewise.
568 (c_parser_omp_clause_thread_limit): Likewise.
569 (c_parser_omp_clause_aligned): Likewise.
570 (c_parser_omp_clause_linear): Likewise.
571 (c_parser_omp_clause_safelen): Likewise.
572 (c_parser_omp_clause_simdlen): Likewise.
573 (c_parser_omp_clause_depend): Likewise.
574 (c_parser_omp_clause_map): Likewise.
575 (c_parser_omp_clause_device): Likewise.
576 (c_parser_omp_clause_dist_schedule): Likewise.
577 (c_parser_omp_clause_proc_bind): Likewise.
578 (c_parser_omp_clause_uniform): Likewise.
579 (c_parser_omp_for_loop): Likewise.
580 (c_parser_cilk_clause_vectorlength): Likewise.
581 (c_parser_cilk_clause_linear): Likewise.
582 (c_parser_transaction_expression): Likewise.
583 * c-parser.h (c_parser_require): Add param matching_location with
584 default UNKNOWN_LOCATION.
585 (c_parser_error): Convert return type from void to bool.
586 (c_parser_skip_until_found): Add param matching_location with
587 default UNKNOWN_LOCATION.
589 2017-08-09 Marek Polacek <polacek@redhat.com>
591 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
592 * c-tree.h (build_external_ref): Update declaration.
593 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
594 (build_external_ref): Change the type of a parameter to bool.
595 (parser_build_binary_op): Use true/false instead of 1/0.
596 (pointer_diff): Likewise.
597 (build_modify_expr): Likewise.
598 (set_designator): Change the type of a parameter to bool.
599 (set_init_index): Use true/false instead of 1/0.
600 (set_init_label): Likewise.
601 (output_init_element): Change the type of a parameter to bool.
602 (output_pending_init_elements): Use true/false instead of 1/0.
603 (process_init_element): Likewise.
604 (build_binary_op): Change the type of a parameter to bool.
606 2017-08-09 Marek Polacek <polacek@redhat.com>
609 * c-typeck.c (pedwarn_init): Make the function take a variable list.
610 Call emit_diagnostic_valist instead of pedwarn.
611 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
612 Print the relevant types in diagnostics.
614 2017-08-09 Marek Polacek <polacek@redhat.com>
617 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
618 build_conditional_expr.
619 * c-parser.c (c_parser_conditional_expression): Create locations for
620 EXP1 and EXP2 from their source ranges. Pass the locations down to
621 build_conditional_expr.
622 * c-tree.h (build_conditional_expr): Update declaration.
623 * c-typeck.c (build_conditional_expr): Add location_t parameters.
624 For -Wsign-compare, also print the types.
626 2017-08-08 Martin Liska <mliska@suse.cz>
628 * c-convert.c: Include header files.
629 * c-typeck.c: Likewise.
631 2017-08-07 Martin Liska <mliska@suse.cz>
633 * c-parser.c (c_parser_attributes): Canonicalize name of an
636 2017-08-02 Marek Polacek <polacek@redhat.com>
639 * c-parser.c (c_parser_unary_expression): Use set_error.
643 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
644 warnings. Avoid walking MACRO_MAP_LOCATIONS.
646 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
647 Martin Liska <mliska@suse.cz>
649 * c-typeck.c (c_finish_goto_label): Build gimple predict
652 2017-07-31 Martin Liska <mliska@suse.cz>
655 * c-convert.c (convert): Guard condition with flag_sanitize_p
656 also with current_function_decl non-null equality.
657 * c-decl.c (grokdeclarator): Likewise.
658 * c-typeck.c (build_binary_op): Likewise.
660 2017-07-25 Marek Polacek <polacek@redhat.com>
662 * c-decl.c (grokfield): Remove local variable.
664 2017-07-25 Marek Polacek <polacek@redhat.com>
667 * c-parser.c (c_parser_else_body): Don't warn about multistatement
668 macro expansion if the body is in { }.
669 (c_parser_while_statement): Likewise.
670 (c_parser_for_statement): Likewise.
672 2017-07-18 Nathan Sidwell <nathan@acm.org>
674 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
676 2017-07-14 David Malcolm <dmalcolm@redhat.com>
678 * c-decl.c (implicitly_declare): When suggesting a missing
679 #include, provide a fix-it hint.
681 2017-07-06 David Malcolm <dmalcolm@redhat.com>
683 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
684 and call that instead.
685 * c-tree.h (selftest::run_c_tests): New decl.
687 2017-06-26 Marek Polacek <polacek@redhat.com>
690 * c-parser.c (c_parser_if_body): Set the location of the
691 body of the conditional after parsing all the labels. Call
692 warn_for_multistatement_macros.
693 (c_parser_else_body): Likewise.
694 (c_parser_switch_statement): Likewise.
695 (c_parser_while_statement): Likewise.
696 (c_parser_for_statement): Likewise.
697 (c_parser_statement): Add a default argument. Save the location
698 after labels have been parsed.
699 (c_parser_c99_block_statement): Likewise.
701 2017-06-19 Richard Biener <rguenther@suse.de>
703 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
704 negated _Literals to parse _Literal (int) -1.
706 2017-06-13 Martin Liska <mliska@suse.cz>
709 * c-convert.c (convert): Use sanitize_flags_p.
710 * c-decl.c (grokdeclarator): Likewise.
711 * c-typeck.c (convert_for_assignment): Likewise.
712 (c_finish_return): Likewise.
713 (build_binary_op): Likewise.
715 2017-06-08 Jakub Jelinek <jakub@redhat.com>
718 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
719 to sizetype before size_binop.
721 2017-06-07 Jakub Jelinek <jakub@redhat.com>
723 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
726 2017-06-06 Marek Polacek <polacek@redhat.com>
729 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
731 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
733 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
735 * c-parser.c (c_parser_binary_expression): Implement the
736 -Wsizeof_pointer_div warning.
737 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
738 from a parenthesized expression.
739 (c_parser_expr_list): Use c_last_sizeof_loc.
740 * c-tree.h (c_last_sizeof_loc): New external.
741 * c-typeck.c (c_last_sizeof_loc): New variable.
742 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
744 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
747 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
749 2017-05-30 David Malcolm <dmalcolm@redhat.com>
751 * c-objc-common.c (c_tree_printer): Gain bool and const char **
754 2017-05-24 Martin Sebor <msebor@redhat.com>
757 * c-fold.c (c_fully_fold_internal): Adjust.
758 * c-typeck.c (parser_build_unary_op): Adjust.
760 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
762 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
763 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
766 2017-05-23 Marek Polacek <polacek@redhat.com>
768 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
771 2017-05-22 Jakub Jelinek <jakub@redhat.com>
773 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
774 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
775 it returned invariant. Call tree_invariant_p unconditionally
776 afterwards to decide whether to return expr or op0.
778 2017-05-22 Nathan Sidwell <nathan@acm.org>
780 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
782 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
784 * c-parser.c (c_parser_omp_clause_default): Handle
785 "OMP_CLAUSE_DEFAULT_PRESENT".
787 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
789 * config-lang.in (gtfiles): Add c-family/c-format.c.
791 2017-05-18 Nathan Sidwell <nathan@acm.org>
793 * c-decl.c (pushdecl_top_level): Delete unused function.
795 2017-05-18 Marek Polacek <polacek@redhat.com>
797 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
798 (check_earlier_gotos): Likewise.
799 (define_label): Likewise.
800 (pending_xref_error): Likewise.
801 (smallest_type_quals_location): Likewise.
802 (grokdeclarator): Likewise.
803 (grokparms): Likewise.
804 (identifier_global_value): Likewise.
805 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
806 (find_init_member): Likewise.
808 2017-05-18 Marek Polacek <polacek@redhat.com>
810 * c-decl.c (start_decl): Use false/true instead of 0/1.
811 (grokdeclarator): Likewise.
812 (finish_struct): Likewise.
813 (start_function): Change the return type to bool. Use false/true
815 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
816 * c-tree.h (start_function): Update.
817 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
818 (set_designator): Change the return type to bool. Use false/true
821 2017-05-17 Marek Polacek <polacek@redhat.com>
823 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
824 * c-typeck.c: Likewise.
826 2017-05-17 Marek Polacek <polacek@redhat.com>
829 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
830 DECL_IGNORED_P even for non-static compound literals.
832 2017-05-17 Martin Liska <mliska@suse.cz>
834 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
835 use it instead of int type.
837 2017-05-17 Marek Polacek <polacek@redhat.com>
839 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
841 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
842 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
843 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
844 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
846 (c_parser_conditional_expression): Likewise.
847 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
848 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
849 (process_init_element): Likewise.
850 (build_binary_op): Likewise.
851 (handle_omp_array_sections_1): Likewise.
853 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
855 * c-parser.c (c_parser_omp_clause_num_gangs)
856 (c_parser_omp_clause_num_workers)
857 (c_parser_omp_clause_vector_length): Merge functions into...
858 (c_parser_oacc_single_int_clause): ... this new function. Adjust
861 2017-05-11 Nathan Sidwell <nathan@acm.org>
863 * gimple-parser.c: Don't #include tree-dump.h.
865 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
868 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
870 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
873 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
874 incorrect __MEM syntax.
876 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
879 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
882 2017-05-09 Nathan Sidwell <nathan@acm.org>
884 * c-tree.h (pushdecl): Declare.
886 2017-05-05 David Malcolm <dmalcolm@redhat.com>
888 * c-decl.c (warn_defaults_to): Replace report_diagnostic
889 with diagnostic_report_diagnostic.
890 * c-errors.c (pedwarn_c99): Likewise.
891 (pedwarn_c90): Likewise.
893 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
896 * c-gimplify.c (c_gimplify_expr): Remove calls to
897 cilk_gimplifY_call_params_in_spawned_fn.
899 2017-04-25 David Malcolm <dmalcolm@redhat.com>
901 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
902 hint for removing extra semicolon.
904 2017-04-21 Jakub Jelinek <jakub@redhat.com>
907 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
908 enabled, set specs->type to integer_type_node.
910 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
912 * c-array-notation.c: Fix typo in comment.
914 2017-03-29 Marek Polacek <polacek@redhat.com>
917 * c-decl.c (finish_decl): Check VAR_P.
919 2017-03-27 Jakub Jelinek <jakub@redhat.com>
922 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
923 * c-typeck.c (c_mark_addressable): Likewise. Look through
924 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
926 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
928 2017-03-23 Marek Polacek <polacek@redhat.com>
930 * c-tree.h: Remove a C_RID_YYCODE reference.
932 2017-03-21 Jakub Jelinek <jakub@redhat.com>
935 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
936 optional COMPOUND_EXPR with ubsan instrumentation.
938 2017-03-17 Marek Polacek <polacek@redhat.com>
940 * c-parser.c: Add C11 references.
942 2017-03-15 Marek Polacek <polacek@redhat.com>
944 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
946 2017-03-11 Marek Polacek <polacek@redhat.com>
948 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
950 2017-03-10 David Malcolm <dmalcolm@redhat.com>
953 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
955 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
957 2017-03-09 Marek Polacek <polacek@redhat.com>
960 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
961 parameter declarations with initializers.
963 2017-03-09 Jakub Jelinek <jakub@redhat.com>
966 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
969 2017-03-07 Jakub Jelinek <jakub@redhat.com>
972 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
973 for "may only be used in compound statements" diagnostics, change it
974 such that the same translatable string is used for all pragmas. For
975 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
977 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
978 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
979 "may only be used in compound statements" diagnostics, such that the
980 same translatable string is used for all pragmas.
982 2017-03-04 Marek Polacek <polacek@redhat.com>
985 * c-decl.c (implicit_decl_warning): Add missing space.
987 2017-03-03 Marek Polacek <polacek@redhat.com>
990 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
991 current_function_prototype_arg_types is error_mark_node. Fix
992 formatting. Use TREE_VALUE instead of TREE_TYPE.
994 2017-03-03 Jakub Jelinek <jakub@redhat.com>
997 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
998 %<min%> or %<max%> in the diagnostics, instead mention identifier.
999 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1003 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1004 instead of %<_Generic>.
1005 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1006 (c_parser_omp_target_exit_data): Use %<release%> instead of
1009 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1011 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1012 instead of just cond ? "..." : "...".
1013 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1014 for "enter"/"exit" keyword.
1015 (c_finish_oacc_routine): Don't use %s to supply portions of the
1018 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1021 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1022 handle -Wrestrict here.
1023 * c-typeck.c (build_function_call_vec): Adjust
1024 check_function_arguments caller.
1026 2017-02-23 Richard Biener <rguenther@suse.de>
1029 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1030 to initialize c_exprs to return.
1031 (c_parser_gimple_binary_expression): Likewise.
1032 (c_parser_gimple_unary_expression): Likewise.
1033 (c_parser_gimple_postfix_expression): Likewise.
1035 2017-02-22 Marek Polacek <polacek@redhat.com>
1038 * c-typeck.c (convert_arguments): Handle error_mark_node.
1040 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1042 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1043 value of c_parser_parse_ssa_name against error_mark_node and emit
1044 error if ssa name is anonymous and written as default definition.
1046 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1048 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1051 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1054 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1055 ignore #pragma omp target even when not followed by identifier.
1057 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1059 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1060 (c_parser_gimple_unary_expression): Likewise.
1062 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1064 * c-parser.c (c_parser_oacc_declare): Add missing space in
1067 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1070 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1071 set_c_expr_source_range when parsing ssa-name.
1073 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1074 Richard Biener <rguenther@suse.de>
1076 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1077 building IL when arguments are error_mark_node.
1078 (c_parser_gimple_unary_expression): Likewise.
1079 (c_parser_gimple_if_stmt): Likewise.
1080 (c_parser_gimple_switch_stmt): Likewise.
1081 (c_parser_gimple_return_stmt): Likewise.
1082 (c_parser_parse_ssa_name): When name lookup fails do not build
1083 an SSA name. Use undeclared rather than not declared in error
1086 2017-02-09 Marek Polacek <polacek@redhat.com>
1089 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1090 instead of c_parser_skip_until_found.
1092 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1095 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1096 symtab_node::get on automatic variables.
1098 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1099 Chung-Lin Tang <cltang@codesourcery.com>
1101 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1102 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1104 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1106 2017-02-07 Richard Biener <rguenther@suse.de>
1108 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1109 (c_parser_gimple_postfix_expression_after_primary):
1110 Do not use c_build_function_call_vec to avoid folding and promotion.
1113 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1116 * c-decl.c (pop_scope): Pass main_input_filename to
1117 build_translation_unit_decl.
1119 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1121 * c-parser.c: Include "read-rtl-function.h" and
1123 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1124 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1125 production. Update for renaming of field "gimple_pass" to
1126 "gimple_or_rtl_pass". If __RTL was seen, call
1127 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1128 to an auto_timevar, to cope with early exit.
1129 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1130 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1131 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1133 (c_parser_parse_rtl_body): New function.
1134 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1135 (struct c_declspecs): Rename field "gimple_pass" to
1136 "gimple_or_rtl_pass". Add field "rtl_p".
1137 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1138 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1139 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1140 (c_parser_gimple_or_rtl_pass_list): ...this.
1142 2017-01-20 Marek Polacek <polacek@redhat.com>
1145 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1147 2017-01-13 Richard Biener <rguenther@suse.de>
1149 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1152 2017-01-13 Richard Biener <rguenther@suse.de>
1154 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1155 _Literal ( type-name ) number.
1157 2017-01-12 Richard Biener <rguenther@suse.de>
1159 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1162 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1165 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1168 2017-01-11 Richard Biener <rguenther@suse.de>
1171 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1172 returns on parse errors.
1174 2017-01-04 Marek Polacek <polacek@redhat.com>
1177 * c-parser.c (c_parser_postfix_expression): Mark zero character
1178 constants by setting original_type in c_expr.
1179 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1180 with a zero character constant.
1181 (char_type_p): New function.
1183 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1185 * c-parser.c (c_parser_declaration_or_fndef): Create a
1186 rich_location at init_loc and parse it to start_init.
1187 (last_init_list_comma): New global.
1188 (c_parser_braced_init): Update last_init_list_comma when parsing
1189 commas. Pass it to pop_init_level. Pass location of closing
1190 brace to pop_init_level.
1191 (c_parser_postfix_expression_after_paren_type): Create a
1192 rich_location at type_loc and parse it to start_init.
1193 (c_parser_omp_declare_reduction): Likewise for loc.
1194 * c-tree.h (start_init): Add rich_location * param.
1195 (pop_init_level): Add location_t param.
1196 * c-typeck.c (struct initializer_stack): Add field
1197 "missing_brace_richloc".
1198 (start_init): Add richloc param, use it to initialize
1199 the stack node's missing_brace_richloc.
1200 (last_init_list_comma): New decl.
1201 (finish_implicit_inits): Pass last_init_list_comma to
1203 (push_init_level): When finding missing open braces, add fix-it
1204 hints to the richloc.
1205 (pop_init_level): Add "insert_before" param and pass it
1206 when calling pop_init_level. Add fixits about missing
1207 close braces to any richloc. Use the richloc for the
1208 -Wmissing-braces warning.
1209 (set_designator): Pass last_init_list_comma to pop_init_level.
1210 (process_init_element): Likewise.
1212 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1214 Update copyright years.
1216 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1219 * c-typeck.c (build_function_call_vec): If check_function_arguments
1220 returns true, set TREE_NO_WARNING on CALL_EXPR.
1223 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1224 to *expr instead of overwriting it.
1226 2016-12-20 Richard Biener <rguenther@suse.de>
1228 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1230 (c_parser_gimple_statement): Only build assigns for non-error
1232 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1234 2016-12-14 Martin Jambor <mjambor@suse.cz>
1236 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1238 (c_finish_oacc_routine): Adjusted call to
1239 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1240 to use their new names.
1241 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1243 (c_parser_oacc_update): Likewise.
1244 (c_parser_omp_simd): Likewise.
1245 (c_parser_omp_target_update): Likewise.
1246 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1247 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1249 (c_finish_omp_cancellation_point): Likewise.
1250 * gimple-parser.c: Do not include omp-low.h
1252 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1253 James Norris <jnorris@codesourcery.com>
1255 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1256 EXIT_DATA,WAIT} are not used in compound statements.
1257 (c_parser_oacc_enter_exit_data): Update diagnostics.
1259 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1262 * c-decl.c (diagnose_mismatched_decls): Use
1263 OPT_Wbuiltin_declaration_mismatch here too.
1265 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1266 Alan Hayward <alan.hayward@arm.com>
1267 David Sherwood <david.sherwood@arm.com>
1269 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1270 (make_label, finish_struct): Likewise.
1272 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1273 Richard Biener <rguenther@suse.de>
1275 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1276 * config-lang.in (gtfiles): Add c/c-parser.h.
1277 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1278 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1279 * c-parser.c (enum c_id_kind, struct c_token,
1280 c_parser_next_token_is, c_parser_next_token_is_not,
1281 c_parser_next_token_is_keyword,
1282 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1284 * c-parser.h: ... new header.
1285 * c-parser.c: Include c-parser.h and gimple-parser.h.
1286 (c_parser_peek_token, c_parser_peek_2nd_token,
1287 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1288 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1289 c_parser_error, c_parser_require, c_parser_skip_until_found,
1290 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1291 c_parser_type_name): Export.
1292 (c_parser_tokens_buf): New function.
1293 (c_parser_error): Likewise.
1294 (c_parser_set_error): Likewise.
1295 (c_parser_declspecs): Handle RID_GIMPLE.
1296 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1297 via c_parser_parse_gimple_body.
1298 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1299 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1300 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1301 c_parser_error, c_parser_require, c_parser_skip_until_found,
1302 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1303 c_parser_type_name): Declare.
1304 (struct c_parser): Declare forward.
1305 (c_parser_tokens_buf): Declare.
1306 (c_parser_error): Likewise.
1307 (c_parser_set_error): Likewise.
1308 * gimple-parser.c: New file.
1309 * gimple-parser.h: Likewise.
1311 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1314 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1317 2016-09-11 Le-Chun Wu <lcwu@google.com>
1318 Mark Wielaard <mjw@redhat.com>
1320 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1321 to the given -Wshadow= variant.
1323 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1325 * c-typeck.c: Include memmodel.h.
1327 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1330 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1331 instead of lhd_return_null_tree_v.
1333 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1336 * c-decl.c (smallest_type_quals_location): New static function.
1337 (grokdeclarator): Try to find the correct location for an ignored
1340 2016-09-26 Marek Polacek <polacek@redhat.com>
1343 * c-decl.c (pop_scope): Add gcc_fallthrough.
1345 2016-09-26 Marek Polacek <polacek@redhat.com>
1348 * c-parser.c (struct c_token): Add flags field.
1349 (c_lex_one_token): Pass it to c_lex_with_flags.
1350 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1351 into IFN_FALLTHROUGH.
1352 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1353 attribute fallthrough after a case label or default label.
1354 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1356 2016-09-24 Marek Polacek <polacek@redhat.com>
1359 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1360 have boolean value. Warn about ++/-- on booleans.
1362 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1364 * c-parser.c (incomplete_record_decls): Remove unnecessary
1365 = vNULL initialization of file scope vec.
1367 2016-09-16 Marek Polacek <polacek@redhat.com>
1369 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1371 2016-09-14 Marek Polacek <polacek@redhat.com>
1373 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1374 (fix_array_notation_expr): Likewise.
1375 * c-decl.c (finish_decl): Likewise.
1376 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1377 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1378 (function_to_pointer_conversion): Use false instead of 0.
1379 (convert_lvalue_to_rvalue): Likewise.
1380 (parser_build_unary_op): Likewise.
1381 (build_atomic_assign): Likewise.
1382 (build_unary_op): Change nonconvert parameter type to bool, use
1383 true/false instead of 1/0.
1384 (build_binary_op): Use true instead of 1.
1386 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1388 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1389 of add_fixit_insert to add_fixit_insert_before.
1391 2016-09-13 Marek Polacek <polacek@redhat.com>
1393 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1396 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1399 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1400 COMPOUND_EXPR to warn_for_omitted_condop.
1402 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1404 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1405 c_get_substring_location for this new langhook.
1407 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1410 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1412 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1413 instead of mark_exp_read on low_bound/length expression.
1414 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1415 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1416 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1417 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1418 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1419 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1420 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1421 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1422 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1423 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1424 instead of mark_expr_read.
1425 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1426 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1427 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1428 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1429 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1430 array section bases outside of depend clause, for depend clause
1431 use convert_lvalue_to_rvalue on the base.
1432 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1433 linear, aligned, map, to and from clauses.
1434 (c_omp_clause_copy_ctor): New function.
1436 2016-09-01 Marek Polacek <polacek@redhat.com>
1439 * c-typeck.c (composite_type): Add FALLTHRU comment.
1441 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1443 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1444 to the insertion fixits for "struct", "union", and "enum".
1446 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1448 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1449 rather than add_fixit_misspelled_id.
1450 (undeclared_variable): Likewise.
1451 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1452 now-redundant "here" params from add_fixit_insert method calls.
1453 (c_parser_parameter_declaration): Likewise.
1454 * c-typeck.c (build_component_ref): Remove now-redundant range
1455 param from add_fixit_replace method calls.
1457 2016-08-25 Marek Polacek <polacek@redhat.com>
1459 * c-typeck.c (parser_build_binary_op): Pass LHS to
1460 warn_logical_not_parentheses.
1462 2016-08-25 Marek Polacek <polacek@redhat.com>
1465 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1466 or _FloatN or _FloatNx is not supported.
1467 (finish_declspecs): Set type to integer_type_node when _FloatN or
1468 _FloatNx is not supported.
1470 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1473 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1474 (struct c_declspecs): Add field floatn_nx_idx.
1475 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1476 and _FloatNx type specifiers.
1477 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1478 (c_parser_declspecs, c_parser_attribute_any_word)
1479 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1480 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1481 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1482 narrower than double.
1484 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1485 Martin Liska <mliska@suse.cz>
1488 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1489 % to determine val element to change. Assert that
1490 wchar_bytes * charwidth fits into val array.
1492 2016-08-12 Marek Polacek <polacek@redhat.com>
1495 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1496 (c_parser_postfix_expression): Likewise.
1497 * c-typeck.c (build_unary_op): Adjust fall through comment.
1498 (c_mark_addressable): Likewise.
1500 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1503 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1504 array member through typedef, for orig_qual_indirect == 0 clear
1507 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1510 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1511 this up to selftest::run_c_tests.
1512 (selftest::run_c_tests): New function.
1514 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1516 * c-parser.c (struct oacc_routine_data): Add error_seen and
1517 fndecl_seen members.
1518 (c_finish_oacc_routine): Use these.
1519 (c_parser_declaration_or_fndef): Adjust.
1520 (c_parser_oacc_routine): Likewise. Support more C language
1521 constructs, and improve diagnostics. Move pragma context
1523 (c_parser_pragma): ... here.
1525 * c-parser.c (struct oacc_routine_data): New.
1526 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1528 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1529 declare target" attribute.
1531 2016-08-01 Jan Beulich <jbeulich@suse.com>
1533 * c-fold.c (c_fully_fold_internal): Also emit shift count
1534 warnings for vector types.
1535 * c-typeck.c (build_binary_op): Likewise.
1537 2016-07-29 Marek Polacek <polacek@redhat.com>
1540 * c-decl.c (finish_struct): Rephrase an error message.
1543 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1544 to error node for invalid code.
1547 * c-decl.c (implicitly_declare): Return decl early not only for
1548 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1550 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1553 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1554 on GNU extern inline functions.
1556 2016-07-29 Marek Polacek <polacek@redhat.com>
1559 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1562 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1564 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1566 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1568 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1570 (best_macro_match): Likewise, converting from a typedef to a
1572 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1573 (lookup_name_fuzzy): Update for change of best_macro_match to a
1574 subclass with a ctor that calls cpp_forall_identifiers.
1576 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1578 * c-decl.c (implicit_decl_warning): Update for conversion of
1579 return type of lookup_name_fuzzy to const char *.
1580 (undeclared_variable): Likewise.
1581 (lookup_name_fuzzy): Convert return type from tree to
1583 * c-parser.c (c_parser_declaration_or_fndef): Update for
1584 conversion of return type of lookup_name_fuzzy to const char *.
1585 (c_parser_parameter_declaration): Likewise.
1587 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1589 * c-parser.c (c_parser_oacc_declare): Don't scan for
1591 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1592 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1593 zero-length subarrays.
1595 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1598 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1599 instead of FUZZY_LOOKUP_NAME.
1600 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1601 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1603 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1606 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1608 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1610 * c-parser.c (c_parser_generic_selection): Make type of variable
1612 (c_parser_omp_declare_simd): Likewise.
1614 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1616 * c-decl.c (struct c_struct_parse_info): Change member types
1617 from vec to auto_vec.
1618 (start_struct): Adjust.
1619 (finish_struct): Likewise.
1621 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1624 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1626 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1628 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1629 Move pragma context checking into...
1630 (c_parser_omp_cancellation_point): ... here, and improve
1631 diagnostic messages.
1632 * c-typeck.c (c_finish_omp_cancel)
1633 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1635 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1638 * c-typeck.c (c_build_qualified_type): Don't clear
1639 C_TYPE_INCOMPLETE_VARS for the main variant.
1641 2016-06-28 Martin Sebor <msebor@redhat.com>
1644 * c-typeck.c (output_init_element): Diagnose incompatible types
1645 before non-constant initializers.
1647 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1649 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1651 2016-06-23 Andi Kleen <ak@linux.intel.com>
1653 * Make-lang.in: Add support for autofdo.
1655 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1658 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1659 (implicit_decl_warning): When issuing warnings for implicit
1660 declarations, attempt to provide a suggestion via
1662 (undeclared_variable): Likewise when issuing errors.
1663 (lookup_name_in_scope): Likewise.
1664 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1665 (best_macro_match): New typedef.
1666 (find_closest_macro_cpp_cb): New function.
1667 (lookup_name_fuzzy): New function.
1668 * c-parser.c: Include gcc-rich-location.h.
1669 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1670 (c_keyword_starts_typename): ...this new function.
1671 (c_parser_declaration_or_fndef): When issuing errors about
1672 missing "struct" etc, add a fixit. For other kinds of errors,
1673 attempt to provide a suggestion via lookup_name_fuzzy.
1674 (c_parser_parms_declarator): When looking ahead to detect typos in
1675 type names, also reject CPP_KEYWORD.
1676 (c_parser_parameter_declaration): When issuing errors about
1677 unknown type names, attempt to provide a suggestion via
1679 * c-tree.h (c_keyword_starts_typename): New prototype.
1681 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1684 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1685 c_common_type returns error_mark_node.
1687 2016-06-19 Martin Sebor <msebor@redhat.com>
1690 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1691 __alignof__ (expression).
1693 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1695 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1697 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1699 * c-typeck.c (build_component_ref): Simplify fixit code by
1700 using gcc_rich_location::add_fixit_misspelled_id.
1701 (set_init_label): Likewise.
1703 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1705 * c-parser.c (c_parser_initelt): Provide location of name for new
1706 location_t param of set_init_label.
1707 * c-tree.h (set_init_label): Add location_t param.
1708 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1709 param and use it when issuing error messages about unrecognized
1710 field names. Attempt to provide a fixit hint if appropriate,
1711 otherwise update the error message to provide the type name.
1713 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1716 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1719 2016-06-08 Martin Sebor <msebor@redhat.com>
1720 Jakub Jelinek <jakub@redhat.com>
1724 * c-typeck.c (convert_arguments): Don't promote last argument
1725 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1727 2016-06-08 Marek Polacek <polacek@redhat.com>
1730 * c-decl.c (grokdeclarator): Check TYPE_P.
1733 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1736 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1738 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1739 and structure element reference, capture the location of the
1740 element name token and pass it to build_component_ref.
1741 (c_parser_postfix_expression_after_primary): Likewise for
1742 structure element dereference.
1743 (c_parser_omp_variable_list): Likewise for
1744 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1745 * c-tree.h (build_component_ref): Add location_t param.
1746 * c-typeck.c (build_component_ref): Add location_t param
1747 COMPONENT_LOC. Use it, if available, when issuing hints about
1748 mispelled member names to provide a fixit replacement hint.
1750 2016-06-06 Marek Polacek <polacek@redhat.com>
1753 * c-parser.c (c_parser_direct_declarator): Set location.
1755 2016-06-06 Marek Polacek <polacek@redhat.com>
1757 * c-typeck.c (comptypes_internal): Handle comparisons of
1758 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1759 TYPE_REF_CAN_ALIAS_ALL.
1761 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1763 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1764 arguments as addressable when async clause exists.
1766 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1769 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1770 when combined with target construct.
1772 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1774 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1775 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1777 2016-05-25 Marek Polacek <polacek@redhat.com>
1780 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1783 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1785 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1787 * c-parser.c (c_parser_oacc_declare): Add support for
1788 GOMP_MAP_FIRSTPRIVATE_POINTER.
1789 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1790 argument with enum c_omp_region_type ort.
1791 (handle_omp_array_sections): Likewise. Update call to
1792 handle_omp_array_sections_1.
1793 (c_finish_omp_clauses): Add specific errors and warning messages for
1794 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1795 call to handle_omp_array_sections.
1797 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1799 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1801 2016-05-24 Richard Biener <rguenther@suse.de>
1805 * c-typeck.c (build_array_ref): Do not complain about indexing
1806 non-lvalue vectors. Adjust for function name change.
1808 2016-05-20 Martin Sebor <msebor@redhat.com>
1811 * c-typeck.c (error_init): Use
1812 expansion_point_location_if_in_system_header.
1813 (warning_init): Same.
1815 2016-05-19 David Malcolm <dmalcolm@redhat.com>
1818 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1820 (c_parser_postfix_expression): Likewise.
1821 * c-tree.h (c_expr::set_error): New method.
1822 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1823 that result's range is initialized.
1825 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1827 * c-typeck.c (parser_build_unary_op): Fix formatting.
1829 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1831 * c-decl.c (grokdeclarator): Remove errmsg and use of
1832 targetm.invalid_return_type.
1833 (grokparms): Remove errmsg and use of
1834 targetm.invalid_parameter_type.
1836 2016-05-13 Joseph Myers <joseph@codesourcery.com>
1838 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1839 function return type.
1841 2016-05-12 Marek Polacek <polacek@redhat.com>
1844 * c-decl.c (build_compound_literal): Pass LOC down to
1845 c_incomplete_type_error.
1846 * c-tree.h (require_complete_type): Adjust declaration.
1847 (c_incomplete_type_error): Likewise.
1848 * c-typeck.c (require_complete_type): Add location parameter, pass it
1849 down to c_incomplete_type_error.
1850 (c_incomplete_type_error): Add location parameter, pass it down to
1852 (build_component_ref): Pass location down to c_incomplete_type_error.
1853 (default_conversion): Pass location down to require_complete_type.
1854 (build_array_ref): Likewise.
1855 (build_function_call_vec): Likewise.
1856 (convert_arguments): Likewise.
1857 (build_unary_op): Likewise.
1858 (build_c_cast): Likewise.
1859 (build_modify_expr): Likewise.
1860 (convert_for_assignment): Likewise.
1861 (c_finish_omp_clauses): Likewise.
1863 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1866 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1868 * c-errors.c (pedwarn_c90): Return true if warned.
1869 * c-tree.h (pedwarn_c90): Change return type to bool.
1870 (enum c_declspec_word): Add new enumerator cdw_atomic.
1872 2016-05-11 Marek Polacek <polacek@redhat.com>
1875 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1876 diagnose_mismatched_attributes and call it.
1878 2016-05-10 Marek Polacek <polacek@redhat.com>
1881 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1882 on a declaration following the definition.
1884 2016-05-05 Jakub Jelinek <jakub@redhat.com>
1886 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1887 parse it through to c_parser_c99_block_statement.
1888 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1891 2016-05-04 Marek Polacek <polacek@redhat.com>
1893 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1896 2016-05-04 Marek Polacek <polacek@redhat.com>
1899 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1900 for macro expansions.
1902 2016-05-03 Marek Polacek <polacek@redhat.com>
1905 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1906 check_builtin_function_arguments.
1908 2016-05-03 Richard Biener <rguenther@suse.de>
1910 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1911 the checksum from the previous stage.
1913 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1915 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1916 c_finish_omp_clauses.
1917 (c_parser_omp_all_clauses): Likewise.
1918 (c_parser_oacc_cache): Likewise.
1919 (c_parser_oacc_loop): Likewise.
1920 (omp_split_clauses): Likewise.
1921 (c_parser_omp_declare_target): Likewise.
1922 (c_parser_cilk_all_clauses): Likewise.
1923 (c_parser_cilk_for): Likewise.
1924 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1925 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1927 2016-05-02 Marek Polacek <polacek@redhat.com>
1930 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1933 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1936 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1937 OACC_LOOP_CLAUSE_MASK.
1938 (c_parser_oacc_kernels_parallel): Update call to
1939 c_oacc_split_loop_clauses.
1941 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
1943 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1944 argument to build_modify_expr in two cases.
1946 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1948 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1949 warn_for_memset instead of warning directly here.
1951 2016-04-26 Marek Polacek <polacek@redhat.com>
1954 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1956 (c_parser_for_statement): ... here.
1957 (c_parser_if_statement): Use it.
1958 (c_parser_switch_statement): Use it.
1959 (c_parser_while_statement): Use it.
1962 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1964 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1967 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1968 instead of c_finish_cilk_clauses.
1969 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1970 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1971 floating-point variables in the linear clause for Cilk Plus.
1973 2016-04-18 Michael Matz <matz@suse.de>
1975 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1976 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1978 2016-04-15 Marek Polacek <polacek@redhat.com>
1981 * c-typeck.c (build_unary_op): Pass location down to error and
1984 2016-04-15 Jakub Jelinek <jakub@redhat.com>
1987 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1989 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1990 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1991 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1992 Adjust c_parser_pragma callers.
1993 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1995 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1997 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1998 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1999 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2000 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2001 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2002 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2003 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2004 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2006 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2007 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2010 2016-04-13 Marek Polacek <polacek@redhat.com>
2013 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2015 (c_parser_statement): Likewise.
2016 (c_parser_c99_block_statement): Likewise.
2017 (c_parser_while_statement): Likewise.
2018 (c_parser_for_statement): Likewise.
2019 (c_parser_if_body): Don't set IF_P here.
2020 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2021 about dangling else here.
2022 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2023 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2024 warn about dangling else here.
2026 2016-04-04 Marek Polacek <polacek@redhat.com>
2029 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2031 2016-03-31 Marek Polacek <polacek@redhat.com>
2034 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2036 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2039 * c-parser.c (c_parser_postfix_expression): Set the source range
2040 for uses of "__builtin_types_compatible_p".
2042 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2045 * c-typeck.c (composite_type): Don't count void_list_node
2046 into len, if the list is terminated by void_list_node, start
2047 with void_list_node instead of NULL for newargs. Stop
2050 2016-03-16 Marek Polacek <polacek@redhat.com>
2053 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2054 nested functions returning VM types.
2056 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2058 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2059 when calling c_finish_omp_clauses.
2061 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2064 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2067 2016-03-04 Marek Polacek <polacek@redhat.com>
2070 * c-parser.c (c_parser_postfix_expression): Call
2071 c_parser_cast_expression rather than c_parser_postfix_expression.
2073 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2077 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2078 of incomplete decls to error_mark_node.
2080 2016-02-24 Marek Polacek <polacek@redhat.com>
2083 * c-decl.c (finish_decl): Don't update the copy of the type of a
2084 different decl type.
2086 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2089 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2090 in id_kind reclassification.
2092 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2095 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2097 2016-02-16 James Norris <jnorris@codesourcery.com>
2100 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2102 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2104 * c-decl.c (build_null_declspecs): Zero the entire struct.
2107 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2108 callers changed. If nested_p is true, use it to call
2109 finish_implicit_inits.
2110 * c-tree.h (finish_implicit_inits): Declare.
2111 * c-typeck.c (finish_implicit_inits): New function. Move code
2113 (push_init_level): ... here.
2114 (set_designator, process_init_element): Call finish_implicit_inits.
2116 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2119 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2120 arguments for -Waddress warning.
2122 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2125 * c-decl.c (finish_enum): When honoring mode attribute,
2126 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2128 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2131 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2132 all type variants, not just TYPE_MAIN_VARIANT.
2134 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2137 * c-decl.c (c_write_global_declarations_1): Warn with
2138 warn_unused_function if static prototype without definition
2141 2016-01-27 Marek Polacek <polacek@redhat.com>
2144 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2145 to unsigned, if needed. Add -Wsign-compare warning.
2147 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2149 PR tree-optimization/69483
2150 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2152 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2155 * c-tree.h (incomplete_record_decls): Declare.
2156 * c-parser.c (incomplete_record_decls): Define.
2157 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2158 report error if any decl has zero size.
2159 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2160 or enum type to incomplete_record_decls.
2162 2016-01-14 Tom de Vries <tom@codesourcery.com>
2164 PR tree-optimization/68773
2165 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2168 2016-01-14 Marek Polacek <polacek@redhat.com>
2171 * c-decl.c (grokdeclarator): Provide more information for invalid
2174 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2176 * c-parser.c (c_parser_unary_expression): For dereferences, build
2177 a combined location before calling build_indirect_ref, so that
2178 error reports cover the full range, manually updating the c_expr
2181 2016-01-06 Marek Polacek <polacek@redhat.com>
2184 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2185 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2188 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2190 Update copyright years.
2192 2016-01-04 Marek Polacek <polacek@redhat.com>
2195 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2196 optimization to use __atomic_fetch_* built-in if possible.
2198 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2200 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2202 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2205 2015-12-22 Marek Polacek <polacek@redhat.com>
2208 * c-typeck.c (build_component_ref): Warn when acessing elements of
2209 atomic structures or unions.
2211 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2213 * c-typeck.c: Include "gcc-rich-location.h".
2214 (build_binary_op): In the two places that call binary_op_error,
2215 create a gcc_rich_location and populate it with the location of
2216 the binary op and its two operands.
2218 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2220 * c-parser.c (c_parser_statement_after_labels): When calling
2221 c_finish_return, Use the return expression's location if it has
2222 one, falling back to the location of the first token within it.
2223 * c-typeck.c (c_finish_return): When issuing warnings about
2224 the incorrect presence/absence of a return value, issue a note
2225 showing the declaration of the function.
2227 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2229 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2231 (c_parser_peek_nth_token): New function.
2232 (c_parser_peek_conflict_marker): New function.
2233 (c_parser_error): Detect conflict markers and report them as such.
2235 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2237 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2238 to preserve range information for the primary expression
2239 in the call to c_parser_postfix_expression_after_primary.
2241 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2243 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2244 expression location, falling back on the first token location,
2245 rather than always using the latter.
2247 2015-12-16 Marek Polacek <polacek@redhat.com>
2250 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2253 2015-12-15 Marek Polacek <polacek@redhat.com>
2256 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2259 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2261 * c-parser.c (c_parser_alignof_expression): Capture location of
2262 closing parenthesis (if any), or of end of unary expression, and
2263 use it to build a src_range for the expression.
2265 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2268 * c-parser.c (c_parser_get_builtin_args): Add
2269 "out_close_paren_loc" param, and write back to it.
2270 (c_parser_postfix_expression): Capture the closing
2271 parenthesis location for RID_CHOOSE_EXPR,
2272 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2273 RID_BUILTIN_SHUFFLE and use it to set the source range
2274 for such expressions; within RID_BUILTIN_COMPLEX set
2275 the underlying location.
2277 2015-12-07 Marek Polacek <polacek@redhat.com>
2280 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2281 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2283 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2285 * c-tree.h (c_build_va_arg): Adjust prototype.
2286 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2287 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2288 parameter, adjust throughout and issue an error if EXPR is a component
2289 with reverse storage order.
2291 2015-12-02 Jason Merrill <jason@redhat.com>
2293 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2294 (c_fully_fold_internal, decl_constant_value_for_optimization):
2295 Move from c-common.c.
2296 * c-tree.h: Declare decl_constant_value_for_optimization.
2297 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2299 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2302 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2303 following link from declarator to next declarator. Track original
2304 qualified type and pass it to c_build_qualified_type.
2305 * c-typeck.c (c_build_qualified_type): Add arguments
2306 orig_qual_type and orig_qual_indirect.
2308 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2310 * c-parser.c (c_parser_omp_clause_name)
2311 (c_parser_oacc_all_clauses): Alphabetical sorting.
2313 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2316 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2319 2015-12-01 Julian Brown <julian@codesourcery.com>
2320 Cesar Philippidis <cesar@codesourcery.com>
2321 James Norris <James_Norris@mentor.com>
2323 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2324 (c_parser_oacc_clause_use_device): New function.
2325 (c_parser_oacc_all_clauses): Add use_device support.
2326 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2327 (c_parser_oacc_host_data): New function.
2328 (c_parser_omp_construct): Add host_data support.
2329 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2330 * c-typeck.c (c_finish_oacc_host_data): New function.
2331 (c_finish_omp_clauses): Add use_device support.
2333 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2336 * c-decl.c: Set TYPE_PACKED in variants.
2338 2015-11-27 Martin Liska <mliska@suse.cz>
2341 * c-array-notation.c (fix_builtin_array_notation_fn):
2342 Use release_vec_vec instead of vec::release.
2343 (build_array_notation_expr): Likewise.
2344 (fix_conditional_array_notations_1): Likewise.
2345 (fix_array_notation_expr): Likewise.
2346 (fix_array_notation_call_expr): Likewise.
2348 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2351 * c-parser.c (c_parser_compound_statement_nostart): If
2352 last_label is true, use pragma_stmt instead of pragma_compound
2353 as second c_parser_pragma argument.
2354 (c_parser_omp_ordered, c_parser_omp_target_update,
2355 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2356 false as second argument to c_parser_skip_to_pragma_eol after
2357 diagnosing standalone directives used in pragma_stmt context.
2359 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2361 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2362 with "if (ENABLE_OFFLOADING)".
2364 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2367 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2368 for various Objective-C constructs: Class.name syntax,
2369 @selector(), @protocol(), @encode(), and [] message syntax.
2371 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2374 * c-typeck.c (should_suggest_deref_p): New function.
2375 (build_component_ref): Special-case POINTER_TYPE when
2376 generating a "not a structure of union" error message, and
2377 suggest a "->" rather than a ".", providing a fix-it hint.
2379 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2381 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2382 candidate into a new function, find_closest_identifier.
2384 2015-11-19 Marek Polacek <polacek@redhat.com>
2387 * c-typeck.c (parser_build_binary_op): Properly handle
2388 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2390 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2392 * c-parser.c (set_c_expr_source_range): Bulletproof both
2393 overloaded implementations against NULL expr->value.
2394 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2396 (c_parser_unary_expression): Likewise when handling addresses of
2398 (c_parser_postfix_expression): Likewise for statement expressions,
2399 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2400 __builtin_va_arg, and for __builtin_offset_of.
2401 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2402 src_range using the range of the braced initializer.
2403 (c_parser_transaction_expression): Set src_range for "ret" to a
2404 sane pair of values.
2406 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2408 * c-parser.c (c_finish_omp_declare_simd): Look for
2409 "simd" attribute as well. Update error message.
2411 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2413 * c-parser.c (c_parser_omp_declare_target): Adjust.
2415 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2417 * c-typeck.c (c_finish_omp_clauses): Don't mark
2418 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2420 2015-11-14 Marek Polacek <polacek@redhat.com>
2422 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2423 * c-typeck.c: Likewise.
2425 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2427 * c-decl.c (warn_defaults_to): Pass line_table to
2429 * c-errors.c (pedwarn_c99): Likewise.
2430 (pedwarn_c90): Likewise.
2431 * c-parser.c (set_c_expr_source_range): New functions.
2432 (c_token::get_range): New method.
2433 (c_token::get_finish): New method.
2434 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2435 based on the range from the start of the LHS to the end of the
2437 (c_parser_conditional_expression): Likewise, based on the range
2438 from the start of the cond.value to the end of exp2.value.
2439 (c_parser_binary_expression): Call set_c_expr_source_range on
2440 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2441 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2442 based on the cast_loc through to the end of the expr.
2443 (c_parser_unary_expression): Likewise, based on the
2444 op_loc through to the end of op.
2445 (c_parser_sizeof_expression) Likewise, based on the start of the
2446 sizeof token through to either the closing paren or the end of
2448 (c_parser_postfix_expression): Likewise, using the token range,
2449 or from the open paren through to the close paren for
2450 parenthesized expressions.
2451 (c_parser_postfix_expression_after_primary): Likewise, for
2452 various kinds of expression.
2453 * c-tree.h (struct c_expr): Add field "src_range".
2454 (c_expr::get_start): New method.
2455 (c_expr::get_finish): New method.
2456 (set_c_expr_source_range): New decls.
2457 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2458 on ret for prefix unary ops.
2459 (parser_build_binary_op): Likewise, running from the start of
2460 arg1.value through to the end of arg2.value.
2462 2015-11-13 Marek Polacek <polacek@redhat.com>
2465 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2467 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2469 * c-typeck.c: Include spellcheck.h.
2470 (lookup_field_fuzzy_find_candidates): New function.
2471 (lookup_field_fuzzy): New function.
2472 (build_component_ref): If the field was not found, try using
2473 lookup_field_fuzzy and potentially offer a suggestion.
2475 2015-11-12 James Norris <jnorris@codesourcery.com>
2476 Joseph Myers <joseph@codesourcery.com>
2478 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2479 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2480 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2481 and PRAGMA_OMP_CLAUSE_LINK.
2482 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2483 and PRAGMA_OACC_CLAUSE_LINK.
2484 (OACC_DECLARE_CLAUSE_MASK): New definition.
2485 (c_parser_oacc_declare): New function.
2487 2015-11-12 Marek Polacek <polacek@redhat.com>
2490 * c-parser.c (c_parser_for_statement): Reclassify the token in
2493 2015-11-11 Marek Polacek <polacek@redhat.com>
2497 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2498 checking the size of an array.
2500 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2502 * c-array-notation.c: Remove unused header files.
2503 * c-aux-info.c: Likewise.
2504 * c-convert.c: Likewise.
2505 * c-decl.c: Likewise.
2506 * c-errors.c: Likewise.
2507 * c-lang.c: Likewise.
2508 * c-objc-common.c: Likewise.
2509 * c-parser.c: Likewise.
2510 * c-typeck.c: Likewise.
2511 * gccspec.c: Likewise.
2513 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2514 Cesar Philippidis <cesar@codesourcery.com>
2515 James Norris <jnorris@codesourcery.com>
2516 Julian Brown <julian@codesourcery.com>
2517 Nathan Sidwell <nathan@codesourcery.com>
2520 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2522 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2523 (c_parser_pragma): Parse 'acc routine'.
2524 (OACC_ROUTINE_CLAUSE_MARK): Define.
2525 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2527 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2530 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2531 location of the backward-goto to the start of the loop body.
2533 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2536 * c-parser.c (c_parser_while_statement): Finish the loop before
2537 parsing ahead for misleading indentation.
2538 (c_parser_for_statement): Likewise.
2540 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2542 * c-decl.c (finish_struct): If the structure has reverse storage
2543 order, rewrite the type of array fields with scalar component. Call
2544 maybe_apply_pragma_scalar_storage_order on entry.
2545 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2546 errors on bit-fields and reverse SSO here and not...
2547 (c_mark_addressable): ...here.
2548 (output_init_element): Adjust call to initializer_constant_valid_p.
2549 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2551 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2553 * c-decl.c (warn_defaults_to): Update for change in signature
2554 of diagnostic_set_info.
2555 * c-errors.c (pedwarn_c99): Likewise.
2556 (pedwarn_c90): Likewise.
2557 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2558 for textinfo::set_location.
2560 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2561 Thomas Schwinge <thomas@codesourcery.com>
2562 James Norris <jnorris@codesourcery.com>
2564 * c-parser.c (c_parser_omp_clause_name): Add support for
2565 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2566 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2567 default(none) in OpenACC.
2568 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2570 (c_parser_oacc_clause_tile): New function.
2571 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2572 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2573 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2575 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2576 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2578 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2579 (c_parser_oacc_update): Update the error message for missing clauses.
2580 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2581 and OMP_CLAUSE_INDEPENDENT.
2583 2015-11-05 Marek Polacek <polacek@redhat.com>
2586 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2587 deal with pre-evaluation on invalid types.
2589 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2590 Ilya Verbin <ilya.verbin@intel.com>
2592 * c-parser.c: Include context.h and gimple-expr.h.
2593 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2594 monotonic together with nonmonotonic.
2595 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2596 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2597 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2598 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2599 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2600 expressions on combined target teams before the target.
2601 (c_parser_omp_declare_target): If decl has "omp declare target" or
2602 "omp declare target link" attribute, and cgraph or varpool node already
2603 exists, then set corresponding flags. Call c_finish_omp_clauses
2604 in the parenthesized extended-list syntax case.
2605 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2607 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2608 on OMP_CLAUSE_REDUCTION array sections.
2609 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2610 into the constant offset, or for variable low-bound using
2611 POINTER_PLUS_EXPR. For structure element based array sections use
2612 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2613 (c_finish_omp_clauses): Drop generic_field_head, structure
2614 elements are now always mapped even as array section bases,
2615 diagnose same var in data sharing and mapping clauses. Diagnose if
2616 linear step on declare simd is neither a constant nor a uniform
2617 parameter. Look through POINTER_PLUS_EXPR for array section
2618 reductions. Diagnose the same var or function appearing multiple
2619 times on the same directive. Fix up wording for the to clause if t
2620 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2621 modifier on kinds other than dynamic or guided or nonmonotonic
2622 modifier together with ordered clause.
2624 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2625 Chung-Lin Tang <cltang@codesourcery.com>
2627 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2629 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2631 * c-array-notation.c: Reorder #include's and remove duplicates.
2632 * c-aux-info.c: Likewise.
2633 * c-convert.c: Likewise.
2634 * c-decl.c: Likewise.
2635 * c-errors.c: Likewise.
2636 * c-lang.c: Likewise.
2637 * c-objc-common.c: Likewise.
2638 * c-parser.c: Likewise.
2639 * c-typeck.c: Likewise.
2641 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2644 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2645 after calling build_qualified_type.
2647 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2648 Thomas Schwinge <thomas@codesourcery.com>
2649 James Norris <jnorris@codesourcery.com>
2650 Joseph Myers <joseph@codesourcery.com>
2651 Julian Brown <julian@codesourcery.com>
2652 Bernd Schmidt <bschmidt@redhat.com>
2654 * c-parser.c (c_parser_oacc_shape_clause): New.
2655 (c_parser_oacc_simple_clause): New.
2656 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2657 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2659 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2660 James Norris <jnorris@codesourcery.com>
2661 Cesar Philippidis <cesar@codesourcery.com>
2665 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2666 parameters, and handle these. Adjust all users.
2667 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2669 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2671 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2673 (c_finish_omp_construct): Declare function.
2674 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2675 Merge functions into...
2676 (c_finish_omp_construct): ... this new function.
2678 2015-10-22 Richard Biener <rguenther@suse.de>
2680 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2681 before folding a MINUS_EXPR.
2683 2015-10-21 Marek Polacek <polacek@redhat.com>
2686 * c-decl.c (start_function): Warn about vararg functions without
2689 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2691 * c-typeck.c (build_conditional_expr): Use boolean vector
2692 type for vector comparison.
2693 (build_vec_cmp): New.
2694 (build_binary_op): Use build_vec_cmp for comparison.
2696 2015-10-20 Marek Polacek <polacek@redhat.com>
2698 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2700 2015-10-20 Marek Polacek <polacek@redhat.com>
2703 * c-parser.c (c_parser_attributes): Break out of the loop if the
2704 token after an attribute isn't a comma.
2706 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2707 Aldy Hernandez <aldyh@redhat.com>
2709 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2710 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2711 (c_parser_omp_variable_list): Handle structure elements for
2712 map, to and from clauses. Handle array sections in reduction
2713 clause. Formatting fixes.
2714 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2715 if clause modifiers.
2716 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2717 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2718 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2719 c_parser_omp_clause_is_device_ptr): New functions.
2720 (c_parser_omp_clause_ordered): Parse optional parameter.
2721 (c_parser_omp_clause_reduction): Handle array reductions.
2722 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2723 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2725 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2726 (c_parser_omp_clause_depend_sink): New function.
2727 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2728 (c_parser_omp_clause_map): Parse release/delete map kinds and
2729 optional always modifier.
2730 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2731 and c_finish_omp_clauses callers.
2732 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2733 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2734 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2735 (OMP_CRITICAL_CLAUSE_MASK): Define.
2736 (c_parser_omp_critical): Parse critical clauses.
2737 (c_parser_omp_for_loop): Handle doacross loops, adjust
2738 c_finish_omp_for and c_finish_omp_clauses callers.
2739 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2740 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2741 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2742 (c_parser_omp_for): Disallow ordered clause when combined with
2743 distribute. Disallow linear clause when combined with distribute
2744 and not combined with simd.
2745 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2746 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2747 parse clauses and if depend clause is found, don't parse a body.
2748 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2749 Allow target parallel without for after it.
2750 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2751 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2752 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2754 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2755 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2756 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2757 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2759 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2760 defaultmap and is_device_ptr clauses.
2761 (c_parser_omp_target): Parse target parallel and target simd. Set
2762 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2763 and target exit data. Diagnose invalid map kinds.
2764 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2765 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2767 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2769 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2770 (c_parser_omp_taskloop): New function.
2771 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2772 handle PRAGMA_OMP_TASKLOOP.
2773 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2774 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2775 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2776 Add IS_OMP argument, handle structure element bases, diagnose
2777 bitfields, pass IS_OMP recursively, diagnose known zero length
2778 array sections in depend clauses, handle array sections in reduction
2779 clause, diagnose negative length even for pointers.
2780 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2781 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2782 array sections in reduction clause, set
2783 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2784 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2785 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2786 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2788 2015-10-06 Marek Polacek <polacek@redhat.com>
2790 * c-parser.c (c_parser_statement_after_labels): Use
2791 protected_set_expr_location.
2792 (c_parser_omp_clause_num_gangs): Likewise.
2793 (c_parser_omp_clause_num_threads): Likewise.
2794 (c_parser_omp_clause_num_workers): Likewise.
2795 (c_parser_omp_clause_vector_length): Likewise.
2796 (c_parser_omp_clause_num_teams): Likewise.
2797 (c_parser_omp_clause_thread_limit): Likewise.
2798 * c-typeck.c (build_c_cast): Likewise.
2799 (c_cast_expr): Likewise.
2801 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2803 * c-typeck.c (c_tree_equal): Use real_equal instead of
2806 2015-10-04 Jason Merrill <jason@redhat.com>
2808 * c-parser.c (c_lex_one_token): Handle @synchronized.
2809 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2810 can change whether the function is transaction_safe.
2812 2015-10-02 Marek Polacek <polacek@redhat.com>
2815 * c-typeck.c (convert_for_assignment): Use the expansion point
2816 location throughout.
2818 2015-10-02 Marek Polacek <polacek@redhat.com>
2821 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2822 and pass it down to c_parser_if_statement.
2823 (c_parser_else_body): Add CHAIN parameter and pass it down to
2824 c_parser_statement_after_labels.
2825 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2826 duplicated if-else-if conditions.
2828 2015-10-01 Marek Polacek <polacek@redhat.com>
2830 * c-typeck.c (convert_for_assignment): Improve commentary.
2832 2015-09-30 Marek Polacek <polacek@redhat.com>
2835 * c-typeck.c (c_finish_return): Use the expansion point location for
2836 certain "return with value" warnings.
2838 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2840 * c-parser.c (pragma_lex): Add loc argument.
2842 2015-09-15 Marek Polacek <polacek@redhat.com>
2845 * c-decl.c (tag_exists_p): New function.
2846 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2847 struct/union/enum keywords are missing.
2848 * c-tree.h (tag_exists_p): Declare.
2850 2015-09-15 Marek Polacek <polacek@redhat.com>
2852 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2853 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2854 Return NULL_TREE instead of 0.
2855 (lookup_name): Return NULL_TREE instead of 0.
2856 (lookup_name_in_scope): Likewise.
2857 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2858 (parser_xref_tag): Use false instead of 0.
2859 (start_struct): Use true instead of 1.
2860 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2862 2015-09-14 Marek Polacek <polacek@redhat.com>
2864 * c-typeck.c (set_nonincremental_init_from_string): Use
2865 HOST_WIDE_INT_M1U when shifting a negative value.
2867 2015-09-09 Mark Wielaard <mjw@redhat.com>
2869 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2872 2015-09-10 Jakub Jelinek <jakub@redhat.com>
2875 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2876 into OMP_FOR_PRE_BODY rather than before the loop.
2878 2015-09-09 Jakub Jelinek <jakub@redhat.com>
2881 * c-parser.c (c_parser_oacc_all_clauses,
2882 c_parser_omp_all_clauses): Remove invalid clause from
2883 list of clauses even if parser->error is set.
2886 * c-parser.c (c_parser_omp_clause_aligned,
2887 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2889 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2893 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2894 instead of c_parser_unary_expression. If the result is !lvalue_p,
2895 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2897 2015-09-04 Marek Polacek <polacek@redhat.com>
2900 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2902 2015-09-03 Martin Sebor <msebor@redhat.com>
2905 * c-typeck.c (convert_arguments, parser_build_unary_op,
2906 build_conditional_expr, c_cast_expr, convert_for_assignment,
2907 build_binary_op, _objc_common_truthvalue_conversion): Call
2909 (c_decl_implicit): Define.
2911 2015-09-02 Marek Polacek <polacek@redhat.com>
2914 * c-parser.c (c_parser_enum_specifier): Give a better error for
2917 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2919 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2921 2015-08-12 Marek Polacek <polacek@redhat.com>
2923 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2926 2015-08-03 Marek Polacek <polacek@redhat.com>
2929 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2931 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2933 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2935 * c-parser.c (c_parser_if_body): Take token_indent_info
2936 argument. Call warn_for_misleading_indentation even when the
2937 body is a semicolon. Extract token_indent_infos corresponding
2938 to the guard, body and next tokens. Adjust call to
2939 warn_for_misleading_indentation accordingly.
2940 (c_parser_else_body): Likewise.
2941 (c_parser_if_statement): Likewise.
2942 (c_parser_while_statement): Likewise.
2943 (c_parser_for_statement): Likewise.
2945 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2946 Manuel López-Ibáñez <manu@gcc.gnu.org>
2948 * c-decl.c (get_parm_info): Remove static var. Update warning
2951 2015-07-27 Marek Polacek <polacek@redhat.com>
2955 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2957 2015-07-20 Marek Polacek <polacek@redhat.com>
2960 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2961 (build_binary_op): Warn about left shift overflows.
2963 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
2965 * c-array-notation.c: Adjust includes for flags.h changes.
2966 * c-objc-common.c: Likewise.
2968 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2970 * c-array-notation.c: Adjust includes.
2971 * c-aux-info.c: Likewise.
2972 * c-convert.c: Likewise.
2973 * c-decl.c: Likewise.
2974 * c-errors.c: Likewise.
2975 * c-lang.c: Likewise.
2976 * c-objc-common.c: Likewise.
2977 * c-parser.c: Likewise.
2978 * c-typeck.c: Likewise.
2980 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2983 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2985 2015-06-29 Marek Polacek <polacek@redhat.com>
2988 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2989 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2990 about -Wswitch-bool here.
2991 (do_case): Update c_add_case_label call.
2992 (c_finish_case): Update c_do_switch_warnings call.
2994 2015-06-27 Marek Polacek <polacek@redhat.com>
2996 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2998 2015-06-26 Marek Polacek <polacek@redhat.com>
3000 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3002 * c-typeck.c (array_to_pointer_conversion): Likewise.
3003 (build_unary_op): Likewise.
3004 (c_finish_return): Likewise.
3006 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3008 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3009 * c-parser.c: Likewise.
3011 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3013 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3014 instead of pointer_hash.
3015 (detect_field_duplicates): Likewise.
3017 2015-06-25 Marek Polacek <polacek@redhat.com>
3019 * c-array-notation.c: Use VAR_P throughout.
3020 * c-decl.c: Likewise.
3021 * c-objc-common.c: Likewise.
3022 * c-parser.c: Likewise.
3023 * c-typeck.c: Likewise.
3025 2015-06-25 Marek Polacek <polacek@redhat.com>
3027 * c-decl.c: Use is_global_var throughout.
3028 * c-parser.c: Likewise.
3029 * c-typeck.c: Likewise.
3031 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3033 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3034 * c-aux-info.c: Likewise.
3035 * c-convert.c: Likewise.
3036 * c-decl.c: Likewise.
3037 * c-errors.c: Likewise.
3038 * c-lang.c: Likewise.
3039 * c-objc-common.c: Likewise.
3040 * c-parser.c: Likewise.
3041 * c-typeck.c: Likewise.
3043 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3046 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3049 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3051 * c-decl.c (pop_scope): Register the main translation unit
3052 through the new debug hook.
3054 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3056 * c-array-notation.c : Adjust include files.
3057 * c-aux-info.c : Likewise.
3058 * c-convert.c : Likewise.
3059 * c-decl.c : Likewise.
3060 * c-errors.c : Likewise.
3061 * c-lang.c : Likewise.
3062 * c-lang.h : Likewise.
3063 * c-objc-common.c : Likewise.
3064 * c-parser.c : Likewise.
3065 * c-typeck.c : Likewise.
3067 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3069 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3070 immediately clobber it.
3071 (c_write_global_declarations_1): Remove call to
3072 check_global_declaration_1.
3073 (c_write_global_declarations_2): Remove.
3074 (c_write_final_cleanups): Rename from c_write_global_declarations.
3075 Remove call to finalize_compilation_unit.
3076 Remove calls to debugging hooks.
3077 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3078 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3079 * c-tree.h: Remove c_write_global_declarations.
3081 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3083 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3084 * c-aux-info.c: Likewise.
3085 * c-convert.c: Likewise.
3086 * c-decl.c: Likewise.
3087 * c-errors.c: Likewise.
3088 * c-lang.c: Likewise.
3089 * c-objc-common.c: Likewise.
3090 * c-parser.c: Likewise.
3091 * c-typeck.c: Likewise.
3093 2015-06-04 Marek Polacek <polacek@redhat.com>
3096 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3099 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3101 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3102 Warn for empty struct.
3103 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3105 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3107 * c-decl.c (start_function): Call plugin before parsing.
3108 (finish_function): Call plugin after parsing.
3110 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3113 * c-decl.c (merge_decls): Merge DECL_COMMON.
3115 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3117 * Make-lang.in (check_gcc_pallelize): Define.
3119 2015-05-22 Marek Polacek <polacek@redhat.com>
3122 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3125 2015-05-21 Marek Polacek <polacek@redhat.com>
3127 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3130 2015-05-20 Marek Polacek <polacek@redhat.com>
3132 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3133 * c-typeck.c: Likewise.
3135 2015-05-19 Marek Polacek <polacek@redhat.com>
3137 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3139 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3142 * c-parser.c (c_parser_omp_for_loop): Don't add
3143 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3144 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3145 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3148 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3150 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3153 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3156 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3159 2015-05-14 Marek Polacek <polacek@redhat.com>
3163 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3166 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3168 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3169 to add a call to warn_for_misleading_indentation.
3170 (c_parser_else_body): Likewise, adding param "else_loc".
3171 (c_parser_if_statement): Check for misleading indentation.
3172 (c_parser_while_statement): Likewise.
3173 (c_parser_for_statement): Likewise.
3175 2015-05-08 Marek Polacek <polacek@redhat.com>
3178 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3179 (output_init_element): Likewise.
3181 2015-05-07 Marek Polacek <polacek@redhat.com>
3184 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3187 2015-04-30 Marek Polacek <polacek@redhat.com>
3189 * c-typeck.c (set_init_label): Call error_at instead of error and
3192 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3195 * c-typeck.c (c_build_va_arg): Clarify the error message.
3197 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3199 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3200 OMP_STANDALONE_CLAUSES.
3202 2015-04-28 Marek Polacek <polacek@redhat.com>
3204 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3206 2015-04-28 Marek Polacek <polacek@redhat.com>
3209 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3211 2015-04-25 Marek Polacek <polacek@redhat.com>
3214 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3217 2015-04-23 Marek Polacek <polacek@redhat.com>
3220 * c-decl.c (set_labels_context_r): New function.
3221 (store_parm_decls): Call it via walk_tree_without_duplicates.
3222 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3223 instead of create_tmp_var. Build TARGET_EXPR instead of
3225 (build_atomic_assign): Use create_tmp_var_raw instead of
3226 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3228 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3230 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3231 (c_parser_omp_target_update): Add missed %> to error_at ().
3233 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3236 * c-decl.c (c_default_pointer_mode): Remove definition.
3237 * c-tree.h (c_default_pointer_mode): Remove declaration.
3239 2015-03-27 Tobias Burnus <burnus@net-b.de>
3242 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3244 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3245 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3246 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3248 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3250 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3251 attribute for DECL_EXTERNAL VAR_DECLs.
3253 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3255 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3258 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3261 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3262 before preparing arguments to warn_logical_not_parentheses.
3264 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3267 * c-typeck.c (parser_build_binary_op): Don't warn for
3268 !!x == y or !b == y where b is _Bool.
3270 2015-03-09 Marek Polacek <polacek@redhat.com>
3272 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3273 * c-decl.c (grokdeclarator): Likewise.
3274 * c-typeck.c (build_binary_op): Likewise.
3276 2015-02-27 Marek Polacek <polacek@redhat.com>
3279 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3281 2015-02-14 Marek Polacek <polacek@redhat.com>
3284 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3285 declared through a typedef name.
3287 2015-02-13 Marek Polacek <polacek@redhat.com>
3290 * c-decl.c (grokdeclarator): Print also the type when giving
3291 the error message about array's incomplete element type.
3293 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3296 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3297 check in the POP macro.
3299 2015-02-09 Marek Polacek <polacek@redhat.com>
3302 * c-typeck.c (process_init_element): Don't always wrap
3303 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3304 initializing a range of elements.
3306 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3310 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3312 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3314 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3315 processing enum declaration.
3317 2015-01-29 Marek Polacek <polacek@redhat.com>
3320 * c-typeck.c (pop_init_level): If constructor_elements has
3321 exactly one element with integer_zerop value, set constructor_zeroinit
3322 to 1. Remove braces around warning_init call.
3324 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3327 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3328 of FUNCTION_DECLs with error_mark_node.
3330 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3333 * c-typeck.c (convert_arguments): Return -1 if there are
3334 error_args, even if we've diagnosed too many arguments.
3336 2015-01-21 Richard Biener <rguenther@suse.de>
3339 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3340 for builtins the user declared correctly.
3342 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3343 Bernd Schmidt <bernds@codesourcery.com>
3344 Cesar Philippidis <cesar@codesourcery.com>
3345 James Norris <jnorris@codesourcery.com>
3346 Jakub Jelinek <jakub@redhat.com>
3347 Ilmir Usmanov <i.usmanov@samsung.com>
3349 * c-parser.c: Include "gomp-constants.h".
3350 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3351 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3352 Use OMP_CLAUSE_SET_MAP_KIND.
3353 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3354 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3355 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3356 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3357 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3358 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3359 "copyout", "create", "delete", "deviceptr", "gang", "host",
3360 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3361 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3362 "present_or_create", "pcreate", "seq", "self", "vector",
3363 "vector_length", "wait", "worker".
3364 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3365 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3366 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3367 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3368 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3369 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3370 (c_parser_oacc_data_clause_deviceptr)
3371 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3372 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3373 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3374 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3375 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3376 (c_parser_oacc_parallel, c_parser_oacc_update)
3377 (c_parser_oacc_wait): New functions.
3378 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3379 (c_finish_oacc_data): New prototypes.
3380 * c-typeck.c: Include "gomp-constants.h".
3381 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3382 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3383 OMP_CLAUSE_SET_MAP_KIND.
3384 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3385 (c_finish_oacc_data): New functions.
3386 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3387 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3388 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3389 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3390 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3391 GOMP_MAP_FORCE_DEVICEPTR.
3393 2015-01-09 Michael Collison <michael.collison@linaro.org>
3395 * c-array-notation.c: Include hash-set.h, machmode.h,
3396 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3397 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3398 * c-aux-info.c: Ditto.
3399 * c-convert.c: Ditto.
3401 * c-errors.c: Ditto.
3402 * c-lang.c: Dittoxs.
3403 * c-objc-common.c: Ditto.
3404 * c-parser.c: Ditto.
3405 * c-typeck.c: Include hash-set.h, machmode.h,
3406 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3407 fold-const.h, wide-int.h, inchash.h, real.h and
3408 fixed-value.h due to flattening of tree.h.
3410 2015-01-07 Marek Polacek <polacek@redhat.com>
3413 * c-typeck.c (process_init_element): Disallow initialization of
3414 a flexible array member with a string constant if the structure
3417 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3420 * c-typeck.c (convert_for_assignment, c_finish_return): For
3421 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3422 types also set in_late_binary_op around convert call.
3423 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3424 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3425 result on expr as last argument to ubsan_instrument_float_cast,
3426 if in_late_binary_op, don't use c_save_expr but save_expr.
3428 Update copyright years.
3430 2015-01-05 Marek Polacek <polacek@redhat.com>
3433 * c-typeck.c (build_array_ref): Pass loc down to
3434 warn_array_subscript_with_type_char.
3436 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3438 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3439 (common-pointer-type): For pointers to arrays take qualifiers from
3441 (build_conditional_expr): Add warnings for lost qualifiers.
3442 (comp-target-types): Allow pointers to arrays with different qualifiers.
3443 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3444 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3445 to PEDWARN_FOR_QUALIFIERS.
3447 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3450 * c-convert.c: Include ubsan.h.
3451 (convert): For real -> integral casts and
3452 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3453 instead instrument the float cast directly.
3455 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3457 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3458 c_finish_stmt_expr): Remove NULL last argument from
3459 create_tmp_var_raw and create_tmp_var calls.
3460 * c-array-notation.c (fix_builtin_array_notation_fn,
3461 build_array_notation_expr, fix_conditional_array_notations_1,
3462 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3464 2014-11-28 Marek Polacek <polacek@redhat.com>
3467 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3468 convert the right operand to integer type.
3470 2014-11-25 Marek Polacek <polacek@redhat.com>
3473 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3474 for inline functions.
3476 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3479 * c-typeck.c (build_array_ref): Adjust
3480 convert_vector_to_pointer_for_subscript caller. If it returns true,
3481 call non_lvalue_loc on the result.
3483 2014-11-11 Richard Biener <rguenther@suse.de>
3485 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3488 2014-11-10 Andi Kleen <ak@linux.intel.com>
3491 * c-parser.c (c_parser_statement_after_labels): Call
3493 (c_parser_if_statement): Dito.
3494 (c_parser_switch_statement): Dito.
3495 (c_parser_while_statement): Dito.
3496 (c_parser_do_statement): Dito.
3497 (c_parser_for_statement): Dito.
3498 * c-typeck.c (c_finish_loop): Dito.
3500 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3502 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3503 OPT_Wshift_count_overflow in the warnings.
3505 2014-10-30 Marek Polacek <polacek@redhat.com>
3507 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3508 print the stripped version as well, if they're not the same.
3510 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3512 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3515 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3517 * c-decl.c: Adjust include files.
3518 * c-parser.c: Ditto.
3520 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3521 Tom Tromey <tromey@redhat.com>
3523 * c-tree.h (enum c_oracle_request): New.
3524 (c_binding_oracle_function): New typedef.
3525 (c_binding_oracle, c_pushtag, c_bind): Declare.
3526 * c-decl.c (c_binding_oracle): New global.
3527 (I_SYMBOL_CHECKED): New macro.
3528 (i_symbol_binding): New function.
3529 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3530 (I_TAG_CHECKED): New macro.
3531 (i_tag_binding): New function.
3532 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3533 (I_LABEL_CHECKED): New macro.
3534 (i_label_binding): New function.
3535 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3536 (c_print_identifier): Save and restore c_binding_oracle.
3537 (c_pushtag, c_bind): New functions.
3539 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3541 * c-typeck.c: Adjust include files.
3543 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3546 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3547 initialization here...
3548 (c_initialize_diagnostics): ... but here. Set defaults after
3549 building pretty-printer.
3551 2014-10-23 Marek Polacek <polacek@redhat.com>
3554 * c-decl.c (pop_scope): Don't print warning in external_scope.
3556 2014-10-19 Marek Polacek <polacek@redhat.com>
3559 * c-typeck.c (output_init_element): Allow initializing objects with
3560 static storage duration with compound literals even in C99 and add
3563 2014-10-17 Marek Polacek <polacek@redhat.com>
3566 * c-typeck.c (digest_init): Allow initializing objects with static
3567 storage duration with compound literals even in C99 and add pedwarn
3570 2014-10-17 Marek Polacek <polacek@redhat.com>
3573 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3574 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3575 error multiple times. Print the type.
3577 2014-10-17 Marek Polacek <polacek@redhat.com>
3580 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3583 2014-10-17 Marek Polacek <polacek@redhat.com>
3585 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3586 (start_function): Use OPT_Wimplicit_int instead of 0.
3587 (store_parm_decls_oldstyle): Likewise.
3589 2014-10-17 Alan Modra <amodra@gmail.com>
3592 * c-decl.c (merge_decls): Don't merge section name or tls model
3593 to newdecl symtab node, instead merge to olddecl. Override
3594 existing olddecl section name. Set tls_model for all thread-local
3595 vars, not just OMP thread-private ones. Remove incorrect comment.
3597 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3599 * c-decl.c: Adjust include files.
3601 2014-10-14 DJ Delorie <dj@redhat.com>
3603 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3604 (c_token_starts_typename): Check all __intN, not just __int128.
3605 (c_token_starts_declspecs): Likewise.
3606 (c_parser_declspecs): Likewise.
3607 (c_parser_attribute_any_word): Likewise.
3608 (c_parser_objc_selector): Likewise.
3609 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3610 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3612 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3614 (finish_declspecs): Likewise.
3616 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3618 * c-parser.c (c_parser_all_labels): New function to replace
3620 (c_parser_statement): Call the new function.
3622 2014-10-09 Marek Polacek <polacek@redhat.com>
3625 * c-typeck.c (pop_init_level): Don't warn about initializing
3628 2014-10-07 Marek Polacek <polacek@redhat.com>
3631 * c-decl.c (header_for_builtin_fn): New function.
3632 (implicitly_declare): Suggest which header to include.
3634 2014-10-07 Marek Polacek <polacek@redhat.com>
3636 * c-convert.c (convert): Use error_operand_p.
3637 * c-typeck.c (require_complete_type): Likewise.
3638 (really_atomic_lvalue): Likewise.
3639 (digest_init): Likewise.
3640 (handle_omp_array_sections_1): Likewise.
3642 2014-10-03 Marek Polacek <polacek@redhat.com>
3645 * c-decl.c (pop_scope): Don't warn about "inline function declared
3646 but never defined" for functions marked with gnu_inline attribute.
3648 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3651 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3652 on low_bound and length.
3654 2014-09-24 Marek Polacek <polacek@redhat.com>
3658 * c-parser.c: Don't define CPP_KEYWORD.
3659 (c_parser_switch_statement): Pass original type to c_finish_case.
3660 * c-tree.h (c_finish_case): Update declaration.
3661 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3662 conditionally to c_do_switch_warnings.
3664 2014-09-03 Marek Polacek <polacek@redhat.com>
3667 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3670 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3671 Balaji V. Iyer <balaji.v.iyer@intel.com>
3672 Igor Zamyatin <igor.zamyatin@intel.com>
3674 * c-parser.c (c_parser_cilk_for): New function.
3675 (c_parser_cilk_grainsize): Likewise.
3676 (c_get_temp_regvar): Likewise.
3677 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3678 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3679 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3680 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3683 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3685 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3686 with using HOST_WIDE_INT without truncation to 'int'
3688 2014-08-22 Marek Polacek <polacek@redhat.com>
3691 * c-typeck.c (parser_build_binary_op): Adjust call to
3692 warn_logical_not_parentheses.
3694 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3697 * c-parser.c (c_parser_array_notation): Check for correct
3698 type of an array added.
3700 2014-08-19 Marek Polacek <polacek@redhat.com>
3703 * c-typeck.c (build_binary_op): If either operand of a comparison
3704 is a boolean expression, call maybe_warn_bool_compare.
3706 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3709 * c-typeck.c (build_c_cast): Do a conversion even when the
3710 TYPE_MAIN_VARIANTs are the same.
3712 2014-08-19 Marek Polacek <polacek@redhat.com>
3714 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3715 pedwarn_c99 instead of pedwarn.
3716 (grokfield): Likewise.
3717 (warn_defaults_to): New function.
3718 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3719 Unconditionally call pedwarn_c99 instead of pedwarn.
3720 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3721 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3722 check flag_isoc11 before.
3723 * c-errors.c (pedwarn_c99): Change the return type to bool.
3724 Handle -Wc99-c11-compat.
3725 * c-parser.c (disable_extension_diagnostics): Handle
3726 warn_c99_c11_compat.
3727 (restore_extension_diagnostics): Likewise.
3728 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3729 instead of pedwarn, don't check flag_isoc11 before.
3730 (c_parser_declspecs): Likewise.
3731 (c_parser_alignas_specifier): Likewise.
3732 (c_parser_alignof_expression): Likewise.
3733 (c_parser_generic_selection): Likewise.
3734 * c-tree.h (pedwarn_c99): Update declaration.
3735 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3738 2014-08-19 Marek Polacek <polacek@redhat.com>
3740 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3742 * c-errors.c: Include "opts.h".
3743 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3744 * c-parser.c (disable_extension_diagnostics): Handle negative value
3745 of warn_c90_c99_compat, too.
3746 (restore_extension_diagnostics): Likewise.
3747 (c_parser_compound_statement_nostart): Pass
3748 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3750 2014-08-12 Marek Polacek <polacek@redhat.com>
3752 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3754 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3756 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3758 2014-08-10 Marek Polacek <polacek@redhat.com>
3761 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3762 Call pedwarn_c90 instead of pedwarn.
3763 (check_bitfield_type_and_width): Likewise.
3764 (declspecs_add_qual): Likewise.
3765 (declspecs_add_type): Likewise.
3766 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3767 Adjust to only call pedwarn_c90.
3768 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3769 pedwarn_c90 instead of pedwarn.
3770 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3771 * c-parser.c (disable_extension_diagnostics): Handle
3772 warn_c90_c99_compat.
3773 (restore_extension_diagnostics): Likewise.
3774 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3775 pedwarn_c90 instead of pedwarn.
3776 (c_parser_initelt): Likewise.
3777 (c_parser_postfix_expression): Likewise.
3778 (c_parser_postfix_expression_after_paren_type): Likewise.
3779 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3780 * c-tree.h: Fix formatting.
3781 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3782 pedwarn_c90 instead of pedwarn.
3784 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3786 * c-typeck.c: Remove include of pointer-set.h.
3788 2014-08-07 Marek Polacek <polacek@redhat.com>
3790 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3792 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3794 * c-typeck.c: Use hash_map instead of pointer_map.
3796 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3798 * c-decl.c: Use hash_set instead of pointer_set.
3800 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3803 * c-array-notation.c (expand_array_notations): Handling
3806 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3809 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3812 2014-07-30 Tom Tromey <tromey@redhat.com>
3814 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3816 (really_start_incremental_init, push_init_level): Initialize
3818 (pop_init_level): Set global designator_depth.
3819 (process_init_element): Check for designated_init attribute.
3821 2014-07-20 Marek Polacek <polacek@redhat.com>
3824 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3825 (implicitly_declare): Pass location to implicit_decl_warning.
3827 2014-07-14 Jakub Jelinek <jakub@redhat.com>
3830 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3831 If non-NULL, call c_parser_check_literal_zero.
3832 (c_parser_check_literal_zero): New function.
3833 (c_parser_postfix_expression_after_primary): Adjust
3834 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3836 2014-07-06 Marek Polacek <polacek@redhat.com>
3839 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3840 * c-tree.h (C_ARRAY_PARAMETER): Define.
3841 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3844 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
3845 Chen Gang <gang.chen.5i5j@gmail.com>
3847 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3850 2014-07-01 Marek Polacek <polacek@redhat.com>
3852 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3853 instead of 0 to WARN_FOR_ASSIGNMENT.
3855 2014-07-01 Marek Polacek <polacek@redhat.com>
3858 * c-typeck.c (convert_for_assignment): Pass
3859 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3861 2014-06-30 Marek Polacek <polacek@redhat.com>
3863 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3864 has no_sanitize_undefined attribute.
3866 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3869 * c-array-notation.c (fix_builtin_array_notation_fn):
3870 Check for 0 arguments in builtin call. Check that bultin argument is
3872 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3875 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3877 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3878 qualifiers in __auto_type for atomic types.
3879 (c_parser_typeof_specifier): Discard all type qualifiers in
3880 __typeof__ for atomic types.
3882 2014-06-25 Marek Polacek <polacek@redhat.com>
3885 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3886 the return expression to c_finish_return.
3888 2014-06-25 Jakub Jelinek <jakub@redhat.com>
3890 * c-typeck.c (c_finish_omp_clauses): Make sure
3891 OMP_CLAUSE_LINEAR_STEP has correct type.
3893 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3897 2014-06-24 Jakub Jelinek <jakub@redhat.com>
3899 * c-parser.c (c_parser_omp_for_loop): For
3900 #pragma omp parallel for simd move lastprivate clause from parallel
3901 to for rather than simd.
3903 2014-06-23 Marek Polacek <polacek@redhat.com>
3905 * c-typeck.c (parser_build_binary_op): Don't call
3906 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3908 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
3910 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3911 * c-decl.c (merge_decls): Likewise.
3913 2014-06-09 Marek Polacek <polacek@redhat.com>
3916 * c-typeck.c (error_init): Call inform instead of error_at.
3917 (pedwarn_init): Call inform instead of pedwarn.
3918 (warning_init): Call inform instead of warning_at.
3920 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
3922 * c-decl.c (merge_decls): Use set_decl_section_name.
3923 (duplicate_decls): Remove node if it exists.
3925 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3928 * c-typeck.c (push_init_level, process_init_element,
3929 pop_init_level): Correct check for zero initialization, move
3930 missing brace warning to respect zero initialization.
3932 2014-06-05 Marek Polacek <polacek@redhat.com>
3935 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3937 2014-06-05 Marek Polacek <polacek@redhat.com>
3940 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3941 on the left hand side operand of a comparison.
3943 2014-06-05 Marek Polacek <polacek@redhat.com>
3946 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3947 Print note only if the warning was printed.
3949 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3952 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3955 2014-06-03 Marek Polacek <polacek@redhat.com>
3958 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3960 * c-tree.h (c_start_case): Update.
3961 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3962 switch condition has boolean value.
3964 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
3966 * c-decl.c: Include builtins.h.
3967 * c-parser.c: Likewise.
3969 2014-05-27 Marek Polacek <polacek@redhat.com>
3972 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3973 error and warning calls to error_at and warning_at. Pass location of
3974 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3975 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3976 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3978 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3981 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3982 function parameters.
3984 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
3986 * c-decl.c (merge_decls): Preserve symtab node pointers.
3987 (duplicate_decls): Free new decl.
3989 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3991 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3994 * c-parser.c (c_parser_omp_target): Return bool values.
3996 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3998 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3999 num_teams_loc variable to num_thread_limit_loc.
4001 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4003 * c-array-notation.c (expand_array_notations): Use void_node
4004 instead of void_zero_node.
4006 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4008 * c-decl.c (finish_struct): Adjust.
4009 (finish_enum): Likewise.
4011 (record_inline_static): Likewise.
4012 (push_scope): Likewise.
4013 (make_label): Likewise.
4014 (lookup_label_for_goto): Likewise.
4015 (finish_struct): Likewise.
4016 (finish_enum): Likewise.
4017 (store_parm_decls): Likewise.
4018 (c_push_function_context): Likewise.
4019 * c-lang.h: Remove usage of variable_size gty attribute.
4020 * c-parser.c (c_parse_init): Adjust.
4021 (c_parse_file): Likewise.
4023 2014-05-13 Marek Polacek <polacek@redhat.com>
4026 * c-typeck.c (convert_for_assignment): Pass location to
4027 WARN_FOR_ASSIGNMENT instead of input_location.
4029 2014-05-10 Marek Polacek <polacek@redhat.com>
4031 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4032 maybe_warn_string_init.
4033 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4034 maybe_warn_string_init.
4035 * c-tree.h (maybe_warn_string_init): Update declaration.
4036 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4037 Call pedwarn_init with loc instead of with input_location.
4038 (digest_init): Pass init_loc to maybe_warn_string_init.
4039 (pop_init_level): Call pedwarn_init with loc instead of with
4041 (set_init_index): Likewise.
4042 (process_init_element): Likewise.
4044 2014-05-09 Marek Polacek <polacek@redhat.com>
4047 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4048 (c_parser_initelt): Pass location to set_init_label. Pass array index
4049 location to set_init_index.
4050 * c-tree.h (push_init_level): Update declaration.
4051 (pop_init_level): Likewise.
4052 (set_init_index): Likewise.
4053 (set_init_label): Likewise.
4054 * c-typeck.c (error_init): Add location parameter. Call error_at
4056 (digest_init): Pass init_loc to error_init.
4057 (really_start_incremental_init):
4058 (push_init_level): Add location parameter. Pass loc to pop_init_level
4060 (pop_init_level): Likewise.
4061 (set_designator): Add location parameter. Pass loc to pop_init_level,
4062 push_init_level, and error_init.
4063 (set_init_index): Add location parameter. Pass loc to error_init and
4065 (set_init_label): Likewise.
4066 (output_init_element): Pass loc to error_init.
4067 (process_init_element): Pass loc to error_init, pop_init_level,
4068 pedwarn_init, and push_init_level.
4070 2014-05-09 Marek Polacek <polacek@redhat.com>
4073 * c-parser.c (c_parser_attributes): Parse the arguments as an
4074 expression-list if the attribute takes identifier.
4076 2014-05-08 Marek Polacek <polacek@redhat.com>
4079 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4082 2014-05-08 Marek Polacek <polacek@redhat.com>
4085 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4088 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4089 Mike Stump <mikestump@comcast.net>
4090 Richard Sandiford <rdsandiford@googlemail.com>
4092 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4093 (finish_enum): Use wide-int interfaces.
4094 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4095 * c-typeck.c (build_c_cast): Likewise.
4096 (set_nonincremental_init_from_string): Likewise.
4097 (c_tree_equal): Likewise.
4099 2014-05-02 Marek Polacek <polacek@redhat.com>
4102 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4103 Return size_one_node when the type is not complete.
4104 (pointer_diff): Remove comment.
4105 (build_unary_op): Improve error messages.
4107 2014-05-02 Marek Polacek <polacek@redhat.com>
4109 * c-typeck.c (c_finish_return): Separate warning_at calls.
4111 2014-05-02 Marek Polacek <polacek@redhat.com>
4113 * c-tree.h (error_init): Remove declaration.
4114 (pedwarn_init): Likewise.
4115 * c-typeck.c (error_init): Make static and move above.
4116 (pedwarn_init): Likewise.
4117 (warning_init): Move above.
4118 (maybe_warn_string_init): Likewise.
4120 2014-05-01 Jeff Law <law@redhat.com>
4124 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4125 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4128 2014-05-02 Marek Polacek <polacek@redhat.com>
4131 * c-typeck.c (push_init_level): Set constructor_designated to
4132 p->designated for structures.
4134 2014-05-01 Marek Polacek <polacek@redhat.com>
4137 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4138 function-definition has an attribute after the declarator.
4140 2014-05-01 Marek Polacek <polacek@redhat.com>
4143 * c-typeck.c (warning_init): Add location_t parameter. Call
4144 warning_at instead of warning.
4145 (push_init_level): Pass input_location to warning_init.
4146 (add_pending_init): Add location_t parameter. Pass loc to
4148 (set_nonincremental_init): Pass input_location to add_pending_init.
4149 (set_nonincremental_init_from_string): Likewise.
4150 (output_init_element): Pass loc to warning_init and to
4153 2014-05-01 Marek Polacek <polacek@redhat.com>
4156 * c-typeck.c (c_finish_return): Distinguish between label and variable
4157 when warning about returning local address.
4159 2014-05-01 Marek Polacek <polacek@redhat.com>
4162 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4165 2014-05-01 Marek Polacek <polacek@redhat.com>
4168 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4169 instead of 0 to WARN_FOR_QUALIFIERS.
4171 2014-05-01 Marek Polacek <polacek@redhat.com>
4174 * c-typeck.c (default_conversion): Use better location for
4177 2014-04-30 Marek Polacek <polacek@redhat.com>
4179 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4180 also when SANITIZE_FLOAT_DIVIDE is on.
4182 2014-04-30 Marek Polacek <polacek@redhat.com>
4185 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4186 and pedwarn_init. Use loc insted of input_location.
4188 2014-04-30 Marek Polacek <polacek@redhat.com>
4191 * c-typeck.c (build_binary_op): Use location when warning about
4194 2014-04-25 Marek Polacek <polacek@redhat.com>
4197 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4198 always_inline/noinline and hot/cold attributes.
4200 2014-04-25 Marek Polacek <polacek@redhat.com>
4203 * c-parser.c (c_parser_initelt): Pass input_location to
4204 process_init_element.
4205 (c_parser_initval): Pass loc to process_init_element.
4206 * c-tree.h (process_init_element): Adjust declaration.
4207 * c-typeck.c (push_init_level): Pass input_location to
4208 process_init_element.
4209 (pop_init_level): Likewise.
4210 (set_designator): Likewise.
4211 (output_init_element): Add location_t parameter. Pass loc to
4213 (output_pending_init_elements): Pass input_location to
4214 output_init_element.
4215 (process_init_element): Add location_t parameter. Pass loc to
4216 output_init_element.
4218 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4220 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4221 atomic-clause, allow comma in between atomic-clause and
4224 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4227 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4228 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4230 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4233 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4234 create_tmp_var instead build_decl for creating temps.
4235 (build_array_notation_expr): Likewise.
4236 (fix_conditional_array_notations_1): Likewise.
4237 (fix_array_notation_expr): Likewise.
4238 (fix_array_notation_call_expr): Likewise.
4240 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4243 * c-tree.h (c_build_function_call_vec): New prototype.
4244 * c-typeck.c (build_function_call_vec): Don't call
4245 resolve_overloaded_builtin here.
4246 (c_build_function_call_vec): New wrapper function around
4247 build_function_call_vec. Call resolve_overloaded_builtin here.
4248 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4249 Call c_build_function_call_vec instead of build_function_call_vec.
4250 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4251 * c-decl.c (finish_decl): Likewise.
4253 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4256 * c-typeck.c: Use correct format string in cast-qual warning
4258 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4260 * c-decl.c (c_decl_attributes): Use
4261 lang_hooks.types.omp_mappable_type.
4262 * c-typeck.c (c_finish_omp_clauses): Likewise.
4264 2014-03-06 Marek Polacek <polacek@redhat.com>
4267 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4268 of checking tree code.
4270 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4272 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4273 (c_parser_parameter_declaration): Likewise.
4275 2014-02-19 Marek Polacek <polacek@redhat.com>
4278 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4279 Call mark_exp_read on exp.value.
4280 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4281 TREE_ADDRESSABLE on old instead of val.
4282 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4284 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4286 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4287 C_EXPR_APPEND by vec_safe_push.
4288 * c-tree.h (C_EXPR_APPEND): Remove.
4290 2014-01-31 Marek Polacek <polacek@redhat.com>
4293 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4294 build_function_call_vec.
4295 (build_function_call): Likewise.
4296 (build_atomic_assign): Likewise.
4297 (build_function_call_vec): Add arg_loc parameter. Use it.
4298 (convert_arguments): Likewise.
4299 (convert_for_assignment): Rename rhs_loc to expr_loc.
4300 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4301 (c_parser_objc_keywordexpr): Likewise.
4302 (c_parser_postfix_expression_after_primary): Call
4303 build_function_call_vec with expr_loc rather than op_loc.
4304 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4305 build_function_call_vec.
4306 (c_parser_expr_list): Add locations parameter. Fill it with locations
4307 of function arguments.
4308 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4310 2014-01-30 Marek Polacek <polacek@redhat.com>
4313 * c-typeck.c (build_function_call_vec): Use loc parameter.
4314 (convert_arguments): Add location parameter. Use it.
4315 (ep_convert_and_check): Likewise.
4316 (build_atomic_assign): Adjust convert_for_assignment call.
4317 (build_modify_expr): Likewise.
4318 (digest_init): Likewise.
4319 (c_finish_return): Likewise.
4320 (build_conditional_expr): Adjust ep_convert_and_check calls.
4321 (convert_for_assignment): Add rhs_loc parameter. Use it.
4322 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4325 2014-01-30 Richard Biener <rguenther@suse.de>
4328 * c-typeck.c (build_function_call_vec): Do not replace calls
4329 to a function via an incompatible type with a runtime abort.
4331 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4333 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4334 flag_enable_cilkplus with flag_cilkplus.
4335 (c_parser_direct_declarator_inner): Likewise.
4336 (c_parser_attribute_any_word): Likewise.
4337 (c_parser_attributes): Likewise.
4338 (c_parser_compound_statement): Likewise.
4339 (c_parser_statement_after_labels): Likewise.
4340 (c_parser_if_statement): Likewise.
4341 (c_parser_switch_statement): Likewise.
4342 (c_parser_do_statement): Likewise.
4343 (c_parser_for_statement): Likewise.
4344 (c_parser_unary_expression): Likewise.
4345 (c_parser_postfix_expression): Likewise.
4346 (c_parser_postfix_expression_after_primary): Likewise.
4347 (c_parser_postfix_expression_after_primary): Likewise.
4348 (c_parser_omp_clause_name): Likewise.
4349 (c_finish_omp_declare_simd): Likewise.
4350 (c_parser_cilk_verify_simd): Likewise.
4351 * c-typeck.c (build_array_ref): Likewise.
4352 (build_function_call_vec): Likewise.
4353 (convert_arguments): Likewise.
4354 (build_compound_expr): Likewise.
4355 (c_finish_return): Likewise.
4356 (c_finish_if_stmt): Likewise.
4357 (c_finish_loop): Likewise.
4358 (build_binary_op): Likewise.
4360 2014-01-23 Marek Polacek <polacek@redhat.com>
4363 * c-typeck.c (parser_build_binary_op): Use location instead of
4365 (build_binary_op): Pass location to shorten_compare.
4367 2014-01-23 Marek Polacek <polacek@redhat.com>
4370 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4373 2014-01-23 Marek Polacek <polacek@redhat.com>
4376 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4377 of a comma expression.
4378 (emit_side_effect_warnings): Likewise.
4380 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4383 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4384 function to use walk_tree and moved a lot of its functionality to
4385 expand_array_notations.
4386 (expand_array_notations): New function.
4388 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4390 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4391 attribute an attribute without value.
4393 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4396 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4397 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4399 2014-01-22 Marek Polacek <polacek@redhat.com>
4402 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4403 of remove_c_maybe_const_expr on op1 and op2.
4405 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4408 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4409 effects, preevaluate rhs using SAVE_EXPR first.
4411 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4414 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4415 statements with if-elseif statements.
4417 2014-01-06 Marek Polacek <polacek@redhat.com>
4420 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4421 defined bit-field types only in ISO C.
4423 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4425 Update copyright years
4427 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4429 * c-array-notation.c: Use the standard form for the copyright notice.
4431 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4433 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4434 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4435 field in parser is not empty. If not-empty, call the function
4436 c_parser_finish_omp_declare_simd.
4437 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4438 between SIMD-enabled functions and #pragma simd. Added new parameter.
4439 (c_parser_cilk_all_clauses): Modified the usage of the function
4440 c_parser_cilk_clause_vectorlength as mentioned above.
4441 (c_parser_cilk_simd_fn_vector_attrs): New function.
4442 (c_finish_cilk_simd_fn_tokens): Likewise.
4443 (is_cilkplus_vector_p): Likewise.
4444 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4445 "nomask," and "mask" strings in clause name.
4446 (c_parser_omp_all_clauses): Added 3 new case statements:
4447 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4448 PRAGMA_CILK_CLAUSE_NOMASK.
4449 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4450 check for vector attribute and if so call the function
4451 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4452 called the function c_finish_cilk_simd_fn_tokens.
4453 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4454 parser field is non-empty. If so, parse them as you would parse
4455 the omp declare simd pragma.
4456 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4457 Added a check when step is a parameter and flag it as error.
4458 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4459 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4462 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4464 * c-parser.c (c_parser_omp_parallel): Fix description.
4466 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4468 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4469 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4470 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4471 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4473 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4476 * c-parser.c (c_parser_alignas_specifier): Use
4477 c_sizeof_or_alignof_type instead of c_alignof.
4478 (c_parser_alignof_expression): Likewise, with min_alignof
4479 parameter depending on alignof spelling used.
4481 2013-12-04 Marek Polacek <polacek@redhat.com>
4484 * c-decl.c (start_function): Don't warn for missing prototype for
4487 2013-12-03 Marek Polacek <polacek@redhat.com>
4490 * c-decl.c (build_compound_literal): Allow compound literals with
4491 empty initial value.
4493 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4496 * c-typeck.c (build_modify_expr): Diagnose assignment to
4497 expression with array type.
4499 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4502 * c-typeck.c (process_init_element): Do not treat a string as
4503 initializing a whole array when used with a designator for an
4506 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4509 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4510 an inline function following a static declaration.
4512 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4515 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4516 to p_name before calling c_parser_omp_teams instead of after.
4517 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4518 argument. Remove unused p_name variable.
4520 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4521 Jakub Jelinek <jakub@redhat.com>
4523 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4524 external_scope is NULL.
4526 2013-11-27 Tom de Vries <tom@codesourcery.com>
4527 Marc Glisse <marc.glisse@inria.fr>
4530 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4532 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4534 * c-typeck.c: Add required include files from gimple.h.
4536 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4538 * c-decl.c (define_label, shadow_tag_warned)
4539 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4540 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4541 (declspecs_add_type): Remove use of in_system_header macro.
4542 * c-parser.c (c_parser_unary_expression): Likewise.
4543 * c-typeck.c (store_init_value, process_init_element)
4544 (c_start_case): Likewise.
4546 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4549 * c-parser.c (c_parser_set_source_position_from_token): Remove
4550 reference to in_system_header from comment.
4552 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4554 * c-decl.c (grokdeclarator): Update comment to refer to
4555 tree_to_[su]hwi rather than tree_low_cst.
4557 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4559 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4560 tree_to_uhwi throughout.
4562 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4564 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4567 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4569 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4572 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4574 * c-parser.c (c_parser_cilk_simd): New.
4575 (c_parser_cilk_verify_simd): New.
4576 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4577 (c_parser_omp_for_loop): Add case for NE_EXPR.
4578 Set c_break_label for CILK_SIMD.
4579 (c_parser_cilk_clause_vectorlength): New.
4580 (c_parser_cilk_clause_linear): New.
4581 (c_parser_cilk_clause_name): New.
4582 (c_parser_cilk_all_clauses): New.
4583 * c-typeck.c (build_unary_op): Pass location argument to
4585 (build_modify_expr): Same.
4586 (build_asm_expr): Same.
4587 (c_finish_bc_stmt): Error on break/continue in loops.
4589 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4591 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4593 2013-11-14 Diego Novillo <dnovillo@google.com>
4595 * c-decl.c: Include print-tree.h.
4596 Include stor-layout.h.
4599 Include stringpool.h.
4600 * c-lang.c: Include fold-const.h.
4601 * c-parser.c: Include stringpool.h.
4603 Include stor-layout.h.
4605 Include trans-mem.h.
4606 * c-typeck.c: Include stor-layout.h.
4607 Include trans-mem.h.
4611 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4613 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4614 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4616 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4617 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4619 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4620 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4621 (c_parser_declarator, c_parser_direct_declarator_inner)
4622 (c_parser_parameter_declaration, c_parser_type_name): All callers
4624 (c_parser_declaration_or_fndef): Handle declarations with type
4625 determined from the initializer.
4627 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4629 * c-typeck.c: Include gimplify.h.
4631 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4633 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4634 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4636 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4637 or _Thread_local as appropriate in diagnostics.
4638 (build_null_declspecs): Initialize ret->thread_gnu_p.
4639 (declspecs_add_scspec): Handle either __thread or _Thread_local
4640 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4641 pedantic. Do not disallow _Thread_local extern and _Thread_local
4644 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4645 Andrew MacLeod <amacleod@redhat.com>
4647 * c-aux-info.c (gen_type): Handle atomic qualifier.
4648 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4649 qualifiers when compating types.
4650 (shadow_tag_warned): Handle atomic_p in declspecs.
4651 (quals_from_declspecs): Likewise.
4652 (start_decl): Use c_type_promotes_to when promoting argument
4654 (grokdeclarator): Handle _Atomic.
4655 (get_parm_info): Diagnose any qualifier on "void" as only
4657 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4658 comparing types. Use c_type_promotes_to when promoting argument
4660 (finish_function): Use c_type_promotes_to when promoting argument
4662 (build_null_declspecs): Handle atomic_p in declspecs.
4663 (declspecs_add_qual): Handle RID_ATOMIC.
4664 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4665 (c_token_starts_declspecs): Handle RID_ATOMIC.
4666 (c_parser_declspecs): Handle atomic type specifiers and
4668 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4669 from types of expressions with atomic type.
4670 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4671 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4672 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4673 (c_parser_statement_after_labels, c_parser_switch_statement)
4674 (c_parser_for_statement, c_parser_expr_no_commas)
4675 (c_parser_conditional_expression, c_parser_binary_expression)
4676 (c_parser_cast_expression, c_parser_unary_expression)
4677 (c_parser_postfix_expression)
4678 (c_parser_postfix_expression_after_primary, c_parser_expression):
4679 Use convert_lvalue_to_rvalue.
4680 (c_parser_expression_conv, c_parser_expr_list): Document
4681 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4682 (c_parser_objc_synchronized_statement): Use
4683 convert_lvalue_to_rvalue.
4684 (c_parser_objc_selector): Handle RID_ATOMIC.
4685 (c_parser_objc_receiver, c_parser_array_notation): Use
4686 convert_lvalue_to_rvalue.
4687 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4688 _Atomic (type-name).
4689 (struct c_declspecs): Add atomic_p field.
4690 (convert_lvalue_to_rvalue): Declare.
4691 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4692 corresponding atomic types.
4693 (qualify_type): Don't add _Atomic qualifiers from second argument.
4694 (comp_target_types): Do not allow _Atomic mismatches.
4695 (type_lists_compatible_p): Do not remove atomic qualifiers when
4697 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4698 (build_atomic_assign): New functions.
4699 (build_unary_op): Use build_atomic_assign for atomic increment and
4701 (build_conditional_expr): Do not treat _Atomic void as a qualified
4703 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4704 (find_anonymous_field_with_type, convert_to_anonymous_field)
4705 (convert_for_assignment): Do not remove atomic qualifiers when
4707 (digest_init): Do not accept initialization of arrays of atomic
4708 elements by string constants.
4709 (build_asm_expr): Use convert_lvalue_to_rvalue.
4710 (build_binary_op): Do not treat _Atomic void as a qualified
4713 2013-11-06 DJ Delorie <dj@redhat.com>
4715 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4716 both explicit and builtin, print the location of the explicit one.
4718 2013-11-05 Tobias Burnus <burnus@net-b.de>
4720 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4721 c_parser_omp_distribute, c_parser_omp_teams,
4722 c_parser_omp_target, c_parser_omp_declare): Handle
4725 2013-11-03 Marek Polacek <polacek@redhat.com>
4727 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4729 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4731 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4732 check_dup_generic at the end, unless remove is true.
4733 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4735 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4737 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4739 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4740 with decl that is not pointer nor array.
4742 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4744 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4745 a spawning function is found.
4746 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4747 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4748 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4749 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4751 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4752 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4754 (c_finish_return): Added a check to reject _Cilk_spawn in return
4756 (build_cilk_spawn): New function.
4757 (build_cilk_sync): Likewise.
4758 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4760 2013-10-27 Tobias Burnus <burnus@net-b.de>
4763 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4764 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4765 (c_parser_statement_after_labels): Update calls.
4767 2013-10-24 Tobias Burnus <burnus@net-b.de>
4770 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4771 Handle PRAGMA_IVDEP.
4772 (c_parser_statement_after_labels): Update call.
4774 2013-10-24 Marek Polacek <polacek@redhat.com>
4776 * c-parser.c (c_parser_struct_declaration): Add a comment.
4777 (c_parser_declarator): Don't allow _Alignas here.
4779 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4781 * c-parser.c: Include omp-low.h.
4782 * c-typeck.c: Likewise.
4784 2013-10-17 Marek Polacek <polacek@redhat.com>
4787 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4788 Document syntax of the array-declarator.
4789 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4791 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4792 (c_parser_struct_declaration): Likewise.
4793 (c_parser_declarator): Likewise.
4794 (c_parser_direct_declarator_inner): Likewise.
4795 (c_parser_parameter_declaration): Likewise.
4796 (c_parser_type_name): Likewise.
4798 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4800 * c-lang.h (current_omp_declare_target_attribute): New extern
4802 * c-parser.c: Include c-lang.h.
4803 (struct c_parser): Change tokens to c_token *.
4804 Add tokens_buf field. Change tokens_avail type to unsigned int.
4805 (c_parser_consume_token): If parser->tokens isn't
4806 &parser->tokens_buf[0], increment parser->tokens.
4807 (c_parser_consume_pragma): Likewise.
4808 (enum pragma_context): Add pragma_struct and pragma_param.
4809 (c_parser_external_declaration): Adjust
4810 c_parser_declaration_or_fndef caller.
4811 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4812 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4813 Adjust recursive call.
4814 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4816 (c_parser_parameter_declaration): Use pragma_param instead of
4818 (c_parser_compound_statement_nostart, c_parser_label,
4819 c_parser_for_statement): Adjust
4820 c_parser_declaration_or_fndef callers.
4821 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4822 it through to c_parser_conditional_expression.
4823 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4824 pass it through to c_parser_binary_expression. Adjust recursive
4826 (c_parser_binary_expression): Remove prec argument, add
4827 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4828 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4829 binop matches it, use build2 instead of parser_build_binary_op.
4830 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4831 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4832 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4833 Handle pragma_struct and pragma_param the same as pragma_external.
4834 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4835 (c_parser_omp_variable_list): Parse array sections for
4836 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4837 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4838 (c_parser_omp_clause_reduction): Handle user defined reductions.
4839 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4840 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4841 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4842 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4843 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4844 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4845 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4846 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4847 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4848 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4849 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4850 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4851 (c_parser_omp_for_loop): Add CODE argument, pass it through
4852 to c_finish_omp_for. Change last argument to cclauses,
4853 and adjust uses to grab parallel clauses from the array of all
4854 the split clauses. Adjust c_parser_binary_expression,
4855 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4856 (omp_split_clauses): New function.
4857 (c_parser_omp_simd): New function.
4858 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4859 Allow the function to be called also when parsing combined constructs,
4860 and call c_parser_omp_simd when parsing for simd.
4861 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4862 #pragma omp section, require exactly one structured-block instead of
4863 sequence of statements.
4864 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4865 Allow the function to be called also when parsing combined constructs.
4866 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4867 Allow the function to be called also when parsing combined
4869 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4870 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4871 c_parser_omp_teams, c_parser_omp_target_data,
4872 c_parser_omp_target_update, c_parser_omp_target,
4873 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4874 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4875 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4876 (c_parser_omp_construct): Add p_name and mask vars. Handle
4877 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4878 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4879 and c_parser_omp_sections callers.
4880 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4881 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4882 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4883 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4884 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4886 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4887 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4888 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4889 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4890 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4891 * c-typeck.c: Include tree-inline.h.
4892 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4893 handle_omp_array_sections_1, handle_omp_array_sections,
4894 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4895 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4896 user defined reductions.
4897 (c_tree_equal): New function.
4898 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4899 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4900 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4901 c_check_omp_declare_reduction_r): New prototypes.
4902 * c-decl.c (current_omp_declare_target_attribute): New variable.
4903 (c_decl_attributes): New function.
4904 (start_decl, start_function): Use it instead of decl_attributes.
4905 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4906 c_omp_reduction_decl, c_omp_reduction_lookup,
4907 c_check_omp_declare_reduction_r): New functions.
4909 2013-09-25 Tom Tromey <tromey@redhat.com>
4911 * Make-lang.in (c/gccspec.o): Remove.
4912 (CFLAGS-c/gccspec.o): New variable.
4913 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4914 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4915 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4917 2013-09-25 Tom Tromey <tromey@redhat.com>
4919 * Make-lang.in (c/gccspec.o): Don't use subshell.
4921 2013-09-18 Marek Polacek <polacek@redhat.com>
4924 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4925 Remove unnecessary check.
4927 2013-09-18 Marek Polacek <polacek@redhat.com>
4930 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4931 no_sanitize_undefined attribute.
4933 2013-09-13 Kai Tietz <ktietz@redhat.com>
4936 * c-decl.c (c_builtin_function_ext_scope): Remove
4937 wrong assumption that it is never called on prexisting
4940 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4942 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4944 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4946 * c-objc-common.c (c_tree_printer): Tidy.
4948 2013-08-30 Marek Polacek <polacek@redhat.com>
4950 * c-typeck.c (build_binary_op): Add division by zero and shift
4953 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
4954 Joseph Myers <joseph@codesourcery.com>
4957 * c-typeck.c (c_common_type): Prefer double_type_node over
4958 other REAL_TYPE types with the same precision.
4959 (convert_arguments): Likewise.
4961 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4963 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4964 (c_initialize_diagnostics): Call a destructor for the early printer.
4966 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4968 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4969 printer initialization.
4971 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
4974 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4975 check for truth values.
4976 (expand_array_notation_exprs): Added truth values case. Removed an
4977 unwanted else. Added for-loop to walk through subtrees in default
4980 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4982 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4984 2013-07-23 Joseph Myers <joseph@codesourcery.com>
4986 * c-parser.c (struct c_generic_association): Fix typo.
4988 2013-07-23 Tom Tromey <tromey@redhat.com>
4989 Joseph Myers <joseph@codesourcery.com>
4991 * c-parser.c (struct c_generic_association): New.
4992 (c_generic_association_d): New typedef.
4993 (c_parser_generic_selection): New function.
4994 (c_parser_postfix_expression): Handle RID_GENERIC.
4996 2013-07-13 Jason Merrill <jason@redhat.com>
4999 * c-decl.c (finish_struct): Check for too-large class.
5001 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5004 * c-typeck.c (set_init_index): When folding, check for index overflow.
5006 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5008 * c-parser.c (c_parser_array_notation): Removed rejection of array
5009 notations in an array of function pointers.
5011 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5013 * c-array-notation.c (make_triplet_val_inv): New function.
5014 (create_cmp_incr): Likewise.
5015 (create_array_refs): Likewise.
5016 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5017 Also modularized common parts between functions and called the function.
5018 (build_array_notation_expr): Likewise.
5019 (fix_conditional_array_notations_1): Likewise.
5020 (fix_array_notation_expr): Likewise.
5021 (fix_array_notation_call_expr): Likewise.
5023 2013-06-18 Marek Polacek <polacek@redhat.com>
5026 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5028 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5030 * c-array-notation.c (build_array_notation_expr): Reject array notation
5031 mismatch between LHS and RHS even inside a call_expr. Also, removed
5032 a couple while statements that were dead code.
5034 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5036 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5037 excessive precision expressions in function parameters. Also removed
5038 couple unwanted while statements.
5040 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5042 * c-array-notation.c (expand_array_notation_exprs): Added
5043 ARRAY_NOTATION_REF case.
5045 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5047 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5048 function to c-family/array-notation-common.c.
5049 (is_cilkplus_reduce_builtin): Likewise.
5050 (find_rank): Likewise.
5051 (extract_array_notation_exprs): Likewise.
5052 (replace_array_notations): Likewise.
5053 (find_inv_trees): Likewise.
5054 (replace_inv_trees): Likewise.
5055 (contains_array_notation_expr): Likewise.
5056 (find_correct_array_notation_type): Likewise.
5057 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5058 (struct inv_list): Moved this to c-family/array-notation-common.c.
5059 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5061 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5063 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5064 reduction functions outside the for-loop. Added a check if the fundecl
5065 is non-NULL. Finally, removed an unwanted if-statement, and made the
5068 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5070 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5071 condition of the if-statement matches the rank of else-block and then-
5072 block when array notations are used.
5073 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5074 expression after the entire function body is parsed.
5075 (c_parser_expr_no_commas): Delayed creating array notation expressions
5076 to the end of function parsing.
5077 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5078 whole if-statement instead of just the condition.
5079 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5081 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5084 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5085 array to NULL_TREE if they are unused. Also added a check for the
5086 field to be NULL before its fields are used in future.
5088 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5091 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5092 (build_array_notation_expr): Likewise.
5094 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5096 * c-typeck.c (build_array_ref): Added a check to see if array's
5097 index is greater than one. If true, then emit an error.
5098 (build_function_call_vec): Exclude error reporting and checking
5099 for builtin array-notation functions.
5100 (convert_arguments): Likewise.
5101 (c_finish_return): Added a check for array notations as a return
5102 expression. If true, then emit an error.
5103 (c_finish_loop): Added a check for array notations in a loop
5104 condition. If true then emit an error.
5105 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5106 (build_binary_op): Added a check for array notation expr inside
5107 op1 and op0. If present, we call another function to find correct
5109 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5110 * c-parser.c (c_parser_compound_statement): Check if array
5111 notation code is used in tree, if so, then transform them into
5113 (c_parser_expr_no_commas): Check if array notation is used in LHS
5114 or RHS, if so, then build array notation expression instead of
5116 (c_parser_postfix_expression_after_primary): Added a check for
5117 colon(s) after square braces, if so then handle it like an array
5118 notation. Also, break up array notations in unary op if found.
5119 (c_parser_direct_declarator_inner): Added a check for array
5121 (c_parser_compound_statement): Added a check for array notation in
5122 a stmt. If one is present, then expand array notation expr.
5123 (c_parser_if_statement): Likewise.
5124 (c_parser_switch_statement): Added a check for array notations in
5125 a switch statement's condition. If true, then output an error.
5126 (c_parser_while_statement): Similarly, but for a while.
5127 (c_parser_do_statement): Similarly, but for a do-while.
5128 (c_parser_for_statement): Similarly, but for a for-loop.
5129 (c_parser_unary_expression): Check if array notation is used in a
5130 pre-increment or pre-decrement expression. If true, then expand
5132 (c_parser_array_notation): New function.
5133 * c-array-notation.c: New file.
5134 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5136 2013-05-23 Mike Stump <mikestump@comcast.net>
5138 * c-typeck.c (convert_for_assignment): Handle references to memory
5141 2013-05-16 Jason Merrill <jason@redhat.com>
5143 * Make-lang.in (cc1$(exeext)): Use link mutex.
5145 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5147 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5148 to simply use OPT_Wpointer_arith.
5149 (build_unary_op): Likewise.
5151 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5154 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5155 argument. If set, or it temporarily for parsing of the first
5156 argument into force_folding_builtin_constant_p.
5157 (c_parser_postfix_expression): Adjust callers.
5159 2013-03-21 Richard Biener <rguenther@suse.de>
5161 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5162 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5164 2013-02-12 Marek Polacek <polacek@redhat.com>
5167 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5170 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5173 * c-typeck.c (set_nonincremental_init_from_string): If
5174 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5176 (process_init_element): Likewise.
5178 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5181 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5182 argument, don't call default_function_array_conversion
5183 nor c_fully_fold here.
5184 (c_parser_asm_statement): Adjust callers.
5185 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5186 and outputs here, and call default_function_array_conversion
5187 on inputs that don't need to be addressable.
5189 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5192 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5193 warning require that both c_common_unsigned_type as well as
5194 c_common_signed_type is the same for both mvl and mvr types.
5196 2012-11-16 Diego Novillo <dnovillo@google.com>
5198 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5200 * c-common.c: Use new vec API in vec.h.
5201 * c-common.h: Likewise.
5202 * c-gimplify.c: Likewise.
5203 * c-pragma.c: Likewise.
5204 * c-pretty-print.c: Likewise.
5205 * c-pretty-print.h: Likewise.
5206 * c-semantics.c: Likewise.
5207 * c-decl.c: Likewise.
5208 * c-parser.c: Likewise.
5209 * c-tree.h: Likewise.
5210 * c-typeck.c: Likewise.
5212 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5215 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5217 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5220 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5221 shadows a function, unless the variable is a function or a
5222 pointer-to-function.
5224 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5227 * c-parser.c (struct c_tree_loc_pair): Removed.
5228 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5229 add location_t * and tree * arguments, fill in array of 3
5230 sizeof_arg trees and corresponding locs.
5231 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5232 c_parser_expr_list callers.
5233 (c_parser_postfix_expression_after_primary): Likewise. Pass
5234 array of 3 sizeof_arg trees and locs (corresponding to first
5235 3 arguments) to sizeof_pointer_memaccess_warning.
5237 2012-10-09 Lawrence Crowl <crowl@google.com>
5239 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5240 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5243 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5246 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5249 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5252 * c-typeck.c: Include c-common.h.
5253 (enum stv_conv): Moved to c-common.h.
5254 (scalar_to_vector): Moved to c-common.c.
5255 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5256 * Make-lang.in: c-typeck.c depends on c-common.h.
5258 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5260 * c-decl.c (c_write_global_declarations): Fix handling of
5263 2012-09-30 Sharad Singhai <singhai@google.com>
5265 * c-decl.c (c_write_global_declarations): Use a different method
5266 to determine if the dump has ben initialized.
5268 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5271 * c-typeck.c (c_cast_expr): When casting to a type requiring
5272 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5275 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5278 * c-typeck.c (build_unary_op): Pass original argument of
5279 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5280 any C_MAYBE_CONST_EXPR, if it has integer operands.
5281 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5282 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5283 to c_objc_common_truthvalue_conversion, then remove any
5284 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5285 c_objc_common_truthvalue_conversion not
5286 c_common_truthvalue_conversion.
5287 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5288 call note_integer_operands for arguments with integer operands
5289 that are not integer constants.
5291 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5294 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5295 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5297 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5300 * c-convert.c (convert): Don't call fold_convert_loc if
5301 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5302 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5303 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5305 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5308 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5309 for nested and empty_ok arguments in the call to
5310 c_parser_declaration_or_fndef.
5312 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5314 * c-tree.h (c_last_sizeof_arg): Declare.
5315 * c-parser.c (struct c_tree_loc_pair): New type.
5316 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5318 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5319 (c_parser_postfix_expression_after_primary): Likewise. Call
5320 sizeof_pointer_memaccess_warning if needed.
5321 (sizeof_ptr_memacc_comptypes): New function.
5322 * c-typeck.c (c_last_sizeof_arg): New global variable.
5323 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5325 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5327 * c-lang.h (lang_decl): Add variable_size GTY option.
5329 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5331 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5332 * Make-lang.in: Fix dependencies.
5334 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5336 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5337 and add language Makefile hooks.
5338 * config-lang.in: New file.
5339 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5340 add the required "normal" config-lang.in rules.
5341 * c-lang.h: Moved from gcc/ to here.
5342 * c-tree.h: Likewise.
5343 * c-objc-common.c: Likewise.
5344 * c-objc-common.h: Likewise.
5345 * c-typeck.c: Likewise.
5346 * c-convert.c: Likewise.
5347 * c-lang.c: Likewise.
5348 * c-aux-info.c: Likewise.
5349 * c-errors.c: Likewise.
5350 * gccspec.c: Likewise.
5351 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5352 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5354 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5356 Copying and distribution of this file, with or without modification,
5357 are permitted in any medium without royalty provided the copyright
5358 notice and this notice are preserved.