1 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2 Chen Gang <gang.chen.5i5j@gmail.com>
4 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7 2014-07-01 Marek Polacek <polacek@redhat.com>
9 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
10 instead of 0 to WARN_FOR_ASSIGNMENT.
12 2014-07-01 Marek Polacek <polacek@redhat.com>
15 * c-typeck.c (convert_for_assignment): Pass
16 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
18 2014-06-30 Marek Polacek <polacek@redhat.com>
20 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
21 has no_sanitize_undefined attribute.
23 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
26 * c-array-notation.c (fix_builtin_array_notation_fn):
27 Check for 0 arguments in builtin call. Check that bultin argument is
29 * c-parser.c (c_parser_array_notation): Check for incorrect initial
32 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
34 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
35 qualifiers in __auto_type for atomic types.
36 (c_parser_typeof_specifier): Discard all type qualifiers in
37 __typeof__ for atomic types.
39 2014-06-25 Marek Polacek <polacek@redhat.com>
42 * c-parser.c (c_parser_statement_after_labels): Pass the location of
43 the return expression to c_finish_return.
45 2014-06-25 Jakub Jelinek <jakub@redhat.com>
47 * c-typeck.c (c_finish_omp_clauses): Make sure
48 OMP_CLAUSE_LINEAR_STEP has correct type.
50 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
54 2014-06-24 Jakub Jelinek <jakub@redhat.com>
56 * c-parser.c (c_parser_omp_for_loop): For
57 #pragma omp parallel for simd move lastprivate clause from parallel
58 to for rather than simd.
60 2014-06-23 Marek Polacek <polacek@redhat.com>
62 * c-typeck.c (parser_build_binary_op): Don't call
63 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
65 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
67 * c-parser.c (c_parser_omp_threadprivate): Likewise.
68 * c-decl.c (merge_decls): Likewise.
70 2014-06-09 Marek Polacek <polacek@redhat.com>
73 * c-typeck.c (error_init): Call inform instead of error_at.
74 (pedwarn_init): Call inform instead of pedwarn.
75 (warning_init): Call inform instead of warning_at.
77 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
79 * c-decl.c (merge_decls): Use set_decl_section_name.
80 (duplicate_decls): Remove node if it exists.
82 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
85 * c-typeck.c (push_init_level, process_init_element,
86 pop_init_level): Correct check for zero initialization, move
87 missing brace warning to respect zero initialization.
89 2014-06-05 Marek Polacek <polacek@redhat.com>
92 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
94 2014-06-05 Marek Polacek <polacek@redhat.com>
97 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
98 on the left hand side operand of a comparison.
100 2014-06-05 Marek Polacek <polacek@redhat.com>
103 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
104 Print note only if the warning was printed.
106 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
109 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
112 2014-06-03 Marek Polacek <polacek@redhat.com>
115 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
117 * c-tree.h (c_start_case): Update.
118 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
119 switch condition has boolean value.
121 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
123 * c-decl.c: Include builtins.h.
124 * c-parser.c: Likewise.
126 2014-05-27 Marek Polacek <polacek@redhat.com>
129 * c-typeck.c (convert_arguments): Get location of a parameter. Change
130 error and warning calls to error_at and warning_at. Pass location of
131 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
132 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
133 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
135 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
138 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
141 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
143 * c-decl.c (merge_decls): Preserve symtab node pointers.
144 (duplicate_decls): Free new decl.
146 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
148 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
151 * c-parser.c (c_parser_omp_target): Return bool values.
153 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
155 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
156 num_teams_loc variable to num_thread_limit_loc.
158 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
160 * c-array-notation.c (expand_array_notations): Use void_node
161 instead of void_zero_node.
163 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
165 * c-decl.c (finish_struct): Adjust.
166 (finish_enum): Likewise.
168 (record_inline_static): Likewise.
169 (push_scope): Likewise.
170 (make_label): Likewise.
171 (lookup_label_for_goto): Likewise.
172 (finish_struct): Likewise.
173 (finish_enum): Likewise.
174 (store_parm_decls): Likewise.
175 (c_push_function_context): Likewise.
176 * c-lang.h: Remove usage of variable_size gty attribute.
177 * c-parser.c (c_parse_init): Adjust.
178 (c_parse_file): Likewise.
180 2014-05-13 Marek Polacek <polacek@redhat.com>
183 * c-typeck.c (convert_for_assignment): Pass location to
184 WARN_FOR_ASSIGNMENT instead of input_location.
186 2014-05-10 Marek Polacek <polacek@redhat.com>
188 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
189 maybe_warn_string_init.
190 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
191 maybe_warn_string_init.
192 * c-tree.h (maybe_warn_string_init): Update declaration.
193 * c-typeck.c (maybe_warn_string_init): Add location parameter.
194 Call pedwarn_init with loc instead of with input_location.
195 (digest_init): Pass init_loc to maybe_warn_string_init.
196 (pop_init_level): Call pedwarn_init with loc instead of with
198 (set_init_index): Likewise.
199 (process_init_element): Likewise.
201 2014-05-09 Marek Polacek <polacek@redhat.com>
204 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
205 (c_parser_initelt): Pass location to set_init_label. Pass array index
206 location to set_init_index.
207 * c-tree.h (push_init_level): Update declaration.
208 (pop_init_level): Likewise.
209 (set_init_index): Likewise.
210 (set_init_label): Likewise.
211 * c-typeck.c (error_init): Add location parameter. Call error_at
213 (digest_init): Pass init_loc to error_init.
214 (really_start_incremental_init):
215 (push_init_level): Add location parameter. Pass loc to pop_init_level
217 (pop_init_level): Likewise.
218 (set_designator): Add location parameter. Pass loc to pop_init_level,
219 push_init_level, and error_init.
220 (set_init_index): Add location parameter. Pass loc to error_init and
222 (set_init_label): Likewise.
223 (output_init_element): Pass loc to error_init.
224 (process_init_element): Pass loc to error_init, pop_init_level,
225 pedwarn_init, and push_init_level.
227 2014-05-09 Marek Polacek <polacek@redhat.com>
230 * c-parser.c (c_parser_attributes): Parse the arguments as an
231 expression-list if the attribute takes identifier.
233 2014-05-08 Marek Polacek <polacek@redhat.com>
236 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
239 2014-05-08 Marek Polacek <polacek@redhat.com>
242 * c-decl.c (start_function): Warn for _Atomic-qualified return type
245 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
246 Mike Stump <mikestump@comcast.net>
247 Richard Sandiford <rdsandiford@googlemail.com>
249 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
250 (finish_enum): Use wide-int interfaces.
251 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
252 * c-typeck.c (build_c_cast): Likewise.
253 (set_nonincremental_init_from_string): Likewise.
254 (c_tree_equal): Likewise.
256 2014-05-02 Marek Polacek <polacek@redhat.com>
259 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
260 Return size_one_node when the type is not complete.
261 (pointer_diff): Remove comment.
262 (build_unary_op): Improve error messages.
264 2014-05-02 Marek Polacek <polacek@redhat.com>
266 * c-typeck.c (c_finish_return): Separate warning_at calls.
268 2014-05-02 Marek Polacek <polacek@redhat.com>
270 * c-tree.h (error_init): Remove declaration.
271 (pedwarn_init): Likewise.
272 * c-typeck.c (error_init): Make static and move above.
273 (pedwarn_init): Likewise.
274 (warning_init): Move above.
275 (maybe_warn_string_init): Likewise.
277 2014-05-01 Jeff Law <law@redhat.com>
281 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
282 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
285 2014-05-02 Marek Polacek <polacek@redhat.com>
288 * c-typeck.c (push_init_level): Set constructor_designated to
289 p->designated for structures.
291 2014-05-01 Marek Polacek <polacek@redhat.com>
294 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
295 function-definition has an attribute after the declarator.
297 2014-05-01 Marek Polacek <polacek@redhat.com>
300 * c-typeck.c (warning_init): Add location_t parameter. Call
301 warning_at instead of warning.
302 (push_init_level): Pass input_location to warning_init.
303 (add_pending_init): Add location_t parameter. Pass loc to
305 (set_nonincremental_init): Pass input_location to add_pending_init.
306 (set_nonincremental_init_from_string): Likewise.
307 (output_init_element): Pass loc to warning_init and to
310 2014-05-01 Marek Polacek <polacek@redhat.com>
313 * c-typeck.c (c_finish_return): Distinguish between label and variable
314 when warning about returning local address.
316 2014-05-01 Marek Polacek <polacek@redhat.com>
319 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
322 2014-05-01 Marek Polacek <polacek@redhat.com>
325 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
326 instead of 0 to WARN_FOR_QUALIFIERS.
328 2014-05-01 Marek Polacek <polacek@redhat.com>
331 * c-typeck.c (default_conversion): Use better location for
334 2014-04-30 Marek Polacek <polacek@redhat.com>
336 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
337 also when SANITIZE_FLOAT_DIVIDE is on.
339 2014-04-30 Marek Polacek <polacek@redhat.com>
342 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
343 and pedwarn_init. Use loc insted of input_location.
345 2014-04-30 Marek Polacek <polacek@redhat.com>
348 * c-typeck.c (build_binary_op): Use location when warning about
351 2014-04-25 Marek Polacek <polacek@redhat.com>
354 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
355 always_inline/noinline and hot/cold attributes.
357 2014-04-25 Marek Polacek <polacek@redhat.com>
360 * c-parser.c (c_parser_initelt): Pass input_location to
361 process_init_element.
362 (c_parser_initval): Pass loc to process_init_element.
363 * c-tree.h (process_init_element): Adjust declaration.
364 * c-typeck.c (push_init_level): Pass input_location to
365 process_init_element.
366 (pop_init_level): Likewise.
367 (set_designator): Likewise.
368 (output_init_element): Add location_t parameter. Pass loc to
370 (output_pending_init_elements): Pass input_location to
372 (process_init_element): Add location_t parameter. Pass loc to
375 2014-04-24 Jakub Jelinek <jakub@redhat.com>
377 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
378 atomic-clause, allow comma in between atomic-clause and
381 2014-04-22 Jakub Jelinek <jakub@redhat.com>
384 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
385 fails, don't set OM_PARALLEL_COMBINED and return NULL.
387 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
390 * c-array-notation.c (fix_builtin_array_notation_fn): Use
391 create_tmp_var instead build_decl for creating temps.
392 (build_array_notation_expr): Likewise.
393 (fix_conditional_array_notations_1): Likewise.
394 (fix_array_notation_expr): Likewise.
395 (fix_array_notation_call_expr): Likewise.
397 2014-03-28 Jakub Jelinek <jakub@redhat.com>
400 * c-tree.h (c_build_function_call_vec): New prototype.
401 * c-typeck.c (build_function_call_vec): Don't call
402 resolve_overloaded_builtin here.
403 (c_build_function_call_vec): New wrapper function around
404 build_function_call_vec. Call resolve_overloaded_builtin here.
405 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
406 Call c_build_function_call_vec instead of build_function_call_vec.
407 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
408 * c-decl.c (finish_decl): Likewise.
410 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
413 * c-typeck.c: Use correct format string in cast-qual warning
415 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
417 * c-decl.c (c_decl_attributes): Use
418 lang_hooks.types.omp_mappable_type.
419 * c-typeck.c (c_finish_omp_clauses): Likewise.
421 2014-03-06 Marek Polacek <polacek@redhat.com>
424 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
425 of checking tree code.
427 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
429 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
430 (c_parser_parameter_declaration): Likewise.
432 2014-02-19 Marek Polacek <polacek@redhat.com>
435 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
436 Call mark_exp_read on exp.value.
437 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
438 TREE_ADDRESSABLE on old instead of val.
439 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
441 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
443 * c-parser.c (c_parser_get_builtin_args): Replace calls to
444 C_EXPR_APPEND by vec_safe_push.
445 * c-tree.h (C_EXPR_APPEND): Remove.
447 2014-01-31 Marek Polacek <polacek@redhat.com>
450 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
451 build_function_call_vec.
452 (build_function_call): Likewise.
453 (build_atomic_assign): Likewise.
454 (build_function_call_vec): Add arg_loc parameter. Use it.
455 (convert_arguments): Likewise.
456 (convert_for_assignment): Rename rhs_loc to expr_loc.
457 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
458 (c_parser_objc_keywordexpr): Likewise.
459 (c_parser_postfix_expression_after_primary): Call
460 build_function_call_vec with expr_loc rather than op_loc.
461 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
462 build_function_call_vec.
463 (c_parser_expr_list): Add locations parameter. Fill it with locations
464 of function arguments.
465 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
467 2014-01-30 Marek Polacek <polacek@redhat.com>
470 * c-typeck.c (build_function_call_vec): Use loc parameter.
471 (convert_arguments): Add location parameter. Use it.
472 (ep_convert_and_check): Likewise.
473 (build_atomic_assign): Adjust convert_for_assignment call.
474 (build_modify_expr): Likewise.
475 (digest_init): Likewise.
476 (c_finish_return): Likewise.
477 (build_conditional_expr): Adjust ep_convert_and_check calls.
478 (convert_for_assignment): Add rhs_loc parameter. Use it.
479 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
482 2014-01-30 Richard Biener <rguenther@suse.de>
485 * c-typeck.c (build_function_call_vec): Do not replace calls
486 to a function via an incompatible type with a runtime abort.
488 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
490 * c-parser.c (c_parser_declaration_or_fndef): Replaced
491 flag_enable_cilkplus with flag_cilkplus.
492 (c_parser_direct_declarator_inner): Likewise.
493 (c_parser_attribute_any_word): Likewise.
494 (c_parser_attributes): Likewise.
495 (c_parser_compound_statement): Likewise.
496 (c_parser_statement_after_labels): Likewise.
497 (c_parser_if_statement): Likewise.
498 (c_parser_switch_statement): Likewise.
499 (c_parser_do_statement): Likewise.
500 (c_parser_for_statement): Likewise.
501 (c_parser_unary_expression): Likewise.
502 (c_parser_postfix_expression): Likewise.
503 (c_parser_postfix_expression_after_primary): Likewise.
504 (c_parser_postfix_expression_after_primary): Likewise.
505 (c_parser_omp_clause_name): Likewise.
506 (c_finish_omp_declare_simd): Likewise.
507 (c_parser_cilk_verify_simd): Likewise.
508 * c-typeck.c (build_array_ref): Likewise.
509 (build_function_call_vec): Likewise.
510 (convert_arguments): Likewise.
511 (build_compound_expr): Likewise.
512 (c_finish_return): Likewise.
513 (c_finish_if_stmt): Likewise.
514 (c_finish_loop): Likewise.
515 (build_binary_op): Likewise.
517 2014-01-23 Marek Polacek <polacek@redhat.com>
520 * c-typeck.c (parser_build_binary_op): Use location instead of
522 (build_binary_op): Pass location to shorten_compare.
524 2014-01-23 Marek Polacek <polacek@redhat.com>
527 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
530 2014-01-23 Marek Polacek <polacek@redhat.com>
533 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
534 of a comma expression.
535 (emit_side_effect_warnings): Likewise.
537 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
540 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
541 function to use walk_tree and moved a lot of its functionality to
542 expand_array_notations.
543 (expand_array_notations): New function.
545 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
547 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
548 attribute an attribute without value.
550 2014-01-23 Jakub Jelinek <jakub@redhat.com>
553 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
554 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
556 2014-01-22 Marek Polacek <polacek@redhat.com>
559 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
560 of remove_c_maybe_const_expr on op1 and op2.
562 2014-01-15 Jakub Jelinek <jakub@redhat.com>
565 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
566 effects, preevaluate rhs using SAVE_EXPR first.
568 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
571 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
572 statements with if-elseif statements.
574 2014-01-06 Marek Polacek <polacek@redhat.com>
577 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
578 defined bit-field types only in ISO C.
580 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
582 Update copyright years
584 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
586 * c-array-notation.c: Use the standard form for the copyright notice.
588 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
590 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
591 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
592 field in parser is not empty. If not-empty, call the function
593 c_parser_finish_omp_declare_simd.
594 (c_parser_cilk_clause_vectorlength): Modified function to be shared
595 between SIMD-enabled functions and #pragma simd. Added new parameter.
596 (c_parser_cilk_all_clauses): Modified the usage of the function
597 c_parser_cilk_clause_vectorlength as mentioned above.
598 (c_parser_cilk_simd_fn_vector_attrs): New function.
599 (c_finish_cilk_simd_fn_tokens): Likewise.
600 (is_cilkplus_vector_p): Likewise.
601 (c_parser_omp_clause_name): Added checking for "vectorlength,"
602 "nomask," and "mask" strings in clause name.
603 (c_parser_omp_all_clauses): Added 3 new case statements:
604 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
605 PRAGMA_CILK_CLAUSE_NOMASK.
606 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
607 check for vector attribute and if so call the function
608 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
609 called the function c_finish_cilk_simd_fn_tokens.
610 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
611 parser field is non-empty. If so, parse them as you would parse
612 the omp declare simd pragma.
613 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
614 Added a check when step is a parameter and flag it as error.
615 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
616 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
619 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
621 * c-parser.c (c_parser_omp_parallel): Fix description.
623 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
625 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
626 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
627 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
628 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
630 2013-12-04 Joseph Myers <joseph@codesourcery.com>
633 * c-parser.c (c_parser_alignas_specifier): Use
634 c_sizeof_or_alignof_type instead of c_alignof.
635 (c_parser_alignof_expression): Likewise, with min_alignof
636 parameter depending on alignof spelling used.
638 2013-12-04 Marek Polacek <polacek@redhat.com>
641 * c-decl.c (start_function): Don't warn for missing prototype for
644 2013-12-03 Marek Polacek <polacek@redhat.com>
647 * c-decl.c (build_compound_literal): Allow compound literals with
650 2013-12-02 Joseph Myers <joseph@codesourcery.com>
653 * c-typeck.c (build_modify_expr): Diagnose assignment to
654 expression with array type.
656 2013-11-29 Joseph Myers <joseph@codesourcery.com>
659 * c-typeck.c (process_init_element): Do not treat a string as
660 initializing a whole array when used with a designator for an
663 2013-11-29 Joseph Myers <joseph@codesourcery.com>
666 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
667 an inline function following a static declaration.
669 2013-11-28 Jakub Jelinek <jakub@redhat.com>
672 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
673 to p_name before calling c_parser_omp_teams instead of after.
674 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
675 argument. Remove unused p_name variable.
677 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
678 Jakub Jelinek <jakub@redhat.com>
680 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
681 external_scope is NULL.
683 2013-11-27 Tom de Vries <tom@codesourcery.com>
684 Marc Glisse <marc.glisse@inria.fr>
687 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
689 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
691 * c-typeck.c: Add required include files from gimple.h.
693 2013-11-22 David Malcolm <dmalcolm@redhat.com>
695 * c-decl.c (define_label, shadow_tag_warned)
696 (check_bitfield_type_and_width, grokdeclarator, grokparms,
697 store_parm_decls_newstyle, store_parm_decls_oldstyle)
698 (declspecs_add_type): Remove use of in_system_header macro.
699 * c-parser.c (c_parser_unary_expression): Likewise.
700 * c-typeck.c (store_init_value, process_init_element)
701 (c_start_case): Likewise.
703 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
706 * c-parser.c (c_parser_set_source_position_from_token): Remove
707 reference to in_system_header from comment.
709 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
711 * c-decl.c (grokdeclarator): Update comment to refer to
712 tree_to_[su]hwi rather than tree_low_cst.
714 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
716 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
717 tree_to_uhwi throughout.
719 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
721 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
724 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
726 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
729 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
731 * c-parser.c (c_parser_cilk_simd): New.
732 (c_parser_cilk_verify_simd): New.
733 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
734 (c_parser_omp_for_loop): Add case for NE_EXPR.
735 Set c_break_label for CILK_SIMD.
736 (c_parser_cilk_clause_vectorlength): New.
737 (c_parser_cilk_clause_linear): New.
738 (c_parser_cilk_clause_name): New.
739 (c_parser_cilk_all_clauses): New.
740 * c-typeck.c (build_unary_op): Pass location argument to
742 (build_modify_expr): Same.
743 (build_asm_expr): Same.
744 (c_finish_bc_stmt): Error on break/continue in loops.
746 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
748 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
750 2013-11-14 Diego Novillo <dnovillo@google.com>
752 * c-decl.c: Include print-tree.h.
753 Include stor-layout.h.
756 Include stringpool.h.
757 * c-lang.c: Include fold-const.h.
758 * c-parser.c: Include stringpool.h.
760 Include stor-layout.h.
763 * c-typeck.c: Include stor-layout.h.
768 2013-11-13 Joseph Myers <joseph@codesourcery.com>
770 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
771 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
773 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
774 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
776 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
777 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
778 (c_parser_declarator, c_parser_direct_declarator_inner)
779 (c_parser_parameter_declaration, c_parser_type_name): All callers
781 (c_parser_declaration_or_fndef): Handle declarations with type
782 determined from the initializer.
784 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
786 * c-typeck.c: Include gimplify.h.
788 2013-11-12 Joseph Myers <joseph@codesourcery.com>
790 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
791 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
793 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
794 or _Thread_local as appropriate in diagnostics.
795 (build_null_declspecs): Initialize ret->thread_gnu_p.
796 (declspecs_add_scspec): Handle either __thread or _Thread_local
797 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
798 pedantic. Do not disallow _Thread_local extern and _Thread_local
801 2013-11-07 Joseph Myers <joseph@codesourcery.com>
802 Andrew MacLeod <amacleod@redhat.com>
804 * c-aux-info.c (gen_type): Handle atomic qualifier.
805 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
806 qualifiers when compating types.
807 (shadow_tag_warned): Handle atomic_p in declspecs.
808 (quals_from_declspecs): Likewise.
809 (start_decl): Use c_type_promotes_to when promoting argument
811 (grokdeclarator): Handle _Atomic.
812 (get_parm_info): Diagnose any qualifier on "void" as only
814 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
815 comparing types. Use c_type_promotes_to when promoting argument
817 (finish_function): Use c_type_promotes_to when promoting argument
819 (build_null_declspecs): Handle atomic_p in declspecs.
820 (declspecs_add_qual): Handle RID_ATOMIC.
821 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
822 (c_token_starts_declspecs): Handle RID_ATOMIC.
823 (c_parser_declspecs): Handle atomic type specifiers and
825 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
826 from types of expressions with atomic type.
827 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
828 (c_parser_attribute_any_word): Handle RID_ATOMIC.
829 (c_parser_initializer, c_parser_initelt, c_parser_initval)
830 (c_parser_statement_after_labels, c_parser_switch_statement)
831 (c_parser_for_statement, c_parser_expr_no_commas)
832 (c_parser_conditional_expression, c_parser_binary_expression)
833 (c_parser_cast_expression, c_parser_unary_expression)
834 (c_parser_postfix_expression)
835 (c_parser_postfix_expression_after_primary, c_parser_expression):
836 Use convert_lvalue_to_rvalue.
837 (c_parser_expression_conv, c_parser_expr_list): Document
838 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
839 (c_parser_objc_synchronized_statement): Use
840 convert_lvalue_to_rvalue.
841 (c_parser_objc_selector): Handle RID_ATOMIC.
842 (c_parser_objc_receiver, c_parser_array_notation): Use
843 convert_lvalue_to_rvalue.
844 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
846 (struct c_declspecs): Add atomic_p field.
847 (convert_lvalue_to_rvalue): Declare.
848 * c-typeck.c (c_type_promotes_to): Promote atomic types to
849 corresponding atomic types.
850 (qualify_type): Don't add _Atomic qualifiers from second argument.
851 (comp_target_types): Do not allow _Atomic mismatches.
852 (type_lists_compatible_p): Do not remove atomic qualifiers when
854 (really_atomic_lvalue, convert_lvalue_to_rvalue)
855 (build_atomic_assign): New functions.
856 (build_unary_op): Use build_atomic_assign for atomic increment and
858 (build_conditional_expr): Do not treat _Atomic void as a qualified
860 (build_modify_expr): Use build_atomic_assign for atomic LHS.
861 (find_anonymous_field_with_type, convert_to_anonymous_field)
862 (convert_for_assignment): Do not remove atomic qualifiers when
864 (digest_init): Do not accept initialization of arrays of atomic
865 elements by string constants.
866 (build_asm_expr): Use convert_lvalue_to_rvalue.
867 (build_binary_op): Do not treat _Atomic void as a qualified
870 2013-11-06 DJ Delorie <dj@redhat.com>
872 * c-decl.c (locate_old_decl): If a previous conflicting decl is
873 both explicit and builtin, print the location of the explicit one.
875 2013-11-05 Tobias Burnus <burnus@net-b.de>
877 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
878 c_parser_omp_distribute, c_parser_omp_teams,
879 c_parser_omp_target, c_parser_omp_declare): Handle
882 2013-11-03 Marek Polacek <polacek@redhat.com>
884 * c-decl.c (grokdeclarator): Add VLA instrumentation.
886 2013-11-01 Jakub Jelinek <jakub@redhat.com>
888 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
889 check_dup_generic at the end, unless remove is true.
890 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
892 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
894 2013-10-31 Jakub Jelinek <jakub@redhat.com>
896 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
897 with decl that is not pointer nor array.
899 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
901 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
902 a spawning function is found.
903 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
904 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
905 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
906 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
908 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
909 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
911 (c_finish_return): Added a check to reject _Cilk_spawn in return
913 (build_cilk_spawn): New function.
914 (build_cilk_sync): Likewise.
915 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
917 2013-10-27 Tobias Burnus <burnus@net-b.de>
920 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
921 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
922 (c_parser_statement_after_labels): Update calls.
924 2013-10-24 Tobias Burnus <burnus@net-b.de>
927 * c-parser.c (c_parser_pragma, c_parser_for_statement):
929 (c_parser_statement_after_labels): Update call.
931 2013-10-24 Marek Polacek <polacek@redhat.com>
933 * c-parser.c (c_parser_struct_declaration): Add a comment.
934 (c_parser_declarator): Don't allow _Alignas here.
936 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
938 * c-parser.c: Include omp-low.h.
939 * c-typeck.c: Likewise.
941 2013-10-17 Marek Polacek <polacek@redhat.com>
944 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
945 Document syntax of the array-declarator.
946 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
948 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
949 (c_parser_struct_declaration): Likewise.
950 (c_parser_declarator): Likewise.
951 (c_parser_direct_declarator_inner): Likewise.
952 (c_parser_parameter_declaration): Likewise.
953 (c_parser_type_name): Likewise.
955 2013-10-11 Jakub Jelinek <jakub@redhat.com>
957 * c-lang.h (current_omp_declare_target_attribute): New extern
959 * c-parser.c: Include c-lang.h.
960 (struct c_parser): Change tokens to c_token *.
961 Add tokens_buf field. Change tokens_avail type to unsigned int.
962 (c_parser_consume_token): If parser->tokens isn't
963 &parser->tokens_buf[0], increment parser->tokens.
964 (c_parser_consume_pragma): Likewise.
965 (enum pragma_context): Add pragma_struct and pragma_param.
966 (c_parser_external_declaration): Adjust
967 c_parser_declaration_or_fndef caller.
968 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
969 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
970 Adjust recursive call.
971 (c_parser_struct_or_union_specifier): Use pragma_struct instead
973 (c_parser_parameter_declaration): Use pragma_param instead of
975 (c_parser_compound_statement_nostart, c_parser_label,
976 c_parser_for_statement): Adjust
977 c_parser_declaration_or_fndef callers.
978 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
979 it through to c_parser_conditional_expression.
980 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
981 pass it through to c_parser_binary_expression. Adjust recursive
983 (c_parser_binary_expression): Remove prec argument, add
984 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
985 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
986 binop matches it, use build2 instead of parser_build_binary_op.
987 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
988 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
989 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
990 Handle pragma_struct and pragma_param the same as pragma_external.
991 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
992 (c_parser_omp_variable_list): Parse array sections for
993 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
994 (c_parser_omp_clause_collapse): Fully fold collapse expression.
995 (c_parser_omp_clause_reduction): Handle user defined reductions.
996 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
997 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
998 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
999 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1000 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1001 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1002 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1003 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1004 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1005 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1006 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1007 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1008 (c_parser_omp_for_loop): Add CODE argument, pass it through
1009 to c_finish_omp_for. Change last argument to cclauses,
1010 and adjust uses to grab parallel clauses from the array of all
1011 the split clauses. Adjust c_parser_binary_expression,
1012 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1013 (omp_split_clauses): New function.
1014 (c_parser_omp_simd): New function.
1015 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1016 Allow the function to be called also when parsing combined constructs,
1017 and call c_parser_omp_simd when parsing for simd.
1018 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1019 #pragma omp section, require exactly one structured-block instead of
1020 sequence of statements.
1021 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1022 Allow the function to be called also when parsing combined constructs.
1023 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1024 Allow the function to be called also when parsing combined
1026 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1027 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1028 c_parser_omp_teams, c_parser_omp_target_data,
1029 c_parser_omp_target_update, c_parser_omp_target,
1030 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1031 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1032 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1033 (c_parser_omp_construct): Add p_name and mask vars. Handle
1034 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1035 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1036 and c_parser_omp_sections callers.
1037 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1038 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1039 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1040 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1041 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1043 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1044 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1045 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1046 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1047 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1048 * c-typeck.c: Include tree-inline.h.
1049 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1050 handle_omp_array_sections_1, handle_omp_array_sections,
1051 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1052 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1053 user defined reductions.
1054 (c_tree_equal): New function.
1055 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1056 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1057 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1058 c_check_omp_declare_reduction_r): New prototypes.
1059 * c-decl.c (current_omp_declare_target_attribute): New variable.
1060 (c_decl_attributes): New function.
1061 (start_decl, start_function): Use it instead of decl_attributes.
1062 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1063 c_omp_reduction_decl, c_omp_reduction_lookup,
1064 c_check_omp_declare_reduction_r): New functions.
1066 2013-09-25 Tom Tromey <tromey@redhat.com>
1068 * Make-lang.in (c/gccspec.o): Remove.
1069 (CFLAGS-c/gccspec.o): New variable.
1070 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1071 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1072 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1074 2013-09-25 Tom Tromey <tromey@redhat.com>
1076 * Make-lang.in (c/gccspec.o): Don't use subshell.
1078 2013-09-18 Marek Polacek <polacek@redhat.com>
1081 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1082 Remove unnecessary check.
1084 2013-09-18 Marek Polacek <polacek@redhat.com>
1087 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1088 no_sanitize_undefined attribute.
1090 2013-09-13 Kai Tietz <ktietz@redhat.com>
1093 * c-decl.c (c_builtin_function_ext_scope): Remove
1094 wrong assumption that it is never called on prexisting
1097 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1099 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1101 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1103 * c-objc-common.c (c_tree_printer): Tidy.
1105 2013-08-30 Marek Polacek <polacek@redhat.com>
1107 * c-typeck.c (build_binary_op): Add division by zero and shift
1110 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
1111 Joseph Myers <joseph@codesourcery.com>
1114 * c-typeck.c (c_common_type): Prefer double_type_node over
1115 other REAL_TYPE types with the same precision.
1116 (convert_arguments): Likewise.
1118 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1120 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1121 (c_initialize_diagnostics): Call a destructor for the early printer.
1123 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1125 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1126 printer initialization.
1128 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1131 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1132 check for truth values.
1133 (expand_array_notation_exprs): Added truth values case. Removed an
1134 unwanted else. Added for-loop to walk through subtrees in default
1137 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1139 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1141 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1143 * c-parser.c (struct c_generic_association): Fix typo.
1145 2013-07-23 Tom Tromey <tromey@redhat.com>
1146 Joseph Myers <joseph@codesourcery.com>
1148 * c-parser.c (struct c_generic_association): New.
1149 (c_generic_association_d): New typedef.
1150 (c_parser_generic_selection): New function.
1151 (c_parser_postfix_expression): Handle RID_GENERIC.
1153 2013-07-13 Jason Merrill <jason@redhat.com>
1156 * c-decl.c (finish_struct): Check for too-large class.
1158 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1161 * c-typeck.c (set_init_index): When folding, check for index overflow.
1163 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1165 * c-parser.c (c_parser_array_notation): Removed rejection of array
1166 notations in an array of function pointers.
1168 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1170 * c-array-notation.c (make_triplet_val_inv): New function.
1171 (create_cmp_incr): Likewise.
1172 (create_array_refs): Likewise.
1173 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1174 Also modularized common parts between functions and called the function.
1175 (build_array_notation_expr): Likewise.
1176 (fix_conditional_array_notations_1): Likewise.
1177 (fix_array_notation_expr): Likewise.
1178 (fix_array_notation_call_expr): Likewise.
1180 2013-06-18 Marek Polacek <polacek@redhat.com>
1183 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1185 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1187 * c-array-notation.c (build_array_notation_expr): Reject array notation
1188 mismatch between LHS and RHS even inside a call_expr. Also, removed
1189 a couple while statements that were dead code.
1191 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1193 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1194 excessive precision expressions in function parameters. Also removed
1195 couple unwanted while statements.
1197 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1199 * c-array-notation.c (expand_array_notation_exprs): Added
1200 ARRAY_NOTATION_REF case.
1202 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1204 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1205 function to c-family/array-notation-common.c.
1206 (is_cilkplus_reduce_builtin): Likewise.
1207 (find_rank): Likewise.
1208 (extract_array_notation_exprs): Likewise.
1209 (replace_array_notations): Likewise.
1210 (find_inv_trees): Likewise.
1211 (replace_inv_trees): Likewise.
1212 (contains_array_notation_expr): Likewise.
1213 (find_correct_array_notation_type): Likewise.
1214 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1215 (struct inv_list): Moved this to c-family/array-notation-common.c.
1216 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1218 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1220 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1221 reduction functions outside the for-loop. Added a check if the fundecl
1222 is non-NULL. Finally, removed an unwanted if-statement, and made the
1225 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1227 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1228 condition of the if-statement matches the rank of else-block and then-
1229 block when array notations are used.
1230 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1231 expression after the entire function body is parsed.
1232 (c_parser_expr_no_commas): Delayed creating array notation expressions
1233 to the end of function parsing.
1234 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1235 whole if-statement instead of just the condition.
1236 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1238 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1241 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1242 array to NULL_TREE if they are unused. Also added a check for the
1243 field to be NULL before its fields are used in future.
1245 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1248 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1249 (build_array_notation_expr): Likewise.
1251 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1253 * c-typeck.c (build_array_ref): Added a check to see if array's
1254 index is greater than one. If true, then emit an error.
1255 (build_function_call_vec): Exclude error reporting and checking
1256 for builtin array-notation functions.
1257 (convert_arguments): Likewise.
1258 (c_finish_return): Added a check for array notations as a return
1259 expression. If true, then emit an error.
1260 (c_finish_loop): Added a check for array notations in a loop
1261 condition. If true then emit an error.
1262 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1263 (build_binary_op): Added a check for array notation expr inside
1264 op1 and op0. If present, we call another function to find correct
1266 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1267 * c-parser.c (c_parser_compound_statement): Check if array
1268 notation code is used in tree, if so, then transform them into
1270 (c_parser_expr_no_commas): Check if array notation is used in LHS
1271 or RHS, if so, then build array notation expression instead of
1273 (c_parser_postfix_expression_after_primary): Added a check for
1274 colon(s) after square braces, if so then handle it like an array
1275 notation. Also, break up array notations in unary op if found.
1276 (c_parser_direct_declarator_inner): Added a check for array
1278 (c_parser_compound_statement): Added a check for array notation in
1279 a stmt. If one is present, then expand array notation expr.
1280 (c_parser_if_statement): Likewise.
1281 (c_parser_switch_statement): Added a check for array notations in
1282 a switch statement's condition. If true, then output an error.
1283 (c_parser_while_statement): Similarly, but for a while.
1284 (c_parser_do_statement): Similarly, but for a do-while.
1285 (c_parser_for_statement): Similarly, but for a for-loop.
1286 (c_parser_unary_expression): Check if array notation is used in a
1287 pre-increment or pre-decrement expression. If true, then expand
1289 (c_parser_array_notation): New function.
1290 * c-array-notation.c: New file.
1291 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1293 2013-05-23 Mike Stump <mikestump@comcast.net>
1295 * c-typeck.c (convert_for_assignment): Handle references to memory
1298 2013-05-16 Jason Merrill <jason@redhat.com>
1300 * Make-lang.in (cc1$(exeext)): Use link mutex.
1302 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1304 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1305 to simply use OPT_Wpointer_arith.
1306 (build_unary_op): Likewise.
1308 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1311 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1312 argument. If set, or it temporarily for parsing of the first
1313 argument into force_folding_builtin_constant_p.
1314 (c_parser_postfix_expression): Adjust callers.
1316 2013-03-21 Richard Biener <rguenther@suse.de>
1318 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1319 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1321 2013-02-12 Marek Polacek <polacek@redhat.com>
1324 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1327 2013-01-24 Jakub Jelinek <jakub@redhat.com>
1330 * c-typeck.c (set_nonincremental_init_from_string): If
1331 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1333 (process_init_element): Likewise.
1335 2012-12-20 Jakub Jelinek <jakub@redhat.com>
1338 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1339 argument, don't call default_function_array_conversion
1340 nor c_fully_fold here.
1341 (c_parser_asm_statement): Adjust callers.
1342 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1343 and outputs here, and call default_function_array_conversion
1344 on inputs that don't need to be addressable.
1346 2012-12-18 Jakub Jelinek <jakub@redhat.com>
1349 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1350 warning require that both c_common_unsigned_type as well as
1351 c_common_signed_type is the same for both mvl and mvr types.
1353 2012-11-16 Diego Novillo <dnovillo@google.com>
1355 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1357 * c-common.c: Use new vec API in vec.h.
1358 * c-common.h: Likewise.
1359 * c-gimplify.c: Likewise.
1360 * c-pragma.c: Likewise.
1361 * c-pretty-print.c: Likewise.
1362 * c-pretty-print.h: Likewise.
1363 * c-semantics.c: Likewise.
1364 * c-decl.c: Likewise.
1365 * c-parser.c: Likewise.
1366 * c-tree.h: Likewise.
1367 * c-typeck.c: Likewise.
1369 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1372 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1374 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1377 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1378 shadows a function, unless the variable is a function or a
1379 pointer-to-function.
1381 2012-10-12 Jakub Jelinek <jakub@redhat.com>
1384 * c-parser.c (struct c_tree_loc_pair): Removed.
1385 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1386 add location_t * and tree * arguments, fill in array of 3
1387 sizeof_arg trees and corresponding locs.
1388 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1389 c_parser_expr_list callers.
1390 (c_parser_postfix_expression_after_primary): Likewise. Pass
1391 array of 3 sizeof_arg trees and locs (corresponding to first
1392 3 arguments) to sizeof_pointer_memaccess_warning.
1394 2012-10-09 Lawrence Crowl <crowl@google.com>
1396 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1397 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1400 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1403 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1406 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
1409 * c-typeck.c: Include c-common.h.
1410 (enum stv_conv): Moved to c-common.h.
1411 (scalar_to_vector): Moved to c-common.c.
1412 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1413 * Make-lang.in: c-typeck.c depends on c-common.h.
1415 2012-10-04 Arnaud Charlet <charlet@adacore.com>
1417 * c-decl.c (c_write_global_declarations): Fix handling of
1420 2012-09-30 Sharad Singhai <singhai@google.com>
1422 * c-decl.c (c_write_global_declarations): Use a different method
1423 to determine if the dump has ben initialized.
1425 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1428 * c-typeck.c (c_cast_expr): When casting to a type requiring
1429 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1432 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1435 * c-typeck.c (build_unary_op): Pass original argument of
1436 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1437 any C_MAYBE_CONST_EXPR, if it has integer operands.
1438 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1439 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1440 to c_objc_common_truthvalue_conversion, then remove any
1441 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1442 c_objc_common_truthvalue_conversion not
1443 c_common_truthvalue_conversion.
1444 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1445 call note_integer_operands for arguments with integer operands
1446 that are not integer constants.
1448 2012-09-13 Jakub Jelinek <jakub@redhat.com>
1451 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1452 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1454 2012-08-31 Jakub Jelinek <jakub@redhat.com>
1457 * c-convert.c (convert): Don't call fold_convert_loc if
1458 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1459 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1460 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1462 2012-08-24 Jakub Jelinek <jakub@redhat.com>
1465 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1466 for nested and empty_ok arguments in the call to
1467 c_parser_declaration_or_fndef.
1469 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1471 * c-tree.h (c_last_sizeof_arg): Declare.
1472 * c-parser.c (struct c_tree_loc_pair): New type.
1473 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1475 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1476 (c_parser_postfix_expression_after_primary): Likewise. Call
1477 sizeof_pointer_memaccess_warning if needed.
1478 (sizeof_ptr_memacc_comptypes): New function.
1479 * c-typeck.c (c_last_sizeof_arg): New global variable.
1480 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1482 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1484 * c-lang.h (lang_decl): Add variable_size GTY option.
1486 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1488 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1489 * Make-lang.in: Fix dependencies.
1491 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1493 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1494 and add language Makefile hooks.
1495 * config-lang.in: New file.
1496 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1497 add the required "normal" config-lang.in rules.
1498 * c-lang.h: Moved from gcc/ to here.
1499 * c-tree.h: Likewise.
1500 * c-objc-common.c: Likewise.
1501 * c-objc-common.h: Likewise.
1502 * c-typeck.c: Likewise.
1503 * c-convert.c: Likewise.
1504 * c-lang.c: Likewise.
1505 * c-aux-info.c: Likewise.
1506 * c-errors.c: Likewise.
1507 * gccspec.c: Likewise.
1508 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1509 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1511 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1513 Copying and distribution of this file, with or without modification,
1514 are permitted in any medium without royalty provided the copyright
1515 notice and this notice are preserved.