PR c/64423
[official-gcc.git] / gcc / c / ChangeLog
blob7a0eda0dcefb936a8777e97e5c97932e6a779e6a
1 2015-01-05  Marek Polacek  <polacek@redhat.com>
3         PR c/64423
4         * c-typeck.c (build_array_ref): Pass loc down to
5         warn_array_subscript_with_type_char.
7 2014-12-20  Martin Uecker <uecker@eecs.berkeley.edu>
9         * c-typeck.c: New behavious for pointers to arrays with qualifiers
10         (common-pointer-type): For pointers to arrays take qualifiers from
11         element type.
12         (build_conditional_expr): Add warnings for lost qualifiers.
13         (comp-target-types): Allow pointers to arrays with different qualifiers.
14         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
15         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
16         to PEDWARN_FOR_QUALIFIERS.
18 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
20         PR sanitizer/64289
21         * c-convert.c: Include ubsan.h.
22         (convert): For real -> integral casts and
23         -fsanitize=float-cast-overflow don't call convert_to_integer, but
24         instead instrument the float cast directly.
26 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
28         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
29         c_finish_stmt_expr): Remove NULL last argument from
30         create_tmp_var_raw and create_tmp_var calls.
31         * c-array-notation.c (fix_builtin_array_notation_fn,
32         build_array_notation_expr, fix_conditional_array_notations_1,
33         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
35 2014-11-28  Marek Polacek  <polacek@redhat.com>
37         PR c/63862
38         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
39         convert the right operand to integer type.
41 2014-11-25  Marek Polacek  <polacek@redhat.com>
43         PR c/63877
44         * c-decl.c (start_function): Disable -Wmissing-declarations warning
45         for inline functions.
47 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
49         PR target/63764
50         * c-typeck.c (build_array_ref): Adjust
51         convert_vector_to_pointer_for_subscript caller.  If it returns true,
52         call non_lvalue_loc on the result.
54 2014-11-11  Richard Biener  <rguenther@suse.de>
56         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
57         to true.
59 2014-11-10  Andi Kleen  <ak@linux.intel.com>
61         PR c/60804
62         * c-parser.c (c_parser_statement_after_labels): Call
63         check_no_cilk.
64         (c_parser_if_statement): Dito.
65         (c_parser_switch_statement): Dito.
66         (c_parser_while_statement): Dito.
67         (c_parser_do_statement): Dito.
68         (c_parser_for_statement): Dito.
69         * c-typeck.c (c_finish_loop): Dito.
71 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
73         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
74         OPT_Wshift_count_overflow in the warnings.
76 2014-10-30  Marek Polacek  <polacek@redhat.com>
78         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
79         print the stripped version as well, if they're not the same.
81 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
83         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
84         machine_mode.
86 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
88         * c-decl.c: Adjust include files.
89         * c-parser.c: Ditto.
91 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
92             Tom Tromey  <tromey@redhat.com>
94         * c-tree.h (enum c_oracle_request): New.
95         (c_binding_oracle_function): New typedef.
96         (c_binding_oracle, c_pushtag, c_bind): Declare.
97         * c-decl.c (c_binding_oracle): New global.
98         (I_SYMBOL_CHECKED): New macro.
99         (i_symbol_binding): New function.
100         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
101         (I_TAG_CHECKED): New macro.
102         (i_tag_binding): New function.
103         (I_TAG_BINDING, I_TAG_DECL): Redefine.
104         (I_LABEL_CHECKED): New macro.
105         (i_label_binding): New function.
106         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
107         (c_print_identifier): Save and restore c_binding_oracle.
108         (c_pushtag, c_bind): New functions.
110 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
112         * c-typeck.c: Adjust include files.
114 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
116         PR c++/53061
117         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
118         initialization here...
119         (c_initialize_diagnostics): ... but here. Set defaults after
120         building pretty-printer.
122 2014-10-23  Marek Polacek  <polacek@redhat.com>
124         PR c/63626
125         * c-decl.c (pop_scope): Don't print warning in external_scope.
127 2014-10-19  Marek Polacek  <polacek@redhat.com>
129         PR c/63567
130         * c-typeck.c (output_init_element): Allow initializing objects with
131         static storage duration with compound literals even in C99 and add
132         pedwarn for it.
134 2014-10-17  Marek Polacek  <polacek@redhat.com>
136         PR c/63567
137         * c-typeck.c (digest_init): Allow initializing objects with static
138         storage duration with compound literals even in C99 and add pedwarn
139         for it.
141 2014-10-17  Marek Polacek  <polacek@redhat.com>
143         PR c/63543
144         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
145         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
146         error multiple times.  Print the type.
148 2014-10-17  Marek Polacek  <polacek@redhat.com>
150         PR c/63549
151         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
152         type.
154 2014-10-17  Marek Polacek  <polacek@redhat.com>
156         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
157         (start_function): Use OPT_Wimplicit_int instead of 0.
158         (store_parm_decls_oldstyle): Likewise.
160 2014-10-17  Alan Modra  <amodra@gmail.com>
162         PR middle-end/61848
163         * c-decl.c (merge_decls): Don't merge section name or tls model
164         to newdecl symtab node, instead merge to olddecl.  Override
165         existing olddecl section name.  Set tls_model for all thread-local
166         vars, not just OMP thread-private ones.  Remove incorrect comment.
168 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
170         * c-decl.c: Adjust include files.
172 2014-10-14  DJ Delorie  <dj@redhat.com>
174         * c-parser.c (c_parse_init): Add RID entries for each __intN.
175         (c_token_starts_typename): Check all __intN, not just __int128.
176         (c_token_starts_declspecs): Likewise.
177         (c_parser_declspecs): Likewise.
178         (c_parser_attribute_any_word): Likewise.
179         (c_parser_objc_selector): Likewise.
180         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
181         (struct c_declspecs): Add int_n_idx field to record *which* __intN
182         is specified.
183         * c-decl.c (declspecs_add_type): Check for all __intN, not just
184         __int128.
185         (finish_declspecs): Likewise.
187 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
189         * c-parser.c (c_parser_all_labels): New function to replace
190         the duplicate code.
191         (c_parser_statement): Call the new function.
193 2014-10-09  Marek Polacek  <polacek@redhat.com>
195         PR c/63480
196         * c-typeck.c (pop_init_level): Don't warn about initializing
197         with { }.
199 2014-10-07  Marek Polacek  <polacek@redhat.com>
201         PR c/59717
202         * c-decl.c (header_for_builtin_fn): New function.
203         (implicitly_declare): Suggest which header to include.
205 2014-10-07  Marek Polacek  <polacek@redhat.com>
207         * c-convert.c (convert): Use error_operand_p.
208         * c-typeck.c (require_complete_type): Likewise.
209         (really_atomic_lvalue): Likewise.
210         (digest_init): Likewise.
211         (handle_omp_array_sections_1): Likewise.
213 2014-10-03  Marek Polacek  <polacek@redhat.com>
215         PR c/63453
216         * c-decl.c (pop_scope): Don't warn about "inline function declared
217         but never defined" for functions marked with gnu_inline attribute.
219 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
221         PR c++/63249
222         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
223         on low_bound and length.
225 2014-09-24  Marek Polacek  <polacek@redhat.com>
227         PR c/61405
228         PR c/53874
229         * c-parser.c: Don't define CPP_KEYWORD.
230         (c_parser_switch_statement): Pass original type to c_finish_case.
231         * c-tree.h (c_finish_case): Update declaration.
232         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
233         conditionally to c_do_switch_warnings.
235 2014-09-03  Marek Polacek  <polacek@redhat.com>
237         PR c/62024
238         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
239         conversions.
241 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
242             Balaji V. Iyer  <balaji.v.iyer@intel.com>
243             Igor Zamyatin  <igor.zamyatin@intel.com>
245         * c-parser.c (c_parser_cilk_for): New function.
246         (c_parser_cilk_grainsize): Likewise.
247         (c_get_temp_regvar): Likewise.
248         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
249         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
250         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
251         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
252         case.
254 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
256         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
257         with using HOST_WIDE_INT without truncation to 'int'
259 2014-08-22  Marek Polacek  <polacek@redhat.com>
261         PR c++/62199
262         * c-typeck.c (parser_build_binary_op): Adjust call to
263         warn_logical_not_parentheses.
265 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
267         PR other/62008
268         * c-parser.c (c_parser_array_notation): Check for correct
269         type of an array added.
271 2014-08-19  Marek Polacek  <polacek@redhat.com>
273         PR c++/62153
274         * c-typeck.c (build_binary_op): If either operand of a comparison
275         is a boolean expression, call maybe_warn_bool_compare.
277 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
279         PR c/45584
280         * c-typeck.c (build_c_cast): Do a conversion even when the
281         TYPE_MAIN_VARIANTs are the same.
283 2014-08-19  Marek Polacek  <polacek@redhat.com>
285         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
286         pedwarn_c99 instead of pedwarn.
287         (grokfield): Likewise.
288         (warn_defaults_to): New function.
289         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
290         Unconditionally call pedwarn_c99 instead of pedwarn.
291         (start_function): Call warn_defaults_to instead of pedwarn_c99.
292         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
293         check flag_isoc11 before.
294         * c-errors.c (pedwarn_c99): Change the return type to bool.
295         Handle -Wc99-c11-compat.
296         * c-parser.c (disable_extension_diagnostics): Handle
297         warn_c99_c11_compat.
298         (restore_extension_diagnostics): Likewise.
299         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
300         instead of pedwarn, don't check flag_isoc11 before.
301         (c_parser_declspecs): Likewise.
302         (c_parser_alignas_specifier): Likewise.
303         (c_parser_alignof_expression): Likewise.
304         (c_parser_generic_selection): Likewise.
305         * c-tree.h (pedwarn_c99): Update declaration.
306         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
307         of pedwarn_c99.
309 2014-08-19  Marek Polacek  <polacek@redhat.com>
311         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
312         to pedwarn_c90.
313         * c-errors.c: Include "opts.h".
314         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
315         * c-parser.c (disable_extension_diagnostics): Handle negative value
316         of warn_c90_c99_compat, too.
317         (restore_extension_diagnostics): Likewise.
318         (c_parser_compound_statement_nostart): Pass
319         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
321 2014-08-12  Marek Polacek  <polacek@redhat.com>
323         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
324         Add pedwarn.
325         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
326         Likewise.
327         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
329 2014-08-10 Marek Polacek  <polacek@redhat.com>
331         PR c/51849
332         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
333         Call pedwarn_c90 instead of pedwarn.
334         (check_bitfield_type_and_width): Likewise.
335         (declspecs_add_qual): Likewise.
336         (declspecs_add_type): Likewise.
337         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
338         Adjust to only call pedwarn_c90.
339         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
340         pedwarn_c90 instead of pedwarn.
341         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
342         * c-parser.c (disable_extension_diagnostics): Handle
343         warn_c90_c99_compat.
344         (restore_extension_diagnostics): Likewise.
345         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
346         pedwarn_c90 instead of pedwarn.
347         (c_parser_initelt): Likewise.
348         (c_parser_postfix_expression): Likewise.
349         (c_parser_postfix_expression_after_paren_type): Likewise.
350         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
351         * c-tree.h: Fix formatting.
352         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
353         pedwarn_c90 instead of pedwarn.
355 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
357         * c-typeck.c: Remove include of pointer-set.h.
359 2014-08-07  Marek Polacek  <polacek@redhat.com>
361         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
363 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
365         * c-typeck.c: Use hash_map instead of pointer_map.
367 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
369         * c-decl.c: Use hash_set instead of pointer_set.
371 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
373         PR middle-end/61455
374         * c-array-notation.c (expand_array_notations): Handling
375         of DECL_EXPR added.
377 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
379         PR c++/60517
380         * c-typeck.c (c_finish_return): Return 0 instead of the address of
381         a local variable.
383 2014-07-30  Tom Tromey  <tromey@redhat.com>
385         * c-typeck.c (struct constructor_stack) <designator_depth>: New
386         field.
387         (really_start_incremental_init, push_init_level): Initialize
388         designator_depth.
389         (pop_init_level): Set global designator_depth.
390         (process_init_element): Check for designated_init attribute.
392 2014-07-20  Marek Polacek  <polacek@redhat.com>
394         PR c/61852
395         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
396         (implicitly_declare): Pass location to implicit_decl_warning.
398 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
400         PR middle-end/61294
401         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
402         If non-NULL, call c_parser_check_literal_zero.
403         (c_parser_check_literal_zero): New function.
404         (c_parser_postfix_expression_after_primary): Adjust
405         c_parser_expr_list caller, handle -Wmemset-transposed-args.
407 2014-07-06  Marek Polacek  <polacek@redhat.com>
409         PR c/6940
410         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
411         * c-tree.h (C_ARRAY_PARAMETER): Define.
412         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
413         function parameter.
415 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
416             Chen Gang <gang.chen.5i5j@gmail.com>
418         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
419         releasing symbol.
421 2014-07-01  Marek Polacek  <polacek@redhat.com>
423         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
424         instead of 0 to WARN_FOR_ASSIGNMENT.
426 2014-07-01  Marek Polacek  <polacek@redhat.com>
428         PR c/58286
429         * c-typeck.c (convert_for_assignment): Pass
430         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
432 2014-06-30  Marek Polacek  <polacek@redhat.com>
434         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
435         has no_sanitize_undefined attribute.
437 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
439         PR middle-end/57541
440         * c-array-notation.c (fix_builtin_array_notation_fn):
441         Check for 0 arguments in builtin call. Check that bultin argument is
442         correct.
443         * c-parser.c (c_parser_array_notation): Check for incorrect initial
444         index.
446 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
448         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
449         qualifiers in __auto_type for atomic types.
450         (c_parser_typeof_specifier): Discard all type qualifiers in
451         __typeof__ for atomic types.
453 2014-06-25  Marek Polacek  <polacek@redhat.com>
455         PR c/61162
456         * c-parser.c (c_parser_statement_after_labels): Pass the location of
457         the return expression to c_finish_return.
459 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
461         * c-typeck.c (c_finish_omp_clauses): Make sure
462         OMP_CLAUSE_LINEAR_STEP has correct type.
464 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
466         * c-decl.c: Adjust.
468 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
470         * c-parser.c (c_parser_omp_for_loop): For
471         #pragma omp parallel for simd move lastprivate clause from parallel
472         to for rather than simd.
474 2014-06-23  Marek Polacek  <polacek@redhat.com>
476         * c-typeck.c (parser_build_binary_op): Don't call
477         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
479 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
481         * c-parser.c (c_parser_omp_threadprivate): Likewise.
482         * c-decl.c (merge_decls): Likewise.
484 2014-06-09  Marek Polacek  <polacek@redhat.com>
486         PR c/36446
487         * c-typeck.c (error_init): Call inform instead of error_at.
488         (pedwarn_init): Call inform instead of pedwarn.
489         (warning_init): Call inform instead of warning_at.
491 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
493         * c-decl.c (merge_decls): Use set_decl_section_name.
494         (duplicate_decls): Remove node if it exists.
496 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
498         PR c/53119
499         * c-typeck.c (push_init_level, process_init_element,
500         pop_init_level): Correct check for zero initialization, move
501         missing brace warning to respect zero initialization.
503 2014-06-05  Marek Polacek  <polacek@redhat.com>
505         PR c/56724
506         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
508 2014-06-05  Marek Polacek  <polacek@redhat.com>
510         PR c/49706
511         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
512         on the left hand side operand of a comparison. 
514 2014-06-05  Marek Polacek  <polacek@redhat.com>
516         PR c/48062
517         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
518         Print note only if the warning was printed.
520 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
522         PR c/58942
523         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
524         with a pointer.
526 2014-06-03  Marek Polacek  <polacek@redhat.com>
528         PR c/60439
529         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
530         c_start_case.
531         * c-tree.h (c_start_case): Update.
532         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
533         switch condition has boolean value.
535 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
537         * c-decl.c: Include builtins.h.
538         * c-parser.c: Likewise.
540 2014-05-27  Marek Polacek  <polacek@redhat.com>
542         PR c/56724
543         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
544         error and warning calls to error_at and warning_at.  Pass location of
545         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
546         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
547         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
549 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
551         PR c/61191
552         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
553         function parameters.
555 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
557         * c-decl.c (merge_decls): Preserve symtab node pointers.
558         (duplicate_decls): Free new decl.
560 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
562         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
563         initialization.
565         * c-parser.c (c_parser_omp_target): Return bool values.
567 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
569         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
570         num_teams_loc variable to num_thread_limit_loc.
572 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
574         * c-array-notation.c (expand_array_notations): Use void_node
575         instead of void_zero_node.
577 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
579         * c-decl.c (finish_struct): Adjust.
580         (finish_enum): Likewise.
581         (bind): Adjust.
582         (record_inline_static): Likewise.
583         (push_scope): Likewise.
584         (make_label): Likewise.
585         (lookup_label_for_goto): Likewise.
586         (finish_struct): Likewise.
587         (finish_enum): Likewise.
588         (store_parm_decls): Likewise.
589         (c_push_function_context): Likewise.
590         * c-lang.h: Remove usage of variable_size gty attribute.
591         * c-parser.c (c_parse_init): Adjust.
592         (c_parse_file): Likewise.
594 2014-05-13  Marek Polacek  <polacek@redhat.com>
596         PR c/61162
597         * c-typeck.c (convert_for_assignment): Pass location to
598         WARN_FOR_ASSIGNMENT instead of input_location.
600 2014-05-10  Marek Polacek  <polacek@redhat.com>
602         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
603         maybe_warn_string_init.
604         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
605         maybe_warn_string_init.
606         * c-tree.h (maybe_warn_string_init): Update declaration.
607         * c-typeck.c (maybe_warn_string_init): Add location parameter.
608         Call pedwarn_init with loc instead of with input_location.
609         (digest_init): Pass init_loc to maybe_warn_string_init.
610         (pop_init_level): Call pedwarn_init with loc instead of with
611         input_location.
612         (set_init_index): Likewise.
613         (process_init_element): Likewise.
615 2014-05-09  Marek Polacek  <polacek@redhat.com>
617         PR c/61096
618         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
619         (c_parser_initelt): Pass location to set_init_label.  Pass array index
620         location to set_init_index.
621         * c-tree.h (push_init_level): Update declaration.
622         (pop_init_level): Likewise.
623         (set_init_index): Likewise.
624         (set_init_label): Likewise.
625         * c-typeck.c (error_init): Add location parameter.  Call error_at
626         instead of error.
627         (digest_init): Pass init_loc to error_init.
628         (really_start_incremental_init):
629         (push_init_level): Add location parameter.  Pass loc to pop_init_level
630         and error_init.
631         (pop_init_level): Likewise.
632         (set_designator): Add location parameter.  Pass loc to pop_init_level,
633         push_init_level, and error_init.
634         (set_init_index): Add location parameter.  Pass loc to error_init and
635         set_designator.
636         (set_init_label): Likewise.
637         (output_init_element): Pass loc to error_init.
638         (process_init_element): Pass loc to error_init, pop_init_level,
639         pedwarn_init, and push_init_level.
641 2014-05-09  Marek Polacek  <polacek@redhat.com>
643         PR c/50459
644         * c-parser.c (c_parser_attributes): Parse the arguments as an
645         expression-list if the attribute takes identifier.
647 2014-05-08  Marek Polacek  <polacek@redhat.com>
649         PR c/61053
650         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
651         TYPE_ALIGN_UNIT.
653 2014-05-08  Marek Polacek  <polacek@redhat.com>
655         PR c/61077
656         * c-decl.c (start_function): Warn for _Atomic-qualified return type
657         of main.
659 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
660             Mike Stump  <mikestump@comcast.net>
661             Richard Sandiford  <rdsandiford@googlemail.com>
663         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
664         (finish_enum): Use wide-int interfaces.
665         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
666         * c-typeck.c (build_c_cast): Likewise.
667         (set_nonincremental_init_from_string): Likewise.
668         (c_tree_equal): Likewise.
670 2014-05-02  Marek Polacek  <polacek@redhat.com>
672         PR c/25801
673         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
674         Return size_one_node when the type is not complete.
675         (pointer_diff): Remove comment.
676         (build_unary_op): Improve error messages.
678 2014-05-02  Marek Polacek  <polacek@redhat.com>
680         * c-typeck.c (c_finish_return): Separate warning_at calls.
682 2014-05-02  Marek Polacek  <polacek@redhat.com>
684         * c-tree.h (error_init): Remove declaration.
685         (pedwarn_init): Likewise.
686         * c-typeck.c (error_init): Make static and move above.
687         (pedwarn_init): Likewise.
688         (warning_init): Move above.
689         (maybe_warn_string_init): Likewise.
691 2014-05-01  Jeff Law  <law@redhat.com>
693         Revert:
695         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
696         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
697         avoid goto.
699 2014-05-02  Marek Polacek  <polacek@redhat.com>
701         PR c/60784
702         * c-typeck.c (push_init_level): Set constructor_designated to
703         p->designated for structures.
705 2014-05-01  Marek Polacek  <polacek@redhat.com>
707         PR c/60915
708         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
709         function-definition has an attribute after the declarator.
711 2014-05-01  Marek Polacek  <polacek@redhat.com>
713         PR c/60257
714         * c-typeck.c (warning_init): Add location_t parameter.  Call
715         warning_at instead of warning.
716         (push_init_level): Pass input_location to warning_init.
717         (add_pending_init): Add location_t parameter.  Pass loc to
718         warning_init.
719         (set_nonincremental_init): Pass input_location to add_pending_init.
720         (set_nonincremental_init_from_string): Likewise.
721         (output_init_element): Pass loc to warning_init and to
722         add_pending_init.
724 2014-05-01  Marek Polacek  <polacek@redhat.com>
726         PR c/43395
727         * c-typeck.c (c_finish_return): Distinguish between label and variable
728         when warning about returning local address.
730 2014-05-01  Marek Polacek  <polacek@redhat.com>
732         PR c/29467
733         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
734         in C89 mode.
736 2014-05-01  Marek Polacek  <polacek@redhat.com>
738         PR c/43245
739         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
740         instead of 0 to WARN_FOR_QUALIFIERS.
742 2014-05-01  Marek Polacek  <polacek@redhat.com>
744         PR c/56989
745         * c-typeck.c (default_conversion): Use better location for
746         error call.
748 2014-04-30  Marek Polacek  <polacek@redhat.com>
750         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
751         also when SANITIZE_FLOAT_DIVIDE is on.
753 2014-04-30  Marek Polacek  <polacek@redhat.com>
755         PR c/60139
756         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
757         and pedwarn_init.  Use loc insted of input_location.
759 2014-04-30  Marek Polacek  <polacek@redhat.com>
761         PR c/60351
762         * c-typeck.c (build_binary_op): Use location when warning about
763         shift count.
765 2014-04-25  Marek Polacek  <polacek@redhat.com>
767         PR c/18079
768         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
769         always_inline/noinline and hot/cold attributes.
771 2014-04-25  Marek Polacek  <polacek@redhat.com>
773         PR c/60114
774         * c-parser.c (c_parser_initelt): Pass input_location to
775         process_init_element.
776         (c_parser_initval): Pass loc to process_init_element.
777         * c-tree.h (process_init_element): Adjust declaration.
778         * c-typeck.c (push_init_level): Pass input_location to
779         process_init_element.
780         (pop_init_level): Likewise.
781         (set_designator): Likewise.
782         (output_init_element): Add location_t parameter.  Pass loc to
783         digest_init.
784         (output_pending_init_elements): Pass input_location to
785         output_init_element.
786         (process_init_element): Add location_t parameter.  Pass loc to
787         output_init_element.
789 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
791         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
792         atomic-clause, allow comma in between atomic-clause and
793         seq_cst.
795 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
797         PR c/59073
798         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
799         fails, don't set OM_PARALLEL_COMBINED and return NULL.
801 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
803         PR middle-end/60469
804         * c-array-notation.c (fix_builtin_array_notation_fn): Use
805         create_tmp_var instead build_decl for creating temps.
806         (build_array_notation_expr): Likewise.
807         (fix_conditional_array_notations_1): Likewise.
808         (fix_array_notation_expr): Likewise.
809         (fix_array_notation_call_expr): Likewise.
811 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
813         PR c++/60689
814         * c-tree.h (c_build_function_call_vec): New prototype.
815         * c-typeck.c (build_function_call_vec): Don't call
816         resolve_overloaded_builtin here.
817         (c_build_function_call_vec): New wrapper function around
818         build_function_call_vec.  Call resolve_overloaded_builtin here.
819         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
820         Call c_build_function_call_vec instead of build_function_call_vec.
821         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
822         * c-decl.c (finish_decl): Likewise.
824 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
826         PR c/55383
827         * c-typeck.c: Use correct format string in cast-qual warning
829 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
831         * c-decl.c (c_decl_attributes): Use
832         lang_hooks.types.omp_mappable_type.
833         * c-typeck.c (c_finish_omp_clauses): Likewise.
835 2014-03-06  Marek Polacek  <polacek@redhat.com>
837         PR c/60197
838         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
839         of checking tree code.
841 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
843         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
844         (c_parser_parameter_declaration): Likewise.
846 2014-02-19  Marek Polacek  <polacek@redhat.com>
848         PR c/60195
849         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
850         Call mark_exp_read on exp.value.
851         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
852         TREE_ADDRESSABLE on old instead of val.
853         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
855 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
857         * c-parser.c (c_parser_get_builtin_args): Replace calls to
858         C_EXPR_APPEND by vec_safe_push.
859         * c-tree.h (C_EXPR_APPEND): Remove.
861 2014-01-31  Marek Polacek  <polacek@redhat.com>
863         PR c/59963
864         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
865         build_function_call_vec.
866         (build_function_call): Likewise.
867         (build_atomic_assign): Likewise.
868         (build_function_call_vec): Add arg_loc parameter.  Use it.
869         (convert_arguments): Likewise.
870         (convert_for_assignment): Rename rhs_loc to expr_loc.
871         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
872         (c_parser_objc_keywordexpr): Likewise.
873         (c_parser_postfix_expression_after_primary): Call
874         build_function_call_vec with expr_loc rather than op_loc.
875         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
876         build_function_call_vec.
877         (c_parser_expr_list): Add locations parameter.  Fill it with locations
878         of function arguments.
879         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
881 2014-01-30  Marek Polacek  <polacek@redhat.com>
883         PR c/59940
884         * c-typeck.c (build_function_call_vec): Use loc parameter.
885         (convert_arguments): Add location parameter.  Use it.
886         (ep_convert_and_check): Likewise.
887         (build_atomic_assign): Adjust convert_for_assignment call.
888         (build_modify_expr): Likewise.
889         (digest_init): Likewise.
890         (c_finish_return): Likewise.
891         (build_conditional_expr): Adjust ep_convert_and_check calls.
892         (convert_for_assignment): Add rhs_loc parameter.  Use it.
893         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
894         calls.
896 2014-01-30  Richard Biener  <rguenther@suse.de>
898         PR c/59905
899         * c-typeck.c (build_function_call_vec): Do not replace calls
900         to a function via an incompatible type with a runtime abort.
902 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
904         * c-parser.c (c_parser_declaration_or_fndef): Replaced
905         flag_enable_cilkplus with flag_cilkplus.
906         (c_parser_direct_declarator_inner): Likewise.
907         (c_parser_attribute_any_word): Likewise.
908         (c_parser_attributes): Likewise.
909         (c_parser_compound_statement): Likewise.
910         (c_parser_statement_after_labels): Likewise.
911         (c_parser_if_statement): Likewise.
912         (c_parser_switch_statement): Likewise.
913         (c_parser_do_statement): Likewise.
914         (c_parser_for_statement): Likewise.
915         (c_parser_unary_expression): Likewise.
916         (c_parser_postfix_expression): Likewise.
917         (c_parser_postfix_expression_after_primary): Likewise.
918         (c_parser_postfix_expression_after_primary): Likewise.
919         (c_parser_omp_clause_name): Likewise.
920         (c_finish_omp_declare_simd): Likewise.
921         (c_parser_cilk_verify_simd): Likewise.
922         * c-typeck.c (build_array_ref): Likewise.
923         (build_function_call_vec): Likewise.
924         (convert_arguments): Likewise.
925         (build_compound_expr): Likewise.
926         (c_finish_return): Likewise.
927         (c_finish_if_stmt): Likewise.
928         (c_finish_loop): Likewise.
929         (build_binary_op): Likewise.
931 2014-01-23  Marek Polacek  <polacek@redhat.com>
933         PR c/59846
934         * c-typeck.c (parser_build_binary_op): Use location instead of
935         input_location.
936         (build_binary_op): Pass location to shorten_compare.
938 2014-01-23  Marek Polacek  <polacek@redhat.com>
940         PR c/58346
941         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
942         an empty aggregate.
944 2014-01-23  Marek Polacek  <polacek@redhat.com>
946         PR c/59871
947         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
948         of a comma expression.
949         (emit_side_effect_warnings): Likewise.
951 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
953         PR c/59825
954         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
955         function to use walk_tree and moved a lot of its functionality to
956         expand_array_notations.
957         (expand_array_notations): New function.
959 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
961         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
962         attribute an attribute without value.
964 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
966         PR middle-end/58809
967         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
968         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
970 2014-01-22  Marek Polacek  <polacek@redhat.com>
972         PR c/59891
973         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
974         of remove_c_maybe_const_expr on op1 and op2.
976 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
978         PR c/58943
979         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
980         effects, preevaluate rhs using SAVE_EXPR first.
982 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
984         PR c++/59631
985         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
986         statements with if-elseif statements.
988 2014-01-06  Marek Polacek  <polacek@redhat.com>
990         PR c/57773
991         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
992         defined bit-field types only in ISO C.
994 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
996         Update copyright years
998 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1000         * c-array-notation.c: Use the standard form for the copyright notice.
1002 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1004         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1005         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1006         field in parser is not empty.  If not-empty, call the function
1007         c_parser_finish_omp_declare_simd.
1008         (c_parser_cilk_clause_vectorlength): Modified function to be shared
1009         between SIMD-enabled functions and #pragma simd.  Added new parameter.
1010         (c_parser_cilk_all_clauses): Modified the usage of the function
1011         c_parser_cilk_clause_vectorlength as mentioned above.
1012         (c_parser_cilk_simd_fn_vector_attrs): New function.
1013         (c_finish_cilk_simd_fn_tokens): Likewise.
1014         (is_cilkplus_vector_p): Likewise.
1015         (c_parser_omp_clause_name): Added checking for "vectorlength,"
1016         "nomask," and "mask" strings in clause name.
1017         (c_parser_omp_all_clauses): Added 3 new case statements:
1018         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1019         PRAGMA_CILK_CLAUSE_NOMASK.
1020         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
1021         check for vector attribute and if so call the function
1022         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
1023         called the function c_finish_cilk_simd_fn_tokens.
1024         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1025         parser field is non-empty.  If so, parse them as you would parse
1026         the omp declare simd pragma.
1027         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1028         Added a check when step is a parameter and flag it as error.
1029         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1030         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1031         pragma_omp_clause.
1033 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
1035         * c-parser.c (c_parser_omp_parallel): Fix description.
1037 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1039         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1040         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1041         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1042         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1044 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
1046         PR c/52023
1047         * c-parser.c (c_parser_alignas_specifier): Use
1048         c_sizeof_or_alignof_type instead of c_alignof.
1049         (c_parser_alignof_expression): Likewise, with min_alignof
1050         parameter depending on alignof spelling used.
1052 2013-12-04  Marek Polacek  <polacek@redhat.com>
1054         PR c/54113
1055         * c-decl.c (start_function): Don't warn for missing prototype for
1056         inline functions.
1058 2013-12-03  Marek Polacek  <polacek@redhat.com>
1060         PR c/59351
1061         * c-decl.c (build_compound_literal): Allow compound literals with
1062         empty initial value.
1064 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
1066         PR c/58235
1067         * c-typeck.c (build_modify_expr): Diagnose assignment to
1068         expression with array type.
1070 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
1072         PR c/42262
1073         * c-typeck.c (process_init_element): Do not treat a string as
1074         initializing a whole array when used with a designator for an
1075         individual element.
1077 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
1079         PR c/57574
1080         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1081         an inline function following a static declaration.
1083 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
1085         PR c/59310
1086         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1087         to p_name before calling c_parser_omp_teams instead of after.
1088         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1089         argument.  Remove unused p_name variable.
1091 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
1092             Jakub Jelinek  <jakub@redhat.com>
1094         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1095         external_scope is NULL.
1097 2013-11-27  Tom de Vries  <tom@codesourcery.com>
1098             Marc Glisse  <marc.glisse@inria.fr>
1100         PR c++/59032
1101         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1103 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
1105         * c-typeck.c: Add required include files from gimple.h.
1107 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
1109         * c-decl.c (define_label, shadow_tag_warned)
1110         (check_bitfield_type_and_width, grokdeclarator, grokparms,
1111         store_parm_decls_newstyle, store_parm_decls_oldstyle)
1112         (declspecs_add_type): Remove use of in_system_header macro.
1113         * c-parser.c (c_parser_unary_expression): Likewise.
1114         * c-typeck.c (store_init_value, process_init_element)
1115         (c_start_case): Likewise.
1117         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1118         macro.
1120         * c-parser.c (c_parser_set_source_position_from_token): Remove
1121         reference to in_system_header from comment.
1123 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1125         * c-decl.c (grokdeclarator): Update comment to refer to
1126         tree_to_[su]hwi rather than tree_low_cst.
1128 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1130         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1131         tree_to_uhwi throughout.
1133 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1135         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1136         throughout.
1138 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1140         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1141         throughout.
1143 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
1145         * c-parser.c (c_parser_cilk_simd): New.
1146         (c_parser_cilk_verify_simd): New.
1147         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1148         (c_parser_omp_for_loop): Add case for NE_EXPR.
1149         Set c_break_label for CILK_SIMD.
1150         (c_parser_cilk_clause_vectorlength): New.
1151         (c_parser_cilk_clause_linear): New.
1152         (c_parser_cilk_clause_name): New.
1153         (c_parser_cilk_all_clauses): New.
1154         * c-typeck.c (build_unary_op): Pass location argument to
1155         readonly_error.
1156         (build_modify_expr): Same.
1157         (build_asm_expr): Same.
1158         (c_finish_bc_stmt): Error on break/continue in loops.
1160 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
1162         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1164 2013-11-14  Diego Novillo  <dnovillo@google.com>
1166         * c-decl.c: Include print-tree.h.
1167         Include stor-layout.h.
1168         Include varasm.h.
1169         Include attribs.h.
1170         Include stringpool.h.
1171         * c-lang.c: Include fold-const.h.
1172         * c-parser.c: Include stringpool.h.
1173         Include attribs.h.
1174         Include stor-layout.h.
1175         Include varasm.h.
1176         Include trans-mem.h.
1177         * c-typeck.c: Include stor-layout.h.
1178         Include trans-mem.h.
1179         Include varasm.h.
1180         Include stmt.h.
1182 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
1184         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1185         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1186         __auto_type.
1187         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1188         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1189         RID_AUTO_TYPE.
1190         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1191         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1192         (c_parser_declarator, c_parser_direct_declarator_inner)
1193         (c_parser_parameter_declaration, c_parser_type_name): All callers
1194         changed.
1195         (c_parser_declaration_or_fndef): Handle declarations with type
1196         determined from the initializer.
1198 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
1200         * c-typeck.c: Include gimplify.h.
1202 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
1204         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1205         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1206         comment.
1207         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1208         or _Thread_local as appropriate in diagnostics.
1209         (build_null_declspecs): Initialize ret->thread_gnu_p.
1210         (declspecs_add_scspec): Handle either __thread or _Thread_local
1211         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
1212         pedantic.  Do not disallow _Thread_local extern and _Thread_local
1213         static.
1215 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
1216             Andrew MacLeod  <amacleod@redhat.com>
1218         * c-aux-info.c (gen_type): Handle atomic qualifier.
1219         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1220         qualifiers when compating types.
1221         (shadow_tag_warned): Handle atomic_p in declspecs.
1222         (quals_from_declspecs): Likewise.
1223         (start_decl): Use c_type_promotes_to when promoting argument
1224         types.
1225         (grokdeclarator): Handle _Atomic.
1226         (get_parm_info): Diagnose any qualifier on "void" as only
1227         parameter.
1228         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1229         comparing types.  Use c_type_promotes_to when promoting argument
1230         types.
1231         (finish_function): Use c_type_promotes_to when promoting argument
1232         types.
1233         (build_null_declspecs): Handle atomic_p in declspecs.
1234         (declspecs_add_qual): Handle RID_ATOMIC.
1235         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1236         (c_token_starts_declspecs): Handle RID_ATOMIC.
1237         (c_parser_declspecs): Handle atomic type specifiers and
1238         qualifiers.
1239         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1240         from types of expressions with atomic type.
1241         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1242         (c_parser_attribute_any_word): Handle RID_ATOMIC.
1243         (c_parser_initializer, c_parser_initelt, c_parser_initval)
1244         (c_parser_statement_after_labels, c_parser_switch_statement)
1245         (c_parser_for_statement, c_parser_expr_no_commas)
1246         (c_parser_conditional_expression, c_parser_binary_expression)
1247         (c_parser_cast_expression, c_parser_unary_expression)
1248         (c_parser_postfix_expression)
1249         (c_parser_postfix_expression_after_primary, c_parser_expression):
1250         Use convert_lvalue_to_rvalue.
1251         (c_parser_expression_conv, c_parser_expr_list): Document
1252         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
1253         (c_parser_objc_synchronized_statement): Use
1254         convert_lvalue_to_rvalue.
1255         (c_parser_objc_selector): Handle RID_ATOMIC.
1256         (c_parser_objc_receiver, c_parser_array_notation): Use
1257         convert_lvalue_to_rvalue.
1258         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1259         _Atomic (type-name).
1260         (struct c_declspecs): Add atomic_p field.
1261         (convert_lvalue_to_rvalue): Declare.
1262         * c-typeck.c (c_type_promotes_to): Promote atomic types to
1263         corresponding atomic types.
1264         (qualify_type): Don't add _Atomic qualifiers from second argument.
1265         (comp_target_types): Do not allow _Atomic mismatches.
1266         (type_lists_compatible_p): Do not remove atomic qualifiers when
1267         comparing types.
1268         (really_atomic_lvalue, convert_lvalue_to_rvalue)
1269         (build_atomic_assign): New functions.
1270         (build_unary_op): Use build_atomic_assign for atomic increment and
1271         decrement.
1272         (build_conditional_expr): Do not treat _Atomic void as a qualified
1273         version of void.
1274         (build_modify_expr): Use build_atomic_assign for atomic LHS.
1275         (find_anonymous_field_with_type, convert_to_anonymous_field)
1276         (convert_for_assignment): Do not remove atomic qualifiers when
1277         comparing types.
1278         (digest_init): Do not accept initialization of arrays of atomic
1279         elements by string constants.
1280         (build_asm_expr): Use convert_lvalue_to_rvalue.
1281         (build_binary_op): Do not treat _Atomic void as a qualified
1282         version of void.
1284 2013-11-06  DJ Delorie  <dj@redhat.com>
1286         * c-decl.c (locate_old_decl): If a previous conflicting decl is
1287         both explicit and builtin, print the location of the explicit one.
1289 2013-11-05  Tobias Burnus  <burnus@net-b.de>
1291         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1292         c_parser_omp_distribute, c_parser_omp_teams,
1293         c_parser_omp_target, c_parser_omp_declare): Handle
1294         -fopenmp-simd.
1296 2013-11-03  Marek Polacek  <polacek@redhat.com>
1298         * c-decl.c (grokdeclarator): Add VLA instrumentation.
1300 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
1302         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1303         check_dup_generic at the end, unless remove is true.
1304         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1305         remove = true;.
1306         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1308 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
1310         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1311         with decl that is not pointer nor array.
1313 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1315         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1316         a spawning function is found.
1317         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1318         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1319         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1320         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1321         case.
1322         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1323         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1324         expr.
1325         (c_finish_return): Added a check to reject _Cilk_spawn in return
1326         expression.
1327         (build_cilk_spawn): New function.
1328         (build_cilk_sync): Likewise.
1329         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1330         
1331 2013-10-27  Tobias Burnus  <burnus@net-b.de>
1333         PR other/33426
1334         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1335         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1336         (c_parser_statement_after_labels): Update calls.
1338 2013-10-24  Tobias Burnus  <burnus@net-b.de>
1340         PR other/33426
1341         * c-parser.c (c_parser_pragma, c_parser_for_statement):
1342         Handle PRAGMA_IVDEP.
1343         (c_parser_statement_after_labels): Update call.
1345 2013-10-24  Marek Polacek  <polacek@redhat.com>
1347         * c-parser.c (c_parser_struct_declaration): Add a comment.
1348         (c_parser_declarator): Don't allow _Alignas here.
1350 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
1352         * c-parser.c: Include omp-low.h.
1353         * c-typeck.c: Likewise.
1355 2013-10-17  Marek Polacek  <polacek@redhat.com>
1357         PR c/58267
1358         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1359         Document syntax of the array-declarator.
1360         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1361         are not permitted.
1362         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1363         (c_parser_struct_declaration): Likewise.
1364         (c_parser_declarator): Likewise.
1365         (c_parser_direct_declarator_inner): Likewise.
1366         (c_parser_parameter_declaration): Likewise.
1367         (c_parser_type_name): Likewise.
1369 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
1371         * c-lang.h (current_omp_declare_target_attribute): New extern
1372         decl.
1373         * c-parser.c: Include c-lang.h.
1374         (struct c_parser): Change tokens to c_token *.
1375         Add tokens_buf field.  Change tokens_avail type to unsigned int.
1376         (c_parser_consume_token): If parser->tokens isn't
1377         &parser->tokens_buf[0], increment parser->tokens.
1378         (c_parser_consume_pragma): Likewise.
1379         (enum pragma_context): Add pragma_struct and pragma_param.
1380         (c_parser_external_declaration): Adjust
1381         c_parser_declaration_or_fndef caller.
1382         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1383         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1384         Adjust recursive call.
1385         (c_parser_struct_or_union_specifier): Use pragma_struct instead
1386         of pragma_external.
1387         (c_parser_parameter_declaration): Use pragma_param instead of
1388         pragma_external.
1389         (c_parser_compound_statement_nostart, c_parser_label,
1390         c_parser_for_statement): Adjust
1391         c_parser_declaration_or_fndef callers.
1392         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1393         it through to c_parser_conditional_expression.
1394         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1395         pass it through to c_parser_binary_expression.  Adjust recursive
1396         call.
1397         (c_parser_binary_expression): Remove prec argument, add
1398         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
1399         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1400         binop matches it, use build2 instead of parser_build_binary_op.
1401         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1402         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1403         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1404         Handle pragma_struct and pragma_param the same as pragma_external.
1405         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1406         (c_parser_omp_variable_list): Parse array sections for
1407         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1408         (c_parser_omp_clause_collapse): Fully fold collapse expression.
1409         (c_parser_omp_clause_reduction): Handle user defined reductions.
1410         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1411         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1412         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1413         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1414         c_parser_omp_clause_depend, c_parser_omp_clause_map,
1415         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1416         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1417         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1418         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
1419         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
1420         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1421         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
1422         (c_parser_omp_for_loop): Add CODE argument, pass it through
1423         to c_finish_omp_for.  Change last argument to cclauses,
1424         and adjust uses to grab parallel clauses from the array of all
1425         the split clauses.  Adjust c_parser_binary_expression,
1426         c_parser_declaration_or_fndef and c_finish_omp_for callers.
1427         (omp_split_clauses): New function.
1428         (c_parser_omp_simd): New function.
1429         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1430         Allow the function to be called also when parsing combined constructs,
1431         and call c_parser_omp_simd when parsing for simd.
1432         (c_parser_omp_sections_scope): If section-sequence doesn't start with
1433         #pragma omp section, require exactly one structured-block instead of
1434         sequence of statements.
1435         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1436         Allow the function to be called also when parsing combined constructs.
1437         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1438         Allow the function to be called also when parsing combined
1439         constructs.
1440         (c_parser_omp_taskgroup, c_parser_omp_cancel,
1441         c_parser_omp_cancellation_point, c_parser_omp_distribute,
1442         c_parser_omp_teams, c_parser_omp_target_data,
1443         c_parser_omp_target_update, c_parser_omp_target,
1444         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1445         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1446         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1447         (c_parser_omp_construct): Add p_name and mask vars.  Handle
1448         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1449         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
1450         and c_parser_omp_sections callers.
1451         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1452         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1453         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1454         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
1455         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
1456         OMP_CLAUSE_DEPEND.
1457         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1458         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1459         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1460         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1461         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1462         * c-typeck.c: Include tree-inline.h.
1463         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1464         handle_omp_array_sections_1, handle_omp_array_sections,
1465         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1466         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1467         user defined reductions.
1468         (c_tree_equal): New function.
1469         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1470         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1471         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1472         c_check_omp_declare_reduction_r): New prototypes.
1473         * c-decl.c (current_omp_declare_target_attribute): New variable.
1474         (c_decl_attributes): New function.
1475         (start_decl, start_function): Use it instead of decl_attributes.
1476         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1477         c_omp_reduction_decl, c_omp_reduction_lookup,
1478         c_check_omp_declare_reduction_r): New functions.
1480 2013-09-25  Tom Tromey  <tromey@redhat.com>
1482         * Make-lang.in (c/gccspec.o): Remove.
1483         (CFLAGS-c/gccspec.o): New variable.
1484         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1485         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1486         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1488 2013-09-25  Tom Tromey  <tromey@redhat.com>
1490         * Make-lang.in (c/gccspec.o): Don't use subshell.
1492 2013-09-18  Marek Polacek  <polacek@redhat.com>
1494         PR sanitize/58443
1495         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1496         Remove unnecessary check.
1498 2013-09-18  Marek Polacek  <polacek@redhat.com>
1500         PR sanitizer/58411
1501         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1502         no_sanitize_undefined attribute.
1504 2013-09-13  Kai Tietz  <ktietz@redhat.com>
1506         PR target/57848
1507         * c-decl.c (c_builtin_function_ext_scope): Remove
1508         wrong assumption that it is never called on prexisting
1509         symbol.
1511 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
1513         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1515 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1517         * c-objc-common.c (c_tree_printer): Tidy.
1519 2013-08-30  Marek Polacek  <polacek@redhat.com>
1521         * c-typeck.c (build_binary_op): Add division by zero and shift
1522         instrumentation.
1524 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
1525             Joseph Myers  <joseph@codesourcery.com>
1527         PR c/35649
1528         * c-typeck.c (c_common_type): Prefer double_type_node over
1529         other REAL_TYPE types with the same precision.
1530         (convert_arguments): Likewise.
1532 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1534         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1535         (c_initialize_diagnostics): Call a destructor for the early printer.
1537 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1539         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1540         printer initialization.
1542 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1544         PR c/57490
1545         * c-array-notation.c (fix_conditional_array_notations_1): Added a
1546         check for truth values.
1547         (expand_array_notation_exprs): Added truth values case.  Removed an
1548         unwanted else.  Added for-loop to walk through subtrees in default
1549         case.
1551 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1553         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1555 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
1557         * c-parser.c (struct c_generic_association): Fix typo.
1559 2013-07-23  Tom Tromey  <tromey@redhat.com>
1560             Joseph Myers  <joseph@codesourcery.com>
1562         * c-parser.c (struct c_generic_association): New.
1563         (c_generic_association_d): New typedef.
1564         (c_parser_generic_selection): New function.
1565         (c_parser_postfix_expression): Handle RID_GENERIC.
1567 2013-07-13  Jason Merrill  <jason@redhat.com>
1569         PR c++/57793
1570         * c-decl.c (finish_struct): Check for too-large class.
1572 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
1574         PR c/57821
1575         * c-typeck.c (set_init_index): When folding, check for index overflow.
1577 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1579         * c-parser.c (c_parser_array_notation): Removed rejection of array
1580         notations in an array of function pointers.
1582 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1584         * c-array-notation.c (make_triplet_val_inv): New function.
1585         (create_cmp_incr): Likewise.
1586         (create_array_refs): Likewise.
1587         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1588         Also modularized common parts between functions and called the function.
1589         (build_array_notation_expr): Likewise.
1590         (fix_conditional_array_notations_1): Likewise.
1591         (fix_array_notation_expr): Likewise.
1592         (fix_array_notation_call_expr): Likewise.
1594 2013-06-18  Marek Polacek  <polacek@redhat.com>
1596         PR c/57630
1597         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1599 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1601         * c-array-notation.c (build_array_notation_expr): Reject array notation
1602         mismatch between LHS and RHS even inside a call_expr.  Also, removed
1603         a couple while statements that were dead code.
1605 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1607         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1608         excessive precision expressions in function parameters.  Also removed
1609         couple unwanted while statements.
1611 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1613         * c-array-notation.c (expand_array_notation_exprs): Added
1614         ARRAY_NOTATION_REF case.
1615         
1616 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1618         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1619         function to c-family/array-notation-common.c.
1620         (is_cilkplus_reduce_builtin): Likewise.
1621         (find_rank): Likewise.
1622         (extract_array_notation_exprs): Likewise.
1623         (replace_array_notations): Likewise.
1624         (find_inv_trees): Likewise.
1625         (replace_inv_trees): Likewise.
1626         (contains_array_notation_expr): Likewise.
1627         (find_correct_array_notation_type): Likewise.
1628         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1629         (struct inv_list): Moved this to c-family/array-notation-common.c.
1630         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1631         
1632 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1634         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1635         reduction functions outside the for-loop.  Added a check if the fundecl
1636         is non-NULL.  Finally, removed an unwanted if-statement, and made the
1637         body unconditional.
1639 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1641         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1642         condition of the if-statement matches the rank of else-block and then-
1643         block when array notations are used.
1644         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1645         expression after the entire function body is parsed.
1646         (c_parser_expr_no_commas): Delayed creating array notation expressions
1647         to the end of function parsing.
1648         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1649         whole if-statement instead of just the condition.
1650         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
1652 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1654         PR c/57474
1655         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1656         array to NULL_TREE if they are unused.  Also added a check for the
1657         field to be NULL before its fields are used in future.
1658         
1659 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1661         PR bootstrap/57450
1662         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1663         (build_array_notation_expr): Likewise.
1665 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1667         * c-typeck.c (build_array_ref): Added a check to see if array's
1668         index is greater than one.  If true, then emit an error.
1669         (build_function_call_vec): Exclude error reporting and checking
1670         for builtin array-notation functions.
1671         (convert_arguments): Likewise.
1672         (c_finish_return): Added a check for array notations as a return
1673         expression.  If true, then emit an error.
1674         (c_finish_loop): Added a check for array notations in a loop
1675         condition.  If true then emit an error.
1676         (lvalue_p): Added a ARRAY_NOTATION_REF case.
1677         (build_binary_op): Added a check for array notation expr inside
1678         op1 and op0.  If present, we call another function to find correct
1679         type.
1680         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1681         * c-parser.c (c_parser_compound_statement): Check if array
1682         notation code is used in tree, if so, then transform them into
1683         appropriate C code.
1684         (c_parser_expr_no_commas): Check if array notation is used in LHS
1685         or RHS, if so, then build array notation expression instead of
1686         regular modify.
1687         (c_parser_postfix_expression_after_primary): Added a check for
1688         colon(s) after square braces, if so then handle it like an array
1689         notation.  Also, break up array notations in unary op if found.
1690         (c_parser_direct_declarator_inner): Added a check for array
1691         notation.
1692         (c_parser_compound_statement): Added a check for array notation in
1693         a stmt.  If one is present, then expand array notation expr.
1694         (c_parser_if_statement): Likewise.
1695         (c_parser_switch_statement): Added a check for array notations in
1696         a switch statement's condition.  If true, then output an error.
1697         (c_parser_while_statement): Similarly, but for a while.
1698         (c_parser_do_statement): Similarly, but for a do-while.
1699         (c_parser_for_statement): Similarly, but for a for-loop.
1700         (c_parser_unary_expression): Check if array notation is used in a
1701         pre-increment or pre-decrement expression.  If true, then expand
1702         them.
1703         (c_parser_array_notation): New function.
1704         * c-array-notation.c: New file.
1705         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1706         
1707 2013-05-23  Mike Stump  <mikestump@comcast.net>
1709         * c-typeck.c (convert_for_assignment): Handle references to memory
1710         spaces better.
1712 2013-05-16  Jason Merrill  <jason@redhat.com>
1714         * Make-lang.in (cc1$(exeext)): Use link mutex.
1716 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1718         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1719         to simply use OPT_Wpointer_arith.
1720         (build_unary_op): Likewise.
1722 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1724         PR c/19449
1725         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1726         argument.  If set, or it temporarily for parsing of the first
1727         argument into force_folding_builtin_constant_p.
1728         (c_parser_postfix_expression): Adjust callers.
1730 2013-03-21  Richard Biener  <rguenther@suse.de>
1732         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1733         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
1735 2013-02-12  Marek Polacek  <polacek@redhat.com>
1737         PR c/44938
1738         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1739         origtypes to NULL.
1741 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
1743         PR c/56078
1744         * c-typeck.c (set_nonincremental_init_from_string): If
1745         constructor_max_index is NULL, treat it as if tree_int_cst_lt
1746         returned false.
1747         (process_init_element): Likewise.
1749 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
1751         PR c++/55619
1752         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1753         argument, don't call default_function_array_conversion
1754         nor c_fully_fold here.
1755         (c_parser_asm_statement): Adjust callers.
1756         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1757         and outputs here, and call default_function_array_conversion
1758         on inputs that don't need to be addressable.
1760 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
1762         PR c/39464
1763         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1764         warning require that both c_common_unsigned_type as well as
1765         c_common_signed_type is the same for both mvl and mvr types.
1767 2012-11-16  Diego Novillo  <dnovillo@google.com>
1769         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1771         * c-common.c: Use new vec API in vec.h.
1772         * c-common.h: Likewise.
1773         * c-gimplify.c: Likewise.
1774         * c-pragma.c: Likewise.
1775         * c-pretty-print.c: Likewise.
1776         * c-pretty-print.h: Likewise.
1777         * c-semantics.c: Likewise.
1778         * c-decl.c: Likewise.
1779         * c-parser.c: Likewise.
1780         * c-tree.h: Likewise.
1781         * c-typeck.c: Likewise.
1783 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
1785         PR c++/54930
1786         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1788 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1790         PR c/53066
1791         * c-decl.c (warn_if_shadowing): Do not warn if a variable
1792         shadows a function, unless the variable is a function or a
1793         pointer-to-function.
1795 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
1797         PR c/54381
1798         * c-parser.c (struct c_tree_loc_pair): Removed.
1799         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1800         add location_t * and tree * arguments, fill in array of 3
1801         sizeof_arg trees and corresponding locs.
1802         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1803         c_parser_expr_list callers.
1804         (c_parser_postfix_expression_after_primary): Likewise.  Pass
1805         array of 3 sizeof_arg trees and locs (corresponding to first
1806         3 arguments) to sizeof_pointer_memaccess_warning.
1808 2012-10-09  Lawrence Crowl  <crowl@google.com>
1810         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1811         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1812         hash table.
1814 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
1816         PR c++/54194
1817         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1818         call.
1820 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
1822         PR c++/54427
1823         * c-typeck.c: Include c-common.h.
1824         (enum stv_conv): Moved to c-common.h.
1825         (scalar_to_vector): Moved to c-common.c.
1826         (build_binary_op): Adapt to scalar_to_vector's new prototype.
1827         * Make-lang.in: c-typeck.c depends on c-common.h.
1829 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
1831         * c-decl.c (c_write_global_declarations): Fix handling of
1832         -fdump-ada-spec*.
1834 2012-09-30  Sharad Singhai  <singhai@google.com>
1836         * c-decl.c (c_write_global_declarations): Use a different method
1837         to determine if the dump has ben initialized.
1839 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1841         PR c/54552
1842         * c-typeck.c (c_cast_expr): When casting to a type requiring
1843         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1844         c_fully_fold first.
1846 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
1848         PR c/54103
1849         * c-typeck.c (build_unary_op): Pass original argument of
1850         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1851         any C_MAYBE_CONST_EXPR, if it has integer operands.
1852         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1853         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1854         to c_objc_common_truthvalue_conversion, then remove any
1855         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
1856         c_objc_common_truthvalue_conversion not
1857         c_common_truthvalue_conversion.
1858         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1859         call note_integer_operands for arguments with integer operands
1860         that are not integer constants.
1862 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
1864         PR c/54559
1865         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1866         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1868 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
1870         PR c/54428
1871         * c-convert.c (convert): Don't call fold_convert_loc if
1872         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1873         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
1874         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1876 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
1878         PR c/54355
1879         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1880         for nested and empty_ok arguments in the call to
1881         c_parser_declaration_or_fndef.
1883 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
1885         * c-tree.h (c_last_sizeof_arg): Declare.
1886         * c-parser.c (struct c_tree_loc_pair): New type.
1887         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
1888         non-NULL.
1889         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1890         (c_parser_postfix_expression_after_primary): Likewise.  Call
1891         sizeof_pointer_memaccess_warning if needed.
1892         (sizeof_ptr_memacc_comptypes): New function.
1893         * c-typeck.c (c_last_sizeof_arg): New global variable.
1894         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1896 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
1898         * c-lang.h (lang_decl): Add variable_size GTY option.
1900 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1902         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1903         * Make-lang.in: Fix dependencies.
1905 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
1907         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1908         and add language Makefile hooks.
1909         * config-lang.in: New file.
1910         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1911         add the required "normal" config-lang.in rules.
1912         * c-lang.h: Moved from gcc/ to here.
1913         * c-tree.h: Likewise.
1914         * c-objc-common.c: Likewise.
1915         * c-objc-common.h: Likewise.
1916         * c-typeck.c: Likewise.
1917         * c-convert.c: Likewise.
1918         * c-lang.c: Likewise.
1919         * c-aux-info.c: Likewise.
1920         * c-errors.c: Likewise.
1921         * gccspec.c: Likewise.
1922         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
1923         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
1925 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1927 Copying and distribution of this file, with or without modification,
1928 are permitted in any medium without royalty provided the copyright
1929 notice and this notice are preserved.