1 2014-10-03 Marek Polacek <polacek@redhat.com>
4 * c-decl.c (pop_scope): Don't warn about "inline function declared
5 but never defined" for functions marked with gnu_inline attribute.
7 2014-09-25 Jakub Jelinek <jakub@redhat.com>
10 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
11 on low_bound and length.
13 2014-09-24 Marek Polacek <polacek@redhat.com>
17 * c-parser.c: Don't define CPP_KEYWORD.
18 (c_parser_switch_statement): Pass original type to c_finish_case.
19 * c-tree.h (c_finish_case): Update declaration.
20 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
21 conditionally to c_do_switch_warnings.
23 2014-09-03 Marek Polacek <polacek@redhat.com>
26 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
29 2014-09-02 Jakub Jelinek <jakub@redhat.com>
30 Balaji V. Iyer <balaji.v.iyer@intel.com>
31 Igor Zamyatin <igor.zamyatin@intel.com>
33 * c-parser.c (c_parser_cilk_for): New function.
34 (c_parser_cilk_grainsize): Likewise.
35 (c_get_temp_regvar): Likewise.
36 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
37 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
38 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
39 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
42 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
44 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
45 with using HOST_WIDE_INT without truncation to 'int'
47 2014-08-22 Marek Polacek <polacek@redhat.com>
50 * c-typeck.c (parser_build_binary_op): Adjust call to
51 warn_logical_not_parentheses.
53 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
56 * c-parser.c (c_parser_array_notation): Check for correct
57 type of an array added.
59 2014-08-19 Marek Polacek <polacek@redhat.com>
62 * c-typeck.c (build_binary_op): If either operand of a comparison
63 is a boolean expression, call maybe_warn_bool_compare.
65 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
68 * c-typeck.c (build_c_cast): Do a conversion even when the
69 TYPE_MAIN_VARIANTs are the same.
71 2014-08-19 Marek Polacek <polacek@redhat.com>
73 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
74 pedwarn_c99 instead of pedwarn.
75 (grokfield): Likewise.
76 (warn_defaults_to): New function.
77 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
78 Unconditionally call pedwarn_c99 instead of pedwarn.
79 (start_function): Call warn_defaults_to instead of pedwarn_c99.
80 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
81 check flag_isoc11 before.
82 * c-errors.c (pedwarn_c99): Change the return type to bool.
83 Handle -Wc99-c11-compat.
84 * c-parser.c (disable_extension_diagnostics): Handle
86 (restore_extension_diagnostics): Likewise.
87 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
88 instead of pedwarn, don't check flag_isoc11 before.
89 (c_parser_declspecs): Likewise.
90 (c_parser_alignas_specifier): Likewise.
91 (c_parser_alignof_expression): Likewise.
92 (c_parser_generic_selection): Likewise.
93 * c-tree.h (pedwarn_c99): Update declaration.
94 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
97 2014-08-19 Marek Polacek <polacek@redhat.com>
99 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
101 * c-errors.c: Include "opts.h".
102 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
103 * c-parser.c (disable_extension_diagnostics): Handle negative value
104 of warn_c90_c99_compat, too.
105 (restore_extension_diagnostics): Likewise.
106 (c_parser_compound_statement_nostart): Pass
107 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
109 2014-08-12 Marek Polacek <polacek@redhat.com>
111 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
113 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
115 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
117 2014-08-10 Marek Polacek <polacek@redhat.com>
120 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
121 Call pedwarn_c90 instead of pedwarn.
122 (check_bitfield_type_and_width): Likewise.
123 (declspecs_add_qual): Likewise.
124 (declspecs_add_type): Likewise.
125 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
126 Adjust to only call pedwarn_c90.
127 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
128 pedwarn_c90 instead of pedwarn.
129 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
130 * c-parser.c (disable_extension_diagnostics): Handle
132 (restore_extension_diagnostics): Likewise.
133 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
134 pedwarn_c90 instead of pedwarn.
135 (c_parser_initelt): Likewise.
136 (c_parser_postfix_expression): Likewise.
137 (c_parser_postfix_expression_after_paren_type): Likewise.
138 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
139 * c-tree.h: Fix formatting.
140 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
141 pedwarn_c90 instead of pedwarn.
143 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
145 * c-typeck.c: Remove include of pointer-set.h.
147 2014-08-07 Marek Polacek <polacek@redhat.com>
149 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
151 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
153 * c-typeck.c: Use hash_map instead of pointer_map.
155 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
157 * c-decl.c: Use hash_set instead of pointer_set.
159 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
162 * c-array-notation.c (expand_array_notations): Handling
165 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
168 * c-typeck.c (c_finish_return): Return 0 instead of the address of
171 2014-07-30 Tom Tromey <tromey@redhat.com>
173 * c-typeck.c (struct constructor_stack) <designator_depth>: New
175 (really_start_incremental_init, push_init_level): Initialize
177 (pop_init_level): Set global designator_depth.
178 (process_init_element): Check for designated_init attribute.
180 2014-07-20 Marek Polacek <polacek@redhat.com>
183 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
184 (implicitly_declare): Pass location to implicit_decl_warning.
186 2014-07-14 Jakub Jelinek <jakub@redhat.com>
189 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
190 If non-NULL, call c_parser_check_literal_zero.
191 (c_parser_check_literal_zero): New function.
192 (c_parser_postfix_expression_after_primary): Adjust
193 c_parser_expr_list caller, handle -Wmemset-transposed-args.
195 2014-07-06 Marek Polacek <polacek@redhat.com>
198 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
199 * c-tree.h (C_ARRAY_PARAMETER): Define.
200 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
203 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
204 Chen Gang <gang.chen.5i5j@gmail.com>
206 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
209 2014-07-01 Marek Polacek <polacek@redhat.com>
211 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
212 instead of 0 to WARN_FOR_ASSIGNMENT.
214 2014-07-01 Marek Polacek <polacek@redhat.com>
217 * c-typeck.c (convert_for_assignment): Pass
218 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
220 2014-06-30 Marek Polacek <polacek@redhat.com>
222 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
223 has no_sanitize_undefined attribute.
225 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
228 * c-array-notation.c (fix_builtin_array_notation_fn):
229 Check for 0 arguments in builtin call. Check that bultin argument is
231 * c-parser.c (c_parser_array_notation): Check for incorrect initial
234 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
236 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
237 qualifiers in __auto_type for atomic types.
238 (c_parser_typeof_specifier): Discard all type qualifiers in
239 __typeof__ for atomic types.
241 2014-06-25 Marek Polacek <polacek@redhat.com>
244 * c-parser.c (c_parser_statement_after_labels): Pass the location of
245 the return expression to c_finish_return.
247 2014-06-25 Jakub Jelinek <jakub@redhat.com>
249 * c-typeck.c (c_finish_omp_clauses): Make sure
250 OMP_CLAUSE_LINEAR_STEP has correct type.
252 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
256 2014-06-24 Jakub Jelinek <jakub@redhat.com>
258 * c-parser.c (c_parser_omp_for_loop): For
259 #pragma omp parallel for simd move lastprivate clause from parallel
260 to for rather than simd.
262 2014-06-23 Marek Polacek <polacek@redhat.com>
264 * c-typeck.c (parser_build_binary_op): Don't call
265 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
267 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
269 * c-parser.c (c_parser_omp_threadprivate): Likewise.
270 * c-decl.c (merge_decls): Likewise.
272 2014-06-09 Marek Polacek <polacek@redhat.com>
275 * c-typeck.c (error_init): Call inform instead of error_at.
276 (pedwarn_init): Call inform instead of pedwarn.
277 (warning_init): Call inform instead of warning_at.
279 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
281 * c-decl.c (merge_decls): Use set_decl_section_name.
282 (duplicate_decls): Remove node if it exists.
284 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
287 * c-typeck.c (push_init_level, process_init_element,
288 pop_init_level): Correct check for zero initialization, move
289 missing brace warning to respect zero initialization.
291 2014-06-05 Marek Polacek <polacek@redhat.com>
294 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
296 2014-06-05 Marek Polacek <polacek@redhat.com>
299 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
300 on the left hand side operand of a comparison.
302 2014-06-05 Marek Polacek <polacek@redhat.com>
305 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
306 Print note only if the warning was printed.
308 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
311 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
314 2014-06-03 Marek Polacek <polacek@redhat.com>
317 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
319 * c-tree.h (c_start_case): Update.
320 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
321 switch condition has boolean value.
323 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
325 * c-decl.c: Include builtins.h.
326 * c-parser.c: Likewise.
328 2014-05-27 Marek Polacek <polacek@redhat.com>
331 * c-typeck.c (convert_arguments): Get location of a parameter. Change
332 error and warning calls to error_at and warning_at. Pass location of
333 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
334 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
335 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
337 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
340 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
343 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
345 * c-decl.c (merge_decls): Preserve symtab node pointers.
346 (duplicate_decls): Free new decl.
348 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
350 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
353 * c-parser.c (c_parser_omp_target): Return bool values.
355 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
357 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
358 num_teams_loc variable to num_thread_limit_loc.
360 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
362 * c-array-notation.c (expand_array_notations): Use void_node
363 instead of void_zero_node.
365 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
367 * c-decl.c (finish_struct): Adjust.
368 (finish_enum): Likewise.
370 (record_inline_static): Likewise.
371 (push_scope): Likewise.
372 (make_label): Likewise.
373 (lookup_label_for_goto): Likewise.
374 (finish_struct): Likewise.
375 (finish_enum): Likewise.
376 (store_parm_decls): Likewise.
377 (c_push_function_context): Likewise.
378 * c-lang.h: Remove usage of variable_size gty attribute.
379 * c-parser.c (c_parse_init): Adjust.
380 (c_parse_file): Likewise.
382 2014-05-13 Marek Polacek <polacek@redhat.com>
385 * c-typeck.c (convert_for_assignment): Pass location to
386 WARN_FOR_ASSIGNMENT instead of input_location.
388 2014-05-10 Marek Polacek <polacek@redhat.com>
390 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
391 maybe_warn_string_init.
392 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
393 maybe_warn_string_init.
394 * c-tree.h (maybe_warn_string_init): Update declaration.
395 * c-typeck.c (maybe_warn_string_init): Add location parameter.
396 Call pedwarn_init with loc instead of with input_location.
397 (digest_init): Pass init_loc to maybe_warn_string_init.
398 (pop_init_level): Call pedwarn_init with loc instead of with
400 (set_init_index): Likewise.
401 (process_init_element): Likewise.
403 2014-05-09 Marek Polacek <polacek@redhat.com>
406 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
407 (c_parser_initelt): Pass location to set_init_label. Pass array index
408 location to set_init_index.
409 * c-tree.h (push_init_level): Update declaration.
410 (pop_init_level): Likewise.
411 (set_init_index): Likewise.
412 (set_init_label): Likewise.
413 * c-typeck.c (error_init): Add location parameter. Call error_at
415 (digest_init): Pass init_loc to error_init.
416 (really_start_incremental_init):
417 (push_init_level): Add location parameter. Pass loc to pop_init_level
419 (pop_init_level): Likewise.
420 (set_designator): Add location parameter. Pass loc to pop_init_level,
421 push_init_level, and error_init.
422 (set_init_index): Add location parameter. Pass loc to error_init and
424 (set_init_label): Likewise.
425 (output_init_element): Pass loc to error_init.
426 (process_init_element): Pass loc to error_init, pop_init_level,
427 pedwarn_init, and push_init_level.
429 2014-05-09 Marek Polacek <polacek@redhat.com>
432 * c-parser.c (c_parser_attributes): Parse the arguments as an
433 expression-list if the attribute takes identifier.
435 2014-05-08 Marek Polacek <polacek@redhat.com>
438 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
441 2014-05-08 Marek Polacek <polacek@redhat.com>
444 * c-decl.c (start_function): Warn for _Atomic-qualified return type
447 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
448 Mike Stump <mikestump@comcast.net>
449 Richard Sandiford <rdsandiford@googlemail.com>
451 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
452 (finish_enum): Use wide-int interfaces.
453 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
454 * c-typeck.c (build_c_cast): Likewise.
455 (set_nonincremental_init_from_string): Likewise.
456 (c_tree_equal): Likewise.
458 2014-05-02 Marek Polacek <polacek@redhat.com>
461 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
462 Return size_one_node when the type is not complete.
463 (pointer_diff): Remove comment.
464 (build_unary_op): Improve error messages.
466 2014-05-02 Marek Polacek <polacek@redhat.com>
468 * c-typeck.c (c_finish_return): Separate warning_at calls.
470 2014-05-02 Marek Polacek <polacek@redhat.com>
472 * c-tree.h (error_init): Remove declaration.
473 (pedwarn_init): Likewise.
474 * c-typeck.c (error_init): Make static and move above.
475 (pedwarn_init): Likewise.
476 (warning_init): Move above.
477 (maybe_warn_string_init): Likewise.
479 2014-05-01 Jeff Law <law@redhat.com>
483 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
484 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
487 2014-05-02 Marek Polacek <polacek@redhat.com>
490 * c-typeck.c (push_init_level): Set constructor_designated to
491 p->designated for structures.
493 2014-05-01 Marek Polacek <polacek@redhat.com>
496 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
497 function-definition has an attribute after the declarator.
499 2014-05-01 Marek Polacek <polacek@redhat.com>
502 * c-typeck.c (warning_init): Add location_t parameter. Call
503 warning_at instead of warning.
504 (push_init_level): Pass input_location to warning_init.
505 (add_pending_init): Add location_t parameter. Pass loc to
507 (set_nonincremental_init): Pass input_location to add_pending_init.
508 (set_nonincremental_init_from_string): Likewise.
509 (output_init_element): Pass loc to warning_init and to
512 2014-05-01 Marek Polacek <polacek@redhat.com>
515 * c-typeck.c (c_finish_return): Distinguish between label and variable
516 when warning about returning local address.
518 2014-05-01 Marek Polacek <polacek@redhat.com>
521 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
524 2014-05-01 Marek Polacek <polacek@redhat.com>
527 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
528 instead of 0 to WARN_FOR_QUALIFIERS.
530 2014-05-01 Marek Polacek <polacek@redhat.com>
533 * c-typeck.c (default_conversion): Use better location for
536 2014-04-30 Marek Polacek <polacek@redhat.com>
538 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
539 also when SANITIZE_FLOAT_DIVIDE is on.
541 2014-04-30 Marek Polacek <polacek@redhat.com>
544 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
545 and pedwarn_init. Use loc insted of input_location.
547 2014-04-30 Marek Polacek <polacek@redhat.com>
550 * c-typeck.c (build_binary_op): Use location when warning about
553 2014-04-25 Marek Polacek <polacek@redhat.com>
556 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
557 always_inline/noinline and hot/cold attributes.
559 2014-04-25 Marek Polacek <polacek@redhat.com>
562 * c-parser.c (c_parser_initelt): Pass input_location to
563 process_init_element.
564 (c_parser_initval): Pass loc to process_init_element.
565 * c-tree.h (process_init_element): Adjust declaration.
566 * c-typeck.c (push_init_level): Pass input_location to
567 process_init_element.
568 (pop_init_level): Likewise.
569 (set_designator): Likewise.
570 (output_init_element): Add location_t parameter. Pass loc to
572 (output_pending_init_elements): Pass input_location to
574 (process_init_element): Add location_t parameter. Pass loc to
577 2014-04-24 Jakub Jelinek <jakub@redhat.com>
579 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
580 atomic-clause, allow comma in between atomic-clause and
583 2014-04-22 Jakub Jelinek <jakub@redhat.com>
586 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
587 fails, don't set OM_PARALLEL_COMBINED and return NULL.
589 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
592 * c-array-notation.c (fix_builtin_array_notation_fn): Use
593 create_tmp_var instead build_decl for creating temps.
594 (build_array_notation_expr): Likewise.
595 (fix_conditional_array_notations_1): Likewise.
596 (fix_array_notation_expr): Likewise.
597 (fix_array_notation_call_expr): Likewise.
599 2014-03-28 Jakub Jelinek <jakub@redhat.com>
602 * c-tree.h (c_build_function_call_vec): New prototype.
603 * c-typeck.c (build_function_call_vec): Don't call
604 resolve_overloaded_builtin here.
605 (c_build_function_call_vec): New wrapper function around
606 build_function_call_vec. Call resolve_overloaded_builtin here.
607 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
608 Call c_build_function_call_vec instead of build_function_call_vec.
609 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
610 * c-decl.c (finish_decl): Likewise.
612 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
615 * c-typeck.c: Use correct format string in cast-qual warning
617 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
619 * c-decl.c (c_decl_attributes): Use
620 lang_hooks.types.omp_mappable_type.
621 * c-typeck.c (c_finish_omp_clauses): Likewise.
623 2014-03-06 Marek Polacek <polacek@redhat.com>
626 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
627 of checking tree code.
629 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
631 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
632 (c_parser_parameter_declaration): Likewise.
634 2014-02-19 Marek Polacek <polacek@redhat.com>
637 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
638 Call mark_exp_read on exp.value.
639 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
640 TREE_ADDRESSABLE on old instead of val.
641 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
643 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
645 * c-parser.c (c_parser_get_builtin_args): Replace calls to
646 C_EXPR_APPEND by vec_safe_push.
647 * c-tree.h (C_EXPR_APPEND): Remove.
649 2014-01-31 Marek Polacek <polacek@redhat.com>
652 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
653 build_function_call_vec.
654 (build_function_call): Likewise.
655 (build_atomic_assign): Likewise.
656 (build_function_call_vec): Add arg_loc parameter. Use it.
657 (convert_arguments): Likewise.
658 (convert_for_assignment): Rename rhs_loc to expr_loc.
659 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
660 (c_parser_objc_keywordexpr): Likewise.
661 (c_parser_postfix_expression_after_primary): Call
662 build_function_call_vec with expr_loc rather than op_loc.
663 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
664 build_function_call_vec.
665 (c_parser_expr_list): Add locations parameter. Fill it with locations
666 of function arguments.
667 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
669 2014-01-30 Marek Polacek <polacek@redhat.com>
672 * c-typeck.c (build_function_call_vec): Use loc parameter.
673 (convert_arguments): Add location parameter. Use it.
674 (ep_convert_and_check): Likewise.
675 (build_atomic_assign): Adjust convert_for_assignment call.
676 (build_modify_expr): Likewise.
677 (digest_init): Likewise.
678 (c_finish_return): Likewise.
679 (build_conditional_expr): Adjust ep_convert_and_check calls.
680 (convert_for_assignment): Add rhs_loc parameter. Use it.
681 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
684 2014-01-30 Richard Biener <rguenther@suse.de>
687 * c-typeck.c (build_function_call_vec): Do not replace calls
688 to a function via an incompatible type with a runtime abort.
690 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
692 * c-parser.c (c_parser_declaration_or_fndef): Replaced
693 flag_enable_cilkplus with flag_cilkplus.
694 (c_parser_direct_declarator_inner): Likewise.
695 (c_parser_attribute_any_word): Likewise.
696 (c_parser_attributes): Likewise.
697 (c_parser_compound_statement): Likewise.
698 (c_parser_statement_after_labels): Likewise.
699 (c_parser_if_statement): Likewise.
700 (c_parser_switch_statement): Likewise.
701 (c_parser_do_statement): Likewise.
702 (c_parser_for_statement): Likewise.
703 (c_parser_unary_expression): Likewise.
704 (c_parser_postfix_expression): Likewise.
705 (c_parser_postfix_expression_after_primary): Likewise.
706 (c_parser_postfix_expression_after_primary): Likewise.
707 (c_parser_omp_clause_name): Likewise.
708 (c_finish_omp_declare_simd): Likewise.
709 (c_parser_cilk_verify_simd): Likewise.
710 * c-typeck.c (build_array_ref): Likewise.
711 (build_function_call_vec): Likewise.
712 (convert_arguments): Likewise.
713 (build_compound_expr): Likewise.
714 (c_finish_return): Likewise.
715 (c_finish_if_stmt): Likewise.
716 (c_finish_loop): Likewise.
717 (build_binary_op): Likewise.
719 2014-01-23 Marek Polacek <polacek@redhat.com>
722 * c-typeck.c (parser_build_binary_op): Use location instead of
724 (build_binary_op): Pass location to shorten_compare.
726 2014-01-23 Marek Polacek <polacek@redhat.com>
729 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
732 2014-01-23 Marek Polacek <polacek@redhat.com>
735 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
736 of a comma expression.
737 (emit_side_effect_warnings): Likewise.
739 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
742 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
743 function to use walk_tree and moved a lot of its functionality to
744 expand_array_notations.
745 (expand_array_notations): New function.
747 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
749 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
750 attribute an attribute without value.
752 2014-01-23 Jakub Jelinek <jakub@redhat.com>
755 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
756 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
758 2014-01-22 Marek Polacek <polacek@redhat.com>
761 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
762 of remove_c_maybe_const_expr on op1 and op2.
764 2014-01-15 Jakub Jelinek <jakub@redhat.com>
767 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
768 effects, preevaluate rhs using SAVE_EXPR first.
770 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
773 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
774 statements with if-elseif statements.
776 2014-01-06 Marek Polacek <polacek@redhat.com>
779 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
780 defined bit-field types only in ISO C.
782 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
784 Update copyright years
786 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
788 * c-array-notation.c: Use the standard form for the copyright notice.
790 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
792 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
793 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
794 field in parser is not empty. If not-empty, call the function
795 c_parser_finish_omp_declare_simd.
796 (c_parser_cilk_clause_vectorlength): Modified function to be shared
797 between SIMD-enabled functions and #pragma simd. Added new parameter.
798 (c_parser_cilk_all_clauses): Modified the usage of the function
799 c_parser_cilk_clause_vectorlength as mentioned above.
800 (c_parser_cilk_simd_fn_vector_attrs): New function.
801 (c_finish_cilk_simd_fn_tokens): Likewise.
802 (is_cilkplus_vector_p): Likewise.
803 (c_parser_omp_clause_name): Added checking for "vectorlength,"
804 "nomask," and "mask" strings in clause name.
805 (c_parser_omp_all_clauses): Added 3 new case statements:
806 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
807 PRAGMA_CILK_CLAUSE_NOMASK.
808 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
809 check for vector attribute and if so call the function
810 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
811 called the function c_finish_cilk_simd_fn_tokens.
812 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
813 parser field is non-empty. If so, parse them as you would parse
814 the omp declare simd pragma.
815 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
816 Added a check when step is a parameter and flag it as error.
817 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
818 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
821 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
823 * c-parser.c (c_parser_omp_parallel): Fix description.
825 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
827 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
828 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
829 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
830 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
832 2013-12-04 Joseph Myers <joseph@codesourcery.com>
835 * c-parser.c (c_parser_alignas_specifier): Use
836 c_sizeof_or_alignof_type instead of c_alignof.
837 (c_parser_alignof_expression): Likewise, with min_alignof
838 parameter depending on alignof spelling used.
840 2013-12-04 Marek Polacek <polacek@redhat.com>
843 * c-decl.c (start_function): Don't warn for missing prototype for
846 2013-12-03 Marek Polacek <polacek@redhat.com>
849 * c-decl.c (build_compound_literal): Allow compound literals with
852 2013-12-02 Joseph Myers <joseph@codesourcery.com>
855 * c-typeck.c (build_modify_expr): Diagnose assignment to
856 expression with array type.
858 2013-11-29 Joseph Myers <joseph@codesourcery.com>
861 * c-typeck.c (process_init_element): Do not treat a string as
862 initializing a whole array when used with a designator for an
865 2013-11-29 Joseph Myers <joseph@codesourcery.com>
868 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
869 an inline function following a static declaration.
871 2013-11-28 Jakub Jelinek <jakub@redhat.com>
874 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
875 to p_name before calling c_parser_omp_teams instead of after.
876 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
877 argument. Remove unused p_name variable.
879 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
880 Jakub Jelinek <jakub@redhat.com>
882 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
883 external_scope is NULL.
885 2013-11-27 Tom de Vries <tom@codesourcery.com>
886 Marc Glisse <marc.glisse@inria.fr>
889 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
891 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
893 * c-typeck.c: Add required include files from gimple.h.
895 2013-11-22 David Malcolm <dmalcolm@redhat.com>
897 * c-decl.c (define_label, shadow_tag_warned)
898 (check_bitfield_type_and_width, grokdeclarator, grokparms,
899 store_parm_decls_newstyle, store_parm_decls_oldstyle)
900 (declspecs_add_type): Remove use of in_system_header macro.
901 * c-parser.c (c_parser_unary_expression): Likewise.
902 * c-typeck.c (store_init_value, process_init_element)
903 (c_start_case): Likewise.
905 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
908 * c-parser.c (c_parser_set_source_position_from_token): Remove
909 reference to in_system_header from comment.
911 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
913 * c-decl.c (grokdeclarator): Update comment to refer to
914 tree_to_[su]hwi rather than tree_low_cst.
916 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
918 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
919 tree_to_uhwi throughout.
921 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
923 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
926 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
928 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
931 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
933 * c-parser.c (c_parser_cilk_simd): New.
934 (c_parser_cilk_verify_simd): New.
935 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
936 (c_parser_omp_for_loop): Add case for NE_EXPR.
937 Set c_break_label for CILK_SIMD.
938 (c_parser_cilk_clause_vectorlength): New.
939 (c_parser_cilk_clause_linear): New.
940 (c_parser_cilk_clause_name): New.
941 (c_parser_cilk_all_clauses): New.
942 * c-typeck.c (build_unary_op): Pass location argument to
944 (build_modify_expr): Same.
945 (build_asm_expr): Same.
946 (c_finish_bc_stmt): Error on break/continue in loops.
948 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
950 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
952 2013-11-14 Diego Novillo <dnovillo@google.com>
954 * c-decl.c: Include print-tree.h.
955 Include stor-layout.h.
958 Include stringpool.h.
959 * c-lang.c: Include fold-const.h.
960 * c-parser.c: Include stringpool.h.
962 Include stor-layout.h.
965 * c-typeck.c: Include stor-layout.h.
970 2013-11-13 Joseph Myers <joseph@codesourcery.com>
972 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
973 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
975 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
976 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
978 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
979 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
980 (c_parser_declarator, c_parser_direct_declarator_inner)
981 (c_parser_parameter_declaration, c_parser_type_name): All callers
983 (c_parser_declaration_or_fndef): Handle declarations with type
984 determined from the initializer.
986 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
988 * c-typeck.c: Include gimplify.h.
990 2013-11-12 Joseph Myers <joseph@codesourcery.com>
992 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
993 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
995 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
996 or _Thread_local as appropriate in diagnostics.
997 (build_null_declspecs): Initialize ret->thread_gnu_p.
998 (declspecs_add_scspec): Handle either __thread or _Thread_local
999 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1000 pedantic. Do not disallow _Thread_local extern and _Thread_local
1003 2013-11-07 Joseph Myers <joseph@codesourcery.com>
1004 Andrew MacLeod <amacleod@redhat.com>
1006 * c-aux-info.c (gen_type): Handle atomic qualifier.
1007 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1008 qualifiers when compating types.
1009 (shadow_tag_warned): Handle atomic_p in declspecs.
1010 (quals_from_declspecs): Likewise.
1011 (start_decl): Use c_type_promotes_to when promoting argument
1013 (grokdeclarator): Handle _Atomic.
1014 (get_parm_info): Diagnose any qualifier on "void" as only
1016 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1017 comparing types. Use c_type_promotes_to when promoting argument
1019 (finish_function): Use c_type_promotes_to when promoting argument
1021 (build_null_declspecs): Handle atomic_p in declspecs.
1022 (declspecs_add_qual): Handle RID_ATOMIC.
1023 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1024 (c_token_starts_declspecs): Handle RID_ATOMIC.
1025 (c_parser_declspecs): Handle atomic type specifiers and
1027 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1028 from types of expressions with atomic type.
1029 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1030 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1031 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1032 (c_parser_statement_after_labels, c_parser_switch_statement)
1033 (c_parser_for_statement, c_parser_expr_no_commas)
1034 (c_parser_conditional_expression, c_parser_binary_expression)
1035 (c_parser_cast_expression, c_parser_unary_expression)
1036 (c_parser_postfix_expression)
1037 (c_parser_postfix_expression_after_primary, c_parser_expression):
1038 Use convert_lvalue_to_rvalue.
1039 (c_parser_expression_conv, c_parser_expr_list): Document
1040 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1041 (c_parser_objc_synchronized_statement): Use
1042 convert_lvalue_to_rvalue.
1043 (c_parser_objc_selector): Handle RID_ATOMIC.
1044 (c_parser_objc_receiver, c_parser_array_notation): Use
1045 convert_lvalue_to_rvalue.
1046 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1047 _Atomic (type-name).
1048 (struct c_declspecs): Add atomic_p field.
1049 (convert_lvalue_to_rvalue): Declare.
1050 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1051 corresponding atomic types.
1052 (qualify_type): Don't add _Atomic qualifiers from second argument.
1053 (comp_target_types): Do not allow _Atomic mismatches.
1054 (type_lists_compatible_p): Do not remove atomic qualifiers when
1056 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1057 (build_atomic_assign): New functions.
1058 (build_unary_op): Use build_atomic_assign for atomic increment and
1060 (build_conditional_expr): Do not treat _Atomic void as a qualified
1062 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1063 (find_anonymous_field_with_type, convert_to_anonymous_field)
1064 (convert_for_assignment): Do not remove atomic qualifiers when
1066 (digest_init): Do not accept initialization of arrays of atomic
1067 elements by string constants.
1068 (build_asm_expr): Use convert_lvalue_to_rvalue.
1069 (build_binary_op): Do not treat _Atomic void as a qualified
1072 2013-11-06 DJ Delorie <dj@redhat.com>
1074 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1075 both explicit and builtin, print the location of the explicit one.
1077 2013-11-05 Tobias Burnus <burnus@net-b.de>
1079 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1080 c_parser_omp_distribute, c_parser_omp_teams,
1081 c_parser_omp_target, c_parser_omp_declare): Handle
1084 2013-11-03 Marek Polacek <polacek@redhat.com>
1086 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1088 2013-11-01 Jakub Jelinek <jakub@redhat.com>
1090 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1091 check_dup_generic at the end, unless remove is true.
1092 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1094 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1096 2013-10-31 Jakub Jelinek <jakub@redhat.com>
1098 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1099 with decl that is not pointer nor array.
1101 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1103 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1104 a spawning function is found.
1105 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1106 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1107 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1108 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1110 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1111 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1113 (c_finish_return): Added a check to reject _Cilk_spawn in return
1115 (build_cilk_spawn): New function.
1116 (build_cilk_sync): Likewise.
1117 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1119 2013-10-27 Tobias Burnus <burnus@net-b.de>
1122 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1123 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1124 (c_parser_statement_after_labels): Update calls.
1126 2013-10-24 Tobias Burnus <burnus@net-b.de>
1129 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1130 Handle PRAGMA_IVDEP.
1131 (c_parser_statement_after_labels): Update call.
1133 2013-10-24 Marek Polacek <polacek@redhat.com>
1135 * c-parser.c (c_parser_struct_declaration): Add a comment.
1136 (c_parser_declarator): Don't allow _Alignas here.
1138 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
1140 * c-parser.c: Include omp-low.h.
1141 * c-typeck.c: Likewise.
1143 2013-10-17 Marek Polacek <polacek@redhat.com>
1146 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1147 Document syntax of the array-declarator.
1148 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1150 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1151 (c_parser_struct_declaration): Likewise.
1152 (c_parser_declarator): Likewise.
1153 (c_parser_direct_declarator_inner): Likewise.
1154 (c_parser_parameter_declaration): Likewise.
1155 (c_parser_type_name): Likewise.
1157 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1159 * c-lang.h (current_omp_declare_target_attribute): New extern
1161 * c-parser.c: Include c-lang.h.
1162 (struct c_parser): Change tokens to c_token *.
1163 Add tokens_buf field. Change tokens_avail type to unsigned int.
1164 (c_parser_consume_token): If parser->tokens isn't
1165 &parser->tokens_buf[0], increment parser->tokens.
1166 (c_parser_consume_pragma): Likewise.
1167 (enum pragma_context): Add pragma_struct and pragma_param.
1168 (c_parser_external_declaration): Adjust
1169 c_parser_declaration_or_fndef caller.
1170 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1171 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1172 Adjust recursive call.
1173 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1175 (c_parser_parameter_declaration): Use pragma_param instead of
1177 (c_parser_compound_statement_nostart, c_parser_label,
1178 c_parser_for_statement): Adjust
1179 c_parser_declaration_or_fndef callers.
1180 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1181 it through to c_parser_conditional_expression.
1182 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1183 pass it through to c_parser_binary_expression. Adjust recursive
1185 (c_parser_binary_expression): Remove prec argument, add
1186 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1187 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1188 binop matches it, use build2 instead of parser_build_binary_op.
1189 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1190 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1191 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1192 Handle pragma_struct and pragma_param the same as pragma_external.
1193 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1194 (c_parser_omp_variable_list): Parse array sections for
1195 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1196 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1197 (c_parser_omp_clause_reduction): Handle user defined reductions.
1198 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1199 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1200 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1201 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1202 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1203 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1204 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1205 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1206 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1207 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1208 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1209 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1210 (c_parser_omp_for_loop): Add CODE argument, pass it through
1211 to c_finish_omp_for. Change last argument to cclauses,
1212 and adjust uses to grab parallel clauses from the array of all
1213 the split clauses. Adjust c_parser_binary_expression,
1214 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1215 (omp_split_clauses): New function.
1216 (c_parser_omp_simd): New function.
1217 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1218 Allow the function to be called also when parsing combined constructs,
1219 and call c_parser_omp_simd when parsing for simd.
1220 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1221 #pragma omp section, require exactly one structured-block instead of
1222 sequence of statements.
1223 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1224 Allow the function to be called also when parsing combined constructs.
1225 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1226 Allow the function to be called also when parsing combined
1228 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1229 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1230 c_parser_omp_teams, c_parser_omp_target_data,
1231 c_parser_omp_target_update, c_parser_omp_target,
1232 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1233 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1234 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1235 (c_parser_omp_construct): Add p_name and mask vars. Handle
1236 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1237 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1238 and c_parser_omp_sections callers.
1239 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1240 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1241 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1242 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1243 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1245 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1246 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1247 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1248 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1249 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1250 * c-typeck.c: Include tree-inline.h.
1251 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1252 handle_omp_array_sections_1, handle_omp_array_sections,
1253 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1254 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1255 user defined reductions.
1256 (c_tree_equal): New function.
1257 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1258 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1259 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1260 c_check_omp_declare_reduction_r): New prototypes.
1261 * c-decl.c (current_omp_declare_target_attribute): New variable.
1262 (c_decl_attributes): New function.
1263 (start_decl, start_function): Use it instead of decl_attributes.
1264 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1265 c_omp_reduction_decl, c_omp_reduction_lookup,
1266 c_check_omp_declare_reduction_r): New functions.
1268 2013-09-25 Tom Tromey <tromey@redhat.com>
1270 * Make-lang.in (c/gccspec.o): Remove.
1271 (CFLAGS-c/gccspec.o): New variable.
1272 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1273 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1274 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1276 2013-09-25 Tom Tromey <tromey@redhat.com>
1278 * Make-lang.in (c/gccspec.o): Don't use subshell.
1280 2013-09-18 Marek Polacek <polacek@redhat.com>
1283 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1284 Remove unnecessary check.
1286 2013-09-18 Marek Polacek <polacek@redhat.com>
1289 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1290 no_sanitize_undefined attribute.
1292 2013-09-13 Kai Tietz <ktietz@redhat.com>
1295 * c-decl.c (c_builtin_function_ext_scope): Remove
1296 wrong assumption that it is never called on prexisting
1299 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1301 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1303 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1305 * c-objc-common.c (c_tree_printer): Tidy.
1307 2013-08-30 Marek Polacek <polacek@redhat.com>
1309 * c-typeck.c (build_binary_op): Add division by zero and shift
1312 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
1313 Joseph Myers <joseph@codesourcery.com>
1316 * c-typeck.c (c_common_type): Prefer double_type_node over
1317 other REAL_TYPE types with the same precision.
1318 (convert_arguments): Likewise.
1320 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1322 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1323 (c_initialize_diagnostics): Call a destructor for the early printer.
1325 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1327 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1328 printer initialization.
1330 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1333 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1334 check for truth values.
1335 (expand_array_notation_exprs): Added truth values case. Removed an
1336 unwanted else. Added for-loop to walk through subtrees in default
1339 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1341 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1343 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1345 * c-parser.c (struct c_generic_association): Fix typo.
1347 2013-07-23 Tom Tromey <tromey@redhat.com>
1348 Joseph Myers <joseph@codesourcery.com>
1350 * c-parser.c (struct c_generic_association): New.
1351 (c_generic_association_d): New typedef.
1352 (c_parser_generic_selection): New function.
1353 (c_parser_postfix_expression): Handle RID_GENERIC.
1355 2013-07-13 Jason Merrill <jason@redhat.com>
1358 * c-decl.c (finish_struct): Check for too-large class.
1360 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1363 * c-typeck.c (set_init_index): When folding, check for index overflow.
1365 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1367 * c-parser.c (c_parser_array_notation): Removed rejection of array
1368 notations in an array of function pointers.
1370 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1372 * c-array-notation.c (make_triplet_val_inv): New function.
1373 (create_cmp_incr): Likewise.
1374 (create_array_refs): Likewise.
1375 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1376 Also modularized common parts between functions and called the function.
1377 (build_array_notation_expr): Likewise.
1378 (fix_conditional_array_notations_1): Likewise.
1379 (fix_array_notation_expr): Likewise.
1380 (fix_array_notation_call_expr): Likewise.
1382 2013-06-18 Marek Polacek <polacek@redhat.com>
1385 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1387 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1389 * c-array-notation.c (build_array_notation_expr): Reject array notation
1390 mismatch between LHS and RHS even inside a call_expr. Also, removed
1391 a couple while statements that were dead code.
1393 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1395 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1396 excessive precision expressions in function parameters. Also removed
1397 couple unwanted while statements.
1399 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1401 * c-array-notation.c (expand_array_notation_exprs): Added
1402 ARRAY_NOTATION_REF case.
1404 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1406 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1407 function to c-family/array-notation-common.c.
1408 (is_cilkplus_reduce_builtin): Likewise.
1409 (find_rank): Likewise.
1410 (extract_array_notation_exprs): Likewise.
1411 (replace_array_notations): Likewise.
1412 (find_inv_trees): Likewise.
1413 (replace_inv_trees): Likewise.
1414 (contains_array_notation_expr): Likewise.
1415 (find_correct_array_notation_type): Likewise.
1416 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1417 (struct inv_list): Moved this to c-family/array-notation-common.c.
1418 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1420 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1422 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1423 reduction functions outside the for-loop. Added a check if the fundecl
1424 is non-NULL. Finally, removed an unwanted if-statement, and made the
1427 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1429 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1430 condition of the if-statement matches the rank of else-block and then-
1431 block when array notations are used.
1432 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1433 expression after the entire function body is parsed.
1434 (c_parser_expr_no_commas): Delayed creating array notation expressions
1435 to the end of function parsing.
1436 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1437 whole if-statement instead of just the condition.
1438 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1440 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1443 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1444 array to NULL_TREE if they are unused. Also added a check for the
1445 field to be NULL before its fields are used in future.
1447 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1450 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1451 (build_array_notation_expr): Likewise.
1453 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1455 * c-typeck.c (build_array_ref): Added a check to see if array's
1456 index is greater than one. If true, then emit an error.
1457 (build_function_call_vec): Exclude error reporting and checking
1458 for builtin array-notation functions.
1459 (convert_arguments): Likewise.
1460 (c_finish_return): Added a check for array notations as a return
1461 expression. If true, then emit an error.
1462 (c_finish_loop): Added a check for array notations in a loop
1463 condition. If true then emit an error.
1464 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1465 (build_binary_op): Added a check for array notation expr inside
1466 op1 and op0. If present, we call another function to find correct
1468 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1469 * c-parser.c (c_parser_compound_statement): Check if array
1470 notation code is used in tree, if so, then transform them into
1472 (c_parser_expr_no_commas): Check if array notation is used in LHS
1473 or RHS, if so, then build array notation expression instead of
1475 (c_parser_postfix_expression_after_primary): Added a check for
1476 colon(s) after square braces, if so then handle it like an array
1477 notation. Also, break up array notations in unary op if found.
1478 (c_parser_direct_declarator_inner): Added a check for array
1480 (c_parser_compound_statement): Added a check for array notation in
1481 a stmt. If one is present, then expand array notation expr.
1482 (c_parser_if_statement): Likewise.
1483 (c_parser_switch_statement): Added a check for array notations in
1484 a switch statement's condition. If true, then output an error.
1485 (c_parser_while_statement): Similarly, but for a while.
1486 (c_parser_do_statement): Similarly, but for a do-while.
1487 (c_parser_for_statement): Similarly, but for a for-loop.
1488 (c_parser_unary_expression): Check if array notation is used in a
1489 pre-increment or pre-decrement expression. If true, then expand
1491 (c_parser_array_notation): New function.
1492 * c-array-notation.c: New file.
1493 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1495 2013-05-23 Mike Stump <mikestump@comcast.net>
1497 * c-typeck.c (convert_for_assignment): Handle references to memory
1500 2013-05-16 Jason Merrill <jason@redhat.com>
1502 * Make-lang.in (cc1$(exeext)): Use link mutex.
1504 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1506 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1507 to simply use OPT_Wpointer_arith.
1508 (build_unary_op): Likewise.
1510 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1513 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1514 argument. If set, or it temporarily for parsing of the first
1515 argument into force_folding_builtin_constant_p.
1516 (c_parser_postfix_expression): Adjust callers.
1518 2013-03-21 Richard Biener <rguenther@suse.de>
1520 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1521 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1523 2013-02-12 Marek Polacek <polacek@redhat.com>
1526 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1529 2013-01-24 Jakub Jelinek <jakub@redhat.com>
1532 * c-typeck.c (set_nonincremental_init_from_string): If
1533 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1535 (process_init_element): Likewise.
1537 2012-12-20 Jakub Jelinek <jakub@redhat.com>
1540 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1541 argument, don't call default_function_array_conversion
1542 nor c_fully_fold here.
1543 (c_parser_asm_statement): Adjust callers.
1544 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1545 and outputs here, and call default_function_array_conversion
1546 on inputs that don't need to be addressable.
1548 2012-12-18 Jakub Jelinek <jakub@redhat.com>
1551 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1552 warning require that both c_common_unsigned_type as well as
1553 c_common_signed_type is the same for both mvl and mvr types.
1555 2012-11-16 Diego Novillo <dnovillo@google.com>
1557 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1559 * c-common.c: Use new vec API in vec.h.
1560 * c-common.h: Likewise.
1561 * c-gimplify.c: Likewise.
1562 * c-pragma.c: Likewise.
1563 * c-pretty-print.c: Likewise.
1564 * c-pretty-print.h: Likewise.
1565 * c-semantics.c: Likewise.
1566 * c-decl.c: Likewise.
1567 * c-parser.c: Likewise.
1568 * c-tree.h: Likewise.
1569 * c-typeck.c: Likewise.
1571 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1574 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1576 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1579 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1580 shadows a function, unless the variable is a function or a
1581 pointer-to-function.
1583 2012-10-12 Jakub Jelinek <jakub@redhat.com>
1586 * c-parser.c (struct c_tree_loc_pair): Removed.
1587 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1588 add location_t * and tree * arguments, fill in array of 3
1589 sizeof_arg trees and corresponding locs.
1590 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1591 c_parser_expr_list callers.
1592 (c_parser_postfix_expression_after_primary): Likewise. Pass
1593 array of 3 sizeof_arg trees and locs (corresponding to first
1594 3 arguments) to sizeof_pointer_memaccess_warning.
1596 2012-10-09 Lawrence Crowl <crowl@google.com>
1598 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1599 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1602 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1605 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1608 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
1611 * c-typeck.c: Include c-common.h.
1612 (enum stv_conv): Moved to c-common.h.
1613 (scalar_to_vector): Moved to c-common.c.
1614 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1615 * Make-lang.in: c-typeck.c depends on c-common.h.
1617 2012-10-04 Arnaud Charlet <charlet@adacore.com>
1619 * c-decl.c (c_write_global_declarations): Fix handling of
1622 2012-09-30 Sharad Singhai <singhai@google.com>
1624 * c-decl.c (c_write_global_declarations): Use a different method
1625 to determine if the dump has ben initialized.
1627 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1630 * c-typeck.c (c_cast_expr): When casting to a type requiring
1631 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1634 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1637 * c-typeck.c (build_unary_op): Pass original argument of
1638 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1639 any C_MAYBE_CONST_EXPR, if it has integer operands.
1640 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1641 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1642 to c_objc_common_truthvalue_conversion, then remove any
1643 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1644 c_objc_common_truthvalue_conversion not
1645 c_common_truthvalue_conversion.
1646 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1647 call note_integer_operands for arguments with integer operands
1648 that are not integer constants.
1650 2012-09-13 Jakub Jelinek <jakub@redhat.com>
1653 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1654 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1656 2012-08-31 Jakub Jelinek <jakub@redhat.com>
1659 * c-convert.c (convert): Don't call fold_convert_loc if
1660 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1661 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1662 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1664 2012-08-24 Jakub Jelinek <jakub@redhat.com>
1667 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1668 for nested and empty_ok arguments in the call to
1669 c_parser_declaration_or_fndef.
1671 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1673 * c-tree.h (c_last_sizeof_arg): Declare.
1674 * c-parser.c (struct c_tree_loc_pair): New type.
1675 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1677 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1678 (c_parser_postfix_expression_after_primary): Likewise. Call
1679 sizeof_pointer_memaccess_warning if needed.
1680 (sizeof_ptr_memacc_comptypes): New function.
1681 * c-typeck.c (c_last_sizeof_arg): New global variable.
1682 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1684 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1686 * c-lang.h (lang_decl): Add variable_size GTY option.
1688 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1690 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1691 * Make-lang.in: Fix dependencies.
1693 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1695 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1696 and add language Makefile hooks.
1697 * config-lang.in: New file.
1698 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1699 add the required "normal" config-lang.in rules.
1700 * c-lang.h: Moved from gcc/ to here.
1701 * c-tree.h: Likewise.
1702 * c-objc-common.c: Likewise.
1703 * c-objc-common.h: Likewise.
1704 * c-typeck.c: Likewise.
1705 * c-convert.c: Likewise.
1706 * c-lang.c: Likewise.
1707 * c-aux-info.c: Likewise.
1708 * c-errors.c: Likewise.
1709 * gccspec.c: Likewise.
1710 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1711 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1713 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1715 Copying and distribution of this file, with or without modification,
1716 are permitted in any medium without royalty provided the copyright
1717 notice and this notice are preserved.