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