1 2014-06-05 Marek Polacek <polacek@redhat.com>
4 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5 on the left hand side operand of a comparison.
7 2014-06-05 Marek Polacek <polacek@redhat.com>
10 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
11 Print note only if the warning was printed.
13 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
16 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
19 2014-06-03 Marek Polacek <polacek@redhat.com>
22 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
24 * c-tree.h (c_start_case): Update.
25 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
26 switch condition has boolean value.
28 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
30 * c-decl.c: Include builtins.h.
31 * c-parser.c: Likewise.
33 2014-05-27 Marek Polacek <polacek@redhat.com>
36 * c-typeck.c (convert_arguments): Get location of a parameter. Change
37 error and warning calls to error_at and warning_at. Pass location of
38 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
39 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
40 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
42 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
45 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
48 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
50 * c-decl.c (merge_decls): Preserve symtab node pointers.
51 (duplicate_decls): Free new decl.
53 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
55 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
58 * c-parser.c (c_parser_omp_target): Return bool values.
60 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
62 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
63 num_teams_loc variable to num_thread_limit_loc.
65 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
67 * c-array-notation.c (expand_array_notations): Use void_node
68 instead of void_zero_node.
70 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
72 * c-decl.c (finish_struct): Adjust.
73 (finish_enum): Likewise.
75 (record_inline_static): Likewise.
76 (push_scope): Likewise.
77 (make_label): Likewise.
78 (lookup_label_for_goto): Likewise.
79 (finish_struct): Likewise.
80 (finish_enum): Likewise.
81 (store_parm_decls): Likewise.
82 (c_push_function_context): Likewise.
83 * c-lang.h: Remove usage of variable_size gty attribute.
84 * c-parser.c (c_parse_init): Adjust.
85 (c_parse_file): Likewise.
87 2014-05-13 Marek Polacek <polacek@redhat.com>
90 * c-typeck.c (convert_for_assignment): Pass location to
91 WARN_FOR_ASSIGNMENT instead of input_location.
93 2014-05-10 Marek Polacek <polacek@redhat.com>
95 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
96 maybe_warn_string_init.
97 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
98 maybe_warn_string_init.
99 * c-tree.h (maybe_warn_string_init): Update declaration.
100 * c-typeck.c (maybe_warn_string_init): Add location parameter.
101 Call pedwarn_init with loc instead of with input_location.
102 (digest_init): Pass init_loc to maybe_warn_string_init.
103 (pop_init_level): Call pedwarn_init with loc instead of with
105 (set_init_index): Likewise.
106 (process_init_element): Likewise.
108 2014-05-09 Marek Polacek <polacek@redhat.com>
111 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
112 (c_parser_initelt): Pass location to set_init_label. Pass array index
113 location to set_init_index.
114 * c-tree.h (push_init_level): Update declaration.
115 (pop_init_level): Likewise.
116 (set_init_index): Likewise.
117 (set_init_label): Likewise.
118 * c-typeck.c (error_init): Add location parameter. Call error_at
120 (digest_init): Pass init_loc to error_init.
121 (really_start_incremental_init):
122 (push_init_level): Add location parameter. Pass loc to pop_init_level
124 (pop_init_level): Likewise.
125 (set_designator): Add location parameter. Pass loc to pop_init_level,
126 push_init_level, and error_init.
127 (set_init_index): Add location parameter. Pass loc to error_init and
129 (set_init_label): Likewise.
130 (output_init_element): Pass loc to error_init.
131 (process_init_element): Pass loc to error_init, pop_init_level,
132 pedwarn_init, and push_init_level.
134 2014-05-09 Marek Polacek <polacek@redhat.com>
137 * c-parser.c (c_parser_attributes): Parse the arguments as an
138 expression-list if the attribute takes identifier.
140 2014-05-08 Marek Polacek <polacek@redhat.com>
143 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
146 2014-05-08 Marek Polacek <polacek@redhat.com>
149 * c-decl.c (start_function): Warn for _Atomic-qualified return type
152 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
153 Mike Stump <mikestump@comcast.net>
154 Richard Sandiford <rdsandiford@googlemail.com>
156 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
157 (finish_enum): Use wide-int interfaces.
158 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
159 * c-typeck.c (build_c_cast): Likewise.
160 (set_nonincremental_init_from_string): Likewise.
161 (c_tree_equal): Likewise.
163 2014-05-02 Marek Polacek <polacek@redhat.com>
166 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
167 Return size_one_node when the type is not complete.
168 (pointer_diff): Remove comment.
169 (build_unary_op): Improve error messages.
171 2014-05-02 Marek Polacek <polacek@redhat.com>
173 * c-typeck.c (c_finish_return): Separate warning_at calls.
175 2014-05-02 Marek Polacek <polacek@redhat.com>
177 * c-tree.h (error_init): Remove declaration.
178 (pedwarn_init): Likewise.
179 * c-typeck.c (error_init): Make static and move above.
180 (pedwarn_init): Likewise.
181 (warning_init): Move above.
182 (maybe_warn_string_init): Likewise.
184 2014-05-01 Jeff Law <law@redhat.com>
188 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
189 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
192 2014-05-02 Marek Polacek <polacek@redhat.com>
195 * c-typeck.c (push_init_level): Set constructor_designated to
196 p->designated for structures.
198 2014-05-01 Marek Polacek <polacek@redhat.com>
201 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
202 function-definition has an attribute after the declarator.
204 2014-05-01 Marek Polacek <polacek@redhat.com>
207 * c-typeck.c (warning_init): Add location_t parameter. Call
208 warning_at instead of warning.
209 (push_init_level): Pass input_location to warning_init.
210 (add_pending_init): Add location_t parameter. Pass loc to
212 (set_nonincremental_init): Pass input_location to add_pending_init.
213 (set_nonincremental_init_from_string): Likewise.
214 (output_init_element): Pass loc to warning_init and to
217 2014-05-01 Marek Polacek <polacek@redhat.com>
220 * c-typeck.c (c_finish_return): Distinguish between label and variable
221 when warning about returning local address.
223 2014-05-01 Marek Polacek <polacek@redhat.com>
226 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
229 2014-05-01 Marek Polacek <polacek@redhat.com>
232 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
233 instead of 0 to WARN_FOR_QUALIFIERS.
235 2014-05-01 Marek Polacek <polacek@redhat.com>
238 * c-typeck.c (default_conversion): Use better location for
241 2014-04-30 Marek Polacek <polacek@redhat.com>
243 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
244 also when SANITIZE_FLOAT_DIVIDE is on.
246 2014-04-30 Marek Polacek <polacek@redhat.com>
249 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
250 and pedwarn_init. Use loc insted of input_location.
252 2014-04-30 Marek Polacek <polacek@redhat.com>
255 * c-typeck.c (build_binary_op): Use location when warning about
258 2014-04-25 Marek Polacek <polacek@redhat.com>
261 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
262 always_inline/noinline and hot/cold attributes.
264 2014-04-25 Marek Polacek <polacek@redhat.com>
267 * c-parser.c (c_parser_initelt): Pass input_location to
268 process_init_element.
269 (c_parser_initval): Pass loc to process_init_element.
270 * c-tree.h (process_init_element): Adjust declaration.
271 * c-typeck.c (push_init_level): Pass input_location to
272 process_init_element.
273 (pop_init_level): Likewise.
274 (set_designator): Likewise.
275 (output_init_element): Add location_t parameter. Pass loc to
277 (output_pending_init_elements): Pass input_location to
279 (process_init_element): Add location_t parameter. Pass loc to
282 2014-04-24 Jakub Jelinek <jakub@redhat.com>
284 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
285 atomic-clause, allow comma in between atomic-clause and
288 2014-04-22 Jakub Jelinek <jakub@redhat.com>
291 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
292 fails, don't set OM_PARALLEL_COMBINED and return NULL.
294 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
297 * c-array-notation.c (fix_builtin_array_notation_fn): Use
298 create_tmp_var instead build_decl for creating temps.
299 (build_array_notation_expr): Likewise.
300 (fix_conditional_array_notations_1): Likewise.
301 (fix_array_notation_expr): Likewise.
302 (fix_array_notation_call_expr): Likewise.
304 2014-03-28 Jakub Jelinek <jakub@redhat.com>
307 * c-tree.h (c_build_function_call_vec): New prototype.
308 * c-typeck.c (build_function_call_vec): Don't call
309 resolve_overloaded_builtin here.
310 (c_build_function_call_vec): New wrapper function around
311 build_function_call_vec. Call resolve_overloaded_builtin here.
312 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
313 Call c_build_function_call_vec instead of build_function_call_vec.
314 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
315 * c-decl.c (finish_decl): Likewise.
317 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
320 * c-typeck.c: Use correct format string in cast-qual warning
322 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
324 * c-decl.c (c_decl_attributes): Use
325 lang_hooks.types.omp_mappable_type.
326 * c-typeck.c (c_finish_omp_clauses): Likewise.
328 2014-03-06 Marek Polacek <polacek@redhat.com>
331 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
332 of checking tree code.
334 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
336 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
337 (c_parser_parameter_declaration): Likewise.
339 2014-02-19 Marek Polacek <polacek@redhat.com>
342 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
343 Call mark_exp_read on exp.value.
344 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
345 TREE_ADDRESSABLE on old instead of val.
346 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
348 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
350 * c-parser.c (c_parser_get_builtin_args): Replace calls to
351 C_EXPR_APPEND by vec_safe_push.
352 * c-tree.h (C_EXPR_APPEND): Remove.
354 2014-01-31 Marek Polacek <polacek@redhat.com>
357 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
358 build_function_call_vec.
359 (build_function_call): Likewise.
360 (build_atomic_assign): Likewise.
361 (build_function_call_vec): Add arg_loc parameter. Use it.
362 (convert_arguments): Likewise.
363 (convert_for_assignment): Rename rhs_loc to expr_loc.
364 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
365 (c_parser_objc_keywordexpr): Likewise.
366 (c_parser_postfix_expression_after_primary): Call
367 build_function_call_vec with expr_loc rather than op_loc.
368 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
369 build_function_call_vec.
370 (c_parser_expr_list): Add locations parameter. Fill it with locations
371 of function arguments.
372 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
374 2014-01-30 Marek Polacek <polacek@redhat.com>
377 * c-typeck.c (build_function_call_vec): Use loc parameter.
378 (convert_arguments): Add location parameter. Use it.
379 (ep_convert_and_check): Likewise.
380 (build_atomic_assign): Adjust convert_for_assignment call.
381 (build_modify_expr): Likewise.
382 (digest_init): Likewise.
383 (c_finish_return): Likewise.
384 (build_conditional_expr): Adjust ep_convert_and_check calls.
385 (convert_for_assignment): Add rhs_loc parameter. Use it.
386 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
389 2014-01-30 Richard Biener <rguenther@suse.de>
392 * c-typeck.c (build_function_call_vec): Do not replace calls
393 to a function via an incompatible type with a runtime abort.
395 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
397 * c-parser.c (c_parser_declaration_or_fndef): Replaced
398 flag_enable_cilkplus with flag_cilkplus.
399 (c_parser_direct_declarator_inner): Likewise.
400 (c_parser_attribute_any_word): Likewise.
401 (c_parser_attributes): Likewise.
402 (c_parser_compound_statement): Likewise.
403 (c_parser_statement_after_labels): Likewise.
404 (c_parser_if_statement): Likewise.
405 (c_parser_switch_statement): Likewise.
406 (c_parser_do_statement): Likewise.
407 (c_parser_for_statement): Likewise.
408 (c_parser_unary_expression): Likewise.
409 (c_parser_postfix_expression): Likewise.
410 (c_parser_postfix_expression_after_primary): Likewise.
411 (c_parser_postfix_expression_after_primary): Likewise.
412 (c_parser_omp_clause_name): Likewise.
413 (c_finish_omp_declare_simd): Likewise.
414 (c_parser_cilk_verify_simd): Likewise.
415 * c-typeck.c (build_array_ref): Likewise.
416 (build_function_call_vec): Likewise.
417 (convert_arguments): Likewise.
418 (build_compound_expr): Likewise.
419 (c_finish_return): Likewise.
420 (c_finish_if_stmt): Likewise.
421 (c_finish_loop): Likewise.
422 (build_binary_op): Likewise.
424 2014-01-23 Marek Polacek <polacek@redhat.com>
427 * c-typeck.c (parser_build_binary_op): Use location instead of
429 (build_binary_op): Pass location to shorten_compare.
431 2014-01-23 Marek Polacek <polacek@redhat.com>
434 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
437 2014-01-23 Marek Polacek <polacek@redhat.com>
440 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
441 of a comma expression.
442 (emit_side_effect_warnings): Likewise.
444 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
447 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
448 function to use walk_tree and moved a lot of its functionality to
449 expand_array_notations.
450 (expand_array_notations): New function.
452 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
454 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
455 attribute an attribute without value.
457 2014-01-23 Jakub Jelinek <jakub@redhat.com>
460 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
461 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
463 2014-01-22 Marek Polacek <polacek@redhat.com>
466 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
467 of remove_c_maybe_const_expr on op1 and op2.
469 2014-01-15 Jakub Jelinek <jakub@redhat.com>
472 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
473 effects, preevaluate rhs using SAVE_EXPR first.
475 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
478 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
479 statements with if-elseif statements.
481 2014-01-06 Marek Polacek <polacek@redhat.com>
484 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
485 defined bit-field types only in ISO C.
487 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
489 Update copyright years
491 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
493 * c-array-notation.c: Use the standard form for the copyright notice.
495 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
497 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
498 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
499 field in parser is not empty. If not-empty, call the function
500 c_parser_finish_omp_declare_simd.
501 (c_parser_cilk_clause_vectorlength): Modified function to be shared
502 between SIMD-enabled functions and #pragma simd. Added new parameter.
503 (c_parser_cilk_all_clauses): Modified the usage of the function
504 c_parser_cilk_clause_vectorlength as mentioned above.
505 (c_parser_cilk_simd_fn_vector_attrs): New function.
506 (c_finish_cilk_simd_fn_tokens): Likewise.
507 (is_cilkplus_vector_p): Likewise.
508 (c_parser_omp_clause_name): Added checking for "vectorlength,"
509 "nomask," and "mask" strings in clause name.
510 (c_parser_omp_all_clauses): Added 3 new case statements:
511 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
512 PRAGMA_CILK_CLAUSE_NOMASK.
513 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
514 check for vector attribute and if so call the function
515 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
516 called the function c_finish_cilk_simd_fn_tokens.
517 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
518 parser field is non-empty. If so, parse them as you would parse
519 the omp declare simd pragma.
520 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
521 Added a check when step is a parameter and flag it as error.
522 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
523 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
526 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
528 * c-parser.c (c_parser_omp_parallel): Fix description.
530 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
532 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
533 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
534 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
535 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
537 2013-12-04 Joseph Myers <joseph@codesourcery.com>
540 * c-parser.c (c_parser_alignas_specifier): Use
541 c_sizeof_or_alignof_type instead of c_alignof.
542 (c_parser_alignof_expression): Likewise, with min_alignof
543 parameter depending on alignof spelling used.
545 2013-12-04 Marek Polacek <polacek@redhat.com>
548 * c-decl.c (start_function): Don't warn for missing prototype for
551 2013-12-03 Marek Polacek <polacek@redhat.com>
554 * c-decl.c (build_compound_literal): Allow compound literals with
557 2013-12-02 Joseph Myers <joseph@codesourcery.com>
560 * c-typeck.c (build_modify_expr): Diagnose assignment to
561 expression with array type.
563 2013-11-29 Joseph Myers <joseph@codesourcery.com>
566 * c-typeck.c (process_init_element): Do not treat a string as
567 initializing a whole array when used with a designator for an
570 2013-11-29 Joseph Myers <joseph@codesourcery.com>
573 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
574 an inline function following a static declaration.
576 2013-11-28 Jakub Jelinek <jakub@redhat.com>
579 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
580 to p_name before calling c_parser_omp_teams instead of after.
581 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
582 argument. Remove unused p_name variable.
584 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
585 Jakub Jelinek <jakub@redhat.com>
587 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
588 external_scope is NULL.
590 2013-11-27 Tom de Vries <tom@codesourcery.com>
591 Marc Glisse <marc.glisse@inria.fr>
594 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
596 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
598 * c-typeck.c: Add required include files from gimple.h.
600 2013-11-22 David Malcolm <dmalcolm@redhat.com>
602 * c-decl.c (define_label, shadow_tag_warned)
603 (check_bitfield_type_and_width, grokdeclarator, grokparms,
604 store_parm_decls_newstyle, store_parm_decls_oldstyle)
605 (declspecs_add_type): Remove use of in_system_header macro.
606 * c-parser.c (c_parser_unary_expression): Likewise.
607 * c-typeck.c (store_init_value, process_init_element)
608 (c_start_case): Likewise.
610 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
613 * c-parser.c (c_parser_set_source_position_from_token): Remove
614 reference to in_system_header from comment.
616 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
618 * c-decl.c (grokdeclarator): Update comment to refer to
619 tree_to_[su]hwi rather than tree_low_cst.
621 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
623 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
624 tree_to_uhwi throughout.
626 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
628 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
631 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
633 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
636 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
638 * c-parser.c (c_parser_cilk_simd): New.
639 (c_parser_cilk_verify_simd): New.
640 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
641 (c_parser_omp_for_loop): Add case for NE_EXPR.
642 Set c_break_label for CILK_SIMD.
643 (c_parser_cilk_clause_vectorlength): New.
644 (c_parser_cilk_clause_linear): New.
645 (c_parser_cilk_clause_name): New.
646 (c_parser_cilk_all_clauses): New.
647 * c-typeck.c (build_unary_op): Pass location argument to
649 (build_modify_expr): Same.
650 (build_asm_expr): Same.
651 (c_finish_bc_stmt): Error on break/continue in loops.
653 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
655 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
657 2013-11-14 Diego Novillo <dnovillo@google.com>
659 * c-decl.c: Include print-tree.h.
660 Include stor-layout.h.
663 Include stringpool.h.
664 * c-lang.c: Include fold-const.h.
665 * c-parser.c: Include stringpool.h.
667 Include stor-layout.h.
670 * c-typeck.c: Include stor-layout.h.
675 2013-11-13 Joseph Myers <joseph@codesourcery.com>
677 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
678 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
680 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
681 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
683 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
684 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
685 (c_parser_declarator, c_parser_direct_declarator_inner)
686 (c_parser_parameter_declaration, c_parser_type_name): All callers
688 (c_parser_declaration_or_fndef): Handle declarations with type
689 determined from the initializer.
691 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
693 * c-typeck.c: Include gimplify.h.
695 2013-11-12 Joseph Myers <joseph@codesourcery.com>
697 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
698 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
700 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
701 or _Thread_local as appropriate in diagnostics.
702 (build_null_declspecs): Initialize ret->thread_gnu_p.
703 (declspecs_add_scspec): Handle either __thread or _Thread_local
704 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
705 pedantic. Do not disallow _Thread_local extern and _Thread_local
708 2013-11-07 Joseph Myers <joseph@codesourcery.com>
709 Andrew MacLeod <amacleod@redhat.com>
711 * c-aux-info.c (gen_type): Handle atomic qualifier.
712 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
713 qualifiers when compating types.
714 (shadow_tag_warned): Handle atomic_p in declspecs.
715 (quals_from_declspecs): Likewise.
716 (start_decl): Use c_type_promotes_to when promoting argument
718 (grokdeclarator): Handle _Atomic.
719 (get_parm_info): Diagnose any qualifier on "void" as only
721 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
722 comparing types. Use c_type_promotes_to when promoting argument
724 (finish_function): Use c_type_promotes_to when promoting argument
726 (build_null_declspecs): Handle atomic_p in declspecs.
727 (declspecs_add_qual): Handle RID_ATOMIC.
728 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
729 (c_token_starts_declspecs): Handle RID_ATOMIC.
730 (c_parser_declspecs): Handle atomic type specifiers and
732 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
733 from types of expressions with atomic type.
734 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
735 (c_parser_attribute_any_word): Handle RID_ATOMIC.
736 (c_parser_initializer, c_parser_initelt, c_parser_initval)
737 (c_parser_statement_after_labels, c_parser_switch_statement)
738 (c_parser_for_statement, c_parser_expr_no_commas)
739 (c_parser_conditional_expression, c_parser_binary_expression)
740 (c_parser_cast_expression, c_parser_unary_expression)
741 (c_parser_postfix_expression)
742 (c_parser_postfix_expression_after_primary, c_parser_expression):
743 Use convert_lvalue_to_rvalue.
744 (c_parser_expression_conv, c_parser_expr_list): Document
745 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
746 (c_parser_objc_synchronized_statement): Use
747 convert_lvalue_to_rvalue.
748 (c_parser_objc_selector): Handle RID_ATOMIC.
749 (c_parser_objc_receiver, c_parser_array_notation): Use
750 convert_lvalue_to_rvalue.
751 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
753 (struct c_declspecs): Add atomic_p field.
754 (convert_lvalue_to_rvalue): Declare.
755 * c-typeck.c (c_type_promotes_to): Promote atomic types to
756 corresponding atomic types.
757 (qualify_type): Don't add _Atomic qualifiers from second argument.
758 (comp_target_types): Do not allow _Atomic mismatches.
759 (type_lists_compatible_p): Do not remove atomic qualifiers when
761 (really_atomic_lvalue, convert_lvalue_to_rvalue)
762 (build_atomic_assign): New functions.
763 (build_unary_op): Use build_atomic_assign for atomic increment and
765 (build_conditional_expr): Do not treat _Atomic void as a qualified
767 (build_modify_expr): Use build_atomic_assign for atomic LHS.
768 (find_anonymous_field_with_type, convert_to_anonymous_field)
769 (convert_for_assignment): Do not remove atomic qualifiers when
771 (digest_init): Do not accept initialization of arrays of atomic
772 elements by string constants.
773 (build_asm_expr): Use convert_lvalue_to_rvalue.
774 (build_binary_op): Do not treat _Atomic void as a qualified
777 2013-11-06 DJ Delorie <dj@redhat.com>
779 * c-decl.c (locate_old_decl): If a previous conflicting decl is
780 both explicit and builtin, print the location of the explicit one.
782 2013-11-05 Tobias Burnus <burnus@net-b.de>
784 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
785 c_parser_omp_distribute, c_parser_omp_teams,
786 c_parser_omp_target, c_parser_omp_declare): Handle
789 2013-11-03 Marek Polacek <polacek@redhat.com>
791 * c-decl.c (grokdeclarator): Add VLA instrumentation.
793 2013-11-01 Jakub Jelinek <jakub@redhat.com>
795 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
796 check_dup_generic at the end, unless remove is true.
797 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
799 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
801 2013-10-31 Jakub Jelinek <jakub@redhat.com>
803 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
804 with decl that is not pointer nor array.
806 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
808 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
809 a spawning function is found.
810 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
811 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
812 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
813 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
815 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
816 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
818 (c_finish_return): Added a check to reject _Cilk_spawn in return
820 (build_cilk_spawn): New function.
821 (build_cilk_sync): Likewise.
822 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
824 2013-10-27 Tobias Burnus <burnus@net-b.de>
827 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
828 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
829 (c_parser_statement_after_labels): Update calls.
831 2013-10-24 Tobias Burnus <burnus@net-b.de>
834 * c-parser.c (c_parser_pragma, c_parser_for_statement):
836 (c_parser_statement_after_labels): Update call.
838 2013-10-24 Marek Polacek <polacek@redhat.com>
840 * c-parser.c (c_parser_struct_declaration): Add a comment.
841 (c_parser_declarator): Don't allow _Alignas here.
843 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
845 * c-parser.c: Include omp-low.h.
846 * c-typeck.c: Likewise.
848 2013-10-17 Marek Polacek <polacek@redhat.com>
851 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
852 Document syntax of the array-declarator.
853 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
855 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
856 (c_parser_struct_declaration): Likewise.
857 (c_parser_declarator): Likewise.
858 (c_parser_direct_declarator_inner): Likewise.
859 (c_parser_parameter_declaration): Likewise.
860 (c_parser_type_name): Likewise.
862 2013-10-11 Jakub Jelinek <jakub@redhat.com>
864 * c-lang.h (current_omp_declare_target_attribute): New extern
866 * c-parser.c: Include c-lang.h.
867 (struct c_parser): Change tokens to c_token *.
868 Add tokens_buf field. Change tokens_avail type to unsigned int.
869 (c_parser_consume_token): If parser->tokens isn't
870 &parser->tokens_buf[0], increment parser->tokens.
871 (c_parser_consume_pragma): Likewise.
872 (enum pragma_context): Add pragma_struct and pragma_param.
873 (c_parser_external_declaration): Adjust
874 c_parser_declaration_or_fndef caller.
875 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
876 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
877 Adjust recursive call.
878 (c_parser_struct_or_union_specifier): Use pragma_struct instead
880 (c_parser_parameter_declaration): Use pragma_param instead of
882 (c_parser_compound_statement_nostart, c_parser_label,
883 c_parser_for_statement): Adjust
884 c_parser_declaration_or_fndef callers.
885 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
886 it through to c_parser_conditional_expression.
887 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
888 pass it through to c_parser_binary_expression. Adjust recursive
890 (c_parser_binary_expression): Remove prec argument, add
891 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
892 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
893 binop matches it, use build2 instead of parser_build_binary_op.
894 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
895 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
896 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
897 Handle pragma_struct and pragma_param the same as pragma_external.
898 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
899 (c_parser_omp_variable_list): Parse array sections for
900 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
901 (c_parser_omp_clause_collapse): Fully fold collapse expression.
902 (c_parser_omp_clause_reduction): Handle user defined reductions.
903 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
904 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
905 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
906 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
907 c_parser_omp_clause_depend, c_parser_omp_clause_map,
908 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
909 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
910 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
911 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
912 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
913 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
914 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
915 (c_parser_omp_for_loop): Add CODE argument, pass it through
916 to c_finish_omp_for. Change last argument to cclauses,
917 and adjust uses to grab parallel clauses from the array of all
918 the split clauses. Adjust c_parser_binary_expression,
919 c_parser_declaration_or_fndef and c_finish_omp_for callers.
920 (omp_split_clauses): New function.
921 (c_parser_omp_simd): New function.
922 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
923 Allow the function to be called also when parsing combined constructs,
924 and call c_parser_omp_simd when parsing for simd.
925 (c_parser_omp_sections_scope): If section-sequence doesn't start with
926 #pragma omp section, require exactly one structured-block instead of
927 sequence of statements.
928 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
929 Allow the function to be called also when parsing combined constructs.
930 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
931 Allow the function to be called also when parsing combined
933 (c_parser_omp_taskgroup, c_parser_omp_cancel,
934 c_parser_omp_cancellation_point, c_parser_omp_distribute,
935 c_parser_omp_teams, c_parser_omp_target_data,
936 c_parser_omp_target_update, c_parser_omp_target,
937 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
938 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
939 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
940 (c_parser_omp_construct): Add p_name and mask vars. Handle
941 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
942 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
943 and c_parser_omp_sections callers.
944 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
945 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
946 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
947 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
948 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
950 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
951 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
952 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
953 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
954 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
955 * c-typeck.c: Include tree-inline.h.
956 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
957 handle_omp_array_sections_1, handle_omp_array_sections,
958 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
959 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
960 user defined reductions.
961 (c_tree_equal): New function.
962 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
963 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
964 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
965 c_check_omp_declare_reduction_r): New prototypes.
966 * c-decl.c (current_omp_declare_target_attribute): New variable.
967 (c_decl_attributes): New function.
968 (start_decl, start_function): Use it instead of decl_attributes.
969 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
970 c_omp_reduction_decl, c_omp_reduction_lookup,
971 c_check_omp_declare_reduction_r): New functions.
973 2013-09-25 Tom Tromey <tromey@redhat.com>
975 * Make-lang.in (c/gccspec.o): Remove.
976 (CFLAGS-c/gccspec.o): New variable.
977 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
978 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
979 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
981 2013-09-25 Tom Tromey <tromey@redhat.com>
983 * Make-lang.in (c/gccspec.o): Don't use subshell.
985 2013-09-18 Marek Polacek <polacek@redhat.com>
988 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
989 Remove unnecessary check.
991 2013-09-18 Marek Polacek <polacek@redhat.com>
994 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
995 no_sanitize_undefined attribute.
997 2013-09-13 Kai Tietz <ktietz@redhat.com>
1000 * c-decl.c (c_builtin_function_ext_scope): Remove
1001 wrong assumption that it is never called on prexisting
1004 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1006 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1008 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1010 * c-objc-common.c (c_tree_printer): Tidy.
1012 2013-08-30 Marek Polacek <polacek@redhat.com>
1014 * c-typeck.c (build_binary_op): Add division by zero and shift
1017 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
1018 Joseph Myers <joseph@codesourcery.com>
1021 * c-typeck.c (c_common_type): Prefer double_type_node over
1022 other REAL_TYPE types with the same precision.
1023 (convert_arguments): Likewise.
1025 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1027 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1028 (c_initialize_diagnostics): Call a destructor for the early printer.
1030 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1032 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1033 printer initialization.
1035 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1038 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1039 check for truth values.
1040 (expand_array_notation_exprs): Added truth values case. Removed an
1041 unwanted else. Added for-loop to walk through subtrees in default
1044 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1046 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1048 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1050 * c-parser.c (struct c_generic_association): Fix typo.
1052 2013-07-23 Tom Tromey <tromey@redhat.com>
1053 Joseph Myers <joseph@codesourcery.com>
1055 * c-parser.c (struct c_generic_association): New.
1056 (c_generic_association_d): New typedef.
1057 (c_parser_generic_selection): New function.
1058 (c_parser_postfix_expression): Handle RID_GENERIC.
1060 2013-07-13 Jason Merrill <jason@redhat.com>
1063 * c-decl.c (finish_struct): Check for too-large class.
1065 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1068 * c-typeck.c (set_init_index): When folding, check for index overflow.
1070 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1072 * c-parser.c (c_parser_array_notation): Removed rejection of array
1073 notations in an array of function pointers.
1075 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1077 * c-array-notation.c (make_triplet_val_inv): New function.
1078 (create_cmp_incr): Likewise.
1079 (create_array_refs): Likewise.
1080 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1081 Also modularized common parts between functions and called the function.
1082 (build_array_notation_expr): Likewise.
1083 (fix_conditional_array_notations_1): Likewise.
1084 (fix_array_notation_expr): Likewise.
1085 (fix_array_notation_call_expr): Likewise.
1087 2013-06-18 Marek Polacek <polacek@redhat.com>
1090 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1092 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1094 * c-array-notation.c (build_array_notation_expr): Reject array notation
1095 mismatch between LHS and RHS even inside a call_expr. Also, removed
1096 a couple while statements that were dead code.
1098 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1100 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1101 excessive precision expressions in function parameters. Also removed
1102 couple unwanted while statements.
1104 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1106 * c-array-notation.c (expand_array_notation_exprs): Added
1107 ARRAY_NOTATION_REF case.
1109 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1111 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1112 function to c-family/array-notation-common.c.
1113 (is_cilkplus_reduce_builtin): Likewise.
1114 (find_rank): Likewise.
1115 (extract_array_notation_exprs): Likewise.
1116 (replace_array_notations): Likewise.
1117 (find_inv_trees): Likewise.
1118 (replace_inv_trees): Likewise.
1119 (contains_array_notation_expr): Likewise.
1120 (find_correct_array_notation_type): Likewise.
1121 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1122 (struct inv_list): Moved this to c-family/array-notation-common.c.
1123 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1125 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1127 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1128 reduction functions outside the for-loop. Added a check if the fundecl
1129 is non-NULL. Finally, removed an unwanted if-statement, and made the
1132 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1134 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1135 condition of the if-statement matches the rank of else-block and then-
1136 block when array notations are used.
1137 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1138 expression after the entire function body is parsed.
1139 (c_parser_expr_no_commas): Delayed creating array notation expressions
1140 to the end of function parsing.
1141 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1142 whole if-statement instead of just the condition.
1143 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1145 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1148 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1149 array to NULL_TREE if they are unused. Also added a check for the
1150 field to be NULL before its fields are used in future.
1152 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1155 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1156 (build_array_notation_expr): Likewise.
1158 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1160 * c-typeck.c (build_array_ref): Added a check to see if array's
1161 index is greater than one. If true, then emit an error.
1162 (build_function_call_vec): Exclude error reporting and checking
1163 for builtin array-notation functions.
1164 (convert_arguments): Likewise.
1165 (c_finish_return): Added a check for array notations as a return
1166 expression. If true, then emit an error.
1167 (c_finish_loop): Added a check for array notations in a loop
1168 condition. If true then emit an error.
1169 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1170 (build_binary_op): Added a check for array notation expr inside
1171 op1 and op0. If present, we call another function to find correct
1173 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1174 * c-parser.c (c_parser_compound_statement): Check if array
1175 notation code is used in tree, if so, then transform them into
1177 (c_parser_expr_no_commas): Check if array notation is used in LHS
1178 or RHS, if so, then build array notation expression instead of
1180 (c_parser_postfix_expression_after_primary): Added a check for
1181 colon(s) after square braces, if so then handle it like an array
1182 notation. Also, break up array notations in unary op if found.
1183 (c_parser_direct_declarator_inner): Added a check for array
1185 (c_parser_compound_statement): Added a check for array notation in
1186 a stmt. If one is present, then expand array notation expr.
1187 (c_parser_if_statement): Likewise.
1188 (c_parser_switch_statement): Added a check for array notations in
1189 a switch statement's condition. If true, then output an error.
1190 (c_parser_while_statement): Similarly, but for a while.
1191 (c_parser_do_statement): Similarly, but for a do-while.
1192 (c_parser_for_statement): Similarly, but for a for-loop.
1193 (c_parser_unary_expression): Check if array notation is used in a
1194 pre-increment or pre-decrement expression. If true, then expand
1196 (c_parser_array_notation): New function.
1197 * c-array-notation.c: New file.
1198 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1200 2013-05-23 Mike Stump <mikestump@comcast.net>
1202 * c-typeck.c (convert_for_assignment): Handle references to memory
1205 2013-05-16 Jason Merrill <jason@redhat.com>
1207 * Make-lang.in (cc1$(exeext)): Use link mutex.
1209 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1211 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1212 to simply use OPT_Wpointer_arith.
1213 (build_unary_op): Likewise.
1215 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1218 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1219 argument. If set, or it temporarily for parsing of the first
1220 argument into force_folding_builtin_constant_p.
1221 (c_parser_postfix_expression): Adjust callers.
1223 2013-03-21 Richard Biener <rguenther@suse.de>
1225 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1226 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1228 2013-02-12 Marek Polacek <polacek@redhat.com>
1231 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1234 2013-01-24 Jakub Jelinek <jakub@redhat.com>
1237 * c-typeck.c (set_nonincremental_init_from_string): If
1238 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1240 (process_init_element): Likewise.
1242 2012-12-20 Jakub Jelinek <jakub@redhat.com>
1245 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1246 argument, don't call default_function_array_conversion
1247 nor c_fully_fold here.
1248 (c_parser_asm_statement): Adjust callers.
1249 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1250 and outputs here, and call default_function_array_conversion
1251 on inputs that don't need to be addressable.
1253 2012-12-18 Jakub Jelinek <jakub@redhat.com>
1256 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1257 warning require that both c_common_unsigned_type as well as
1258 c_common_signed_type is the same for both mvl and mvr types.
1260 2012-11-16 Diego Novillo <dnovillo@google.com>
1262 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1264 * c-common.c: Use new vec API in vec.h.
1265 * c-common.h: Likewise.
1266 * c-gimplify.c: Likewise.
1267 * c-pragma.c: Likewise.
1268 * c-pretty-print.c: Likewise.
1269 * c-pretty-print.h: Likewise.
1270 * c-semantics.c: Likewise.
1271 * c-decl.c: Likewise.
1272 * c-parser.c: Likewise.
1273 * c-tree.h: Likewise.
1274 * c-typeck.c: Likewise.
1276 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1279 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1281 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1284 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1285 shadows a function, unless the variable is a function or a
1286 pointer-to-function.
1288 2012-10-12 Jakub Jelinek <jakub@redhat.com>
1291 * c-parser.c (struct c_tree_loc_pair): Removed.
1292 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1293 add location_t * and tree * arguments, fill in array of 3
1294 sizeof_arg trees and corresponding locs.
1295 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1296 c_parser_expr_list callers.
1297 (c_parser_postfix_expression_after_primary): Likewise. Pass
1298 array of 3 sizeof_arg trees and locs (corresponding to first
1299 3 arguments) to sizeof_pointer_memaccess_warning.
1301 2012-10-09 Lawrence Crowl <crowl@google.com>
1303 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1304 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1307 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1310 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1313 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
1316 * c-typeck.c: Include c-common.h.
1317 (enum stv_conv): Moved to c-common.h.
1318 (scalar_to_vector): Moved to c-common.c.
1319 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1320 * Make-lang.in: c-typeck.c depends on c-common.h.
1322 2012-10-04 Arnaud Charlet <charlet@adacore.com>
1324 * c-decl.c (c_write_global_declarations): Fix handling of
1327 2012-09-30 Sharad Singhai <singhai@google.com>
1329 * c-decl.c (c_write_global_declarations): Use a different method
1330 to determine if the dump has ben initialized.
1332 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1335 * c-typeck.c (c_cast_expr): When casting to a type requiring
1336 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1339 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1342 * c-typeck.c (build_unary_op): Pass original argument of
1343 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1344 any C_MAYBE_CONST_EXPR, if it has integer operands.
1345 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1346 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1347 to c_objc_common_truthvalue_conversion, then remove any
1348 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1349 c_objc_common_truthvalue_conversion not
1350 c_common_truthvalue_conversion.
1351 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1352 call note_integer_operands for arguments with integer operands
1353 that are not integer constants.
1355 2012-09-13 Jakub Jelinek <jakub@redhat.com>
1358 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1359 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1361 2012-08-31 Jakub Jelinek <jakub@redhat.com>
1364 * c-convert.c (convert): Don't call fold_convert_loc if
1365 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1366 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1367 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1369 2012-08-24 Jakub Jelinek <jakub@redhat.com>
1372 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1373 for nested and empty_ok arguments in the call to
1374 c_parser_declaration_or_fndef.
1376 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1378 * c-tree.h (c_last_sizeof_arg): Declare.
1379 * c-parser.c (struct c_tree_loc_pair): New type.
1380 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1382 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1383 (c_parser_postfix_expression_after_primary): Likewise. Call
1384 sizeof_pointer_memaccess_warning if needed.
1385 (sizeof_ptr_memacc_comptypes): New function.
1386 * c-typeck.c (c_last_sizeof_arg): New global variable.
1387 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1389 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1391 * c-lang.h (lang_decl): Add variable_size GTY option.
1393 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1395 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1396 * Make-lang.in: Fix dependencies.
1398 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1400 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1401 and add language Makefile hooks.
1402 * config-lang.in: New file.
1403 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1404 add the required "normal" config-lang.in rules.
1405 * c-lang.h: Moved from gcc/ to here.
1406 * c-tree.h: Likewise.
1407 * c-objc-common.c: Likewise.
1408 * c-objc-common.h: Likewise.
1409 * c-typeck.c: Likewise.
1410 * c-convert.c: Likewise.
1411 * c-lang.c: Likewise.
1412 * c-aux-info.c: Likewise.
1413 * c-errors.c: Likewise.
1414 * gccspec.c: Likewise.
1415 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1416 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1418 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1420 Copying and distribution of this file, with or without modification,
1421 are permitted in any medium without royalty provided the copyright
1422 notice and this notice are preserved.