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