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