1 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3 * c-decl.c (grokdeclarator): Update comment to refer to
4 tree_to_[su]hwi rather than tree_low_cst.
6 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
9 tree_to_uhwi throughout.
11 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
13 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
16 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
18 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
21 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
23 * c-parser.c (c_parser_cilk_simd): New.
24 (c_parser_cilk_verify_simd): New.
25 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
26 (c_parser_omp_for_loop): Add case for NE_EXPR.
27 Set c_break_label for CILK_SIMD.
28 (c_parser_cilk_clause_vectorlength): New.
29 (c_parser_cilk_clause_linear): New.
30 (c_parser_cilk_clause_name): New.
31 (c_parser_cilk_all_clauses): New.
32 * c-typeck.c (build_unary_op): Pass location argument to
34 (build_modify_expr): Same.
35 (build_asm_expr): Same.
36 (c_finish_bc_stmt): Error on break/continue in loops.
38 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
40 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
42 2013-11-14 Diego Novillo <dnovillo@google.com>
44 * c-decl.c: Include print-tree.h.
45 Include stor-layout.h.
49 * c-lang.c: Include fold-const.h.
50 * c-parser.c: Include stringpool.h.
52 Include stor-layout.h.
55 * c-typeck.c: Include stor-layout.h.
60 2013-11-13 Joseph Myers <joseph@codesourcery.com>
62 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
63 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
65 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
66 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
68 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
69 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
70 (c_parser_declarator, c_parser_direct_declarator_inner)
71 (c_parser_parameter_declaration, c_parser_type_name): All callers
73 (c_parser_declaration_or_fndef): Handle declarations with type
74 determined from the initializer.
76 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
78 * c-typeck.c: Include gimplify.h.
80 2013-11-12 Joseph Myers <joseph@codesourcery.com>
82 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
83 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
85 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
86 or _Thread_local as appropriate in diagnostics.
87 (build_null_declspecs): Initialize ret->thread_gnu_p.
88 (declspecs_add_scspec): Handle either __thread or _Thread_local
89 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
90 pedantic. Do not disallow _Thread_local extern and _Thread_local
93 2013-11-07 Joseph Myers <joseph@codesourcery.com>
94 Andrew MacLeod <amacleod@redhat.com>
96 * c-aux-info.c (gen_type): Handle atomic qualifier.
97 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
98 qualifiers when compating types.
99 (shadow_tag_warned): Handle atomic_p in declspecs.
100 (quals_from_declspecs): Likewise.
101 (start_decl): Use c_type_promotes_to when promoting argument
103 (grokdeclarator): Handle _Atomic.
104 (get_parm_info): Diagnose any qualifier on "void" as only
106 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
107 comparing types. Use c_type_promotes_to when promoting argument
109 (finish_function): Use c_type_promotes_to when promoting argument
111 (build_null_declspecs): Handle atomic_p in declspecs.
112 (declspecs_add_qual): Handle RID_ATOMIC.
113 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
114 (c_token_starts_declspecs): Handle RID_ATOMIC.
115 (c_parser_declspecs): Handle atomic type specifiers and
117 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
118 from types of expressions with atomic type.
119 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
120 (c_parser_attribute_any_word): Handle RID_ATOMIC.
121 (c_parser_initializer, c_parser_initelt, c_parser_initval)
122 (c_parser_statement_after_labels, c_parser_switch_statement)
123 (c_parser_for_statement, c_parser_expr_no_commas)
124 (c_parser_conditional_expression, c_parser_binary_expression)
125 (c_parser_cast_expression, c_parser_unary_expression)
126 (c_parser_postfix_expression)
127 (c_parser_postfix_expression_after_primary, c_parser_expression):
128 Use convert_lvalue_to_rvalue.
129 (c_parser_expression_conv, c_parser_expr_list): Document
130 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
131 (c_parser_objc_synchronized_statement): Use
132 convert_lvalue_to_rvalue.
133 (c_parser_objc_selector): Handle RID_ATOMIC.
134 (c_parser_objc_receiver, c_parser_array_notation): Use
135 convert_lvalue_to_rvalue.
136 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
138 (struct c_declspecs): Add atomic_p field.
139 (convert_lvalue_to_rvalue): Declare.
140 * c-typeck.c (c_type_promotes_to): Promote atomic types to
141 corresponding atomic types.
142 (qualify_type): Don't add _Atomic qualifiers from second argument.
143 (comp_target_types): Do not allow _Atomic mismatches.
144 (type_lists_compatible_p): Do not remove atomic qualifiers when
146 (really_atomic_lvalue, convert_lvalue_to_rvalue)
147 (build_atomic_assign): New functions.
148 (build_unary_op): Use build_atomic_assign for atomic increment and
150 (build_conditional_expr): Do not treat _Atomic void as a qualified
152 (build_modify_expr): Use build_atomic_assign for atomic LHS.
153 (find_anonymous_field_with_type, convert_to_anonymous_field)
154 (convert_for_assignment): Do not remove atomic qualifiers when
156 (digest_init): Do not accept initialization of arrays of atomic
157 elements by string constants.
158 (build_asm_expr): Use convert_lvalue_to_rvalue.
159 (build_binary_op): Do not treat _Atomic void as a qualified
162 2013-11-06 DJ Delorie <dj@redhat.com>
164 * c-decl.c (locate_old_decl): If a previous conflicting decl is
165 both explicit and builtin, print the location of the explicit one.
167 2013-11-05 Tobias Burnus <burnus@net-b.de>
169 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
170 c_parser_omp_distribute, c_parser_omp_teams,
171 c_parser_omp_target, c_parser_omp_declare): Handle
174 2013-11-03 Marek Polacek <polacek@redhat.com>
176 * c-decl.c (grokdeclarator): Add VLA instrumentation.
178 2013-11-01 Jakub Jelinek <jakub@redhat.com>
180 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
181 check_dup_generic at the end, unless remove is true.
182 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
184 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
186 2013-10-31 Jakub Jelinek <jakub@redhat.com>
188 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
189 with decl that is not pointer nor array.
191 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
193 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
194 a spawning function is found.
195 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
196 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
197 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
198 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
200 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
201 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
203 (c_finish_return): Added a check to reject _Cilk_spawn in return
205 (build_cilk_spawn): New function.
206 (build_cilk_sync): Likewise.
207 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
209 2013-10-27 Tobias Burnus <burnus@net-b.de>
212 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
213 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
214 (c_parser_statement_after_labels): Update calls.
216 2013-10-24 Tobias Burnus <burnus@net-b.de>
219 * c-parser.c (c_parser_pragma, c_parser_for_statement):
221 (c_parser_statement_after_labels): Update call.
223 2013-10-24 Marek Polacek <polacek@redhat.com>
225 * c-parser.c (c_parser_struct_declaration): Add a comment.
226 (c_parser_declarator): Don't allow _Alignas here.
228 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
230 * c-parser.c: Include omp-low.h.
231 * c-typeck.c: Likewise.
233 2013-10-17 Marek Polacek <polacek@redhat.com>
236 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
237 Document syntax of the array-declarator.
238 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
240 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
241 (c_parser_struct_declaration): Likewise.
242 (c_parser_declarator): Likewise.
243 (c_parser_direct_declarator_inner): Likewise.
244 (c_parser_parameter_declaration): Likewise.
245 (c_parser_type_name): Likewise.
247 2013-10-11 Jakub Jelinek <jakub@redhat.com>
249 * c-lang.h (current_omp_declare_target_attribute): New extern
251 * c-parser.c: Include c-lang.h.
252 (struct c_parser): Change tokens to c_token *.
253 Add tokens_buf field. Change tokens_avail type to unsigned int.
254 (c_parser_consume_token): If parser->tokens isn't
255 &parser->tokens_buf[0], increment parser->tokens.
256 (c_parser_consume_pragma): Likewise.
257 (enum pragma_context): Add pragma_struct and pragma_param.
258 (c_parser_external_declaration): Adjust
259 c_parser_declaration_or_fndef caller.
260 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
261 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
262 Adjust recursive call.
263 (c_parser_struct_or_union_specifier): Use pragma_struct instead
265 (c_parser_parameter_declaration): Use pragma_param instead of
267 (c_parser_compound_statement_nostart, c_parser_label,
268 c_parser_for_statement): Adjust
269 c_parser_declaration_or_fndef callers.
270 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
271 it through to c_parser_conditional_expression.
272 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
273 pass it through to c_parser_binary_expression. Adjust recursive
275 (c_parser_binary_expression): Remove prec argument, add
276 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
277 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
278 binop matches it, use build2 instead of parser_build_binary_op.
279 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
280 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
281 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
282 Handle pragma_struct and pragma_param the same as pragma_external.
283 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
284 (c_parser_omp_variable_list): Parse array sections for
285 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
286 (c_parser_omp_clause_collapse): Fully fold collapse expression.
287 (c_parser_omp_clause_reduction): Handle user defined reductions.
288 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
289 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
290 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
291 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
292 c_parser_omp_clause_depend, c_parser_omp_clause_map,
293 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
294 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
295 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
296 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
297 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
298 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
299 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
300 (c_parser_omp_for_loop): Add CODE argument, pass it through
301 to c_finish_omp_for. Change last argument to cclauses,
302 and adjust uses to grab parallel clauses from the array of all
303 the split clauses. Adjust c_parser_binary_expression,
304 c_parser_declaration_or_fndef and c_finish_omp_for callers.
305 (omp_split_clauses): New function.
306 (c_parser_omp_simd): New function.
307 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
308 Allow the function to be called also when parsing combined constructs,
309 and call c_parser_omp_simd when parsing for simd.
310 (c_parser_omp_sections_scope): If section-sequence doesn't start with
311 #pragma omp section, require exactly one structured-block instead of
312 sequence of statements.
313 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
314 Allow the function to be called also when parsing combined constructs.
315 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
316 Allow the function to be called also when parsing combined
318 (c_parser_omp_taskgroup, c_parser_omp_cancel,
319 c_parser_omp_cancellation_point, c_parser_omp_distribute,
320 c_parser_omp_teams, c_parser_omp_target_data,
321 c_parser_omp_target_update, c_parser_omp_target,
322 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
323 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
324 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
325 (c_parser_omp_construct): Add p_name and mask vars. Handle
326 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
327 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
328 and c_parser_omp_sections callers.
329 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
330 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
331 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
332 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
333 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
335 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
336 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
337 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
338 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
339 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
340 * c-typeck.c: Include tree-inline.h.
341 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
342 handle_omp_array_sections_1, handle_omp_array_sections,
343 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
344 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
345 user defined reductions.
346 (c_tree_equal): New function.
347 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
348 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
349 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
350 c_check_omp_declare_reduction_r): New prototypes.
351 * c-decl.c (current_omp_declare_target_attribute): New variable.
352 (c_decl_attributes): New function.
353 (start_decl, start_function): Use it instead of decl_attributes.
354 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
355 c_omp_reduction_decl, c_omp_reduction_lookup,
356 c_check_omp_declare_reduction_r): New functions.
358 2013-09-25 Tom Tromey <tromey@redhat.com>
360 * Make-lang.in (c/gccspec.o): Remove.
361 (CFLAGS-c/gccspec.o): New variable.
362 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
363 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
364 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
366 2013-09-25 Tom Tromey <tromey@redhat.com>
368 * Make-lang.in (c/gccspec.o): Don't use subshell.
370 2013-09-18 Marek Polacek <polacek@redhat.com>
373 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
374 Remove unnecessary check.
376 2013-09-18 Marek Polacek <polacek@redhat.com>
379 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
380 no_sanitize_undefined attribute.
382 2013-09-13 Kai Tietz <ktietz@redhat.com>
385 * c-decl.c (c_builtin_function_ext_scope): Remove
386 wrong assumption that it is never called on prexisting
389 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
391 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
393 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
395 * c-objc-common.c (c_tree_printer): Tidy.
397 2013-08-30 Marek Polacek <polacek@redhat.com>
399 * c-typeck.c (build_binary_op): Add division by zero and shift
402 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
403 Joseph Myers <joseph@codesourcery.com>
406 * c-typeck.c (c_common_type): Prefer double_type_node over
407 other REAL_TYPE types with the same precision.
408 (convert_arguments): Likewise.
410 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
412 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
413 (c_initialize_diagnostics): Call a destructor for the early printer.
415 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
417 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
418 printer initialization.
420 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
423 * c-array-notation.c (fix_conditional_array_notations_1): Added a
424 check for truth values.
425 (expand_array_notation_exprs): Added truth values case. Removed an
426 unwanted else. Added for-loop to walk through subtrees in default
429 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
431 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
433 2013-07-23 Joseph Myers <joseph@codesourcery.com>
435 * c-parser.c (struct c_generic_association): Fix typo.
437 2013-07-23 Tom Tromey <tromey@redhat.com>
438 Joseph Myers <joseph@codesourcery.com>
440 * c-parser.c (struct c_generic_association): New.
441 (c_generic_association_d): New typedef.
442 (c_parser_generic_selection): New function.
443 (c_parser_postfix_expression): Handle RID_GENERIC.
445 2013-07-13 Jason Merrill <jason@redhat.com>
448 * c-decl.c (finish_struct): Check for too-large class.
450 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
453 * c-typeck.c (set_init_index): When folding, check for index overflow.
455 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
457 * c-parser.c (c_parser_array_notation): Removed rejection of array
458 notations in an array of function pointers.
460 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
462 * c-array-notation.c (make_triplet_val_inv): New function.
463 (create_cmp_incr): Likewise.
464 (create_array_refs): Likewise.
465 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
466 Also modularized common parts between functions and called the function.
467 (build_array_notation_expr): Likewise.
468 (fix_conditional_array_notations_1): Likewise.
469 (fix_array_notation_expr): Likewise.
470 (fix_array_notation_call_expr): Likewise.
472 2013-06-18 Marek Polacek <polacek@redhat.com>
475 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
477 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
479 * c-array-notation.c (build_array_notation_expr): Reject array notation
480 mismatch between LHS and RHS even inside a call_expr. Also, removed
481 a couple while statements that were dead code.
483 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
485 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
486 excessive precision expressions in function parameters. Also removed
487 couple unwanted while statements.
489 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
491 * c-array-notation.c (expand_array_notation_exprs): Added
492 ARRAY_NOTATION_REF case.
494 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
496 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
497 function to c-family/array-notation-common.c.
498 (is_cilkplus_reduce_builtin): Likewise.
499 (find_rank): Likewise.
500 (extract_array_notation_exprs): Likewise.
501 (replace_array_notations): Likewise.
502 (find_inv_trees): Likewise.
503 (replace_inv_trees): Likewise.
504 (contains_array_notation_expr): Likewise.
505 (find_correct_array_notation_type): Likewise.
506 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
507 (struct inv_list): Moved this to c-family/array-notation-common.c.
508 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
510 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
512 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
513 reduction functions outside the for-loop. Added a check if the fundecl
514 is non-NULL. Finally, removed an unwanted if-statement, and made the
517 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
519 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
520 condition of the if-statement matches the rank of else-block and then-
521 block when array notations are used.
522 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
523 expression after the entire function body is parsed.
524 (c_parser_expr_no_commas): Delayed creating array notation expressions
525 to the end of function parsing.
526 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
527 whole if-statement instead of just the condition.
528 (expand_array_notation_exprs): Added MODIFY_EXPR case.
530 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
533 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
534 array to NULL_TREE if they are unused. Also added a check for the
535 field to be NULL before its fields are used in future.
537 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
540 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
541 (build_array_notation_expr): Likewise.
543 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
545 * c-typeck.c (build_array_ref): Added a check to see if array's
546 index is greater than one. If true, then emit an error.
547 (build_function_call_vec): Exclude error reporting and checking
548 for builtin array-notation functions.
549 (convert_arguments): Likewise.
550 (c_finish_return): Added a check for array notations as a return
551 expression. If true, then emit an error.
552 (c_finish_loop): Added a check for array notations in a loop
553 condition. If true then emit an error.
554 (lvalue_p): Added a ARRAY_NOTATION_REF case.
555 (build_binary_op): Added a check for array notation expr inside
556 op1 and op0. If present, we call another function to find correct
558 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
559 * c-parser.c (c_parser_compound_statement): Check if array
560 notation code is used in tree, if so, then transform them into
562 (c_parser_expr_no_commas): Check if array notation is used in LHS
563 or RHS, if so, then build array notation expression instead of
565 (c_parser_postfix_expression_after_primary): Added a check for
566 colon(s) after square braces, if so then handle it like an array
567 notation. Also, break up array notations in unary op if found.
568 (c_parser_direct_declarator_inner): Added a check for array
570 (c_parser_compound_statement): Added a check for array notation in
571 a stmt. If one is present, then expand array notation expr.
572 (c_parser_if_statement): Likewise.
573 (c_parser_switch_statement): Added a check for array notations in
574 a switch statement's condition. If true, then output an error.
575 (c_parser_while_statement): Similarly, but for a while.
576 (c_parser_do_statement): Similarly, but for a do-while.
577 (c_parser_for_statement): Similarly, but for a for-loop.
578 (c_parser_unary_expression): Check if array notation is used in a
579 pre-increment or pre-decrement expression. If true, then expand
581 (c_parser_array_notation): New function.
582 * c-array-notation.c: New file.
583 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
585 2013-05-23 Mike Stump <mikestump@comcast.net>
587 * c-typeck.c (convert_for_assignment): Handle references to memory
590 2013-05-16 Jason Merrill <jason@redhat.com>
592 * Make-lang.in (cc1$(exeext)): Use link mutex.
594 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
596 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
597 to simply use OPT_Wpointer_arith.
598 (build_unary_op): Likewise.
600 2013-04-03 Jakub Jelinek <jakub@redhat.com>
603 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
604 argument. If set, or it temporarily for parsing of the first
605 argument into force_folding_builtin_constant_p.
606 (c_parser_postfix_expression): Adjust callers.
608 2013-03-21 Richard Biener <rguenther@suse.de>
610 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
611 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
613 2013-02-12 Marek Polacek <polacek@redhat.com>
616 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
619 2013-01-24 Jakub Jelinek <jakub@redhat.com>
622 * c-typeck.c (set_nonincremental_init_from_string): If
623 constructor_max_index is NULL, treat it as if tree_int_cst_lt
625 (process_init_element): Likewise.
627 2012-12-20 Jakub Jelinek <jakub@redhat.com>
630 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
631 argument, don't call default_function_array_conversion
632 nor c_fully_fold here.
633 (c_parser_asm_statement): Adjust callers.
634 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
635 and outputs here, and call default_function_array_conversion
636 on inputs that don't need to be addressable.
638 2012-12-18 Jakub Jelinek <jakub@redhat.com>
641 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
642 warning require that both c_common_unsigned_type as well as
643 c_common_signed_type is the same for both mvl and mvr types.
645 2012-11-16 Diego Novillo <dnovillo@google.com>
647 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
649 * c-common.c: Use new vec API in vec.h.
650 * c-common.h: Likewise.
651 * c-gimplify.c: Likewise.
652 * c-pragma.c: Likewise.
653 * c-pretty-print.c: Likewise.
654 * c-pretty-print.h: Likewise.
655 * c-semantics.c: Likewise.
656 * c-decl.c: Likewise.
657 * c-parser.c: Likewise.
658 * c-tree.h: Likewise.
659 * c-typeck.c: Likewise.
661 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
664 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
666 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
669 * c-decl.c (warn_if_shadowing): Do not warn if a variable
670 shadows a function, unless the variable is a function or a
673 2012-10-12 Jakub Jelinek <jakub@redhat.com>
676 * c-parser.c (struct c_tree_loc_pair): Removed.
677 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
678 add location_t * and tree * arguments, fill in array of 3
679 sizeof_arg trees and corresponding locs.
680 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
681 c_parser_expr_list callers.
682 (c_parser_postfix_expression_after_primary): Likewise. Pass
683 array of 3 sizeof_arg trees and locs (corresponding to first
684 3 arguments) to sizeof_pointer_memaccess_warning.
686 2012-10-09 Lawrence Crowl <crowl@google.com>
688 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
689 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
692 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
695 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
698 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
701 * c-typeck.c: Include c-common.h.
702 (enum stv_conv): Moved to c-common.h.
703 (scalar_to_vector): Moved to c-common.c.
704 (build_binary_op): Adapt to scalar_to_vector's new prototype.
705 * Make-lang.in: c-typeck.c depends on c-common.h.
707 2012-10-04 Arnaud Charlet <charlet@adacore.com>
709 * c-decl.c (c_write_global_declarations): Fix handling of
712 2012-09-30 Sharad Singhai <singhai@google.com>
714 * c-decl.c (c_write_global_declarations): Use a different method
715 to determine if the dump has ben initialized.
717 2012-09-14 Joseph Myers <joseph@codesourcery.com>
720 * c-typeck.c (c_cast_expr): When casting to a type requiring
721 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
724 2012-09-14 Joseph Myers <joseph@codesourcery.com>
727 * c-typeck.c (build_unary_op): Pass original argument of
728 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
729 any C_MAYBE_CONST_EXPR, if it has integer operands.
730 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
731 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
732 to c_objc_common_truthvalue_conversion, then remove any
733 C_MAYBE_CONST_EXPR, if they have integer operands. Use
734 c_objc_common_truthvalue_conversion not
735 c_common_truthvalue_conversion.
736 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
737 call note_integer_operands for arguments with integer operands
738 that are not integer constants.
740 2012-09-13 Jakub Jelinek <jakub@redhat.com>
743 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
744 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
746 2012-08-31 Jakub Jelinek <jakub@redhat.com>
749 * c-convert.c (convert): Don't call fold_convert_loc if
750 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
751 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
752 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
754 2012-08-24 Jakub Jelinek <jakub@redhat.com>
757 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
758 for nested and empty_ok arguments in the call to
759 c_parser_declaration_or_fndef.
761 2012-08-17 Jakub Jelinek <jakub@redhat.com>
763 * c-tree.h (c_last_sizeof_arg): Declare.
764 * c-parser.c (struct c_tree_loc_pair): New type.
765 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
767 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
768 (c_parser_postfix_expression_after_primary): Likewise. Call
769 sizeof_pointer_memaccess_warning if needed.
770 (sizeof_ptr_memacc_comptypes): New function.
771 * c-typeck.c (c_last_sizeof_arg): New global variable.
772 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
774 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
776 * c-lang.h (lang_decl): Add variable_size GTY option.
778 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
780 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
781 * Make-lang.in: Fix dependencies.
783 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
785 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
786 and add language Makefile hooks.
787 * config-lang.in: New file.
788 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
789 add the required "normal" config-lang.in rules.
790 * c-lang.h: Moved from gcc/ to here.
791 * c-tree.h: Likewise.
792 * c-objc-common.c: Likewise.
793 * c-objc-common.h: Likewise.
794 * c-typeck.c: Likewise.
795 * c-convert.c: Likewise.
796 * c-lang.c: Likewise.
797 * c-aux-info.c: Likewise.
798 * c-errors.c: Likewise.
799 * gccspec.c: Likewise.
800 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
801 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
803 Copyright (C) 2012-2013 Free Software Foundation, Inc.
805 Copying and distribution of this file, with or without modification,
806 are permitted in any medium without royalty provided the copyright
807 notice and this notice are preserved.