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