1 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4 (c_parser_parameter_declaration): Likewise.
6 2014-02-19 Marek Polacek <polacek@redhat.com>
9 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
10 Call mark_exp_read on exp.value.
11 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
12 TREE_ADDRESSABLE on old instead of val.
13 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
15 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
17 * c-parser.c (c_parser_get_builtin_args): Replace calls to
18 C_EXPR_APPEND by vec_safe_push.
19 * c-tree.h (C_EXPR_APPEND): Remove.
21 2014-01-31 Marek Polacek <polacek@redhat.com>
24 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
25 build_function_call_vec.
26 (build_function_call): Likewise.
27 (build_atomic_assign): Likewise.
28 (build_function_call_vec): Add arg_loc parameter. Use it.
29 (convert_arguments): Likewise.
30 (convert_for_assignment): Rename rhs_loc to expr_loc.
31 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
32 (c_parser_objc_keywordexpr): Likewise.
33 (c_parser_postfix_expression_after_primary): Call
34 build_function_call_vec with expr_loc rather than op_loc.
35 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
36 build_function_call_vec.
37 (c_parser_expr_list): Add locations parameter. Fill it with locations
38 of function arguments.
39 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
41 2014-01-30 Marek Polacek <polacek@redhat.com>
44 * c-typeck.c (build_function_call_vec): Use loc parameter.
45 (convert_arguments): Add location parameter. Use it.
46 (ep_convert_and_check): Likewise.
47 (build_atomic_assign): Adjust convert_for_assignment call.
48 (build_modify_expr): Likewise.
49 (digest_init): Likewise.
50 (c_finish_return): Likewise.
51 (build_conditional_expr): Adjust ep_convert_and_check calls.
52 (convert_for_assignment): Add rhs_loc parameter. Use it.
53 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
56 2014-01-30 Richard Biener <rguenther@suse.de>
59 * c-typeck.c (build_function_call_vec): Do not replace calls
60 to a function via an incompatible type with a runtime abort.
62 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
64 * c-parser.c (c_parser_declaration_or_fndef): Replaced
65 flag_enable_cilkplus with flag_cilkplus.
66 (c_parser_direct_declarator_inner): Likewise.
67 (c_parser_attribute_any_word): Likewise.
68 (c_parser_attributes): Likewise.
69 (c_parser_compound_statement): Likewise.
70 (c_parser_statement_after_labels): Likewise.
71 (c_parser_if_statement): Likewise.
72 (c_parser_switch_statement): Likewise.
73 (c_parser_do_statement): Likewise.
74 (c_parser_for_statement): Likewise.
75 (c_parser_unary_expression): Likewise.
76 (c_parser_postfix_expression): Likewise.
77 (c_parser_postfix_expression_after_primary): Likewise.
78 (c_parser_postfix_expression_after_primary): Likewise.
79 (c_parser_omp_clause_name): Likewise.
80 (c_finish_omp_declare_simd): Likewise.
81 (c_parser_cilk_verify_simd): Likewise.
82 * c-typeck.c (build_array_ref): Likewise.
83 (build_function_call_vec): Likewise.
84 (convert_arguments): Likewise.
85 (build_compound_expr): Likewise.
86 (c_finish_return): Likewise.
87 (c_finish_if_stmt): Likewise.
88 (c_finish_loop): Likewise.
89 (build_binary_op): Likewise.
91 2014-01-23 Marek Polacek <polacek@redhat.com>
94 * c-typeck.c (parser_build_binary_op): Use location instead of
96 (build_binary_op): Pass location to shorten_compare.
98 2014-01-23 Marek Polacek <polacek@redhat.com>
101 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
104 2014-01-23 Marek Polacek <polacek@redhat.com>
107 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
108 of a comma expression.
109 (emit_side_effect_warnings): Likewise.
111 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
114 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
115 function to use walk_tree and moved a lot of its functionality to
116 expand_array_notations.
117 (expand_array_notations): New function.
119 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
121 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
122 attribute an attribute without value.
124 2014-01-23 Jakub Jelinek <jakub@redhat.com>
127 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
128 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
130 2014-01-22 Marek Polacek <polacek@redhat.com>
133 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
134 of remove_c_maybe_const_expr on op1 and op2.
136 2014-01-15 Jakub Jelinek <jakub@redhat.com>
139 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
140 effects, preevaluate rhs using SAVE_EXPR first.
142 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
145 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
146 statements with if-elseif statements.
148 2014-01-06 Marek Polacek <polacek@redhat.com>
151 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
152 defined bit-field types only in ISO C.
154 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
156 Update copyright years
158 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
160 * c-array-notation.c: Use the standard form for the copyright notice.
162 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
164 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
165 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
166 field in parser is not empty. If not-empty, call the function
167 c_parser_finish_omp_declare_simd.
168 (c_parser_cilk_clause_vectorlength): Modified function to be shared
169 between SIMD-enabled functions and #pragma simd. Added new parameter.
170 (c_parser_cilk_all_clauses): Modified the usage of the function
171 c_parser_cilk_clause_vectorlength as mentioned above.
172 (c_parser_cilk_simd_fn_vector_attrs): New function.
173 (c_finish_cilk_simd_fn_tokens): Likewise.
174 (is_cilkplus_vector_p): Likewise.
175 (c_parser_omp_clause_name): Added checking for "vectorlength,"
176 "nomask," and "mask" strings in clause name.
177 (c_parser_omp_all_clauses): Added 3 new case statements:
178 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
179 PRAGMA_CILK_CLAUSE_NOMASK.
180 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
181 check for vector attribute and if so call the function
182 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
183 called the function c_finish_cilk_simd_fn_tokens.
184 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
185 parser field is non-empty. If so, parse them as you would parse
186 the omp declare simd pragma.
187 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
188 Added a check when step is a parameter and flag it as error.
189 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
190 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
193 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
195 * c-parser.c (c_parser_omp_parallel): Fix description.
197 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
199 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
200 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
201 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
202 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
204 2013-12-04 Joseph Myers <joseph@codesourcery.com>
207 * c-parser.c (c_parser_alignas_specifier): Use
208 c_sizeof_or_alignof_type instead of c_alignof.
209 (c_parser_alignof_expression): Likewise, with min_alignof
210 parameter depending on alignof spelling used.
212 2013-12-04 Marek Polacek <polacek@redhat.com>
215 * c-decl.c (start_function): Don't warn for missing prototype for
218 2013-12-03 Marek Polacek <polacek@redhat.com>
221 * c-decl.c (build_compound_literal): Allow compound literals with
224 2013-12-02 Joseph Myers <joseph@codesourcery.com>
227 * c-typeck.c (build_modify_expr): Diagnose assignment to
228 expression with array type.
230 2013-11-29 Joseph Myers <joseph@codesourcery.com>
233 * c-typeck.c (process_init_element): Do not treat a string as
234 initializing a whole array when used with a designator for an
237 2013-11-29 Joseph Myers <joseph@codesourcery.com>
240 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
241 an inline function following a static declaration.
243 2013-11-28 Jakub Jelinek <jakub@redhat.com>
246 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
247 to p_name before calling c_parser_omp_teams instead of after.
248 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
249 argument. Remove unused p_name variable.
251 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
252 Jakub Jelinek <jakub@redhat.com>
254 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
255 external_scope is NULL.
257 2013-11-27 Tom de Vries <tom@codesourcery.com>
258 Marc Glisse <marc.glisse@inria.fr>
261 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
263 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
265 * c-typeck.c: Add required include files from gimple.h.
267 2013-11-22 David Malcolm <dmalcolm@redhat.com>
269 * c-decl.c (define_label, shadow_tag_warned)
270 (check_bitfield_type_and_width, grokdeclarator, grokparms,
271 store_parm_decls_newstyle, store_parm_decls_oldstyle)
272 (declspecs_add_type): Remove use of in_system_header macro.
273 * c-parser.c (c_parser_unary_expression): Likewise.
274 * c-typeck.c (store_init_value, process_init_element)
275 (c_start_case): Likewise.
277 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
280 * c-parser.c (c_parser_set_source_position_from_token): Remove
281 reference to in_system_header from comment.
283 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
285 * c-decl.c (grokdeclarator): Update comment to refer to
286 tree_to_[su]hwi rather than tree_low_cst.
288 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
290 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
291 tree_to_uhwi throughout.
293 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
295 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
298 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
300 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
303 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
305 * c-parser.c (c_parser_cilk_simd): New.
306 (c_parser_cilk_verify_simd): New.
307 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
308 (c_parser_omp_for_loop): Add case for NE_EXPR.
309 Set c_break_label for CILK_SIMD.
310 (c_parser_cilk_clause_vectorlength): New.
311 (c_parser_cilk_clause_linear): New.
312 (c_parser_cilk_clause_name): New.
313 (c_parser_cilk_all_clauses): New.
314 * c-typeck.c (build_unary_op): Pass location argument to
316 (build_modify_expr): Same.
317 (build_asm_expr): Same.
318 (c_finish_bc_stmt): Error on break/continue in loops.
320 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
322 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
324 2013-11-14 Diego Novillo <dnovillo@google.com>
326 * c-decl.c: Include print-tree.h.
327 Include stor-layout.h.
330 Include stringpool.h.
331 * c-lang.c: Include fold-const.h.
332 * c-parser.c: Include stringpool.h.
334 Include stor-layout.h.
337 * c-typeck.c: Include stor-layout.h.
342 2013-11-13 Joseph Myers <joseph@codesourcery.com>
344 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
345 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
347 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
348 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
350 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
351 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
352 (c_parser_declarator, c_parser_direct_declarator_inner)
353 (c_parser_parameter_declaration, c_parser_type_name): All callers
355 (c_parser_declaration_or_fndef): Handle declarations with type
356 determined from the initializer.
358 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
360 * c-typeck.c: Include gimplify.h.
362 2013-11-12 Joseph Myers <joseph@codesourcery.com>
364 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
365 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
367 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
368 or _Thread_local as appropriate in diagnostics.
369 (build_null_declspecs): Initialize ret->thread_gnu_p.
370 (declspecs_add_scspec): Handle either __thread or _Thread_local
371 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
372 pedantic. Do not disallow _Thread_local extern and _Thread_local
375 2013-11-07 Joseph Myers <joseph@codesourcery.com>
376 Andrew MacLeod <amacleod@redhat.com>
378 * c-aux-info.c (gen_type): Handle atomic qualifier.
379 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
380 qualifiers when compating types.
381 (shadow_tag_warned): Handle atomic_p in declspecs.
382 (quals_from_declspecs): Likewise.
383 (start_decl): Use c_type_promotes_to when promoting argument
385 (grokdeclarator): Handle _Atomic.
386 (get_parm_info): Diagnose any qualifier on "void" as only
388 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
389 comparing types. Use c_type_promotes_to when promoting argument
391 (finish_function): Use c_type_promotes_to when promoting argument
393 (build_null_declspecs): Handle atomic_p in declspecs.
394 (declspecs_add_qual): Handle RID_ATOMIC.
395 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
396 (c_token_starts_declspecs): Handle RID_ATOMIC.
397 (c_parser_declspecs): Handle atomic type specifiers and
399 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
400 from types of expressions with atomic type.
401 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
402 (c_parser_attribute_any_word): Handle RID_ATOMIC.
403 (c_parser_initializer, c_parser_initelt, c_parser_initval)
404 (c_parser_statement_after_labels, c_parser_switch_statement)
405 (c_parser_for_statement, c_parser_expr_no_commas)
406 (c_parser_conditional_expression, c_parser_binary_expression)
407 (c_parser_cast_expression, c_parser_unary_expression)
408 (c_parser_postfix_expression)
409 (c_parser_postfix_expression_after_primary, c_parser_expression):
410 Use convert_lvalue_to_rvalue.
411 (c_parser_expression_conv, c_parser_expr_list): Document
412 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
413 (c_parser_objc_synchronized_statement): Use
414 convert_lvalue_to_rvalue.
415 (c_parser_objc_selector): Handle RID_ATOMIC.
416 (c_parser_objc_receiver, c_parser_array_notation): Use
417 convert_lvalue_to_rvalue.
418 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
420 (struct c_declspecs): Add atomic_p field.
421 (convert_lvalue_to_rvalue): Declare.
422 * c-typeck.c (c_type_promotes_to): Promote atomic types to
423 corresponding atomic types.
424 (qualify_type): Don't add _Atomic qualifiers from second argument.
425 (comp_target_types): Do not allow _Atomic mismatches.
426 (type_lists_compatible_p): Do not remove atomic qualifiers when
428 (really_atomic_lvalue, convert_lvalue_to_rvalue)
429 (build_atomic_assign): New functions.
430 (build_unary_op): Use build_atomic_assign for atomic increment and
432 (build_conditional_expr): Do not treat _Atomic void as a qualified
434 (build_modify_expr): Use build_atomic_assign for atomic LHS.
435 (find_anonymous_field_with_type, convert_to_anonymous_field)
436 (convert_for_assignment): Do not remove atomic qualifiers when
438 (digest_init): Do not accept initialization of arrays of atomic
439 elements by string constants.
440 (build_asm_expr): Use convert_lvalue_to_rvalue.
441 (build_binary_op): Do not treat _Atomic void as a qualified
444 2013-11-06 DJ Delorie <dj@redhat.com>
446 * c-decl.c (locate_old_decl): If a previous conflicting decl is
447 both explicit and builtin, print the location of the explicit one.
449 2013-11-05 Tobias Burnus <burnus@net-b.de>
451 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
452 c_parser_omp_distribute, c_parser_omp_teams,
453 c_parser_omp_target, c_parser_omp_declare): Handle
456 2013-11-03 Marek Polacek <polacek@redhat.com>
458 * c-decl.c (grokdeclarator): Add VLA instrumentation.
460 2013-11-01 Jakub Jelinek <jakub@redhat.com>
462 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
463 check_dup_generic at the end, unless remove is true.
464 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
466 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
468 2013-10-31 Jakub Jelinek <jakub@redhat.com>
470 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
471 with decl that is not pointer nor array.
473 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
475 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
476 a spawning function is found.
477 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
478 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
479 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
480 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
482 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
483 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
485 (c_finish_return): Added a check to reject _Cilk_spawn in return
487 (build_cilk_spawn): New function.
488 (build_cilk_sync): Likewise.
489 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
491 2013-10-27 Tobias Burnus <burnus@net-b.de>
494 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
495 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
496 (c_parser_statement_after_labels): Update calls.
498 2013-10-24 Tobias Burnus <burnus@net-b.de>
501 * c-parser.c (c_parser_pragma, c_parser_for_statement):
503 (c_parser_statement_after_labels): Update call.
505 2013-10-24 Marek Polacek <polacek@redhat.com>
507 * c-parser.c (c_parser_struct_declaration): Add a comment.
508 (c_parser_declarator): Don't allow _Alignas here.
510 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
512 * c-parser.c: Include omp-low.h.
513 * c-typeck.c: Likewise.
515 2013-10-17 Marek Polacek <polacek@redhat.com>
518 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
519 Document syntax of the array-declarator.
520 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
522 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
523 (c_parser_struct_declaration): Likewise.
524 (c_parser_declarator): Likewise.
525 (c_parser_direct_declarator_inner): Likewise.
526 (c_parser_parameter_declaration): Likewise.
527 (c_parser_type_name): Likewise.
529 2013-10-11 Jakub Jelinek <jakub@redhat.com>
531 * c-lang.h (current_omp_declare_target_attribute): New extern
533 * c-parser.c: Include c-lang.h.
534 (struct c_parser): Change tokens to c_token *.
535 Add tokens_buf field. Change tokens_avail type to unsigned int.
536 (c_parser_consume_token): If parser->tokens isn't
537 &parser->tokens_buf[0], increment parser->tokens.
538 (c_parser_consume_pragma): Likewise.
539 (enum pragma_context): Add pragma_struct and pragma_param.
540 (c_parser_external_declaration): Adjust
541 c_parser_declaration_or_fndef caller.
542 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
543 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
544 Adjust recursive call.
545 (c_parser_struct_or_union_specifier): Use pragma_struct instead
547 (c_parser_parameter_declaration): Use pragma_param instead of
549 (c_parser_compound_statement_nostart, c_parser_label,
550 c_parser_for_statement): Adjust
551 c_parser_declaration_or_fndef callers.
552 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
553 it through to c_parser_conditional_expression.
554 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
555 pass it through to c_parser_binary_expression. Adjust recursive
557 (c_parser_binary_expression): Remove prec argument, add
558 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
559 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
560 binop matches it, use build2 instead of parser_build_binary_op.
561 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
562 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
563 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
564 Handle pragma_struct and pragma_param the same as pragma_external.
565 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
566 (c_parser_omp_variable_list): Parse array sections for
567 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
568 (c_parser_omp_clause_collapse): Fully fold collapse expression.
569 (c_parser_omp_clause_reduction): Handle user defined reductions.
570 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
571 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
572 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
573 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
574 c_parser_omp_clause_depend, c_parser_omp_clause_map,
575 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
576 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
577 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
578 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
579 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
580 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
581 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
582 (c_parser_omp_for_loop): Add CODE argument, pass it through
583 to c_finish_omp_for. Change last argument to cclauses,
584 and adjust uses to grab parallel clauses from the array of all
585 the split clauses. Adjust c_parser_binary_expression,
586 c_parser_declaration_or_fndef and c_finish_omp_for callers.
587 (omp_split_clauses): New function.
588 (c_parser_omp_simd): New function.
589 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
590 Allow the function to be called also when parsing combined constructs,
591 and call c_parser_omp_simd when parsing for simd.
592 (c_parser_omp_sections_scope): If section-sequence doesn't start with
593 #pragma omp section, require exactly one structured-block instead of
594 sequence of statements.
595 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
596 Allow the function to be called also when parsing combined constructs.
597 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
598 Allow the function to be called also when parsing combined
600 (c_parser_omp_taskgroup, c_parser_omp_cancel,
601 c_parser_omp_cancellation_point, c_parser_omp_distribute,
602 c_parser_omp_teams, c_parser_omp_target_data,
603 c_parser_omp_target_update, c_parser_omp_target,
604 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
605 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
606 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
607 (c_parser_omp_construct): Add p_name and mask vars. Handle
608 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
609 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
610 and c_parser_omp_sections callers.
611 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
612 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
613 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
614 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
615 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
617 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
618 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
619 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
620 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
621 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
622 * c-typeck.c: Include tree-inline.h.
623 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
624 handle_omp_array_sections_1, handle_omp_array_sections,
625 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
626 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
627 user defined reductions.
628 (c_tree_equal): New function.
629 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
630 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
631 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
632 c_check_omp_declare_reduction_r): New prototypes.
633 * c-decl.c (current_omp_declare_target_attribute): New variable.
634 (c_decl_attributes): New function.
635 (start_decl, start_function): Use it instead of decl_attributes.
636 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
637 c_omp_reduction_decl, c_omp_reduction_lookup,
638 c_check_omp_declare_reduction_r): New functions.
640 2013-09-25 Tom Tromey <tromey@redhat.com>
642 * Make-lang.in (c/gccspec.o): Remove.
643 (CFLAGS-c/gccspec.o): New variable.
644 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
645 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
646 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
648 2013-09-25 Tom Tromey <tromey@redhat.com>
650 * Make-lang.in (c/gccspec.o): Don't use subshell.
652 2013-09-18 Marek Polacek <polacek@redhat.com>
655 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
656 Remove unnecessary check.
658 2013-09-18 Marek Polacek <polacek@redhat.com>
661 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
662 no_sanitize_undefined attribute.
664 2013-09-13 Kai Tietz <ktietz@redhat.com>
667 * c-decl.c (c_builtin_function_ext_scope): Remove
668 wrong assumption that it is never called on prexisting
671 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
673 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
675 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
677 * c-objc-common.c (c_tree_printer): Tidy.
679 2013-08-30 Marek Polacek <polacek@redhat.com>
681 * c-typeck.c (build_binary_op): Add division by zero and shift
684 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
685 Joseph Myers <joseph@codesourcery.com>
688 * c-typeck.c (c_common_type): Prefer double_type_node over
689 other REAL_TYPE types with the same precision.
690 (convert_arguments): Likewise.
692 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
694 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
695 (c_initialize_diagnostics): Call a destructor for the early printer.
697 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
699 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
700 printer initialization.
702 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
705 * c-array-notation.c (fix_conditional_array_notations_1): Added a
706 check for truth values.
707 (expand_array_notation_exprs): Added truth values case. Removed an
708 unwanted else. Added for-loop to walk through subtrees in default
711 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
713 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
715 2013-07-23 Joseph Myers <joseph@codesourcery.com>
717 * c-parser.c (struct c_generic_association): Fix typo.
719 2013-07-23 Tom Tromey <tromey@redhat.com>
720 Joseph Myers <joseph@codesourcery.com>
722 * c-parser.c (struct c_generic_association): New.
723 (c_generic_association_d): New typedef.
724 (c_parser_generic_selection): New function.
725 (c_parser_postfix_expression): Handle RID_GENERIC.
727 2013-07-13 Jason Merrill <jason@redhat.com>
730 * c-decl.c (finish_struct): Check for too-large class.
732 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
735 * c-typeck.c (set_init_index): When folding, check for index overflow.
737 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
739 * c-parser.c (c_parser_array_notation): Removed rejection of array
740 notations in an array of function pointers.
742 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
744 * c-array-notation.c (make_triplet_val_inv): New function.
745 (create_cmp_incr): Likewise.
746 (create_array_refs): Likewise.
747 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
748 Also modularized common parts between functions and called the function.
749 (build_array_notation_expr): Likewise.
750 (fix_conditional_array_notations_1): Likewise.
751 (fix_array_notation_expr): Likewise.
752 (fix_array_notation_call_expr): Likewise.
754 2013-06-18 Marek Polacek <polacek@redhat.com>
757 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
759 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
761 * c-array-notation.c (build_array_notation_expr): Reject array notation
762 mismatch between LHS and RHS even inside a call_expr. Also, removed
763 a couple while statements that were dead code.
765 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
767 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
768 excessive precision expressions in function parameters. Also removed
769 couple unwanted while statements.
771 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
773 * c-array-notation.c (expand_array_notation_exprs): Added
774 ARRAY_NOTATION_REF case.
776 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
778 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
779 function to c-family/array-notation-common.c.
780 (is_cilkplus_reduce_builtin): Likewise.
781 (find_rank): Likewise.
782 (extract_array_notation_exprs): Likewise.
783 (replace_array_notations): Likewise.
784 (find_inv_trees): Likewise.
785 (replace_inv_trees): Likewise.
786 (contains_array_notation_expr): Likewise.
787 (find_correct_array_notation_type): Likewise.
788 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
789 (struct inv_list): Moved this to c-family/array-notation-common.c.
790 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
792 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
794 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
795 reduction functions outside the for-loop. Added a check if the fundecl
796 is non-NULL. Finally, removed an unwanted if-statement, and made the
799 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
801 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
802 condition of the if-statement matches the rank of else-block and then-
803 block when array notations are used.
804 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
805 expression after the entire function body is parsed.
806 (c_parser_expr_no_commas): Delayed creating array notation expressions
807 to the end of function parsing.
808 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
809 whole if-statement instead of just the condition.
810 (expand_array_notation_exprs): Added MODIFY_EXPR case.
812 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
815 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
816 array to NULL_TREE if they are unused. Also added a check for the
817 field to be NULL before its fields are used in future.
819 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
822 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
823 (build_array_notation_expr): Likewise.
825 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
827 * c-typeck.c (build_array_ref): Added a check to see if array's
828 index is greater than one. If true, then emit an error.
829 (build_function_call_vec): Exclude error reporting and checking
830 for builtin array-notation functions.
831 (convert_arguments): Likewise.
832 (c_finish_return): Added a check for array notations as a return
833 expression. If true, then emit an error.
834 (c_finish_loop): Added a check for array notations in a loop
835 condition. If true then emit an error.
836 (lvalue_p): Added a ARRAY_NOTATION_REF case.
837 (build_binary_op): Added a check for array notation expr inside
838 op1 and op0. If present, we call another function to find correct
840 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
841 * c-parser.c (c_parser_compound_statement): Check if array
842 notation code is used in tree, if so, then transform them into
844 (c_parser_expr_no_commas): Check if array notation is used in LHS
845 or RHS, if so, then build array notation expression instead of
847 (c_parser_postfix_expression_after_primary): Added a check for
848 colon(s) after square braces, if so then handle it like an array
849 notation. Also, break up array notations in unary op if found.
850 (c_parser_direct_declarator_inner): Added a check for array
852 (c_parser_compound_statement): Added a check for array notation in
853 a stmt. If one is present, then expand array notation expr.
854 (c_parser_if_statement): Likewise.
855 (c_parser_switch_statement): Added a check for array notations in
856 a switch statement's condition. If true, then output an error.
857 (c_parser_while_statement): Similarly, but for a while.
858 (c_parser_do_statement): Similarly, but for a do-while.
859 (c_parser_for_statement): Similarly, but for a for-loop.
860 (c_parser_unary_expression): Check if array notation is used in a
861 pre-increment or pre-decrement expression. If true, then expand
863 (c_parser_array_notation): New function.
864 * c-array-notation.c: New file.
865 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
867 2013-05-23 Mike Stump <mikestump@comcast.net>
869 * c-typeck.c (convert_for_assignment): Handle references to memory
872 2013-05-16 Jason Merrill <jason@redhat.com>
874 * Make-lang.in (cc1$(exeext)): Use link mutex.
876 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
878 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
879 to simply use OPT_Wpointer_arith.
880 (build_unary_op): Likewise.
882 2013-04-03 Jakub Jelinek <jakub@redhat.com>
885 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
886 argument. If set, or it temporarily for parsing of the first
887 argument into force_folding_builtin_constant_p.
888 (c_parser_postfix_expression): Adjust callers.
890 2013-03-21 Richard Biener <rguenther@suse.de>
892 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
893 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
895 2013-02-12 Marek Polacek <polacek@redhat.com>
898 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
901 2013-01-24 Jakub Jelinek <jakub@redhat.com>
904 * c-typeck.c (set_nonincremental_init_from_string): If
905 constructor_max_index is NULL, treat it as if tree_int_cst_lt
907 (process_init_element): Likewise.
909 2012-12-20 Jakub Jelinek <jakub@redhat.com>
912 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
913 argument, don't call default_function_array_conversion
914 nor c_fully_fold here.
915 (c_parser_asm_statement): Adjust callers.
916 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
917 and outputs here, and call default_function_array_conversion
918 on inputs that don't need to be addressable.
920 2012-12-18 Jakub Jelinek <jakub@redhat.com>
923 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
924 warning require that both c_common_unsigned_type as well as
925 c_common_signed_type is the same for both mvl and mvr types.
927 2012-11-16 Diego Novillo <dnovillo@google.com>
929 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
931 * c-common.c: Use new vec API in vec.h.
932 * c-common.h: Likewise.
933 * c-gimplify.c: Likewise.
934 * c-pragma.c: Likewise.
935 * c-pretty-print.c: Likewise.
936 * c-pretty-print.h: Likewise.
937 * c-semantics.c: Likewise.
938 * c-decl.c: Likewise.
939 * c-parser.c: Likewise.
940 * c-tree.h: Likewise.
941 * c-typeck.c: Likewise.
943 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
946 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
948 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
951 * c-decl.c (warn_if_shadowing): Do not warn if a variable
952 shadows a function, unless the variable is a function or a
955 2012-10-12 Jakub Jelinek <jakub@redhat.com>
958 * c-parser.c (struct c_tree_loc_pair): Removed.
959 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
960 add location_t * and tree * arguments, fill in array of 3
961 sizeof_arg trees and corresponding locs.
962 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
963 c_parser_expr_list callers.
964 (c_parser_postfix_expression_after_primary): Likewise. Pass
965 array of 3 sizeof_arg trees and locs (corresponding to first
966 3 arguments) to sizeof_pointer_memaccess_warning.
968 2012-10-09 Lawrence Crowl <crowl@google.com>
970 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
971 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
974 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
977 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
980 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
983 * c-typeck.c: Include c-common.h.
984 (enum stv_conv): Moved to c-common.h.
985 (scalar_to_vector): Moved to c-common.c.
986 (build_binary_op): Adapt to scalar_to_vector's new prototype.
987 * Make-lang.in: c-typeck.c depends on c-common.h.
989 2012-10-04 Arnaud Charlet <charlet@adacore.com>
991 * c-decl.c (c_write_global_declarations): Fix handling of
994 2012-09-30 Sharad Singhai <singhai@google.com>
996 * c-decl.c (c_write_global_declarations): Use a different method
997 to determine if the dump has ben initialized.
999 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1002 * c-typeck.c (c_cast_expr): When casting to a type requiring
1003 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1006 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1009 * c-typeck.c (build_unary_op): Pass original argument of
1010 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1011 any C_MAYBE_CONST_EXPR, if it has integer operands.
1012 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1013 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1014 to c_objc_common_truthvalue_conversion, then remove any
1015 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1016 c_objc_common_truthvalue_conversion not
1017 c_common_truthvalue_conversion.
1018 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1019 call note_integer_operands for arguments with integer operands
1020 that are not integer constants.
1022 2012-09-13 Jakub Jelinek <jakub@redhat.com>
1025 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1026 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1028 2012-08-31 Jakub Jelinek <jakub@redhat.com>
1031 * c-convert.c (convert): Don't call fold_convert_loc if
1032 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1033 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1034 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1036 2012-08-24 Jakub Jelinek <jakub@redhat.com>
1039 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1040 for nested and empty_ok arguments in the call to
1041 c_parser_declaration_or_fndef.
1043 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1045 * c-tree.h (c_last_sizeof_arg): Declare.
1046 * c-parser.c (struct c_tree_loc_pair): New type.
1047 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1049 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1050 (c_parser_postfix_expression_after_primary): Likewise. Call
1051 sizeof_pointer_memaccess_warning if needed.
1052 (sizeof_ptr_memacc_comptypes): New function.
1053 * c-typeck.c (c_last_sizeof_arg): New global variable.
1054 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1056 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1058 * c-lang.h (lang_decl): Add variable_size GTY option.
1060 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1062 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1063 * Make-lang.in: Fix dependencies.
1065 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1067 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1068 and add language Makefile hooks.
1069 * config-lang.in: New file.
1070 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1071 add the required "normal" config-lang.in rules.
1072 * c-lang.h: Moved from gcc/ to here.
1073 * c-tree.h: Likewise.
1074 * c-objc-common.c: Likewise.
1075 * c-objc-common.h: Likewise.
1076 * c-typeck.c: Likewise.
1077 * c-convert.c: Likewise.
1078 * c-lang.c: Likewise.
1079 * c-aux-info.c: Likewise.
1080 * c-errors.c: Likewise.
1081 * gccspec.c: Likewise.
1082 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1083 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1085 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1087 Copying and distribution of this file, with or without modification,
1088 are permitted in any medium without royalty provided the copyright
1089 notice and this notice are preserved.