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