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