1 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5 function to use walk_tree and moved a lot of its functionality to
6 expand_array_notations.
7 (expand_array_notations): New function.
9 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
11 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
12 attribute an attribute without value.
14 2014-01-23 Jakub Jelinek <jakub@redhat.com>
17 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
18 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
20 2014-01-22 Marek Polacek <polacek@redhat.com>
23 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
24 of remove_c_maybe_const_expr on op1 and op2.
26 2014-01-15 Jakub Jelinek <jakub@redhat.com>
29 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
30 effects, preevaluate rhs using SAVE_EXPR first.
32 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
35 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
36 statements with if-elseif statements.
38 2014-01-06 Marek Polacek <polacek@redhat.com>
41 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
42 defined bit-field types only in ISO C.
44 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
46 Update copyright years
48 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
50 * c-array-notation.c: Use the standard form for the copyright notice.
52 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
54 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
55 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
56 field in parser is not empty. If not-empty, call the function
57 c_parser_finish_omp_declare_simd.
58 (c_parser_cilk_clause_vectorlength): Modified function to be shared
59 between SIMD-enabled functions and #pragma simd. Added new parameter.
60 (c_parser_cilk_all_clauses): Modified the usage of the function
61 c_parser_cilk_clause_vectorlength as mentioned above.
62 (c_parser_cilk_simd_fn_vector_attrs): New function.
63 (c_finish_cilk_simd_fn_tokens): Likewise.
64 (is_cilkplus_vector_p): Likewise.
65 (c_parser_omp_clause_name): Added checking for "vectorlength,"
66 "nomask," and "mask" strings in clause name.
67 (c_parser_omp_all_clauses): Added 3 new case statements:
68 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
69 PRAGMA_CILK_CLAUSE_NOMASK.
70 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
71 check for vector attribute and if so call the function
72 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
73 called the function c_finish_cilk_simd_fn_tokens.
74 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
75 parser field is non-empty. If so, parse them as you would parse
76 the omp declare simd pragma.
77 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
78 Added a check when step is a parameter and flag it as error.
79 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
80 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
83 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
85 * c-parser.c (c_parser_omp_parallel): Fix description.
87 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
89 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
90 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
91 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
92 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
94 2013-12-04 Joseph Myers <joseph@codesourcery.com>
97 * c-parser.c (c_parser_alignas_specifier): Use
98 c_sizeof_or_alignof_type instead of c_alignof.
99 (c_parser_alignof_expression): Likewise, with min_alignof
100 parameter depending on alignof spelling used.
102 2013-12-04 Marek Polacek <polacek@redhat.com>
105 * c-decl.c (start_function): Don't warn for missing prototype for
108 2013-12-03 Marek Polacek <polacek@redhat.com>
111 * c-decl.c (build_compound_literal): Allow compound literals with
114 2013-12-02 Joseph Myers <joseph@codesourcery.com>
117 * c-typeck.c (build_modify_expr): Diagnose assignment to
118 expression with array type.
120 2013-11-29 Joseph Myers <joseph@codesourcery.com>
123 * c-typeck.c (process_init_element): Do not treat a string as
124 initializing a whole array when used with a designator for an
127 2013-11-29 Joseph Myers <joseph@codesourcery.com>
130 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
131 an inline function following a static declaration.
133 2013-11-28 Jakub Jelinek <jakub@redhat.com>
136 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
137 to p_name before calling c_parser_omp_teams instead of after.
138 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
139 argument. Remove unused p_name variable.
141 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
142 Jakub Jelinek <jakub@redhat.com>
144 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
145 external_scope is NULL.
147 2013-11-27 Tom de Vries <tom@codesourcery.com>
148 Marc Glisse <marc.glisse@inria.fr>
151 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
153 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
155 * c-typeck.c: Add required include files from gimple.h.
157 2013-11-22 David Malcolm <dmalcolm@redhat.com>
159 * c-decl.c (define_label, shadow_tag_warned)
160 (check_bitfield_type_and_width, grokdeclarator, grokparms,
161 store_parm_decls_newstyle, store_parm_decls_oldstyle)
162 (declspecs_add_type): Remove use of in_system_header macro.
163 * c-parser.c (c_parser_unary_expression): Likewise.
164 * c-typeck.c (store_init_value, process_init_element)
165 (c_start_case): Likewise.
167 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
170 * c-parser.c (c_parser_set_source_position_from_token): Remove
171 reference to in_system_header from comment.
173 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
175 * c-decl.c (grokdeclarator): Update comment to refer to
176 tree_to_[su]hwi rather than tree_low_cst.
178 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
180 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
181 tree_to_uhwi throughout.
183 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
185 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
188 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
190 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
193 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
195 * c-parser.c (c_parser_cilk_simd): New.
196 (c_parser_cilk_verify_simd): New.
197 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
198 (c_parser_omp_for_loop): Add case for NE_EXPR.
199 Set c_break_label for CILK_SIMD.
200 (c_parser_cilk_clause_vectorlength): New.
201 (c_parser_cilk_clause_linear): New.
202 (c_parser_cilk_clause_name): New.
203 (c_parser_cilk_all_clauses): New.
204 * c-typeck.c (build_unary_op): Pass location argument to
206 (build_modify_expr): Same.
207 (build_asm_expr): Same.
208 (c_finish_bc_stmt): Error on break/continue in loops.
210 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
212 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
214 2013-11-14 Diego Novillo <dnovillo@google.com>
216 * c-decl.c: Include print-tree.h.
217 Include stor-layout.h.
220 Include stringpool.h.
221 * c-lang.c: Include fold-const.h.
222 * c-parser.c: Include stringpool.h.
224 Include stor-layout.h.
227 * c-typeck.c: Include stor-layout.h.
232 2013-11-13 Joseph Myers <joseph@codesourcery.com>
234 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
235 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
237 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
238 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
240 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
241 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
242 (c_parser_declarator, c_parser_direct_declarator_inner)
243 (c_parser_parameter_declaration, c_parser_type_name): All callers
245 (c_parser_declaration_or_fndef): Handle declarations with type
246 determined from the initializer.
248 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
250 * c-typeck.c: Include gimplify.h.
252 2013-11-12 Joseph Myers <joseph@codesourcery.com>
254 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
255 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
257 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
258 or _Thread_local as appropriate in diagnostics.
259 (build_null_declspecs): Initialize ret->thread_gnu_p.
260 (declspecs_add_scspec): Handle either __thread or _Thread_local
261 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
262 pedantic. Do not disallow _Thread_local extern and _Thread_local
265 2013-11-07 Joseph Myers <joseph@codesourcery.com>
266 Andrew MacLeod <amacleod@redhat.com>
268 * c-aux-info.c (gen_type): Handle atomic qualifier.
269 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
270 qualifiers when compating types.
271 (shadow_tag_warned): Handle atomic_p in declspecs.
272 (quals_from_declspecs): Likewise.
273 (start_decl): Use c_type_promotes_to when promoting argument
275 (grokdeclarator): Handle _Atomic.
276 (get_parm_info): Diagnose any qualifier on "void" as only
278 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
279 comparing types. Use c_type_promotes_to when promoting argument
281 (finish_function): Use c_type_promotes_to when promoting argument
283 (build_null_declspecs): Handle atomic_p in declspecs.
284 (declspecs_add_qual): Handle RID_ATOMIC.
285 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
286 (c_token_starts_declspecs): Handle RID_ATOMIC.
287 (c_parser_declspecs): Handle atomic type specifiers and
289 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
290 from types of expressions with atomic type.
291 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
292 (c_parser_attribute_any_word): Handle RID_ATOMIC.
293 (c_parser_initializer, c_parser_initelt, c_parser_initval)
294 (c_parser_statement_after_labels, c_parser_switch_statement)
295 (c_parser_for_statement, c_parser_expr_no_commas)
296 (c_parser_conditional_expression, c_parser_binary_expression)
297 (c_parser_cast_expression, c_parser_unary_expression)
298 (c_parser_postfix_expression)
299 (c_parser_postfix_expression_after_primary, c_parser_expression):
300 Use convert_lvalue_to_rvalue.
301 (c_parser_expression_conv, c_parser_expr_list): Document
302 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
303 (c_parser_objc_synchronized_statement): Use
304 convert_lvalue_to_rvalue.
305 (c_parser_objc_selector): Handle RID_ATOMIC.
306 (c_parser_objc_receiver, c_parser_array_notation): Use
307 convert_lvalue_to_rvalue.
308 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
310 (struct c_declspecs): Add atomic_p field.
311 (convert_lvalue_to_rvalue): Declare.
312 * c-typeck.c (c_type_promotes_to): Promote atomic types to
313 corresponding atomic types.
314 (qualify_type): Don't add _Atomic qualifiers from second argument.
315 (comp_target_types): Do not allow _Atomic mismatches.
316 (type_lists_compatible_p): Do not remove atomic qualifiers when
318 (really_atomic_lvalue, convert_lvalue_to_rvalue)
319 (build_atomic_assign): New functions.
320 (build_unary_op): Use build_atomic_assign for atomic increment and
322 (build_conditional_expr): Do not treat _Atomic void as a qualified
324 (build_modify_expr): Use build_atomic_assign for atomic LHS.
325 (find_anonymous_field_with_type, convert_to_anonymous_field)
326 (convert_for_assignment): Do not remove atomic qualifiers when
328 (digest_init): Do not accept initialization of arrays of atomic
329 elements by string constants.
330 (build_asm_expr): Use convert_lvalue_to_rvalue.
331 (build_binary_op): Do not treat _Atomic void as a qualified
334 2013-11-06 DJ Delorie <dj@redhat.com>
336 * c-decl.c (locate_old_decl): If a previous conflicting decl is
337 both explicit and builtin, print the location of the explicit one.
339 2013-11-05 Tobias Burnus <burnus@net-b.de>
341 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
342 c_parser_omp_distribute, c_parser_omp_teams,
343 c_parser_omp_target, c_parser_omp_declare): Handle
346 2013-11-03 Marek Polacek <polacek@redhat.com>
348 * c-decl.c (grokdeclarator): Add VLA instrumentation.
350 2013-11-01 Jakub Jelinek <jakub@redhat.com>
352 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
353 check_dup_generic at the end, unless remove is true.
354 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
356 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
358 2013-10-31 Jakub Jelinek <jakub@redhat.com>
360 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
361 with decl that is not pointer nor array.
363 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
365 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
366 a spawning function is found.
367 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
368 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
369 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
370 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
372 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
373 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
375 (c_finish_return): Added a check to reject _Cilk_spawn in return
377 (build_cilk_spawn): New function.
378 (build_cilk_sync): Likewise.
379 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
381 2013-10-27 Tobias Burnus <burnus@net-b.de>
384 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
385 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
386 (c_parser_statement_after_labels): Update calls.
388 2013-10-24 Tobias Burnus <burnus@net-b.de>
391 * c-parser.c (c_parser_pragma, c_parser_for_statement):
393 (c_parser_statement_after_labels): Update call.
395 2013-10-24 Marek Polacek <polacek@redhat.com>
397 * c-parser.c (c_parser_struct_declaration): Add a comment.
398 (c_parser_declarator): Don't allow _Alignas here.
400 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
402 * c-parser.c: Include omp-low.h.
403 * c-typeck.c: Likewise.
405 2013-10-17 Marek Polacek <polacek@redhat.com>
408 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
409 Document syntax of the array-declarator.
410 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
412 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
413 (c_parser_struct_declaration): Likewise.
414 (c_parser_declarator): Likewise.
415 (c_parser_direct_declarator_inner): Likewise.
416 (c_parser_parameter_declaration): Likewise.
417 (c_parser_type_name): Likewise.
419 2013-10-11 Jakub Jelinek <jakub@redhat.com>
421 * c-lang.h (current_omp_declare_target_attribute): New extern
423 * c-parser.c: Include c-lang.h.
424 (struct c_parser): Change tokens to c_token *.
425 Add tokens_buf field. Change tokens_avail type to unsigned int.
426 (c_parser_consume_token): If parser->tokens isn't
427 &parser->tokens_buf[0], increment parser->tokens.
428 (c_parser_consume_pragma): Likewise.
429 (enum pragma_context): Add pragma_struct and pragma_param.
430 (c_parser_external_declaration): Adjust
431 c_parser_declaration_or_fndef caller.
432 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
433 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
434 Adjust recursive call.
435 (c_parser_struct_or_union_specifier): Use pragma_struct instead
437 (c_parser_parameter_declaration): Use pragma_param instead of
439 (c_parser_compound_statement_nostart, c_parser_label,
440 c_parser_for_statement): Adjust
441 c_parser_declaration_or_fndef callers.
442 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
443 it through to c_parser_conditional_expression.
444 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
445 pass it through to c_parser_binary_expression. Adjust recursive
447 (c_parser_binary_expression): Remove prec argument, add
448 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
449 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
450 binop matches it, use build2 instead of parser_build_binary_op.
451 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
452 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
453 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
454 Handle pragma_struct and pragma_param the same as pragma_external.
455 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
456 (c_parser_omp_variable_list): Parse array sections for
457 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
458 (c_parser_omp_clause_collapse): Fully fold collapse expression.
459 (c_parser_omp_clause_reduction): Handle user defined reductions.
460 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
461 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
462 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
463 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
464 c_parser_omp_clause_depend, c_parser_omp_clause_map,
465 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
466 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
467 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
468 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
469 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
470 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
471 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
472 (c_parser_omp_for_loop): Add CODE argument, pass it through
473 to c_finish_omp_for. Change last argument to cclauses,
474 and adjust uses to grab parallel clauses from the array of all
475 the split clauses. Adjust c_parser_binary_expression,
476 c_parser_declaration_or_fndef and c_finish_omp_for callers.
477 (omp_split_clauses): New function.
478 (c_parser_omp_simd): New function.
479 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
480 Allow the function to be called also when parsing combined constructs,
481 and call c_parser_omp_simd when parsing for simd.
482 (c_parser_omp_sections_scope): If section-sequence doesn't start with
483 #pragma omp section, require exactly one structured-block instead of
484 sequence of statements.
485 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
486 Allow the function to be called also when parsing combined constructs.
487 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
488 Allow the function to be called also when parsing combined
490 (c_parser_omp_taskgroup, c_parser_omp_cancel,
491 c_parser_omp_cancellation_point, c_parser_omp_distribute,
492 c_parser_omp_teams, c_parser_omp_target_data,
493 c_parser_omp_target_update, c_parser_omp_target,
494 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
495 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
496 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
497 (c_parser_omp_construct): Add p_name and mask vars. Handle
498 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
499 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
500 and c_parser_omp_sections callers.
501 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
502 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
503 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
504 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
505 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
507 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
508 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
509 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
510 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
511 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
512 * c-typeck.c: Include tree-inline.h.
513 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
514 handle_omp_array_sections_1, handle_omp_array_sections,
515 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
516 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
517 user defined reductions.
518 (c_tree_equal): New function.
519 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
520 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
521 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
522 c_check_omp_declare_reduction_r): New prototypes.
523 * c-decl.c (current_omp_declare_target_attribute): New variable.
524 (c_decl_attributes): New function.
525 (start_decl, start_function): Use it instead of decl_attributes.
526 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
527 c_omp_reduction_decl, c_omp_reduction_lookup,
528 c_check_omp_declare_reduction_r): New functions.
530 2013-09-25 Tom Tromey <tromey@redhat.com>
532 * Make-lang.in (c/gccspec.o): Remove.
533 (CFLAGS-c/gccspec.o): New variable.
534 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
535 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
536 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
538 2013-09-25 Tom Tromey <tromey@redhat.com>
540 * Make-lang.in (c/gccspec.o): Don't use subshell.
542 2013-09-18 Marek Polacek <polacek@redhat.com>
545 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
546 Remove unnecessary check.
548 2013-09-18 Marek Polacek <polacek@redhat.com>
551 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
552 no_sanitize_undefined attribute.
554 2013-09-13 Kai Tietz <ktietz@redhat.com>
557 * c-decl.c (c_builtin_function_ext_scope): Remove
558 wrong assumption that it is never called on prexisting
561 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
563 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
565 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
567 * c-objc-common.c (c_tree_printer): Tidy.
569 2013-08-30 Marek Polacek <polacek@redhat.com>
571 * c-typeck.c (build_binary_op): Add division by zero and shift
574 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
575 Joseph Myers <joseph@codesourcery.com>
578 * c-typeck.c (c_common_type): Prefer double_type_node over
579 other REAL_TYPE types with the same precision.
580 (convert_arguments): Likewise.
582 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
584 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
585 (c_initialize_diagnostics): Call a destructor for the early printer.
587 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
589 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
590 printer initialization.
592 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
595 * c-array-notation.c (fix_conditional_array_notations_1): Added a
596 check for truth values.
597 (expand_array_notation_exprs): Added truth values case. Removed an
598 unwanted else. Added for-loop to walk through subtrees in default
601 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
603 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
605 2013-07-23 Joseph Myers <joseph@codesourcery.com>
607 * c-parser.c (struct c_generic_association): Fix typo.
609 2013-07-23 Tom Tromey <tromey@redhat.com>
610 Joseph Myers <joseph@codesourcery.com>
612 * c-parser.c (struct c_generic_association): New.
613 (c_generic_association_d): New typedef.
614 (c_parser_generic_selection): New function.
615 (c_parser_postfix_expression): Handle RID_GENERIC.
617 2013-07-13 Jason Merrill <jason@redhat.com>
620 * c-decl.c (finish_struct): Check for too-large class.
622 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
625 * c-typeck.c (set_init_index): When folding, check for index overflow.
627 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
629 * c-parser.c (c_parser_array_notation): Removed rejection of array
630 notations in an array of function pointers.
632 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
634 * c-array-notation.c (make_triplet_val_inv): New function.
635 (create_cmp_incr): Likewise.
636 (create_array_refs): Likewise.
637 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
638 Also modularized common parts between functions and called the function.
639 (build_array_notation_expr): Likewise.
640 (fix_conditional_array_notations_1): Likewise.
641 (fix_array_notation_expr): Likewise.
642 (fix_array_notation_call_expr): Likewise.
644 2013-06-18 Marek Polacek <polacek@redhat.com>
647 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
649 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
651 * c-array-notation.c (build_array_notation_expr): Reject array notation
652 mismatch between LHS and RHS even inside a call_expr. Also, removed
653 a couple while statements that were dead code.
655 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
657 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
658 excessive precision expressions in function parameters. Also removed
659 couple unwanted while statements.
661 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
663 * c-array-notation.c (expand_array_notation_exprs): Added
664 ARRAY_NOTATION_REF case.
666 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
668 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
669 function to c-family/array-notation-common.c.
670 (is_cilkplus_reduce_builtin): Likewise.
671 (find_rank): Likewise.
672 (extract_array_notation_exprs): Likewise.
673 (replace_array_notations): Likewise.
674 (find_inv_trees): Likewise.
675 (replace_inv_trees): Likewise.
676 (contains_array_notation_expr): Likewise.
677 (find_correct_array_notation_type): Likewise.
678 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
679 (struct inv_list): Moved this to c-family/array-notation-common.c.
680 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
682 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
684 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
685 reduction functions outside the for-loop. Added a check if the fundecl
686 is non-NULL. Finally, removed an unwanted if-statement, and made the
689 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
691 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
692 condition of the if-statement matches the rank of else-block and then-
693 block when array notations are used.
694 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
695 expression after the entire function body is parsed.
696 (c_parser_expr_no_commas): Delayed creating array notation expressions
697 to the end of function parsing.
698 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
699 whole if-statement instead of just the condition.
700 (expand_array_notation_exprs): Added MODIFY_EXPR case.
702 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
705 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
706 array to NULL_TREE if they are unused. Also added a check for the
707 field to be NULL before its fields are used in future.
709 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
712 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
713 (build_array_notation_expr): Likewise.
715 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
717 * c-typeck.c (build_array_ref): Added a check to see if array's
718 index is greater than one. If true, then emit an error.
719 (build_function_call_vec): Exclude error reporting and checking
720 for builtin array-notation functions.
721 (convert_arguments): Likewise.
722 (c_finish_return): Added a check for array notations as a return
723 expression. If true, then emit an error.
724 (c_finish_loop): Added a check for array notations in a loop
725 condition. If true then emit an error.
726 (lvalue_p): Added a ARRAY_NOTATION_REF case.
727 (build_binary_op): Added a check for array notation expr inside
728 op1 and op0. If present, we call another function to find correct
730 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
731 * c-parser.c (c_parser_compound_statement): Check if array
732 notation code is used in tree, if so, then transform them into
734 (c_parser_expr_no_commas): Check if array notation is used in LHS
735 or RHS, if so, then build array notation expression instead of
737 (c_parser_postfix_expression_after_primary): Added a check for
738 colon(s) after square braces, if so then handle it like an array
739 notation. Also, break up array notations in unary op if found.
740 (c_parser_direct_declarator_inner): Added a check for array
742 (c_parser_compound_statement): Added a check for array notation in
743 a stmt. If one is present, then expand array notation expr.
744 (c_parser_if_statement): Likewise.
745 (c_parser_switch_statement): Added a check for array notations in
746 a switch statement's condition. If true, then output an error.
747 (c_parser_while_statement): Similarly, but for a while.
748 (c_parser_do_statement): Similarly, but for a do-while.
749 (c_parser_for_statement): Similarly, but for a for-loop.
750 (c_parser_unary_expression): Check if array notation is used in a
751 pre-increment or pre-decrement expression. If true, then expand
753 (c_parser_array_notation): New function.
754 * c-array-notation.c: New file.
755 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
757 2013-05-23 Mike Stump <mikestump@comcast.net>
759 * c-typeck.c (convert_for_assignment): Handle references to memory
762 2013-05-16 Jason Merrill <jason@redhat.com>
764 * Make-lang.in (cc1$(exeext)): Use link mutex.
766 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
768 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
769 to simply use OPT_Wpointer_arith.
770 (build_unary_op): Likewise.
772 2013-04-03 Jakub Jelinek <jakub@redhat.com>
775 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
776 argument. If set, or it temporarily for parsing of the first
777 argument into force_folding_builtin_constant_p.
778 (c_parser_postfix_expression): Adjust callers.
780 2013-03-21 Richard Biener <rguenther@suse.de>
782 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
783 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
785 2013-02-12 Marek Polacek <polacek@redhat.com>
788 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
791 2013-01-24 Jakub Jelinek <jakub@redhat.com>
794 * c-typeck.c (set_nonincremental_init_from_string): If
795 constructor_max_index is NULL, treat it as if tree_int_cst_lt
797 (process_init_element): Likewise.
799 2012-12-20 Jakub Jelinek <jakub@redhat.com>
802 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
803 argument, don't call default_function_array_conversion
804 nor c_fully_fold here.
805 (c_parser_asm_statement): Adjust callers.
806 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
807 and outputs here, and call default_function_array_conversion
808 on inputs that don't need to be addressable.
810 2012-12-18 Jakub Jelinek <jakub@redhat.com>
813 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
814 warning require that both c_common_unsigned_type as well as
815 c_common_signed_type is the same for both mvl and mvr types.
817 2012-11-16 Diego Novillo <dnovillo@google.com>
819 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
821 * c-common.c: Use new vec API in vec.h.
822 * c-common.h: Likewise.
823 * c-gimplify.c: Likewise.
824 * c-pragma.c: Likewise.
825 * c-pretty-print.c: Likewise.
826 * c-pretty-print.h: Likewise.
827 * c-semantics.c: Likewise.
828 * c-decl.c: Likewise.
829 * c-parser.c: Likewise.
830 * c-tree.h: Likewise.
831 * c-typeck.c: Likewise.
833 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
836 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
838 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
841 * c-decl.c (warn_if_shadowing): Do not warn if a variable
842 shadows a function, unless the variable is a function or a
845 2012-10-12 Jakub Jelinek <jakub@redhat.com>
848 * c-parser.c (struct c_tree_loc_pair): Removed.
849 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
850 add location_t * and tree * arguments, fill in array of 3
851 sizeof_arg trees and corresponding locs.
852 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
853 c_parser_expr_list callers.
854 (c_parser_postfix_expression_after_primary): Likewise. Pass
855 array of 3 sizeof_arg trees and locs (corresponding to first
856 3 arguments) to sizeof_pointer_memaccess_warning.
858 2012-10-09 Lawrence Crowl <crowl@google.com>
860 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
861 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
864 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
867 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
870 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
873 * c-typeck.c: Include c-common.h.
874 (enum stv_conv): Moved to c-common.h.
875 (scalar_to_vector): Moved to c-common.c.
876 (build_binary_op): Adapt to scalar_to_vector's new prototype.
877 * Make-lang.in: c-typeck.c depends on c-common.h.
879 2012-10-04 Arnaud Charlet <charlet@adacore.com>
881 * c-decl.c (c_write_global_declarations): Fix handling of
884 2012-09-30 Sharad Singhai <singhai@google.com>
886 * c-decl.c (c_write_global_declarations): Use a different method
887 to determine if the dump has ben initialized.
889 2012-09-14 Joseph Myers <joseph@codesourcery.com>
892 * c-typeck.c (c_cast_expr): When casting to a type requiring
893 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
896 2012-09-14 Joseph Myers <joseph@codesourcery.com>
899 * c-typeck.c (build_unary_op): Pass original argument of
900 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
901 any C_MAYBE_CONST_EXPR, if it has integer operands.
902 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
903 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
904 to c_objc_common_truthvalue_conversion, then remove any
905 C_MAYBE_CONST_EXPR, if they have integer operands. Use
906 c_objc_common_truthvalue_conversion not
907 c_common_truthvalue_conversion.
908 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
909 call note_integer_operands for arguments with integer operands
910 that are not integer constants.
912 2012-09-13 Jakub Jelinek <jakub@redhat.com>
915 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
916 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
918 2012-08-31 Jakub Jelinek <jakub@redhat.com>
921 * c-convert.c (convert): Don't call fold_convert_loc if
922 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
923 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
924 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
926 2012-08-24 Jakub Jelinek <jakub@redhat.com>
929 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
930 for nested and empty_ok arguments in the call to
931 c_parser_declaration_or_fndef.
933 2012-08-17 Jakub Jelinek <jakub@redhat.com>
935 * c-tree.h (c_last_sizeof_arg): Declare.
936 * c-parser.c (struct c_tree_loc_pair): New type.
937 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
939 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
940 (c_parser_postfix_expression_after_primary): Likewise. Call
941 sizeof_pointer_memaccess_warning if needed.
942 (sizeof_ptr_memacc_comptypes): New function.
943 * c-typeck.c (c_last_sizeof_arg): New global variable.
944 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
946 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
948 * c-lang.h (lang_decl): Add variable_size GTY option.
950 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
952 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
953 * Make-lang.in: Fix dependencies.
955 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
957 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
958 and add language Makefile hooks.
959 * config-lang.in: New file.
960 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
961 add the required "normal" config-lang.in rules.
962 * c-lang.h: Moved from gcc/ to here.
963 * c-tree.h: Likewise.
964 * c-objc-common.c: Likewise.
965 * c-objc-common.h: Likewise.
966 * c-typeck.c: Likewise.
967 * c-convert.c: Likewise.
968 * c-lang.c: Likewise.
969 * c-aux-info.c: Likewise.
970 * c-errors.c: Likewise.
971 * gccspec.c: Likewise.
972 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
973 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
975 Copyright (C) 2012-2014 Free Software Foundation, Inc.
977 Copying and distribution of this file, with or without modification,
978 are permitted in any medium without royalty provided the copyright
979 notice and this notice are preserved.