1 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8 2013-12-04 Joseph Myers <joseph@codesourcery.com>
11 * c-parser.c (c_parser_alignas_specifier): Use
12 c_sizeof_or_alignof_type instead of c_alignof.
13 (c_parser_alignof_expression): Likewise, with min_alignof
14 parameter depending on alignof spelling used.
16 2013-12-04 Marek Polacek <polacek@redhat.com>
19 * c-decl.c (start_function): Don't warn for missing prototype for
22 2013-12-03 Marek Polacek <polacek@redhat.com>
25 * c-decl.c (build_compound_literal): Allow compound literals with
28 2013-12-02 Joseph Myers <joseph@codesourcery.com>
31 * c-typeck.c (build_modify_expr): Diagnose assignment to
32 expression with array type.
34 2013-11-29 Joseph Myers <joseph@codesourcery.com>
37 * c-typeck.c (process_init_element): Do not treat a string as
38 initializing a whole array when used with a designator for an
41 2013-11-29 Joseph Myers <joseph@codesourcery.com>
44 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
45 an inline function following a static declaration.
47 2013-11-28 Jakub Jelinek <jakub@redhat.com>
50 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
51 to p_name before calling c_parser_omp_teams instead of after.
52 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
53 argument. Remove unused p_name variable.
55 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
56 Jakub Jelinek <jakub@redhat.com>
58 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
59 external_scope is NULL.
61 2013-11-27 Tom de Vries <tom@codesourcery.com>
62 Marc Glisse <marc.glisse@inria.fr>
65 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
67 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
69 * c-typeck.c: Add required include files from gimple.h.
71 2013-11-22 David Malcolm <dmalcolm@redhat.com>
73 * c-decl.c (define_label, shadow_tag_warned)
74 (check_bitfield_type_and_width, grokdeclarator, grokparms,
75 store_parm_decls_newstyle, store_parm_decls_oldstyle)
76 (declspecs_add_type): Remove use of in_system_header macro.
77 * c-parser.c (c_parser_unary_expression): Likewise.
78 * c-typeck.c (store_init_value, process_init_element)
79 (c_start_case): Likewise.
81 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
84 * c-parser.c (c_parser_set_source_position_from_token): Remove
85 reference to in_system_header from comment.
87 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
89 * c-decl.c (grokdeclarator): Update comment to refer to
90 tree_to_[su]hwi rather than tree_low_cst.
92 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
94 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
95 tree_to_uhwi throughout.
97 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
99 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
102 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
104 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
107 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
109 * c-parser.c (c_parser_cilk_simd): New.
110 (c_parser_cilk_verify_simd): New.
111 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
112 (c_parser_omp_for_loop): Add case for NE_EXPR.
113 Set c_break_label for CILK_SIMD.
114 (c_parser_cilk_clause_vectorlength): New.
115 (c_parser_cilk_clause_linear): New.
116 (c_parser_cilk_clause_name): New.
117 (c_parser_cilk_all_clauses): New.
118 * c-typeck.c (build_unary_op): Pass location argument to
120 (build_modify_expr): Same.
121 (build_asm_expr): Same.
122 (c_finish_bc_stmt): Error on break/continue in loops.
124 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
126 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
128 2013-11-14 Diego Novillo <dnovillo@google.com>
130 * c-decl.c: Include print-tree.h.
131 Include stor-layout.h.
134 Include stringpool.h.
135 * c-lang.c: Include fold-const.h.
136 * c-parser.c: Include stringpool.h.
138 Include stor-layout.h.
141 * c-typeck.c: Include stor-layout.h.
146 2013-11-13 Joseph Myers <joseph@codesourcery.com>
148 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
149 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
151 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
152 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
154 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
155 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
156 (c_parser_declarator, c_parser_direct_declarator_inner)
157 (c_parser_parameter_declaration, c_parser_type_name): All callers
159 (c_parser_declaration_or_fndef): Handle declarations with type
160 determined from the initializer.
162 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
164 * c-typeck.c: Include gimplify.h.
166 2013-11-12 Joseph Myers <joseph@codesourcery.com>
168 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
169 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
171 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
172 or _Thread_local as appropriate in diagnostics.
173 (build_null_declspecs): Initialize ret->thread_gnu_p.
174 (declspecs_add_scspec): Handle either __thread or _Thread_local
175 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
176 pedantic. Do not disallow _Thread_local extern and _Thread_local
179 2013-11-07 Joseph Myers <joseph@codesourcery.com>
180 Andrew MacLeod <amacleod@redhat.com>
182 * c-aux-info.c (gen_type): Handle atomic qualifier.
183 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
184 qualifiers when compating types.
185 (shadow_tag_warned): Handle atomic_p in declspecs.
186 (quals_from_declspecs): Likewise.
187 (start_decl): Use c_type_promotes_to when promoting argument
189 (grokdeclarator): Handle _Atomic.
190 (get_parm_info): Diagnose any qualifier on "void" as only
192 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
193 comparing types. Use c_type_promotes_to when promoting argument
195 (finish_function): Use c_type_promotes_to when promoting argument
197 (build_null_declspecs): Handle atomic_p in declspecs.
198 (declspecs_add_qual): Handle RID_ATOMIC.
199 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
200 (c_token_starts_declspecs): Handle RID_ATOMIC.
201 (c_parser_declspecs): Handle atomic type specifiers and
203 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
204 from types of expressions with atomic type.
205 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
206 (c_parser_attribute_any_word): Handle RID_ATOMIC.
207 (c_parser_initializer, c_parser_initelt, c_parser_initval)
208 (c_parser_statement_after_labels, c_parser_switch_statement)
209 (c_parser_for_statement, c_parser_expr_no_commas)
210 (c_parser_conditional_expression, c_parser_binary_expression)
211 (c_parser_cast_expression, c_parser_unary_expression)
212 (c_parser_postfix_expression)
213 (c_parser_postfix_expression_after_primary, c_parser_expression):
214 Use convert_lvalue_to_rvalue.
215 (c_parser_expression_conv, c_parser_expr_list): Document
216 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
217 (c_parser_objc_synchronized_statement): Use
218 convert_lvalue_to_rvalue.
219 (c_parser_objc_selector): Handle RID_ATOMIC.
220 (c_parser_objc_receiver, c_parser_array_notation): Use
221 convert_lvalue_to_rvalue.
222 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
224 (struct c_declspecs): Add atomic_p field.
225 (convert_lvalue_to_rvalue): Declare.
226 * c-typeck.c (c_type_promotes_to): Promote atomic types to
227 corresponding atomic types.
228 (qualify_type): Don't add _Atomic qualifiers from second argument.
229 (comp_target_types): Do not allow _Atomic mismatches.
230 (type_lists_compatible_p): Do not remove atomic qualifiers when
232 (really_atomic_lvalue, convert_lvalue_to_rvalue)
233 (build_atomic_assign): New functions.
234 (build_unary_op): Use build_atomic_assign for atomic increment and
236 (build_conditional_expr): Do not treat _Atomic void as a qualified
238 (build_modify_expr): Use build_atomic_assign for atomic LHS.
239 (find_anonymous_field_with_type, convert_to_anonymous_field)
240 (convert_for_assignment): Do not remove atomic qualifiers when
242 (digest_init): Do not accept initialization of arrays of atomic
243 elements by string constants.
244 (build_asm_expr): Use convert_lvalue_to_rvalue.
245 (build_binary_op): Do not treat _Atomic void as a qualified
248 2013-11-06 DJ Delorie <dj@redhat.com>
250 * c-decl.c (locate_old_decl): If a previous conflicting decl is
251 both explicit and builtin, print the location of the explicit one.
253 2013-11-05 Tobias Burnus <burnus@net-b.de>
255 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
256 c_parser_omp_distribute, c_parser_omp_teams,
257 c_parser_omp_target, c_parser_omp_declare): Handle
260 2013-11-03 Marek Polacek <polacek@redhat.com>
262 * c-decl.c (grokdeclarator): Add VLA instrumentation.
264 2013-11-01 Jakub Jelinek <jakub@redhat.com>
266 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
267 check_dup_generic at the end, unless remove is true.
268 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
270 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
272 2013-10-31 Jakub Jelinek <jakub@redhat.com>
274 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
275 with decl that is not pointer nor array.
277 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
279 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
280 a spawning function is found.
281 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
282 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
283 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
284 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
286 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
287 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
289 (c_finish_return): Added a check to reject _Cilk_spawn in return
291 (build_cilk_spawn): New function.
292 (build_cilk_sync): Likewise.
293 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
295 2013-10-27 Tobias Burnus <burnus@net-b.de>
298 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
299 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
300 (c_parser_statement_after_labels): Update calls.
302 2013-10-24 Tobias Burnus <burnus@net-b.de>
305 * c-parser.c (c_parser_pragma, c_parser_for_statement):
307 (c_parser_statement_after_labels): Update call.
309 2013-10-24 Marek Polacek <polacek@redhat.com>
311 * c-parser.c (c_parser_struct_declaration): Add a comment.
312 (c_parser_declarator): Don't allow _Alignas here.
314 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
316 * c-parser.c: Include omp-low.h.
317 * c-typeck.c: Likewise.
319 2013-10-17 Marek Polacek <polacek@redhat.com>
322 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
323 Document syntax of the array-declarator.
324 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
326 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
327 (c_parser_struct_declaration): Likewise.
328 (c_parser_declarator): Likewise.
329 (c_parser_direct_declarator_inner): Likewise.
330 (c_parser_parameter_declaration): Likewise.
331 (c_parser_type_name): Likewise.
333 2013-10-11 Jakub Jelinek <jakub@redhat.com>
335 * c-lang.h (current_omp_declare_target_attribute): New extern
337 * c-parser.c: Include c-lang.h.
338 (struct c_parser): Change tokens to c_token *.
339 Add tokens_buf field. Change tokens_avail type to unsigned int.
340 (c_parser_consume_token): If parser->tokens isn't
341 &parser->tokens_buf[0], increment parser->tokens.
342 (c_parser_consume_pragma): Likewise.
343 (enum pragma_context): Add pragma_struct and pragma_param.
344 (c_parser_external_declaration): Adjust
345 c_parser_declaration_or_fndef caller.
346 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
347 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
348 Adjust recursive call.
349 (c_parser_struct_or_union_specifier): Use pragma_struct instead
351 (c_parser_parameter_declaration): Use pragma_param instead of
353 (c_parser_compound_statement_nostart, c_parser_label,
354 c_parser_for_statement): Adjust
355 c_parser_declaration_or_fndef callers.
356 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
357 it through to c_parser_conditional_expression.
358 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
359 pass it through to c_parser_binary_expression. Adjust recursive
361 (c_parser_binary_expression): Remove prec argument, add
362 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
363 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
364 binop matches it, use build2 instead of parser_build_binary_op.
365 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
366 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
367 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
368 Handle pragma_struct and pragma_param the same as pragma_external.
369 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
370 (c_parser_omp_variable_list): Parse array sections for
371 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
372 (c_parser_omp_clause_collapse): Fully fold collapse expression.
373 (c_parser_omp_clause_reduction): Handle user defined reductions.
374 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
375 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
376 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
377 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
378 c_parser_omp_clause_depend, c_parser_omp_clause_map,
379 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
380 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
381 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
382 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
383 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
384 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
385 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
386 (c_parser_omp_for_loop): Add CODE argument, pass it through
387 to c_finish_omp_for. Change last argument to cclauses,
388 and adjust uses to grab parallel clauses from the array of all
389 the split clauses. Adjust c_parser_binary_expression,
390 c_parser_declaration_or_fndef and c_finish_omp_for callers.
391 (omp_split_clauses): New function.
392 (c_parser_omp_simd): New function.
393 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
394 Allow the function to be called also when parsing combined constructs,
395 and call c_parser_omp_simd when parsing for simd.
396 (c_parser_omp_sections_scope): If section-sequence doesn't start with
397 #pragma omp section, require exactly one structured-block instead of
398 sequence of statements.
399 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
400 Allow the function to be called also when parsing combined constructs.
401 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
402 Allow the function to be called also when parsing combined
404 (c_parser_omp_taskgroup, c_parser_omp_cancel,
405 c_parser_omp_cancellation_point, c_parser_omp_distribute,
406 c_parser_omp_teams, c_parser_omp_target_data,
407 c_parser_omp_target_update, c_parser_omp_target,
408 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
409 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
410 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
411 (c_parser_omp_construct): Add p_name and mask vars. Handle
412 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
413 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
414 and c_parser_omp_sections callers.
415 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
416 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
417 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
418 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
419 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
421 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
422 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
423 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
424 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
425 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
426 * c-typeck.c: Include tree-inline.h.
427 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
428 handle_omp_array_sections_1, handle_omp_array_sections,
429 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
430 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
431 user defined reductions.
432 (c_tree_equal): New function.
433 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
434 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
435 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
436 c_check_omp_declare_reduction_r): New prototypes.
437 * c-decl.c (current_omp_declare_target_attribute): New variable.
438 (c_decl_attributes): New function.
439 (start_decl, start_function): Use it instead of decl_attributes.
440 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
441 c_omp_reduction_decl, c_omp_reduction_lookup,
442 c_check_omp_declare_reduction_r): New functions.
444 2013-09-25 Tom Tromey <tromey@redhat.com>
446 * Make-lang.in (c/gccspec.o): Remove.
447 (CFLAGS-c/gccspec.o): New variable.
448 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
449 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
450 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
452 2013-09-25 Tom Tromey <tromey@redhat.com>
454 * Make-lang.in (c/gccspec.o): Don't use subshell.
456 2013-09-18 Marek Polacek <polacek@redhat.com>
459 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
460 Remove unnecessary check.
462 2013-09-18 Marek Polacek <polacek@redhat.com>
465 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
466 no_sanitize_undefined attribute.
468 2013-09-13 Kai Tietz <ktietz@redhat.com>
471 * c-decl.c (c_builtin_function_ext_scope): Remove
472 wrong assumption that it is never called on prexisting
475 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
477 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
479 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
481 * c-objc-common.c (c_tree_printer): Tidy.
483 2013-08-30 Marek Polacek <polacek@redhat.com>
485 * c-typeck.c (build_binary_op): Add division by zero and shift
488 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
489 Joseph Myers <joseph@codesourcery.com>
492 * c-typeck.c (c_common_type): Prefer double_type_node over
493 other REAL_TYPE types with the same precision.
494 (convert_arguments): Likewise.
496 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
498 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
499 (c_initialize_diagnostics): Call a destructor for the early printer.
501 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
503 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
504 printer initialization.
506 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
509 * c-array-notation.c (fix_conditional_array_notations_1): Added a
510 check for truth values.
511 (expand_array_notation_exprs): Added truth values case. Removed an
512 unwanted else. Added for-loop to walk through subtrees in default
515 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
517 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
519 2013-07-23 Joseph Myers <joseph@codesourcery.com>
521 * c-parser.c (struct c_generic_association): Fix typo.
523 2013-07-23 Tom Tromey <tromey@redhat.com>
524 Joseph Myers <joseph@codesourcery.com>
526 * c-parser.c (struct c_generic_association): New.
527 (c_generic_association_d): New typedef.
528 (c_parser_generic_selection): New function.
529 (c_parser_postfix_expression): Handle RID_GENERIC.
531 2013-07-13 Jason Merrill <jason@redhat.com>
534 * c-decl.c (finish_struct): Check for too-large class.
536 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
539 * c-typeck.c (set_init_index): When folding, check for index overflow.
541 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
543 * c-parser.c (c_parser_array_notation): Removed rejection of array
544 notations in an array of function pointers.
546 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
548 * c-array-notation.c (make_triplet_val_inv): New function.
549 (create_cmp_incr): Likewise.
550 (create_array_refs): Likewise.
551 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
552 Also modularized common parts between functions and called the function.
553 (build_array_notation_expr): Likewise.
554 (fix_conditional_array_notations_1): Likewise.
555 (fix_array_notation_expr): Likewise.
556 (fix_array_notation_call_expr): Likewise.
558 2013-06-18 Marek Polacek <polacek@redhat.com>
561 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
563 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
565 * c-array-notation.c (build_array_notation_expr): Reject array notation
566 mismatch between LHS and RHS even inside a call_expr. Also, removed
567 a couple while statements that were dead code.
569 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
571 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
572 excessive precision expressions in function parameters. Also removed
573 couple unwanted while statements.
575 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
577 * c-array-notation.c (expand_array_notation_exprs): Added
578 ARRAY_NOTATION_REF case.
580 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
582 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
583 function to c-family/array-notation-common.c.
584 (is_cilkplus_reduce_builtin): Likewise.
585 (find_rank): Likewise.
586 (extract_array_notation_exprs): Likewise.
587 (replace_array_notations): Likewise.
588 (find_inv_trees): Likewise.
589 (replace_inv_trees): Likewise.
590 (contains_array_notation_expr): Likewise.
591 (find_correct_array_notation_type): Likewise.
592 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
593 (struct inv_list): Moved this to c-family/array-notation-common.c.
594 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
596 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
598 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
599 reduction functions outside the for-loop. Added a check if the fundecl
600 is non-NULL. Finally, removed an unwanted if-statement, and made the
603 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
605 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
606 condition of the if-statement matches the rank of else-block and then-
607 block when array notations are used.
608 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
609 expression after the entire function body is parsed.
610 (c_parser_expr_no_commas): Delayed creating array notation expressions
611 to the end of function parsing.
612 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
613 whole if-statement instead of just the condition.
614 (expand_array_notation_exprs): Added MODIFY_EXPR case.
616 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
619 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
620 array to NULL_TREE if they are unused. Also added a check for the
621 field to be NULL before its fields are used in future.
623 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
626 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
627 (build_array_notation_expr): Likewise.
629 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
631 * c-typeck.c (build_array_ref): Added a check to see if array's
632 index is greater than one. If true, then emit an error.
633 (build_function_call_vec): Exclude error reporting and checking
634 for builtin array-notation functions.
635 (convert_arguments): Likewise.
636 (c_finish_return): Added a check for array notations as a return
637 expression. If true, then emit an error.
638 (c_finish_loop): Added a check for array notations in a loop
639 condition. If true then emit an error.
640 (lvalue_p): Added a ARRAY_NOTATION_REF case.
641 (build_binary_op): Added a check for array notation expr inside
642 op1 and op0. If present, we call another function to find correct
644 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
645 * c-parser.c (c_parser_compound_statement): Check if array
646 notation code is used in tree, if so, then transform them into
648 (c_parser_expr_no_commas): Check if array notation is used in LHS
649 or RHS, if so, then build array notation expression instead of
651 (c_parser_postfix_expression_after_primary): Added a check for
652 colon(s) after square braces, if so then handle it like an array
653 notation. Also, break up array notations in unary op if found.
654 (c_parser_direct_declarator_inner): Added a check for array
656 (c_parser_compound_statement): Added a check for array notation in
657 a stmt. If one is present, then expand array notation expr.
658 (c_parser_if_statement): Likewise.
659 (c_parser_switch_statement): Added a check for array notations in
660 a switch statement's condition. If true, then output an error.
661 (c_parser_while_statement): Similarly, but for a while.
662 (c_parser_do_statement): Similarly, but for a do-while.
663 (c_parser_for_statement): Similarly, but for a for-loop.
664 (c_parser_unary_expression): Check if array notation is used in a
665 pre-increment or pre-decrement expression. If true, then expand
667 (c_parser_array_notation): New function.
668 * c-array-notation.c: New file.
669 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
671 2013-05-23 Mike Stump <mikestump@comcast.net>
673 * c-typeck.c (convert_for_assignment): Handle references to memory
676 2013-05-16 Jason Merrill <jason@redhat.com>
678 * Make-lang.in (cc1$(exeext)): Use link mutex.
680 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
682 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
683 to simply use OPT_Wpointer_arith.
684 (build_unary_op): Likewise.
686 2013-04-03 Jakub Jelinek <jakub@redhat.com>
689 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
690 argument. If set, or it temporarily for parsing of the first
691 argument into force_folding_builtin_constant_p.
692 (c_parser_postfix_expression): Adjust callers.
694 2013-03-21 Richard Biener <rguenther@suse.de>
696 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
697 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
699 2013-02-12 Marek Polacek <polacek@redhat.com>
702 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
705 2013-01-24 Jakub Jelinek <jakub@redhat.com>
708 * c-typeck.c (set_nonincremental_init_from_string): If
709 constructor_max_index is NULL, treat it as if tree_int_cst_lt
711 (process_init_element): Likewise.
713 2012-12-20 Jakub Jelinek <jakub@redhat.com>
716 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
717 argument, don't call default_function_array_conversion
718 nor c_fully_fold here.
719 (c_parser_asm_statement): Adjust callers.
720 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
721 and outputs here, and call default_function_array_conversion
722 on inputs that don't need to be addressable.
724 2012-12-18 Jakub Jelinek <jakub@redhat.com>
727 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
728 warning require that both c_common_unsigned_type as well as
729 c_common_signed_type is the same for both mvl and mvr types.
731 2012-11-16 Diego Novillo <dnovillo@google.com>
733 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
735 * c-common.c: Use new vec API in vec.h.
736 * c-common.h: Likewise.
737 * c-gimplify.c: Likewise.
738 * c-pragma.c: Likewise.
739 * c-pretty-print.c: Likewise.
740 * c-pretty-print.h: Likewise.
741 * c-semantics.c: Likewise.
742 * c-decl.c: Likewise.
743 * c-parser.c: Likewise.
744 * c-tree.h: Likewise.
745 * c-typeck.c: Likewise.
747 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
750 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
752 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
755 * c-decl.c (warn_if_shadowing): Do not warn if a variable
756 shadows a function, unless the variable is a function or a
759 2012-10-12 Jakub Jelinek <jakub@redhat.com>
762 * c-parser.c (struct c_tree_loc_pair): Removed.
763 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
764 add location_t * and tree * arguments, fill in array of 3
765 sizeof_arg trees and corresponding locs.
766 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
767 c_parser_expr_list callers.
768 (c_parser_postfix_expression_after_primary): Likewise. Pass
769 array of 3 sizeof_arg trees and locs (corresponding to first
770 3 arguments) to sizeof_pointer_memaccess_warning.
772 2012-10-09 Lawrence Crowl <crowl@google.com>
774 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
775 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
778 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
781 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
784 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
787 * c-typeck.c: Include c-common.h.
788 (enum stv_conv): Moved to c-common.h.
789 (scalar_to_vector): Moved to c-common.c.
790 (build_binary_op): Adapt to scalar_to_vector's new prototype.
791 * Make-lang.in: c-typeck.c depends on c-common.h.
793 2012-10-04 Arnaud Charlet <charlet@adacore.com>
795 * c-decl.c (c_write_global_declarations): Fix handling of
798 2012-09-30 Sharad Singhai <singhai@google.com>
800 * c-decl.c (c_write_global_declarations): Use a different method
801 to determine if the dump has ben initialized.
803 2012-09-14 Joseph Myers <joseph@codesourcery.com>
806 * c-typeck.c (c_cast_expr): When casting to a type requiring
807 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
810 2012-09-14 Joseph Myers <joseph@codesourcery.com>
813 * c-typeck.c (build_unary_op): Pass original argument of
814 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
815 any C_MAYBE_CONST_EXPR, if it has integer operands.
816 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
817 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
818 to c_objc_common_truthvalue_conversion, then remove any
819 C_MAYBE_CONST_EXPR, if they have integer operands. Use
820 c_objc_common_truthvalue_conversion not
821 c_common_truthvalue_conversion.
822 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
823 call note_integer_operands for arguments with integer operands
824 that are not integer constants.
826 2012-09-13 Jakub Jelinek <jakub@redhat.com>
829 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
830 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
832 2012-08-31 Jakub Jelinek <jakub@redhat.com>
835 * c-convert.c (convert): Don't call fold_convert_loc if
836 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
837 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
838 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
840 2012-08-24 Jakub Jelinek <jakub@redhat.com>
843 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
844 for nested and empty_ok arguments in the call to
845 c_parser_declaration_or_fndef.
847 2012-08-17 Jakub Jelinek <jakub@redhat.com>
849 * c-tree.h (c_last_sizeof_arg): Declare.
850 * c-parser.c (struct c_tree_loc_pair): New type.
851 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
853 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
854 (c_parser_postfix_expression_after_primary): Likewise. Call
855 sizeof_pointer_memaccess_warning if needed.
856 (sizeof_ptr_memacc_comptypes): New function.
857 * c-typeck.c (c_last_sizeof_arg): New global variable.
858 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
860 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
862 * c-lang.h (lang_decl): Add variable_size GTY option.
864 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
866 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
867 * Make-lang.in: Fix dependencies.
869 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
871 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
872 and add language Makefile hooks.
873 * config-lang.in: New file.
874 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
875 add the required "normal" config-lang.in rules.
876 * c-lang.h: Moved from gcc/ to here.
877 * c-tree.h: Likewise.
878 * c-objc-common.c: Likewise.
879 * c-objc-common.h: Likewise.
880 * c-typeck.c: Likewise.
881 * c-convert.c: Likewise.
882 * c-lang.c: Likewise.
883 * c-aux-info.c: Likewise.
884 * c-errors.c: Likewise.
885 * gccspec.c: Likewise.
886 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
887 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
889 Copyright (C) 2012-2013 Free Software Foundation, Inc.
891 Copying and distribution of this file, with or without modification,
892 are permitted in any medium without royalty provided the copyright
893 notice and this notice are preserved.