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