* c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
[official-gcc.git] / gcc / c / ChangeLog
blob919b4ff5f5ff99612b12c3e860fca2e739404537
1 2014-05-10  Marek Polacek  <polacek@redhat.com>
3         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4         maybe_warn_string_init.
5         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6         maybe_warn_string_init.
7         * c-tree.h (maybe_warn_string_init): Update declaration.
8         * c-typeck.c (maybe_warn_string_init): Add location parameter.
9         Call pedwarn_init with loc instead of with input_location.
10         (digest_init): Pass init_loc to maybe_warn_string_init.
11         (pop_init_level): Call pedwarn_init with loc instead of with
12         input_location.
13         (set_init_index): Likewise.
14         (process_init_element): Likewise.
16 2014-05-09  Marek Polacek  <polacek@redhat.com>
18         PR c/61096
19         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
20         (c_parser_initelt): Pass location to set_init_label.  Pass array index
21         location to set_init_index.
22         * c-tree.h (push_init_level): Update declaration.
23         (pop_init_level): Likewise.
24         (set_init_index): Likewise.
25         (set_init_label): Likewise.
26         * c-typeck.c (error_init): Add location parameter.  Call error_at
27         instead of error.
28         (digest_init): Pass init_loc to error_init.
29         (really_start_incremental_init):
30         (push_init_level): Add location parameter.  Pass loc to pop_init_level
31         and error_init.
32         (pop_init_level): Likewise.
33         (set_designator): Add location parameter.  Pass loc to pop_init_level,
34         push_init_level, and error_init.
35         (set_init_index): Add location parameter.  Pass loc to error_init and
36         set_designator.
37         (set_init_label): Likewise.
38         (output_init_element): Pass loc to error_init.
39         (process_init_element): Pass loc to error_init, pop_init_level,
40         pedwarn_init, and push_init_level.
42 2014-05-09  Marek Polacek  <polacek@redhat.com>
44         PR c/50459
45         * c-parser.c (c_parser_attributes): Parse the arguments as an
46         expression-list if the attribute takes identifier.
48 2014-05-08  Marek Polacek  <polacek@redhat.com>
50         PR c/61053
51         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
52         TYPE_ALIGN_UNIT.
54 2014-05-08  Marek Polacek  <polacek@redhat.com>
56         PR c/61077
57         * c-decl.c (start_function): Warn for _Atomic-qualified return type
58         of main.
60 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
61             Mike Stump  <mikestump@comcast.net>
62             Richard Sandiford  <rdsandiford@googlemail.com>
64         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
65         (finish_enum): Use wide-int interfaces.
66         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
67         * c-typeck.c (build_c_cast): Likewise.
68         (set_nonincremental_init_from_string): Likewise.
69         (c_tree_equal): Likewise.
71 2014-05-02  Marek Polacek  <polacek@redhat.com>
73         PR c/25801
74         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
75         Return size_one_node when the type is not complete.
76         (pointer_diff): Remove comment.
77         (build_unary_op): Improve error messages.
79 2014-05-02  Marek Polacek  <polacek@redhat.com>
81         * c-typeck.c (c_finish_return): Separate warning_at calls.
83 2014-05-02  Marek Polacek  <polacek@redhat.com>
85         * c-tree.h (error_init): Remove declaration.
86         (pedwarn_init): Likewise.
87         * c-typeck.c (error_init): Make static and move above.
88         (pedwarn_init): Likewise.
89         (warning_init): Move above.
90         (maybe_warn_string_init): Likewise.
92 2014-05-01  Jeff Law  <law@redhat.com>
94         Revert:
96         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
97         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
98         avoid goto.
100 2014-05-02  Marek Polacek  <polacek@redhat.com>
102         PR c/60784
103         * c-typeck.c (push_init_level): Set constructor_designated to
104         p->designated for structures.
106 2014-05-01  Marek Polacek  <polacek@redhat.com>
108         PR c/60915
109         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
110         function-definition has an attribute after the declarator.
112 2014-05-01  Marek Polacek  <polacek@redhat.com>
114         PR c/60257
115         * c-typeck.c (warning_init): Add location_t parameter.  Call
116         warning_at instead of warning.
117         (push_init_level): Pass input_location to warning_init.
118         (add_pending_init): Add location_t parameter.  Pass loc to
119         warning_init.
120         (set_nonincremental_init): Pass input_location to add_pending_init.
121         (set_nonincremental_init_from_string): Likewise.
122         (output_init_element): Pass loc to warning_init and to
123         add_pending_init.
125 2014-05-01  Marek Polacek  <polacek@redhat.com>
127         PR c/43395
128         * c-typeck.c (c_finish_return): Distinguish between label and variable
129         when warning about returning local address.
131 2014-05-01  Marek Polacek  <polacek@redhat.com>
133         PR c/29467
134         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
135         in C89 mode.
137 2014-05-01  Marek Polacek  <polacek@redhat.com>
139         PR c/43245
140         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
141         instead of 0 to WARN_FOR_QUALIFIERS.
143 2014-05-01  Marek Polacek  <polacek@redhat.com>
145         PR c/56989
146         * c-typeck.c (default_conversion): Use better location for
147         error call.
149 2014-04-30  Marek Polacek  <polacek@redhat.com>
151         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
152         also when SANITIZE_FLOAT_DIVIDE is on.
154 2014-04-30  Marek Polacek  <polacek@redhat.com>
156         PR c/60139
157         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
158         and pedwarn_init.  Use loc insted of input_location.
160 2014-04-30  Marek Polacek  <polacek@redhat.com>
162         PR c/60351
163         * c-typeck.c (build_binary_op): Use location when warning about
164         shift count.
166 2014-04-25  Marek Polacek  <polacek@redhat.com>
168         PR c/18079
169         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
170         always_inline/noinline and hot/cold attributes.
172 2014-04-25  Marek Polacek  <polacek@redhat.com>
174         PR c/60114
175         * c-parser.c (c_parser_initelt): Pass input_location to
176         process_init_element.
177         (c_parser_initval): Pass loc to process_init_element.
178         * c-tree.h (process_init_element): Adjust declaration.
179         * c-typeck.c (push_init_level): Pass input_location to
180         process_init_element.
181         (pop_init_level): Likewise.
182         (set_designator): Likewise.
183         (output_init_element): Add location_t parameter.  Pass loc to
184         digest_init.
185         (output_pending_init_elements): Pass input_location to
186         output_init_element.
187         (process_init_element): Add location_t parameter.  Pass loc to
188         output_init_element.
190 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
192         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
193         atomic-clause, allow comma in between atomic-clause and
194         seq_cst.
196 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
198         PR c/59073
199         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
200         fails, don't set OM_PARALLEL_COMBINED and return NULL.
202 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
204         PR middle-end/60469
205         * c-array-notation.c (fix_builtin_array_notation_fn): Use
206         create_tmp_var instead build_decl for creating temps.
207         (build_array_notation_expr): Likewise.
208         (fix_conditional_array_notations_1): Likewise.
209         (fix_array_notation_expr): Likewise.
210         (fix_array_notation_call_expr): Likewise.
212 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
214         PR c++/60689
215         * c-tree.h (c_build_function_call_vec): New prototype.
216         * c-typeck.c (build_function_call_vec): Don't call
217         resolve_overloaded_builtin here.
218         (c_build_function_call_vec): New wrapper function around
219         build_function_call_vec.  Call resolve_overloaded_builtin here.
220         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
221         Call c_build_function_call_vec instead of build_function_call_vec.
222         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
223         * c-decl.c (finish_decl): Likewise.
225 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
227         PR c/55383
228         * c-typeck.c: Use correct format string in cast-qual warning
230 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
232         * c-decl.c (c_decl_attributes): Use
233         lang_hooks.types.omp_mappable_type.
234         * c-typeck.c (c_finish_omp_clauses): Likewise.
236 2014-03-06  Marek Polacek  <polacek@redhat.com>
238         PR c/60197
239         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
240         of checking tree code.
242 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
244         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
245         (c_parser_parameter_declaration): Likewise.
247 2014-02-19  Marek Polacek  <polacek@redhat.com>
249         PR c/60195
250         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
251         Call mark_exp_read on exp.value.
252         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
253         TREE_ADDRESSABLE on old instead of val.
254         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
256 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
258         * c-parser.c (c_parser_get_builtin_args): Replace calls to
259         C_EXPR_APPEND by vec_safe_push.
260         * c-tree.h (C_EXPR_APPEND): Remove.
262 2014-01-31  Marek Polacek  <polacek@redhat.com>
264         PR c/59963
265         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
266         build_function_call_vec.
267         (build_function_call): Likewise.
268         (build_atomic_assign): Likewise.
269         (build_function_call_vec): Add arg_loc parameter.  Use it.
270         (convert_arguments): Likewise.
271         (convert_for_assignment): Rename rhs_loc to expr_loc.
272         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
273         (c_parser_objc_keywordexpr): Likewise.
274         (c_parser_postfix_expression_after_primary): Call
275         build_function_call_vec with expr_loc rather than op_loc.
276         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
277         build_function_call_vec.
278         (c_parser_expr_list): Add locations parameter.  Fill it with locations
279         of function arguments.
280         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
282 2014-01-30  Marek Polacek  <polacek@redhat.com>
284         PR c/59940
285         * c-typeck.c (build_function_call_vec): Use loc parameter.
286         (convert_arguments): Add location parameter.  Use it.
287         (ep_convert_and_check): Likewise.
288         (build_atomic_assign): Adjust convert_for_assignment call.
289         (build_modify_expr): Likewise.
290         (digest_init): Likewise.
291         (c_finish_return): Likewise.
292         (build_conditional_expr): Adjust ep_convert_and_check calls.
293         (convert_for_assignment): Add rhs_loc parameter.  Use it.
294         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
295         calls.
297 2014-01-30  Richard Biener  <rguenther@suse.de>
299         PR c/59905
300         * c-typeck.c (build_function_call_vec): Do not replace calls
301         to a function via an incompatible type with a runtime abort.
303 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
305         * c-parser.c (c_parser_declaration_or_fndef): Replaced
306         flag_enable_cilkplus with flag_cilkplus.
307         (c_parser_direct_declarator_inner): Likewise.
308         (c_parser_attribute_any_word): Likewise.
309         (c_parser_attributes): Likewise.
310         (c_parser_compound_statement): Likewise.
311         (c_parser_statement_after_labels): Likewise.
312         (c_parser_if_statement): Likewise.
313         (c_parser_switch_statement): Likewise.
314         (c_parser_do_statement): Likewise.
315         (c_parser_for_statement): Likewise.
316         (c_parser_unary_expression): Likewise.
317         (c_parser_postfix_expression): Likewise.
318         (c_parser_postfix_expression_after_primary): Likewise.
319         (c_parser_postfix_expression_after_primary): Likewise.
320         (c_parser_omp_clause_name): Likewise.
321         (c_finish_omp_declare_simd): Likewise.
322         (c_parser_cilk_verify_simd): Likewise.
323         * c-typeck.c (build_array_ref): Likewise.
324         (build_function_call_vec): Likewise.
325         (convert_arguments): Likewise.
326         (build_compound_expr): Likewise.
327         (c_finish_return): Likewise.
328         (c_finish_if_stmt): Likewise.
329         (c_finish_loop): Likewise.
330         (build_binary_op): Likewise.
332 2014-01-23  Marek Polacek  <polacek@redhat.com>
334         PR c/59846
335         * c-typeck.c (parser_build_binary_op): Use location instead of
336         input_location.
337         (build_binary_op): Pass location to shorten_compare.
339 2014-01-23  Marek Polacek  <polacek@redhat.com>
341         PR c/58346
342         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
343         an empty aggregate.
345 2014-01-23  Marek Polacek  <polacek@redhat.com>
347         PR c/59871
348         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
349         of a comma expression.
350         (emit_side_effect_warnings): Likewise.
352 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
354         PR c/59825
355         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
356         function to use walk_tree and moved a lot of its functionality to
357         expand_array_notations.
358         (expand_array_notations): New function.
360 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
362         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
363         attribute an attribute without value.
365 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
367         PR middle-end/58809
368         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
369         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
371 2014-01-22  Marek Polacek  <polacek@redhat.com>
373         PR c/59891
374         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
375         of remove_c_maybe_const_expr on op1 and op2.
377 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
379         PR c/58943
380         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
381         effects, preevaluate rhs using SAVE_EXPR first.
383 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
385         PR c++/59631
386         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
387         statements with if-elseif statements.
389 2014-01-06  Marek Polacek  <polacek@redhat.com>
391         PR c/57773
392         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
393         defined bit-field types only in ISO C.
395 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
397         Update copyright years
399 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
401         * c-array-notation.c: Use the standard form for the copyright notice.
403 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
405         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
406         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
407         field in parser is not empty.  If not-empty, call the function
408         c_parser_finish_omp_declare_simd.
409         (c_parser_cilk_clause_vectorlength): Modified function to be shared
410         between SIMD-enabled functions and #pragma simd.  Added new parameter.
411         (c_parser_cilk_all_clauses): Modified the usage of the function
412         c_parser_cilk_clause_vectorlength as mentioned above.
413         (c_parser_cilk_simd_fn_vector_attrs): New function.
414         (c_finish_cilk_simd_fn_tokens): Likewise.
415         (is_cilkplus_vector_p): Likewise.
416         (c_parser_omp_clause_name): Added checking for "vectorlength,"
417         "nomask," and "mask" strings in clause name.
418         (c_parser_omp_all_clauses): Added 3 new case statements:
419         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
420         PRAGMA_CILK_CLAUSE_NOMASK.
421         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
422         check for vector attribute and if so call the function
423         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
424         called the function c_finish_cilk_simd_fn_tokens.
425         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
426         parser field is non-empty.  If so, parse them as you would parse
427         the omp declare simd pragma.
428         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
429         Added a check when step is a parameter and flag it as error.
430         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
431         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
432         pragma_omp_clause.
434 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
436         * c-parser.c (c_parser_omp_parallel): Fix description.
438 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
440         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
441         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
442         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
443         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
445 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
447         PR c/52023
448         * c-parser.c (c_parser_alignas_specifier): Use
449         c_sizeof_or_alignof_type instead of c_alignof.
450         (c_parser_alignof_expression): Likewise, with min_alignof
451         parameter depending on alignof spelling used.
453 2013-12-04  Marek Polacek  <polacek@redhat.com>
455         PR c/54113
456         * c-decl.c (start_function): Don't warn for missing prototype for
457         inline functions.
459 2013-12-03  Marek Polacek  <polacek@redhat.com>
461         PR c/59351
462         * c-decl.c (build_compound_literal): Allow compound literals with
463         empty initial value.
465 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
467         PR c/58235
468         * c-typeck.c (build_modify_expr): Diagnose assignment to
469         expression with array type.
471 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
473         PR c/42262
474         * c-typeck.c (process_init_element): Do not treat a string as
475         initializing a whole array when used with a designator for an
476         individual element.
478 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
480         PR c/57574
481         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
482         an inline function following a static declaration.
484 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
486         PR c/59310
487         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
488         to p_name before calling c_parser_omp_teams instead of after.
489         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
490         argument.  Remove unused p_name variable.
492 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
493             Jakub Jelinek  <jakub@redhat.com>
495         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
496         external_scope is NULL.
498 2013-11-27  Tom de Vries  <tom@codesourcery.com>
499             Marc Glisse  <marc.glisse@inria.fr>
501         PR c++/59032
502         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
504 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
506         * c-typeck.c: Add required include files from gimple.h.
508 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
510         * c-decl.c (define_label, shadow_tag_warned)
511         (check_bitfield_type_and_width, grokdeclarator, grokparms,
512         store_parm_decls_newstyle, store_parm_decls_oldstyle)
513         (declspecs_add_type): Remove use of in_system_header macro.
514         * c-parser.c (c_parser_unary_expression): Likewise.
515         * c-typeck.c (store_init_value, process_init_element)
516         (c_start_case): Likewise.
518         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
519         macro.
521         * c-parser.c (c_parser_set_source_position_from_token): Remove
522         reference to in_system_header from comment.
524 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
526         * c-decl.c (grokdeclarator): Update comment to refer to
527         tree_to_[su]hwi rather than tree_low_cst.
529 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
531         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
532         tree_to_uhwi throughout.
534 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
536         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
537         throughout.
539 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
541         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
542         throughout.
544 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
546         * c-parser.c (c_parser_cilk_simd): New.
547         (c_parser_cilk_verify_simd): New.
548         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
549         (c_parser_omp_for_loop): Add case for NE_EXPR.
550         Set c_break_label for CILK_SIMD.
551         (c_parser_cilk_clause_vectorlength): New.
552         (c_parser_cilk_clause_linear): New.
553         (c_parser_cilk_clause_name): New.
554         (c_parser_cilk_all_clauses): New.
555         * c-typeck.c (build_unary_op): Pass location argument to
556         readonly_error.
557         (build_modify_expr): Same.
558         (build_asm_expr): Same.
559         (c_finish_bc_stmt): Error on break/continue in loops.
561 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
563         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
565 2013-11-14  Diego Novillo  <dnovillo@google.com>
567         * c-decl.c: Include print-tree.h.
568         Include stor-layout.h.
569         Include varasm.h.
570         Include attribs.h.
571         Include stringpool.h.
572         * c-lang.c: Include fold-const.h.
573         * c-parser.c: Include stringpool.h.
574         Include attribs.h.
575         Include stor-layout.h.
576         Include varasm.h.
577         Include trans-mem.h.
578         * c-typeck.c: Include stor-layout.h.
579         Include trans-mem.h.
580         Include varasm.h.
581         Include stmt.h.
583 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
585         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
586         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
587         __auto_type.
588         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
589         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
590         RID_AUTO_TYPE.
591         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
592         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
593         (c_parser_declarator, c_parser_direct_declarator_inner)
594         (c_parser_parameter_declaration, c_parser_type_name): All callers
595         changed.
596         (c_parser_declaration_or_fndef): Handle declarations with type
597         determined from the initializer.
599 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
601         * c-typeck.c: Include gimplify.h.
603 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
605         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
606         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
607         comment.
608         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
609         or _Thread_local as appropriate in diagnostics.
610         (build_null_declspecs): Initialize ret->thread_gnu_p.
611         (declspecs_add_scspec): Handle either __thread or _Thread_local
612         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
613         pedantic.  Do not disallow _Thread_local extern and _Thread_local
614         static.
616 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
617             Andrew MacLeod  <amacleod@redhat.com>
619         * c-aux-info.c (gen_type): Handle atomic qualifier.
620         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
621         qualifiers when compating types.
622         (shadow_tag_warned): Handle atomic_p in declspecs.
623         (quals_from_declspecs): Likewise.
624         (start_decl): Use c_type_promotes_to when promoting argument
625         types.
626         (grokdeclarator): Handle _Atomic.
627         (get_parm_info): Diagnose any qualifier on "void" as only
628         parameter.
629         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
630         comparing types.  Use c_type_promotes_to when promoting argument
631         types.
632         (finish_function): Use c_type_promotes_to when promoting argument
633         types.
634         (build_null_declspecs): Handle atomic_p in declspecs.
635         (declspecs_add_qual): Handle RID_ATOMIC.
636         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
637         (c_token_starts_declspecs): Handle RID_ATOMIC.
638         (c_parser_declspecs): Handle atomic type specifiers and
639         qualifiers.
640         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
641         from types of expressions with atomic type.
642         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
643         (c_parser_attribute_any_word): Handle RID_ATOMIC.
644         (c_parser_initializer, c_parser_initelt, c_parser_initval)
645         (c_parser_statement_after_labels, c_parser_switch_statement)
646         (c_parser_for_statement, c_parser_expr_no_commas)
647         (c_parser_conditional_expression, c_parser_binary_expression)
648         (c_parser_cast_expression, c_parser_unary_expression)
649         (c_parser_postfix_expression)
650         (c_parser_postfix_expression_after_primary, c_parser_expression):
651         Use convert_lvalue_to_rvalue.
652         (c_parser_expression_conv, c_parser_expr_list): Document
653         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
654         (c_parser_objc_synchronized_statement): Use
655         convert_lvalue_to_rvalue.
656         (c_parser_objc_selector): Handle RID_ATOMIC.
657         (c_parser_objc_receiver, c_parser_array_notation): Use
658         convert_lvalue_to_rvalue.
659         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
660         _Atomic (type-name).
661         (struct c_declspecs): Add atomic_p field.
662         (convert_lvalue_to_rvalue): Declare.
663         * c-typeck.c (c_type_promotes_to): Promote atomic types to
664         corresponding atomic types.
665         (qualify_type): Don't add _Atomic qualifiers from second argument.
666         (comp_target_types): Do not allow _Atomic mismatches.
667         (type_lists_compatible_p): Do not remove atomic qualifiers when
668         comparing types.
669         (really_atomic_lvalue, convert_lvalue_to_rvalue)
670         (build_atomic_assign): New functions.
671         (build_unary_op): Use build_atomic_assign for atomic increment and
672         decrement.
673         (build_conditional_expr): Do not treat _Atomic void as a qualified
674         version of void.
675         (build_modify_expr): Use build_atomic_assign for atomic LHS.
676         (find_anonymous_field_with_type, convert_to_anonymous_field)
677         (convert_for_assignment): Do not remove atomic qualifiers when
678         comparing types.
679         (digest_init): Do not accept initialization of arrays of atomic
680         elements by string constants.
681         (build_asm_expr): Use convert_lvalue_to_rvalue.
682         (build_binary_op): Do not treat _Atomic void as a qualified
683         version of void.
685 2013-11-06  DJ Delorie  <dj@redhat.com>
687         * c-decl.c (locate_old_decl): If a previous conflicting decl is
688         both explicit and builtin, print the location of the explicit one.
690 2013-11-05  Tobias Burnus  <burnus@net-b.de>
692         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
693         c_parser_omp_distribute, c_parser_omp_teams,
694         c_parser_omp_target, c_parser_omp_declare): Handle
695         -fopenmp-simd.
697 2013-11-03  Marek Polacek  <polacek@redhat.com>
699         * c-decl.c (grokdeclarator): Add VLA instrumentation.
701 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
703         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
704         check_dup_generic at the end, unless remove is true.
705         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
706         remove = true;.
707         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
709 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
711         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
712         with decl that is not pointer nor array.
714 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
716         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
717         a spawning function is found.
718         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
719         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
720         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
721         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
722         case.
723         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
724         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
725         expr.
726         (c_finish_return): Added a check to reject _Cilk_spawn in return
727         expression.
728         (build_cilk_spawn): New function.
729         (build_cilk_sync): Likewise.
730         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
731         
732 2013-10-27  Tobias Burnus  <burnus@net-b.de>
734         PR other/33426
735         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
736         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
737         (c_parser_statement_after_labels): Update calls.
739 2013-10-24  Tobias Burnus  <burnus@net-b.de>
741         PR other/33426
742         * c-parser.c (c_parser_pragma, c_parser_for_statement):
743         Handle PRAGMA_IVDEP.
744         (c_parser_statement_after_labels): Update call.
746 2013-10-24  Marek Polacek  <polacek@redhat.com>
748         * c-parser.c (c_parser_struct_declaration): Add a comment.
749         (c_parser_declarator): Don't allow _Alignas here.
751 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
753         * c-parser.c: Include omp-low.h.
754         * c-typeck.c: Likewise.
756 2013-10-17  Marek Polacek  <polacek@redhat.com>
758         PR c/58267
759         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
760         Document syntax of the array-declarator.
761         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
762         are not permitted.
763         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
764         (c_parser_struct_declaration): Likewise.
765         (c_parser_declarator): Likewise.
766         (c_parser_direct_declarator_inner): Likewise.
767         (c_parser_parameter_declaration): Likewise.
768         (c_parser_type_name): Likewise.
770 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
772         * c-lang.h (current_omp_declare_target_attribute): New extern
773         decl.
774         * c-parser.c: Include c-lang.h.
775         (struct c_parser): Change tokens to c_token *.
776         Add tokens_buf field.  Change tokens_avail type to unsigned int.
777         (c_parser_consume_token): If parser->tokens isn't
778         &parser->tokens_buf[0], increment parser->tokens.
779         (c_parser_consume_pragma): Likewise.
780         (enum pragma_context): Add pragma_struct and pragma_param.
781         (c_parser_external_declaration): Adjust
782         c_parser_declaration_or_fndef caller.
783         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
784         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
785         Adjust recursive call.
786         (c_parser_struct_or_union_specifier): Use pragma_struct instead
787         of pragma_external.
788         (c_parser_parameter_declaration): Use pragma_param instead of
789         pragma_external.
790         (c_parser_compound_statement_nostart, c_parser_label,
791         c_parser_for_statement): Adjust
792         c_parser_declaration_or_fndef callers.
793         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
794         it through to c_parser_conditional_expression.
795         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
796         pass it through to c_parser_binary_expression.  Adjust recursive
797         call.
798         (c_parser_binary_expression): Remove prec argument, add
799         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
800         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
801         binop matches it, use build2 instead of parser_build_binary_op.
802         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
803         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
804         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
805         Handle pragma_struct and pragma_param the same as pragma_external.
806         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
807         (c_parser_omp_variable_list): Parse array sections for
808         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
809         (c_parser_omp_clause_collapse): Fully fold collapse expression.
810         (c_parser_omp_clause_reduction): Handle user defined reductions.
811         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
812         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
813         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
814         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
815         c_parser_omp_clause_depend, c_parser_omp_clause_map,
816         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
817         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
818         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
819         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
820         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
821         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
822         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
823         (c_parser_omp_for_loop): Add CODE argument, pass it through
824         to c_finish_omp_for.  Change last argument to cclauses,
825         and adjust uses to grab parallel clauses from the array of all
826         the split clauses.  Adjust c_parser_binary_expression,
827         c_parser_declaration_or_fndef and c_finish_omp_for callers.
828         (omp_split_clauses): New function.
829         (c_parser_omp_simd): New function.
830         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
831         Allow the function to be called also when parsing combined constructs,
832         and call c_parser_omp_simd when parsing for simd.
833         (c_parser_omp_sections_scope): If section-sequence doesn't start with
834         #pragma omp section, require exactly one structured-block instead of
835         sequence of statements.
836         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
837         Allow the function to be called also when parsing combined constructs.
838         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
839         Allow the function to be called also when parsing combined
840         constructs.
841         (c_parser_omp_taskgroup, c_parser_omp_cancel,
842         c_parser_omp_cancellation_point, c_parser_omp_distribute,
843         c_parser_omp_teams, c_parser_omp_target_data,
844         c_parser_omp_target_update, c_parser_omp_target,
845         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
846         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
847         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
848         (c_parser_omp_construct): Add p_name and mask vars.  Handle
849         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
850         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
851         and c_parser_omp_sections callers.
852         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
853         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
854         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
855         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
856         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
857         OMP_CLAUSE_DEPEND.
858         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
859         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
860         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
861         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
862         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
863         * c-typeck.c: Include tree-inline.h.
864         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
865         handle_omp_array_sections_1, handle_omp_array_sections,
866         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
867         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
868         user defined reductions.
869         (c_tree_equal): New function.
870         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
871         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
872         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
873         c_check_omp_declare_reduction_r): New prototypes.
874         * c-decl.c (current_omp_declare_target_attribute): New variable.
875         (c_decl_attributes): New function.
876         (start_decl, start_function): Use it instead of decl_attributes.
877         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
878         c_omp_reduction_decl, c_omp_reduction_lookup,
879         c_check_omp_declare_reduction_r): New functions.
881 2013-09-25  Tom Tromey  <tromey@redhat.com>
883         * Make-lang.in (c/gccspec.o): Remove.
884         (CFLAGS-c/gccspec.o): New variable.
885         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
886         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
887         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
889 2013-09-25  Tom Tromey  <tromey@redhat.com>
891         * Make-lang.in (c/gccspec.o): Don't use subshell.
893 2013-09-18  Marek Polacek  <polacek@redhat.com>
895         PR sanitize/58443
896         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
897         Remove unnecessary check.
899 2013-09-18  Marek Polacek  <polacek@redhat.com>
901         PR sanitizer/58411
902         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
903         no_sanitize_undefined attribute.
905 2013-09-13  Kai Tietz  <ktietz@redhat.com>
907         PR target/57848
908         * c-decl.c (c_builtin_function_ext_scope): Remove
909         wrong assumption that it is never called on prexisting
910         symbol.
912 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
914         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
916 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
918         * c-objc-common.c (c_tree_printer): Tidy.
920 2013-08-30  Marek Polacek  <polacek@redhat.com>
922         * c-typeck.c (build_binary_op): Add division by zero and shift
923         instrumentation.
925 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
926             Joseph Myers  <joseph@codesourcery.com>
928         PR c/35649
929         * c-typeck.c (c_common_type): Prefer double_type_node over
930         other REAL_TYPE types with the same precision.
931         (convert_arguments): Likewise.
933 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
935         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
936         (c_initialize_diagnostics): Call a destructor for the early printer.
938 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
940         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
941         printer initialization.
943 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
945         PR c/57490
946         * c-array-notation.c (fix_conditional_array_notations_1): Added a
947         check for truth values.
948         (expand_array_notation_exprs): Added truth values case.  Removed an
949         unwanted else.  Added for-loop to walk through subtrees in default
950         case.
952 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
954         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
956 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
958         * c-parser.c (struct c_generic_association): Fix typo.
960 2013-07-23  Tom Tromey  <tromey@redhat.com>
961             Joseph Myers  <joseph@codesourcery.com>
963         * c-parser.c (struct c_generic_association): New.
964         (c_generic_association_d): New typedef.
965         (c_parser_generic_selection): New function.
966         (c_parser_postfix_expression): Handle RID_GENERIC.
968 2013-07-13  Jason Merrill  <jason@redhat.com>
970         PR c++/57793
971         * c-decl.c (finish_struct): Check for too-large class.
973 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
975         PR c/57821
976         * c-typeck.c (set_init_index): When folding, check for index overflow.
978 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
980         * c-parser.c (c_parser_array_notation): Removed rejection of array
981         notations in an array of function pointers.
983 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
985         * c-array-notation.c (make_triplet_val_inv): New function.
986         (create_cmp_incr): Likewise.
987         (create_array_refs): Likewise.
988         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
989         Also modularized common parts between functions and called the function.
990         (build_array_notation_expr): Likewise.
991         (fix_conditional_array_notations_1): Likewise.
992         (fix_array_notation_expr): Likewise.
993         (fix_array_notation_call_expr): Likewise.
995 2013-06-18  Marek Polacek  <polacek@redhat.com>
997         PR c/57630
998         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1000 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1002         * c-array-notation.c (build_array_notation_expr): Reject array notation
1003         mismatch between LHS and RHS even inside a call_expr.  Also, removed
1004         a couple while statements that were dead code.
1006 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1008         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1009         excessive precision expressions in function parameters.  Also removed
1010         couple unwanted while statements.
1012 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1014         * c-array-notation.c (expand_array_notation_exprs): Added
1015         ARRAY_NOTATION_REF case.
1016         
1017 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1019         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1020         function to c-family/array-notation-common.c.
1021         (is_cilkplus_reduce_builtin): Likewise.
1022         (find_rank): Likewise.
1023         (extract_array_notation_exprs): Likewise.
1024         (replace_array_notations): Likewise.
1025         (find_inv_trees): Likewise.
1026         (replace_inv_trees): Likewise.
1027         (contains_array_notation_expr): Likewise.
1028         (find_correct_array_notation_type): Likewise.
1029         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1030         (struct inv_list): Moved this to c-family/array-notation-common.c.
1031         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1032         
1033 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1035         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1036         reduction functions outside the for-loop.  Added a check if the fundecl
1037         is non-NULL.  Finally, removed an unwanted if-statement, and made the
1038         body unconditional.
1040 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1042         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1043         condition of the if-statement matches the rank of else-block and then-
1044         block when array notations are used.
1045         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1046         expression after the entire function body is parsed.
1047         (c_parser_expr_no_commas): Delayed creating array notation expressions
1048         to the end of function parsing.
1049         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1050         whole if-statement instead of just the condition.
1051         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
1053 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1055         PR c/57474
1056         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1057         array to NULL_TREE if they are unused.  Also added a check for the
1058         field to be NULL before its fields are used in future.
1059         
1060 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1062         PR bootstrap/57450
1063         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1064         (build_array_notation_expr): Likewise.
1066 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1068         * c-typeck.c (build_array_ref): Added a check to see if array's
1069         index is greater than one.  If true, then emit an error.
1070         (build_function_call_vec): Exclude error reporting and checking
1071         for builtin array-notation functions.
1072         (convert_arguments): Likewise.
1073         (c_finish_return): Added a check for array notations as a return
1074         expression.  If true, then emit an error.
1075         (c_finish_loop): Added a check for array notations in a loop
1076         condition.  If true then emit an error.
1077         (lvalue_p): Added a ARRAY_NOTATION_REF case.
1078         (build_binary_op): Added a check for array notation expr inside
1079         op1 and op0.  If present, we call another function to find correct
1080         type.
1081         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1082         * c-parser.c (c_parser_compound_statement): Check if array
1083         notation code is used in tree, if so, then transform them into
1084         appropriate C code.
1085         (c_parser_expr_no_commas): Check if array notation is used in LHS
1086         or RHS, if so, then build array notation expression instead of
1087         regular modify.
1088         (c_parser_postfix_expression_after_primary): Added a check for
1089         colon(s) after square braces, if so then handle it like an array
1090         notation.  Also, break up array notations in unary op if found.
1091         (c_parser_direct_declarator_inner): Added a check for array
1092         notation.
1093         (c_parser_compound_statement): Added a check for array notation in
1094         a stmt.  If one is present, then expand array notation expr.
1095         (c_parser_if_statement): Likewise.
1096         (c_parser_switch_statement): Added a check for array notations in
1097         a switch statement's condition.  If true, then output an error.
1098         (c_parser_while_statement): Similarly, but for a while.
1099         (c_parser_do_statement): Similarly, but for a do-while.
1100         (c_parser_for_statement): Similarly, but for a for-loop.
1101         (c_parser_unary_expression): Check if array notation is used in a
1102         pre-increment or pre-decrement expression.  If true, then expand
1103         them.
1104         (c_parser_array_notation): New function.
1105         * c-array-notation.c: New file.
1106         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1107         
1108 2013-05-23  Mike Stump  <mikestump@comcast.net>
1110         * c-typeck.c (convert_for_assignment): Handle references to memory
1111         spaces better.
1113 2013-05-16  Jason Merrill  <jason@redhat.com>
1115         * Make-lang.in (cc1$(exeext)): Use link mutex.
1117 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1119         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1120         to simply use OPT_Wpointer_arith.
1121         (build_unary_op): Likewise.
1123 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1125         PR c/19449
1126         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1127         argument.  If set, or it temporarily for parsing of the first
1128         argument into force_folding_builtin_constant_p.
1129         (c_parser_postfix_expression): Adjust callers.
1131 2013-03-21  Richard Biener  <rguenther@suse.de>
1133         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1134         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
1136 2013-02-12  Marek Polacek  <polacek@redhat.com>
1138         PR c/44938
1139         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1140         origtypes to NULL.
1142 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
1144         PR c/56078
1145         * c-typeck.c (set_nonincremental_init_from_string): If
1146         constructor_max_index is NULL, treat it as if tree_int_cst_lt
1147         returned false.
1148         (process_init_element): Likewise.
1150 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
1152         PR c++/55619
1153         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1154         argument, don't call default_function_array_conversion
1155         nor c_fully_fold here.
1156         (c_parser_asm_statement): Adjust callers.
1157         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1158         and outputs here, and call default_function_array_conversion
1159         on inputs that don't need to be addressable.
1161 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
1163         PR c/39464
1164         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1165         warning require that both c_common_unsigned_type as well as
1166         c_common_signed_type is the same for both mvl and mvr types.
1168 2012-11-16  Diego Novillo  <dnovillo@google.com>
1170         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1172         * c-common.c: Use new vec API in vec.h.
1173         * c-common.h: Likewise.
1174         * c-gimplify.c: Likewise.
1175         * c-pragma.c: Likewise.
1176         * c-pretty-print.c: Likewise.
1177         * c-pretty-print.h: Likewise.
1178         * c-semantics.c: Likewise.
1179         * c-decl.c: Likewise.
1180         * c-parser.c: Likewise.
1181         * c-tree.h: Likewise.
1182         * c-typeck.c: Likewise.
1184 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
1186         PR c++/54930
1187         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1189 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1191         PR c/53066
1192         * c-decl.c (warn_if_shadowing): Do not warn if a variable
1193         shadows a function, unless the variable is a function or a
1194         pointer-to-function.
1196 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
1198         PR c/54381
1199         * c-parser.c (struct c_tree_loc_pair): Removed.
1200         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1201         add location_t * and tree * arguments, fill in array of 3
1202         sizeof_arg trees and corresponding locs.
1203         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1204         c_parser_expr_list callers.
1205         (c_parser_postfix_expression_after_primary): Likewise.  Pass
1206         array of 3 sizeof_arg trees and locs (corresponding to first
1207         3 arguments) to sizeof_pointer_memaccess_warning.
1209 2012-10-09  Lawrence Crowl  <crowl@google.com>
1211         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1212         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1213         hash table.
1215 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
1217         PR c++/54194
1218         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1219         call.
1221 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
1223         PR c++/54427
1224         * c-typeck.c: Include c-common.h.
1225         (enum stv_conv): Moved to c-common.h.
1226         (scalar_to_vector): Moved to c-common.c.
1227         (build_binary_op): Adapt to scalar_to_vector's new prototype.
1228         * Make-lang.in: c-typeck.c depends on c-common.h.
1230 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
1232         * c-decl.c (c_write_global_declarations): Fix handling of
1233         -fdump-ada-spec*.
1235 2012-09-30  Sharad Singhai  <singhai@google.com>
1237         * c-decl.c (c_write_global_declarations): Use a different method
1238         to determine if the dump has ben initialized.
1240 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1242         PR c/54552
1243         * c-typeck.c (c_cast_expr): When casting to a type requiring
1244         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1245         c_fully_fold first.
1247 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1249         PR c/54103
1250         * c-typeck.c (build_unary_op): Pass original argument of
1251         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1252         any C_MAYBE_CONST_EXPR, if it has integer operands.
1253         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1254         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1255         to c_objc_common_truthvalue_conversion, then remove any
1256         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
1257         c_objc_common_truthvalue_conversion not
1258         c_common_truthvalue_conversion.
1259         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1260         call note_integer_operands for arguments with integer operands
1261         that are not integer constants.
1263 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
1265         PR c/54559
1266         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1267         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1269 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
1271         PR c/54428
1272         * c-convert.c (convert): Don't call fold_convert_loc if
1273         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1274         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
1275         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1277 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
1279         PR c/54355
1280         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1281         for nested and empty_ok arguments in the call to
1282         c_parser_declaration_or_fndef.
1284 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
1286         * c-tree.h (c_last_sizeof_arg): Declare.
1287         * c-parser.c (struct c_tree_loc_pair): New type.
1288         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
1289         non-NULL.
1290         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1291         (c_parser_postfix_expression_after_primary): Likewise.  Call
1292         sizeof_pointer_memaccess_warning if needed.
1293         (sizeof_ptr_memacc_comptypes): New function.
1294         * c-typeck.c (c_last_sizeof_arg): New global variable.
1295         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1297 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
1299         * c-lang.h (lang_decl): Add variable_size GTY option.
1301 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1303         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1304         * Make-lang.in: Fix dependencies.
1306 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
1308         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1309         and add language Makefile hooks.
1310         * config-lang.in: New file.
1311         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1312         add the required "normal" config-lang.in rules.
1313         * c-lang.h: Moved from gcc/ to here.
1314         * c-tree.h: Likewise.
1315         * c-objc-common.c: Likewise.
1316         * c-objc-common.h: Likewise.
1317         * c-typeck.c: Likewise.
1318         * c-convert.c: Likewise.
1319         * c-lang.c: Likewise.
1320         * c-aux-info.c: Likewise.
1321         * c-errors.c: Likewise.
1322         * gccspec.c: Likewise.
1323         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
1324         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
1326 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1328 Copying and distribution of this file, with or without modification,
1329 are permitted in any medium without royalty provided the copyright
1330 notice and this notice are preserved.