PR target/61794
[official-gcc.git] / gcc / c / ChangeLog
blob260aa082a3c58205f8c9661671fbde6fdc388c97
1 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
3         PR middle-end/61294
4         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5         If non-NULL, call c_parser_check_literal_zero.
6         (c_parser_check_literal_zero): New function.
7         (c_parser_postfix_expression_after_primary): Adjust
8         c_parser_expr_list caller, handle -Wmemset-transposed-args.
10 2014-07-06  Marek Polacek  <polacek@redhat.com>
12         PR c/6940
13         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
14         * c-tree.h (C_ARRAY_PARAMETER): Define.
15         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
16         function parameter.
18 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
19             Chen Gang <gang.chen.5i5j@gmail.com>
21         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
22         releasing symbol.
24 2014-07-01  Marek Polacek  <polacek@redhat.com>
26         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
27         instead of 0 to WARN_FOR_ASSIGNMENT.
29 2014-07-01  Marek Polacek  <polacek@redhat.com>
31         PR c/58286
32         * c-typeck.c (convert_for_assignment): Pass
33         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
35 2014-06-30  Marek Polacek  <polacek@redhat.com>
37         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
38         has no_sanitize_undefined attribute.
40 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
42         PR middle-end/57541
43         * c-array-notation.c (fix_builtin_array_notation_fn):
44         Check for 0 arguments in builtin call. Check that bultin argument is
45         correct.
46         * c-parser.c (c_parser_array_notation): Check for incorrect initial
47         index.
49 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
51         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
52         qualifiers in __auto_type for atomic types.
53         (c_parser_typeof_specifier): Discard all type qualifiers in
54         __typeof__ for atomic types.
56 2014-06-25  Marek Polacek  <polacek@redhat.com>
58         PR c/61162
59         * c-parser.c (c_parser_statement_after_labels): Pass the location of
60         the return expression to c_finish_return.
62 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
64         * c-typeck.c (c_finish_omp_clauses): Make sure
65         OMP_CLAUSE_LINEAR_STEP has correct type.
67 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
69         * c-decl.c: Adjust.
71 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
73         * c-parser.c (c_parser_omp_for_loop): For
74         #pragma omp parallel for simd move lastprivate clause from parallel
75         to for rather than simd.
77 2014-06-23  Marek Polacek  <polacek@redhat.com>
79         * c-typeck.c (parser_build_binary_op): Don't call
80         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
82 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
84         * c-parser.c (c_parser_omp_threadprivate): Likewise.
85         * c-decl.c (merge_decls): Likewise.
87 2014-06-09  Marek Polacek  <polacek@redhat.com>
89         PR c/36446
90         * c-typeck.c (error_init): Call inform instead of error_at.
91         (pedwarn_init): Call inform instead of pedwarn.
92         (warning_init): Call inform instead of warning_at.
94 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
96         * c-decl.c (merge_decls): Use set_decl_section_name.
97         (duplicate_decls): Remove node if it exists.
99 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
101         PR c/53119
102         * c-typeck.c (push_init_level, process_init_element,
103         pop_init_level): Correct check for zero initialization, move
104         missing brace warning to respect zero initialization.
106 2014-06-05  Marek Polacek  <polacek@redhat.com>
108         PR c/56724
109         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
111 2014-06-05  Marek Polacek  <polacek@redhat.com>
113         PR c/49706
114         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
115         on the left hand side operand of a comparison. 
117 2014-06-05  Marek Polacek  <polacek@redhat.com>
119         PR c/48062
120         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
121         Print note only if the warning was printed.
123 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
125         PR c/58942
126         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
127         with a pointer.
129 2014-06-03  Marek Polacek  <polacek@redhat.com>
131         PR c/60439
132         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
133         c_start_case.
134         * c-tree.h (c_start_case): Update.
135         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
136         switch condition has boolean value.
138 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
140         * c-decl.c: Include builtins.h.
141         * c-parser.c: Likewise.
143 2014-05-27  Marek Polacek  <polacek@redhat.com>
145         PR c/56724
146         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
147         error and warning calls to error_at and warning_at.  Pass location of
148         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
149         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
150         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
152 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
154         PR c/61191
155         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
156         function parameters.
158 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
160         * c-decl.c (merge_decls): Preserve symtab node pointers.
161         (duplicate_decls): Free new decl.
163 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
165         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
166         initialization.
168         * c-parser.c (c_parser_omp_target): Return bool values.
170 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
172         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
173         num_teams_loc variable to num_thread_limit_loc.
175 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
177         * c-array-notation.c (expand_array_notations): Use void_node
178         instead of void_zero_node.
180 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
182         * c-decl.c (finish_struct): Adjust.
183         (finish_enum): Likewise.
184         (bind): Adjust.
185         (record_inline_static): Likewise.
186         (push_scope): Likewise.
187         (make_label): Likewise.
188         (lookup_label_for_goto): Likewise.
189         (finish_struct): Likewise.
190         (finish_enum): Likewise.
191         (store_parm_decls): Likewise.
192         (c_push_function_context): Likewise.
193         * c-lang.h: Remove usage of variable_size gty attribute.
194         * c-parser.c (c_parse_init): Adjust.
195         (c_parse_file): Likewise.
197 2014-05-13  Marek Polacek  <polacek@redhat.com>
199         PR c/61162
200         * c-typeck.c (convert_for_assignment): Pass location to
201         WARN_FOR_ASSIGNMENT instead of input_location.
203 2014-05-10  Marek Polacek  <polacek@redhat.com>
205         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
206         maybe_warn_string_init.
207         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
208         maybe_warn_string_init.
209         * c-tree.h (maybe_warn_string_init): Update declaration.
210         * c-typeck.c (maybe_warn_string_init): Add location parameter.
211         Call pedwarn_init with loc instead of with input_location.
212         (digest_init): Pass init_loc to maybe_warn_string_init.
213         (pop_init_level): Call pedwarn_init with loc instead of with
214         input_location.
215         (set_init_index): Likewise.
216         (process_init_element): Likewise.
218 2014-05-09  Marek Polacek  <polacek@redhat.com>
220         PR c/61096
221         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
222         (c_parser_initelt): Pass location to set_init_label.  Pass array index
223         location to set_init_index.
224         * c-tree.h (push_init_level): Update declaration.
225         (pop_init_level): Likewise.
226         (set_init_index): Likewise.
227         (set_init_label): Likewise.
228         * c-typeck.c (error_init): Add location parameter.  Call error_at
229         instead of error.
230         (digest_init): Pass init_loc to error_init.
231         (really_start_incremental_init):
232         (push_init_level): Add location parameter.  Pass loc to pop_init_level
233         and error_init.
234         (pop_init_level): Likewise.
235         (set_designator): Add location parameter.  Pass loc to pop_init_level,
236         push_init_level, and error_init.
237         (set_init_index): Add location parameter.  Pass loc to error_init and
238         set_designator.
239         (set_init_label): Likewise.
240         (output_init_element): Pass loc to error_init.
241         (process_init_element): Pass loc to error_init, pop_init_level,
242         pedwarn_init, and push_init_level.
244 2014-05-09  Marek Polacek  <polacek@redhat.com>
246         PR c/50459
247         * c-parser.c (c_parser_attributes): Parse the arguments as an
248         expression-list if the attribute takes identifier.
250 2014-05-08  Marek Polacek  <polacek@redhat.com>
252         PR c/61053
253         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
254         TYPE_ALIGN_UNIT.
256 2014-05-08  Marek Polacek  <polacek@redhat.com>
258         PR c/61077
259         * c-decl.c (start_function): Warn for _Atomic-qualified return type
260         of main.
262 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
263             Mike Stump  <mikestump@comcast.net>
264             Richard Sandiford  <rdsandiford@googlemail.com>
266         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
267         (finish_enum): Use wide-int interfaces.
268         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
269         * c-typeck.c (build_c_cast): Likewise.
270         (set_nonincremental_init_from_string): Likewise.
271         (c_tree_equal): Likewise.
273 2014-05-02  Marek Polacek  <polacek@redhat.com>
275         PR c/25801
276         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
277         Return size_one_node when the type is not complete.
278         (pointer_diff): Remove comment.
279         (build_unary_op): Improve error messages.
281 2014-05-02  Marek Polacek  <polacek@redhat.com>
283         * c-typeck.c (c_finish_return): Separate warning_at calls.
285 2014-05-02  Marek Polacek  <polacek@redhat.com>
287         * c-tree.h (error_init): Remove declaration.
288         (pedwarn_init): Likewise.
289         * c-typeck.c (error_init): Make static and move above.
290         (pedwarn_init): Likewise.
291         (warning_init): Move above.
292         (maybe_warn_string_init): Likewise.
294 2014-05-01  Jeff Law  <law@redhat.com>
296         Revert:
298         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
299         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
300         avoid goto.
302 2014-05-02  Marek Polacek  <polacek@redhat.com>
304         PR c/60784
305         * c-typeck.c (push_init_level): Set constructor_designated to
306         p->designated for structures.
308 2014-05-01  Marek Polacek  <polacek@redhat.com>
310         PR c/60915
311         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
312         function-definition has an attribute after the declarator.
314 2014-05-01  Marek Polacek  <polacek@redhat.com>
316         PR c/60257
317         * c-typeck.c (warning_init): Add location_t parameter.  Call
318         warning_at instead of warning.
319         (push_init_level): Pass input_location to warning_init.
320         (add_pending_init): Add location_t parameter.  Pass loc to
321         warning_init.
322         (set_nonincremental_init): Pass input_location to add_pending_init.
323         (set_nonincremental_init_from_string): Likewise.
324         (output_init_element): Pass loc to warning_init and to
325         add_pending_init.
327 2014-05-01  Marek Polacek  <polacek@redhat.com>
329         PR c/43395
330         * c-typeck.c (c_finish_return): Distinguish between label and variable
331         when warning about returning local address.
333 2014-05-01  Marek Polacek  <polacek@redhat.com>
335         PR c/29467
336         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
337         in C89 mode.
339 2014-05-01  Marek Polacek  <polacek@redhat.com>
341         PR c/43245
342         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
343         instead of 0 to WARN_FOR_QUALIFIERS.
345 2014-05-01  Marek Polacek  <polacek@redhat.com>
347         PR c/56989
348         * c-typeck.c (default_conversion): Use better location for
349         error call.
351 2014-04-30  Marek Polacek  <polacek@redhat.com>
353         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
354         also when SANITIZE_FLOAT_DIVIDE is on.
356 2014-04-30  Marek Polacek  <polacek@redhat.com>
358         PR c/60139
359         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
360         and pedwarn_init.  Use loc insted of input_location.
362 2014-04-30  Marek Polacek  <polacek@redhat.com>
364         PR c/60351
365         * c-typeck.c (build_binary_op): Use location when warning about
366         shift count.
368 2014-04-25  Marek Polacek  <polacek@redhat.com>
370         PR c/18079
371         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
372         always_inline/noinline and hot/cold attributes.
374 2014-04-25  Marek Polacek  <polacek@redhat.com>
376         PR c/60114
377         * c-parser.c (c_parser_initelt): Pass input_location to
378         process_init_element.
379         (c_parser_initval): Pass loc to process_init_element.
380         * c-tree.h (process_init_element): Adjust declaration.
381         * c-typeck.c (push_init_level): Pass input_location to
382         process_init_element.
383         (pop_init_level): Likewise.
384         (set_designator): Likewise.
385         (output_init_element): Add location_t parameter.  Pass loc to
386         digest_init.
387         (output_pending_init_elements): Pass input_location to
388         output_init_element.
389         (process_init_element): Add location_t parameter.  Pass loc to
390         output_init_element.
392 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
394         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
395         atomic-clause, allow comma in between atomic-clause and
396         seq_cst.
398 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
400         PR c/59073
401         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
402         fails, don't set OM_PARALLEL_COMBINED and return NULL.
404 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
406         PR middle-end/60469
407         * c-array-notation.c (fix_builtin_array_notation_fn): Use
408         create_tmp_var instead build_decl for creating temps.
409         (build_array_notation_expr): Likewise.
410         (fix_conditional_array_notations_1): Likewise.
411         (fix_array_notation_expr): Likewise.
412         (fix_array_notation_call_expr): Likewise.
414 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
416         PR c++/60689
417         * c-tree.h (c_build_function_call_vec): New prototype.
418         * c-typeck.c (build_function_call_vec): Don't call
419         resolve_overloaded_builtin here.
420         (c_build_function_call_vec): New wrapper function around
421         build_function_call_vec.  Call resolve_overloaded_builtin here.
422         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
423         Call c_build_function_call_vec instead of build_function_call_vec.
424         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
425         * c-decl.c (finish_decl): Likewise.
427 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
429         PR c/55383
430         * c-typeck.c: Use correct format string in cast-qual warning
432 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
434         * c-decl.c (c_decl_attributes): Use
435         lang_hooks.types.omp_mappable_type.
436         * c-typeck.c (c_finish_omp_clauses): Likewise.
438 2014-03-06  Marek Polacek  <polacek@redhat.com>
440         PR c/60197
441         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
442         of checking tree code.
444 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
446         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
447         (c_parser_parameter_declaration): Likewise.
449 2014-02-19  Marek Polacek  <polacek@redhat.com>
451         PR c/60195
452         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
453         Call mark_exp_read on exp.value.
454         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
455         TREE_ADDRESSABLE on old instead of val.
456         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
458 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
460         * c-parser.c (c_parser_get_builtin_args): Replace calls to
461         C_EXPR_APPEND by vec_safe_push.
462         * c-tree.h (C_EXPR_APPEND): Remove.
464 2014-01-31  Marek Polacek  <polacek@redhat.com>
466         PR c/59963
467         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
468         build_function_call_vec.
469         (build_function_call): Likewise.
470         (build_atomic_assign): Likewise.
471         (build_function_call_vec): Add arg_loc parameter.  Use it.
472         (convert_arguments): Likewise.
473         (convert_for_assignment): Rename rhs_loc to expr_loc.
474         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
475         (c_parser_objc_keywordexpr): Likewise.
476         (c_parser_postfix_expression_after_primary): Call
477         build_function_call_vec with expr_loc rather than op_loc.
478         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
479         build_function_call_vec.
480         (c_parser_expr_list): Add locations parameter.  Fill it with locations
481         of function arguments.
482         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
484 2014-01-30  Marek Polacek  <polacek@redhat.com>
486         PR c/59940
487         * c-typeck.c (build_function_call_vec): Use loc parameter.
488         (convert_arguments): Add location parameter.  Use it.
489         (ep_convert_and_check): Likewise.
490         (build_atomic_assign): Adjust convert_for_assignment call.
491         (build_modify_expr): Likewise.
492         (digest_init): Likewise.
493         (c_finish_return): Likewise.
494         (build_conditional_expr): Adjust ep_convert_and_check calls.
495         (convert_for_assignment): Add rhs_loc parameter.  Use it.
496         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
497         calls.
499 2014-01-30  Richard Biener  <rguenther@suse.de>
501         PR c/59905
502         * c-typeck.c (build_function_call_vec): Do not replace calls
503         to a function via an incompatible type with a runtime abort.
505 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
507         * c-parser.c (c_parser_declaration_or_fndef): Replaced
508         flag_enable_cilkplus with flag_cilkplus.
509         (c_parser_direct_declarator_inner): Likewise.
510         (c_parser_attribute_any_word): Likewise.
511         (c_parser_attributes): Likewise.
512         (c_parser_compound_statement): Likewise.
513         (c_parser_statement_after_labels): Likewise.
514         (c_parser_if_statement): Likewise.
515         (c_parser_switch_statement): Likewise.
516         (c_parser_do_statement): Likewise.
517         (c_parser_for_statement): Likewise.
518         (c_parser_unary_expression): Likewise.
519         (c_parser_postfix_expression): Likewise.
520         (c_parser_postfix_expression_after_primary): Likewise.
521         (c_parser_postfix_expression_after_primary): Likewise.
522         (c_parser_omp_clause_name): Likewise.
523         (c_finish_omp_declare_simd): Likewise.
524         (c_parser_cilk_verify_simd): Likewise.
525         * c-typeck.c (build_array_ref): Likewise.
526         (build_function_call_vec): Likewise.
527         (convert_arguments): Likewise.
528         (build_compound_expr): Likewise.
529         (c_finish_return): Likewise.
530         (c_finish_if_stmt): Likewise.
531         (c_finish_loop): Likewise.
532         (build_binary_op): Likewise.
534 2014-01-23  Marek Polacek  <polacek@redhat.com>
536         PR c/59846
537         * c-typeck.c (parser_build_binary_op): Use location instead of
538         input_location.
539         (build_binary_op): Pass location to shorten_compare.
541 2014-01-23  Marek Polacek  <polacek@redhat.com>
543         PR c/58346
544         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
545         an empty aggregate.
547 2014-01-23  Marek Polacek  <polacek@redhat.com>
549         PR c/59871
550         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
551         of a comma expression.
552         (emit_side_effect_warnings): Likewise.
554 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
556         PR c/59825
557         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
558         function to use walk_tree and moved a lot of its functionality to
559         expand_array_notations.
560         (expand_array_notations): New function.
562 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
564         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
565         attribute an attribute without value.
567 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
569         PR middle-end/58809
570         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
571         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
573 2014-01-22  Marek Polacek  <polacek@redhat.com>
575         PR c/59891
576         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
577         of remove_c_maybe_const_expr on op1 and op2.
579 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
581         PR c/58943
582         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
583         effects, preevaluate rhs using SAVE_EXPR first.
585 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
587         PR c++/59631
588         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
589         statements with if-elseif statements.
591 2014-01-06  Marek Polacek  <polacek@redhat.com>
593         PR c/57773
594         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
595         defined bit-field types only in ISO C.
597 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
599         Update copyright years
601 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
603         * c-array-notation.c: Use the standard form for the copyright notice.
605 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
607         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
608         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
609         field in parser is not empty.  If not-empty, call the function
610         c_parser_finish_omp_declare_simd.
611         (c_parser_cilk_clause_vectorlength): Modified function to be shared
612         between SIMD-enabled functions and #pragma simd.  Added new parameter.
613         (c_parser_cilk_all_clauses): Modified the usage of the function
614         c_parser_cilk_clause_vectorlength as mentioned above.
615         (c_parser_cilk_simd_fn_vector_attrs): New function.
616         (c_finish_cilk_simd_fn_tokens): Likewise.
617         (is_cilkplus_vector_p): Likewise.
618         (c_parser_omp_clause_name): Added checking for "vectorlength,"
619         "nomask," and "mask" strings in clause name.
620         (c_parser_omp_all_clauses): Added 3 new case statements:
621         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
622         PRAGMA_CILK_CLAUSE_NOMASK.
623         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
624         check for vector attribute and if so call the function
625         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
626         called the function c_finish_cilk_simd_fn_tokens.
627         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
628         parser field is non-empty.  If so, parse them as you would parse
629         the omp declare simd pragma.
630         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
631         Added a check when step is a parameter and flag it as error.
632         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
633         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
634         pragma_omp_clause.
636 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
638         * c-parser.c (c_parser_omp_parallel): Fix description.
640 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
642         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
643         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
644         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
645         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
647 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
649         PR c/52023
650         * c-parser.c (c_parser_alignas_specifier): Use
651         c_sizeof_or_alignof_type instead of c_alignof.
652         (c_parser_alignof_expression): Likewise, with min_alignof
653         parameter depending on alignof spelling used.
655 2013-12-04  Marek Polacek  <polacek@redhat.com>
657         PR c/54113
658         * c-decl.c (start_function): Don't warn for missing prototype for
659         inline functions.
661 2013-12-03  Marek Polacek  <polacek@redhat.com>
663         PR c/59351
664         * c-decl.c (build_compound_literal): Allow compound literals with
665         empty initial value.
667 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
669         PR c/58235
670         * c-typeck.c (build_modify_expr): Diagnose assignment to
671         expression with array type.
673 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
675         PR c/42262
676         * c-typeck.c (process_init_element): Do not treat a string as
677         initializing a whole array when used with a designator for an
678         individual element.
680 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
682         PR c/57574
683         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
684         an inline function following a static declaration.
686 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
688         PR c/59310
689         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
690         to p_name before calling c_parser_omp_teams instead of after.
691         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
692         argument.  Remove unused p_name variable.
694 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
695             Jakub Jelinek  <jakub@redhat.com>
697         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
698         external_scope is NULL.
700 2013-11-27  Tom de Vries  <tom@codesourcery.com>
701             Marc Glisse  <marc.glisse@inria.fr>
703         PR c++/59032
704         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
706 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
708         * c-typeck.c: Add required include files from gimple.h.
710 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
712         * c-decl.c (define_label, shadow_tag_warned)
713         (check_bitfield_type_and_width, grokdeclarator, grokparms,
714         store_parm_decls_newstyle, store_parm_decls_oldstyle)
715         (declspecs_add_type): Remove use of in_system_header macro.
716         * c-parser.c (c_parser_unary_expression): Likewise.
717         * c-typeck.c (store_init_value, process_init_element)
718         (c_start_case): Likewise.
720         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
721         macro.
723         * c-parser.c (c_parser_set_source_position_from_token): Remove
724         reference to in_system_header from comment.
726 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
728         * c-decl.c (grokdeclarator): Update comment to refer to
729         tree_to_[su]hwi rather than tree_low_cst.
731 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
733         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
734         tree_to_uhwi throughout.
736 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
738         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
739         throughout.
741 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
743         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
744         throughout.
746 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
748         * c-parser.c (c_parser_cilk_simd): New.
749         (c_parser_cilk_verify_simd): New.
750         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
751         (c_parser_omp_for_loop): Add case for NE_EXPR.
752         Set c_break_label for CILK_SIMD.
753         (c_parser_cilk_clause_vectorlength): New.
754         (c_parser_cilk_clause_linear): New.
755         (c_parser_cilk_clause_name): New.
756         (c_parser_cilk_all_clauses): New.
757         * c-typeck.c (build_unary_op): Pass location argument to
758         readonly_error.
759         (build_modify_expr): Same.
760         (build_asm_expr): Same.
761         (c_finish_bc_stmt): Error on break/continue in loops.
763 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
765         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
767 2013-11-14  Diego Novillo  <dnovillo@google.com>
769         * c-decl.c: Include print-tree.h.
770         Include stor-layout.h.
771         Include varasm.h.
772         Include attribs.h.
773         Include stringpool.h.
774         * c-lang.c: Include fold-const.h.
775         * c-parser.c: Include stringpool.h.
776         Include attribs.h.
777         Include stor-layout.h.
778         Include varasm.h.
779         Include trans-mem.h.
780         * c-typeck.c: Include stor-layout.h.
781         Include trans-mem.h.
782         Include varasm.h.
783         Include stmt.h.
785 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
787         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
788         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
789         __auto_type.
790         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
791         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
792         RID_AUTO_TYPE.
793         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
794         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
795         (c_parser_declarator, c_parser_direct_declarator_inner)
796         (c_parser_parameter_declaration, c_parser_type_name): All callers
797         changed.
798         (c_parser_declaration_or_fndef): Handle declarations with type
799         determined from the initializer.
801 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
803         * c-typeck.c: Include gimplify.h.
805 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
807         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
808         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
809         comment.
810         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
811         or _Thread_local as appropriate in diagnostics.
812         (build_null_declspecs): Initialize ret->thread_gnu_p.
813         (declspecs_add_scspec): Handle either __thread or _Thread_local
814         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
815         pedantic.  Do not disallow _Thread_local extern and _Thread_local
816         static.
818 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
819             Andrew MacLeod  <amacleod@redhat.com>
821         * c-aux-info.c (gen_type): Handle atomic qualifier.
822         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
823         qualifiers when compating types.
824         (shadow_tag_warned): Handle atomic_p in declspecs.
825         (quals_from_declspecs): Likewise.
826         (start_decl): Use c_type_promotes_to when promoting argument
827         types.
828         (grokdeclarator): Handle _Atomic.
829         (get_parm_info): Diagnose any qualifier on "void" as only
830         parameter.
831         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
832         comparing types.  Use c_type_promotes_to when promoting argument
833         types.
834         (finish_function): Use c_type_promotes_to when promoting argument
835         types.
836         (build_null_declspecs): Handle atomic_p in declspecs.
837         (declspecs_add_qual): Handle RID_ATOMIC.
838         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
839         (c_token_starts_declspecs): Handle RID_ATOMIC.
840         (c_parser_declspecs): Handle atomic type specifiers and
841         qualifiers.
842         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
843         from types of expressions with atomic type.
844         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
845         (c_parser_attribute_any_word): Handle RID_ATOMIC.
846         (c_parser_initializer, c_parser_initelt, c_parser_initval)
847         (c_parser_statement_after_labels, c_parser_switch_statement)
848         (c_parser_for_statement, c_parser_expr_no_commas)
849         (c_parser_conditional_expression, c_parser_binary_expression)
850         (c_parser_cast_expression, c_parser_unary_expression)
851         (c_parser_postfix_expression)
852         (c_parser_postfix_expression_after_primary, c_parser_expression):
853         Use convert_lvalue_to_rvalue.
854         (c_parser_expression_conv, c_parser_expr_list): Document
855         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
856         (c_parser_objc_synchronized_statement): Use
857         convert_lvalue_to_rvalue.
858         (c_parser_objc_selector): Handle RID_ATOMIC.
859         (c_parser_objc_receiver, c_parser_array_notation): Use
860         convert_lvalue_to_rvalue.
861         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
862         _Atomic (type-name).
863         (struct c_declspecs): Add atomic_p field.
864         (convert_lvalue_to_rvalue): Declare.
865         * c-typeck.c (c_type_promotes_to): Promote atomic types to
866         corresponding atomic types.
867         (qualify_type): Don't add _Atomic qualifiers from second argument.
868         (comp_target_types): Do not allow _Atomic mismatches.
869         (type_lists_compatible_p): Do not remove atomic qualifiers when
870         comparing types.
871         (really_atomic_lvalue, convert_lvalue_to_rvalue)
872         (build_atomic_assign): New functions.
873         (build_unary_op): Use build_atomic_assign for atomic increment and
874         decrement.
875         (build_conditional_expr): Do not treat _Atomic void as a qualified
876         version of void.
877         (build_modify_expr): Use build_atomic_assign for atomic LHS.
878         (find_anonymous_field_with_type, convert_to_anonymous_field)
879         (convert_for_assignment): Do not remove atomic qualifiers when
880         comparing types.
881         (digest_init): Do not accept initialization of arrays of atomic
882         elements by string constants.
883         (build_asm_expr): Use convert_lvalue_to_rvalue.
884         (build_binary_op): Do not treat _Atomic void as a qualified
885         version of void.
887 2013-11-06  DJ Delorie  <dj@redhat.com>
889         * c-decl.c (locate_old_decl): If a previous conflicting decl is
890         both explicit and builtin, print the location of the explicit one.
892 2013-11-05  Tobias Burnus  <burnus@net-b.de>
894         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
895         c_parser_omp_distribute, c_parser_omp_teams,
896         c_parser_omp_target, c_parser_omp_declare): Handle
897         -fopenmp-simd.
899 2013-11-03  Marek Polacek  <polacek@redhat.com>
901         * c-decl.c (grokdeclarator): Add VLA instrumentation.
903 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
905         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
906         check_dup_generic at the end, unless remove is true.
907         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
908         remove = true;.
909         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
911 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
913         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
914         with decl that is not pointer nor array.
916 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
918         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
919         a spawning function is found.
920         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
921         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
922         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
923         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
924         case.
925         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
926         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
927         expr.
928         (c_finish_return): Added a check to reject _Cilk_spawn in return
929         expression.
930         (build_cilk_spawn): New function.
931         (build_cilk_sync): Likewise.
932         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
933         
934 2013-10-27  Tobias Burnus  <burnus@net-b.de>
936         PR other/33426
937         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
938         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
939         (c_parser_statement_after_labels): Update calls.
941 2013-10-24  Tobias Burnus  <burnus@net-b.de>
943         PR other/33426
944         * c-parser.c (c_parser_pragma, c_parser_for_statement):
945         Handle PRAGMA_IVDEP.
946         (c_parser_statement_after_labels): Update call.
948 2013-10-24  Marek Polacek  <polacek@redhat.com>
950         * c-parser.c (c_parser_struct_declaration): Add a comment.
951         (c_parser_declarator): Don't allow _Alignas here.
953 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
955         * c-parser.c: Include omp-low.h.
956         * c-typeck.c: Likewise.
958 2013-10-17  Marek Polacek  <polacek@redhat.com>
960         PR c/58267
961         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
962         Document syntax of the array-declarator.
963         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
964         are not permitted.
965         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
966         (c_parser_struct_declaration): Likewise.
967         (c_parser_declarator): Likewise.
968         (c_parser_direct_declarator_inner): Likewise.
969         (c_parser_parameter_declaration): Likewise.
970         (c_parser_type_name): Likewise.
972 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
974         * c-lang.h (current_omp_declare_target_attribute): New extern
975         decl.
976         * c-parser.c: Include c-lang.h.
977         (struct c_parser): Change tokens to c_token *.
978         Add tokens_buf field.  Change tokens_avail type to unsigned int.
979         (c_parser_consume_token): If parser->tokens isn't
980         &parser->tokens_buf[0], increment parser->tokens.
981         (c_parser_consume_pragma): Likewise.
982         (enum pragma_context): Add pragma_struct and pragma_param.
983         (c_parser_external_declaration): Adjust
984         c_parser_declaration_or_fndef caller.
985         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
986         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
987         Adjust recursive call.
988         (c_parser_struct_or_union_specifier): Use pragma_struct instead
989         of pragma_external.
990         (c_parser_parameter_declaration): Use pragma_param instead of
991         pragma_external.
992         (c_parser_compound_statement_nostart, c_parser_label,
993         c_parser_for_statement): Adjust
994         c_parser_declaration_or_fndef callers.
995         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
996         it through to c_parser_conditional_expression.
997         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
998         pass it through to c_parser_binary_expression.  Adjust recursive
999         call.
1000         (c_parser_binary_expression): Remove prec argument, add
1001         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
1002         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1003         binop matches it, use build2 instead of parser_build_binary_op.
1004         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1005         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1006         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1007         Handle pragma_struct and pragma_param the same as pragma_external.
1008         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1009         (c_parser_omp_variable_list): Parse array sections for
1010         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1011         (c_parser_omp_clause_collapse): Fully fold collapse expression.
1012         (c_parser_omp_clause_reduction): Handle user defined reductions.
1013         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1014         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1015         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1016         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1017         c_parser_omp_clause_depend, c_parser_omp_clause_map,
1018         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1019         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1020         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1021         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
1022         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
1023         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1024         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
1025         (c_parser_omp_for_loop): Add CODE argument, pass it through
1026         to c_finish_omp_for.  Change last argument to cclauses,
1027         and adjust uses to grab parallel clauses from the array of all
1028         the split clauses.  Adjust c_parser_binary_expression,
1029         c_parser_declaration_or_fndef and c_finish_omp_for callers.
1030         (omp_split_clauses): New function.
1031         (c_parser_omp_simd): New function.
1032         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1033         Allow the function to be called also when parsing combined constructs,
1034         and call c_parser_omp_simd when parsing for simd.
1035         (c_parser_omp_sections_scope): If section-sequence doesn't start with
1036         #pragma omp section, require exactly one structured-block instead of
1037         sequence of statements.
1038         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1039         Allow the function to be called also when parsing combined constructs.
1040         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1041         Allow the function to be called also when parsing combined
1042         constructs.
1043         (c_parser_omp_taskgroup, c_parser_omp_cancel,
1044         c_parser_omp_cancellation_point, c_parser_omp_distribute,
1045         c_parser_omp_teams, c_parser_omp_target_data,
1046         c_parser_omp_target_update, c_parser_omp_target,
1047         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1048         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1049         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1050         (c_parser_omp_construct): Add p_name and mask vars.  Handle
1051         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1052         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
1053         and c_parser_omp_sections callers.
1054         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1055         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1056         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1057         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
1058         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
1059         OMP_CLAUSE_DEPEND.
1060         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1061         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1062         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1063         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1064         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1065         * c-typeck.c: Include tree-inline.h.
1066         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1067         handle_omp_array_sections_1, handle_omp_array_sections,
1068         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1069         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1070         user defined reductions.
1071         (c_tree_equal): New function.
1072         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1073         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1074         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1075         c_check_omp_declare_reduction_r): New prototypes.
1076         * c-decl.c (current_omp_declare_target_attribute): New variable.
1077         (c_decl_attributes): New function.
1078         (start_decl, start_function): Use it instead of decl_attributes.
1079         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1080         c_omp_reduction_decl, c_omp_reduction_lookup,
1081         c_check_omp_declare_reduction_r): New functions.
1083 2013-09-25  Tom Tromey  <tromey@redhat.com>
1085         * Make-lang.in (c/gccspec.o): Remove.
1086         (CFLAGS-c/gccspec.o): New variable.
1087         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1088         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1089         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1091 2013-09-25  Tom Tromey  <tromey@redhat.com>
1093         * Make-lang.in (c/gccspec.o): Don't use subshell.
1095 2013-09-18  Marek Polacek  <polacek@redhat.com>
1097         PR sanitize/58443
1098         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1099         Remove unnecessary check.
1101 2013-09-18  Marek Polacek  <polacek@redhat.com>
1103         PR sanitizer/58411
1104         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1105         no_sanitize_undefined attribute.
1107 2013-09-13  Kai Tietz  <ktietz@redhat.com>
1109         PR target/57848
1110         * c-decl.c (c_builtin_function_ext_scope): Remove
1111         wrong assumption that it is never called on prexisting
1112         symbol.
1114 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
1116         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1118 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1120         * c-objc-common.c (c_tree_printer): Tidy.
1122 2013-08-30  Marek Polacek  <polacek@redhat.com>
1124         * c-typeck.c (build_binary_op): Add division by zero and shift
1125         instrumentation.
1127 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
1128             Joseph Myers  <joseph@codesourcery.com>
1130         PR c/35649
1131         * c-typeck.c (c_common_type): Prefer double_type_node over
1132         other REAL_TYPE types with the same precision.
1133         (convert_arguments): Likewise.
1135 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1137         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1138         (c_initialize_diagnostics): Call a destructor for the early printer.
1140 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1142         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1143         printer initialization.
1145 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1147         PR c/57490
1148         * c-array-notation.c (fix_conditional_array_notations_1): Added a
1149         check for truth values.
1150         (expand_array_notation_exprs): Added truth values case.  Removed an
1151         unwanted else.  Added for-loop to walk through subtrees in default
1152         case.
1154 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1156         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1158 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
1160         * c-parser.c (struct c_generic_association): Fix typo.
1162 2013-07-23  Tom Tromey  <tromey@redhat.com>
1163             Joseph Myers  <joseph@codesourcery.com>
1165         * c-parser.c (struct c_generic_association): New.
1166         (c_generic_association_d): New typedef.
1167         (c_parser_generic_selection): New function.
1168         (c_parser_postfix_expression): Handle RID_GENERIC.
1170 2013-07-13  Jason Merrill  <jason@redhat.com>
1172         PR c++/57793
1173         * c-decl.c (finish_struct): Check for too-large class.
1175 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
1177         PR c/57821
1178         * c-typeck.c (set_init_index): When folding, check for index overflow.
1180 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1182         * c-parser.c (c_parser_array_notation): Removed rejection of array
1183         notations in an array of function pointers.
1185 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1187         * c-array-notation.c (make_triplet_val_inv): New function.
1188         (create_cmp_incr): Likewise.
1189         (create_array_refs): Likewise.
1190         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1191         Also modularized common parts between functions and called the function.
1192         (build_array_notation_expr): Likewise.
1193         (fix_conditional_array_notations_1): Likewise.
1194         (fix_array_notation_expr): Likewise.
1195         (fix_array_notation_call_expr): Likewise.
1197 2013-06-18  Marek Polacek  <polacek@redhat.com>
1199         PR c/57630
1200         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1202 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1204         * c-array-notation.c (build_array_notation_expr): Reject array notation
1205         mismatch between LHS and RHS even inside a call_expr.  Also, removed
1206         a couple while statements that were dead code.
1208 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1210         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1211         excessive precision expressions in function parameters.  Also removed
1212         couple unwanted while statements.
1214 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1216         * c-array-notation.c (expand_array_notation_exprs): Added
1217         ARRAY_NOTATION_REF case.
1218         
1219 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1221         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1222         function to c-family/array-notation-common.c.
1223         (is_cilkplus_reduce_builtin): Likewise.
1224         (find_rank): Likewise.
1225         (extract_array_notation_exprs): Likewise.
1226         (replace_array_notations): Likewise.
1227         (find_inv_trees): Likewise.
1228         (replace_inv_trees): Likewise.
1229         (contains_array_notation_expr): Likewise.
1230         (find_correct_array_notation_type): Likewise.
1231         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1232         (struct inv_list): Moved this to c-family/array-notation-common.c.
1233         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1234         
1235 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1237         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1238         reduction functions outside the for-loop.  Added a check if the fundecl
1239         is non-NULL.  Finally, removed an unwanted if-statement, and made the
1240         body unconditional.
1242 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1244         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1245         condition of the if-statement matches the rank of else-block and then-
1246         block when array notations are used.
1247         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1248         expression after the entire function body is parsed.
1249         (c_parser_expr_no_commas): Delayed creating array notation expressions
1250         to the end of function parsing.
1251         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1252         whole if-statement instead of just the condition.
1253         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
1255 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1257         PR c/57474
1258         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1259         array to NULL_TREE if they are unused.  Also added a check for the
1260         field to be NULL before its fields are used in future.
1261         
1262 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1264         PR bootstrap/57450
1265         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1266         (build_array_notation_expr): Likewise.
1268 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1270         * c-typeck.c (build_array_ref): Added a check to see if array's
1271         index is greater than one.  If true, then emit an error.
1272         (build_function_call_vec): Exclude error reporting and checking
1273         for builtin array-notation functions.
1274         (convert_arguments): Likewise.
1275         (c_finish_return): Added a check for array notations as a return
1276         expression.  If true, then emit an error.
1277         (c_finish_loop): Added a check for array notations in a loop
1278         condition.  If true then emit an error.
1279         (lvalue_p): Added a ARRAY_NOTATION_REF case.
1280         (build_binary_op): Added a check for array notation expr inside
1281         op1 and op0.  If present, we call another function to find correct
1282         type.
1283         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1284         * c-parser.c (c_parser_compound_statement): Check if array
1285         notation code is used in tree, if so, then transform them into
1286         appropriate C code.
1287         (c_parser_expr_no_commas): Check if array notation is used in LHS
1288         or RHS, if so, then build array notation expression instead of
1289         regular modify.
1290         (c_parser_postfix_expression_after_primary): Added a check for
1291         colon(s) after square braces, if so then handle it like an array
1292         notation.  Also, break up array notations in unary op if found.
1293         (c_parser_direct_declarator_inner): Added a check for array
1294         notation.
1295         (c_parser_compound_statement): Added a check for array notation in
1296         a stmt.  If one is present, then expand array notation expr.
1297         (c_parser_if_statement): Likewise.
1298         (c_parser_switch_statement): Added a check for array notations in
1299         a switch statement's condition.  If true, then output an error.
1300         (c_parser_while_statement): Similarly, but for a while.
1301         (c_parser_do_statement): Similarly, but for a do-while.
1302         (c_parser_for_statement): Similarly, but for a for-loop.
1303         (c_parser_unary_expression): Check if array notation is used in a
1304         pre-increment or pre-decrement expression.  If true, then expand
1305         them.
1306         (c_parser_array_notation): New function.
1307         * c-array-notation.c: New file.
1308         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1309         
1310 2013-05-23  Mike Stump  <mikestump@comcast.net>
1312         * c-typeck.c (convert_for_assignment): Handle references to memory
1313         spaces better.
1315 2013-05-16  Jason Merrill  <jason@redhat.com>
1317         * Make-lang.in (cc1$(exeext)): Use link mutex.
1319 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1321         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1322         to simply use OPT_Wpointer_arith.
1323         (build_unary_op): Likewise.
1325 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1327         PR c/19449
1328         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1329         argument.  If set, or it temporarily for parsing of the first
1330         argument into force_folding_builtin_constant_p.
1331         (c_parser_postfix_expression): Adjust callers.
1333 2013-03-21  Richard Biener  <rguenther@suse.de>
1335         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1336         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
1338 2013-02-12  Marek Polacek  <polacek@redhat.com>
1340         PR c/44938
1341         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1342         origtypes to NULL.
1344 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
1346         PR c/56078
1347         * c-typeck.c (set_nonincremental_init_from_string): If
1348         constructor_max_index is NULL, treat it as if tree_int_cst_lt
1349         returned false.
1350         (process_init_element): Likewise.
1352 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
1354         PR c++/55619
1355         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1356         argument, don't call default_function_array_conversion
1357         nor c_fully_fold here.
1358         (c_parser_asm_statement): Adjust callers.
1359         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1360         and outputs here, and call default_function_array_conversion
1361         on inputs that don't need to be addressable.
1363 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
1365         PR c/39464
1366         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1367         warning require that both c_common_unsigned_type as well as
1368         c_common_signed_type is the same for both mvl and mvr types.
1370 2012-11-16  Diego Novillo  <dnovillo@google.com>
1372         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1374         * c-common.c: Use new vec API in vec.h.
1375         * c-common.h: Likewise.
1376         * c-gimplify.c: Likewise.
1377         * c-pragma.c: Likewise.
1378         * c-pretty-print.c: Likewise.
1379         * c-pretty-print.h: Likewise.
1380         * c-semantics.c: Likewise.
1381         * c-decl.c: Likewise.
1382         * c-parser.c: Likewise.
1383         * c-tree.h: Likewise.
1384         * c-typeck.c: Likewise.
1386 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
1388         PR c++/54930
1389         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1391 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1393         PR c/53066
1394         * c-decl.c (warn_if_shadowing): Do not warn if a variable
1395         shadows a function, unless the variable is a function or a
1396         pointer-to-function.
1398 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
1400         PR c/54381
1401         * c-parser.c (struct c_tree_loc_pair): Removed.
1402         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1403         add location_t * and tree * arguments, fill in array of 3
1404         sizeof_arg trees and corresponding locs.
1405         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1406         c_parser_expr_list callers.
1407         (c_parser_postfix_expression_after_primary): Likewise.  Pass
1408         array of 3 sizeof_arg trees and locs (corresponding to first
1409         3 arguments) to sizeof_pointer_memaccess_warning.
1411 2012-10-09  Lawrence Crowl  <crowl@google.com>
1413         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1414         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1415         hash table.
1417 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
1419         PR c++/54194
1420         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1421         call.
1423 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
1425         PR c++/54427
1426         * c-typeck.c: Include c-common.h.
1427         (enum stv_conv): Moved to c-common.h.
1428         (scalar_to_vector): Moved to c-common.c.
1429         (build_binary_op): Adapt to scalar_to_vector's new prototype.
1430         * Make-lang.in: c-typeck.c depends on c-common.h.
1432 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
1434         * c-decl.c (c_write_global_declarations): Fix handling of
1435         -fdump-ada-spec*.
1437 2012-09-30  Sharad Singhai  <singhai@google.com>
1439         * c-decl.c (c_write_global_declarations): Use a different method
1440         to determine if the dump has ben initialized.
1442 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1444         PR c/54552
1445         * c-typeck.c (c_cast_expr): When casting to a type requiring
1446         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1447         c_fully_fold first.
1449 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1451         PR c/54103
1452         * c-typeck.c (build_unary_op): Pass original argument of
1453         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1454         any C_MAYBE_CONST_EXPR, if it has integer operands.
1455         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1456         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1457         to c_objc_common_truthvalue_conversion, then remove any
1458         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
1459         c_objc_common_truthvalue_conversion not
1460         c_common_truthvalue_conversion.
1461         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1462         call note_integer_operands for arguments with integer operands
1463         that are not integer constants.
1465 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
1467         PR c/54559
1468         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1469         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1471 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
1473         PR c/54428
1474         * c-convert.c (convert): Don't call fold_convert_loc if
1475         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1476         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
1477         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1479 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
1481         PR c/54355
1482         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1483         for nested and empty_ok arguments in the call to
1484         c_parser_declaration_or_fndef.
1486 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
1488         * c-tree.h (c_last_sizeof_arg): Declare.
1489         * c-parser.c (struct c_tree_loc_pair): New type.
1490         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
1491         non-NULL.
1492         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1493         (c_parser_postfix_expression_after_primary): Likewise.  Call
1494         sizeof_pointer_memaccess_warning if needed.
1495         (sizeof_ptr_memacc_comptypes): New function.
1496         * c-typeck.c (c_last_sizeof_arg): New global variable.
1497         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1499 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
1501         * c-lang.h (lang_decl): Add variable_size GTY option.
1503 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1505         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1506         * Make-lang.in: Fix dependencies.
1508 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
1510         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1511         and add language Makefile hooks.
1512         * config-lang.in: New file.
1513         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1514         add the required "normal" config-lang.in rules.
1515         * c-lang.h: Moved from gcc/ to here.
1516         * c-tree.h: Likewise.
1517         * c-objc-common.c: Likewise.
1518         * c-objc-common.h: Likewise.
1519         * c-typeck.c: Likewise.
1520         * c-convert.c: Likewise.
1521         * c-lang.c: Likewise.
1522         * c-aux-info.c: Likewise.
1523         * c-errors.c: Likewise.
1524         * gccspec.c: Likewise.
1525         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
1526         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
1528 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1530 Copying and distribution of this file, with or without modification,
1531 are permitted in any medium without royalty provided the copyright
1532 notice and this notice are preserved.