PR c/56724
[official-gcc.git] / gcc / c / ChangeLog
blob85b00650fe9c85045cdafe70d747934c537892af
1 2014-06-05  Marek Polacek  <polacek@redhat.com>
3         PR c/56724
4         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6 2014-06-05  Marek Polacek  <polacek@redhat.com>
8         PR c/49706
9         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
10         on the left hand side operand of a comparison. 
12 2014-06-05  Marek Polacek  <polacek@redhat.com>
14         PR c/48062
15         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
16         Print note only if the warning was printed.
18 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
20         PR c/58942
21         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
22         with a pointer.
24 2014-06-03  Marek Polacek  <polacek@redhat.com>
26         PR c/60439
27         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
28         c_start_case.
29         * c-tree.h (c_start_case): Update.
30         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
31         switch condition has boolean value.
33 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
35         * c-decl.c: Include builtins.h.
36         * c-parser.c: Likewise.
38 2014-05-27  Marek Polacek  <polacek@redhat.com>
40         PR c/56724
41         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
42         error and warning calls to error_at and warning_at.  Pass location of
43         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
44         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
45         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
47 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
49         PR c/61191
50         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
51         function parameters.
53 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
55         * c-decl.c (merge_decls): Preserve symtab node pointers.
56         (duplicate_decls): Free new decl.
58 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
60         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
61         initialization.
63         * c-parser.c (c_parser_omp_target): Return bool values.
65 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
67         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
68         num_teams_loc variable to num_thread_limit_loc.
70 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
72         * c-array-notation.c (expand_array_notations): Use void_node
73         instead of void_zero_node.
75 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
77         * c-decl.c (finish_struct): Adjust.
78         (finish_enum): Likewise.
79         (bind): Adjust.
80         (record_inline_static): Likewise.
81         (push_scope): Likewise.
82         (make_label): Likewise.
83         (lookup_label_for_goto): Likewise.
84         (finish_struct): Likewise.
85         (finish_enum): Likewise.
86         (store_parm_decls): Likewise.
87         (c_push_function_context): Likewise.
88         * c-lang.h: Remove usage of variable_size gty attribute.
89         * c-parser.c (c_parse_init): Adjust.
90         (c_parse_file): Likewise.
92 2014-05-13  Marek Polacek  <polacek@redhat.com>
94         PR c/61162
95         * c-typeck.c (convert_for_assignment): Pass location to
96         WARN_FOR_ASSIGNMENT instead of input_location.
98 2014-05-10  Marek Polacek  <polacek@redhat.com>
100         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
101         maybe_warn_string_init.
102         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
103         maybe_warn_string_init.
104         * c-tree.h (maybe_warn_string_init): Update declaration.
105         * c-typeck.c (maybe_warn_string_init): Add location parameter.
106         Call pedwarn_init with loc instead of with input_location.
107         (digest_init): Pass init_loc to maybe_warn_string_init.
108         (pop_init_level): Call pedwarn_init with loc instead of with
109         input_location.
110         (set_init_index): Likewise.
111         (process_init_element): Likewise.
113 2014-05-09  Marek Polacek  <polacek@redhat.com>
115         PR c/61096
116         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
117         (c_parser_initelt): Pass location to set_init_label.  Pass array index
118         location to set_init_index.
119         * c-tree.h (push_init_level): Update declaration.
120         (pop_init_level): Likewise.
121         (set_init_index): Likewise.
122         (set_init_label): Likewise.
123         * c-typeck.c (error_init): Add location parameter.  Call error_at
124         instead of error.
125         (digest_init): Pass init_loc to error_init.
126         (really_start_incremental_init):
127         (push_init_level): Add location parameter.  Pass loc to pop_init_level
128         and error_init.
129         (pop_init_level): Likewise.
130         (set_designator): Add location parameter.  Pass loc to pop_init_level,
131         push_init_level, and error_init.
132         (set_init_index): Add location parameter.  Pass loc to error_init and
133         set_designator.
134         (set_init_label): Likewise.
135         (output_init_element): Pass loc to error_init.
136         (process_init_element): Pass loc to error_init, pop_init_level,
137         pedwarn_init, and push_init_level.
139 2014-05-09  Marek Polacek  <polacek@redhat.com>
141         PR c/50459
142         * c-parser.c (c_parser_attributes): Parse the arguments as an
143         expression-list if the attribute takes identifier.
145 2014-05-08  Marek Polacek  <polacek@redhat.com>
147         PR c/61053
148         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
149         TYPE_ALIGN_UNIT.
151 2014-05-08  Marek Polacek  <polacek@redhat.com>
153         PR c/61077
154         * c-decl.c (start_function): Warn for _Atomic-qualified return type
155         of main.
157 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
158             Mike Stump  <mikestump@comcast.net>
159             Richard Sandiford  <rdsandiford@googlemail.com>
161         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
162         (finish_enum): Use wide-int interfaces.
163         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
164         * c-typeck.c (build_c_cast): Likewise.
165         (set_nonincremental_init_from_string): Likewise.
166         (c_tree_equal): Likewise.
168 2014-05-02  Marek Polacek  <polacek@redhat.com>
170         PR c/25801
171         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
172         Return size_one_node when the type is not complete.
173         (pointer_diff): Remove comment.
174         (build_unary_op): Improve error messages.
176 2014-05-02  Marek Polacek  <polacek@redhat.com>
178         * c-typeck.c (c_finish_return): Separate warning_at calls.
180 2014-05-02  Marek Polacek  <polacek@redhat.com>
182         * c-tree.h (error_init): Remove declaration.
183         (pedwarn_init): Likewise.
184         * c-typeck.c (error_init): Make static and move above.
185         (pedwarn_init): Likewise.
186         (warning_init): Move above.
187         (maybe_warn_string_init): Likewise.
189 2014-05-01  Jeff Law  <law@redhat.com>
191         Revert:
193         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
194         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
195         avoid goto.
197 2014-05-02  Marek Polacek  <polacek@redhat.com>
199         PR c/60784
200         * c-typeck.c (push_init_level): Set constructor_designated to
201         p->designated for structures.
203 2014-05-01  Marek Polacek  <polacek@redhat.com>
205         PR c/60915
206         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
207         function-definition has an attribute after the declarator.
209 2014-05-01  Marek Polacek  <polacek@redhat.com>
211         PR c/60257
212         * c-typeck.c (warning_init): Add location_t parameter.  Call
213         warning_at instead of warning.
214         (push_init_level): Pass input_location to warning_init.
215         (add_pending_init): Add location_t parameter.  Pass loc to
216         warning_init.
217         (set_nonincremental_init): Pass input_location to add_pending_init.
218         (set_nonincremental_init_from_string): Likewise.
219         (output_init_element): Pass loc to warning_init and to
220         add_pending_init.
222 2014-05-01  Marek Polacek  <polacek@redhat.com>
224         PR c/43395
225         * c-typeck.c (c_finish_return): Distinguish between label and variable
226         when warning about returning local address.
228 2014-05-01  Marek Polacek  <polacek@redhat.com>
230         PR c/29467
231         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
232         in C89 mode.
234 2014-05-01  Marek Polacek  <polacek@redhat.com>
236         PR c/43245
237         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
238         instead of 0 to WARN_FOR_QUALIFIERS.
240 2014-05-01  Marek Polacek  <polacek@redhat.com>
242         PR c/56989
243         * c-typeck.c (default_conversion): Use better location for
244         error call.
246 2014-04-30  Marek Polacek  <polacek@redhat.com>
248         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
249         also when SANITIZE_FLOAT_DIVIDE is on.
251 2014-04-30  Marek Polacek  <polacek@redhat.com>
253         PR c/60139
254         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
255         and pedwarn_init.  Use loc insted of input_location.
257 2014-04-30  Marek Polacek  <polacek@redhat.com>
259         PR c/60351
260         * c-typeck.c (build_binary_op): Use location when warning about
261         shift count.
263 2014-04-25  Marek Polacek  <polacek@redhat.com>
265         PR c/18079
266         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
267         always_inline/noinline and hot/cold attributes.
269 2014-04-25  Marek Polacek  <polacek@redhat.com>
271         PR c/60114
272         * c-parser.c (c_parser_initelt): Pass input_location to
273         process_init_element.
274         (c_parser_initval): Pass loc to process_init_element.
275         * c-tree.h (process_init_element): Adjust declaration.
276         * c-typeck.c (push_init_level): Pass input_location to
277         process_init_element.
278         (pop_init_level): Likewise.
279         (set_designator): Likewise.
280         (output_init_element): Add location_t parameter.  Pass loc to
281         digest_init.
282         (output_pending_init_elements): Pass input_location to
283         output_init_element.
284         (process_init_element): Add location_t parameter.  Pass loc to
285         output_init_element.
287 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
289         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
290         atomic-clause, allow comma in between atomic-clause and
291         seq_cst.
293 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
295         PR c/59073
296         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
297         fails, don't set OM_PARALLEL_COMBINED and return NULL.
299 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
301         PR middle-end/60469
302         * c-array-notation.c (fix_builtin_array_notation_fn): Use
303         create_tmp_var instead build_decl for creating temps.
304         (build_array_notation_expr): Likewise.
305         (fix_conditional_array_notations_1): Likewise.
306         (fix_array_notation_expr): Likewise.
307         (fix_array_notation_call_expr): Likewise.
309 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
311         PR c++/60689
312         * c-tree.h (c_build_function_call_vec): New prototype.
313         * c-typeck.c (build_function_call_vec): Don't call
314         resolve_overloaded_builtin here.
315         (c_build_function_call_vec): New wrapper function around
316         build_function_call_vec.  Call resolve_overloaded_builtin here.
317         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
318         Call c_build_function_call_vec instead of build_function_call_vec.
319         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
320         * c-decl.c (finish_decl): Likewise.
322 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
324         PR c/55383
325         * c-typeck.c: Use correct format string in cast-qual warning
327 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
329         * c-decl.c (c_decl_attributes): Use
330         lang_hooks.types.omp_mappable_type.
331         * c-typeck.c (c_finish_omp_clauses): Likewise.
333 2014-03-06  Marek Polacek  <polacek@redhat.com>
335         PR c/60197
336         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
337         of checking tree code.
339 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
341         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
342         (c_parser_parameter_declaration): Likewise.
344 2014-02-19  Marek Polacek  <polacek@redhat.com>
346         PR c/60195
347         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
348         Call mark_exp_read on exp.value.
349         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
350         TREE_ADDRESSABLE on old instead of val.
351         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
353 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
355         * c-parser.c (c_parser_get_builtin_args): Replace calls to
356         C_EXPR_APPEND by vec_safe_push.
357         * c-tree.h (C_EXPR_APPEND): Remove.
359 2014-01-31  Marek Polacek  <polacek@redhat.com>
361         PR c/59963
362         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
363         build_function_call_vec.
364         (build_function_call): Likewise.
365         (build_atomic_assign): Likewise.
366         (build_function_call_vec): Add arg_loc parameter.  Use it.
367         (convert_arguments): Likewise.
368         (convert_for_assignment): Rename rhs_loc to expr_loc.
369         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
370         (c_parser_objc_keywordexpr): Likewise.
371         (c_parser_postfix_expression_after_primary): Call
372         build_function_call_vec with expr_loc rather than op_loc.
373         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
374         build_function_call_vec.
375         (c_parser_expr_list): Add locations parameter.  Fill it with locations
376         of function arguments.
377         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
379 2014-01-30  Marek Polacek  <polacek@redhat.com>
381         PR c/59940
382         * c-typeck.c (build_function_call_vec): Use loc parameter.
383         (convert_arguments): Add location parameter.  Use it.
384         (ep_convert_and_check): Likewise.
385         (build_atomic_assign): Adjust convert_for_assignment call.
386         (build_modify_expr): Likewise.
387         (digest_init): Likewise.
388         (c_finish_return): Likewise.
389         (build_conditional_expr): Adjust ep_convert_and_check calls.
390         (convert_for_assignment): Add rhs_loc parameter.  Use it.
391         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
392         calls.
394 2014-01-30  Richard Biener  <rguenther@suse.de>
396         PR c/59905
397         * c-typeck.c (build_function_call_vec): Do not replace calls
398         to a function via an incompatible type with a runtime abort.
400 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
402         * c-parser.c (c_parser_declaration_or_fndef): Replaced
403         flag_enable_cilkplus with flag_cilkplus.
404         (c_parser_direct_declarator_inner): Likewise.
405         (c_parser_attribute_any_word): Likewise.
406         (c_parser_attributes): Likewise.
407         (c_parser_compound_statement): Likewise.
408         (c_parser_statement_after_labels): Likewise.
409         (c_parser_if_statement): Likewise.
410         (c_parser_switch_statement): Likewise.
411         (c_parser_do_statement): Likewise.
412         (c_parser_for_statement): Likewise.
413         (c_parser_unary_expression): Likewise.
414         (c_parser_postfix_expression): Likewise.
415         (c_parser_postfix_expression_after_primary): Likewise.
416         (c_parser_postfix_expression_after_primary): Likewise.
417         (c_parser_omp_clause_name): Likewise.
418         (c_finish_omp_declare_simd): Likewise.
419         (c_parser_cilk_verify_simd): Likewise.
420         * c-typeck.c (build_array_ref): Likewise.
421         (build_function_call_vec): Likewise.
422         (convert_arguments): Likewise.
423         (build_compound_expr): Likewise.
424         (c_finish_return): Likewise.
425         (c_finish_if_stmt): Likewise.
426         (c_finish_loop): Likewise.
427         (build_binary_op): Likewise.
429 2014-01-23  Marek Polacek  <polacek@redhat.com>
431         PR c/59846
432         * c-typeck.c (parser_build_binary_op): Use location instead of
433         input_location.
434         (build_binary_op): Pass location to shorten_compare.
436 2014-01-23  Marek Polacek  <polacek@redhat.com>
438         PR c/58346
439         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
440         an empty aggregate.
442 2014-01-23  Marek Polacek  <polacek@redhat.com>
444         PR c/59871
445         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
446         of a comma expression.
447         (emit_side_effect_warnings): Likewise.
449 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
451         PR c/59825
452         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
453         function to use walk_tree and moved a lot of its functionality to
454         expand_array_notations.
455         (expand_array_notations): New function.
457 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
459         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
460         attribute an attribute without value.
462 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
464         PR middle-end/58809
465         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
466         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
468 2014-01-22  Marek Polacek  <polacek@redhat.com>
470         PR c/59891
471         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
472         of remove_c_maybe_const_expr on op1 and op2.
474 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
476         PR c/58943
477         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
478         effects, preevaluate rhs using SAVE_EXPR first.
480 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
482         PR c++/59631
483         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
484         statements with if-elseif statements.
486 2014-01-06  Marek Polacek  <polacek@redhat.com>
488         PR c/57773
489         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
490         defined bit-field types only in ISO C.
492 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
494         Update copyright years
496 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
498         * c-array-notation.c: Use the standard form for the copyright notice.
500 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
502         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
503         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
504         field in parser is not empty.  If not-empty, call the function
505         c_parser_finish_omp_declare_simd.
506         (c_parser_cilk_clause_vectorlength): Modified function to be shared
507         between SIMD-enabled functions and #pragma simd.  Added new parameter.
508         (c_parser_cilk_all_clauses): Modified the usage of the function
509         c_parser_cilk_clause_vectorlength as mentioned above.
510         (c_parser_cilk_simd_fn_vector_attrs): New function.
511         (c_finish_cilk_simd_fn_tokens): Likewise.
512         (is_cilkplus_vector_p): Likewise.
513         (c_parser_omp_clause_name): Added checking for "vectorlength,"
514         "nomask," and "mask" strings in clause name.
515         (c_parser_omp_all_clauses): Added 3 new case statements:
516         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
517         PRAGMA_CILK_CLAUSE_NOMASK.
518         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
519         check for vector attribute and if so call the function
520         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
521         called the function c_finish_cilk_simd_fn_tokens.
522         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
523         parser field is non-empty.  If so, parse them as you would parse
524         the omp declare simd pragma.
525         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
526         Added a check when step is a parameter and flag it as error.
527         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
528         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
529         pragma_omp_clause.
531 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
533         * c-parser.c (c_parser_omp_parallel): Fix description.
535 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
537         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
538         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
539         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
540         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
542 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
544         PR c/52023
545         * c-parser.c (c_parser_alignas_specifier): Use
546         c_sizeof_or_alignof_type instead of c_alignof.
547         (c_parser_alignof_expression): Likewise, with min_alignof
548         parameter depending on alignof spelling used.
550 2013-12-04  Marek Polacek  <polacek@redhat.com>
552         PR c/54113
553         * c-decl.c (start_function): Don't warn for missing prototype for
554         inline functions.
556 2013-12-03  Marek Polacek  <polacek@redhat.com>
558         PR c/59351
559         * c-decl.c (build_compound_literal): Allow compound literals with
560         empty initial value.
562 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
564         PR c/58235
565         * c-typeck.c (build_modify_expr): Diagnose assignment to
566         expression with array type.
568 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
570         PR c/42262
571         * c-typeck.c (process_init_element): Do not treat a string as
572         initializing a whole array when used with a designator for an
573         individual element.
575 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
577         PR c/57574
578         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
579         an inline function following a static declaration.
581 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
583         PR c/59310
584         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
585         to p_name before calling c_parser_omp_teams instead of after.
586         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
587         argument.  Remove unused p_name variable.
589 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
590             Jakub Jelinek  <jakub@redhat.com>
592         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
593         external_scope is NULL.
595 2013-11-27  Tom de Vries  <tom@codesourcery.com>
596             Marc Glisse  <marc.glisse@inria.fr>
598         PR c++/59032
599         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
601 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
603         * c-typeck.c: Add required include files from gimple.h.
605 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
607         * c-decl.c (define_label, shadow_tag_warned)
608         (check_bitfield_type_and_width, grokdeclarator, grokparms,
609         store_parm_decls_newstyle, store_parm_decls_oldstyle)
610         (declspecs_add_type): Remove use of in_system_header macro.
611         * c-parser.c (c_parser_unary_expression): Likewise.
612         * c-typeck.c (store_init_value, process_init_element)
613         (c_start_case): Likewise.
615         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
616         macro.
618         * c-parser.c (c_parser_set_source_position_from_token): Remove
619         reference to in_system_header from comment.
621 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
623         * c-decl.c (grokdeclarator): Update comment to refer to
624         tree_to_[su]hwi rather than tree_low_cst.
626 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
628         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
629         tree_to_uhwi throughout.
631 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
633         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
634         throughout.
636 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
638         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
639         throughout.
641 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
643         * c-parser.c (c_parser_cilk_simd): New.
644         (c_parser_cilk_verify_simd): New.
645         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
646         (c_parser_omp_for_loop): Add case for NE_EXPR.
647         Set c_break_label for CILK_SIMD.
648         (c_parser_cilk_clause_vectorlength): New.
649         (c_parser_cilk_clause_linear): New.
650         (c_parser_cilk_clause_name): New.
651         (c_parser_cilk_all_clauses): New.
652         * c-typeck.c (build_unary_op): Pass location argument to
653         readonly_error.
654         (build_modify_expr): Same.
655         (build_asm_expr): Same.
656         (c_finish_bc_stmt): Error on break/continue in loops.
658 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
660         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
662 2013-11-14  Diego Novillo  <dnovillo@google.com>
664         * c-decl.c: Include print-tree.h.
665         Include stor-layout.h.
666         Include varasm.h.
667         Include attribs.h.
668         Include stringpool.h.
669         * c-lang.c: Include fold-const.h.
670         * c-parser.c: Include stringpool.h.
671         Include attribs.h.
672         Include stor-layout.h.
673         Include varasm.h.
674         Include trans-mem.h.
675         * c-typeck.c: Include stor-layout.h.
676         Include trans-mem.h.
677         Include varasm.h.
678         Include stmt.h.
680 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
682         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
683         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
684         __auto_type.
685         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
686         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
687         RID_AUTO_TYPE.
688         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
689         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
690         (c_parser_declarator, c_parser_direct_declarator_inner)
691         (c_parser_parameter_declaration, c_parser_type_name): All callers
692         changed.
693         (c_parser_declaration_or_fndef): Handle declarations with type
694         determined from the initializer.
696 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
698         * c-typeck.c: Include gimplify.h.
700 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
702         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
703         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
704         comment.
705         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
706         or _Thread_local as appropriate in diagnostics.
707         (build_null_declspecs): Initialize ret->thread_gnu_p.
708         (declspecs_add_scspec): Handle either __thread or _Thread_local
709         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
710         pedantic.  Do not disallow _Thread_local extern and _Thread_local
711         static.
713 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
714             Andrew MacLeod  <amacleod@redhat.com>
716         * c-aux-info.c (gen_type): Handle atomic qualifier.
717         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
718         qualifiers when compating types.
719         (shadow_tag_warned): Handle atomic_p in declspecs.
720         (quals_from_declspecs): Likewise.
721         (start_decl): Use c_type_promotes_to when promoting argument
722         types.
723         (grokdeclarator): Handle _Atomic.
724         (get_parm_info): Diagnose any qualifier on "void" as only
725         parameter.
726         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
727         comparing types.  Use c_type_promotes_to when promoting argument
728         types.
729         (finish_function): Use c_type_promotes_to when promoting argument
730         types.
731         (build_null_declspecs): Handle atomic_p in declspecs.
732         (declspecs_add_qual): Handle RID_ATOMIC.
733         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
734         (c_token_starts_declspecs): Handle RID_ATOMIC.
735         (c_parser_declspecs): Handle atomic type specifiers and
736         qualifiers.
737         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
738         from types of expressions with atomic type.
739         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
740         (c_parser_attribute_any_word): Handle RID_ATOMIC.
741         (c_parser_initializer, c_parser_initelt, c_parser_initval)
742         (c_parser_statement_after_labels, c_parser_switch_statement)
743         (c_parser_for_statement, c_parser_expr_no_commas)
744         (c_parser_conditional_expression, c_parser_binary_expression)
745         (c_parser_cast_expression, c_parser_unary_expression)
746         (c_parser_postfix_expression)
747         (c_parser_postfix_expression_after_primary, c_parser_expression):
748         Use convert_lvalue_to_rvalue.
749         (c_parser_expression_conv, c_parser_expr_list): Document
750         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
751         (c_parser_objc_synchronized_statement): Use
752         convert_lvalue_to_rvalue.
753         (c_parser_objc_selector): Handle RID_ATOMIC.
754         (c_parser_objc_receiver, c_parser_array_notation): Use
755         convert_lvalue_to_rvalue.
756         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
757         _Atomic (type-name).
758         (struct c_declspecs): Add atomic_p field.
759         (convert_lvalue_to_rvalue): Declare.
760         * c-typeck.c (c_type_promotes_to): Promote atomic types to
761         corresponding atomic types.
762         (qualify_type): Don't add _Atomic qualifiers from second argument.
763         (comp_target_types): Do not allow _Atomic mismatches.
764         (type_lists_compatible_p): Do not remove atomic qualifiers when
765         comparing types.
766         (really_atomic_lvalue, convert_lvalue_to_rvalue)
767         (build_atomic_assign): New functions.
768         (build_unary_op): Use build_atomic_assign for atomic increment and
769         decrement.
770         (build_conditional_expr): Do not treat _Atomic void as a qualified
771         version of void.
772         (build_modify_expr): Use build_atomic_assign for atomic LHS.
773         (find_anonymous_field_with_type, convert_to_anonymous_field)
774         (convert_for_assignment): Do not remove atomic qualifiers when
775         comparing types.
776         (digest_init): Do not accept initialization of arrays of atomic
777         elements by string constants.
778         (build_asm_expr): Use convert_lvalue_to_rvalue.
779         (build_binary_op): Do not treat _Atomic void as a qualified
780         version of void.
782 2013-11-06  DJ Delorie  <dj@redhat.com>
784         * c-decl.c (locate_old_decl): If a previous conflicting decl is
785         both explicit and builtin, print the location of the explicit one.
787 2013-11-05  Tobias Burnus  <burnus@net-b.de>
789         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
790         c_parser_omp_distribute, c_parser_omp_teams,
791         c_parser_omp_target, c_parser_omp_declare): Handle
792         -fopenmp-simd.
794 2013-11-03  Marek Polacek  <polacek@redhat.com>
796         * c-decl.c (grokdeclarator): Add VLA instrumentation.
798 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
800         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
801         check_dup_generic at the end, unless remove is true.
802         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
803         remove = true;.
804         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
806 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
808         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
809         with decl that is not pointer nor array.
811 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
813         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
814         a spawning function is found.
815         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
816         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
817         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
818         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
819         case.
820         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
821         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
822         expr.
823         (c_finish_return): Added a check to reject _Cilk_spawn in return
824         expression.
825         (build_cilk_spawn): New function.
826         (build_cilk_sync): Likewise.
827         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
828         
829 2013-10-27  Tobias Burnus  <burnus@net-b.de>
831         PR other/33426
832         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
833         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
834         (c_parser_statement_after_labels): Update calls.
836 2013-10-24  Tobias Burnus  <burnus@net-b.de>
838         PR other/33426
839         * c-parser.c (c_parser_pragma, c_parser_for_statement):
840         Handle PRAGMA_IVDEP.
841         (c_parser_statement_after_labels): Update call.
843 2013-10-24  Marek Polacek  <polacek@redhat.com>
845         * c-parser.c (c_parser_struct_declaration): Add a comment.
846         (c_parser_declarator): Don't allow _Alignas here.
848 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
850         * c-parser.c: Include omp-low.h.
851         * c-typeck.c: Likewise.
853 2013-10-17  Marek Polacek  <polacek@redhat.com>
855         PR c/58267
856         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
857         Document syntax of the array-declarator.
858         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
859         are not permitted.
860         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
861         (c_parser_struct_declaration): Likewise.
862         (c_parser_declarator): Likewise.
863         (c_parser_direct_declarator_inner): Likewise.
864         (c_parser_parameter_declaration): Likewise.
865         (c_parser_type_name): Likewise.
867 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
869         * c-lang.h (current_omp_declare_target_attribute): New extern
870         decl.
871         * c-parser.c: Include c-lang.h.
872         (struct c_parser): Change tokens to c_token *.
873         Add tokens_buf field.  Change tokens_avail type to unsigned int.
874         (c_parser_consume_token): If parser->tokens isn't
875         &parser->tokens_buf[0], increment parser->tokens.
876         (c_parser_consume_pragma): Likewise.
877         (enum pragma_context): Add pragma_struct and pragma_param.
878         (c_parser_external_declaration): Adjust
879         c_parser_declaration_or_fndef caller.
880         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
881         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
882         Adjust recursive call.
883         (c_parser_struct_or_union_specifier): Use pragma_struct instead
884         of pragma_external.
885         (c_parser_parameter_declaration): Use pragma_param instead of
886         pragma_external.
887         (c_parser_compound_statement_nostart, c_parser_label,
888         c_parser_for_statement): Adjust
889         c_parser_declaration_or_fndef callers.
890         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
891         it through to c_parser_conditional_expression.
892         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
893         pass it through to c_parser_binary_expression.  Adjust recursive
894         call.
895         (c_parser_binary_expression): Remove prec argument, add
896         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
897         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
898         binop matches it, use build2 instead of parser_build_binary_op.
899         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
900         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
901         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
902         Handle pragma_struct and pragma_param the same as pragma_external.
903         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
904         (c_parser_omp_variable_list): Parse array sections for
905         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
906         (c_parser_omp_clause_collapse): Fully fold collapse expression.
907         (c_parser_omp_clause_reduction): Handle user defined reductions.
908         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
909         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
910         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
911         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
912         c_parser_omp_clause_depend, c_parser_omp_clause_map,
913         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
914         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
915         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
916         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
917         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
918         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
919         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
920         (c_parser_omp_for_loop): Add CODE argument, pass it through
921         to c_finish_omp_for.  Change last argument to cclauses,
922         and adjust uses to grab parallel clauses from the array of all
923         the split clauses.  Adjust c_parser_binary_expression,
924         c_parser_declaration_or_fndef and c_finish_omp_for callers.
925         (omp_split_clauses): New function.
926         (c_parser_omp_simd): New function.
927         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
928         Allow the function to be called also when parsing combined constructs,
929         and call c_parser_omp_simd when parsing for simd.
930         (c_parser_omp_sections_scope): If section-sequence doesn't start with
931         #pragma omp section, require exactly one structured-block instead of
932         sequence of statements.
933         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
934         Allow the function to be called also when parsing combined constructs.
935         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
936         Allow the function to be called also when parsing combined
937         constructs.
938         (c_parser_omp_taskgroup, c_parser_omp_cancel,
939         c_parser_omp_cancellation_point, c_parser_omp_distribute,
940         c_parser_omp_teams, c_parser_omp_target_data,
941         c_parser_omp_target_update, c_parser_omp_target,
942         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
943         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
944         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
945         (c_parser_omp_construct): Add p_name and mask vars.  Handle
946         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
947         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
948         and c_parser_omp_sections callers.
949         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
950         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
951         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
952         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
953         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
954         OMP_CLAUSE_DEPEND.
955         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
956         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
957         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
958         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
959         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
960         * c-typeck.c: Include tree-inline.h.
961         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
962         handle_omp_array_sections_1, handle_omp_array_sections,
963         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
964         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
965         user defined reductions.
966         (c_tree_equal): New function.
967         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
968         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
969         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
970         c_check_omp_declare_reduction_r): New prototypes.
971         * c-decl.c (current_omp_declare_target_attribute): New variable.
972         (c_decl_attributes): New function.
973         (start_decl, start_function): Use it instead of decl_attributes.
974         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
975         c_omp_reduction_decl, c_omp_reduction_lookup,
976         c_check_omp_declare_reduction_r): New functions.
978 2013-09-25  Tom Tromey  <tromey@redhat.com>
980         * Make-lang.in (c/gccspec.o): Remove.
981         (CFLAGS-c/gccspec.o): New variable.
982         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
983         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
984         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
986 2013-09-25  Tom Tromey  <tromey@redhat.com>
988         * Make-lang.in (c/gccspec.o): Don't use subshell.
990 2013-09-18  Marek Polacek  <polacek@redhat.com>
992         PR sanitize/58443
993         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
994         Remove unnecessary check.
996 2013-09-18  Marek Polacek  <polacek@redhat.com>
998         PR sanitizer/58411
999         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1000         no_sanitize_undefined attribute.
1002 2013-09-13  Kai Tietz  <ktietz@redhat.com>
1004         PR target/57848
1005         * c-decl.c (c_builtin_function_ext_scope): Remove
1006         wrong assumption that it is never called on prexisting
1007         symbol.
1009 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
1011         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1013 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1015         * c-objc-common.c (c_tree_printer): Tidy.
1017 2013-08-30  Marek Polacek  <polacek@redhat.com>
1019         * c-typeck.c (build_binary_op): Add division by zero and shift
1020         instrumentation.
1022 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
1023             Joseph Myers  <joseph@codesourcery.com>
1025         PR c/35649
1026         * c-typeck.c (c_common_type): Prefer double_type_node over
1027         other REAL_TYPE types with the same precision.
1028         (convert_arguments): Likewise.
1030 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1032         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1033         (c_initialize_diagnostics): Call a destructor for the early printer.
1035 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1037         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1038         printer initialization.
1040 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1042         PR c/57490
1043         * c-array-notation.c (fix_conditional_array_notations_1): Added a
1044         check for truth values.
1045         (expand_array_notation_exprs): Added truth values case.  Removed an
1046         unwanted else.  Added for-loop to walk through subtrees in default
1047         case.
1049 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1051         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1053 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
1055         * c-parser.c (struct c_generic_association): Fix typo.
1057 2013-07-23  Tom Tromey  <tromey@redhat.com>
1058             Joseph Myers  <joseph@codesourcery.com>
1060         * c-parser.c (struct c_generic_association): New.
1061         (c_generic_association_d): New typedef.
1062         (c_parser_generic_selection): New function.
1063         (c_parser_postfix_expression): Handle RID_GENERIC.
1065 2013-07-13  Jason Merrill  <jason@redhat.com>
1067         PR c++/57793
1068         * c-decl.c (finish_struct): Check for too-large class.
1070 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
1072         PR c/57821
1073         * c-typeck.c (set_init_index): When folding, check for index overflow.
1075 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1077         * c-parser.c (c_parser_array_notation): Removed rejection of array
1078         notations in an array of function pointers.
1080 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1082         * c-array-notation.c (make_triplet_val_inv): New function.
1083         (create_cmp_incr): Likewise.
1084         (create_array_refs): Likewise.
1085         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1086         Also modularized common parts between functions and called the function.
1087         (build_array_notation_expr): Likewise.
1088         (fix_conditional_array_notations_1): Likewise.
1089         (fix_array_notation_expr): Likewise.
1090         (fix_array_notation_call_expr): Likewise.
1092 2013-06-18  Marek Polacek  <polacek@redhat.com>
1094         PR c/57630
1095         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1097 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1099         * c-array-notation.c (build_array_notation_expr): Reject array notation
1100         mismatch between LHS and RHS even inside a call_expr.  Also, removed
1101         a couple while statements that were dead code.
1103 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1105         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1106         excessive precision expressions in function parameters.  Also removed
1107         couple unwanted while statements.
1109 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1111         * c-array-notation.c (expand_array_notation_exprs): Added
1112         ARRAY_NOTATION_REF case.
1113         
1114 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1116         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1117         function to c-family/array-notation-common.c.
1118         (is_cilkplus_reduce_builtin): Likewise.
1119         (find_rank): Likewise.
1120         (extract_array_notation_exprs): Likewise.
1121         (replace_array_notations): Likewise.
1122         (find_inv_trees): Likewise.
1123         (replace_inv_trees): Likewise.
1124         (contains_array_notation_expr): Likewise.
1125         (find_correct_array_notation_type): Likewise.
1126         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1127         (struct inv_list): Moved this to c-family/array-notation-common.c.
1128         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1129         
1130 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1132         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1133         reduction functions outside the for-loop.  Added a check if the fundecl
1134         is non-NULL.  Finally, removed an unwanted if-statement, and made the
1135         body unconditional.
1137 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1139         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1140         condition of the if-statement matches the rank of else-block and then-
1141         block when array notations are used.
1142         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1143         expression after the entire function body is parsed.
1144         (c_parser_expr_no_commas): Delayed creating array notation expressions
1145         to the end of function parsing.
1146         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1147         whole if-statement instead of just the condition.
1148         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
1150 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1152         PR c/57474
1153         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1154         array to NULL_TREE if they are unused.  Also added a check for the
1155         field to be NULL before its fields are used in future.
1156         
1157 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1159         PR bootstrap/57450
1160         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1161         (build_array_notation_expr): Likewise.
1163 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1165         * c-typeck.c (build_array_ref): Added a check to see if array's
1166         index is greater than one.  If true, then emit an error.
1167         (build_function_call_vec): Exclude error reporting and checking
1168         for builtin array-notation functions.
1169         (convert_arguments): Likewise.
1170         (c_finish_return): Added a check for array notations as a return
1171         expression.  If true, then emit an error.
1172         (c_finish_loop): Added a check for array notations in a loop
1173         condition.  If true then emit an error.
1174         (lvalue_p): Added a ARRAY_NOTATION_REF case.
1175         (build_binary_op): Added a check for array notation expr inside
1176         op1 and op0.  If present, we call another function to find correct
1177         type.
1178         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1179         * c-parser.c (c_parser_compound_statement): Check if array
1180         notation code is used in tree, if so, then transform them into
1181         appropriate C code.
1182         (c_parser_expr_no_commas): Check if array notation is used in LHS
1183         or RHS, if so, then build array notation expression instead of
1184         regular modify.
1185         (c_parser_postfix_expression_after_primary): Added a check for
1186         colon(s) after square braces, if so then handle it like an array
1187         notation.  Also, break up array notations in unary op if found.
1188         (c_parser_direct_declarator_inner): Added a check for array
1189         notation.
1190         (c_parser_compound_statement): Added a check for array notation in
1191         a stmt.  If one is present, then expand array notation expr.
1192         (c_parser_if_statement): Likewise.
1193         (c_parser_switch_statement): Added a check for array notations in
1194         a switch statement's condition.  If true, then output an error.
1195         (c_parser_while_statement): Similarly, but for a while.
1196         (c_parser_do_statement): Similarly, but for a do-while.
1197         (c_parser_for_statement): Similarly, but for a for-loop.
1198         (c_parser_unary_expression): Check if array notation is used in a
1199         pre-increment or pre-decrement expression.  If true, then expand
1200         them.
1201         (c_parser_array_notation): New function.
1202         * c-array-notation.c: New file.
1203         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1204         
1205 2013-05-23  Mike Stump  <mikestump@comcast.net>
1207         * c-typeck.c (convert_for_assignment): Handle references to memory
1208         spaces better.
1210 2013-05-16  Jason Merrill  <jason@redhat.com>
1212         * Make-lang.in (cc1$(exeext)): Use link mutex.
1214 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1216         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1217         to simply use OPT_Wpointer_arith.
1218         (build_unary_op): Likewise.
1220 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1222         PR c/19449
1223         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1224         argument.  If set, or it temporarily for parsing of the first
1225         argument into force_folding_builtin_constant_p.
1226         (c_parser_postfix_expression): Adjust callers.
1228 2013-03-21  Richard Biener  <rguenther@suse.de>
1230         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1231         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
1233 2013-02-12  Marek Polacek  <polacek@redhat.com>
1235         PR c/44938
1236         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1237         origtypes to NULL.
1239 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
1241         PR c/56078
1242         * c-typeck.c (set_nonincremental_init_from_string): If
1243         constructor_max_index is NULL, treat it as if tree_int_cst_lt
1244         returned false.
1245         (process_init_element): Likewise.
1247 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
1249         PR c++/55619
1250         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1251         argument, don't call default_function_array_conversion
1252         nor c_fully_fold here.
1253         (c_parser_asm_statement): Adjust callers.
1254         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1255         and outputs here, and call default_function_array_conversion
1256         on inputs that don't need to be addressable.
1258 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
1260         PR c/39464
1261         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1262         warning require that both c_common_unsigned_type as well as
1263         c_common_signed_type is the same for both mvl and mvr types.
1265 2012-11-16  Diego Novillo  <dnovillo@google.com>
1267         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1269         * c-common.c: Use new vec API in vec.h.
1270         * c-common.h: Likewise.
1271         * c-gimplify.c: Likewise.
1272         * c-pragma.c: Likewise.
1273         * c-pretty-print.c: Likewise.
1274         * c-pretty-print.h: Likewise.
1275         * c-semantics.c: Likewise.
1276         * c-decl.c: Likewise.
1277         * c-parser.c: Likewise.
1278         * c-tree.h: Likewise.
1279         * c-typeck.c: Likewise.
1281 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
1283         PR c++/54930
1284         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1286 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1288         PR c/53066
1289         * c-decl.c (warn_if_shadowing): Do not warn if a variable
1290         shadows a function, unless the variable is a function or a
1291         pointer-to-function.
1293 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
1295         PR c/54381
1296         * c-parser.c (struct c_tree_loc_pair): Removed.
1297         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1298         add location_t * and tree * arguments, fill in array of 3
1299         sizeof_arg trees and corresponding locs.
1300         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1301         c_parser_expr_list callers.
1302         (c_parser_postfix_expression_after_primary): Likewise.  Pass
1303         array of 3 sizeof_arg trees and locs (corresponding to first
1304         3 arguments) to sizeof_pointer_memaccess_warning.
1306 2012-10-09  Lawrence Crowl  <crowl@google.com>
1308         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1309         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1310         hash table.
1312 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
1314         PR c++/54194
1315         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1316         call.
1318 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
1320         PR c++/54427
1321         * c-typeck.c: Include c-common.h.
1322         (enum stv_conv): Moved to c-common.h.
1323         (scalar_to_vector): Moved to c-common.c.
1324         (build_binary_op): Adapt to scalar_to_vector's new prototype.
1325         * Make-lang.in: c-typeck.c depends on c-common.h.
1327 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
1329         * c-decl.c (c_write_global_declarations): Fix handling of
1330         -fdump-ada-spec*.
1332 2012-09-30  Sharad Singhai  <singhai@google.com>
1334         * c-decl.c (c_write_global_declarations): Use a different method
1335         to determine if the dump has ben initialized.
1337 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1339         PR c/54552
1340         * c-typeck.c (c_cast_expr): When casting to a type requiring
1341         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1342         c_fully_fold first.
1344 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1346         PR c/54103
1347         * c-typeck.c (build_unary_op): Pass original argument of
1348         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1349         any C_MAYBE_CONST_EXPR, if it has integer operands.
1350         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1351         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1352         to c_objc_common_truthvalue_conversion, then remove any
1353         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
1354         c_objc_common_truthvalue_conversion not
1355         c_common_truthvalue_conversion.
1356         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1357         call note_integer_operands for arguments with integer operands
1358         that are not integer constants.
1360 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
1362         PR c/54559
1363         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1364         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1366 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
1368         PR c/54428
1369         * c-convert.c (convert): Don't call fold_convert_loc if
1370         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1371         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
1372         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1374 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
1376         PR c/54355
1377         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1378         for nested and empty_ok arguments in the call to
1379         c_parser_declaration_or_fndef.
1381 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
1383         * c-tree.h (c_last_sizeof_arg): Declare.
1384         * c-parser.c (struct c_tree_loc_pair): New type.
1385         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
1386         non-NULL.
1387         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1388         (c_parser_postfix_expression_after_primary): Likewise.  Call
1389         sizeof_pointer_memaccess_warning if needed.
1390         (sizeof_ptr_memacc_comptypes): New function.
1391         * c-typeck.c (c_last_sizeof_arg): New global variable.
1392         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1394 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
1396         * c-lang.h (lang_decl): Add variable_size GTY option.
1398 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1400         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1401         * Make-lang.in: Fix dependencies.
1403 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
1405         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1406         and add language Makefile hooks.
1407         * config-lang.in: New file.
1408         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1409         add the required "normal" config-lang.in rules.
1410         * c-lang.h: Moved from gcc/ to here.
1411         * c-tree.h: Likewise.
1412         * c-objc-common.c: Likewise.
1413         * c-objc-common.h: Likewise.
1414         * c-typeck.c: Likewise.
1415         * c-convert.c: Likewise.
1416         * c-lang.c: Likewise.
1417         * c-aux-info.c: Likewise.
1418         * c-errors.c: Likewise.
1419         * gccspec.c: Likewise.
1420         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
1421         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
1423 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1425 Copying and distribution of this file, with or without modification,
1426 are permitted in any medium without royalty provided the copyright
1427 notice and this notice are preserved.