1 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6 2016-05-25 Marek Polacek <polacek@redhat.com>
9 * c-decl.c (c_make_fname_decl): Don't check seen_error.
12 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
14 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
16 * c-parser.c (c_parser_oacc_declare): Add support for
17 GOMP_MAP_FIRSTPRIVATE_POINTER.
18 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
19 argument with enum c_omp_region_type ort.
20 (handle_omp_array_sections): Likewise. Update call to
21 handle_omp_array_sections_1.
22 (c_finish_omp_clauses): Add specific errors and warning messages for
23 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
24 call to handle_omp_array_sections.
26 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
28 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
30 2016-05-24 Richard Biener <rguenther@suse.de>
34 * c-typeck.c (build_array_ref): Do not complain about indexing
35 non-lvalue vectors. Adjust for function name change.
37 2016-05-20 Martin Sebor <msebor@redhat.com>
40 * c-typeck.c (error_init): Use
41 expansion_point_location_if_in_system_header.
44 2016-05-19 David Malcolm <dmalcolm@redhat.com>
47 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
49 (c_parser_postfix_expression): Likewise.
50 * c-tree.h (c_expr::set_error): New method.
51 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
52 that result's range is initialized.
54 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
56 * c-typeck.c (parser_build_unary_op): Fix formatting.
58 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
60 * c-decl.c (grokdeclarator): Remove errmsg and use of
61 targetm.invalid_return_type.
62 (grokparms): Remove errmsg and use of
63 targetm.invalid_parameter_type.
65 2016-05-13 Joseph Myers <joseph@codesourcery.com>
67 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
70 2016-05-12 Marek Polacek <polacek@redhat.com>
73 * c-decl.c (build_compound_literal): Pass LOC down to
74 c_incomplete_type_error.
75 * c-tree.h (require_complete_type): Adjust declaration.
76 (c_incomplete_type_error): Likewise.
77 * c-typeck.c (require_complete_type): Add location parameter, pass it
78 down to c_incomplete_type_error.
79 (c_incomplete_type_error): Add location parameter, pass it down to
81 (build_component_ref): Pass location down to c_incomplete_type_error.
82 (default_conversion): Pass location down to require_complete_type.
83 (build_array_ref): Likewise.
84 (build_function_call_vec): Likewise.
85 (convert_arguments): Likewise.
86 (build_unary_op): Likewise.
87 (build_c_cast): Likewise.
88 (build_modify_expr): Likewise.
89 (convert_for_assignment): Likewise.
90 (c_finish_omp_clauses): Likewise.
92 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
95 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
97 * c-errors.c (pedwarn_c90): Return true if warned.
98 * c-tree.h (pedwarn_c90): Change return type to bool.
99 (enum c_declspec_word): Add new enumerator cdw_atomic.
101 2016-05-11 Marek Polacek <polacek@redhat.com>
104 * c-decl.c (diagnose_mismatched_decls): Factor out code to
105 diagnose_mismatched_attributes and call it.
107 2016-05-10 Marek Polacek <polacek@redhat.com>
110 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
111 on a declaration following the definition.
113 2016-05-05 Jakub Jelinek <jakub@redhat.com>
115 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
116 parse it through to c_parser_c99_block_statement.
117 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
120 2016-05-04 Marek Polacek <polacek@redhat.com>
122 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
125 2016-05-04 Marek Polacek <polacek@redhat.com>
128 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
129 for macro expansions.
131 2016-05-03 Marek Polacek <polacek@redhat.com>
134 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
135 check_builtin_function_arguments.
137 2016-05-03 Richard Biener <rguenther@suse.de>
139 * Make-lang.in (cc1-checksum.c): For stage-final re-use
140 the checksum from the previous stage.
142 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
144 * c-parser.c (c_parser_oacc_all_clauses): Update call to
145 c_finish_omp_clauses.
146 (c_parser_omp_all_clauses): Likewise.
147 (c_parser_oacc_cache): Likewise.
148 (c_parser_oacc_loop): Likewise.
149 (omp_split_clauses): Likewise.
150 (c_parser_omp_declare_target): Likewise.
151 (c_parser_cilk_all_clauses): Likewise.
152 (c_parser_cilk_for): Likewise.
153 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
154 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
156 2016-05-02 Marek Polacek <polacek@redhat.com>
159 * c-decl.c (grokdeclarator): Diagnose when array's size has an
162 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
165 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
166 OACC_LOOP_CLAUSE_MASK.
167 (c_parser_oacc_kernels_parallel): Update call to
168 c_oacc_split_loop_clauses.
170 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
172 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
173 argument to build_modify_expr in two cases.
175 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
177 * c-parser.c (c_parser_postfix_expression_after_primary): Call
178 warn_for_memset instead of warning directly here.
180 2016-04-26 Marek Polacek <polacek@redhat.com>
183 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
185 (c_parser_for_statement): ... here.
186 (c_parser_if_statement): Use it.
187 (c_parser_switch_statement): Use it.
188 (c_parser_while_statement): Use it.
191 * c-decl.c (pushdecl): Pass LOCUS down to warning.
193 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
196 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
197 instead of c_finish_cilk_clauses.
198 * c-tree.h (c_finish_omp_clauses): Add new default argument.
199 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
200 floating-point variables in the linear clause for Cilk Plus.
202 2016-04-18 Michael Matz <matz@suse.de>
204 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
205 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
207 2016-04-15 Marek Polacek <polacek@redhat.com>
210 * c-typeck.c (build_unary_op): Pass location down to error and
213 2016-04-15 Jakub Jelinek <jakub@redhat.com>
216 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
218 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
219 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
220 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
221 Adjust c_parser_pragma callers.
222 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
224 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
226 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
227 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
228 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
229 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
230 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
231 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
232 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
233 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
235 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
236 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
239 2016-04-13 Marek Polacek <polacek@redhat.com>
242 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
244 (c_parser_statement): Likewise.
245 (c_parser_c99_block_statement): Likewise.
246 (c_parser_while_statement): Likewise.
247 (c_parser_for_statement): Likewise.
248 (c_parser_if_body): Don't set IF_P here.
249 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
250 about dangling else here.
251 * c-tree.h (c_finish_if_stmt): Adjust declaration.
252 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
253 warn about dangling else here.
255 2016-04-04 Marek Polacek <polacek@redhat.com>
258 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
260 2016-03-31 Marek Polacek <polacek@redhat.com>
263 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
265 2016-03-18 David Malcolm <dmalcolm@redhat.com>
268 * c-parser.c (c_parser_postfix_expression): Set the source range
269 for uses of "__builtin_types_compatible_p".
271 2016-03-17 Jakub Jelinek <jakub@redhat.com>
274 * c-typeck.c (composite_type): Don't count void_list_node
275 into len, if the list is terminated by void_list_node, start
276 with void_list_node instead of NULL for newargs. Stop
279 2016-03-16 Marek Polacek <polacek@redhat.com>
282 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
283 nested functions returning VM types.
285 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
287 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
288 when calling c_finish_omp_clauses.
290 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
293 * c-decl.c (get_parm_info): Don't queue implicit function declarations
296 2016-03-04 Marek Polacek <polacek@redhat.com>
299 * c-parser.c (c_parser_postfix_expression): Call
300 c_parser_cast_expression rather than c_parser_postfix_expression.
302 2016-03-01 Jakub Jelinek <jakub@redhat.com>
306 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
307 of incomplete decls to error_mark_node.
309 2016-02-24 Marek Polacek <polacek@redhat.com>
312 * c-decl.c (finish_decl): Don't update the copy of the type of a
315 2016-02-23 Jakub Jelinek <jakub@redhat.com>
318 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
319 in id_kind reclassification.
321 2016-02-16 Jakub Jelinek <jakub@redhat.com>
324 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
326 2016-02-16 James Norris <jnorris@codesourcery.com>
329 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
331 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
333 * c-decl.c (build_null_declspecs): Zero the entire struct.
336 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
337 callers changed. If nested_p is true, use it to call
338 finish_implicit_inits.
339 * c-tree.h (finish_implicit_inits): Declare.
340 * c-typeck.c (finish_implicit_inits): New function. Move code
342 (push_init_level): ... here.
343 (set_designator, process_init_element): Call finish_implicit_inits.
345 2016-02-11 Jakub Jelinek <jakub@redhat.com>
348 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
349 arguments for -Waddress warning.
351 2016-02-04 Jakub Jelinek <jakub@redhat.com>
354 * c-decl.c (finish_enum): When honoring mode attribute,
355 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
357 2016-01-29 Jakub Jelinek <jakub@redhat.com>
360 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
361 all type variants, not just TYPE_MAIN_VARIANT.
363 2016-01-27 Jakub Jelinek <jakub@redhat.com>
366 * c-decl.c (c_write_global_declarations_1): Warn with
367 warn_unused_function if static prototype without definition
370 2016-01-27 Marek Polacek <polacek@redhat.com>
373 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
374 to unsigned, if needed. Add -Wsign-compare warning.
376 2016-01-26 Jakub Jelinek <jakub@redhat.com>
378 PR tree-optimization/69483
379 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
381 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
384 * c-tree.h (incomplete_record_decls): Declare.
385 * c-parser.c (incomplete_record_decls): Define.
386 (c_parser_translation_unit): Iterate through incomplete_record_decls and
387 report error if any decl has zero size.
388 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
389 or enum type to incomplete_record_decls.
391 2016-01-14 Tom de Vries <tom@codesourcery.com>
393 PR tree-optimization/68773
394 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
397 2016-01-14 Marek Polacek <polacek@redhat.com>
400 * c-decl.c (grokdeclarator): Provide more information for invalid
403 2016-01-06 David Malcolm <dmalcolm@redhat.com>
405 * c-parser.c (c_parser_unary_expression): For dereferences, build
406 a combined location before calling build_indirect_ref, so that
407 error reports cover the full range, manually updating the c_expr
410 2016-01-06 Marek Polacek <polacek@redhat.com>
413 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
414 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
417 2016-01-04 Jakub Jelinek <jakub@redhat.com>
419 Update copyright years.
421 2016-01-04 Marek Polacek <polacek@redhat.com>
424 * c-typeck.c (build_atomic_assign): Improve commentary. Add
425 optimization to use __atomic_fetch_* built-in if possible.
427 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
429 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
431 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
434 2015-12-22 Marek Polacek <polacek@redhat.com>
437 * c-typeck.c (build_component_ref): Warn when acessing elements of
438 atomic structures or unions.
440 2015-12-21 David Malcolm <dmalcolm@redhat.com>
442 * c-typeck.c: Include "gcc-rich-location.h".
443 (build_binary_op): In the two places that call binary_op_error,
444 create a gcc_rich_location and populate it with the location of
445 the binary op and its two operands.
447 2015-12-16 David Malcolm <dmalcolm@redhat.com>
449 * c-parser.c (c_parser_statement_after_labels): When calling
450 c_finish_return, Use the return expression's location if it has
451 one, falling back to the location of the first token within it.
452 * c-typeck.c (c_finish_return): When issuing warnings about
453 the incorrect presence/absence of a return value, issue a note
454 showing the declaration of the function.
456 2015-12-16 David Malcolm <dmalcolm@redhat.com>
458 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
460 (c_parser_peek_nth_token): New function.
461 (c_parser_peek_conflict_marker): New function.
462 (c_parser_error): Detect conflict markers and report them as such.
464 2015-12-16 David Malcolm <dmalcolm@redhat.com>
466 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
467 to preserve range information for the primary expression
468 in the call to c_parser_postfix_expression_after_primary.
470 2015-12-16 David Malcolm <dmalcolm@redhat.com>
472 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
473 expression location, falling back on the first token location,
474 rather than always using the latter.
476 2015-12-16 Marek Polacek <polacek@redhat.com>
479 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
482 2015-12-15 Marek Polacek <polacek@redhat.com>
485 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
488 2015-12-08 David Malcolm <dmalcolm@redhat.com>
490 * c-parser.c (c_parser_alignof_expression): Capture location of
491 closing parenthesis (if any), or of end of unary expression, and
492 use it to build a src_range for the expression.
494 2015-12-08 David Malcolm <dmalcolm@redhat.com>
497 * c-parser.c (c_parser_get_builtin_args): Add
498 "out_close_paren_loc" param, and write back to it.
499 (c_parser_postfix_expression): Capture the closing
500 parenthesis location for RID_CHOOSE_EXPR,
501 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
502 RID_BUILTIN_SHUFFLE and use it to set the source range
503 for such expressions; within RID_BUILTIN_COMPLEX set
504 the underlying location.
506 2015-12-07 Marek Polacek <polacek@redhat.com>
509 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
510 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
512 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
514 * c-tree.h (c_build_va_arg): Adjust prototype.
515 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
516 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
517 parameter, adjust throughout and issue an error if EXPR is a component
518 with reverse storage order.
520 2015-12-02 Jason Merrill <jason@redhat.com>
522 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
523 (c_fully_fold_internal, decl_constant_value_for_optimization):
524 Move from c-common.c.
525 * c-tree.h: Declare decl_constant_value_for_optimization.
526 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
528 2015-12-02 Joseph Myers <joseph@codesourcery.com>
531 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
532 following link from declarator to next declarator. Track original
533 qualified type and pass it to c_build_qualified_type.
534 * c-typeck.c (c_build_qualified_type): Add arguments
535 orig_qual_type and orig_qual_indirect.
537 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
539 * c-parser.c (c_parser_omp_clause_name)
540 (c_parser_oacc_all_clauses): Alphabetical sorting.
542 2015-12-02 Jakub Jelinek <jakub@redhat.com>
545 * c-decl.c (get_parm_info): Use b->locus instead of input_location
548 2015-12-01 Julian Brown <julian@codesourcery.com>
549 Cesar Philippidis <cesar@codesourcery.com>
550 James Norris <James_Norris@mentor.com>
552 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
553 (c_parser_oacc_clause_use_device): New function.
554 (c_parser_oacc_all_clauses): Add use_device support.
555 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
556 (c_parser_oacc_host_data): New function.
557 (c_parser_omp_construct): Add host_data support.
558 * c-tree.h (c_finish_oacc_host_data): Add prototype.
559 * c-typeck.c (c_finish_oacc_host_data): New function.
560 (c_finish_omp_clauses): Add use_device support.
562 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
565 * c-decl.c: Set TYPE_PACKED in variants.
567 2015-11-27 Martin Liska <mliska@suse.cz>
570 * c-array-notation.c (fix_builtin_array_notation_fn):
571 Use release_vec_vec instead of vec::release.
572 (build_array_notation_expr): Likewise.
573 (fix_conditional_array_notations_1): Likewise.
574 (fix_array_notation_expr): Likewise.
575 (fix_array_notation_call_expr): Likewise.
577 2015-11-27 Jakub Jelinek <jakub@redhat.com>
580 * c-parser.c (c_parser_compound_statement_nostart): If
581 last_label is true, use pragma_stmt instead of pragma_compound
582 as second c_parser_pragma argument.
583 (c_parser_omp_ordered, c_parser_omp_target_update,
584 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
585 false as second argument to c_parser_skip_to_pragma_eol after
586 diagnosing standalone directives used in pragma_stmt context.
588 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
590 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
591 with "if (ENABLE_OFFLOADING)".
593 2015-11-23 David Malcolm <dmalcolm@redhat.com>
596 * c-parser.c (c_parser_postfix_expression): Set up source ranges
597 for various Objective-C constructs: Class.name syntax,
598 @selector(), @protocol(), @encode(), and [] message syntax.
600 2015-11-20 David Malcolm <dmalcolm@redhat.com>
603 * c-typeck.c (should_suggest_deref_p): New function.
604 (build_component_ref): Special-case POINTER_TYPE when
605 generating a "not a structure of union" error message, and
606 suggest a "->" rather than a ".", providing a fix-it hint.
608 2015-11-19 David Malcolm <dmalcolm@redhat.com>
610 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
611 candidate into a new function, find_closest_identifier.
613 2015-11-19 Marek Polacek <polacek@redhat.com>
616 * c-typeck.c (parser_build_binary_op): Properly handle
617 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
619 2015-11-17 David Malcolm <dmalcolm@redhat.com>
621 * c-parser.c (set_c_expr_source_range): Bulletproof both
622 overloaded implementations against NULL expr->value.
623 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
625 (c_parser_unary_expression): Likewise when handling addresses of
627 (c_parser_postfix_expression): Likewise for statement expressions,
628 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
629 __builtin_va_arg, and for __builtin_offset_of.
630 (c_parser_postfix_expression_after_paren_type): Initialize expr's
631 src_range using the range of the braced initializer.
632 (c_parser_transaction_expression): Set src_range for "ret" to a
635 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
637 * c-parser.c (c_finish_omp_declare_simd): Look for
638 "simd" attribute as well. Update error message.
640 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
642 * c-parser.c (c_parser_omp_declare_target): Adjust.
644 2015-11-14 Jakub Jelinek <jakub@redhat.com>
646 * c-typeck.c (c_finish_omp_clauses): Don't mark
647 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
649 2015-11-14 Marek Polacek <polacek@redhat.com>
651 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
652 * c-typeck.c: Likewise.
654 2015-11-13 David Malcolm <dmalcolm@redhat.com>
656 * c-decl.c (warn_defaults_to): Pass line_table to
658 * c-errors.c (pedwarn_c99): Likewise.
659 (pedwarn_c90): Likewise.
660 * c-parser.c (set_c_expr_source_range): New functions.
661 (c_token::get_range): New method.
662 (c_token::get_finish): New method.
663 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
664 based on the range from the start of the LHS to the end of the
666 (c_parser_conditional_expression): Likewise, based on the range
667 from the start of the cond.value to the end of exp2.value.
668 (c_parser_binary_expression): Call set_c_expr_source_range on
669 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
670 (c_parser_cast_expression): Call set_c_expr_source_range on ret
671 based on the cast_loc through to the end of the expr.
672 (c_parser_unary_expression): Likewise, based on the
673 op_loc through to the end of op.
674 (c_parser_sizeof_expression) Likewise, based on the start of the
675 sizeof token through to either the closing paren or the end of
677 (c_parser_postfix_expression): Likewise, using the token range,
678 or from the open paren through to the close paren for
679 parenthesized expressions.
680 (c_parser_postfix_expression_after_primary): Likewise, for
681 various kinds of expression.
682 * c-tree.h (struct c_expr): Add field "src_range".
683 (c_expr::get_start): New method.
684 (c_expr::get_finish): New method.
685 (set_c_expr_source_range): New decls.
686 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
687 on ret for prefix unary ops.
688 (parser_build_binary_op): Likewise, running from the start of
689 arg1.value through to the end of arg2.value.
691 2015-11-13 Marek Polacek <polacek@redhat.com>
694 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
696 2015-11-13 David Malcolm <dmalcolm@redhat.com>
698 * c-typeck.c: Include spellcheck.h.
699 (lookup_field_fuzzy_find_candidates): New function.
700 (lookup_field_fuzzy): New function.
701 (build_component_ref): If the field was not found, try using
702 lookup_field_fuzzy and potentially offer a suggestion.
704 2015-11-12 James Norris <jnorris@codesourcery.com>
705 Joseph Myers <joseph@codesourcery.com>
707 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
708 (c_parser_omp_clause_name): Handle 'device_resident' clause.
709 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
710 and PRAGMA_OMP_CLAUSE_LINK.
711 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
712 and PRAGMA_OACC_CLAUSE_LINK.
713 (OACC_DECLARE_CLAUSE_MASK): New definition.
714 (c_parser_oacc_declare): New function.
716 2015-11-12 Marek Polacek <polacek@redhat.com>
719 * c-parser.c (c_parser_for_statement): Reclassify the token in
722 2015-11-11 Marek Polacek <polacek@redhat.com>
726 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
727 checking the size of an array.
729 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
731 * c-array-notation.c: Remove unused header files.
732 * c-aux-info.c: Likewise.
733 * c-convert.c: Likewise.
734 * c-decl.c: Likewise.
735 * c-errors.c: Likewise.
736 * c-lang.c: Likewise.
737 * c-objc-common.c: Likewise.
738 * c-parser.c: Likewise.
739 * c-typeck.c: Likewise.
740 * gccspec.c: Likewise.
742 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
743 Cesar Philippidis <cesar@codesourcery.com>
744 James Norris <jnorris@codesourcery.com>
745 Julian Brown <julian@codesourcery.com>
746 Nathan Sidwell <nathan@codesourcery.com>
749 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
751 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
752 (c_parser_pragma): Parse 'acc routine'.
753 (OACC_ROUTINE_CLAUSE_MARK): Define.
754 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
756 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
759 * c-typeck.c (c_finish_loop): For unconditional loops, set the
760 location of the backward-goto to the start of the loop body.
762 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
765 * c-parser.c (c_parser_while_statement): Finish the loop before
766 parsing ahead for misleading indentation.
767 (c_parser_for_statement): Likewise.
769 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
771 * c-decl.c (finish_struct): If the structure has reverse storage
772 order, rewrite the type of array fields with scalar component. Call
773 maybe_apply_pragma_scalar_storage_order on entry.
774 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
775 errors on bit-fields and reverse SSO here and not...
776 (c_mark_addressable): ...here.
777 (output_init_element): Adjust call to initializer_constant_valid_p.
778 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
780 2015-11-06 David Malcolm <dmalcolm@redhat.com>
782 * c-decl.c (warn_defaults_to): Update for change in signature
783 of diagnostic_set_info.
784 * c-errors.c (pedwarn_c99): Likewise.
785 (pedwarn_c90): Likewise.
786 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
787 for textinfo::set_location.
789 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
790 Thomas Schwinge <thomas@codesourcery.com>
791 James Norris <jnorris@codesourcery.com>
793 * c-parser.c (c_parser_omp_clause_name): Add support for
794 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
795 (c_parser_omp_clause_default): Add is_oacc argument. Handle
796 default(none) in OpenACC.
797 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
799 (c_parser_oacc_clause_tile): New function.
800 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
801 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
802 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
804 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
805 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
807 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
808 (c_parser_oacc_update): Update the error message for missing clauses.
809 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
810 and OMP_CLAUSE_INDEPENDENT.
812 2015-11-05 Marek Polacek <polacek@redhat.com>
815 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
816 deal with pre-evaluation on invalid types.
818 2015-11-05 Jakub Jelinek <jakub@redhat.com>
819 Ilya Verbin <ilya.verbin@intel.com>
821 * c-parser.c: Include context.h and gimple-expr.h.
822 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
823 monotonic together with nonmonotonic.
824 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
825 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
826 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
827 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
828 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
829 expressions on combined target teams before the target.
830 (c_parser_omp_declare_target): If decl has "omp declare target" or
831 "omp declare target link" attribute, and cgraph or varpool node already
832 exists, then set corresponding flags. Call c_finish_omp_clauses
833 in the parenthesized extended-list syntax case.
834 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
836 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
837 on OMP_CLAUSE_REDUCTION array sections.
838 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
839 into the constant offset, or for variable low-bound using
840 POINTER_PLUS_EXPR. For structure element based array sections use
841 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
842 (c_finish_omp_clauses): Drop generic_field_head, structure
843 elements are now always mapped even as array section bases,
844 diagnose same var in data sharing and mapping clauses. Diagnose if
845 linear step on declare simd is neither a constant nor a uniform
846 parameter. Look through POINTER_PLUS_EXPR for array section
847 reductions. Diagnose the same var or function appearing multiple
848 times on the same directive. Fix up wording for the to clause if t
849 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
850 modifier on kinds other than dynamic or guided or nonmonotonic
851 modifier together with ordered clause.
853 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
854 Chung-Lin Tang <cltang@codesourcery.com>
856 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
858 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
860 * c-array-notation.c: Reorder #include's and remove duplicates.
861 * c-aux-info.c: Likewise.
862 * c-convert.c: Likewise.
863 * c-decl.c: Likewise.
864 * c-errors.c: Likewise.
865 * c-lang.c: Likewise.
866 * c-objc-common.c: Likewise.
867 * c-parser.c: Likewise.
868 * c-typeck.c: Likewise.
870 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
873 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
874 after calling build_qualified_type.
876 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
877 Thomas Schwinge <thomas@codesourcery.com>
878 James Norris <jnorris@codesourcery.com>
879 Joseph Myers <joseph@codesourcery.com>
880 Julian Brown <julian@codesourcery.com>
881 Bernd Schmidt <bschmidt@redhat.com>
883 * c-parser.c (c_parser_oacc_shape_clause): New.
884 (c_parser_oacc_simple_clause): New.
885 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
886 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
888 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
889 James Norris <jnorris@codesourcery.com>
890 Cesar Philippidis <cesar@codesourcery.com>
894 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
895 parameters, and handle these. Adjust all users.
896 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
898 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
900 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
902 (c_finish_omp_construct): Declare function.
903 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
904 Merge functions into...
905 (c_finish_omp_construct): ... this new function.
907 2015-10-22 Richard Biener <rguenther@suse.de>
909 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
910 before folding a MINUS_EXPR.
912 2015-10-21 Marek Polacek <polacek@redhat.com>
915 * c-decl.c (start_function): Warn about vararg functions without
918 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
920 * c-typeck.c (build_conditional_expr): Use boolean vector
921 type for vector comparison.
922 (build_vec_cmp): New.
923 (build_binary_op): Use build_vec_cmp for comparison.
925 2015-10-20 Marek Polacek <polacek@redhat.com>
927 * c-parser.c (is_cilkplus_vector_p): Don't define here.
929 2015-10-20 Marek Polacek <polacek@redhat.com>
932 * c-parser.c (c_parser_attributes): Break out of the loop if the
933 token after an attribute isn't a comma.
935 2015-10-13 Jakub Jelinek <jakub@redhat.com>
936 Aldy Hernandez <aldyh@redhat.com>
938 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
939 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
940 (c_parser_omp_variable_list): Handle structure elements for
941 map, to and from clauses. Handle array sections in reduction
942 clause. Formatting fixes.
943 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
945 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
946 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
947 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
948 c_parser_omp_clause_is_device_ptr): New functions.
949 (c_parser_omp_clause_ordered): Parse optional parameter.
950 (c_parser_omp_clause_reduction): Handle array reductions.
951 (c_parser_omp_clause_schedule): Parse optional simd modifier.
952 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
954 (c_parser_omp_clause_linear): Parse linear clause modifiers.
955 (c_parser_omp_clause_depend_sink): New function.
956 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
957 (c_parser_omp_clause_map): Parse release/delete map kinds and
958 optional always modifier.
959 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
960 and c_finish_omp_clauses callers.
961 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
962 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
963 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
964 (OMP_CRITICAL_CLAUSE_MASK): Define.
965 (c_parser_omp_critical): Parse critical clauses.
966 (c_parser_omp_for_loop): Handle doacross loops, adjust
967 c_finish_omp_for and c_finish_omp_clauses callers.
968 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
969 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
970 (OMP_FOR_CLAUSE_MASK): Add linear clause.
971 (c_parser_omp_for): Disallow ordered clause when combined with
972 distribute. Disallow linear clause when combined with distribute
973 and not combined with simd.
974 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
975 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
976 parse clauses and if depend clause is found, don't parse a body.
977 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
978 Allow target parallel without for after it.
979 (OMP_TASK_CLAUSE_MASK): Add priority clause.
980 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
981 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
983 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
984 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
985 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
986 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
988 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
989 defaultmap and is_device_ptr clauses.
990 (c_parser_omp_target): Parse target parallel and target simd. Set
991 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
992 and target exit data. Diagnose invalid map kinds.
993 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
994 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
996 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
998 (OMP_TASKLOOP_CLAUSE_MASK): Define.
999 (c_parser_omp_taskloop): New function.
1000 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1001 handle PRAGMA_OMP_TASKLOOP.
1002 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1003 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1004 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1005 Add IS_OMP argument, handle structure element bases, diagnose
1006 bitfields, pass IS_OMP recursively, diagnose known zero length
1007 array sections in depend clauses, handle array sections in reduction
1008 clause, diagnose negative length even for pointers.
1009 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1010 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1011 array sections in reduction clause, set
1012 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1013 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1014 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1015 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1017 2015-10-06 Marek Polacek <polacek@redhat.com>
1019 * c-parser.c (c_parser_statement_after_labels): Use
1020 protected_set_expr_location.
1021 (c_parser_omp_clause_num_gangs): Likewise.
1022 (c_parser_omp_clause_num_threads): Likewise.
1023 (c_parser_omp_clause_num_workers): Likewise.
1024 (c_parser_omp_clause_vector_length): Likewise.
1025 (c_parser_omp_clause_num_teams): Likewise.
1026 (c_parser_omp_clause_thread_limit): Likewise.
1027 * c-typeck.c (build_c_cast): Likewise.
1028 (c_cast_expr): Likewise.
1030 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1032 * c-typeck.c (c_tree_equal): Use real_equal instead of
1035 2015-10-04 Jason Merrill <jason@redhat.com>
1037 * c-parser.c (c_lex_one_token): Handle @synchronized.
1038 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1039 can change whether the function is transaction_safe.
1041 2015-10-02 Marek Polacek <polacek@redhat.com>
1044 * c-typeck.c (convert_for_assignment): Use the expansion point
1045 location throughout.
1047 2015-10-02 Marek Polacek <polacek@redhat.com>
1050 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1051 and pass it down to c_parser_if_statement.
1052 (c_parser_else_body): Add CHAIN parameter and pass it down to
1053 c_parser_statement_after_labels.
1054 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1055 duplicated if-else-if conditions.
1057 2015-10-01 Marek Polacek <polacek@redhat.com>
1059 * c-typeck.c (convert_for_assignment): Improve commentary.
1061 2015-09-30 Marek Polacek <polacek@redhat.com>
1064 * c-typeck.c (c_finish_return): Use the expansion point location for
1065 certain "return with value" warnings.
1067 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1069 * c-parser.c (pragma_lex): Add loc argument.
1071 2015-09-15 Marek Polacek <polacek@redhat.com>
1074 * c-decl.c (tag_exists_p): New function.
1075 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1076 struct/union/enum keywords are missing.
1077 * c-tree.h (tag_exists_p): Declare.
1079 2015-09-15 Marek Polacek <polacek@redhat.com>
1081 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1082 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1083 Return NULL_TREE instead of 0.
1084 (lookup_name): Return NULL_TREE instead of 0.
1085 (lookup_name_in_scope): Likewise.
1086 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1087 (parser_xref_tag): Use false instead of 0.
1088 (start_struct): Use true instead of 1.
1089 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1091 2015-09-14 Marek Polacek <polacek@redhat.com>
1093 * c-typeck.c (set_nonincremental_init_from_string): Use
1094 HOST_WIDE_INT_M1U when shifting a negative value.
1096 2015-09-09 Mark Wielaard <mjw@redhat.com>
1098 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1101 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1104 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1105 into OMP_FOR_PRE_BODY rather than before the loop.
1107 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1110 * c-parser.c (c_parser_oacc_all_clauses,
1111 c_parser_omp_all_clauses): Remove invalid clause from
1112 list of clauses even if parser->error is set.
1115 * c-parser.c (c_parser_omp_clause_aligned,
1116 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1118 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1122 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1123 instead of c_parser_unary_expression. If the result is !lvalue_p,
1124 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1126 2015-09-04 Marek Polacek <polacek@redhat.com>
1129 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1131 2015-09-03 Martin Sebor <msebor@redhat.com>
1134 * c-typeck.c (convert_arguments, parser_build_unary_op,
1135 build_conditional_expr, c_cast_expr, convert_for_assignment,
1136 build_binary_op, _objc_common_truthvalue_conversion): Call
1138 (c_decl_implicit): Define.
1140 2015-09-02 Marek Polacek <polacek@redhat.com>
1143 * c-parser.c (c_parser_enum_specifier): Give a better error for
1146 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1148 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1150 2015-08-12 Marek Polacek <polacek@redhat.com>
1152 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1155 2015-08-03 Marek Polacek <polacek@redhat.com>
1158 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1160 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1162 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1164 * c-parser.c (c_parser_if_body): Take token_indent_info
1165 argument. Call warn_for_misleading_indentation even when the
1166 body is a semicolon. Extract token_indent_infos corresponding
1167 to the guard, body and next tokens. Adjust call to
1168 warn_for_misleading_indentation accordingly.
1169 (c_parser_else_body): Likewise.
1170 (c_parser_if_statement): Likewise.
1171 (c_parser_while_statement): Likewise.
1172 (c_parser_for_statement): Likewise.
1174 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1175 Manuel López-Ibáñez <manu@gcc.gnu.org>
1177 * c-decl.c (get_parm_info): Remove static var. Update warning
1180 2015-07-27 Marek Polacek <polacek@redhat.com>
1184 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1186 2015-07-20 Marek Polacek <polacek@redhat.com>
1189 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1190 (build_binary_op): Warn about left shift overflows.
1192 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1194 * c-array-notation.c: Adjust includes for flags.h changes.
1195 * c-objc-common.c: Likewise.
1197 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1199 * c-array-notation.c: Adjust includes.
1200 * c-aux-info.c: Likewise.
1201 * c-convert.c: Likewise.
1202 * c-decl.c: Likewise.
1203 * c-errors.c: Likewise.
1204 * c-lang.c: Likewise.
1205 * c-objc-common.c: Likewise.
1206 * c-parser.c: Likewise.
1207 * c-typeck.c: Likewise.
1209 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1212 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1214 2015-06-29 Marek Polacek <polacek@redhat.com>
1217 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1218 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1219 about -Wswitch-bool here.
1220 (do_case): Update c_add_case_label call.
1221 (c_finish_case): Update c_do_switch_warnings call.
1223 2015-06-27 Marek Polacek <polacek@redhat.com>
1225 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1227 2015-06-26 Marek Polacek <polacek@redhat.com>
1229 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1231 * c-typeck.c (array_to_pointer_conversion): Likewise.
1232 (build_unary_op): Likewise.
1233 (c_finish_return): Likewise.
1235 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1237 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1238 * c-parser.c: Likewise.
1240 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1242 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1243 instead of pointer_hash.
1244 (detect_field_duplicates): Likewise.
1246 2015-06-25 Marek Polacek <polacek@redhat.com>
1248 * c-array-notation.c: Use VAR_P throughout.
1249 * c-decl.c: Likewise.
1250 * c-objc-common.c: Likewise.
1251 * c-parser.c: Likewise.
1252 * c-typeck.c: Likewise.
1254 2015-06-25 Marek Polacek <polacek@redhat.com>
1256 * c-decl.c: Use is_global_var throughout.
1257 * c-parser.c: Likewise.
1258 * c-typeck.c: Likewise.
1260 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1262 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1263 * c-aux-info.c: Likewise.
1264 * c-convert.c: Likewise.
1265 * c-decl.c: Likewise.
1266 * c-errors.c: Likewise.
1267 * c-lang.c: Likewise.
1268 * c-objc-common.c: Likewise.
1269 * c-parser.c: Likewise.
1270 * c-typeck.c: Likewise.
1272 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1275 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1278 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1280 * c-decl.c (pop_scope): Register the main translation unit
1281 through the new debug hook.
1283 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1285 * c-array-notation.c : Adjust include files.
1286 * c-aux-info.c : Likewise.
1287 * c-convert.c : Likewise.
1288 * c-decl.c : Likewise.
1289 * c-errors.c : Likewise.
1290 * c-lang.c : Likewise.
1291 * c-lang.h : Likewise.
1292 * c-objc-common.c : Likewise.
1293 * c-parser.c : Likewise.
1294 * c-typeck.c : Likewise.
1296 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1298 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1299 immediately clobber it.
1300 (c_write_global_declarations_1): Remove call to
1301 check_global_declaration_1.
1302 (c_write_global_declarations_2): Remove.
1303 (c_write_final_cleanups): Rename from c_write_global_declarations.
1304 Remove call to finalize_compilation_unit.
1305 Remove calls to debugging hooks.
1306 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1307 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1308 * c-tree.h: Remove c_write_global_declarations.
1310 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1312 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1313 * c-aux-info.c: Likewise.
1314 * c-convert.c: Likewise.
1315 * c-decl.c: Likewise.
1316 * c-errors.c: Likewise.
1317 * c-lang.c: Likewise.
1318 * c-objc-common.c: Likewise.
1319 * c-parser.c: Likewise.
1320 * c-typeck.c: Likewise.
1322 2015-06-04 Marek Polacek <polacek@redhat.com>
1325 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1328 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1330 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1331 Warn for empty struct.
1332 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1334 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1336 * c-decl.c (start_function): Call plugin before parsing.
1337 (finish_function): Call plugin after parsing.
1339 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1342 * c-decl.c (merge_decls): Merge DECL_COMMON.
1344 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1346 * Make-lang.in (check_gcc_pallelize): Define.
1348 2015-05-22 Marek Polacek <polacek@redhat.com>
1351 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1354 2015-05-21 Marek Polacek <polacek@redhat.com>
1356 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1359 2015-05-20 Marek Polacek <polacek@redhat.com>
1361 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1362 * c-typeck.c: Likewise.
1364 2015-05-19 Marek Polacek <polacek@redhat.com>
1366 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1368 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1371 * c-parser.c (c_parser_omp_for_loop): Don't add
1372 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1373 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1374 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1377 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1379 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1382 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1385 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1388 2015-05-14 Marek Polacek <polacek@redhat.com>
1392 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1395 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1397 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1398 to add a call to warn_for_misleading_indentation.
1399 (c_parser_else_body): Likewise, adding param "else_loc".
1400 (c_parser_if_statement): Check for misleading indentation.
1401 (c_parser_while_statement): Likewise.
1402 (c_parser_for_statement): Likewise.
1404 2015-05-08 Marek Polacek <polacek@redhat.com>
1407 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1408 (output_init_element): Likewise.
1410 2015-05-07 Marek Polacek <polacek@redhat.com>
1413 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1416 2015-04-30 Marek Polacek <polacek@redhat.com>
1418 * c-typeck.c (set_init_label): Call error_at instead of error and
1421 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1424 * c-typeck.c (c_build_va_arg): Clarify the error message.
1426 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1428 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1429 OMP_STANDALONE_CLAUSES.
1431 2015-04-28 Marek Polacek <polacek@redhat.com>
1433 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1435 2015-04-28 Marek Polacek <polacek@redhat.com>
1438 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1440 2015-04-25 Marek Polacek <polacek@redhat.com>
1443 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1446 2015-04-23 Marek Polacek <polacek@redhat.com>
1449 * c-decl.c (set_labels_context_r): New function.
1450 (store_parm_decls): Call it via walk_tree_without_duplicates.
1451 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1452 instead of create_tmp_var. Build TARGET_EXPR instead of
1454 (build_atomic_assign): Use create_tmp_var_raw instead of
1455 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1457 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1459 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1460 (c_parser_omp_target_update): Add missed %> to error_at ().
1462 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1465 * c-decl.c (c_default_pointer_mode): Remove definition.
1466 * c-tree.h (c_default_pointer_mode): Remove declaration.
1468 2015-03-27 Tobias Burnus <burnus@net-b.de>
1471 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1473 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1474 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1475 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1477 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1479 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1480 attribute for DECL_EXTERNAL VAR_DECLs.
1482 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1484 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1487 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1490 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1491 before preparing arguments to warn_logical_not_parentheses.
1493 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1496 * c-typeck.c (parser_build_binary_op): Don't warn for
1497 !!x == y or !b == y where b is _Bool.
1499 2015-03-09 Marek Polacek <polacek@redhat.com>
1501 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1502 * c-decl.c (grokdeclarator): Likewise.
1503 * c-typeck.c (build_binary_op): Likewise.
1505 2015-02-27 Marek Polacek <polacek@redhat.com>
1508 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1510 2015-02-14 Marek Polacek <polacek@redhat.com>
1513 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1514 declared through a typedef name.
1516 2015-02-13 Marek Polacek <polacek@redhat.com>
1519 * c-decl.c (grokdeclarator): Print also the type when giving
1520 the error message about array's incomplete element type.
1522 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1525 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1526 check in the POP macro.
1528 2015-02-09 Marek Polacek <polacek@redhat.com>
1531 * c-typeck.c (process_init_element): Don't always wrap
1532 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1533 initializing a range of elements.
1535 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1539 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1541 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1543 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1544 processing enum declaration.
1546 2015-01-29 Marek Polacek <polacek@redhat.com>
1549 * c-typeck.c (pop_init_level): If constructor_elements has
1550 exactly one element with integer_zerop value, set constructor_zeroinit
1551 to 1. Remove braces around warning_init call.
1553 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1556 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1557 of FUNCTION_DECLs with error_mark_node.
1559 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1562 * c-typeck.c (convert_arguments): Return -1 if there are
1563 error_args, even if we've diagnosed too many arguments.
1565 2015-01-21 Richard Biener <rguenther@suse.de>
1568 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1569 for builtins the user declared correctly.
1571 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1572 Bernd Schmidt <bernds@codesourcery.com>
1573 Cesar Philippidis <cesar@codesourcery.com>
1574 James Norris <jnorris@codesourcery.com>
1575 Jakub Jelinek <jakub@redhat.com>
1576 Ilmir Usmanov <i.usmanov@samsung.com>
1578 * c-parser.c: Include "gomp-constants.h".
1579 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1580 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1581 Use OMP_CLAUSE_SET_MAP_KIND.
1582 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1583 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1584 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1585 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1586 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1587 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1588 "copyout", "create", "delete", "deviceptr", "gang", "host",
1589 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1590 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1591 "present_or_create", "pcreate", "seq", "self", "vector",
1592 "vector_length", "wait", "worker".
1593 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1594 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1595 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1596 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1597 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1598 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1599 (c_parser_oacc_data_clause_deviceptr)
1600 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1601 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1602 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1603 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1604 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1605 (c_parser_oacc_parallel, c_parser_oacc_update)
1606 (c_parser_oacc_wait): New functions.
1607 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1608 (c_finish_oacc_data): New prototypes.
1609 * c-typeck.c: Include "gomp-constants.h".
1610 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1611 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1612 OMP_CLAUSE_SET_MAP_KIND.
1613 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1614 (c_finish_oacc_data): New functions.
1615 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1616 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1617 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1618 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1619 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1620 GOMP_MAP_FORCE_DEVICEPTR.
1622 2015-01-09 Michael Collison <michael.collison@linaro.org>
1624 * c-array-notation.c: Include hash-set.h, machmode.h,
1625 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1626 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1627 * c-aux-info.c: Ditto.
1628 * c-convert.c: Ditto.
1630 * c-errors.c: Ditto.
1631 * c-lang.c: Dittoxs.
1632 * c-objc-common.c: Ditto.
1633 * c-parser.c: Ditto.
1634 * c-typeck.c: Include hash-set.h, machmode.h,
1635 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1636 fold-const.h, wide-int.h, inchash.h, real.h and
1637 fixed-value.h due to flattening of tree.h.
1639 2015-01-07 Marek Polacek <polacek@redhat.com>
1642 * c-typeck.c (process_init_element): Disallow initialization of
1643 a flexible array member with a string constant if the structure
1646 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1649 * c-typeck.c (convert_for_assignment, c_finish_return): For
1650 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1651 types also set in_late_binary_op around convert call.
1652 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1653 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1654 result on expr as last argument to ubsan_instrument_float_cast,
1655 if in_late_binary_op, don't use c_save_expr but save_expr.
1657 Update copyright years.
1659 2015-01-05 Marek Polacek <polacek@redhat.com>
1662 * c-typeck.c (build_array_ref): Pass loc down to
1663 warn_array_subscript_with_type_char.
1665 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1667 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1668 (common-pointer-type): For pointers to arrays take qualifiers from
1670 (build_conditional_expr): Add warnings for lost qualifiers.
1671 (comp-target-types): Allow pointers to arrays with different qualifiers.
1672 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1673 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1674 to PEDWARN_FOR_QUALIFIERS.
1676 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1679 * c-convert.c: Include ubsan.h.
1680 (convert): For real -> integral casts and
1681 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1682 instead instrument the float cast directly.
1684 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1686 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1687 c_finish_stmt_expr): Remove NULL last argument from
1688 create_tmp_var_raw and create_tmp_var calls.
1689 * c-array-notation.c (fix_builtin_array_notation_fn,
1690 build_array_notation_expr, fix_conditional_array_notations_1,
1691 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1693 2014-11-28 Marek Polacek <polacek@redhat.com>
1696 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1697 convert the right operand to integer type.
1699 2014-11-25 Marek Polacek <polacek@redhat.com>
1702 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1703 for inline functions.
1705 2014-11-21 Jakub Jelinek <jakub@redhat.com>
1708 * c-typeck.c (build_array_ref): Adjust
1709 convert_vector_to_pointer_for_subscript caller. If it returns true,
1710 call non_lvalue_loc on the result.
1712 2014-11-11 Richard Biener <rguenther@suse.de>
1714 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1717 2014-11-10 Andi Kleen <ak@linux.intel.com>
1720 * c-parser.c (c_parser_statement_after_labels): Call
1722 (c_parser_if_statement): Dito.
1723 (c_parser_switch_statement): Dito.
1724 (c_parser_while_statement): Dito.
1725 (c_parser_do_statement): Dito.
1726 (c_parser_for_statement): Dito.
1727 * c-typeck.c (c_finish_loop): Dito.
1729 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1731 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1732 OPT_Wshift_count_overflow in the warnings.
1734 2014-10-30 Marek Polacek <polacek@redhat.com>
1736 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1737 print the stripped version as well, if they're not the same.
1739 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1741 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1744 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1746 * c-decl.c: Adjust include files.
1747 * c-parser.c: Ditto.
1749 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1750 Tom Tromey <tromey@redhat.com>
1752 * c-tree.h (enum c_oracle_request): New.
1753 (c_binding_oracle_function): New typedef.
1754 (c_binding_oracle, c_pushtag, c_bind): Declare.
1755 * c-decl.c (c_binding_oracle): New global.
1756 (I_SYMBOL_CHECKED): New macro.
1757 (i_symbol_binding): New function.
1758 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1759 (I_TAG_CHECKED): New macro.
1760 (i_tag_binding): New function.
1761 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1762 (I_LABEL_CHECKED): New macro.
1763 (i_label_binding): New function.
1764 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1765 (c_print_identifier): Save and restore c_binding_oracle.
1766 (c_pushtag, c_bind): New functions.
1768 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1770 * c-typeck.c: Adjust include files.
1772 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1775 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1776 initialization here...
1777 (c_initialize_diagnostics): ... but here. Set defaults after
1778 building pretty-printer.
1780 2014-10-23 Marek Polacek <polacek@redhat.com>
1783 * c-decl.c (pop_scope): Don't print warning in external_scope.
1785 2014-10-19 Marek Polacek <polacek@redhat.com>
1788 * c-typeck.c (output_init_element): Allow initializing objects with
1789 static storage duration with compound literals even in C99 and add
1792 2014-10-17 Marek Polacek <polacek@redhat.com>
1795 * c-typeck.c (digest_init): Allow initializing objects with static
1796 storage duration with compound literals even in C99 and add pedwarn
1799 2014-10-17 Marek Polacek <polacek@redhat.com>
1802 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1803 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1804 error multiple times. Print the type.
1806 2014-10-17 Marek Polacek <polacek@redhat.com>
1809 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1812 2014-10-17 Marek Polacek <polacek@redhat.com>
1814 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1815 (start_function): Use OPT_Wimplicit_int instead of 0.
1816 (store_parm_decls_oldstyle): Likewise.
1818 2014-10-17 Alan Modra <amodra@gmail.com>
1821 * c-decl.c (merge_decls): Don't merge section name or tls model
1822 to newdecl symtab node, instead merge to olddecl. Override
1823 existing olddecl section name. Set tls_model for all thread-local
1824 vars, not just OMP thread-private ones. Remove incorrect comment.
1826 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1828 * c-decl.c: Adjust include files.
1830 2014-10-14 DJ Delorie <dj@redhat.com>
1832 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1833 (c_token_starts_typename): Check all __intN, not just __int128.
1834 (c_token_starts_declspecs): Likewise.
1835 (c_parser_declspecs): Likewise.
1836 (c_parser_attribute_any_word): Likewise.
1837 (c_parser_objc_selector): Likewise.
1838 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1839 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1841 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1843 (finish_declspecs): Likewise.
1845 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1847 * c-parser.c (c_parser_all_labels): New function to replace
1849 (c_parser_statement): Call the new function.
1851 2014-10-09 Marek Polacek <polacek@redhat.com>
1854 * c-typeck.c (pop_init_level): Don't warn about initializing
1857 2014-10-07 Marek Polacek <polacek@redhat.com>
1860 * c-decl.c (header_for_builtin_fn): New function.
1861 (implicitly_declare): Suggest which header to include.
1863 2014-10-07 Marek Polacek <polacek@redhat.com>
1865 * c-convert.c (convert): Use error_operand_p.
1866 * c-typeck.c (require_complete_type): Likewise.
1867 (really_atomic_lvalue): Likewise.
1868 (digest_init): Likewise.
1869 (handle_omp_array_sections_1): Likewise.
1871 2014-10-03 Marek Polacek <polacek@redhat.com>
1874 * c-decl.c (pop_scope): Don't warn about "inline function declared
1875 but never defined" for functions marked with gnu_inline attribute.
1877 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1880 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1881 on low_bound and length.
1883 2014-09-24 Marek Polacek <polacek@redhat.com>
1887 * c-parser.c: Don't define CPP_KEYWORD.
1888 (c_parser_switch_statement): Pass original type to c_finish_case.
1889 * c-tree.h (c_finish_case): Update declaration.
1890 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1891 conditionally to c_do_switch_warnings.
1893 2014-09-03 Marek Polacek <polacek@redhat.com>
1896 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1899 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1900 Balaji V. Iyer <balaji.v.iyer@intel.com>
1901 Igor Zamyatin <igor.zamyatin@intel.com>
1903 * c-parser.c (c_parser_cilk_for): New function.
1904 (c_parser_cilk_grainsize): Likewise.
1905 (c_get_temp_regvar): Likewise.
1906 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1907 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1908 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1909 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1912 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1914 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1915 with using HOST_WIDE_INT without truncation to 'int'
1917 2014-08-22 Marek Polacek <polacek@redhat.com>
1920 * c-typeck.c (parser_build_binary_op): Adjust call to
1921 warn_logical_not_parentheses.
1923 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1926 * c-parser.c (c_parser_array_notation): Check for correct
1927 type of an array added.
1929 2014-08-19 Marek Polacek <polacek@redhat.com>
1932 * c-typeck.c (build_binary_op): If either operand of a comparison
1933 is a boolean expression, call maybe_warn_bool_compare.
1935 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1938 * c-typeck.c (build_c_cast): Do a conversion even when the
1939 TYPE_MAIN_VARIANTs are the same.
1941 2014-08-19 Marek Polacek <polacek@redhat.com>
1943 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1944 pedwarn_c99 instead of pedwarn.
1945 (grokfield): Likewise.
1946 (warn_defaults_to): New function.
1947 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1948 Unconditionally call pedwarn_c99 instead of pedwarn.
1949 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1950 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1951 check flag_isoc11 before.
1952 * c-errors.c (pedwarn_c99): Change the return type to bool.
1953 Handle -Wc99-c11-compat.
1954 * c-parser.c (disable_extension_diagnostics): Handle
1955 warn_c99_c11_compat.
1956 (restore_extension_diagnostics): Likewise.
1957 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1958 instead of pedwarn, don't check flag_isoc11 before.
1959 (c_parser_declspecs): Likewise.
1960 (c_parser_alignas_specifier): Likewise.
1961 (c_parser_alignof_expression): Likewise.
1962 (c_parser_generic_selection): Likewise.
1963 * c-tree.h (pedwarn_c99): Update declaration.
1964 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1967 2014-08-19 Marek Polacek <polacek@redhat.com>
1969 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1971 * c-errors.c: Include "opts.h".
1972 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1973 * c-parser.c (disable_extension_diagnostics): Handle negative value
1974 of warn_c90_c99_compat, too.
1975 (restore_extension_diagnostics): Likewise.
1976 (c_parser_compound_statement_nostart): Pass
1977 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1979 2014-08-12 Marek Polacek <polacek@redhat.com>
1981 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1983 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1985 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1987 2014-08-10 Marek Polacek <polacek@redhat.com>
1990 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1991 Call pedwarn_c90 instead of pedwarn.
1992 (check_bitfield_type_and_width): Likewise.
1993 (declspecs_add_qual): Likewise.
1994 (declspecs_add_type): Likewise.
1995 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1996 Adjust to only call pedwarn_c90.
1997 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1998 pedwarn_c90 instead of pedwarn.
1999 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2000 * c-parser.c (disable_extension_diagnostics): Handle
2001 warn_c90_c99_compat.
2002 (restore_extension_diagnostics): Likewise.
2003 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2004 pedwarn_c90 instead of pedwarn.
2005 (c_parser_initelt): Likewise.
2006 (c_parser_postfix_expression): Likewise.
2007 (c_parser_postfix_expression_after_paren_type): Likewise.
2008 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2009 * c-tree.h: Fix formatting.
2010 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2011 pedwarn_c90 instead of pedwarn.
2013 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2015 * c-typeck.c: Remove include of pointer-set.h.
2017 2014-08-07 Marek Polacek <polacek@redhat.com>
2019 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2021 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2023 * c-typeck.c: Use hash_map instead of pointer_map.
2025 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2027 * c-decl.c: Use hash_set instead of pointer_set.
2029 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2032 * c-array-notation.c (expand_array_notations): Handling
2035 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2038 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2041 2014-07-30 Tom Tromey <tromey@redhat.com>
2043 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2045 (really_start_incremental_init, push_init_level): Initialize
2047 (pop_init_level): Set global designator_depth.
2048 (process_init_element): Check for designated_init attribute.
2050 2014-07-20 Marek Polacek <polacek@redhat.com>
2053 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2054 (implicitly_declare): Pass location to implicit_decl_warning.
2056 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2059 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2060 If non-NULL, call c_parser_check_literal_zero.
2061 (c_parser_check_literal_zero): New function.
2062 (c_parser_postfix_expression_after_primary): Adjust
2063 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2065 2014-07-06 Marek Polacek <polacek@redhat.com>
2068 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2069 * c-tree.h (C_ARRAY_PARAMETER): Define.
2070 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2073 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2074 Chen Gang <gang.chen.5i5j@gmail.com>
2076 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2079 2014-07-01 Marek Polacek <polacek@redhat.com>
2081 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2082 instead of 0 to WARN_FOR_ASSIGNMENT.
2084 2014-07-01 Marek Polacek <polacek@redhat.com>
2087 * c-typeck.c (convert_for_assignment): Pass
2088 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2090 2014-06-30 Marek Polacek <polacek@redhat.com>
2092 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2093 has no_sanitize_undefined attribute.
2095 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2098 * c-array-notation.c (fix_builtin_array_notation_fn):
2099 Check for 0 arguments in builtin call. Check that bultin argument is
2101 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2104 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2106 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2107 qualifiers in __auto_type for atomic types.
2108 (c_parser_typeof_specifier): Discard all type qualifiers in
2109 __typeof__ for atomic types.
2111 2014-06-25 Marek Polacek <polacek@redhat.com>
2114 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2115 the return expression to c_finish_return.
2117 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2119 * c-typeck.c (c_finish_omp_clauses): Make sure
2120 OMP_CLAUSE_LINEAR_STEP has correct type.
2122 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2126 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2128 * c-parser.c (c_parser_omp_for_loop): For
2129 #pragma omp parallel for simd move lastprivate clause from parallel
2130 to for rather than simd.
2132 2014-06-23 Marek Polacek <polacek@redhat.com>
2134 * c-typeck.c (parser_build_binary_op): Don't call
2135 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2137 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2139 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2140 * c-decl.c (merge_decls): Likewise.
2142 2014-06-09 Marek Polacek <polacek@redhat.com>
2145 * c-typeck.c (error_init): Call inform instead of error_at.
2146 (pedwarn_init): Call inform instead of pedwarn.
2147 (warning_init): Call inform instead of warning_at.
2149 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2151 * c-decl.c (merge_decls): Use set_decl_section_name.
2152 (duplicate_decls): Remove node if it exists.
2154 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2157 * c-typeck.c (push_init_level, process_init_element,
2158 pop_init_level): Correct check for zero initialization, move
2159 missing brace warning to respect zero initialization.
2161 2014-06-05 Marek Polacek <polacek@redhat.com>
2164 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2166 2014-06-05 Marek Polacek <polacek@redhat.com>
2169 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2170 on the left hand side operand of a comparison.
2172 2014-06-05 Marek Polacek <polacek@redhat.com>
2175 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2176 Print note only if the warning was printed.
2178 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2181 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2184 2014-06-03 Marek Polacek <polacek@redhat.com>
2187 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2189 * c-tree.h (c_start_case): Update.
2190 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2191 switch condition has boolean value.
2193 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2195 * c-decl.c: Include builtins.h.
2196 * c-parser.c: Likewise.
2198 2014-05-27 Marek Polacek <polacek@redhat.com>
2201 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2202 error and warning calls to error_at and warning_at. Pass location of
2203 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2204 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2205 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2207 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2210 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2211 function parameters.
2213 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2215 * c-decl.c (merge_decls): Preserve symtab node pointers.
2216 (duplicate_decls): Free new decl.
2218 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2220 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2223 * c-parser.c (c_parser_omp_target): Return bool values.
2225 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2227 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2228 num_teams_loc variable to num_thread_limit_loc.
2230 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2232 * c-array-notation.c (expand_array_notations): Use void_node
2233 instead of void_zero_node.
2235 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2237 * c-decl.c (finish_struct): Adjust.
2238 (finish_enum): Likewise.
2240 (record_inline_static): Likewise.
2241 (push_scope): Likewise.
2242 (make_label): Likewise.
2243 (lookup_label_for_goto): Likewise.
2244 (finish_struct): Likewise.
2245 (finish_enum): Likewise.
2246 (store_parm_decls): Likewise.
2247 (c_push_function_context): Likewise.
2248 * c-lang.h: Remove usage of variable_size gty attribute.
2249 * c-parser.c (c_parse_init): Adjust.
2250 (c_parse_file): Likewise.
2252 2014-05-13 Marek Polacek <polacek@redhat.com>
2255 * c-typeck.c (convert_for_assignment): Pass location to
2256 WARN_FOR_ASSIGNMENT instead of input_location.
2258 2014-05-10 Marek Polacek <polacek@redhat.com>
2260 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2261 maybe_warn_string_init.
2262 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2263 maybe_warn_string_init.
2264 * c-tree.h (maybe_warn_string_init): Update declaration.
2265 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2266 Call pedwarn_init with loc instead of with input_location.
2267 (digest_init): Pass init_loc to maybe_warn_string_init.
2268 (pop_init_level): Call pedwarn_init with loc instead of with
2270 (set_init_index): Likewise.
2271 (process_init_element): Likewise.
2273 2014-05-09 Marek Polacek <polacek@redhat.com>
2276 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2277 (c_parser_initelt): Pass location to set_init_label. Pass array index
2278 location to set_init_index.
2279 * c-tree.h (push_init_level): Update declaration.
2280 (pop_init_level): Likewise.
2281 (set_init_index): Likewise.
2282 (set_init_label): Likewise.
2283 * c-typeck.c (error_init): Add location parameter. Call error_at
2285 (digest_init): Pass init_loc to error_init.
2286 (really_start_incremental_init):
2287 (push_init_level): Add location parameter. Pass loc to pop_init_level
2289 (pop_init_level): Likewise.
2290 (set_designator): Add location parameter. Pass loc to pop_init_level,
2291 push_init_level, and error_init.
2292 (set_init_index): Add location parameter. Pass loc to error_init and
2294 (set_init_label): Likewise.
2295 (output_init_element): Pass loc to error_init.
2296 (process_init_element): Pass loc to error_init, pop_init_level,
2297 pedwarn_init, and push_init_level.
2299 2014-05-09 Marek Polacek <polacek@redhat.com>
2302 * c-parser.c (c_parser_attributes): Parse the arguments as an
2303 expression-list if the attribute takes identifier.
2305 2014-05-08 Marek Polacek <polacek@redhat.com>
2308 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2311 2014-05-08 Marek Polacek <polacek@redhat.com>
2314 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2317 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2318 Mike Stump <mikestump@comcast.net>
2319 Richard Sandiford <rdsandiford@googlemail.com>
2321 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2322 (finish_enum): Use wide-int interfaces.
2323 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2324 * c-typeck.c (build_c_cast): Likewise.
2325 (set_nonincremental_init_from_string): Likewise.
2326 (c_tree_equal): Likewise.
2328 2014-05-02 Marek Polacek <polacek@redhat.com>
2331 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2332 Return size_one_node when the type is not complete.
2333 (pointer_diff): Remove comment.
2334 (build_unary_op): Improve error messages.
2336 2014-05-02 Marek Polacek <polacek@redhat.com>
2338 * c-typeck.c (c_finish_return): Separate warning_at calls.
2340 2014-05-02 Marek Polacek <polacek@redhat.com>
2342 * c-tree.h (error_init): Remove declaration.
2343 (pedwarn_init): Likewise.
2344 * c-typeck.c (error_init): Make static and move above.
2345 (pedwarn_init): Likewise.
2346 (warning_init): Move above.
2347 (maybe_warn_string_init): Likewise.
2349 2014-05-01 Jeff Law <law@redhat.com>
2353 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2354 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2357 2014-05-02 Marek Polacek <polacek@redhat.com>
2360 * c-typeck.c (push_init_level): Set constructor_designated to
2361 p->designated for structures.
2363 2014-05-01 Marek Polacek <polacek@redhat.com>
2366 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2367 function-definition has an attribute after the declarator.
2369 2014-05-01 Marek Polacek <polacek@redhat.com>
2372 * c-typeck.c (warning_init): Add location_t parameter. Call
2373 warning_at instead of warning.
2374 (push_init_level): Pass input_location to warning_init.
2375 (add_pending_init): Add location_t parameter. Pass loc to
2377 (set_nonincremental_init): Pass input_location to add_pending_init.
2378 (set_nonincremental_init_from_string): Likewise.
2379 (output_init_element): Pass loc to warning_init and to
2382 2014-05-01 Marek Polacek <polacek@redhat.com>
2385 * c-typeck.c (c_finish_return): Distinguish between label and variable
2386 when warning about returning local address.
2388 2014-05-01 Marek Polacek <polacek@redhat.com>
2391 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2394 2014-05-01 Marek Polacek <polacek@redhat.com>
2397 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2398 instead of 0 to WARN_FOR_QUALIFIERS.
2400 2014-05-01 Marek Polacek <polacek@redhat.com>
2403 * c-typeck.c (default_conversion): Use better location for
2406 2014-04-30 Marek Polacek <polacek@redhat.com>
2408 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2409 also when SANITIZE_FLOAT_DIVIDE is on.
2411 2014-04-30 Marek Polacek <polacek@redhat.com>
2414 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2415 and pedwarn_init. Use loc insted of input_location.
2417 2014-04-30 Marek Polacek <polacek@redhat.com>
2420 * c-typeck.c (build_binary_op): Use location when warning about
2423 2014-04-25 Marek Polacek <polacek@redhat.com>
2426 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2427 always_inline/noinline and hot/cold attributes.
2429 2014-04-25 Marek Polacek <polacek@redhat.com>
2432 * c-parser.c (c_parser_initelt): Pass input_location to
2433 process_init_element.
2434 (c_parser_initval): Pass loc to process_init_element.
2435 * c-tree.h (process_init_element): Adjust declaration.
2436 * c-typeck.c (push_init_level): Pass input_location to
2437 process_init_element.
2438 (pop_init_level): Likewise.
2439 (set_designator): Likewise.
2440 (output_init_element): Add location_t parameter. Pass loc to
2442 (output_pending_init_elements): Pass input_location to
2443 output_init_element.
2444 (process_init_element): Add location_t parameter. Pass loc to
2445 output_init_element.
2447 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2449 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2450 atomic-clause, allow comma in between atomic-clause and
2453 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2456 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2457 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2459 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2462 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2463 create_tmp_var instead build_decl for creating temps.
2464 (build_array_notation_expr): Likewise.
2465 (fix_conditional_array_notations_1): Likewise.
2466 (fix_array_notation_expr): Likewise.
2467 (fix_array_notation_call_expr): Likewise.
2469 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2472 * c-tree.h (c_build_function_call_vec): New prototype.
2473 * c-typeck.c (build_function_call_vec): Don't call
2474 resolve_overloaded_builtin here.
2475 (c_build_function_call_vec): New wrapper function around
2476 build_function_call_vec. Call resolve_overloaded_builtin here.
2477 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2478 Call c_build_function_call_vec instead of build_function_call_vec.
2479 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2480 * c-decl.c (finish_decl): Likewise.
2482 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2485 * c-typeck.c: Use correct format string in cast-qual warning
2487 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2489 * c-decl.c (c_decl_attributes): Use
2490 lang_hooks.types.omp_mappable_type.
2491 * c-typeck.c (c_finish_omp_clauses): Likewise.
2493 2014-03-06 Marek Polacek <polacek@redhat.com>
2496 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2497 of checking tree code.
2499 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2501 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2502 (c_parser_parameter_declaration): Likewise.
2504 2014-02-19 Marek Polacek <polacek@redhat.com>
2507 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2508 Call mark_exp_read on exp.value.
2509 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2510 TREE_ADDRESSABLE on old instead of val.
2511 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2513 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2515 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2516 C_EXPR_APPEND by vec_safe_push.
2517 * c-tree.h (C_EXPR_APPEND): Remove.
2519 2014-01-31 Marek Polacek <polacek@redhat.com>
2522 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2523 build_function_call_vec.
2524 (build_function_call): Likewise.
2525 (build_atomic_assign): Likewise.
2526 (build_function_call_vec): Add arg_loc parameter. Use it.
2527 (convert_arguments): Likewise.
2528 (convert_for_assignment): Rename rhs_loc to expr_loc.
2529 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2530 (c_parser_objc_keywordexpr): Likewise.
2531 (c_parser_postfix_expression_after_primary): Call
2532 build_function_call_vec with expr_loc rather than op_loc.
2533 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2534 build_function_call_vec.
2535 (c_parser_expr_list): Add locations parameter. Fill it with locations
2536 of function arguments.
2537 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2539 2014-01-30 Marek Polacek <polacek@redhat.com>
2542 * c-typeck.c (build_function_call_vec): Use loc parameter.
2543 (convert_arguments): Add location parameter. Use it.
2544 (ep_convert_and_check): Likewise.
2545 (build_atomic_assign): Adjust convert_for_assignment call.
2546 (build_modify_expr): Likewise.
2547 (digest_init): Likewise.
2548 (c_finish_return): Likewise.
2549 (build_conditional_expr): Adjust ep_convert_and_check calls.
2550 (convert_for_assignment): Add rhs_loc parameter. Use it.
2551 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2554 2014-01-30 Richard Biener <rguenther@suse.de>
2557 * c-typeck.c (build_function_call_vec): Do not replace calls
2558 to a function via an incompatible type with a runtime abort.
2560 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2562 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2563 flag_enable_cilkplus with flag_cilkplus.
2564 (c_parser_direct_declarator_inner): Likewise.
2565 (c_parser_attribute_any_word): Likewise.
2566 (c_parser_attributes): Likewise.
2567 (c_parser_compound_statement): Likewise.
2568 (c_parser_statement_after_labels): Likewise.
2569 (c_parser_if_statement): Likewise.
2570 (c_parser_switch_statement): Likewise.
2571 (c_parser_do_statement): Likewise.
2572 (c_parser_for_statement): Likewise.
2573 (c_parser_unary_expression): Likewise.
2574 (c_parser_postfix_expression): Likewise.
2575 (c_parser_postfix_expression_after_primary): Likewise.
2576 (c_parser_postfix_expression_after_primary): Likewise.
2577 (c_parser_omp_clause_name): Likewise.
2578 (c_finish_omp_declare_simd): Likewise.
2579 (c_parser_cilk_verify_simd): Likewise.
2580 * c-typeck.c (build_array_ref): Likewise.
2581 (build_function_call_vec): Likewise.
2582 (convert_arguments): Likewise.
2583 (build_compound_expr): Likewise.
2584 (c_finish_return): Likewise.
2585 (c_finish_if_stmt): Likewise.
2586 (c_finish_loop): Likewise.
2587 (build_binary_op): Likewise.
2589 2014-01-23 Marek Polacek <polacek@redhat.com>
2592 * c-typeck.c (parser_build_binary_op): Use location instead of
2594 (build_binary_op): Pass location to shorten_compare.
2596 2014-01-23 Marek Polacek <polacek@redhat.com>
2599 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2602 2014-01-23 Marek Polacek <polacek@redhat.com>
2605 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2606 of a comma expression.
2607 (emit_side_effect_warnings): Likewise.
2609 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2612 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2613 function to use walk_tree and moved a lot of its functionality to
2614 expand_array_notations.
2615 (expand_array_notations): New function.
2617 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2619 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2620 attribute an attribute without value.
2622 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2625 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2626 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2628 2014-01-22 Marek Polacek <polacek@redhat.com>
2631 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2632 of remove_c_maybe_const_expr on op1 and op2.
2634 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2637 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2638 effects, preevaluate rhs using SAVE_EXPR first.
2640 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2643 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2644 statements with if-elseif statements.
2646 2014-01-06 Marek Polacek <polacek@redhat.com>
2649 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2650 defined bit-field types only in ISO C.
2652 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2654 Update copyright years
2656 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2658 * c-array-notation.c: Use the standard form for the copyright notice.
2660 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2662 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2663 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2664 field in parser is not empty. If not-empty, call the function
2665 c_parser_finish_omp_declare_simd.
2666 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2667 between SIMD-enabled functions and #pragma simd. Added new parameter.
2668 (c_parser_cilk_all_clauses): Modified the usage of the function
2669 c_parser_cilk_clause_vectorlength as mentioned above.
2670 (c_parser_cilk_simd_fn_vector_attrs): New function.
2671 (c_finish_cilk_simd_fn_tokens): Likewise.
2672 (is_cilkplus_vector_p): Likewise.
2673 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2674 "nomask," and "mask" strings in clause name.
2675 (c_parser_omp_all_clauses): Added 3 new case statements:
2676 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2677 PRAGMA_CILK_CLAUSE_NOMASK.
2678 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2679 check for vector attribute and if so call the function
2680 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2681 called the function c_finish_cilk_simd_fn_tokens.
2682 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2683 parser field is non-empty. If so, parse them as you would parse
2684 the omp declare simd pragma.
2685 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2686 Added a check when step is a parameter and flag it as error.
2687 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2688 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2691 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2693 * c-parser.c (c_parser_omp_parallel): Fix description.
2695 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2697 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2698 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2699 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2700 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2702 2013-12-04 Joseph Myers <joseph@codesourcery.com>
2705 * c-parser.c (c_parser_alignas_specifier): Use
2706 c_sizeof_or_alignof_type instead of c_alignof.
2707 (c_parser_alignof_expression): Likewise, with min_alignof
2708 parameter depending on alignof spelling used.
2710 2013-12-04 Marek Polacek <polacek@redhat.com>
2713 * c-decl.c (start_function): Don't warn for missing prototype for
2716 2013-12-03 Marek Polacek <polacek@redhat.com>
2719 * c-decl.c (build_compound_literal): Allow compound literals with
2720 empty initial value.
2722 2013-12-02 Joseph Myers <joseph@codesourcery.com>
2725 * c-typeck.c (build_modify_expr): Diagnose assignment to
2726 expression with array type.
2728 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2731 * c-typeck.c (process_init_element): Do not treat a string as
2732 initializing a whole array when used with a designator for an
2735 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2738 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2739 an inline function following a static declaration.
2741 2013-11-28 Jakub Jelinek <jakub@redhat.com>
2744 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2745 to p_name before calling c_parser_omp_teams instead of after.
2746 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2747 argument. Remove unused p_name variable.
2749 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
2750 Jakub Jelinek <jakub@redhat.com>
2752 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2753 external_scope is NULL.
2755 2013-11-27 Tom de Vries <tom@codesourcery.com>
2756 Marc Glisse <marc.glisse@inria.fr>
2759 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2761 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
2763 * c-typeck.c: Add required include files from gimple.h.
2765 2013-11-22 David Malcolm <dmalcolm@redhat.com>
2767 * c-decl.c (define_label, shadow_tag_warned)
2768 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2769 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2770 (declspecs_add_type): Remove use of in_system_header macro.
2771 * c-parser.c (c_parser_unary_expression): Likewise.
2772 * c-typeck.c (store_init_value, process_init_element)
2773 (c_start_case): Likewise.
2775 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2778 * c-parser.c (c_parser_set_source_position_from_token): Remove
2779 reference to in_system_header from comment.
2781 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2783 * c-decl.c (grokdeclarator): Update comment to refer to
2784 tree_to_[su]hwi rather than tree_low_cst.
2786 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2788 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2789 tree_to_uhwi throughout.
2791 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2793 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2796 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2798 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2801 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
2803 * c-parser.c (c_parser_cilk_simd): New.
2804 (c_parser_cilk_verify_simd): New.
2805 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2806 (c_parser_omp_for_loop): Add case for NE_EXPR.
2807 Set c_break_label for CILK_SIMD.
2808 (c_parser_cilk_clause_vectorlength): New.
2809 (c_parser_cilk_clause_linear): New.
2810 (c_parser_cilk_clause_name): New.
2811 (c_parser_cilk_all_clauses): New.
2812 * c-typeck.c (build_unary_op): Pass location argument to
2814 (build_modify_expr): Same.
2815 (build_asm_expr): Same.
2816 (c_finish_bc_stmt): Error on break/continue in loops.
2818 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
2820 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2822 2013-11-14 Diego Novillo <dnovillo@google.com>
2824 * c-decl.c: Include print-tree.h.
2825 Include stor-layout.h.
2828 Include stringpool.h.
2829 * c-lang.c: Include fold-const.h.
2830 * c-parser.c: Include stringpool.h.
2832 Include stor-layout.h.
2834 Include trans-mem.h.
2835 * c-typeck.c: Include stor-layout.h.
2836 Include trans-mem.h.
2840 2013-11-13 Joseph Myers <joseph@codesourcery.com>
2842 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2843 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2845 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2846 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2848 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2849 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2850 (c_parser_declarator, c_parser_direct_declarator_inner)
2851 (c_parser_parameter_declaration, c_parser_type_name): All callers
2853 (c_parser_declaration_or_fndef): Handle declarations with type
2854 determined from the initializer.
2856 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
2858 * c-typeck.c: Include gimplify.h.
2860 2013-11-12 Joseph Myers <joseph@codesourcery.com>
2862 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2863 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2865 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2866 or _Thread_local as appropriate in diagnostics.
2867 (build_null_declspecs): Initialize ret->thread_gnu_p.
2868 (declspecs_add_scspec): Handle either __thread or _Thread_local
2869 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2870 pedantic. Do not disallow _Thread_local extern and _Thread_local
2873 2013-11-07 Joseph Myers <joseph@codesourcery.com>
2874 Andrew MacLeod <amacleod@redhat.com>
2876 * c-aux-info.c (gen_type): Handle atomic qualifier.
2877 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2878 qualifiers when compating types.
2879 (shadow_tag_warned): Handle atomic_p in declspecs.
2880 (quals_from_declspecs): Likewise.
2881 (start_decl): Use c_type_promotes_to when promoting argument
2883 (grokdeclarator): Handle _Atomic.
2884 (get_parm_info): Diagnose any qualifier on "void" as only
2886 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2887 comparing types. Use c_type_promotes_to when promoting argument
2889 (finish_function): Use c_type_promotes_to when promoting argument
2891 (build_null_declspecs): Handle atomic_p in declspecs.
2892 (declspecs_add_qual): Handle RID_ATOMIC.
2893 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2894 (c_token_starts_declspecs): Handle RID_ATOMIC.
2895 (c_parser_declspecs): Handle atomic type specifiers and
2897 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2898 from types of expressions with atomic type.
2899 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2900 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2901 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2902 (c_parser_statement_after_labels, c_parser_switch_statement)
2903 (c_parser_for_statement, c_parser_expr_no_commas)
2904 (c_parser_conditional_expression, c_parser_binary_expression)
2905 (c_parser_cast_expression, c_parser_unary_expression)
2906 (c_parser_postfix_expression)
2907 (c_parser_postfix_expression_after_primary, c_parser_expression):
2908 Use convert_lvalue_to_rvalue.
2909 (c_parser_expression_conv, c_parser_expr_list): Document
2910 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2911 (c_parser_objc_synchronized_statement): Use
2912 convert_lvalue_to_rvalue.
2913 (c_parser_objc_selector): Handle RID_ATOMIC.
2914 (c_parser_objc_receiver, c_parser_array_notation): Use
2915 convert_lvalue_to_rvalue.
2916 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2917 _Atomic (type-name).
2918 (struct c_declspecs): Add atomic_p field.
2919 (convert_lvalue_to_rvalue): Declare.
2920 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2921 corresponding atomic types.
2922 (qualify_type): Don't add _Atomic qualifiers from second argument.
2923 (comp_target_types): Do not allow _Atomic mismatches.
2924 (type_lists_compatible_p): Do not remove atomic qualifiers when
2926 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2927 (build_atomic_assign): New functions.
2928 (build_unary_op): Use build_atomic_assign for atomic increment and
2930 (build_conditional_expr): Do not treat _Atomic void as a qualified
2932 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2933 (find_anonymous_field_with_type, convert_to_anonymous_field)
2934 (convert_for_assignment): Do not remove atomic qualifiers when
2936 (digest_init): Do not accept initialization of arrays of atomic
2937 elements by string constants.
2938 (build_asm_expr): Use convert_lvalue_to_rvalue.
2939 (build_binary_op): Do not treat _Atomic void as a qualified
2942 2013-11-06 DJ Delorie <dj@redhat.com>
2944 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2945 both explicit and builtin, print the location of the explicit one.
2947 2013-11-05 Tobias Burnus <burnus@net-b.de>
2949 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2950 c_parser_omp_distribute, c_parser_omp_teams,
2951 c_parser_omp_target, c_parser_omp_declare): Handle
2954 2013-11-03 Marek Polacek <polacek@redhat.com>
2956 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2958 2013-11-01 Jakub Jelinek <jakub@redhat.com>
2960 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2961 check_dup_generic at the end, unless remove is true.
2962 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2964 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2966 2013-10-31 Jakub Jelinek <jakub@redhat.com>
2968 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2969 with decl that is not pointer nor array.
2971 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2973 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2974 a spawning function is found.
2975 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2976 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2977 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2978 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2980 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2981 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2983 (c_finish_return): Added a check to reject _Cilk_spawn in return
2985 (build_cilk_spawn): New function.
2986 (build_cilk_sync): Likewise.
2987 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2989 2013-10-27 Tobias Burnus <burnus@net-b.de>
2992 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2993 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2994 (c_parser_statement_after_labels): Update calls.
2996 2013-10-24 Tobias Burnus <burnus@net-b.de>
2999 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3000 Handle PRAGMA_IVDEP.
3001 (c_parser_statement_after_labels): Update call.
3003 2013-10-24 Marek Polacek <polacek@redhat.com>
3005 * c-parser.c (c_parser_struct_declaration): Add a comment.
3006 (c_parser_declarator): Don't allow _Alignas here.
3008 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3010 * c-parser.c: Include omp-low.h.
3011 * c-typeck.c: Likewise.
3013 2013-10-17 Marek Polacek <polacek@redhat.com>
3016 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3017 Document syntax of the array-declarator.
3018 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3020 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3021 (c_parser_struct_declaration): Likewise.
3022 (c_parser_declarator): Likewise.
3023 (c_parser_direct_declarator_inner): Likewise.
3024 (c_parser_parameter_declaration): Likewise.
3025 (c_parser_type_name): Likewise.
3027 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3029 * c-lang.h (current_omp_declare_target_attribute): New extern
3031 * c-parser.c: Include c-lang.h.
3032 (struct c_parser): Change tokens to c_token *.
3033 Add tokens_buf field. Change tokens_avail type to unsigned int.
3034 (c_parser_consume_token): If parser->tokens isn't
3035 &parser->tokens_buf[0], increment parser->tokens.
3036 (c_parser_consume_pragma): Likewise.
3037 (enum pragma_context): Add pragma_struct and pragma_param.
3038 (c_parser_external_declaration): Adjust
3039 c_parser_declaration_or_fndef caller.
3040 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3041 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3042 Adjust recursive call.
3043 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3045 (c_parser_parameter_declaration): Use pragma_param instead of
3047 (c_parser_compound_statement_nostart, c_parser_label,
3048 c_parser_for_statement): Adjust
3049 c_parser_declaration_or_fndef callers.
3050 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3051 it through to c_parser_conditional_expression.
3052 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3053 pass it through to c_parser_binary_expression. Adjust recursive
3055 (c_parser_binary_expression): Remove prec argument, add
3056 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3057 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3058 binop matches it, use build2 instead of parser_build_binary_op.
3059 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3060 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3061 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3062 Handle pragma_struct and pragma_param the same as pragma_external.
3063 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3064 (c_parser_omp_variable_list): Parse array sections for
3065 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3066 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3067 (c_parser_omp_clause_reduction): Handle user defined reductions.
3068 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3069 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3070 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3071 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3072 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3073 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3074 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3075 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3076 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3077 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3078 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3079 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3080 (c_parser_omp_for_loop): Add CODE argument, pass it through
3081 to c_finish_omp_for. Change last argument to cclauses,
3082 and adjust uses to grab parallel clauses from the array of all
3083 the split clauses. Adjust c_parser_binary_expression,
3084 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3085 (omp_split_clauses): New function.
3086 (c_parser_omp_simd): New function.
3087 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3088 Allow the function to be called also when parsing combined constructs,
3089 and call c_parser_omp_simd when parsing for simd.
3090 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3091 #pragma omp section, require exactly one structured-block instead of
3092 sequence of statements.
3093 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3094 Allow the function to be called also when parsing combined constructs.
3095 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3096 Allow the function to be called also when parsing combined
3098 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3099 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3100 c_parser_omp_teams, c_parser_omp_target_data,
3101 c_parser_omp_target_update, c_parser_omp_target,
3102 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3103 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3104 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3105 (c_parser_omp_construct): Add p_name and mask vars. Handle
3106 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3107 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3108 and c_parser_omp_sections callers.
3109 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3110 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3111 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3112 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3113 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3115 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3116 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3117 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3118 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3119 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3120 * c-typeck.c: Include tree-inline.h.
3121 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3122 handle_omp_array_sections_1, handle_omp_array_sections,
3123 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3124 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3125 user defined reductions.
3126 (c_tree_equal): New function.
3127 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3128 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3129 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3130 c_check_omp_declare_reduction_r): New prototypes.
3131 * c-decl.c (current_omp_declare_target_attribute): New variable.
3132 (c_decl_attributes): New function.
3133 (start_decl, start_function): Use it instead of decl_attributes.
3134 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3135 c_omp_reduction_decl, c_omp_reduction_lookup,
3136 c_check_omp_declare_reduction_r): New functions.
3138 2013-09-25 Tom Tromey <tromey@redhat.com>
3140 * Make-lang.in (c/gccspec.o): Remove.
3141 (CFLAGS-c/gccspec.o): New variable.
3142 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3143 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3144 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3146 2013-09-25 Tom Tromey <tromey@redhat.com>
3148 * Make-lang.in (c/gccspec.o): Don't use subshell.
3150 2013-09-18 Marek Polacek <polacek@redhat.com>
3153 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3154 Remove unnecessary check.
3156 2013-09-18 Marek Polacek <polacek@redhat.com>
3159 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3160 no_sanitize_undefined attribute.
3162 2013-09-13 Kai Tietz <ktietz@redhat.com>
3165 * c-decl.c (c_builtin_function_ext_scope): Remove
3166 wrong assumption that it is never called on prexisting
3169 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3171 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3173 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3175 * c-objc-common.c (c_tree_printer): Tidy.
3177 2013-08-30 Marek Polacek <polacek@redhat.com>
3179 * c-typeck.c (build_binary_op): Add division by zero and shift
3182 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3183 Joseph Myers <joseph@codesourcery.com>
3186 * c-typeck.c (c_common_type): Prefer double_type_node over
3187 other REAL_TYPE types with the same precision.
3188 (convert_arguments): Likewise.
3190 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3192 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3193 (c_initialize_diagnostics): Call a destructor for the early printer.
3195 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3197 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3198 printer initialization.
3200 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3203 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3204 check for truth values.
3205 (expand_array_notation_exprs): Added truth values case. Removed an
3206 unwanted else. Added for-loop to walk through subtrees in default
3209 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3211 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3213 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3215 * c-parser.c (struct c_generic_association): Fix typo.
3217 2013-07-23 Tom Tromey <tromey@redhat.com>
3218 Joseph Myers <joseph@codesourcery.com>
3220 * c-parser.c (struct c_generic_association): New.
3221 (c_generic_association_d): New typedef.
3222 (c_parser_generic_selection): New function.
3223 (c_parser_postfix_expression): Handle RID_GENERIC.
3225 2013-07-13 Jason Merrill <jason@redhat.com>
3228 * c-decl.c (finish_struct): Check for too-large class.
3230 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3233 * c-typeck.c (set_init_index): When folding, check for index overflow.
3235 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3237 * c-parser.c (c_parser_array_notation): Removed rejection of array
3238 notations in an array of function pointers.
3240 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3242 * c-array-notation.c (make_triplet_val_inv): New function.
3243 (create_cmp_incr): Likewise.
3244 (create_array_refs): Likewise.
3245 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3246 Also modularized common parts between functions and called the function.
3247 (build_array_notation_expr): Likewise.
3248 (fix_conditional_array_notations_1): Likewise.
3249 (fix_array_notation_expr): Likewise.
3250 (fix_array_notation_call_expr): Likewise.
3252 2013-06-18 Marek Polacek <polacek@redhat.com>
3255 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3257 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3259 * c-array-notation.c (build_array_notation_expr): Reject array notation
3260 mismatch between LHS and RHS even inside a call_expr. Also, removed
3261 a couple while statements that were dead code.
3263 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3265 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3266 excessive precision expressions in function parameters. Also removed
3267 couple unwanted while statements.
3269 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3271 * c-array-notation.c (expand_array_notation_exprs): Added
3272 ARRAY_NOTATION_REF case.
3274 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3276 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3277 function to c-family/array-notation-common.c.
3278 (is_cilkplus_reduce_builtin): Likewise.
3279 (find_rank): Likewise.
3280 (extract_array_notation_exprs): Likewise.
3281 (replace_array_notations): Likewise.
3282 (find_inv_trees): Likewise.
3283 (replace_inv_trees): Likewise.
3284 (contains_array_notation_expr): Likewise.
3285 (find_correct_array_notation_type): Likewise.
3286 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3287 (struct inv_list): Moved this to c-family/array-notation-common.c.
3288 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3290 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3292 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3293 reduction functions outside the for-loop. Added a check if the fundecl
3294 is non-NULL. Finally, removed an unwanted if-statement, and made the
3297 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3299 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3300 condition of the if-statement matches the rank of else-block and then-
3301 block when array notations are used.
3302 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3303 expression after the entire function body is parsed.
3304 (c_parser_expr_no_commas): Delayed creating array notation expressions
3305 to the end of function parsing.
3306 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3307 whole if-statement instead of just the condition.
3308 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3310 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3313 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3314 array to NULL_TREE if they are unused. Also added a check for the
3315 field to be NULL before its fields are used in future.
3317 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3320 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3321 (build_array_notation_expr): Likewise.
3323 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3325 * c-typeck.c (build_array_ref): Added a check to see if array's
3326 index is greater than one. If true, then emit an error.
3327 (build_function_call_vec): Exclude error reporting and checking
3328 for builtin array-notation functions.
3329 (convert_arguments): Likewise.
3330 (c_finish_return): Added a check for array notations as a return
3331 expression. If true, then emit an error.
3332 (c_finish_loop): Added a check for array notations in a loop
3333 condition. If true then emit an error.
3334 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3335 (build_binary_op): Added a check for array notation expr inside
3336 op1 and op0. If present, we call another function to find correct
3338 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3339 * c-parser.c (c_parser_compound_statement): Check if array
3340 notation code is used in tree, if so, then transform them into
3342 (c_parser_expr_no_commas): Check if array notation is used in LHS
3343 or RHS, if so, then build array notation expression instead of
3345 (c_parser_postfix_expression_after_primary): Added a check for
3346 colon(s) after square braces, if so then handle it like an array
3347 notation. Also, break up array notations in unary op if found.
3348 (c_parser_direct_declarator_inner): Added a check for array
3350 (c_parser_compound_statement): Added a check for array notation in
3351 a stmt. If one is present, then expand array notation expr.
3352 (c_parser_if_statement): Likewise.
3353 (c_parser_switch_statement): Added a check for array notations in
3354 a switch statement's condition. If true, then output an error.
3355 (c_parser_while_statement): Similarly, but for a while.
3356 (c_parser_do_statement): Similarly, but for a do-while.
3357 (c_parser_for_statement): Similarly, but for a for-loop.
3358 (c_parser_unary_expression): Check if array notation is used in a
3359 pre-increment or pre-decrement expression. If true, then expand
3361 (c_parser_array_notation): New function.
3362 * c-array-notation.c: New file.
3363 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3365 2013-05-23 Mike Stump <mikestump@comcast.net>
3367 * c-typeck.c (convert_for_assignment): Handle references to memory
3370 2013-05-16 Jason Merrill <jason@redhat.com>
3372 * Make-lang.in (cc1$(exeext)): Use link mutex.
3374 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3376 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3377 to simply use OPT_Wpointer_arith.
3378 (build_unary_op): Likewise.
3380 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3383 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3384 argument. If set, or it temporarily for parsing of the first
3385 argument into force_folding_builtin_constant_p.
3386 (c_parser_postfix_expression): Adjust callers.
3388 2013-03-21 Richard Biener <rguenther@suse.de>
3390 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3391 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3393 2013-02-12 Marek Polacek <polacek@redhat.com>
3396 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3399 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3402 * c-typeck.c (set_nonincremental_init_from_string): If
3403 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3405 (process_init_element): Likewise.
3407 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3410 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3411 argument, don't call default_function_array_conversion
3412 nor c_fully_fold here.
3413 (c_parser_asm_statement): Adjust callers.
3414 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3415 and outputs here, and call default_function_array_conversion
3416 on inputs that don't need to be addressable.
3418 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3421 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3422 warning require that both c_common_unsigned_type as well as
3423 c_common_signed_type is the same for both mvl and mvr types.
3425 2012-11-16 Diego Novillo <dnovillo@google.com>
3427 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3429 * c-common.c: Use new vec API in vec.h.
3430 * c-common.h: Likewise.
3431 * c-gimplify.c: Likewise.
3432 * c-pragma.c: Likewise.
3433 * c-pretty-print.c: Likewise.
3434 * c-pretty-print.h: Likewise.
3435 * c-semantics.c: Likewise.
3436 * c-decl.c: Likewise.
3437 * c-parser.c: Likewise.
3438 * c-tree.h: Likewise.
3439 * c-typeck.c: Likewise.
3441 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3444 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3446 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3449 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3450 shadows a function, unless the variable is a function or a
3451 pointer-to-function.
3453 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3456 * c-parser.c (struct c_tree_loc_pair): Removed.
3457 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3458 add location_t * and tree * arguments, fill in array of 3
3459 sizeof_arg trees and corresponding locs.
3460 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3461 c_parser_expr_list callers.
3462 (c_parser_postfix_expression_after_primary): Likewise. Pass
3463 array of 3 sizeof_arg trees and locs (corresponding to first
3464 3 arguments) to sizeof_pointer_memaccess_warning.
3466 2012-10-09 Lawrence Crowl <crowl@google.com>
3468 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3469 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3472 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3475 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3478 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3481 * c-typeck.c: Include c-common.h.
3482 (enum stv_conv): Moved to c-common.h.
3483 (scalar_to_vector): Moved to c-common.c.
3484 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3485 * Make-lang.in: c-typeck.c depends on c-common.h.
3487 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3489 * c-decl.c (c_write_global_declarations): Fix handling of
3492 2012-09-30 Sharad Singhai <singhai@google.com>
3494 * c-decl.c (c_write_global_declarations): Use a different method
3495 to determine if the dump has ben initialized.
3497 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3500 * c-typeck.c (c_cast_expr): When casting to a type requiring
3501 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3504 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3507 * c-typeck.c (build_unary_op): Pass original argument of
3508 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3509 any C_MAYBE_CONST_EXPR, if it has integer operands.
3510 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3511 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3512 to c_objc_common_truthvalue_conversion, then remove any
3513 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3514 c_objc_common_truthvalue_conversion not
3515 c_common_truthvalue_conversion.
3516 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3517 call note_integer_operands for arguments with integer operands
3518 that are not integer constants.
3520 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3523 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3524 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3526 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3529 * c-convert.c (convert): Don't call fold_convert_loc if
3530 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3531 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3532 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3534 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3537 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3538 for nested and empty_ok arguments in the call to
3539 c_parser_declaration_or_fndef.
3541 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3543 * c-tree.h (c_last_sizeof_arg): Declare.
3544 * c-parser.c (struct c_tree_loc_pair): New type.
3545 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3547 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3548 (c_parser_postfix_expression_after_primary): Likewise. Call
3549 sizeof_pointer_memaccess_warning if needed.
3550 (sizeof_ptr_memacc_comptypes): New function.
3551 * c-typeck.c (c_last_sizeof_arg): New global variable.
3552 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3554 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3556 * c-lang.h (lang_decl): Add variable_size GTY option.
3558 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3560 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3561 * Make-lang.in: Fix dependencies.
3563 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3565 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3566 and add language Makefile hooks.
3567 * config-lang.in: New file.
3568 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3569 add the required "normal" config-lang.in rules.
3570 * c-lang.h: Moved from gcc/ to here.
3571 * c-tree.h: Likewise.
3572 * c-objc-common.c: Likewise.
3573 * c-objc-common.h: Likewise.
3574 * c-typeck.c: Likewise.
3575 * c-convert.c: Likewise.
3576 * c-lang.c: Likewise.
3577 * c-aux-info.c: Likewise.
3578 * c-errors.c: Likewise.
3579 * gccspec.c: Likewise.
3580 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3581 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3583 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3585 Copying and distribution of this file, with or without modification,
3586 are permitted in any medium without royalty provided the copyright
3587 notice and this notice are preserved.