1 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4 and structure element reference, capture the location of the
5 element name token and pass it to build_component_ref.
6 (c_parser_postfix_expression_after_primary): Likewise for
7 structure element dereference.
8 (c_parser_omp_variable_list): Likewise for
9 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
10 * c-tree.h (build_component_ref): Add location_t param.
11 * c-typeck.c (build_component_ref): Add location_t param
12 COMPONENT_LOC. Use it, if available, when issuing hints about
13 mispelled member names to provide a fixit replacement hint.
15 2016-06-06 Marek Polacek <polacek@redhat.com>
18 * c-parser.c (c_parser_direct_declarator): Set location.
20 2016-06-06 Marek Polacek <polacek@redhat.com>
22 * c-typeck.c (comptypes_internal): Handle comparisons of
23 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
24 TYPE_REF_CAN_ALIAS_ALL.
26 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
28 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
29 arguments as addressable when async clause exists.
31 2016-05-30 Jakub Jelinek <jakub@redhat.com>
34 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
35 when combined with target construct.
37 2016-05-26 Jakub Jelinek <jakub@redhat.com>
39 * c-parser.c (c_parser_omp_clause_schedule): Warn if
40 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
42 2016-05-25 Marek Polacek <polacek@redhat.com>
45 * c-decl.c (c_make_fname_decl): Don't check seen_error.
48 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
50 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
52 * c-parser.c (c_parser_oacc_declare): Add support for
53 GOMP_MAP_FIRSTPRIVATE_POINTER.
54 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
55 argument with enum c_omp_region_type ort.
56 (handle_omp_array_sections): Likewise. Update call to
57 handle_omp_array_sections_1.
58 (c_finish_omp_clauses): Add specific errors and warning messages for
59 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
60 call to handle_omp_array_sections.
62 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
64 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
66 2016-05-24 Richard Biener <rguenther@suse.de>
70 * c-typeck.c (build_array_ref): Do not complain about indexing
71 non-lvalue vectors. Adjust for function name change.
73 2016-05-20 Martin Sebor <msebor@redhat.com>
76 * c-typeck.c (error_init): Use
77 expansion_point_location_if_in_system_header.
80 2016-05-19 David Malcolm <dmalcolm@redhat.com>
83 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
85 (c_parser_postfix_expression): Likewise.
86 * c-tree.h (c_expr::set_error): New method.
87 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
88 that result's range is initialized.
90 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
92 * c-typeck.c (parser_build_unary_op): Fix formatting.
94 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
96 * c-decl.c (grokdeclarator): Remove errmsg and use of
97 targetm.invalid_return_type.
98 (grokparms): Remove errmsg and use of
99 targetm.invalid_parameter_type.
101 2016-05-13 Joseph Myers <joseph@codesourcery.com>
103 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
104 function return type.
106 2016-05-12 Marek Polacek <polacek@redhat.com>
109 * c-decl.c (build_compound_literal): Pass LOC down to
110 c_incomplete_type_error.
111 * c-tree.h (require_complete_type): Adjust declaration.
112 (c_incomplete_type_error): Likewise.
113 * c-typeck.c (require_complete_type): Add location parameter, pass it
114 down to c_incomplete_type_error.
115 (c_incomplete_type_error): Add location parameter, pass it down to
117 (build_component_ref): Pass location down to c_incomplete_type_error.
118 (default_conversion): Pass location down to require_complete_type.
119 (build_array_ref): Likewise.
120 (build_function_call_vec): Likewise.
121 (convert_arguments): Likewise.
122 (build_unary_op): Likewise.
123 (build_c_cast): Likewise.
124 (build_modify_expr): Likewise.
125 (convert_for_assignment): Likewise.
126 (c_finish_omp_clauses): Likewise.
128 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
131 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
133 * c-errors.c (pedwarn_c90): Return true if warned.
134 * c-tree.h (pedwarn_c90): Change return type to bool.
135 (enum c_declspec_word): Add new enumerator cdw_atomic.
137 2016-05-11 Marek Polacek <polacek@redhat.com>
140 * c-decl.c (diagnose_mismatched_decls): Factor out code to
141 diagnose_mismatched_attributes and call it.
143 2016-05-10 Marek Polacek <polacek@redhat.com>
146 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
147 on a declaration following the definition.
149 2016-05-05 Jakub Jelinek <jakub@redhat.com>
151 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
152 parse it through to c_parser_c99_block_statement.
153 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
156 2016-05-04 Marek Polacek <polacek@redhat.com>
158 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
161 2016-05-04 Marek Polacek <polacek@redhat.com>
164 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
165 for macro expansions.
167 2016-05-03 Marek Polacek <polacek@redhat.com>
170 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
171 check_builtin_function_arguments.
173 2016-05-03 Richard Biener <rguenther@suse.de>
175 * Make-lang.in (cc1-checksum.c): For stage-final re-use
176 the checksum from the previous stage.
178 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
180 * c-parser.c (c_parser_oacc_all_clauses): Update call to
181 c_finish_omp_clauses.
182 (c_parser_omp_all_clauses): Likewise.
183 (c_parser_oacc_cache): Likewise.
184 (c_parser_oacc_loop): Likewise.
185 (omp_split_clauses): Likewise.
186 (c_parser_omp_declare_target): Likewise.
187 (c_parser_cilk_all_clauses): Likewise.
188 (c_parser_cilk_for): Likewise.
189 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
190 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
192 2016-05-02 Marek Polacek <polacek@redhat.com>
195 * c-decl.c (grokdeclarator): Diagnose when array's size has an
198 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
201 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
202 OACC_LOOP_CLAUSE_MASK.
203 (c_parser_oacc_kernels_parallel): Update call to
204 c_oacc_split_loop_clauses.
206 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
208 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
209 argument to build_modify_expr in two cases.
211 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
213 * c-parser.c (c_parser_postfix_expression_after_primary): Call
214 warn_for_memset instead of warning directly here.
216 2016-04-26 Marek Polacek <polacek@redhat.com>
219 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
221 (c_parser_for_statement): ... here.
222 (c_parser_if_statement): Use it.
223 (c_parser_switch_statement): Use it.
224 (c_parser_while_statement): Use it.
227 * c-decl.c (pushdecl): Pass LOCUS down to warning.
229 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
232 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
233 instead of c_finish_cilk_clauses.
234 * c-tree.h (c_finish_omp_clauses): Add new default argument.
235 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
236 floating-point variables in the linear clause for Cilk Plus.
238 2016-04-18 Michael Matz <matz@suse.de>
240 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
241 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
243 2016-04-15 Marek Polacek <polacek@redhat.com>
246 * c-typeck.c (build_unary_op): Pass location down to error and
249 2016-04-15 Jakub Jelinek <jakub@redhat.com>
252 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
254 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
255 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
256 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
257 Adjust c_parser_pragma callers.
258 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
260 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
262 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
263 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
264 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
265 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
266 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
267 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
268 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
269 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
271 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
272 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
275 2016-04-13 Marek Polacek <polacek@redhat.com>
278 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
280 (c_parser_statement): Likewise.
281 (c_parser_c99_block_statement): Likewise.
282 (c_parser_while_statement): Likewise.
283 (c_parser_for_statement): Likewise.
284 (c_parser_if_body): Don't set IF_P here.
285 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
286 about dangling else here.
287 * c-tree.h (c_finish_if_stmt): Adjust declaration.
288 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
289 warn about dangling else here.
291 2016-04-04 Marek Polacek <polacek@redhat.com>
294 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
296 2016-03-31 Marek Polacek <polacek@redhat.com>
299 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
301 2016-03-18 David Malcolm <dmalcolm@redhat.com>
304 * c-parser.c (c_parser_postfix_expression): Set the source range
305 for uses of "__builtin_types_compatible_p".
307 2016-03-17 Jakub Jelinek <jakub@redhat.com>
310 * c-typeck.c (composite_type): Don't count void_list_node
311 into len, if the list is terminated by void_list_node, start
312 with void_list_node instead of NULL for newargs. Stop
315 2016-03-16 Marek Polacek <polacek@redhat.com>
318 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
319 nested functions returning VM types.
321 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
323 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
324 when calling c_finish_omp_clauses.
326 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
329 * c-decl.c (get_parm_info): Don't queue implicit function declarations
332 2016-03-04 Marek Polacek <polacek@redhat.com>
335 * c-parser.c (c_parser_postfix_expression): Call
336 c_parser_cast_expression rather than c_parser_postfix_expression.
338 2016-03-01 Jakub Jelinek <jakub@redhat.com>
342 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
343 of incomplete decls to error_mark_node.
345 2016-02-24 Marek Polacek <polacek@redhat.com>
348 * c-decl.c (finish_decl): Don't update the copy of the type of a
351 2016-02-23 Jakub Jelinek <jakub@redhat.com>
354 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
355 in id_kind reclassification.
357 2016-02-16 Jakub Jelinek <jakub@redhat.com>
360 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
362 2016-02-16 James Norris <jnorris@codesourcery.com>
365 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
367 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
369 * c-decl.c (build_null_declspecs): Zero the entire struct.
372 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
373 callers changed. If nested_p is true, use it to call
374 finish_implicit_inits.
375 * c-tree.h (finish_implicit_inits): Declare.
376 * c-typeck.c (finish_implicit_inits): New function. Move code
378 (push_init_level): ... here.
379 (set_designator, process_init_element): Call finish_implicit_inits.
381 2016-02-11 Jakub Jelinek <jakub@redhat.com>
384 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
385 arguments for -Waddress warning.
387 2016-02-04 Jakub Jelinek <jakub@redhat.com>
390 * c-decl.c (finish_enum): When honoring mode attribute,
391 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
393 2016-01-29 Jakub Jelinek <jakub@redhat.com>
396 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
397 all type variants, not just TYPE_MAIN_VARIANT.
399 2016-01-27 Jakub Jelinek <jakub@redhat.com>
402 * c-decl.c (c_write_global_declarations_1): Warn with
403 warn_unused_function if static prototype without definition
406 2016-01-27 Marek Polacek <polacek@redhat.com>
409 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
410 to unsigned, if needed. Add -Wsign-compare warning.
412 2016-01-26 Jakub Jelinek <jakub@redhat.com>
414 PR tree-optimization/69483
415 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
417 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
420 * c-tree.h (incomplete_record_decls): Declare.
421 * c-parser.c (incomplete_record_decls): Define.
422 (c_parser_translation_unit): Iterate through incomplete_record_decls and
423 report error if any decl has zero size.
424 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
425 or enum type to incomplete_record_decls.
427 2016-01-14 Tom de Vries <tom@codesourcery.com>
429 PR tree-optimization/68773
430 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
433 2016-01-14 Marek Polacek <polacek@redhat.com>
436 * c-decl.c (grokdeclarator): Provide more information for invalid
439 2016-01-06 David Malcolm <dmalcolm@redhat.com>
441 * c-parser.c (c_parser_unary_expression): For dereferences, build
442 a combined location before calling build_indirect_ref, so that
443 error reports cover the full range, manually updating the c_expr
446 2016-01-06 Marek Polacek <polacek@redhat.com>
449 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
450 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
453 2016-01-04 Jakub Jelinek <jakub@redhat.com>
455 Update copyright years.
457 2016-01-04 Marek Polacek <polacek@redhat.com>
460 * c-typeck.c (build_atomic_assign): Improve commentary. Add
461 optimization to use __atomic_fetch_* built-in if possible.
463 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
465 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
467 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
470 2015-12-22 Marek Polacek <polacek@redhat.com>
473 * c-typeck.c (build_component_ref): Warn when acessing elements of
474 atomic structures or unions.
476 2015-12-21 David Malcolm <dmalcolm@redhat.com>
478 * c-typeck.c: Include "gcc-rich-location.h".
479 (build_binary_op): In the two places that call binary_op_error,
480 create a gcc_rich_location and populate it with the location of
481 the binary op and its two operands.
483 2015-12-16 David Malcolm <dmalcolm@redhat.com>
485 * c-parser.c (c_parser_statement_after_labels): When calling
486 c_finish_return, Use the return expression's location if it has
487 one, falling back to the location of the first token within it.
488 * c-typeck.c (c_finish_return): When issuing warnings about
489 the incorrect presence/absence of a return value, issue a note
490 showing the declaration of the function.
492 2015-12-16 David Malcolm <dmalcolm@redhat.com>
494 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
496 (c_parser_peek_nth_token): New function.
497 (c_parser_peek_conflict_marker): New function.
498 (c_parser_error): Detect conflict markers and report them as such.
500 2015-12-16 David Malcolm <dmalcolm@redhat.com>
502 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
503 to preserve range information for the primary expression
504 in the call to c_parser_postfix_expression_after_primary.
506 2015-12-16 David Malcolm <dmalcolm@redhat.com>
508 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
509 expression location, falling back on the first token location,
510 rather than always using the latter.
512 2015-12-16 Marek Polacek <polacek@redhat.com>
515 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
518 2015-12-15 Marek Polacek <polacek@redhat.com>
521 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
524 2015-12-08 David Malcolm <dmalcolm@redhat.com>
526 * c-parser.c (c_parser_alignof_expression): Capture location of
527 closing parenthesis (if any), or of end of unary expression, and
528 use it to build a src_range for the expression.
530 2015-12-08 David Malcolm <dmalcolm@redhat.com>
533 * c-parser.c (c_parser_get_builtin_args): Add
534 "out_close_paren_loc" param, and write back to it.
535 (c_parser_postfix_expression): Capture the closing
536 parenthesis location for RID_CHOOSE_EXPR,
537 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
538 RID_BUILTIN_SHUFFLE and use it to set the source range
539 for such expressions; within RID_BUILTIN_COMPLEX set
540 the underlying location.
542 2015-12-07 Marek Polacek <polacek@redhat.com>
545 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
546 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
548 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
550 * c-tree.h (c_build_va_arg): Adjust prototype.
551 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
552 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
553 parameter, adjust throughout and issue an error if EXPR is a component
554 with reverse storage order.
556 2015-12-02 Jason Merrill <jason@redhat.com>
558 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
559 (c_fully_fold_internal, decl_constant_value_for_optimization):
560 Move from c-common.c.
561 * c-tree.h: Declare decl_constant_value_for_optimization.
562 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
564 2015-12-02 Joseph Myers <joseph@codesourcery.com>
567 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
568 following link from declarator to next declarator. Track original
569 qualified type and pass it to c_build_qualified_type.
570 * c-typeck.c (c_build_qualified_type): Add arguments
571 orig_qual_type and orig_qual_indirect.
573 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
575 * c-parser.c (c_parser_omp_clause_name)
576 (c_parser_oacc_all_clauses): Alphabetical sorting.
578 2015-12-02 Jakub Jelinek <jakub@redhat.com>
581 * c-decl.c (get_parm_info): Use b->locus instead of input_location
584 2015-12-01 Julian Brown <julian@codesourcery.com>
585 Cesar Philippidis <cesar@codesourcery.com>
586 James Norris <James_Norris@mentor.com>
588 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
589 (c_parser_oacc_clause_use_device): New function.
590 (c_parser_oacc_all_clauses): Add use_device support.
591 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
592 (c_parser_oacc_host_data): New function.
593 (c_parser_omp_construct): Add host_data support.
594 * c-tree.h (c_finish_oacc_host_data): Add prototype.
595 * c-typeck.c (c_finish_oacc_host_data): New function.
596 (c_finish_omp_clauses): Add use_device support.
598 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
601 * c-decl.c: Set TYPE_PACKED in variants.
603 2015-11-27 Martin Liska <mliska@suse.cz>
606 * c-array-notation.c (fix_builtin_array_notation_fn):
607 Use release_vec_vec instead of vec::release.
608 (build_array_notation_expr): Likewise.
609 (fix_conditional_array_notations_1): Likewise.
610 (fix_array_notation_expr): Likewise.
611 (fix_array_notation_call_expr): Likewise.
613 2015-11-27 Jakub Jelinek <jakub@redhat.com>
616 * c-parser.c (c_parser_compound_statement_nostart): If
617 last_label is true, use pragma_stmt instead of pragma_compound
618 as second c_parser_pragma argument.
619 (c_parser_omp_ordered, c_parser_omp_target_update,
620 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
621 false as second argument to c_parser_skip_to_pragma_eol after
622 diagnosing standalone directives used in pragma_stmt context.
624 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
626 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
627 with "if (ENABLE_OFFLOADING)".
629 2015-11-23 David Malcolm <dmalcolm@redhat.com>
632 * c-parser.c (c_parser_postfix_expression): Set up source ranges
633 for various Objective-C constructs: Class.name syntax,
634 @selector(), @protocol(), @encode(), and [] message syntax.
636 2015-11-20 David Malcolm <dmalcolm@redhat.com>
639 * c-typeck.c (should_suggest_deref_p): New function.
640 (build_component_ref): Special-case POINTER_TYPE when
641 generating a "not a structure of union" error message, and
642 suggest a "->" rather than a ".", providing a fix-it hint.
644 2015-11-19 David Malcolm <dmalcolm@redhat.com>
646 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
647 candidate into a new function, find_closest_identifier.
649 2015-11-19 Marek Polacek <polacek@redhat.com>
652 * c-typeck.c (parser_build_binary_op): Properly handle
653 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
655 2015-11-17 David Malcolm <dmalcolm@redhat.com>
657 * c-parser.c (set_c_expr_source_range): Bulletproof both
658 overloaded implementations against NULL expr->value.
659 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
661 (c_parser_unary_expression): Likewise when handling addresses of
663 (c_parser_postfix_expression): Likewise for statement expressions,
664 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
665 __builtin_va_arg, and for __builtin_offset_of.
666 (c_parser_postfix_expression_after_paren_type): Initialize expr's
667 src_range using the range of the braced initializer.
668 (c_parser_transaction_expression): Set src_range for "ret" to a
671 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
673 * c-parser.c (c_finish_omp_declare_simd): Look for
674 "simd" attribute as well. Update error message.
676 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
678 * c-parser.c (c_parser_omp_declare_target): Adjust.
680 2015-11-14 Jakub Jelinek <jakub@redhat.com>
682 * c-typeck.c (c_finish_omp_clauses): Don't mark
683 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
685 2015-11-14 Marek Polacek <polacek@redhat.com>
687 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
688 * c-typeck.c: Likewise.
690 2015-11-13 David Malcolm <dmalcolm@redhat.com>
692 * c-decl.c (warn_defaults_to): Pass line_table to
694 * c-errors.c (pedwarn_c99): Likewise.
695 (pedwarn_c90): Likewise.
696 * c-parser.c (set_c_expr_source_range): New functions.
697 (c_token::get_range): New method.
698 (c_token::get_finish): New method.
699 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
700 based on the range from the start of the LHS to the end of the
702 (c_parser_conditional_expression): Likewise, based on the range
703 from the start of the cond.value to the end of exp2.value.
704 (c_parser_binary_expression): Call set_c_expr_source_range on
705 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
706 (c_parser_cast_expression): Call set_c_expr_source_range on ret
707 based on the cast_loc through to the end of the expr.
708 (c_parser_unary_expression): Likewise, based on the
709 op_loc through to the end of op.
710 (c_parser_sizeof_expression) Likewise, based on the start of the
711 sizeof token through to either the closing paren or the end of
713 (c_parser_postfix_expression): Likewise, using the token range,
714 or from the open paren through to the close paren for
715 parenthesized expressions.
716 (c_parser_postfix_expression_after_primary): Likewise, for
717 various kinds of expression.
718 * c-tree.h (struct c_expr): Add field "src_range".
719 (c_expr::get_start): New method.
720 (c_expr::get_finish): New method.
721 (set_c_expr_source_range): New decls.
722 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
723 on ret for prefix unary ops.
724 (parser_build_binary_op): Likewise, running from the start of
725 arg1.value through to the end of arg2.value.
727 2015-11-13 Marek Polacek <polacek@redhat.com>
730 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
732 2015-11-13 David Malcolm <dmalcolm@redhat.com>
734 * c-typeck.c: Include spellcheck.h.
735 (lookup_field_fuzzy_find_candidates): New function.
736 (lookup_field_fuzzy): New function.
737 (build_component_ref): If the field was not found, try using
738 lookup_field_fuzzy and potentially offer a suggestion.
740 2015-11-12 James Norris <jnorris@codesourcery.com>
741 Joseph Myers <joseph@codesourcery.com>
743 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
744 (c_parser_omp_clause_name): Handle 'device_resident' clause.
745 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
746 and PRAGMA_OMP_CLAUSE_LINK.
747 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
748 and PRAGMA_OACC_CLAUSE_LINK.
749 (OACC_DECLARE_CLAUSE_MASK): New definition.
750 (c_parser_oacc_declare): New function.
752 2015-11-12 Marek Polacek <polacek@redhat.com>
755 * c-parser.c (c_parser_for_statement): Reclassify the token in
758 2015-11-11 Marek Polacek <polacek@redhat.com>
762 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
763 checking the size of an array.
765 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
767 * c-array-notation.c: Remove unused header files.
768 * c-aux-info.c: Likewise.
769 * c-convert.c: Likewise.
770 * c-decl.c: Likewise.
771 * c-errors.c: Likewise.
772 * c-lang.c: Likewise.
773 * c-objc-common.c: Likewise.
774 * c-parser.c: Likewise.
775 * c-typeck.c: Likewise.
776 * gccspec.c: Likewise.
778 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
779 Cesar Philippidis <cesar@codesourcery.com>
780 James Norris <jnorris@codesourcery.com>
781 Julian Brown <julian@codesourcery.com>
782 Nathan Sidwell <nathan@codesourcery.com>
785 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
787 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
788 (c_parser_pragma): Parse 'acc routine'.
789 (OACC_ROUTINE_CLAUSE_MARK): Define.
790 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
792 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
795 * c-typeck.c (c_finish_loop): For unconditional loops, set the
796 location of the backward-goto to the start of the loop body.
798 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
801 * c-parser.c (c_parser_while_statement): Finish the loop before
802 parsing ahead for misleading indentation.
803 (c_parser_for_statement): Likewise.
805 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
807 * c-decl.c (finish_struct): If the structure has reverse storage
808 order, rewrite the type of array fields with scalar component. Call
809 maybe_apply_pragma_scalar_storage_order on entry.
810 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
811 errors on bit-fields and reverse SSO here and not...
812 (c_mark_addressable): ...here.
813 (output_init_element): Adjust call to initializer_constant_valid_p.
814 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
816 2015-11-06 David Malcolm <dmalcolm@redhat.com>
818 * c-decl.c (warn_defaults_to): Update for change in signature
819 of diagnostic_set_info.
820 * c-errors.c (pedwarn_c99): Likewise.
821 (pedwarn_c90): Likewise.
822 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
823 for textinfo::set_location.
825 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
826 Thomas Schwinge <thomas@codesourcery.com>
827 James Norris <jnorris@codesourcery.com>
829 * c-parser.c (c_parser_omp_clause_name): Add support for
830 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
831 (c_parser_omp_clause_default): Add is_oacc argument. Handle
832 default(none) in OpenACC.
833 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
835 (c_parser_oacc_clause_tile): New function.
836 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
837 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
838 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
840 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
841 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
843 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
844 (c_parser_oacc_update): Update the error message for missing clauses.
845 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
846 and OMP_CLAUSE_INDEPENDENT.
848 2015-11-05 Marek Polacek <polacek@redhat.com>
851 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
852 deal with pre-evaluation on invalid types.
854 2015-11-05 Jakub Jelinek <jakub@redhat.com>
855 Ilya Verbin <ilya.verbin@intel.com>
857 * c-parser.c: Include context.h and gimple-expr.h.
858 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
859 monotonic together with nonmonotonic.
860 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
861 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
862 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
863 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
864 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
865 expressions on combined target teams before the target.
866 (c_parser_omp_declare_target): If decl has "omp declare target" or
867 "omp declare target link" attribute, and cgraph or varpool node already
868 exists, then set corresponding flags. Call c_finish_omp_clauses
869 in the parenthesized extended-list syntax case.
870 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
872 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
873 on OMP_CLAUSE_REDUCTION array sections.
874 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
875 into the constant offset, or for variable low-bound using
876 POINTER_PLUS_EXPR. For structure element based array sections use
877 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
878 (c_finish_omp_clauses): Drop generic_field_head, structure
879 elements are now always mapped even as array section bases,
880 diagnose same var in data sharing and mapping clauses. Diagnose if
881 linear step on declare simd is neither a constant nor a uniform
882 parameter. Look through POINTER_PLUS_EXPR for array section
883 reductions. Diagnose the same var or function appearing multiple
884 times on the same directive. Fix up wording for the to clause if t
885 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
886 modifier on kinds other than dynamic or guided or nonmonotonic
887 modifier together with ordered clause.
889 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
890 Chung-Lin Tang <cltang@codesourcery.com>
892 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
894 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
896 * c-array-notation.c: Reorder #include's and remove duplicates.
897 * c-aux-info.c: Likewise.
898 * c-convert.c: Likewise.
899 * c-decl.c: Likewise.
900 * c-errors.c: Likewise.
901 * c-lang.c: Likewise.
902 * c-objc-common.c: Likewise.
903 * c-parser.c: Likewise.
904 * c-typeck.c: Likewise.
906 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
909 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
910 after calling build_qualified_type.
912 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
913 Thomas Schwinge <thomas@codesourcery.com>
914 James Norris <jnorris@codesourcery.com>
915 Joseph Myers <joseph@codesourcery.com>
916 Julian Brown <julian@codesourcery.com>
917 Bernd Schmidt <bschmidt@redhat.com>
919 * c-parser.c (c_parser_oacc_shape_clause): New.
920 (c_parser_oacc_simple_clause): New.
921 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
922 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
924 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
925 James Norris <jnorris@codesourcery.com>
926 Cesar Philippidis <cesar@codesourcery.com>
930 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
931 parameters, and handle these. Adjust all users.
932 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
934 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
936 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
938 (c_finish_omp_construct): Declare function.
939 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
940 Merge functions into...
941 (c_finish_omp_construct): ... this new function.
943 2015-10-22 Richard Biener <rguenther@suse.de>
945 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
946 before folding a MINUS_EXPR.
948 2015-10-21 Marek Polacek <polacek@redhat.com>
951 * c-decl.c (start_function): Warn about vararg functions without
954 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
956 * c-typeck.c (build_conditional_expr): Use boolean vector
957 type for vector comparison.
958 (build_vec_cmp): New.
959 (build_binary_op): Use build_vec_cmp for comparison.
961 2015-10-20 Marek Polacek <polacek@redhat.com>
963 * c-parser.c (is_cilkplus_vector_p): Don't define here.
965 2015-10-20 Marek Polacek <polacek@redhat.com>
968 * c-parser.c (c_parser_attributes): Break out of the loop if the
969 token after an attribute isn't a comma.
971 2015-10-13 Jakub Jelinek <jakub@redhat.com>
972 Aldy Hernandez <aldyh@redhat.com>
974 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
975 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
976 (c_parser_omp_variable_list): Handle structure elements for
977 map, to and from clauses. Handle array sections in reduction
978 clause. Formatting fixes.
979 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
981 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
982 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
983 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
984 c_parser_omp_clause_is_device_ptr): New functions.
985 (c_parser_omp_clause_ordered): Parse optional parameter.
986 (c_parser_omp_clause_reduction): Handle array reductions.
987 (c_parser_omp_clause_schedule): Parse optional simd modifier.
988 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
990 (c_parser_omp_clause_linear): Parse linear clause modifiers.
991 (c_parser_omp_clause_depend_sink): New function.
992 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
993 (c_parser_omp_clause_map): Parse release/delete map kinds and
994 optional always modifier.
995 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
996 and c_finish_omp_clauses callers.
997 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
998 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
999 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1000 (OMP_CRITICAL_CLAUSE_MASK): Define.
1001 (c_parser_omp_critical): Parse critical clauses.
1002 (c_parser_omp_for_loop): Handle doacross loops, adjust
1003 c_finish_omp_for and c_finish_omp_clauses callers.
1004 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1005 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1006 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1007 (c_parser_omp_for): Disallow ordered clause when combined with
1008 distribute. Disallow linear clause when combined with distribute
1009 and not combined with simd.
1010 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1011 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1012 parse clauses and if depend clause is found, don't parse a body.
1013 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1014 Allow target parallel without for after it.
1015 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1016 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1017 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1019 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1020 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1021 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1022 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1024 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1025 defaultmap and is_device_ptr clauses.
1026 (c_parser_omp_target): Parse target parallel and target simd. Set
1027 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1028 and target exit data. Diagnose invalid map kinds.
1029 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1030 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1032 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1034 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1035 (c_parser_omp_taskloop): New function.
1036 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1037 handle PRAGMA_OMP_TASKLOOP.
1038 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1039 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1040 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1041 Add IS_OMP argument, handle structure element bases, diagnose
1042 bitfields, pass IS_OMP recursively, diagnose known zero length
1043 array sections in depend clauses, handle array sections in reduction
1044 clause, diagnose negative length even for pointers.
1045 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1046 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1047 array sections in reduction clause, set
1048 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1049 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1050 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1051 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1053 2015-10-06 Marek Polacek <polacek@redhat.com>
1055 * c-parser.c (c_parser_statement_after_labels): Use
1056 protected_set_expr_location.
1057 (c_parser_omp_clause_num_gangs): Likewise.
1058 (c_parser_omp_clause_num_threads): Likewise.
1059 (c_parser_omp_clause_num_workers): Likewise.
1060 (c_parser_omp_clause_vector_length): Likewise.
1061 (c_parser_omp_clause_num_teams): Likewise.
1062 (c_parser_omp_clause_thread_limit): Likewise.
1063 * c-typeck.c (build_c_cast): Likewise.
1064 (c_cast_expr): Likewise.
1066 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1068 * c-typeck.c (c_tree_equal): Use real_equal instead of
1071 2015-10-04 Jason Merrill <jason@redhat.com>
1073 * c-parser.c (c_lex_one_token): Handle @synchronized.
1074 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1075 can change whether the function is transaction_safe.
1077 2015-10-02 Marek Polacek <polacek@redhat.com>
1080 * c-typeck.c (convert_for_assignment): Use the expansion point
1081 location throughout.
1083 2015-10-02 Marek Polacek <polacek@redhat.com>
1086 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1087 and pass it down to c_parser_if_statement.
1088 (c_parser_else_body): Add CHAIN parameter and pass it down to
1089 c_parser_statement_after_labels.
1090 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1091 duplicated if-else-if conditions.
1093 2015-10-01 Marek Polacek <polacek@redhat.com>
1095 * c-typeck.c (convert_for_assignment): Improve commentary.
1097 2015-09-30 Marek Polacek <polacek@redhat.com>
1100 * c-typeck.c (c_finish_return): Use the expansion point location for
1101 certain "return with value" warnings.
1103 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1105 * c-parser.c (pragma_lex): Add loc argument.
1107 2015-09-15 Marek Polacek <polacek@redhat.com>
1110 * c-decl.c (tag_exists_p): New function.
1111 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1112 struct/union/enum keywords are missing.
1113 * c-tree.h (tag_exists_p): Declare.
1115 2015-09-15 Marek Polacek <polacek@redhat.com>
1117 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1118 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1119 Return NULL_TREE instead of 0.
1120 (lookup_name): Return NULL_TREE instead of 0.
1121 (lookup_name_in_scope): Likewise.
1122 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1123 (parser_xref_tag): Use false instead of 0.
1124 (start_struct): Use true instead of 1.
1125 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1127 2015-09-14 Marek Polacek <polacek@redhat.com>
1129 * c-typeck.c (set_nonincremental_init_from_string): Use
1130 HOST_WIDE_INT_M1U when shifting a negative value.
1132 2015-09-09 Mark Wielaard <mjw@redhat.com>
1134 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1137 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1140 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1141 into OMP_FOR_PRE_BODY rather than before the loop.
1143 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1146 * c-parser.c (c_parser_oacc_all_clauses,
1147 c_parser_omp_all_clauses): Remove invalid clause from
1148 list of clauses even if parser->error is set.
1151 * c-parser.c (c_parser_omp_clause_aligned,
1152 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1154 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1158 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1159 instead of c_parser_unary_expression. If the result is !lvalue_p,
1160 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1162 2015-09-04 Marek Polacek <polacek@redhat.com>
1165 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1167 2015-09-03 Martin Sebor <msebor@redhat.com>
1170 * c-typeck.c (convert_arguments, parser_build_unary_op,
1171 build_conditional_expr, c_cast_expr, convert_for_assignment,
1172 build_binary_op, _objc_common_truthvalue_conversion): Call
1174 (c_decl_implicit): Define.
1176 2015-09-02 Marek Polacek <polacek@redhat.com>
1179 * c-parser.c (c_parser_enum_specifier): Give a better error for
1182 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1184 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1186 2015-08-12 Marek Polacek <polacek@redhat.com>
1188 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1191 2015-08-03 Marek Polacek <polacek@redhat.com>
1194 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1196 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1198 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1200 * c-parser.c (c_parser_if_body): Take token_indent_info
1201 argument. Call warn_for_misleading_indentation even when the
1202 body is a semicolon. Extract token_indent_infos corresponding
1203 to the guard, body and next tokens. Adjust call to
1204 warn_for_misleading_indentation accordingly.
1205 (c_parser_else_body): Likewise.
1206 (c_parser_if_statement): Likewise.
1207 (c_parser_while_statement): Likewise.
1208 (c_parser_for_statement): Likewise.
1210 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1211 Manuel López-Ibáñez <manu@gcc.gnu.org>
1213 * c-decl.c (get_parm_info): Remove static var. Update warning
1216 2015-07-27 Marek Polacek <polacek@redhat.com>
1220 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1222 2015-07-20 Marek Polacek <polacek@redhat.com>
1225 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1226 (build_binary_op): Warn about left shift overflows.
1228 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1230 * c-array-notation.c: Adjust includes for flags.h changes.
1231 * c-objc-common.c: Likewise.
1233 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1235 * c-array-notation.c: Adjust includes.
1236 * c-aux-info.c: Likewise.
1237 * c-convert.c: Likewise.
1238 * c-decl.c: Likewise.
1239 * c-errors.c: Likewise.
1240 * c-lang.c: Likewise.
1241 * c-objc-common.c: Likewise.
1242 * c-parser.c: Likewise.
1243 * c-typeck.c: Likewise.
1245 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1248 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1250 2015-06-29 Marek Polacek <polacek@redhat.com>
1253 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1254 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1255 about -Wswitch-bool here.
1256 (do_case): Update c_add_case_label call.
1257 (c_finish_case): Update c_do_switch_warnings call.
1259 2015-06-27 Marek Polacek <polacek@redhat.com>
1261 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1263 2015-06-26 Marek Polacek <polacek@redhat.com>
1265 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1267 * c-typeck.c (array_to_pointer_conversion): Likewise.
1268 (build_unary_op): Likewise.
1269 (c_finish_return): Likewise.
1271 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1273 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1274 * c-parser.c: Likewise.
1276 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1278 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1279 instead of pointer_hash.
1280 (detect_field_duplicates): Likewise.
1282 2015-06-25 Marek Polacek <polacek@redhat.com>
1284 * c-array-notation.c: Use VAR_P throughout.
1285 * c-decl.c: Likewise.
1286 * c-objc-common.c: Likewise.
1287 * c-parser.c: Likewise.
1288 * c-typeck.c: Likewise.
1290 2015-06-25 Marek Polacek <polacek@redhat.com>
1292 * c-decl.c: Use is_global_var throughout.
1293 * c-parser.c: Likewise.
1294 * c-typeck.c: Likewise.
1296 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1298 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1299 * c-aux-info.c: Likewise.
1300 * c-convert.c: Likewise.
1301 * c-decl.c: Likewise.
1302 * c-errors.c: Likewise.
1303 * c-lang.c: Likewise.
1304 * c-objc-common.c: Likewise.
1305 * c-parser.c: Likewise.
1306 * c-typeck.c: Likewise.
1308 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1311 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1314 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1316 * c-decl.c (pop_scope): Register the main translation unit
1317 through the new debug hook.
1319 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1321 * c-array-notation.c : Adjust include files.
1322 * c-aux-info.c : Likewise.
1323 * c-convert.c : Likewise.
1324 * c-decl.c : Likewise.
1325 * c-errors.c : Likewise.
1326 * c-lang.c : Likewise.
1327 * c-lang.h : Likewise.
1328 * c-objc-common.c : Likewise.
1329 * c-parser.c : Likewise.
1330 * c-typeck.c : Likewise.
1332 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1334 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1335 immediately clobber it.
1336 (c_write_global_declarations_1): Remove call to
1337 check_global_declaration_1.
1338 (c_write_global_declarations_2): Remove.
1339 (c_write_final_cleanups): Rename from c_write_global_declarations.
1340 Remove call to finalize_compilation_unit.
1341 Remove calls to debugging hooks.
1342 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1343 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1344 * c-tree.h: Remove c_write_global_declarations.
1346 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1348 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1349 * c-aux-info.c: Likewise.
1350 * c-convert.c: Likewise.
1351 * c-decl.c: Likewise.
1352 * c-errors.c: Likewise.
1353 * c-lang.c: Likewise.
1354 * c-objc-common.c: Likewise.
1355 * c-parser.c: Likewise.
1356 * c-typeck.c: Likewise.
1358 2015-06-04 Marek Polacek <polacek@redhat.com>
1361 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1364 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1366 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1367 Warn for empty struct.
1368 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1370 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1372 * c-decl.c (start_function): Call plugin before parsing.
1373 (finish_function): Call plugin after parsing.
1375 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1378 * c-decl.c (merge_decls): Merge DECL_COMMON.
1380 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1382 * Make-lang.in (check_gcc_pallelize): Define.
1384 2015-05-22 Marek Polacek <polacek@redhat.com>
1387 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1390 2015-05-21 Marek Polacek <polacek@redhat.com>
1392 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1395 2015-05-20 Marek Polacek <polacek@redhat.com>
1397 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1398 * c-typeck.c: Likewise.
1400 2015-05-19 Marek Polacek <polacek@redhat.com>
1402 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1404 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1407 * c-parser.c (c_parser_omp_for_loop): Don't add
1408 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1409 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1410 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1413 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1415 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1418 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1421 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1424 2015-05-14 Marek Polacek <polacek@redhat.com>
1428 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1431 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1433 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1434 to add a call to warn_for_misleading_indentation.
1435 (c_parser_else_body): Likewise, adding param "else_loc".
1436 (c_parser_if_statement): Check for misleading indentation.
1437 (c_parser_while_statement): Likewise.
1438 (c_parser_for_statement): Likewise.
1440 2015-05-08 Marek Polacek <polacek@redhat.com>
1443 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1444 (output_init_element): Likewise.
1446 2015-05-07 Marek Polacek <polacek@redhat.com>
1449 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1452 2015-04-30 Marek Polacek <polacek@redhat.com>
1454 * c-typeck.c (set_init_label): Call error_at instead of error and
1457 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1460 * c-typeck.c (c_build_va_arg): Clarify the error message.
1462 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1464 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1465 OMP_STANDALONE_CLAUSES.
1467 2015-04-28 Marek Polacek <polacek@redhat.com>
1469 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1471 2015-04-28 Marek Polacek <polacek@redhat.com>
1474 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1476 2015-04-25 Marek Polacek <polacek@redhat.com>
1479 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1482 2015-04-23 Marek Polacek <polacek@redhat.com>
1485 * c-decl.c (set_labels_context_r): New function.
1486 (store_parm_decls): Call it via walk_tree_without_duplicates.
1487 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1488 instead of create_tmp_var. Build TARGET_EXPR instead of
1490 (build_atomic_assign): Use create_tmp_var_raw instead of
1491 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1493 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1495 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1496 (c_parser_omp_target_update): Add missed %> to error_at ().
1498 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1501 * c-decl.c (c_default_pointer_mode): Remove definition.
1502 * c-tree.h (c_default_pointer_mode): Remove declaration.
1504 2015-03-27 Tobias Burnus <burnus@net-b.de>
1507 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1509 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1510 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1511 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1513 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1515 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1516 attribute for DECL_EXTERNAL VAR_DECLs.
1518 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1520 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1523 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1526 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1527 before preparing arguments to warn_logical_not_parentheses.
1529 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1532 * c-typeck.c (parser_build_binary_op): Don't warn for
1533 !!x == y or !b == y where b is _Bool.
1535 2015-03-09 Marek Polacek <polacek@redhat.com>
1537 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1538 * c-decl.c (grokdeclarator): Likewise.
1539 * c-typeck.c (build_binary_op): Likewise.
1541 2015-02-27 Marek Polacek <polacek@redhat.com>
1544 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1546 2015-02-14 Marek Polacek <polacek@redhat.com>
1549 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1550 declared through a typedef name.
1552 2015-02-13 Marek Polacek <polacek@redhat.com>
1555 * c-decl.c (grokdeclarator): Print also the type when giving
1556 the error message about array's incomplete element type.
1558 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1561 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1562 check in the POP macro.
1564 2015-02-09 Marek Polacek <polacek@redhat.com>
1567 * c-typeck.c (process_init_element): Don't always wrap
1568 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1569 initializing a range of elements.
1571 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1575 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1577 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1579 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1580 processing enum declaration.
1582 2015-01-29 Marek Polacek <polacek@redhat.com>
1585 * c-typeck.c (pop_init_level): If constructor_elements has
1586 exactly one element with integer_zerop value, set constructor_zeroinit
1587 to 1. Remove braces around warning_init call.
1589 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1592 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1593 of FUNCTION_DECLs with error_mark_node.
1595 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1598 * c-typeck.c (convert_arguments): Return -1 if there are
1599 error_args, even if we've diagnosed too many arguments.
1601 2015-01-21 Richard Biener <rguenther@suse.de>
1604 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1605 for builtins the user declared correctly.
1607 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1608 Bernd Schmidt <bernds@codesourcery.com>
1609 Cesar Philippidis <cesar@codesourcery.com>
1610 James Norris <jnorris@codesourcery.com>
1611 Jakub Jelinek <jakub@redhat.com>
1612 Ilmir Usmanov <i.usmanov@samsung.com>
1614 * c-parser.c: Include "gomp-constants.h".
1615 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1616 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1617 Use OMP_CLAUSE_SET_MAP_KIND.
1618 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1619 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1620 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1621 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1622 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1623 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1624 "copyout", "create", "delete", "deviceptr", "gang", "host",
1625 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1626 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1627 "present_or_create", "pcreate", "seq", "self", "vector",
1628 "vector_length", "wait", "worker".
1629 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1630 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1631 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1632 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1633 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1634 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1635 (c_parser_oacc_data_clause_deviceptr)
1636 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1637 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1638 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1639 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1640 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1641 (c_parser_oacc_parallel, c_parser_oacc_update)
1642 (c_parser_oacc_wait): New functions.
1643 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1644 (c_finish_oacc_data): New prototypes.
1645 * c-typeck.c: Include "gomp-constants.h".
1646 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1647 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1648 OMP_CLAUSE_SET_MAP_KIND.
1649 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1650 (c_finish_oacc_data): New functions.
1651 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1652 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1653 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1654 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1655 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1656 GOMP_MAP_FORCE_DEVICEPTR.
1658 2015-01-09 Michael Collison <michael.collison@linaro.org>
1660 * c-array-notation.c: Include hash-set.h, machmode.h,
1661 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1662 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1663 * c-aux-info.c: Ditto.
1664 * c-convert.c: Ditto.
1666 * c-errors.c: Ditto.
1667 * c-lang.c: Dittoxs.
1668 * c-objc-common.c: Ditto.
1669 * c-parser.c: Ditto.
1670 * c-typeck.c: Include hash-set.h, machmode.h,
1671 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1672 fold-const.h, wide-int.h, inchash.h, real.h and
1673 fixed-value.h due to flattening of tree.h.
1675 2015-01-07 Marek Polacek <polacek@redhat.com>
1678 * c-typeck.c (process_init_element): Disallow initialization of
1679 a flexible array member with a string constant if the structure
1682 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1685 * c-typeck.c (convert_for_assignment, c_finish_return): For
1686 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1687 types also set in_late_binary_op around convert call.
1688 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1689 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1690 result on expr as last argument to ubsan_instrument_float_cast,
1691 if in_late_binary_op, don't use c_save_expr but save_expr.
1693 Update copyright years.
1695 2015-01-05 Marek Polacek <polacek@redhat.com>
1698 * c-typeck.c (build_array_ref): Pass loc down to
1699 warn_array_subscript_with_type_char.
1701 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1703 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1704 (common-pointer-type): For pointers to arrays take qualifiers from
1706 (build_conditional_expr): Add warnings for lost qualifiers.
1707 (comp-target-types): Allow pointers to arrays with different qualifiers.
1708 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1709 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1710 to PEDWARN_FOR_QUALIFIERS.
1712 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1715 * c-convert.c: Include ubsan.h.
1716 (convert): For real -> integral casts and
1717 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1718 instead instrument the float cast directly.
1720 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1722 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1723 c_finish_stmt_expr): Remove NULL last argument from
1724 create_tmp_var_raw and create_tmp_var calls.
1725 * c-array-notation.c (fix_builtin_array_notation_fn,
1726 build_array_notation_expr, fix_conditional_array_notations_1,
1727 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1729 2014-11-28 Marek Polacek <polacek@redhat.com>
1732 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1733 convert the right operand to integer type.
1735 2014-11-25 Marek Polacek <polacek@redhat.com>
1738 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1739 for inline functions.
1741 2014-11-21 Jakub Jelinek <jakub@redhat.com>
1744 * c-typeck.c (build_array_ref): Adjust
1745 convert_vector_to_pointer_for_subscript caller. If it returns true,
1746 call non_lvalue_loc on the result.
1748 2014-11-11 Richard Biener <rguenther@suse.de>
1750 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1753 2014-11-10 Andi Kleen <ak@linux.intel.com>
1756 * c-parser.c (c_parser_statement_after_labels): Call
1758 (c_parser_if_statement): Dito.
1759 (c_parser_switch_statement): Dito.
1760 (c_parser_while_statement): Dito.
1761 (c_parser_do_statement): Dito.
1762 (c_parser_for_statement): Dito.
1763 * c-typeck.c (c_finish_loop): Dito.
1765 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1767 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1768 OPT_Wshift_count_overflow in the warnings.
1770 2014-10-30 Marek Polacek <polacek@redhat.com>
1772 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1773 print the stripped version as well, if they're not the same.
1775 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1777 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1780 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1782 * c-decl.c: Adjust include files.
1783 * c-parser.c: Ditto.
1785 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1786 Tom Tromey <tromey@redhat.com>
1788 * c-tree.h (enum c_oracle_request): New.
1789 (c_binding_oracle_function): New typedef.
1790 (c_binding_oracle, c_pushtag, c_bind): Declare.
1791 * c-decl.c (c_binding_oracle): New global.
1792 (I_SYMBOL_CHECKED): New macro.
1793 (i_symbol_binding): New function.
1794 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1795 (I_TAG_CHECKED): New macro.
1796 (i_tag_binding): New function.
1797 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1798 (I_LABEL_CHECKED): New macro.
1799 (i_label_binding): New function.
1800 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1801 (c_print_identifier): Save and restore c_binding_oracle.
1802 (c_pushtag, c_bind): New functions.
1804 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1806 * c-typeck.c: Adjust include files.
1808 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1811 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1812 initialization here...
1813 (c_initialize_diagnostics): ... but here. Set defaults after
1814 building pretty-printer.
1816 2014-10-23 Marek Polacek <polacek@redhat.com>
1819 * c-decl.c (pop_scope): Don't print warning in external_scope.
1821 2014-10-19 Marek Polacek <polacek@redhat.com>
1824 * c-typeck.c (output_init_element): Allow initializing objects with
1825 static storage duration with compound literals even in C99 and add
1828 2014-10-17 Marek Polacek <polacek@redhat.com>
1831 * c-typeck.c (digest_init): Allow initializing objects with static
1832 storage duration with compound literals even in C99 and add pedwarn
1835 2014-10-17 Marek Polacek <polacek@redhat.com>
1838 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1839 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1840 error multiple times. Print the type.
1842 2014-10-17 Marek Polacek <polacek@redhat.com>
1845 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1848 2014-10-17 Marek Polacek <polacek@redhat.com>
1850 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1851 (start_function): Use OPT_Wimplicit_int instead of 0.
1852 (store_parm_decls_oldstyle): Likewise.
1854 2014-10-17 Alan Modra <amodra@gmail.com>
1857 * c-decl.c (merge_decls): Don't merge section name or tls model
1858 to newdecl symtab node, instead merge to olddecl. Override
1859 existing olddecl section name. Set tls_model for all thread-local
1860 vars, not just OMP thread-private ones. Remove incorrect comment.
1862 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1864 * c-decl.c: Adjust include files.
1866 2014-10-14 DJ Delorie <dj@redhat.com>
1868 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1869 (c_token_starts_typename): Check all __intN, not just __int128.
1870 (c_token_starts_declspecs): Likewise.
1871 (c_parser_declspecs): Likewise.
1872 (c_parser_attribute_any_word): Likewise.
1873 (c_parser_objc_selector): Likewise.
1874 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1875 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1877 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1879 (finish_declspecs): Likewise.
1881 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1883 * c-parser.c (c_parser_all_labels): New function to replace
1885 (c_parser_statement): Call the new function.
1887 2014-10-09 Marek Polacek <polacek@redhat.com>
1890 * c-typeck.c (pop_init_level): Don't warn about initializing
1893 2014-10-07 Marek Polacek <polacek@redhat.com>
1896 * c-decl.c (header_for_builtin_fn): New function.
1897 (implicitly_declare): Suggest which header to include.
1899 2014-10-07 Marek Polacek <polacek@redhat.com>
1901 * c-convert.c (convert): Use error_operand_p.
1902 * c-typeck.c (require_complete_type): Likewise.
1903 (really_atomic_lvalue): Likewise.
1904 (digest_init): Likewise.
1905 (handle_omp_array_sections_1): Likewise.
1907 2014-10-03 Marek Polacek <polacek@redhat.com>
1910 * c-decl.c (pop_scope): Don't warn about "inline function declared
1911 but never defined" for functions marked with gnu_inline attribute.
1913 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1916 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1917 on low_bound and length.
1919 2014-09-24 Marek Polacek <polacek@redhat.com>
1923 * c-parser.c: Don't define CPP_KEYWORD.
1924 (c_parser_switch_statement): Pass original type to c_finish_case.
1925 * c-tree.h (c_finish_case): Update declaration.
1926 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1927 conditionally to c_do_switch_warnings.
1929 2014-09-03 Marek Polacek <polacek@redhat.com>
1932 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1935 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1936 Balaji V. Iyer <balaji.v.iyer@intel.com>
1937 Igor Zamyatin <igor.zamyatin@intel.com>
1939 * c-parser.c (c_parser_cilk_for): New function.
1940 (c_parser_cilk_grainsize): Likewise.
1941 (c_get_temp_regvar): Likewise.
1942 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1943 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1944 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1945 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1948 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1950 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1951 with using HOST_WIDE_INT without truncation to 'int'
1953 2014-08-22 Marek Polacek <polacek@redhat.com>
1956 * c-typeck.c (parser_build_binary_op): Adjust call to
1957 warn_logical_not_parentheses.
1959 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1962 * c-parser.c (c_parser_array_notation): Check for correct
1963 type of an array added.
1965 2014-08-19 Marek Polacek <polacek@redhat.com>
1968 * c-typeck.c (build_binary_op): If either operand of a comparison
1969 is a boolean expression, call maybe_warn_bool_compare.
1971 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1974 * c-typeck.c (build_c_cast): Do a conversion even when the
1975 TYPE_MAIN_VARIANTs are the same.
1977 2014-08-19 Marek Polacek <polacek@redhat.com>
1979 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1980 pedwarn_c99 instead of pedwarn.
1981 (grokfield): Likewise.
1982 (warn_defaults_to): New function.
1983 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1984 Unconditionally call pedwarn_c99 instead of pedwarn.
1985 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1986 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1987 check flag_isoc11 before.
1988 * c-errors.c (pedwarn_c99): Change the return type to bool.
1989 Handle -Wc99-c11-compat.
1990 * c-parser.c (disable_extension_diagnostics): Handle
1991 warn_c99_c11_compat.
1992 (restore_extension_diagnostics): Likewise.
1993 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1994 instead of pedwarn, don't check flag_isoc11 before.
1995 (c_parser_declspecs): Likewise.
1996 (c_parser_alignas_specifier): Likewise.
1997 (c_parser_alignof_expression): Likewise.
1998 (c_parser_generic_selection): Likewise.
1999 * c-tree.h (pedwarn_c99): Update declaration.
2000 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2003 2014-08-19 Marek Polacek <polacek@redhat.com>
2005 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2007 * c-errors.c: Include "opts.h".
2008 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2009 * c-parser.c (disable_extension_diagnostics): Handle negative value
2010 of warn_c90_c99_compat, too.
2011 (restore_extension_diagnostics): Likewise.
2012 (c_parser_compound_statement_nostart): Pass
2013 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2015 2014-08-12 Marek Polacek <polacek@redhat.com>
2017 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2019 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2021 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2023 2014-08-10 Marek Polacek <polacek@redhat.com>
2026 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2027 Call pedwarn_c90 instead of pedwarn.
2028 (check_bitfield_type_and_width): Likewise.
2029 (declspecs_add_qual): Likewise.
2030 (declspecs_add_type): Likewise.
2031 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2032 Adjust to only call pedwarn_c90.
2033 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2034 pedwarn_c90 instead of pedwarn.
2035 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2036 * c-parser.c (disable_extension_diagnostics): Handle
2037 warn_c90_c99_compat.
2038 (restore_extension_diagnostics): Likewise.
2039 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2040 pedwarn_c90 instead of pedwarn.
2041 (c_parser_initelt): Likewise.
2042 (c_parser_postfix_expression): Likewise.
2043 (c_parser_postfix_expression_after_paren_type): Likewise.
2044 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2045 * c-tree.h: Fix formatting.
2046 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2047 pedwarn_c90 instead of pedwarn.
2049 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2051 * c-typeck.c: Remove include of pointer-set.h.
2053 2014-08-07 Marek Polacek <polacek@redhat.com>
2055 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2057 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2059 * c-typeck.c: Use hash_map instead of pointer_map.
2061 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2063 * c-decl.c: Use hash_set instead of pointer_set.
2065 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2068 * c-array-notation.c (expand_array_notations): Handling
2071 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2074 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2077 2014-07-30 Tom Tromey <tromey@redhat.com>
2079 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2081 (really_start_incremental_init, push_init_level): Initialize
2083 (pop_init_level): Set global designator_depth.
2084 (process_init_element): Check for designated_init attribute.
2086 2014-07-20 Marek Polacek <polacek@redhat.com>
2089 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2090 (implicitly_declare): Pass location to implicit_decl_warning.
2092 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2095 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2096 If non-NULL, call c_parser_check_literal_zero.
2097 (c_parser_check_literal_zero): New function.
2098 (c_parser_postfix_expression_after_primary): Adjust
2099 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2101 2014-07-06 Marek Polacek <polacek@redhat.com>
2104 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2105 * c-tree.h (C_ARRAY_PARAMETER): Define.
2106 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2109 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2110 Chen Gang <gang.chen.5i5j@gmail.com>
2112 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2115 2014-07-01 Marek Polacek <polacek@redhat.com>
2117 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2118 instead of 0 to WARN_FOR_ASSIGNMENT.
2120 2014-07-01 Marek Polacek <polacek@redhat.com>
2123 * c-typeck.c (convert_for_assignment): Pass
2124 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2126 2014-06-30 Marek Polacek <polacek@redhat.com>
2128 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2129 has no_sanitize_undefined attribute.
2131 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2134 * c-array-notation.c (fix_builtin_array_notation_fn):
2135 Check for 0 arguments in builtin call. Check that bultin argument is
2137 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2140 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2142 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2143 qualifiers in __auto_type for atomic types.
2144 (c_parser_typeof_specifier): Discard all type qualifiers in
2145 __typeof__ for atomic types.
2147 2014-06-25 Marek Polacek <polacek@redhat.com>
2150 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2151 the return expression to c_finish_return.
2153 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2155 * c-typeck.c (c_finish_omp_clauses): Make sure
2156 OMP_CLAUSE_LINEAR_STEP has correct type.
2158 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2162 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2164 * c-parser.c (c_parser_omp_for_loop): For
2165 #pragma omp parallel for simd move lastprivate clause from parallel
2166 to for rather than simd.
2168 2014-06-23 Marek Polacek <polacek@redhat.com>
2170 * c-typeck.c (parser_build_binary_op): Don't call
2171 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2173 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2175 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2176 * c-decl.c (merge_decls): Likewise.
2178 2014-06-09 Marek Polacek <polacek@redhat.com>
2181 * c-typeck.c (error_init): Call inform instead of error_at.
2182 (pedwarn_init): Call inform instead of pedwarn.
2183 (warning_init): Call inform instead of warning_at.
2185 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2187 * c-decl.c (merge_decls): Use set_decl_section_name.
2188 (duplicate_decls): Remove node if it exists.
2190 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2193 * c-typeck.c (push_init_level, process_init_element,
2194 pop_init_level): Correct check for zero initialization, move
2195 missing brace warning to respect zero initialization.
2197 2014-06-05 Marek Polacek <polacek@redhat.com>
2200 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2202 2014-06-05 Marek Polacek <polacek@redhat.com>
2205 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2206 on the left hand side operand of a comparison.
2208 2014-06-05 Marek Polacek <polacek@redhat.com>
2211 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2212 Print note only if the warning was printed.
2214 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2217 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2220 2014-06-03 Marek Polacek <polacek@redhat.com>
2223 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2225 * c-tree.h (c_start_case): Update.
2226 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2227 switch condition has boolean value.
2229 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2231 * c-decl.c: Include builtins.h.
2232 * c-parser.c: Likewise.
2234 2014-05-27 Marek Polacek <polacek@redhat.com>
2237 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2238 error and warning calls to error_at and warning_at. Pass location of
2239 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2240 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2241 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2243 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2246 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2247 function parameters.
2249 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2251 * c-decl.c (merge_decls): Preserve symtab node pointers.
2252 (duplicate_decls): Free new decl.
2254 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2256 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2259 * c-parser.c (c_parser_omp_target): Return bool values.
2261 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2263 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2264 num_teams_loc variable to num_thread_limit_loc.
2266 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2268 * c-array-notation.c (expand_array_notations): Use void_node
2269 instead of void_zero_node.
2271 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2273 * c-decl.c (finish_struct): Adjust.
2274 (finish_enum): Likewise.
2276 (record_inline_static): Likewise.
2277 (push_scope): Likewise.
2278 (make_label): Likewise.
2279 (lookup_label_for_goto): Likewise.
2280 (finish_struct): Likewise.
2281 (finish_enum): Likewise.
2282 (store_parm_decls): Likewise.
2283 (c_push_function_context): Likewise.
2284 * c-lang.h: Remove usage of variable_size gty attribute.
2285 * c-parser.c (c_parse_init): Adjust.
2286 (c_parse_file): Likewise.
2288 2014-05-13 Marek Polacek <polacek@redhat.com>
2291 * c-typeck.c (convert_for_assignment): Pass location to
2292 WARN_FOR_ASSIGNMENT instead of input_location.
2294 2014-05-10 Marek Polacek <polacek@redhat.com>
2296 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2297 maybe_warn_string_init.
2298 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2299 maybe_warn_string_init.
2300 * c-tree.h (maybe_warn_string_init): Update declaration.
2301 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2302 Call pedwarn_init with loc instead of with input_location.
2303 (digest_init): Pass init_loc to maybe_warn_string_init.
2304 (pop_init_level): Call pedwarn_init with loc instead of with
2306 (set_init_index): Likewise.
2307 (process_init_element): Likewise.
2309 2014-05-09 Marek Polacek <polacek@redhat.com>
2312 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2313 (c_parser_initelt): Pass location to set_init_label. Pass array index
2314 location to set_init_index.
2315 * c-tree.h (push_init_level): Update declaration.
2316 (pop_init_level): Likewise.
2317 (set_init_index): Likewise.
2318 (set_init_label): Likewise.
2319 * c-typeck.c (error_init): Add location parameter. Call error_at
2321 (digest_init): Pass init_loc to error_init.
2322 (really_start_incremental_init):
2323 (push_init_level): Add location parameter. Pass loc to pop_init_level
2325 (pop_init_level): Likewise.
2326 (set_designator): Add location parameter. Pass loc to pop_init_level,
2327 push_init_level, and error_init.
2328 (set_init_index): Add location parameter. Pass loc to error_init and
2330 (set_init_label): Likewise.
2331 (output_init_element): Pass loc to error_init.
2332 (process_init_element): Pass loc to error_init, pop_init_level,
2333 pedwarn_init, and push_init_level.
2335 2014-05-09 Marek Polacek <polacek@redhat.com>
2338 * c-parser.c (c_parser_attributes): Parse the arguments as an
2339 expression-list if the attribute takes identifier.
2341 2014-05-08 Marek Polacek <polacek@redhat.com>
2344 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2347 2014-05-08 Marek Polacek <polacek@redhat.com>
2350 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2353 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2354 Mike Stump <mikestump@comcast.net>
2355 Richard Sandiford <rdsandiford@googlemail.com>
2357 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2358 (finish_enum): Use wide-int interfaces.
2359 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2360 * c-typeck.c (build_c_cast): Likewise.
2361 (set_nonincremental_init_from_string): Likewise.
2362 (c_tree_equal): Likewise.
2364 2014-05-02 Marek Polacek <polacek@redhat.com>
2367 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2368 Return size_one_node when the type is not complete.
2369 (pointer_diff): Remove comment.
2370 (build_unary_op): Improve error messages.
2372 2014-05-02 Marek Polacek <polacek@redhat.com>
2374 * c-typeck.c (c_finish_return): Separate warning_at calls.
2376 2014-05-02 Marek Polacek <polacek@redhat.com>
2378 * c-tree.h (error_init): Remove declaration.
2379 (pedwarn_init): Likewise.
2380 * c-typeck.c (error_init): Make static and move above.
2381 (pedwarn_init): Likewise.
2382 (warning_init): Move above.
2383 (maybe_warn_string_init): Likewise.
2385 2014-05-01 Jeff Law <law@redhat.com>
2389 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2390 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2393 2014-05-02 Marek Polacek <polacek@redhat.com>
2396 * c-typeck.c (push_init_level): Set constructor_designated to
2397 p->designated for structures.
2399 2014-05-01 Marek Polacek <polacek@redhat.com>
2402 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2403 function-definition has an attribute after the declarator.
2405 2014-05-01 Marek Polacek <polacek@redhat.com>
2408 * c-typeck.c (warning_init): Add location_t parameter. Call
2409 warning_at instead of warning.
2410 (push_init_level): Pass input_location to warning_init.
2411 (add_pending_init): Add location_t parameter. Pass loc to
2413 (set_nonincremental_init): Pass input_location to add_pending_init.
2414 (set_nonincremental_init_from_string): Likewise.
2415 (output_init_element): Pass loc to warning_init and to
2418 2014-05-01 Marek Polacek <polacek@redhat.com>
2421 * c-typeck.c (c_finish_return): Distinguish between label and variable
2422 when warning about returning local address.
2424 2014-05-01 Marek Polacek <polacek@redhat.com>
2427 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2430 2014-05-01 Marek Polacek <polacek@redhat.com>
2433 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2434 instead of 0 to WARN_FOR_QUALIFIERS.
2436 2014-05-01 Marek Polacek <polacek@redhat.com>
2439 * c-typeck.c (default_conversion): Use better location for
2442 2014-04-30 Marek Polacek <polacek@redhat.com>
2444 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2445 also when SANITIZE_FLOAT_DIVIDE is on.
2447 2014-04-30 Marek Polacek <polacek@redhat.com>
2450 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2451 and pedwarn_init. Use loc insted of input_location.
2453 2014-04-30 Marek Polacek <polacek@redhat.com>
2456 * c-typeck.c (build_binary_op): Use location when warning about
2459 2014-04-25 Marek Polacek <polacek@redhat.com>
2462 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2463 always_inline/noinline and hot/cold attributes.
2465 2014-04-25 Marek Polacek <polacek@redhat.com>
2468 * c-parser.c (c_parser_initelt): Pass input_location to
2469 process_init_element.
2470 (c_parser_initval): Pass loc to process_init_element.
2471 * c-tree.h (process_init_element): Adjust declaration.
2472 * c-typeck.c (push_init_level): Pass input_location to
2473 process_init_element.
2474 (pop_init_level): Likewise.
2475 (set_designator): Likewise.
2476 (output_init_element): Add location_t parameter. Pass loc to
2478 (output_pending_init_elements): Pass input_location to
2479 output_init_element.
2480 (process_init_element): Add location_t parameter. Pass loc to
2481 output_init_element.
2483 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2485 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2486 atomic-clause, allow comma in between atomic-clause and
2489 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2492 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2493 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2495 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2498 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2499 create_tmp_var instead build_decl for creating temps.
2500 (build_array_notation_expr): Likewise.
2501 (fix_conditional_array_notations_1): Likewise.
2502 (fix_array_notation_expr): Likewise.
2503 (fix_array_notation_call_expr): Likewise.
2505 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2508 * c-tree.h (c_build_function_call_vec): New prototype.
2509 * c-typeck.c (build_function_call_vec): Don't call
2510 resolve_overloaded_builtin here.
2511 (c_build_function_call_vec): New wrapper function around
2512 build_function_call_vec. Call resolve_overloaded_builtin here.
2513 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2514 Call c_build_function_call_vec instead of build_function_call_vec.
2515 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2516 * c-decl.c (finish_decl): Likewise.
2518 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2521 * c-typeck.c: Use correct format string in cast-qual warning
2523 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2525 * c-decl.c (c_decl_attributes): Use
2526 lang_hooks.types.omp_mappable_type.
2527 * c-typeck.c (c_finish_omp_clauses): Likewise.
2529 2014-03-06 Marek Polacek <polacek@redhat.com>
2532 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2533 of checking tree code.
2535 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2537 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2538 (c_parser_parameter_declaration): Likewise.
2540 2014-02-19 Marek Polacek <polacek@redhat.com>
2543 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2544 Call mark_exp_read on exp.value.
2545 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2546 TREE_ADDRESSABLE on old instead of val.
2547 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2549 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2551 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2552 C_EXPR_APPEND by vec_safe_push.
2553 * c-tree.h (C_EXPR_APPEND): Remove.
2555 2014-01-31 Marek Polacek <polacek@redhat.com>
2558 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2559 build_function_call_vec.
2560 (build_function_call): Likewise.
2561 (build_atomic_assign): Likewise.
2562 (build_function_call_vec): Add arg_loc parameter. Use it.
2563 (convert_arguments): Likewise.
2564 (convert_for_assignment): Rename rhs_loc to expr_loc.
2565 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2566 (c_parser_objc_keywordexpr): Likewise.
2567 (c_parser_postfix_expression_after_primary): Call
2568 build_function_call_vec with expr_loc rather than op_loc.
2569 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2570 build_function_call_vec.
2571 (c_parser_expr_list): Add locations parameter. Fill it with locations
2572 of function arguments.
2573 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2575 2014-01-30 Marek Polacek <polacek@redhat.com>
2578 * c-typeck.c (build_function_call_vec): Use loc parameter.
2579 (convert_arguments): Add location parameter. Use it.
2580 (ep_convert_and_check): Likewise.
2581 (build_atomic_assign): Adjust convert_for_assignment call.
2582 (build_modify_expr): Likewise.
2583 (digest_init): Likewise.
2584 (c_finish_return): Likewise.
2585 (build_conditional_expr): Adjust ep_convert_and_check calls.
2586 (convert_for_assignment): Add rhs_loc parameter. Use it.
2587 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2590 2014-01-30 Richard Biener <rguenther@suse.de>
2593 * c-typeck.c (build_function_call_vec): Do not replace calls
2594 to a function via an incompatible type with a runtime abort.
2596 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2598 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2599 flag_enable_cilkplus with flag_cilkplus.
2600 (c_parser_direct_declarator_inner): Likewise.
2601 (c_parser_attribute_any_word): Likewise.
2602 (c_parser_attributes): Likewise.
2603 (c_parser_compound_statement): Likewise.
2604 (c_parser_statement_after_labels): Likewise.
2605 (c_parser_if_statement): Likewise.
2606 (c_parser_switch_statement): Likewise.
2607 (c_parser_do_statement): Likewise.
2608 (c_parser_for_statement): Likewise.
2609 (c_parser_unary_expression): Likewise.
2610 (c_parser_postfix_expression): Likewise.
2611 (c_parser_postfix_expression_after_primary): Likewise.
2612 (c_parser_postfix_expression_after_primary): Likewise.
2613 (c_parser_omp_clause_name): Likewise.
2614 (c_finish_omp_declare_simd): Likewise.
2615 (c_parser_cilk_verify_simd): Likewise.
2616 * c-typeck.c (build_array_ref): Likewise.
2617 (build_function_call_vec): Likewise.
2618 (convert_arguments): Likewise.
2619 (build_compound_expr): Likewise.
2620 (c_finish_return): Likewise.
2621 (c_finish_if_stmt): Likewise.
2622 (c_finish_loop): Likewise.
2623 (build_binary_op): Likewise.
2625 2014-01-23 Marek Polacek <polacek@redhat.com>
2628 * c-typeck.c (parser_build_binary_op): Use location instead of
2630 (build_binary_op): Pass location to shorten_compare.
2632 2014-01-23 Marek Polacek <polacek@redhat.com>
2635 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2638 2014-01-23 Marek Polacek <polacek@redhat.com>
2641 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2642 of a comma expression.
2643 (emit_side_effect_warnings): Likewise.
2645 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2648 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2649 function to use walk_tree and moved a lot of its functionality to
2650 expand_array_notations.
2651 (expand_array_notations): New function.
2653 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2655 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2656 attribute an attribute without value.
2658 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2661 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2662 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2664 2014-01-22 Marek Polacek <polacek@redhat.com>
2667 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2668 of remove_c_maybe_const_expr on op1 and op2.
2670 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2673 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2674 effects, preevaluate rhs using SAVE_EXPR first.
2676 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2679 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2680 statements with if-elseif statements.
2682 2014-01-06 Marek Polacek <polacek@redhat.com>
2685 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2686 defined bit-field types only in ISO C.
2688 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2690 Update copyright years
2692 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2694 * c-array-notation.c: Use the standard form for the copyright notice.
2696 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2698 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2699 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2700 field in parser is not empty. If not-empty, call the function
2701 c_parser_finish_omp_declare_simd.
2702 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2703 between SIMD-enabled functions and #pragma simd. Added new parameter.
2704 (c_parser_cilk_all_clauses): Modified the usage of the function
2705 c_parser_cilk_clause_vectorlength as mentioned above.
2706 (c_parser_cilk_simd_fn_vector_attrs): New function.
2707 (c_finish_cilk_simd_fn_tokens): Likewise.
2708 (is_cilkplus_vector_p): Likewise.
2709 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2710 "nomask," and "mask" strings in clause name.
2711 (c_parser_omp_all_clauses): Added 3 new case statements:
2712 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2713 PRAGMA_CILK_CLAUSE_NOMASK.
2714 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2715 check for vector attribute and if so call the function
2716 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2717 called the function c_finish_cilk_simd_fn_tokens.
2718 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2719 parser field is non-empty. If so, parse them as you would parse
2720 the omp declare simd pragma.
2721 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2722 Added a check when step is a parameter and flag it as error.
2723 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2724 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2727 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2729 * c-parser.c (c_parser_omp_parallel): Fix description.
2731 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2733 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2734 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2735 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2736 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2738 2013-12-04 Joseph Myers <joseph@codesourcery.com>
2741 * c-parser.c (c_parser_alignas_specifier): Use
2742 c_sizeof_or_alignof_type instead of c_alignof.
2743 (c_parser_alignof_expression): Likewise, with min_alignof
2744 parameter depending on alignof spelling used.
2746 2013-12-04 Marek Polacek <polacek@redhat.com>
2749 * c-decl.c (start_function): Don't warn for missing prototype for
2752 2013-12-03 Marek Polacek <polacek@redhat.com>
2755 * c-decl.c (build_compound_literal): Allow compound literals with
2756 empty initial value.
2758 2013-12-02 Joseph Myers <joseph@codesourcery.com>
2761 * c-typeck.c (build_modify_expr): Diagnose assignment to
2762 expression with array type.
2764 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2767 * c-typeck.c (process_init_element): Do not treat a string as
2768 initializing a whole array when used with a designator for an
2771 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2774 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2775 an inline function following a static declaration.
2777 2013-11-28 Jakub Jelinek <jakub@redhat.com>
2780 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2781 to p_name before calling c_parser_omp_teams instead of after.
2782 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2783 argument. Remove unused p_name variable.
2785 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
2786 Jakub Jelinek <jakub@redhat.com>
2788 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2789 external_scope is NULL.
2791 2013-11-27 Tom de Vries <tom@codesourcery.com>
2792 Marc Glisse <marc.glisse@inria.fr>
2795 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2797 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
2799 * c-typeck.c: Add required include files from gimple.h.
2801 2013-11-22 David Malcolm <dmalcolm@redhat.com>
2803 * c-decl.c (define_label, shadow_tag_warned)
2804 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2805 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2806 (declspecs_add_type): Remove use of in_system_header macro.
2807 * c-parser.c (c_parser_unary_expression): Likewise.
2808 * c-typeck.c (store_init_value, process_init_element)
2809 (c_start_case): Likewise.
2811 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2814 * c-parser.c (c_parser_set_source_position_from_token): Remove
2815 reference to in_system_header from comment.
2817 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2819 * c-decl.c (grokdeclarator): Update comment to refer to
2820 tree_to_[su]hwi rather than tree_low_cst.
2822 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2824 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2825 tree_to_uhwi throughout.
2827 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2829 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2832 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2834 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2837 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
2839 * c-parser.c (c_parser_cilk_simd): New.
2840 (c_parser_cilk_verify_simd): New.
2841 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2842 (c_parser_omp_for_loop): Add case for NE_EXPR.
2843 Set c_break_label for CILK_SIMD.
2844 (c_parser_cilk_clause_vectorlength): New.
2845 (c_parser_cilk_clause_linear): New.
2846 (c_parser_cilk_clause_name): New.
2847 (c_parser_cilk_all_clauses): New.
2848 * c-typeck.c (build_unary_op): Pass location argument to
2850 (build_modify_expr): Same.
2851 (build_asm_expr): Same.
2852 (c_finish_bc_stmt): Error on break/continue in loops.
2854 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
2856 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2858 2013-11-14 Diego Novillo <dnovillo@google.com>
2860 * c-decl.c: Include print-tree.h.
2861 Include stor-layout.h.
2864 Include stringpool.h.
2865 * c-lang.c: Include fold-const.h.
2866 * c-parser.c: Include stringpool.h.
2868 Include stor-layout.h.
2870 Include trans-mem.h.
2871 * c-typeck.c: Include stor-layout.h.
2872 Include trans-mem.h.
2876 2013-11-13 Joseph Myers <joseph@codesourcery.com>
2878 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2879 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2881 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2882 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2884 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2885 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2886 (c_parser_declarator, c_parser_direct_declarator_inner)
2887 (c_parser_parameter_declaration, c_parser_type_name): All callers
2889 (c_parser_declaration_or_fndef): Handle declarations with type
2890 determined from the initializer.
2892 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
2894 * c-typeck.c: Include gimplify.h.
2896 2013-11-12 Joseph Myers <joseph@codesourcery.com>
2898 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2899 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2901 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2902 or _Thread_local as appropriate in diagnostics.
2903 (build_null_declspecs): Initialize ret->thread_gnu_p.
2904 (declspecs_add_scspec): Handle either __thread or _Thread_local
2905 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2906 pedantic. Do not disallow _Thread_local extern and _Thread_local
2909 2013-11-07 Joseph Myers <joseph@codesourcery.com>
2910 Andrew MacLeod <amacleod@redhat.com>
2912 * c-aux-info.c (gen_type): Handle atomic qualifier.
2913 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2914 qualifiers when compating types.
2915 (shadow_tag_warned): Handle atomic_p in declspecs.
2916 (quals_from_declspecs): Likewise.
2917 (start_decl): Use c_type_promotes_to when promoting argument
2919 (grokdeclarator): Handle _Atomic.
2920 (get_parm_info): Diagnose any qualifier on "void" as only
2922 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2923 comparing types. Use c_type_promotes_to when promoting argument
2925 (finish_function): Use c_type_promotes_to when promoting argument
2927 (build_null_declspecs): Handle atomic_p in declspecs.
2928 (declspecs_add_qual): Handle RID_ATOMIC.
2929 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2930 (c_token_starts_declspecs): Handle RID_ATOMIC.
2931 (c_parser_declspecs): Handle atomic type specifiers and
2933 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2934 from types of expressions with atomic type.
2935 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2936 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2937 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2938 (c_parser_statement_after_labels, c_parser_switch_statement)
2939 (c_parser_for_statement, c_parser_expr_no_commas)
2940 (c_parser_conditional_expression, c_parser_binary_expression)
2941 (c_parser_cast_expression, c_parser_unary_expression)
2942 (c_parser_postfix_expression)
2943 (c_parser_postfix_expression_after_primary, c_parser_expression):
2944 Use convert_lvalue_to_rvalue.
2945 (c_parser_expression_conv, c_parser_expr_list): Document
2946 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2947 (c_parser_objc_synchronized_statement): Use
2948 convert_lvalue_to_rvalue.
2949 (c_parser_objc_selector): Handle RID_ATOMIC.
2950 (c_parser_objc_receiver, c_parser_array_notation): Use
2951 convert_lvalue_to_rvalue.
2952 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2953 _Atomic (type-name).
2954 (struct c_declspecs): Add atomic_p field.
2955 (convert_lvalue_to_rvalue): Declare.
2956 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2957 corresponding atomic types.
2958 (qualify_type): Don't add _Atomic qualifiers from second argument.
2959 (comp_target_types): Do not allow _Atomic mismatches.
2960 (type_lists_compatible_p): Do not remove atomic qualifiers when
2962 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2963 (build_atomic_assign): New functions.
2964 (build_unary_op): Use build_atomic_assign for atomic increment and
2966 (build_conditional_expr): Do not treat _Atomic void as a qualified
2968 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2969 (find_anonymous_field_with_type, convert_to_anonymous_field)
2970 (convert_for_assignment): Do not remove atomic qualifiers when
2972 (digest_init): Do not accept initialization of arrays of atomic
2973 elements by string constants.
2974 (build_asm_expr): Use convert_lvalue_to_rvalue.
2975 (build_binary_op): Do not treat _Atomic void as a qualified
2978 2013-11-06 DJ Delorie <dj@redhat.com>
2980 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2981 both explicit and builtin, print the location of the explicit one.
2983 2013-11-05 Tobias Burnus <burnus@net-b.de>
2985 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2986 c_parser_omp_distribute, c_parser_omp_teams,
2987 c_parser_omp_target, c_parser_omp_declare): Handle
2990 2013-11-03 Marek Polacek <polacek@redhat.com>
2992 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2994 2013-11-01 Jakub Jelinek <jakub@redhat.com>
2996 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2997 check_dup_generic at the end, unless remove is true.
2998 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3000 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3002 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3004 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3005 with decl that is not pointer nor array.
3007 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3009 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3010 a spawning function is found.
3011 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3012 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3013 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3014 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3016 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3017 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3019 (c_finish_return): Added a check to reject _Cilk_spawn in return
3021 (build_cilk_spawn): New function.
3022 (build_cilk_sync): Likewise.
3023 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3025 2013-10-27 Tobias Burnus <burnus@net-b.de>
3028 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3029 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3030 (c_parser_statement_after_labels): Update calls.
3032 2013-10-24 Tobias Burnus <burnus@net-b.de>
3035 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3036 Handle PRAGMA_IVDEP.
3037 (c_parser_statement_after_labels): Update call.
3039 2013-10-24 Marek Polacek <polacek@redhat.com>
3041 * c-parser.c (c_parser_struct_declaration): Add a comment.
3042 (c_parser_declarator): Don't allow _Alignas here.
3044 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3046 * c-parser.c: Include omp-low.h.
3047 * c-typeck.c: Likewise.
3049 2013-10-17 Marek Polacek <polacek@redhat.com>
3052 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3053 Document syntax of the array-declarator.
3054 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3056 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3057 (c_parser_struct_declaration): Likewise.
3058 (c_parser_declarator): Likewise.
3059 (c_parser_direct_declarator_inner): Likewise.
3060 (c_parser_parameter_declaration): Likewise.
3061 (c_parser_type_name): Likewise.
3063 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3065 * c-lang.h (current_omp_declare_target_attribute): New extern
3067 * c-parser.c: Include c-lang.h.
3068 (struct c_parser): Change tokens to c_token *.
3069 Add tokens_buf field. Change tokens_avail type to unsigned int.
3070 (c_parser_consume_token): If parser->tokens isn't
3071 &parser->tokens_buf[0], increment parser->tokens.
3072 (c_parser_consume_pragma): Likewise.
3073 (enum pragma_context): Add pragma_struct and pragma_param.
3074 (c_parser_external_declaration): Adjust
3075 c_parser_declaration_or_fndef caller.
3076 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3077 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3078 Adjust recursive call.
3079 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3081 (c_parser_parameter_declaration): Use pragma_param instead of
3083 (c_parser_compound_statement_nostart, c_parser_label,
3084 c_parser_for_statement): Adjust
3085 c_parser_declaration_or_fndef callers.
3086 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3087 it through to c_parser_conditional_expression.
3088 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3089 pass it through to c_parser_binary_expression. Adjust recursive
3091 (c_parser_binary_expression): Remove prec argument, add
3092 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3093 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3094 binop matches it, use build2 instead of parser_build_binary_op.
3095 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3096 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3097 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3098 Handle pragma_struct and pragma_param the same as pragma_external.
3099 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3100 (c_parser_omp_variable_list): Parse array sections for
3101 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3102 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3103 (c_parser_omp_clause_reduction): Handle user defined reductions.
3104 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3105 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3106 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3107 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3108 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3109 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3110 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3111 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3112 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3113 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3114 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3115 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3116 (c_parser_omp_for_loop): Add CODE argument, pass it through
3117 to c_finish_omp_for. Change last argument to cclauses,
3118 and adjust uses to grab parallel clauses from the array of all
3119 the split clauses. Adjust c_parser_binary_expression,
3120 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3121 (omp_split_clauses): New function.
3122 (c_parser_omp_simd): New function.
3123 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3124 Allow the function to be called also when parsing combined constructs,
3125 and call c_parser_omp_simd when parsing for simd.
3126 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3127 #pragma omp section, require exactly one structured-block instead of
3128 sequence of statements.
3129 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3130 Allow the function to be called also when parsing combined constructs.
3131 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3132 Allow the function to be called also when parsing combined
3134 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3135 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3136 c_parser_omp_teams, c_parser_omp_target_data,
3137 c_parser_omp_target_update, c_parser_omp_target,
3138 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3139 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3140 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3141 (c_parser_omp_construct): Add p_name and mask vars. Handle
3142 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3143 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3144 and c_parser_omp_sections callers.
3145 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3146 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3147 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3148 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3149 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3151 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3152 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3153 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3154 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3155 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3156 * c-typeck.c: Include tree-inline.h.
3157 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3158 handle_omp_array_sections_1, handle_omp_array_sections,
3159 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3160 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3161 user defined reductions.
3162 (c_tree_equal): New function.
3163 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3164 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3165 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3166 c_check_omp_declare_reduction_r): New prototypes.
3167 * c-decl.c (current_omp_declare_target_attribute): New variable.
3168 (c_decl_attributes): New function.
3169 (start_decl, start_function): Use it instead of decl_attributes.
3170 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3171 c_omp_reduction_decl, c_omp_reduction_lookup,
3172 c_check_omp_declare_reduction_r): New functions.
3174 2013-09-25 Tom Tromey <tromey@redhat.com>
3176 * Make-lang.in (c/gccspec.o): Remove.
3177 (CFLAGS-c/gccspec.o): New variable.
3178 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3179 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3180 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3182 2013-09-25 Tom Tromey <tromey@redhat.com>
3184 * Make-lang.in (c/gccspec.o): Don't use subshell.
3186 2013-09-18 Marek Polacek <polacek@redhat.com>
3189 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3190 Remove unnecessary check.
3192 2013-09-18 Marek Polacek <polacek@redhat.com>
3195 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3196 no_sanitize_undefined attribute.
3198 2013-09-13 Kai Tietz <ktietz@redhat.com>
3201 * c-decl.c (c_builtin_function_ext_scope): Remove
3202 wrong assumption that it is never called on prexisting
3205 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3207 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3209 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3211 * c-objc-common.c (c_tree_printer): Tidy.
3213 2013-08-30 Marek Polacek <polacek@redhat.com>
3215 * c-typeck.c (build_binary_op): Add division by zero and shift
3218 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3219 Joseph Myers <joseph@codesourcery.com>
3222 * c-typeck.c (c_common_type): Prefer double_type_node over
3223 other REAL_TYPE types with the same precision.
3224 (convert_arguments): Likewise.
3226 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3228 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3229 (c_initialize_diagnostics): Call a destructor for the early printer.
3231 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3233 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3234 printer initialization.
3236 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3239 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3240 check for truth values.
3241 (expand_array_notation_exprs): Added truth values case. Removed an
3242 unwanted else. Added for-loop to walk through subtrees in default
3245 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3247 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3249 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3251 * c-parser.c (struct c_generic_association): Fix typo.
3253 2013-07-23 Tom Tromey <tromey@redhat.com>
3254 Joseph Myers <joseph@codesourcery.com>
3256 * c-parser.c (struct c_generic_association): New.
3257 (c_generic_association_d): New typedef.
3258 (c_parser_generic_selection): New function.
3259 (c_parser_postfix_expression): Handle RID_GENERIC.
3261 2013-07-13 Jason Merrill <jason@redhat.com>
3264 * c-decl.c (finish_struct): Check for too-large class.
3266 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3269 * c-typeck.c (set_init_index): When folding, check for index overflow.
3271 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3273 * c-parser.c (c_parser_array_notation): Removed rejection of array
3274 notations in an array of function pointers.
3276 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3278 * c-array-notation.c (make_triplet_val_inv): New function.
3279 (create_cmp_incr): Likewise.
3280 (create_array_refs): Likewise.
3281 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3282 Also modularized common parts between functions and called the function.
3283 (build_array_notation_expr): Likewise.
3284 (fix_conditional_array_notations_1): Likewise.
3285 (fix_array_notation_expr): Likewise.
3286 (fix_array_notation_call_expr): Likewise.
3288 2013-06-18 Marek Polacek <polacek@redhat.com>
3291 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3293 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3295 * c-array-notation.c (build_array_notation_expr): Reject array notation
3296 mismatch between LHS and RHS even inside a call_expr. Also, removed
3297 a couple while statements that were dead code.
3299 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3301 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3302 excessive precision expressions in function parameters. Also removed
3303 couple unwanted while statements.
3305 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3307 * c-array-notation.c (expand_array_notation_exprs): Added
3308 ARRAY_NOTATION_REF case.
3310 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3312 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3313 function to c-family/array-notation-common.c.
3314 (is_cilkplus_reduce_builtin): Likewise.
3315 (find_rank): Likewise.
3316 (extract_array_notation_exprs): Likewise.
3317 (replace_array_notations): Likewise.
3318 (find_inv_trees): Likewise.
3319 (replace_inv_trees): Likewise.
3320 (contains_array_notation_expr): Likewise.
3321 (find_correct_array_notation_type): Likewise.
3322 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3323 (struct inv_list): Moved this to c-family/array-notation-common.c.
3324 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3326 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3328 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3329 reduction functions outside the for-loop. Added a check if the fundecl
3330 is non-NULL. Finally, removed an unwanted if-statement, and made the
3333 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3335 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3336 condition of the if-statement matches the rank of else-block and then-
3337 block when array notations are used.
3338 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3339 expression after the entire function body is parsed.
3340 (c_parser_expr_no_commas): Delayed creating array notation expressions
3341 to the end of function parsing.
3342 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3343 whole if-statement instead of just the condition.
3344 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3346 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3349 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3350 array to NULL_TREE if they are unused. Also added a check for the
3351 field to be NULL before its fields are used in future.
3353 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3356 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3357 (build_array_notation_expr): Likewise.
3359 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3361 * c-typeck.c (build_array_ref): Added a check to see if array's
3362 index is greater than one. If true, then emit an error.
3363 (build_function_call_vec): Exclude error reporting and checking
3364 for builtin array-notation functions.
3365 (convert_arguments): Likewise.
3366 (c_finish_return): Added a check for array notations as a return
3367 expression. If true, then emit an error.
3368 (c_finish_loop): Added a check for array notations in a loop
3369 condition. If true then emit an error.
3370 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3371 (build_binary_op): Added a check for array notation expr inside
3372 op1 and op0. If present, we call another function to find correct
3374 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3375 * c-parser.c (c_parser_compound_statement): Check if array
3376 notation code is used in tree, if so, then transform them into
3378 (c_parser_expr_no_commas): Check if array notation is used in LHS
3379 or RHS, if so, then build array notation expression instead of
3381 (c_parser_postfix_expression_after_primary): Added a check for
3382 colon(s) after square braces, if so then handle it like an array
3383 notation. Also, break up array notations in unary op if found.
3384 (c_parser_direct_declarator_inner): Added a check for array
3386 (c_parser_compound_statement): Added a check for array notation in
3387 a stmt. If one is present, then expand array notation expr.
3388 (c_parser_if_statement): Likewise.
3389 (c_parser_switch_statement): Added a check for array notations in
3390 a switch statement's condition. If true, then output an error.
3391 (c_parser_while_statement): Similarly, but for a while.
3392 (c_parser_do_statement): Similarly, but for a do-while.
3393 (c_parser_for_statement): Similarly, but for a for-loop.
3394 (c_parser_unary_expression): Check if array notation is used in a
3395 pre-increment or pre-decrement expression. If true, then expand
3397 (c_parser_array_notation): New function.
3398 * c-array-notation.c: New file.
3399 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3401 2013-05-23 Mike Stump <mikestump@comcast.net>
3403 * c-typeck.c (convert_for_assignment): Handle references to memory
3406 2013-05-16 Jason Merrill <jason@redhat.com>
3408 * Make-lang.in (cc1$(exeext)): Use link mutex.
3410 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3412 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3413 to simply use OPT_Wpointer_arith.
3414 (build_unary_op): Likewise.
3416 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3419 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3420 argument. If set, or it temporarily for parsing of the first
3421 argument into force_folding_builtin_constant_p.
3422 (c_parser_postfix_expression): Adjust callers.
3424 2013-03-21 Richard Biener <rguenther@suse.de>
3426 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3427 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3429 2013-02-12 Marek Polacek <polacek@redhat.com>
3432 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3435 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3438 * c-typeck.c (set_nonincremental_init_from_string): If
3439 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3441 (process_init_element): Likewise.
3443 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3446 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3447 argument, don't call default_function_array_conversion
3448 nor c_fully_fold here.
3449 (c_parser_asm_statement): Adjust callers.
3450 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3451 and outputs here, and call default_function_array_conversion
3452 on inputs that don't need to be addressable.
3454 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3457 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3458 warning require that both c_common_unsigned_type as well as
3459 c_common_signed_type is the same for both mvl and mvr types.
3461 2012-11-16 Diego Novillo <dnovillo@google.com>
3463 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3465 * c-common.c: Use new vec API in vec.h.
3466 * c-common.h: Likewise.
3467 * c-gimplify.c: Likewise.
3468 * c-pragma.c: Likewise.
3469 * c-pretty-print.c: Likewise.
3470 * c-pretty-print.h: Likewise.
3471 * c-semantics.c: Likewise.
3472 * c-decl.c: Likewise.
3473 * c-parser.c: Likewise.
3474 * c-tree.h: Likewise.
3475 * c-typeck.c: Likewise.
3477 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3480 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3482 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3485 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3486 shadows a function, unless the variable is a function or a
3487 pointer-to-function.
3489 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3492 * c-parser.c (struct c_tree_loc_pair): Removed.
3493 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3494 add location_t * and tree * arguments, fill in array of 3
3495 sizeof_arg trees and corresponding locs.
3496 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3497 c_parser_expr_list callers.
3498 (c_parser_postfix_expression_after_primary): Likewise. Pass
3499 array of 3 sizeof_arg trees and locs (corresponding to first
3500 3 arguments) to sizeof_pointer_memaccess_warning.
3502 2012-10-09 Lawrence Crowl <crowl@google.com>
3504 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3505 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3508 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3511 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3514 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3517 * c-typeck.c: Include c-common.h.
3518 (enum stv_conv): Moved to c-common.h.
3519 (scalar_to_vector): Moved to c-common.c.
3520 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3521 * Make-lang.in: c-typeck.c depends on c-common.h.
3523 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3525 * c-decl.c (c_write_global_declarations): Fix handling of
3528 2012-09-30 Sharad Singhai <singhai@google.com>
3530 * c-decl.c (c_write_global_declarations): Use a different method
3531 to determine if the dump has ben initialized.
3533 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3536 * c-typeck.c (c_cast_expr): When casting to a type requiring
3537 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3540 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3543 * c-typeck.c (build_unary_op): Pass original argument of
3544 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3545 any C_MAYBE_CONST_EXPR, if it has integer operands.
3546 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3547 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3548 to c_objc_common_truthvalue_conversion, then remove any
3549 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3550 c_objc_common_truthvalue_conversion not
3551 c_common_truthvalue_conversion.
3552 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3553 call note_integer_operands for arguments with integer operands
3554 that are not integer constants.
3556 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3559 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3560 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3562 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3565 * c-convert.c (convert): Don't call fold_convert_loc if
3566 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3567 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3568 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3570 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3573 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3574 for nested and empty_ok arguments in the call to
3575 c_parser_declaration_or_fndef.
3577 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3579 * c-tree.h (c_last_sizeof_arg): Declare.
3580 * c-parser.c (struct c_tree_loc_pair): New type.
3581 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3583 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3584 (c_parser_postfix_expression_after_primary): Likewise. Call
3585 sizeof_pointer_memaccess_warning if needed.
3586 (sizeof_ptr_memacc_comptypes): New function.
3587 * c-typeck.c (c_last_sizeof_arg): New global variable.
3588 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3590 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3592 * c-lang.h (lang_decl): Add variable_size GTY option.
3594 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3596 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3597 * Make-lang.in: Fix dependencies.
3599 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3601 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3602 and add language Makefile hooks.
3603 * config-lang.in: New file.
3604 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3605 add the required "normal" config-lang.in rules.
3606 * c-lang.h: Moved from gcc/ to here.
3607 * c-tree.h: Likewise.
3608 * c-objc-common.c: Likewise.
3609 * c-objc-common.h: Likewise.
3610 * c-typeck.c: Likewise.
3611 * c-convert.c: Likewise.
3612 * c-lang.c: Likewise.
3613 * c-aux-info.c: Likewise.
3614 * c-errors.c: Likewise.
3615 * gccspec.c: Likewise.
3616 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3617 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3619 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3621 Copying and distribution of this file, with or without modification,
3622 are permitted in any medium without royalty provided the copyright
3623 notice and this notice are preserved.