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