PR ada/65156
[official-gcc.git] / gcc / c / ChangeLog
blob0bb5dc70600b851f029d17f0fa29e5d39f28ee32
1 2015-02-14  Marek Polacek  <polacek@redhat.com>
3         PR c/64768
4         * c-decl.c (grokdeclarator): Set the range of a flexible array member
5         declared through a typedef name.
7 2015-02-13  Marek Polacek  <polacek@redhat.com>
9         PR c/65050
10         * c-decl.c (grokdeclarator): Print also the type when giving
11         the error message about array's incomplete element type.
13 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
15         PR c/64824
16         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
17         check in the POP macro.
19 2015-02-09  Marek Polacek  <polacek@redhat.com>
21         PR c/64856
22         * c-typeck.c (process_init_element): Don't always wrap
23         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
24         initializing a range of elements.
26 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
28         PR c/64824
29         PR c/64868
30         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
32 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
34         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
35         processing enum declaration.
37 2015-01-29  Marek Polacek  <polacek@redhat.com>
39         PR c/64709
40         * c-typeck.c (pop_init_level): If constructor_elements has
41         exactly one element with integer_zerop value, set constructor_zeroinit
42         to 1.  Remove braces around warning_init call.
44 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
46         PR c/64766
47         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
48         of FUNCTION_DECLs with error_mark_node.
50 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
52         PR c/64778
53         * c-typeck.c (convert_arguments): Return -1 if there are
54         error_args, even if we've diagnosed too many arguments.
56 2015-01-21  Richard Biener  <rguenther@suse.de>
58         PR middle-end/64313
59         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
60         for builtins the user declared correctly.
62 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
63             Bernd Schmidt  <bernds@codesourcery.com>
64             Cesar Philippidis  <cesar@codesourcery.com>
65             James Norris  <jnorris@codesourcery.com>
66             Jakub Jelinek  <jakub@redhat.com>
67             Ilmir Usmanov  <i.usmanov@samsung.com>
69         * c-parser.c: Include "gomp-constants.h".
70         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
71         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
72         Use OMP_CLAUSE_SET_MAP_KIND.
73         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
74         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
75         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
76         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
77         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
78         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
79         "copyout", "create", "delete", "deviceptr", "gang", "host",
80         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
81         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
82         "present_or_create", "pcreate", "seq", "self", "vector",
83         "vector_length", "wait", "worker".
84         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
85         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
86         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
87         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
88         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
89         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
90         (c_parser_oacc_data_clause_deviceptr)
91         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
92         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
93         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
94         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
95         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
96         (c_parser_oacc_parallel, c_parser_oacc_update)
97         (c_parser_oacc_wait): New functions.
98         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
99         (c_finish_oacc_data): New prototypes.
100         * c-typeck.c: Include "gomp-constants.h".
101         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
102         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
103         OMP_CLAUSE_SET_MAP_KIND.
104         (c_finish_oacc_parallel, c_finish_oacc_kernels)
105         (c_finish_oacc_data): New functions.
106         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
107         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
108         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
109         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
110         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
111         GOMP_MAP_FORCE_DEVICEPTR.
113 2015-01-09  Michael Collison  <michael.collison@linaro.org>
115         * c-array-notation.c: Include hash-set.h, machmode.h,
116         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
117         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
118         * c-aux-info.c: Ditto.
119         * c-convert.c: Ditto.
120         * c-decl.c: Ditto.
121         * c-errors.c: Ditto.
122         * c-lang.c: Dittoxs.
123         * c-objc-common.c: Ditto.
124         * c-parser.c: Ditto.
125         * c-typeck.c: Include hash-set.h, machmode.h,
126         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
127         fold-const.h, wide-int.h, inchash.h, real.h and
128         fixed-value.h due to flattening of tree.h.
130 2015-01-07  Marek Polacek  <polacek@redhat.com>
132         PR c/64417
133         * c-typeck.c (process_init_element): Disallow initialization of
134         a flexible array member with a string constant if the structure
135         is in an array.
137 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
139         PR sanitizer/64344
140         * c-typeck.c (convert_for_assignment, c_finish_return): For
141         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
142         types also set in_late_binary_op around convert call.
143         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
144         to integral type casts, if not in_late_binary_op, pass c_fully_fold
145         result on expr as last argument to ubsan_instrument_float_cast,
146         if in_late_binary_op, don't use c_save_expr but save_expr.
148         Update copyright years.
150 2015-01-05  Marek Polacek  <polacek@redhat.com>
152         PR c/64423
153         * c-typeck.c (build_array_ref): Pass loc down to
154         warn_array_subscript_with_type_char.
156 2014-12-20  Martin Uecker <uecker@eecs.berkeley.edu>
158         * c-typeck.c: New behavious for pointers to arrays with qualifiers
159         (common-pointer-type): For pointers to arrays take qualifiers from
160         element type.
161         (build_conditional_expr): Add warnings for lost qualifiers.
162         (comp-target-types): Allow pointers to arrays with different qualifiers.
163         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
164         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
165         to PEDWARN_FOR_QUALIFIERS.
167 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
169         PR sanitizer/64289
170         * c-convert.c: Include ubsan.h.
171         (convert): For real -> integral casts and
172         -fsanitize=float-cast-overflow don't call convert_to_integer, but
173         instead instrument the float cast directly.
175 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
177         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
178         c_finish_stmt_expr): Remove NULL last argument from
179         create_tmp_var_raw and create_tmp_var calls.
180         * c-array-notation.c (fix_builtin_array_notation_fn,
181         build_array_notation_expr, fix_conditional_array_notations_1,
182         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
184 2014-11-28  Marek Polacek  <polacek@redhat.com>
186         PR c/63862
187         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
188         convert the right operand to integer type.
190 2014-11-25  Marek Polacek  <polacek@redhat.com>
192         PR c/63877
193         * c-decl.c (start_function): Disable -Wmissing-declarations warning
194         for inline functions.
196 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
198         PR target/63764
199         * c-typeck.c (build_array_ref): Adjust
200         convert_vector_to_pointer_for_subscript caller.  If it returns true,
201         call non_lvalue_loc on the result.
203 2014-11-11  Richard Biener  <rguenther@suse.de>
205         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
206         to true.
208 2014-11-10  Andi Kleen  <ak@linux.intel.com>
210         PR c/60804
211         * c-parser.c (c_parser_statement_after_labels): Call
212         check_no_cilk.
213         (c_parser_if_statement): Dito.
214         (c_parser_switch_statement): Dito.
215         (c_parser_while_statement): Dito.
216         (c_parser_do_statement): Dito.
217         (c_parser_for_statement): Dito.
218         * c-typeck.c (c_finish_loop): Dito.
220 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
222         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
223         OPT_Wshift_count_overflow in the warnings.
225 2014-10-30  Marek Polacek  <polacek@redhat.com>
227         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
228         print the stripped version as well, if they're not the same.
230 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
232         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
233         machine_mode.
235 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
237         * c-decl.c: Adjust include files.
238         * c-parser.c: Ditto.
240 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
241             Tom Tromey  <tromey@redhat.com>
243         * c-tree.h (enum c_oracle_request): New.
244         (c_binding_oracle_function): New typedef.
245         (c_binding_oracle, c_pushtag, c_bind): Declare.
246         * c-decl.c (c_binding_oracle): New global.
247         (I_SYMBOL_CHECKED): New macro.
248         (i_symbol_binding): New function.
249         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
250         (I_TAG_CHECKED): New macro.
251         (i_tag_binding): New function.
252         (I_TAG_BINDING, I_TAG_DECL): Redefine.
253         (I_LABEL_CHECKED): New macro.
254         (i_label_binding): New function.
255         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
256         (c_print_identifier): Save and restore c_binding_oracle.
257         (c_pushtag, c_bind): New functions.
259 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
261         * c-typeck.c: Adjust include files.
263 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
265         PR c++/53061
266         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
267         initialization here...
268         (c_initialize_diagnostics): ... but here. Set defaults after
269         building pretty-printer.
271 2014-10-23  Marek Polacek  <polacek@redhat.com>
273         PR c/63626
274         * c-decl.c (pop_scope): Don't print warning in external_scope.
276 2014-10-19  Marek Polacek  <polacek@redhat.com>
278         PR c/63567
279         * c-typeck.c (output_init_element): Allow initializing objects with
280         static storage duration with compound literals even in C99 and add
281         pedwarn for it.
283 2014-10-17  Marek Polacek  <polacek@redhat.com>
285         PR c/63567
286         * c-typeck.c (digest_init): Allow initializing objects with static
287         storage duration with compound literals even in C99 and add pedwarn
288         for it.
290 2014-10-17  Marek Polacek  <polacek@redhat.com>
292         PR c/63543
293         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
294         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
295         error multiple times.  Print the type.
297 2014-10-17  Marek Polacek  <polacek@redhat.com>
299         PR c/63549
300         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
301         type.
303 2014-10-17  Marek Polacek  <polacek@redhat.com>
305         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
306         (start_function): Use OPT_Wimplicit_int instead of 0.
307         (store_parm_decls_oldstyle): Likewise.
309 2014-10-17  Alan Modra  <amodra@gmail.com>
311         PR middle-end/61848
312         * c-decl.c (merge_decls): Don't merge section name or tls model
313         to newdecl symtab node, instead merge to olddecl.  Override
314         existing olddecl section name.  Set tls_model for all thread-local
315         vars, not just OMP thread-private ones.  Remove incorrect comment.
317 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
319         * c-decl.c: Adjust include files.
321 2014-10-14  DJ Delorie  <dj@redhat.com>
323         * c-parser.c (c_parse_init): Add RID entries for each __intN.
324         (c_token_starts_typename): Check all __intN, not just __int128.
325         (c_token_starts_declspecs): Likewise.
326         (c_parser_declspecs): Likewise.
327         (c_parser_attribute_any_word): Likewise.
328         (c_parser_objc_selector): Likewise.
329         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
330         (struct c_declspecs): Add int_n_idx field to record *which* __intN
331         is specified.
332         * c-decl.c (declspecs_add_type): Check for all __intN, not just
333         __int128.
334         (finish_declspecs): Likewise.
336 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
338         * c-parser.c (c_parser_all_labels): New function to replace
339         the duplicate code.
340         (c_parser_statement): Call the new function.
342 2014-10-09  Marek Polacek  <polacek@redhat.com>
344         PR c/63480
345         * c-typeck.c (pop_init_level): Don't warn about initializing
346         with { }.
348 2014-10-07  Marek Polacek  <polacek@redhat.com>
350         PR c/59717
351         * c-decl.c (header_for_builtin_fn): New function.
352         (implicitly_declare): Suggest which header to include.
354 2014-10-07  Marek Polacek  <polacek@redhat.com>
356         * c-convert.c (convert): Use error_operand_p.
357         * c-typeck.c (require_complete_type): Likewise.
358         (really_atomic_lvalue): Likewise.
359         (digest_init): Likewise.
360         (handle_omp_array_sections_1): Likewise.
362 2014-10-03  Marek Polacek  <polacek@redhat.com>
364         PR c/63453
365         * c-decl.c (pop_scope): Don't warn about "inline function declared
366         but never defined" for functions marked with gnu_inline attribute.
368 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
370         PR c++/63249
371         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
372         on low_bound and length.
374 2014-09-24  Marek Polacek  <polacek@redhat.com>
376         PR c/61405
377         PR c/53874
378         * c-parser.c: Don't define CPP_KEYWORD.
379         (c_parser_switch_statement): Pass original type to c_finish_case.
380         * c-tree.h (c_finish_case): Update declaration.
381         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
382         conditionally to c_do_switch_warnings.
384 2014-09-03  Marek Polacek  <polacek@redhat.com>
386         PR c/62024
387         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
388         conversions.
390 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
391             Balaji V. Iyer  <balaji.v.iyer@intel.com>
392             Igor Zamyatin  <igor.zamyatin@intel.com>
394         * c-parser.c (c_parser_cilk_for): New function.
395         (c_parser_cilk_grainsize): Likewise.
396         (c_get_temp_regvar): Likewise.
397         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
398         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
399         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
400         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
401         case.
403 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
405         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
406         with using HOST_WIDE_INT without truncation to 'int'
408 2014-08-22  Marek Polacek  <polacek@redhat.com>
410         PR c++/62199
411         * c-typeck.c (parser_build_binary_op): Adjust call to
412         warn_logical_not_parentheses.
414 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
416         PR other/62008
417         * c-parser.c (c_parser_array_notation): Check for correct
418         type of an array added.
420 2014-08-19  Marek Polacek  <polacek@redhat.com>
422         PR c++/62153
423         * c-typeck.c (build_binary_op): If either operand of a comparison
424         is a boolean expression, call maybe_warn_bool_compare.
426 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
428         PR c/45584
429         * c-typeck.c (build_c_cast): Do a conversion even when the
430         TYPE_MAIN_VARIANTs are the same.
432 2014-08-19  Marek Polacek  <polacek@redhat.com>
434         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
435         pedwarn_c99 instead of pedwarn.
436         (grokfield): Likewise.
437         (warn_defaults_to): New function.
438         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
439         Unconditionally call pedwarn_c99 instead of pedwarn.
440         (start_function): Call warn_defaults_to instead of pedwarn_c99.
441         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
442         check flag_isoc11 before.
443         * c-errors.c (pedwarn_c99): Change the return type to bool.
444         Handle -Wc99-c11-compat.
445         * c-parser.c (disable_extension_diagnostics): Handle
446         warn_c99_c11_compat.
447         (restore_extension_diagnostics): Likewise.
448         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
449         instead of pedwarn, don't check flag_isoc11 before.
450         (c_parser_declspecs): Likewise.
451         (c_parser_alignas_specifier): Likewise.
452         (c_parser_alignof_expression): Likewise.
453         (c_parser_generic_selection): Likewise.
454         * c-tree.h (pedwarn_c99): Update declaration.
455         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
456         of pedwarn_c99.
458 2014-08-19  Marek Polacek  <polacek@redhat.com>
460         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
461         to pedwarn_c90.
462         * c-errors.c: Include "opts.h".
463         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
464         * c-parser.c (disable_extension_diagnostics): Handle negative value
465         of warn_c90_c99_compat, too.
466         (restore_extension_diagnostics): Likewise.
467         (c_parser_compound_statement_nostart): Pass
468         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
470 2014-08-12  Marek Polacek  <polacek@redhat.com>
472         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
473         Add pedwarn.
474         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
475         Likewise.
476         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
478 2014-08-10 Marek Polacek  <polacek@redhat.com>
480         PR c/51849
481         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
482         Call pedwarn_c90 instead of pedwarn.
483         (check_bitfield_type_and_width): Likewise.
484         (declspecs_add_qual): Likewise.
485         (declspecs_add_type): Likewise.
486         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
487         Adjust to only call pedwarn_c90.
488         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
489         pedwarn_c90 instead of pedwarn.
490         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
491         * c-parser.c (disable_extension_diagnostics): Handle
492         warn_c90_c99_compat.
493         (restore_extension_diagnostics): Likewise.
494         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
495         pedwarn_c90 instead of pedwarn.
496         (c_parser_initelt): Likewise.
497         (c_parser_postfix_expression): Likewise.
498         (c_parser_postfix_expression_after_paren_type): Likewise.
499         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
500         * c-tree.h: Fix formatting.
501         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
502         pedwarn_c90 instead of pedwarn.
504 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
506         * c-typeck.c: Remove include of pointer-set.h.
508 2014-08-07  Marek Polacek  <polacek@redhat.com>
510         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
512 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
514         * c-typeck.c: Use hash_map instead of pointer_map.
516 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
518         * c-decl.c: Use hash_set instead of pointer_set.
520 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
522         PR middle-end/61455
523         * c-array-notation.c (expand_array_notations): Handling
524         of DECL_EXPR added.
526 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
528         PR c++/60517
529         * c-typeck.c (c_finish_return): Return 0 instead of the address of
530         a local variable.
532 2014-07-30  Tom Tromey  <tromey@redhat.com>
534         * c-typeck.c (struct constructor_stack) <designator_depth>: New
535         field.
536         (really_start_incremental_init, push_init_level): Initialize
537         designator_depth.
538         (pop_init_level): Set global designator_depth.
539         (process_init_element): Check for designated_init attribute.
541 2014-07-20  Marek Polacek  <polacek@redhat.com>
543         PR c/61852
544         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
545         (implicitly_declare): Pass location to implicit_decl_warning.
547 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
549         PR middle-end/61294
550         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
551         If non-NULL, call c_parser_check_literal_zero.
552         (c_parser_check_literal_zero): New function.
553         (c_parser_postfix_expression_after_primary): Adjust
554         c_parser_expr_list caller, handle -Wmemset-transposed-args.
556 2014-07-06  Marek Polacek  <polacek@redhat.com>
558         PR c/6940
559         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
560         * c-tree.h (C_ARRAY_PARAMETER): Define.
561         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
562         function parameter.
564 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
565             Chen Gang <gang.chen.5i5j@gmail.com>
567         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
568         releasing symbol.
570 2014-07-01  Marek Polacek  <polacek@redhat.com>
572         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
573         instead of 0 to WARN_FOR_ASSIGNMENT.
575 2014-07-01  Marek Polacek  <polacek@redhat.com>
577         PR c/58286
578         * c-typeck.c (convert_for_assignment): Pass
579         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
581 2014-06-30  Marek Polacek  <polacek@redhat.com>
583         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
584         has no_sanitize_undefined attribute.
586 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
588         PR middle-end/57541
589         * c-array-notation.c (fix_builtin_array_notation_fn):
590         Check for 0 arguments in builtin call. Check that bultin argument is
591         correct.
592         * c-parser.c (c_parser_array_notation): Check for incorrect initial
593         index.
595 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
597         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
598         qualifiers in __auto_type for atomic types.
599         (c_parser_typeof_specifier): Discard all type qualifiers in
600         __typeof__ for atomic types.
602 2014-06-25  Marek Polacek  <polacek@redhat.com>
604         PR c/61162
605         * c-parser.c (c_parser_statement_after_labels): Pass the location of
606         the return expression to c_finish_return.
608 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
610         * c-typeck.c (c_finish_omp_clauses): Make sure
611         OMP_CLAUSE_LINEAR_STEP has correct type.
613 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
615         * c-decl.c: Adjust.
617 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
619         * c-parser.c (c_parser_omp_for_loop): For
620         #pragma omp parallel for simd move lastprivate clause from parallel
621         to for rather than simd.
623 2014-06-23  Marek Polacek  <polacek@redhat.com>
625         * c-typeck.c (parser_build_binary_op): Don't call
626         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
628 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
630         * c-parser.c (c_parser_omp_threadprivate): Likewise.
631         * c-decl.c (merge_decls): Likewise.
633 2014-06-09  Marek Polacek  <polacek@redhat.com>
635         PR c/36446
636         * c-typeck.c (error_init): Call inform instead of error_at.
637         (pedwarn_init): Call inform instead of pedwarn.
638         (warning_init): Call inform instead of warning_at.
640 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
642         * c-decl.c (merge_decls): Use set_decl_section_name.
643         (duplicate_decls): Remove node if it exists.
645 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
647         PR c/53119
648         * c-typeck.c (push_init_level, process_init_element,
649         pop_init_level): Correct check for zero initialization, move
650         missing brace warning to respect zero initialization.
652 2014-06-05  Marek Polacek  <polacek@redhat.com>
654         PR c/56724
655         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
657 2014-06-05  Marek Polacek  <polacek@redhat.com>
659         PR c/49706
660         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
661         on the left hand side operand of a comparison. 
663 2014-06-05  Marek Polacek  <polacek@redhat.com>
665         PR c/48062
666         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
667         Print note only if the warning was printed.
669 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
671         PR c/58942
672         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
673         with a pointer.
675 2014-06-03  Marek Polacek  <polacek@redhat.com>
677         PR c/60439
678         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
679         c_start_case.
680         * c-tree.h (c_start_case): Update.
681         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
682         switch condition has boolean value.
684 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
686         * c-decl.c: Include builtins.h.
687         * c-parser.c: Likewise.
689 2014-05-27  Marek Polacek  <polacek@redhat.com>
691         PR c/56724
692         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
693         error and warning calls to error_at and warning_at.  Pass location of
694         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
695         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
696         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
698 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
700         PR c/61191
701         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
702         function parameters.
704 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
706         * c-decl.c (merge_decls): Preserve symtab node pointers.
707         (duplicate_decls): Free new decl.
709 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
711         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
712         initialization.
714         * c-parser.c (c_parser_omp_target): Return bool values.
716 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
718         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
719         num_teams_loc variable to num_thread_limit_loc.
721 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
723         * c-array-notation.c (expand_array_notations): Use void_node
724         instead of void_zero_node.
726 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
728         * c-decl.c (finish_struct): Adjust.
729         (finish_enum): Likewise.
730         (bind): Adjust.
731         (record_inline_static): Likewise.
732         (push_scope): Likewise.
733         (make_label): Likewise.
734         (lookup_label_for_goto): Likewise.
735         (finish_struct): Likewise.
736         (finish_enum): Likewise.
737         (store_parm_decls): Likewise.
738         (c_push_function_context): Likewise.
739         * c-lang.h: Remove usage of variable_size gty attribute.
740         * c-parser.c (c_parse_init): Adjust.
741         (c_parse_file): Likewise.
743 2014-05-13  Marek Polacek  <polacek@redhat.com>
745         PR c/61162
746         * c-typeck.c (convert_for_assignment): Pass location to
747         WARN_FOR_ASSIGNMENT instead of input_location.
749 2014-05-10  Marek Polacek  <polacek@redhat.com>
751         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
752         maybe_warn_string_init.
753         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
754         maybe_warn_string_init.
755         * c-tree.h (maybe_warn_string_init): Update declaration.
756         * c-typeck.c (maybe_warn_string_init): Add location parameter.
757         Call pedwarn_init with loc instead of with input_location.
758         (digest_init): Pass init_loc to maybe_warn_string_init.
759         (pop_init_level): Call pedwarn_init with loc instead of with
760         input_location.
761         (set_init_index): Likewise.
762         (process_init_element): Likewise.
764 2014-05-09  Marek Polacek  <polacek@redhat.com>
766         PR c/61096
767         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
768         (c_parser_initelt): Pass location to set_init_label.  Pass array index
769         location to set_init_index.
770         * c-tree.h (push_init_level): Update declaration.
771         (pop_init_level): Likewise.
772         (set_init_index): Likewise.
773         (set_init_label): Likewise.
774         * c-typeck.c (error_init): Add location parameter.  Call error_at
775         instead of error.
776         (digest_init): Pass init_loc to error_init.
777         (really_start_incremental_init):
778         (push_init_level): Add location parameter.  Pass loc to pop_init_level
779         and error_init.
780         (pop_init_level): Likewise.
781         (set_designator): Add location parameter.  Pass loc to pop_init_level,
782         push_init_level, and error_init.
783         (set_init_index): Add location parameter.  Pass loc to error_init and
784         set_designator.
785         (set_init_label): Likewise.
786         (output_init_element): Pass loc to error_init.
787         (process_init_element): Pass loc to error_init, pop_init_level,
788         pedwarn_init, and push_init_level.
790 2014-05-09  Marek Polacek  <polacek@redhat.com>
792         PR c/50459
793         * c-parser.c (c_parser_attributes): Parse the arguments as an
794         expression-list if the attribute takes identifier.
796 2014-05-08  Marek Polacek  <polacek@redhat.com>
798         PR c/61053
799         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
800         TYPE_ALIGN_UNIT.
802 2014-05-08  Marek Polacek  <polacek@redhat.com>
804         PR c/61077
805         * c-decl.c (start_function): Warn for _Atomic-qualified return type
806         of main.
808 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
809             Mike Stump  <mikestump@comcast.net>
810             Richard Sandiford  <rdsandiford@googlemail.com>
812         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
813         (finish_enum): Use wide-int interfaces.
814         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
815         * c-typeck.c (build_c_cast): Likewise.
816         (set_nonincremental_init_from_string): Likewise.
817         (c_tree_equal): Likewise.
819 2014-05-02  Marek Polacek  <polacek@redhat.com>
821         PR c/25801
822         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
823         Return size_one_node when the type is not complete.
824         (pointer_diff): Remove comment.
825         (build_unary_op): Improve error messages.
827 2014-05-02  Marek Polacek  <polacek@redhat.com>
829         * c-typeck.c (c_finish_return): Separate warning_at calls.
831 2014-05-02  Marek Polacek  <polacek@redhat.com>
833         * c-tree.h (error_init): Remove declaration.
834         (pedwarn_init): Likewise.
835         * c-typeck.c (error_init): Make static and move above.
836         (pedwarn_init): Likewise.
837         (warning_init): Move above.
838         (maybe_warn_string_init): Likewise.
840 2014-05-01  Jeff Law  <law@redhat.com>
842         Revert:
844         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
845         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
846         avoid goto.
848 2014-05-02  Marek Polacek  <polacek@redhat.com>
850         PR c/60784
851         * c-typeck.c (push_init_level): Set constructor_designated to
852         p->designated for structures.
854 2014-05-01  Marek Polacek  <polacek@redhat.com>
856         PR c/60915
857         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
858         function-definition has an attribute after the declarator.
860 2014-05-01  Marek Polacek  <polacek@redhat.com>
862         PR c/60257
863         * c-typeck.c (warning_init): Add location_t parameter.  Call
864         warning_at instead of warning.
865         (push_init_level): Pass input_location to warning_init.
866         (add_pending_init): Add location_t parameter.  Pass loc to
867         warning_init.
868         (set_nonincremental_init): Pass input_location to add_pending_init.
869         (set_nonincremental_init_from_string): Likewise.
870         (output_init_element): Pass loc to warning_init and to
871         add_pending_init.
873 2014-05-01  Marek Polacek  <polacek@redhat.com>
875         PR c/43395
876         * c-typeck.c (c_finish_return): Distinguish between label and variable
877         when warning about returning local address.
879 2014-05-01  Marek Polacek  <polacek@redhat.com>
881         PR c/29467
882         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
883         in C89 mode.
885 2014-05-01  Marek Polacek  <polacek@redhat.com>
887         PR c/43245
888         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
889         instead of 0 to WARN_FOR_QUALIFIERS.
891 2014-05-01  Marek Polacek  <polacek@redhat.com>
893         PR c/56989
894         * c-typeck.c (default_conversion): Use better location for
895         error call.
897 2014-04-30  Marek Polacek  <polacek@redhat.com>
899         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
900         also when SANITIZE_FLOAT_DIVIDE is on.
902 2014-04-30  Marek Polacek  <polacek@redhat.com>
904         PR c/60139
905         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
906         and pedwarn_init.  Use loc insted of input_location.
908 2014-04-30  Marek Polacek  <polacek@redhat.com>
910         PR c/60351
911         * c-typeck.c (build_binary_op): Use location when warning about
912         shift count.
914 2014-04-25  Marek Polacek  <polacek@redhat.com>
916         PR c/18079
917         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
918         always_inline/noinline and hot/cold attributes.
920 2014-04-25  Marek Polacek  <polacek@redhat.com>
922         PR c/60114
923         * c-parser.c (c_parser_initelt): Pass input_location to
924         process_init_element.
925         (c_parser_initval): Pass loc to process_init_element.
926         * c-tree.h (process_init_element): Adjust declaration.
927         * c-typeck.c (push_init_level): Pass input_location to
928         process_init_element.
929         (pop_init_level): Likewise.
930         (set_designator): Likewise.
931         (output_init_element): Add location_t parameter.  Pass loc to
932         digest_init.
933         (output_pending_init_elements): Pass input_location to
934         output_init_element.
935         (process_init_element): Add location_t parameter.  Pass loc to
936         output_init_element.
938 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
940         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
941         atomic-clause, allow comma in between atomic-clause and
942         seq_cst.
944 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
946         PR c/59073
947         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
948         fails, don't set OM_PARALLEL_COMBINED and return NULL.
950 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
952         PR middle-end/60469
953         * c-array-notation.c (fix_builtin_array_notation_fn): Use
954         create_tmp_var instead build_decl for creating temps.
955         (build_array_notation_expr): Likewise.
956         (fix_conditional_array_notations_1): Likewise.
957         (fix_array_notation_expr): Likewise.
958         (fix_array_notation_call_expr): Likewise.
960 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
962         PR c++/60689
963         * c-tree.h (c_build_function_call_vec): New prototype.
964         * c-typeck.c (build_function_call_vec): Don't call
965         resolve_overloaded_builtin here.
966         (c_build_function_call_vec): New wrapper function around
967         build_function_call_vec.  Call resolve_overloaded_builtin here.
968         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
969         Call c_build_function_call_vec instead of build_function_call_vec.
970         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
971         * c-decl.c (finish_decl): Likewise.
973 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
975         PR c/55383
976         * c-typeck.c: Use correct format string in cast-qual warning
978 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
980         * c-decl.c (c_decl_attributes): Use
981         lang_hooks.types.omp_mappable_type.
982         * c-typeck.c (c_finish_omp_clauses): Likewise.
984 2014-03-06  Marek Polacek  <polacek@redhat.com>
986         PR c/60197
987         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
988         of checking tree code.
990 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
992         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
993         (c_parser_parameter_declaration): Likewise.
995 2014-02-19  Marek Polacek  <polacek@redhat.com>
997         PR c/60195
998         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
999         Call mark_exp_read on exp.value.
1000         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
1001         TREE_ADDRESSABLE on old instead of val.
1002         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1004 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
1006         * c-parser.c (c_parser_get_builtin_args): Replace calls to
1007         C_EXPR_APPEND by vec_safe_push.
1008         * c-tree.h (C_EXPR_APPEND): Remove.
1010 2014-01-31  Marek Polacek  <polacek@redhat.com>
1012         PR c/59963
1013         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1014         build_function_call_vec.
1015         (build_function_call): Likewise.
1016         (build_atomic_assign): Likewise.
1017         (build_function_call_vec): Add arg_loc parameter.  Use it.
1018         (convert_arguments): Likewise.
1019         (convert_for_assignment): Rename rhs_loc to expr_loc.
1020         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1021         (c_parser_objc_keywordexpr): Likewise.
1022         (c_parser_postfix_expression_after_primary): Call
1023         build_function_call_vec with expr_loc rather than op_loc.
1024         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
1025         build_function_call_vec.
1026         (c_parser_expr_list): Add locations parameter.  Fill it with locations
1027         of function arguments.
1028         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1030 2014-01-30  Marek Polacek  <polacek@redhat.com>
1032         PR c/59940
1033         * c-typeck.c (build_function_call_vec): Use loc parameter.
1034         (convert_arguments): Add location parameter.  Use it.
1035         (ep_convert_and_check): Likewise.
1036         (build_atomic_assign): Adjust convert_for_assignment call.
1037         (build_modify_expr): Likewise.
1038         (digest_init): Likewise.
1039         (c_finish_return): Likewise.
1040         (build_conditional_expr): Adjust ep_convert_and_check calls.
1041         (convert_for_assignment): Add rhs_loc parameter.  Use it.
1042         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1043         calls.
1045 2014-01-30  Richard Biener  <rguenther@suse.de>
1047         PR c/59905
1048         * c-typeck.c (build_function_call_vec): Do not replace calls
1049         to a function via an incompatible type with a runtime abort.
1051 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1053         * c-parser.c (c_parser_declaration_or_fndef): Replaced
1054         flag_enable_cilkplus with flag_cilkplus.
1055         (c_parser_direct_declarator_inner): Likewise.
1056         (c_parser_attribute_any_word): Likewise.
1057         (c_parser_attributes): Likewise.
1058         (c_parser_compound_statement): Likewise.
1059         (c_parser_statement_after_labels): Likewise.
1060         (c_parser_if_statement): Likewise.
1061         (c_parser_switch_statement): Likewise.
1062         (c_parser_do_statement): Likewise.
1063         (c_parser_for_statement): Likewise.
1064         (c_parser_unary_expression): Likewise.
1065         (c_parser_postfix_expression): Likewise.
1066         (c_parser_postfix_expression_after_primary): Likewise.
1067         (c_parser_postfix_expression_after_primary): Likewise.
1068         (c_parser_omp_clause_name): Likewise.
1069         (c_finish_omp_declare_simd): Likewise.
1070         (c_parser_cilk_verify_simd): Likewise.
1071         * c-typeck.c (build_array_ref): Likewise.
1072         (build_function_call_vec): Likewise.
1073         (convert_arguments): Likewise.
1074         (build_compound_expr): Likewise.
1075         (c_finish_return): Likewise.
1076         (c_finish_if_stmt): Likewise.
1077         (c_finish_loop): Likewise.
1078         (build_binary_op): Likewise.
1080 2014-01-23  Marek Polacek  <polacek@redhat.com>
1082         PR c/59846
1083         * c-typeck.c (parser_build_binary_op): Use location instead of
1084         input_location.
1085         (build_binary_op): Pass location to shorten_compare.
1087 2014-01-23  Marek Polacek  <polacek@redhat.com>
1089         PR c/58346
1090         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1091         an empty aggregate.
1093 2014-01-23  Marek Polacek  <polacek@redhat.com>
1095         PR c/59871
1096         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1097         of a comma expression.
1098         (emit_side_effect_warnings): Likewise.
1100 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1102         PR c/59825
1103         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1104         function to use walk_tree and moved a lot of its functionality to
1105         expand_array_notations.
1106         (expand_array_notations): New function.
1108 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1110         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1111         attribute an attribute without value.
1113 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
1115         PR middle-end/58809
1116         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1117         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1119 2014-01-22  Marek Polacek  <polacek@redhat.com>
1121         PR c/59891
1122         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1123         of remove_c_maybe_const_expr on op1 and op2.
1125 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
1127         PR c/58943
1128         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1129         effects, preevaluate rhs using SAVE_EXPR first.
1131 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1133         PR c++/59631
1134         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1135         statements with if-elseif statements.
1137 2014-01-06  Marek Polacek  <polacek@redhat.com>
1139         PR c/57773
1140         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1141         defined bit-field types only in ISO C.
1143 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1145         Update copyright years
1147 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1149         * c-array-notation.c: Use the standard form for the copyright notice.
1151 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1153         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1154         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1155         field in parser is not empty.  If not-empty, call the function
1156         c_parser_finish_omp_declare_simd.
1157         (c_parser_cilk_clause_vectorlength): Modified function to be shared
1158         between SIMD-enabled functions and #pragma simd.  Added new parameter.
1159         (c_parser_cilk_all_clauses): Modified the usage of the function
1160         c_parser_cilk_clause_vectorlength as mentioned above.
1161         (c_parser_cilk_simd_fn_vector_attrs): New function.
1162         (c_finish_cilk_simd_fn_tokens): Likewise.
1163         (is_cilkplus_vector_p): Likewise.
1164         (c_parser_omp_clause_name): Added checking for "vectorlength,"
1165         "nomask," and "mask" strings in clause name.
1166         (c_parser_omp_all_clauses): Added 3 new case statements:
1167         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1168         PRAGMA_CILK_CLAUSE_NOMASK.
1169         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
1170         check for vector attribute and if so call the function
1171         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
1172         called the function c_finish_cilk_simd_fn_tokens.
1173         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1174         parser field is non-empty.  If so, parse them as you would parse
1175         the omp declare simd pragma.
1176         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1177         Added a check when step is a parameter and flag it as error.
1178         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1179         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1180         pragma_omp_clause.
1182 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
1184         * c-parser.c (c_parser_omp_parallel): Fix description.
1186 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1188         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1189         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1190         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1191         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1193 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
1195         PR c/52023
1196         * c-parser.c (c_parser_alignas_specifier): Use
1197         c_sizeof_or_alignof_type instead of c_alignof.
1198         (c_parser_alignof_expression): Likewise, with min_alignof
1199         parameter depending on alignof spelling used.
1201 2013-12-04  Marek Polacek  <polacek@redhat.com>
1203         PR c/54113
1204         * c-decl.c (start_function): Don't warn for missing prototype for
1205         inline functions.
1207 2013-12-03  Marek Polacek  <polacek@redhat.com>
1209         PR c/59351
1210         * c-decl.c (build_compound_literal): Allow compound literals with
1211         empty initial value.
1213 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
1215         PR c/58235
1216         * c-typeck.c (build_modify_expr): Diagnose assignment to
1217         expression with array type.
1219 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
1221         PR c/42262
1222         * c-typeck.c (process_init_element): Do not treat a string as
1223         initializing a whole array when used with a designator for an
1224         individual element.
1226 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
1228         PR c/57574
1229         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1230         an inline function following a static declaration.
1232 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
1234         PR c/59310
1235         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1236         to p_name before calling c_parser_omp_teams instead of after.
1237         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1238         argument.  Remove unused p_name variable.
1240 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
1241             Jakub Jelinek  <jakub@redhat.com>
1243         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1244         external_scope is NULL.
1246 2013-11-27  Tom de Vries  <tom@codesourcery.com>
1247             Marc Glisse  <marc.glisse@inria.fr>
1249         PR c++/59032
1250         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1252 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
1254         * c-typeck.c: Add required include files from gimple.h.
1256 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
1258         * c-decl.c (define_label, shadow_tag_warned)
1259         (check_bitfield_type_and_width, grokdeclarator, grokparms,
1260         store_parm_decls_newstyle, store_parm_decls_oldstyle)
1261         (declspecs_add_type): Remove use of in_system_header macro.
1262         * c-parser.c (c_parser_unary_expression): Likewise.
1263         * c-typeck.c (store_init_value, process_init_element)
1264         (c_start_case): Likewise.
1266         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1267         macro.
1269         * c-parser.c (c_parser_set_source_position_from_token): Remove
1270         reference to in_system_header from comment.
1272 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1274         * c-decl.c (grokdeclarator): Update comment to refer to
1275         tree_to_[su]hwi rather than tree_low_cst.
1277 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1279         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1280         tree_to_uhwi throughout.
1282 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1284         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1285         throughout.
1287 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1289         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1290         throughout.
1292 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
1294         * c-parser.c (c_parser_cilk_simd): New.
1295         (c_parser_cilk_verify_simd): New.
1296         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1297         (c_parser_omp_for_loop): Add case for NE_EXPR.
1298         Set c_break_label for CILK_SIMD.
1299         (c_parser_cilk_clause_vectorlength): New.
1300         (c_parser_cilk_clause_linear): New.
1301         (c_parser_cilk_clause_name): New.
1302         (c_parser_cilk_all_clauses): New.
1303         * c-typeck.c (build_unary_op): Pass location argument to
1304         readonly_error.
1305         (build_modify_expr): Same.
1306         (build_asm_expr): Same.
1307         (c_finish_bc_stmt): Error on break/continue in loops.
1309 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
1311         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1313 2013-11-14  Diego Novillo  <dnovillo@google.com>
1315         * c-decl.c: Include print-tree.h.
1316         Include stor-layout.h.
1317         Include varasm.h.
1318         Include attribs.h.
1319         Include stringpool.h.
1320         * c-lang.c: Include fold-const.h.
1321         * c-parser.c: Include stringpool.h.
1322         Include attribs.h.
1323         Include stor-layout.h.
1324         Include varasm.h.
1325         Include trans-mem.h.
1326         * c-typeck.c: Include stor-layout.h.
1327         Include trans-mem.h.
1328         Include varasm.h.
1329         Include stmt.h.
1331 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
1333         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1334         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1335         __auto_type.
1336         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1337         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1338         RID_AUTO_TYPE.
1339         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1340         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1341         (c_parser_declarator, c_parser_direct_declarator_inner)
1342         (c_parser_parameter_declaration, c_parser_type_name): All callers
1343         changed.
1344         (c_parser_declaration_or_fndef): Handle declarations with type
1345         determined from the initializer.
1347 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
1349         * c-typeck.c: Include gimplify.h.
1351 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
1353         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1354         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1355         comment.
1356         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1357         or _Thread_local as appropriate in diagnostics.
1358         (build_null_declspecs): Initialize ret->thread_gnu_p.
1359         (declspecs_add_scspec): Handle either __thread or _Thread_local
1360         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
1361         pedantic.  Do not disallow _Thread_local extern and _Thread_local
1362         static.
1364 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
1365             Andrew MacLeod  <amacleod@redhat.com>
1367         * c-aux-info.c (gen_type): Handle atomic qualifier.
1368         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1369         qualifiers when compating types.
1370         (shadow_tag_warned): Handle atomic_p in declspecs.
1371         (quals_from_declspecs): Likewise.
1372         (start_decl): Use c_type_promotes_to when promoting argument
1373         types.
1374         (grokdeclarator): Handle _Atomic.
1375         (get_parm_info): Diagnose any qualifier on "void" as only
1376         parameter.
1377         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1378         comparing types.  Use c_type_promotes_to when promoting argument
1379         types.
1380         (finish_function): Use c_type_promotes_to when promoting argument
1381         types.
1382         (build_null_declspecs): Handle atomic_p in declspecs.
1383         (declspecs_add_qual): Handle RID_ATOMIC.
1384         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1385         (c_token_starts_declspecs): Handle RID_ATOMIC.
1386         (c_parser_declspecs): Handle atomic type specifiers and
1387         qualifiers.
1388         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1389         from types of expressions with atomic type.
1390         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1391         (c_parser_attribute_any_word): Handle RID_ATOMIC.
1392         (c_parser_initializer, c_parser_initelt, c_parser_initval)
1393         (c_parser_statement_after_labels, c_parser_switch_statement)
1394         (c_parser_for_statement, c_parser_expr_no_commas)
1395         (c_parser_conditional_expression, c_parser_binary_expression)
1396         (c_parser_cast_expression, c_parser_unary_expression)
1397         (c_parser_postfix_expression)
1398         (c_parser_postfix_expression_after_primary, c_parser_expression):
1399         Use convert_lvalue_to_rvalue.
1400         (c_parser_expression_conv, c_parser_expr_list): Document
1401         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
1402         (c_parser_objc_synchronized_statement): Use
1403         convert_lvalue_to_rvalue.
1404         (c_parser_objc_selector): Handle RID_ATOMIC.
1405         (c_parser_objc_receiver, c_parser_array_notation): Use
1406         convert_lvalue_to_rvalue.
1407         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1408         _Atomic (type-name).
1409         (struct c_declspecs): Add atomic_p field.
1410         (convert_lvalue_to_rvalue): Declare.
1411         * c-typeck.c (c_type_promotes_to): Promote atomic types to
1412         corresponding atomic types.
1413         (qualify_type): Don't add _Atomic qualifiers from second argument.
1414         (comp_target_types): Do not allow _Atomic mismatches.
1415         (type_lists_compatible_p): Do not remove atomic qualifiers when
1416         comparing types.
1417         (really_atomic_lvalue, convert_lvalue_to_rvalue)
1418         (build_atomic_assign): New functions.
1419         (build_unary_op): Use build_atomic_assign for atomic increment and
1420         decrement.
1421         (build_conditional_expr): Do not treat _Atomic void as a qualified
1422         version of void.
1423         (build_modify_expr): Use build_atomic_assign for atomic LHS.
1424         (find_anonymous_field_with_type, convert_to_anonymous_field)
1425         (convert_for_assignment): Do not remove atomic qualifiers when
1426         comparing types.
1427         (digest_init): Do not accept initialization of arrays of atomic
1428         elements by string constants.
1429         (build_asm_expr): Use convert_lvalue_to_rvalue.
1430         (build_binary_op): Do not treat _Atomic void as a qualified
1431         version of void.
1433 2013-11-06  DJ Delorie  <dj@redhat.com>
1435         * c-decl.c (locate_old_decl): If a previous conflicting decl is
1436         both explicit and builtin, print the location of the explicit one.
1438 2013-11-05  Tobias Burnus  <burnus@net-b.de>
1440         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1441         c_parser_omp_distribute, c_parser_omp_teams,
1442         c_parser_omp_target, c_parser_omp_declare): Handle
1443         -fopenmp-simd.
1445 2013-11-03  Marek Polacek  <polacek@redhat.com>
1447         * c-decl.c (grokdeclarator): Add VLA instrumentation.
1449 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
1451         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1452         check_dup_generic at the end, unless remove is true.
1453         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1454         remove = true;.
1455         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1457 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
1459         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1460         with decl that is not pointer nor array.
1462 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1464         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1465         a spawning function is found.
1466         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1467         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1468         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1469         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1470         case.
1471         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1472         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1473         expr.
1474         (c_finish_return): Added a check to reject _Cilk_spawn in return
1475         expression.
1476         (build_cilk_spawn): New function.
1477         (build_cilk_sync): Likewise.
1478         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1479         
1480 2013-10-27  Tobias Burnus  <burnus@net-b.de>
1482         PR other/33426
1483         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1484         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1485         (c_parser_statement_after_labels): Update calls.
1487 2013-10-24  Tobias Burnus  <burnus@net-b.de>
1489         PR other/33426
1490         * c-parser.c (c_parser_pragma, c_parser_for_statement):
1491         Handle PRAGMA_IVDEP.
1492         (c_parser_statement_after_labels): Update call.
1494 2013-10-24  Marek Polacek  <polacek@redhat.com>
1496         * c-parser.c (c_parser_struct_declaration): Add a comment.
1497         (c_parser_declarator): Don't allow _Alignas here.
1499 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
1501         * c-parser.c: Include omp-low.h.
1502         * c-typeck.c: Likewise.
1504 2013-10-17  Marek Polacek  <polacek@redhat.com>
1506         PR c/58267
1507         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1508         Document syntax of the array-declarator.
1509         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1510         are not permitted.
1511         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1512         (c_parser_struct_declaration): Likewise.
1513         (c_parser_declarator): Likewise.
1514         (c_parser_direct_declarator_inner): Likewise.
1515         (c_parser_parameter_declaration): Likewise.
1516         (c_parser_type_name): Likewise.
1518 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
1520         * c-lang.h (current_omp_declare_target_attribute): New extern
1521         decl.
1522         * c-parser.c: Include c-lang.h.
1523         (struct c_parser): Change tokens to c_token *.
1524         Add tokens_buf field.  Change tokens_avail type to unsigned int.
1525         (c_parser_consume_token): If parser->tokens isn't
1526         &parser->tokens_buf[0], increment parser->tokens.
1527         (c_parser_consume_pragma): Likewise.
1528         (enum pragma_context): Add pragma_struct and pragma_param.
1529         (c_parser_external_declaration): Adjust
1530         c_parser_declaration_or_fndef caller.
1531         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1532         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1533         Adjust recursive call.
1534         (c_parser_struct_or_union_specifier): Use pragma_struct instead
1535         of pragma_external.
1536         (c_parser_parameter_declaration): Use pragma_param instead of
1537         pragma_external.
1538         (c_parser_compound_statement_nostart, c_parser_label,
1539         c_parser_for_statement): Adjust
1540         c_parser_declaration_or_fndef callers.
1541         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1542         it through to c_parser_conditional_expression.
1543         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1544         pass it through to c_parser_binary_expression.  Adjust recursive
1545         call.
1546         (c_parser_binary_expression): Remove prec argument, add
1547         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
1548         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1549         binop matches it, use build2 instead of parser_build_binary_op.
1550         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1551         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1552         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1553         Handle pragma_struct and pragma_param the same as pragma_external.
1554         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1555         (c_parser_omp_variable_list): Parse array sections for
1556         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1557         (c_parser_omp_clause_collapse): Fully fold collapse expression.
1558         (c_parser_omp_clause_reduction): Handle user defined reductions.
1559         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1560         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1561         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1562         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1563         c_parser_omp_clause_depend, c_parser_omp_clause_map,
1564         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1565         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1566         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1567         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
1568         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
1569         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1570         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
1571         (c_parser_omp_for_loop): Add CODE argument, pass it through
1572         to c_finish_omp_for.  Change last argument to cclauses,
1573         and adjust uses to grab parallel clauses from the array of all
1574         the split clauses.  Adjust c_parser_binary_expression,
1575         c_parser_declaration_or_fndef and c_finish_omp_for callers.
1576         (omp_split_clauses): New function.
1577         (c_parser_omp_simd): New function.
1578         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1579         Allow the function to be called also when parsing combined constructs,
1580         and call c_parser_omp_simd when parsing for simd.
1581         (c_parser_omp_sections_scope): If section-sequence doesn't start with
1582         #pragma omp section, require exactly one structured-block instead of
1583         sequence of statements.
1584         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1585         Allow the function to be called also when parsing combined constructs.
1586         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1587         Allow the function to be called also when parsing combined
1588         constructs.
1589         (c_parser_omp_taskgroup, c_parser_omp_cancel,
1590         c_parser_omp_cancellation_point, c_parser_omp_distribute,
1591         c_parser_omp_teams, c_parser_omp_target_data,
1592         c_parser_omp_target_update, c_parser_omp_target,
1593         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1594         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1595         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1596         (c_parser_omp_construct): Add p_name and mask vars.  Handle
1597         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1598         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
1599         and c_parser_omp_sections callers.
1600         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1601         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1602         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1603         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
1604         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
1605         OMP_CLAUSE_DEPEND.
1606         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1607         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1608         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1609         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1610         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1611         * c-typeck.c: Include tree-inline.h.
1612         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1613         handle_omp_array_sections_1, handle_omp_array_sections,
1614         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1615         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1616         user defined reductions.
1617         (c_tree_equal): New function.
1618         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1619         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1620         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1621         c_check_omp_declare_reduction_r): New prototypes.
1622         * c-decl.c (current_omp_declare_target_attribute): New variable.
1623         (c_decl_attributes): New function.
1624         (start_decl, start_function): Use it instead of decl_attributes.
1625         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1626         c_omp_reduction_decl, c_omp_reduction_lookup,
1627         c_check_omp_declare_reduction_r): New functions.
1629 2013-09-25  Tom Tromey  <tromey@redhat.com>
1631         * Make-lang.in (c/gccspec.o): Remove.
1632         (CFLAGS-c/gccspec.o): New variable.
1633         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1634         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1635         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1637 2013-09-25  Tom Tromey  <tromey@redhat.com>
1639         * Make-lang.in (c/gccspec.o): Don't use subshell.
1641 2013-09-18  Marek Polacek  <polacek@redhat.com>
1643         PR sanitize/58443
1644         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1645         Remove unnecessary check.
1647 2013-09-18  Marek Polacek  <polacek@redhat.com>
1649         PR sanitizer/58411
1650         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1651         no_sanitize_undefined attribute.
1653 2013-09-13  Kai Tietz  <ktietz@redhat.com>
1655         PR target/57848
1656         * c-decl.c (c_builtin_function_ext_scope): Remove
1657         wrong assumption that it is never called on prexisting
1658         symbol.
1660 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
1662         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1664 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1666         * c-objc-common.c (c_tree_printer): Tidy.
1668 2013-08-30  Marek Polacek  <polacek@redhat.com>
1670         * c-typeck.c (build_binary_op): Add division by zero and shift
1671         instrumentation.
1673 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
1674             Joseph Myers  <joseph@codesourcery.com>
1676         PR c/35649
1677         * c-typeck.c (c_common_type): Prefer double_type_node over
1678         other REAL_TYPE types with the same precision.
1679         (convert_arguments): Likewise.
1681 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1683         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1684         (c_initialize_diagnostics): Call a destructor for the early printer.
1686 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1688         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1689         printer initialization.
1691 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1693         PR c/57490
1694         * c-array-notation.c (fix_conditional_array_notations_1): Added a
1695         check for truth values.
1696         (expand_array_notation_exprs): Added truth values case.  Removed an
1697         unwanted else.  Added for-loop to walk through subtrees in default
1698         case.
1700 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1702         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1704 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
1706         * c-parser.c (struct c_generic_association): Fix typo.
1708 2013-07-23  Tom Tromey  <tromey@redhat.com>
1709             Joseph Myers  <joseph@codesourcery.com>
1711         * c-parser.c (struct c_generic_association): New.
1712         (c_generic_association_d): New typedef.
1713         (c_parser_generic_selection): New function.
1714         (c_parser_postfix_expression): Handle RID_GENERIC.
1716 2013-07-13  Jason Merrill  <jason@redhat.com>
1718         PR c++/57793
1719         * c-decl.c (finish_struct): Check for too-large class.
1721 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
1723         PR c/57821
1724         * c-typeck.c (set_init_index): When folding, check for index overflow.
1726 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1728         * c-parser.c (c_parser_array_notation): Removed rejection of array
1729         notations in an array of function pointers.
1731 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1733         * c-array-notation.c (make_triplet_val_inv): New function.
1734         (create_cmp_incr): Likewise.
1735         (create_array_refs): Likewise.
1736         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1737         Also modularized common parts between functions and called the function.
1738         (build_array_notation_expr): Likewise.
1739         (fix_conditional_array_notations_1): Likewise.
1740         (fix_array_notation_expr): Likewise.
1741         (fix_array_notation_call_expr): Likewise.
1743 2013-06-18  Marek Polacek  <polacek@redhat.com>
1745         PR c/57630
1746         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1748 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1750         * c-array-notation.c (build_array_notation_expr): Reject array notation
1751         mismatch between LHS and RHS even inside a call_expr.  Also, removed
1752         a couple while statements that were dead code.
1754 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1756         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1757         excessive precision expressions in function parameters.  Also removed
1758         couple unwanted while statements.
1760 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1762         * c-array-notation.c (expand_array_notation_exprs): Added
1763         ARRAY_NOTATION_REF case.
1764         
1765 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1767         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1768         function to c-family/array-notation-common.c.
1769         (is_cilkplus_reduce_builtin): Likewise.
1770         (find_rank): Likewise.
1771         (extract_array_notation_exprs): Likewise.
1772         (replace_array_notations): Likewise.
1773         (find_inv_trees): Likewise.
1774         (replace_inv_trees): Likewise.
1775         (contains_array_notation_expr): Likewise.
1776         (find_correct_array_notation_type): Likewise.
1777         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1778         (struct inv_list): Moved this to c-family/array-notation-common.c.
1779         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1780         
1781 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1783         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1784         reduction functions outside the for-loop.  Added a check if the fundecl
1785         is non-NULL.  Finally, removed an unwanted if-statement, and made the
1786         body unconditional.
1788 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1790         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1791         condition of the if-statement matches the rank of else-block and then-
1792         block when array notations are used.
1793         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1794         expression after the entire function body is parsed.
1795         (c_parser_expr_no_commas): Delayed creating array notation expressions
1796         to the end of function parsing.
1797         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1798         whole if-statement instead of just the condition.
1799         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
1801 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1803         PR c/57474
1804         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1805         array to NULL_TREE if they are unused.  Also added a check for the
1806         field to be NULL before its fields are used in future.
1807         
1808 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1810         PR bootstrap/57450
1811         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1812         (build_array_notation_expr): Likewise.
1814 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1816         * c-typeck.c (build_array_ref): Added a check to see if array's
1817         index is greater than one.  If true, then emit an error.
1818         (build_function_call_vec): Exclude error reporting and checking
1819         for builtin array-notation functions.
1820         (convert_arguments): Likewise.
1821         (c_finish_return): Added a check for array notations as a return
1822         expression.  If true, then emit an error.
1823         (c_finish_loop): Added a check for array notations in a loop
1824         condition.  If true then emit an error.
1825         (lvalue_p): Added a ARRAY_NOTATION_REF case.
1826         (build_binary_op): Added a check for array notation expr inside
1827         op1 and op0.  If present, we call another function to find correct
1828         type.
1829         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1830         * c-parser.c (c_parser_compound_statement): Check if array
1831         notation code is used in tree, if so, then transform them into
1832         appropriate C code.
1833         (c_parser_expr_no_commas): Check if array notation is used in LHS
1834         or RHS, if so, then build array notation expression instead of
1835         regular modify.
1836         (c_parser_postfix_expression_after_primary): Added a check for
1837         colon(s) after square braces, if so then handle it like an array
1838         notation.  Also, break up array notations in unary op if found.
1839         (c_parser_direct_declarator_inner): Added a check for array
1840         notation.
1841         (c_parser_compound_statement): Added a check for array notation in
1842         a stmt.  If one is present, then expand array notation expr.
1843         (c_parser_if_statement): Likewise.
1844         (c_parser_switch_statement): Added a check for array notations in
1845         a switch statement's condition.  If true, then output an error.
1846         (c_parser_while_statement): Similarly, but for a while.
1847         (c_parser_do_statement): Similarly, but for a do-while.
1848         (c_parser_for_statement): Similarly, but for a for-loop.
1849         (c_parser_unary_expression): Check if array notation is used in a
1850         pre-increment or pre-decrement expression.  If true, then expand
1851         them.
1852         (c_parser_array_notation): New function.
1853         * c-array-notation.c: New file.
1854         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1855         
1856 2013-05-23  Mike Stump  <mikestump@comcast.net>
1858         * c-typeck.c (convert_for_assignment): Handle references to memory
1859         spaces better.
1861 2013-05-16  Jason Merrill  <jason@redhat.com>
1863         * Make-lang.in (cc1$(exeext)): Use link mutex.
1865 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1867         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1868         to simply use OPT_Wpointer_arith.
1869         (build_unary_op): Likewise.
1871 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1873         PR c/19449
1874         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1875         argument.  If set, or it temporarily for parsing of the first
1876         argument into force_folding_builtin_constant_p.
1877         (c_parser_postfix_expression): Adjust callers.
1879 2013-03-21  Richard Biener  <rguenther@suse.de>
1881         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1882         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
1884 2013-02-12  Marek Polacek  <polacek@redhat.com>
1886         PR c/44938
1887         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1888         origtypes to NULL.
1890 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
1892         PR c/56078
1893         * c-typeck.c (set_nonincremental_init_from_string): If
1894         constructor_max_index is NULL, treat it as if tree_int_cst_lt
1895         returned false.
1896         (process_init_element): Likewise.
1898 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
1900         PR c++/55619
1901         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1902         argument, don't call default_function_array_conversion
1903         nor c_fully_fold here.
1904         (c_parser_asm_statement): Adjust callers.
1905         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1906         and outputs here, and call default_function_array_conversion
1907         on inputs that don't need to be addressable.
1909 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
1911         PR c/39464
1912         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1913         warning require that both c_common_unsigned_type as well as
1914         c_common_signed_type is the same for both mvl and mvr types.
1916 2012-11-16  Diego Novillo  <dnovillo@google.com>
1918         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1920         * c-common.c: Use new vec API in vec.h.
1921         * c-common.h: Likewise.
1922         * c-gimplify.c: Likewise.
1923         * c-pragma.c: Likewise.
1924         * c-pretty-print.c: Likewise.
1925         * c-pretty-print.h: Likewise.
1926         * c-semantics.c: Likewise.
1927         * c-decl.c: Likewise.
1928         * c-parser.c: Likewise.
1929         * c-tree.h: Likewise.
1930         * c-typeck.c: Likewise.
1932 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
1934         PR c++/54930
1935         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1937 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1939         PR c/53066
1940         * c-decl.c (warn_if_shadowing): Do not warn if a variable
1941         shadows a function, unless the variable is a function or a
1942         pointer-to-function.
1944 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
1946         PR c/54381
1947         * c-parser.c (struct c_tree_loc_pair): Removed.
1948         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1949         add location_t * and tree * arguments, fill in array of 3
1950         sizeof_arg trees and corresponding locs.
1951         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1952         c_parser_expr_list callers.
1953         (c_parser_postfix_expression_after_primary): Likewise.  Pass
1954         array of 3 sizeof_arg trees and locs (corresponding to first
1955         3 arguments) to sizeof_pointer_memaccess_warning.
1957 2012-10-09  Lawrence Crowl  <crowl@google.com>
1959         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1960         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1961         hash table.
1963 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
1965         PR c++/54194
1966         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1967         call.
1969 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
1971         PR c++/54427
1972         * c-typeck.c: Include c-common.h.
1973         (enum stv_conv): Moved to c-common.h.
1974         (scalar_to_vector): Moved to c-common.c.
1975         (build_binary_op): Adapt to scalar_to_vector's new prototype.
1976         * Make-lang.in: c-typeck.c depends on c-common.h.
1978 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
1980         * c-decl.c (c_write_global_declarations): Fix handling of
1981         -fdump-ada-spec*.
1983 2012-09-30  Sharad Singhai  <singhai@google.com>
1985         * c-decl.c (c_write_global_declarations): Use a different method
1986         to determine if the dump has ben initialized.
1988 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1990         PR c/54552
1991         * c-typeck.c (c_cast_expr): When casting to a type requiring
1992         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1993         c_fully_fold first.
1995 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1997         PR c/54103
1998         * c-typeck.c (build_unary_op): Pass original argument of
1999         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2000         any C_MAYBE_CONST_EXPR, if it has integer operands.
2001         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2002         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2003         to c_objc_common_truthvalue_conversion, then remove any
2004         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
2005         c_objc_common_truthvalue_conversion not
2006         c_common_truthvalue_conversion.
2007         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2008         call note_integer_operands for arguments with integer operands
2009         that are not integer constants.
2011 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
2013         PR c/54559
2014         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2015         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2017 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
2019         PR c/54428
2020         * c-convert.c (convert): Don't call fold_convert_loc if
2021         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2022         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
2023         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2025 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
2027         PR c/54355
2028         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2029         for nested and empty_ok arguments in the call to
2030         c_parser_declaration_or_fndef.
2032 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
2034         * c-tree.h (c_last_sizeof_arg): Declare.
2035         * c-parser.c (struct c_tree_loc_pair): New type.
2036         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
2037         non-NULL.
2038         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2039         (c_parser_postfix_expression_after_primary): Likewise.  Call
2040         sizeof_pointer_memaccess_warning if needed.
2041         (sizeof_ptr_memacc_comptypes): New function.
2042         * c-typeck.c (c_last_sizeof_arg): New global variable.
2043         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2045 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
2047         * c-lang.h (lang_decl): Add variable_size GTY option.
2049 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
2051         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2052         * Make-lang.in: Fix dependencies.
2054 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
2056         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2057         and add language Makefile hooks.
2058         * config-lang.in: New file.
2059         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2060         add the required "normal" config-lang.in rules.
2061         * c-lang.h: Moved from gcc/ to here.
2062         * c-tree.h: Likewise.
2063         * c-objc-common.c: Likewise.
2064         * c-objc-common.h: Likewise.
2065         * c-typeck.c: Likewise.
2066         * c-convert.c: Likewise.
2067         * c-lang.c: Likewise.
2068         * c-aux-info.c: Likewise.
2069         * c-errors.c: Likewise.
2070         * gccspec.c: Likewise.
2071         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
2072         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
2074 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2076 Copying and distribution of this file, with or without modification,
2077 are permitted in any medium without royalty provided the copyright
2078 notice and this notice are preserved.