re PR c/54381 (-Wsizeof-pointer-memaccess refers to "destination" for strncmp)
[official-gcc.git] / gcc / c / ChangeLog
blob89d89f7aca26cccdeafae129f2d05c7f09f5d67f
1 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
3         PR c/54381
4         * c-parser.c (struct c_tree_loc_pair): Removed.
5         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6         add location_t * and tree * arguments, fill in array of 3
7         sizeof_arg trees and corresponding locs.
8         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9         c_parser_expr_list callers.
10         (c_parser_postfix_expression_after_primary): Likewise.  Pass
11         array of 3 sizeof_arg trees and locs (corresponding to first
12         3 arguments) to sizeof_pointer_memaccess_warning.
14 2012-10-09  Lawrence Crowl  <crowl@google.com>
16         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
17         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
18         hash table.
20 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
22         PR c++/54194
23         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
24         call.
26 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
28         PR c++/54427
29         * c-typeck.c: Include c-common.h.
30         (enum stv_conv): Moved to c-common.h.
31         (scalar_to_vector): Moved to c-common.c.
32         (build_binary_op): Adapt to scalar_to_vector's new prototype.
33         * Make-lang.in: c-typeck.c depends on c-common.h.
35 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
37         * c-decl.c (c_write_global_declarations): Fix handling of
38         -fdump-ada-spec*.
40 2012-09-30  Sharad Singhai  <singhai@google.com>
42         * c-decl.c (c_write_global_declarations): Use a different method
43         to determine if the dump has ben initialized.
45 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
47         PR c/54552
48         * c-typeck.c (c_cast_expr): When casting to a type requiring
49         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
50         c_fully_fold first.
52 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
54         PR c/54103
55         * c-typeck.c (build_unary_op): Pass original argument of
56         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
57         any C_MAYBE_CONST_EXPR, if it has integer operands.
58         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
59         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
60         to c_objc_common_truthvalue_conversion, then remove any
61         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
62         c_objc_common_truthvalue_conversion not
63         c_common_truthvalue_conversion.
64         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
65         call note_integer_operands for arguments with integer operands
66         that are not integer constants.
68 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
70         PR c/54559
71         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
72         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
74 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
76         PR c/54428
77         * c-convert.c (convert): Don't call fold_convert_loc if
78         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
79         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
80         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
82 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
84         PR c/54355
85         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
86         for nested and empty_ok arguments in the call to
87         c_parser_declaration_or_fndef.
89 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
91         * c-tree.h (c_last_sizeof_arg): Declare.
92         * c-parser.c (struct c_tree_loc_pair): New type.
93         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
94         non-NULL.
95         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
96         (c_parser_postfix_expression_after_primary): Likewise.  Call
97         sizeof_pointer_memaccess_warning if needed.
98         (sizeof_ptr_memacc_comptypes): New function.
99         * c-typeck.c (c_last_sizeof_arg): New global variable.
100         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
102 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
104         * c-lang.h (lang_decl): Add variable_size GTY option.
106 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
108         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
109         * Make-lang.in: Fix dependencies.
111 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
113         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
114         and add language Makefile hooks.
115         * config-lang.in: New file.
116         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
117         add the required "normal" config-lang.in rules.
118         * c-lang.h: Moved from gcc/ to here.
119         * c-tree.h: Likewise.
120         * c-objc-common.c: Likewise.
121         * c-objc-common.h: Likewise.
122         * c-typeck.c: Likewise.
123         * c-convert.c: Likewise.
124         * c-lang.c: Likewise.
125         * c-aux-info.c: Likewise.
126         * c-errors.c: Likewise.
127         * gccspec.c: Likewise.
128         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
129         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
131 Copyright (C) 2012 Free Software Foundation, Inc.
133 Copying and distribution of this file, with or without modification,
134 are permitted in any medium without royalty provided the copyright
135 notice and this notice are preserved.