]> gcc.gnu.org Git - gcc.git/blob - gcc/c/ChangeLog
Replaced Dynamic arrays with vec trees in Array Notation for C.
[gcc.git] / gcc / c / ChangeLog
1 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2
3 * c-array-notation.c (make_triplet_val_inv): New function.
4 (create_cmp_incr): Likewise.
5 (create_array_refs): Likewise.
6 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7 Also modularized common parts between functions and called the function.
8 (build_array_notation_expr): Likewise.
9 (fix_conditional_array_notations_1): Likewise.
10 (fix_array_notation_expr): Likewise.
11 (fix_array_notation_call_expr): Likewise.
12
13 2013-06-18 Marek Polacek <polacek@redhat.com>
14
15 PR c/57630
16 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
17
18 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
19
20 * c-array-notation.c (build_array_notation_expr): Reject array notation
21 mismatch between LHS and RHS even inside a call_expr. Also, removed
22 a couple while statements that were dead code.
23
24 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
25
26 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
27 excessive precision expressions in function parameters. Also removed
28 couple unwanted while statements.
29
30 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
31
32 * c-array-notation.c (expand_array_notation_exprs): Added
33 ARRAY_NOTATION_REF case.
34
35 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
36
37 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
38 function to c-family/array-notation-common.c.
39 (is_cilkplus_reduce_builtin): Likewise.
40 (find_rank): Likewise.
41 (extract_array_notation_exprs): Likewise.
42 (replace_array_notations): Likewise.
43 (find_inv_trees): Likewise.
44 (replace_inv_trees): Likewise.
45 (contains_array_notation_expr): Likewise.
46 (find_correct_array_notation_type): Likewise.
47 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
48 (struct inv_list): Moved this to c-family/array-notation-common.c.
49 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
50
51 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
52
53 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
54 reduction functions outside the for-loop. Added a check if the fundecl
55 is non-NULL. Finally, removed an unwanted if-statement, and made the
56 body unconditional.
57
58 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
59
60 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
61 condition of the if-statement matches the rank of else-block and then-
62 block when array notations are used.
63 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
64 expression after the entire function body is parsed.
65 (c_parser_expr_no_commas): Delayed creating array notation expressions
66 to the end of function parsing.
67 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
68 whole if-statement instead of just the condition.
69 (expand_array_notation_exprs): Added MODIFY_EXPR case.
70
71 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
72
73 PR c/57474
74 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
75 array to NULL_TREE if they are unused. Also added a check for the
76 field to be NULL before its fields are used in future.
77
78 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
79
80 PR bootstrap/57450
81 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
82 (build_array_notation_expr): Likewise.
83
84 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
85
86 * c-typeck.c (build_array_ref): Added a check to see if array's
87 index is greater than one. If true, then emit an error.
88 (build_function_call_vec): Exclude error reporting and checking
89 for builtin array-notation functions.
90 (convert_arguments): Likewise.
91 (c_finish_return): Added a check for array notations as a return
92 expression. If true, then emit an error.
93 (c_finish_loop): Added a check for array notations in a loop
94 condition. If true then emit an error.
95 (lvalue_p): Added a ARRAY_NOTATION_REF case.
96 (build_binary_op): Added a check for array notation expr inside
97 op1 and op0. If present, we call another function to find correct
98 type.
99 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
100 * c-parser.c (c_parser_compound_statement): Check if array
101 notation code is used in tree, if so, then transform them into
102 appropriate C code.
103 (c_parser_expr_no_commas): Check if array notation is used in LHS
104 or RHS, if so, then build array notation expression instead of
105 regular modify.
106 (c_parser_postfix_expression_after_primary): Added a check for
107 colon(s) after square braces, if so then handle it like an array
108 notation. Also, break up array notations in unary op if found.
109 (c_parser_direct_declarator_inner): Added a check for array
110 notation.
111 (c_parser_compound_statement): Added a check for array notation in
112 a stmt. If one is present, then expand array notation expr.
113 (c_parser_if_statement): Likewise.
114 (c_parser_switch_statement): Added a check for array notations in
115 a switch statement's condition. If true, then output an error.
116 (c_parser_while_statement): Similarly, but for a while.
117 (c_parser_do_statement): Similarly, but for a do-while.
118 (c_parser_for_statement): Similarly, but for a for-loop.
119 (c_parser_unary_expression): Check if array notation is used in a
120 pre-increment or pre-decrement expression. If true, then expand
121 them.
122 (c_parser_array_notation): New function.
123 * c-array-notation.c: New file.
124 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
125
126 2013-05-23 Mike Stump <mikestump@comcast.net>
127
128 * c-typeck.c (convert_for_assignment): Handle references to memory
129 spaces better.
130
131 2013-05-16 Jason Merrill <jason@redhat.com>
132
133 * Make-lang.in (cc1$(exeext)): Use link mutex.
134
135 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
136
137 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
138 to simply use OPT_Wpointer_arith.
139 (build_unary_op): Likewise.
140
141 2013-04-03 Jakub Jelinek <jakub@redhat.com>
142
143 PR c/19449
144 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
145 argument. If set, or it temporarily for parsing of the first
146 argument into force_folding_builtin_constant_p.
147 (c_parser_postfix_expression): Adjust callers.
148
149 2013-03-21 Richard Biener <rguenther@suse.de>
150
151 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
152 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
153
154 2013-02-12 Marek Polacek <polacek@redhat.com>
155
156 PR c/44938
157 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
158 origtypes to NULL.
159
160 2013-01-24 Jakub Jelinek <jakub@redhat.com>
161
162 PR c/56078
163 * c-typeck.c (set_nonincremental_init_from_string): If
164 constructor_max_index is NULL, treat it as if tree_int_cst_lt
165 returned false.
166 (process_init_element): Likewise.
167
168 2012-12-20 Jakub Jelinek <jakub@redhat.com>
169
170 PR c++/55619
171 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
172 argument, don't call default_function_array_conversion
173 nor c_fully_fold here.
174 (c_parser_asm_statement): Adjust callers.
175 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
176 and outputs here, and call default_function_array_conversion
177 on inputs that don't need to be addressable.
178
179 2012-12-18 Jakub Jelinek <jakub@redhat.com>
180
181 PR c/39464
182 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
183 warning require that both c_common_unsigned_type as well as
184 c_common_signed_type is the same for both mvl and mvr types.
185
186 2012-11-16 Diego Novillo <dnovillo@google.com>
187
188 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
189
190 * c-common.c: Use new vec API in vec.h.
191 * c-common.h: Likewise.
192 * c-gimplify.c: Likewise.
193 * c-pragma.c: Likewise.
194 * c-pretty-print.c: Likewise.
195 * c-pretty-print.h: Likewise.
196 * c-semantics.c: Likewise.
197 * c-decl.c: Likewise.
198 * c-parser.c: Likewise.
199 * c-tree.h: Likewise.
200 * c-typeck.c: Likewise.
201
202 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
203
204 PR c++/54930
205 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
206
207 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
208
209 PR c/53066
210 * c-decl.c (warn_if_shadowing): Do not warn if a variable
211 shadows a function, unless the variable is a function or a
212 pointer-to-function.
213
214 2012-10-12 Jakub Jelinek <jakub@redhat.com>
215
216 PR c/54381
217 * c-parser.c (struct c_tree_loc_pair): Removed.
218 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
219 add location_t * and tree * arguments, fill in array of 3
220 sizeof_arg trees and corresponding locs.
221 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
222 c_parser_expr_list callers.
223 (c_parser_postfix_expression_after_primary): Likewise. Pass
224 array of 3 sizeof_arg trees and locs (corresponding to first
225 3 arguments) to sizeof_pointer_memaccess_warning.
226
227 2012-10-09 Lawrence Crowl <crowl@google.com>
228
229 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
230 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
231 hash table.
232
233 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
234
235 PR c++/54194
236 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
237 call.
238
239 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
240
241 PR c++/54427
242 * c-typeck.c: Include c-common.h.
243 (enum stv_conv): Moved to c-common.h.
244 (scalar_to_vector): Moved to c-common.c.
245 (build_binary_op): Adapt to scalar_to_vector's new prototype.
246 * Make-lang.in: c-typeck.c depends on c-common.h.
247
248 2012-10-04 Arnaud Charlet <charlet@adacore.com>
249
250 * c-decl.c (c_write_global_declarations): Fix handling of
251 -fdump-ada-spec*.
252
253 2012-09-30 Sharad Singhai <singhai@google.com>
254
255 * c-decl.c (c_write_global_declarations): Use a different method
256 to determine if the dump has ben initialized.
257
258 2012-09-14 Joseph Myers <joseph@codesourcery.com>
259
260 PR c/54552
261 * c-typeck.c (c_cast_expr): When casting to a type requiring
262 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
263 c_fully_fold first.
264
265 2012-09-14 Joseph Myers <joseph@codesourcery.com>
266
267 PR c/54103
268 * c-typeck.c (build_unary_op): Pass original argument of
269 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
270 any C_MAYBE_CONST_EXPR, if it has integer operands.
271 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
272 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
273 to c_objc_common_truthvalue_conversion, then remove any
274 C_MAYBE_CONST_EXPR, if they have integer operands. Use
275 c_objc_common_truthvalue_conversion not
276 c_common_truthvalue_conversion.
277 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
278 call note_integer_operands for arguments with integer operands
279 that are not integer constants.
280
281 2012-09-13 Jakub Jelinek <jakub@redhat.com>
282
283 PR c/54559
284 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
285 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
286
287 2012-08-31 Jakub Jelinek <jakub@redhat.com>
288
289 PR c/54428
290 * c-convert.c (convert): Don't call fold_convert_loc if
291 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
292 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
293 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
294
295 2012-08-24 Jakub Jelinek <jakub@redhat.com>
296
297 PR c/54355
298 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
299 for nested and empty_ok arguments in the call to
300 c_parser_declaration_or_fndef.
301
302 2012-08-17 Jakub Jelinek <jakub@redhat.com>
303
304 * c-tree.h (c_last_sizeof_arg): Declare.
305 * c-parser.c (struct c_tree_loc_pair): New type.
306 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
307 non-NULL.
308 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
309 (c_parser_postfix_expression_after_primary): Likewise. Call
310 sizeof_pointer_memaccess_warning if needed.
311 (sizeof_ptr_memacc_comptypes): New function.
312 * c-typeck.c (c_last_sizeof_arg): New global variable.
313 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
314
315 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
316
317 * c-lang.h (lang_decl): Add variable_size GTY option.
318
319 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
320
321 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
322 * Make-lang.in: Fix dependencies.
323
324 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
325
326 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
327 and add language Makefile hooks.
328 * config-lang.in: New file.
329 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
330 add the required "normal" config-lang.in rules.
331 * c-lang.h: Moved from gcc/ to here.
332 * c-tree.h: Likewise.
333 * c-objc-common.c: Likewise.
334 * c-objc-common.h: Likewise.
335 * c-typeck.c: Likewise.
336 * c-convert.c: Likewise.
337 * c-lang.c: Likewise.
338 * c-aux-info.c: Likewise.
339 * c-errors.c: Likewise.
340 * gccspec.c: Likewise.
341 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
342 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
343 \f
344 Copyright (C) 2012-2013 Free Software Foundation, Inc.
345
346 Copying and distribution of this file, with or without modification,
347 are permitted in any medium without royalty provided the copyright
348 notice and this notice are preserved.
This page took 0.050269 seconds and 5 git commands to generate.