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