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