1 2015-01-21 Richard Biener <rguenther@suse.de>
4 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5 for builtins the user declared correctly.
7 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8 Bernd Schmidt <bernds@codesourcery.com>
9 Cesar Philippidis <cesar@codesourcery.com>
10 James Norris <jnorris@codesourcery.com>
11 Jakub Jelinek <jakub@redhat.com>
12 Ilmir Usmanov <i.usmanov@samsung.com>
14 * c-parser.c: Include "gomp-constants.h".
15 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
16 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
17 Use OMP_CLAUSE_SET_MAP_KIND.
18 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
19 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
20 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
21 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
22 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
23 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
24 "copyout", "create", "delete", "deviceptr", "gang", "host",
25 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
26 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
27 "present_or_create", "pcreate", "seq", "self", "vector",
28 "vector_length", "wait", "worker".
29 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
30 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
31 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
32 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
33 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
34 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
35 (c_parser_oacc_data_clause_deviceptr)
36 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
37 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
38 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
39 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
40 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
41 (c_parser_oacc_parallel, c_parser_oacc_update)
42 (c_parser_oacc_wait): New functions.
43 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
44 (c_finish_oacc_data): New prototypes.
45 * c-typeck.c: Include "gomp-constants.h".
46 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
47 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
48 OMP_CLAUSE_SET_MAP_KIND.
49 (c_finish_oacc_parallel, c_finish_oacc_kernels)
50 (c_finish_oacc_data): New functions.
51 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
52 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
53 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
54 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
55 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
56 GOMP_MAP_FORCE_DEVICEPTR.
58 2015-01-09 Michael Collison <michael.collison@linaro.org>
60 * c-array-notation.c: Include hash-set.h, machmode.h,
61 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
62 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
63 * c-aux-info.c: Ditto.
68 * c-objc-common.c: Ditto.
70 * c-typeck.c: Include hash-set.h, machmode.h,
71 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
72 fold-const.h, wide-int.h, inchash.h, real.h and
73 fixed-value.h due to flattening of tree.h.
75 2015-01-07 Marek Polacek <polacek@redhat.com>
78 * c-typeck.c (process_init_element): Disallow initialization of
79 a flexible array member with a string constant if the structure
82 2015-01-05 Jakub Jelinek <jakub@redhat.com>
85 * c-typeck.c (convert_for_assignment, c_finish_return): For
86 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
87 types also set in_late_binary_op around convert call.
88 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
89 to integral type casts, if not in_late_binary_op, pass c_fully_fold
90 result on expr as last argument to ubsan_instrument_float_cast,
91 if in_late_binary_op, don't use c_save_expr but save_expr.
93 Update copyright years.
95 2015-01-05 Marek Polacek <polacek@redhat.com>
98 * c-typeck.c (build_array_ref): Pass loc down to
99 warn_array_subscript_with_type_char.
101 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
103 * c-typeck.c: New behavious for pointers to arrays with qualifiers
104 (common-pointer-type): For pointers to arrays take qualifiers from
106 (build_conditional_expr): Add warnings for lost qualifiers.
107 (comp-target-types): Allow pointers to arrays with different qualifiers.
108 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
109 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
110 to PEDWARN_FOR_QUALIFIERS.
112 2014-12-17 Jakub Jelinek <jakub@redhat.com>
115 * c-convert.c: Include ubsan.h.
116 (convert): For real -> integral casts and
117 -fsanitize=float-cast-overflow don't call convert_to_integer, but
118 instead instrument the float cast directly.
120 2014-11-29 Jakub Jelinek <jakub@redhat.com>
122 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
123 c_finish_stmt_expr): Remove NULL last argument from
124 create_tmp_var_raw and create_tmp_var calls.
125 * c-array-notation.c (fix_builtin_array_notation_fn,
126 build_array_notation_expr, fix_conditional_array_notations_1,
127 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
129 2014-11-28 Marek Polacek <polacek@redhat.com>
132 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
133 convert the right operand to integer type.
135 2014-11-25 Marek Polacek <polacek@redhat.com>
138 * c-decl.c (start_function): Disable -Wmissing-declarations warning
139 for inline functions.
141 2014-11-21 Jakub Jelinek <jakub@redhat.com>
144 * c-typeck.c (build_array_ref): Adjust
145 convert_vector_to_pointer_for_subscript caller. If it returns true,
146 call non_lvalue_loc on the result.
148 2014-11-11 Richard Biener <rguenther@suse.de>
150 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
153 2014-11-10 Andi Kleen <ak@linux.intel.com>
156 * c-parser.c (c_parser_statement_after_labels): Call
158 (c_parser_if_statement): Dito.
159 (c_parser_switch_statement): Dito.
160 (c_parser_while_statement): Dito.
161 (c_parser_do_statement): Dito.
162 (c_parser_for_statement): Dito.
163 * c-typeck.c (c_finish_loop): Dito.
165 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
167 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
168 OPT_Wshift_count_overflow in the warnings.
170 2014-10-30 Marek Polacek <polacek@redhat.com>
172 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
173 print the stripped version as well, if they're not the same.
175 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
177 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
180 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
182 * c-decl.c: Adjust include files.
185 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
186 Tom Tromey <tromey@redhat.com>
188 * c-tree.h (enum c_oracle_request): New.
189 (c_binding_oracle_function): New typedef.
190 (c_binding_oracle, c_pushtag, c_bind): Declare.
191 * c-decl.c (c_binding_oracle): New global.
192 (I_SYMBOL_CHECKED): New macro.
193 (i_symbol_binding): New function.
194 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
195 (I_TAG_CHECKED): New macro.
196 (i_tag_binding): New function.
197 (I_TAG_BINDING, I_TAG_DECL): Redefine.
198 (I_LABEL_CHECKED): New macro.
199 (i_label_binding): New function.
200 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
201 (c_print_identifier): Save and restore c_binding_oracle.
202 (c_pushtag, c_bind): New functions.
204 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
206 * c-typeck.c: Adjust include files.
208 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
211 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
212 initialization here...
213 (c_initialize_diagnostics): ... but here. Set defaults after
214 building pretty-printer.
216 2014-10-23 Marek Polacek <polacek@redhat.com>
219 * c-decl.c (pop_scope): Don't print warning in external_scope.
221 2014-10-19 Marek Polacek <polacek@redhat.com>
224 * c-typeck.c (output_init_element): Allow initializing objects with
225 static storage duration with compound literals even in C99 and add
228 2014-10-17 Marek Polacek <polacek@redhat.com>
231 * c-typeck.c (digest_init): Allow initializing objects with static
232 storage duration with compound literals even in C99 and add pedwarn
235 2014-10-17 Marek Polacek <polacek@redhat.com>
238 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
239 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
240 error multiple times. Print the type.
242 2014-10-17 Marek Polacek <polacek@redhat.com>
245 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
248 2014-10-17 Marek Polacek <polacek@redhat.com>
250 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
251 (start_function): Use OPT_Wimplicit_int instead of 0.
252 (store_parm_decls_oldstyle): Likewise.
254 2014-10-17 Alan Modra <amodra@gmail.com>
257 * c-decl.c (merge_decls): Don't merge section name or tls model
258 to newdecl symtab node, instead merge to olddecl. Override
259 existing olddecl section name. Set tls_model for all thread-local
260 vars, not just OMP thread-private ones. Remove incorrect comment.
262 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
264 * c-decl.c: Adjust include files.
266 2014-10-14 DJ Delorie <dj@redhat.com>
268 * c-parser.c (c_parse_init): Add RID entries for each __intN.
269 (c_token_starts_typename): Check all __intN, not just __int128.
270 (c_token_starts_declspecs): Likewise.
271 (c_parser_declspecs): Likewise.
272 (c_parser_attribute_any_word): Likewise.
273 (c_parser_objc_selector): Likewise.
274 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
275 (struct c_declspecs): Add int_n_idx field to record *which* __intN
277 * c-decl.c (declspecs_add_type): Check for all __intN, not just
279 (finish_declspecs): Likewise.
281 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
283 * c-parser.c (c_parser_all_labels): New function to replace
285 (c_parser_statement): Call the new function.
287 2014-10-09 Marek Polacek <polacek@redhat.com>
290 * c-typeck.c (pop_init_level): Don't warn about initializing
293 2014-10-07 Marek Polacek <polacek@redhat.com>
296 * c-decl.c (header_for_builtin_fn): New function.
297 (implicitly_declare): Suggest which header to include.
299 2014-10-07 Marek Polacek <polacek@redhat.com>
301 * c-convert.c (convert): Use error_operand_p.
302 * c-typeck.c (require_complete_type): Likewise.
303 (really_atomic_lvalue): Likewise.
304 (digest_init): Likewise.
305 (handle_omp_array_sections_1): Likewise.
307 2014-10-03 Marek Polacek <polacek@redhat.com>
310 * c-decl.c (pop_scope): Don't warn about "inline function declared
311 but never defined" for functions marked with gnu_inline attribute.
313 2014-09-25 Jakub Jelinek <jakub@redhat.com>
316 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
317 on low_bound and length.
319 2014-09-24 Marek Polacek <polacek@redhat.com>
323 * c-parser.c: Don't define CPP_KEYWORD.
324 (c_parser_switch_statement): Pass original type to c_finish_case.
325 * c-tree.h (c_finish_case): Update declaration.
326 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
327 conditionally to c_do_switch_warnings.
329 2014-09-03 Marek Polacek <polacek@redhat.com>
332 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
335 2014-09-02 Jakub Jelinek <jakub@redhat.com>
336 Balaji V. Iyer <balaji.v.iyer@intel.com>
337 Igor Zamyatin <igor.zamyatin@intel.com>
339 * c-parser.c (c_parser_cilk_for): New function.
340 (c_parser_cilk_grainsize): Likewise.
341 (c_get_temp_regvar): Likewise.
342 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
343 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
344 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
345 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
348 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
350 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
351 with using HOST_WIDE_INT without truncation to 'int'
353 2014-08-22 Marek Polacek <polacek@redhat.com>
356 * c-typeck.c (parser_build_binary_op): Adjust call to
357 warn_logical_not_parentheses.
359 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
362 * c-parser.c (c_parser_array_notation): Check for correct
363 type of an array added.
365 2014-08-19 Marek Polacek <polacek@redhat.com>
368 * c-typeck.c (build_binary_op): If either operand of a comparison
369 is a boolean expression, call maybe_warn_bool_compare.
371 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
374 * c-typeck.c (build_c_cast): Do a conversion even when the
375 TYPE_MAIN_VARIANTs are the same.
377 2014-08-19 Marek Polacek <polacek@redhat.com>
379 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
380 pedwarn_c99 instead of pedwarn.
381 (grokfield): Likewise.
382 (warn_defaults_to): New function.
383 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
384 Unconditionally call pedwarn_c99 instead of pedwarn.
385 (start_function): Call warn_defaults_to instead of pedwarn_c99.
386 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
387 check flag_isoc11 before.
388 * c-errors.c (pedwarn_c99): Change the return type to bool.
389 Handle -Wc99-c11-compat.
390 * c-parser.c (disable_extension_diagnostics): Handle
392 (restore_extension_diagnostics): Likewise.
393 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
394 instead of pedwarn, don't check flag_isoc11 before.
395 (c_parser_declspecs): Likewise.
396 (c_parser_alignas_specifier): Likewise.
397 (c_parser_alignof_expression): Likewise.
398 (c_parser_generic_selection): Likewise.
399 * c-tree.h (pedwarn_c99): Update declaration.
400 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
403 2014-08-19 Marek Polacek <polacek@redhat.com>
405 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
407 * c-errors.c: Include "opts.h".
408 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
409 * c-parser.c (disable_extension_diagnostics): Handle negative value
410 of warn_c90_c99_compat, too.
411 (restore_extension_diagnostics): Likewise.
412 (c_parser_compound_statement_nostart): Pass
413 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
415 2014-08-12 Marek Polacek <polacek@redhat.com>
417 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
419 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
421 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
423 2014-08-10 Marek Polacek <polacek@redhat.com>
426 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
427 Call pedwarn_c90 instead of pedwarn.
428 (check_bitfield_type_and_width): Likewise.
429 (declspecs_add_qual): Likewise.
430 (declspecs_add_type): Likewise.
431 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
432 Adjust to only call pedwarn_c90.
433 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
434 pedwarn_c90 instead of pedwarn.
435 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
436 * c-parser.c (disable_extension_diagnostics): Handle
438 (restore_extension_diagnostics): Likewise.
439 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
440 pedwarn_c90 instead of pedwarn.
441 (c_parser_initelt): Likewise.
442 (c_parser_postfix_expression): Likewise.
443 (c_parser_postfix_expression_after_paren_type): Likewise.
444 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
445 * c-tree.h: Fix formatting.
446 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
447 pedwarn_c90 instead of pedwarn.
449 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
451 * c-typeck.c: Remove include of pointer-set.h.
453 2014-08-07 Marek Polacek <polacek@redhat.com>
455 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
457 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
459 * c-typeck.c: Use hash_map instead of pointer_map.
461 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
463 * c-decl.c: Use hash_set instead of pointer_set.
465 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
468 * c-array-notation.c (expand_array_notations): Handling
471 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
474 * c-typeck.c (c_finish_return): Return 0 instead of the address of
477 2014-07-30 Tom Tromey <tromey@redhat.com>
479 * c-typeck.c (struct constructor_stack) <designator_depth>: New
481 (really_start_incremental_init, push_init_level): Initialize
483 (pop_init_level): Set global designator_depth.
484 (process_init_element): Check for designated_init attribute.
486 2014-07-20 Marek Polacek <polacek@redhat.com>
489 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
490 (implicitly_declare): Pass location to implicit_decl_warning.
492 2014-07-14 Jakub Jelinek <jakub@redhat.com>
495 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
496 If non-NULL, call c_parser_check_literal_zero.
497 (c_parser_check_literal_zero): New function.
498 (c_parser_postfix_expression_after_primary): Adjust
499 c_parser_expr_list caller, handle -Wmemset-transposed-args.
501 2014-07-06 Marek Polacek <polacek@redhat.com>
504 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
505 * c-tree.h (C_ARRAY_PARAMETER): Define.
506 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
509 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
510 Chen Gang <gang.chen.5i5j@gmail.com>
512 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
515 2014-07-01 Marek Polacek <polacek@redhat.com>
517 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
518 instead of 0 to WARN_FOR_ASSIGNMENT.
520 2014-07-01 Marek Polacek <polacek@redhat.com>
523 * c-typeck.c (convert_for_assignment): Pass
524 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
526 2014-06-30 Marek Polacek <polacek@redhat.com>
528 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
529 has no_sanitize_undefined attribute.
531 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
534 * c-array-notation.c (fix_builtin_array_notation_fn):
535 Check for 0 arguments in builtin call. Check that bultin argument is
537 * c-parser.c (c_parser_array_notation): Check for incorrect initial
540 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
542 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
543 qualifiers in __auto_type for atomic types.
544 (c_parser_typeof_specifier): Discard all type qualifiers in
545 __typeof__ for atomic types.
547 2014-06-25 Marek Polacek <polacek@redhat.com>
550 * c-parser.c (c_parser_statement_after_labels): Pass the location of
551 the return expression to c_finish_return.
553 2014-06-25 Jakub Jelinek <jakub@redhat.com>
555 * c-typeck.c (c_finish_omp_clauses): Make sure
556 OMP_CLAUSE_LINEAR_STEP has correct type.
558 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
562 2014-06-24 Jakub Jelinek <jakub@redhat.com>
564 * c-parser.c (c_parser_omp_for_loop): For
565 #pragma omp parallel for simd move lastprivate clause from parallel
566 to for rather than simd.
568 2014-06-23 Marek Polacek <polacek@redhat.com>
570 * c-typeck.c (parser_build_binary_op): Don't call
571 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
573 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
575 * c-parser.c (c_parser_omp_threadprivate): Likewise.
576 * c-decl.c (merge_decls): Likewise.
578 2014-06-09 Marek Polacek <polacek@redhat.com>
581 * c-typeck.c (error_init): Call inform instead of error_at.
582 (pedwarn_init): Call inform instead of pedwarn.
583 (warning_init): Call inform instead of warning_at.
585 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
587 * c-decl.c (merge_decls): Use set_decl_section_name.
588 (duplicate_decls): Remove node if it exists.
590 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
593 * c-typeck.c (push_init_level, process_init_element,
594 pop_init_level): Correct check for zero initialization, move
595 missing brace warning to respect zero initialization.
597 2014-06-05 Marek Polacek <polacek@redhat.com>
600 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
602 2014-06-05 Marek Polacek <polacek@redhat.com>
605 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
606 on the left hand side operand of a comparison.
608 2014-06-05 Marek Polacek <polacek@redhat.com>
611 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
612 Print note only if the warning was printed.
614 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
617 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
620 2014-06-03 Marek Polacek <polacek@redhat.com>
623 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
625 * c-tree.h (c_start_case): Update.
626 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
627 switch condition has boolean value.
629 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
631 * c-decl.c: Include builtins.h.
632 * c-parser.c: Likewise.
634 2014-05-27 Marek Polacek <polacek@redhat.com>
637 * c-typeck.c (convert_arguments): Get location of a parameter. Change
638 error and warning calls to error_at and warning_at. Pass location of
639 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
640 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
641 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
643 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
646 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
649 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
651 * c-decl.c (merge_decls): Preserve symtab node pointers.
652 (duplicate_decls): Free new decl.
654 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
656 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
659 * c-parser.c (c_parser_omp_target): Return bool values.
661 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
663 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
664 num_teams_loc variable to num_thread_limit_loc.
666 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
668 * c-array-notation.c (expand_array_notations): Use void_node
669 instead of void_zero_node.
671 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
673 * c-decl.c (finish_struct): Adjust.
674 (finish_enum): Likewise.
676 (record_inline_static): Likewise.
677 (push_scope): Likewise.
678 (make_label): Likewise.
679 (lookup_label_for_goto): Likewise.
680 (finish_struct): Likewise.
681 (finish_enum): Likewise.
682 (store_parm_decls): Likewise.
683 (c_push_function_context): Likewise.
684 * c-lang.h: Remove usage of variable_size gty attribute.
685 * c-parser.c (c_parse_init): Adjust.
686 (c_parse_file): Likewise.
688 2014-05-13 Marek Polacek <polacek@redhat.com>
691 * c-typeck.c (convert_for_assignment): Pass location to
692 WARN_FOR_ASSIGNMENT instead of input_location.
694 2014-05-10 Marek Polacek <polacek@redhat.com>
696 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
697 maybe_warn_string_init.
698 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
699 maybe_warn_string_init.
700 * c-tree.h (maybe_warn_string_init): Update declaration.
701 * c-typeck.c (maybe_warn_string_init): Add location parameter.
702 Call pedwarn_init with loc instead of with input_location.
703 (digest_init): Pass init_loc to maybe_warn_string_init.
704 (pop_init_level): Call pedwarn_init with loc instead of with
706 (set_init_index): Likewise.
707 (process_init_element): Likewise.
709 2014-05-09 Marek Polacek <polacek@redhat.com>
712 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
713 (c_parser_initelt): Pass location to set_init_label. Pass array index
714 location to set_init_index.
715 * c-tree.h (push_init_level): Update declaration.
716 (pop_init_level): Likewise.
717 (set_init_index): Likewise.
718 (set_init_label): Likewise.
719 * c-typeck.c (error_init): Add location parameter. Call error_at
721 (digest_init): Pass init_loc to error_init.
722 (really_start_incremental_init):
723 (push_init_level): Add location parameter. Pass loc to pop_init_level
725 (pop_init_level): Likewise.
726 (set_designator): Add location parameter. Pass loc to pop_init_level,
727 push_init_level, and error_init.
728 (set_init_index): Add location parameter. Pass loc to error_init and
730 (set_init_label): Likewise.
731 (output_init_element): Pass loc to error_init.
732 (process_init_element): Pass loc to error_init, pop_init_level,
733 pedwarn_init, and push_init_level.
735 2014-05-09 Marek Polacek <polacek@redhat.com>
738 * c-parser.c (c_parser_attributes): Parse the arguments as an
739 expression-list if the attribute takes identifier.
741 2014-05-08 Marek Polacek <polacek@redhat.com>
744 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
747 2014-05-08 Marek Polacek <polacek@redhat.com>
750 * c-decl.c (start_function): Warn for _Atomic-qualified return type
753 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
754 Mike Stump <mikestump@comcast.net>
755 Richard Sandiford <rdsandiford@googlemail.com>
757 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
758 (finish_enum): Use wide-int interfaces.
759 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
760 * c-typeck.c (build_c_cast): Likewise.
761 (set_nonincremental_init_from_string): Likewise.
762 (c_tree_equal): Likewise.
764 2014-05-02 Marek Polacek <polacek@redhat.com>
767 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
768 Return size_one_node when the type is not complete.
769 (pointer_diff): Remove comment.
770 (build_unary_op): Improve error messages.
772 2014-05-02 Marek Polacek <polacek@redhat.com>
774 * c-typeck.c (c_finish_return): Separate warning_at calls.
776 2014-05-02 Marek Polacek <polacek@redhat.com>
778 * c-tree.h (error_init): Remove declaration.
779 (pedwarn_init): Likewise.
780 * c-typeck.c (error_init): Make static and move above.
781 (pedwarn_init): Likewise.
782 (warning_init): Move above.
783 (maybe_warn_string_init): Likewise.
785 2014-05-01 Jeff Law <law@redhat.com>
789 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
790 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
793 2014-05-02 Marek Polacek <polacek@redhat.com>
796 * c-typeck.c (push_init_level): Set constructor_designated to
797 p->designated for structures.
799 2014-05-01 Marek Polacek <polacek@redhat.com>
802 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
803 function-definition has an attribute after the declarator.
805 2014-05-01 Marek Polacek <polacek@redhat.com>
808 * c-typeck.c (warning_init): Add location_t parameter. Call
809 warning_at instead of warning.
810 (push_init_level): Pass input_location to warning_init.
811 (add_pending_init): Add location_t parameter. Pass loc to
813 (set_nonincremental_init): Pass input_location to add_pending_init.
814 (set_nonincremental_init_from_string): Likewise.
815 (output_init_element): Pass loc to warning_init and to
818 2014-05-01 Marek Polacek <polacek@redhat.com>
821 * c-typeck.c (c_finish_return): Distinguish between label and variable
822 when warning about returning local address.
824 2014-05-01 Marek Polacek <polacek@redhat.com>
827 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
830 2014-05-01 Marek Polacek <polacek@redhat.com>
833 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
834 instead of 0 to WARN_FOR_QUALIFIERS.
836 2014-05-01 Marek Polacek <polacek@redhat.com>
839 * c-typeck.c (default_conversion): Use better location for
842 2014-04-30 Marek Polacek <polacek@redhat.com>
844 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
845 also when SANITIZE_FLOAT_DIVIDE is on.
847 2014-04-30 Marek Polacek <polacek@redhat.com>
850 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
851 and pedwarn_init. Use loc insted of input_location.
853 2014-04-30 Marek Polacek <polacek@redhat.com>
856 * c-typeck.c (build_binary_op): Use location when warning about
859 2014-04-25 Marek Polacek <polacek@redhat.com>
862 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
863 always_inline/noinline and hot/cold attributes.
865 2014-04-25 Marek Polacek <polacek@redhat.com>
868 * c-parser.c (c_parser_initelt): Pass input_location to
869 process_init_element.
870 (c_parser_initval): Pass loc to process_init_element.
871 * c-tree.h (process_init_element): Adjust declaration.
872 * c-typeck.c (push_init_level): Pass input_location to
873 process_init_element.
874 (pop_init_level): Likewise.
875 (set_designator): Likewise.
876 (output_init_element): Add location_t parameter. Pass loc to
878 (output_pending_init_elements): Pass input_location to
880 (process_init_element): Add location_t parameter. Pass loc to
883 2014-04-24 Jakub Jelinek <jakub@redhat.com>
885 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
886 atomic-clause, allow comma in between atomic-clause and
889 2014-04-22 Jakub Jelinek <jakub@redhat.com>
892 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
893 fails, don't set OM_PARALLEL_COMBINED and return NULL.
895 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
898 * c-array-notation.c (fix_builtin_array_notation_fn): Use
899 create_tmp_var instead build_decl for creating temps.
900 (build_array_notation_expr): Likewise.
901 (fix_conditional_array_notations_1): Likewise.
902 (fix_array_notation_expr): Likewise.
903 (fix_array_notation_call_expr): Likewise.
905 2014-03-28 Jakub Jelinek <jakub@redhat.com>
908 * c-tree.h (c_build_function_call_vec): New prototype.
909 * c-typeck.c (build_function_call_vec): Don't call
910 resolve_overloaded_builtin here.
911 (c_build_function_call_vec): New wrapper function around
912 build_function_call_vec. Call resolve_overloaded_builtin here.
913 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
914 Call c_build_function_call_vec instead of build_function_call_vec.
915 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
916 * c-decl.c (finish_decl): Likewise.
918 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
921 * c-typeck.c: Use correct format string in cast-qual warning
923 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
925 * c-decl.c (c_decl_attributes): Use
926 lang_hooks.types.omp_mappable_type.
927 * c-typeck.c (c_finish_omp_clauses): Likewise.
929 2014-03-06 Marek Polacek <polacek@redhat.com>
932 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
933 of checking tree code.
935 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
937 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
938 (c_parser_parameter_declaration): Likewise.
940 2014-02-19 Marek Polacek <polacek@redhat.com>
943 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
944 Call mark_exp_read on exp.value.
945 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
946 TREE_ADDRESSABLE on old instead of val.
947 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
949 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
951 * c-parser.c (c_parser_get_builtin_args): Replace calls to
952 C_EXPR_APPEND by vec_safe_push.
953 * c-tree.h (C_EXPR_APPEND): Remove.
955 2014-01-31 Marek Polacek <polacek@redhat.com>
958 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
959 build_function_call_vec.
960 (build_function_call): Likewise.
961 (build_atomic_assign): Likewise.
962 (build_function_call_vec): Add arg_loc parameter. Use it.
963 (convert_arguments): Likewise.
964 (convert_for_assignment): Rename rhs_loc to expr_loc.
965 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
966 (c_parser_objc_keywordexpr): Likewise.
967 (c_parser_postfix_expression_after_primary): Call
968 build_function_call_vec with expr_loc rather than op_loc.
969 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
970 build_function_call_vec.
971 (c_parser_expr_list): Add locations parameter. Fill it with locations
972 of function arguments.
973 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
975 2014-01-30 Marek Polacek <polacek@redhat.com>
978 * c-typeck.c (build_function_call_vec): Use loc parameter.
979 (convert_arguments): Add location parameter. Use it.
980 (ep_convert_and_check): Likewise.
981 (build_atomic_assign): Adjust convert_for_assignment call.
982 (build_modify_expr): Likewise.
983 (digest_init): Likewise.
984 (c_finish_return): Likewise.
985 (build_conditional_expr): Adjust ep_convert_and_check calls.
986 (convert_for_assignment): Add rhs_loc parameter. Use it.
987 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
990 2014-01-30 Richard Biener <rguenther@suse.de>
993 * c-typeck.c (build_function_call_vec): Do not replace calls
994 to a function via an incompatible type with a runtime abort.
996 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
998 * c-parser.c (c_parser_declaration_or_fndef): Replaced
999 flag_enable_cilkplus with flag_cilkplus.
1000 (c_parser_direct_declarator_inner): Likewise.
1001 (c_parser_attribute_any_word): Likewise.
1002 (c_parser_attributes): Likewise.
1003 (c_parser_compound_statement): Likewise.
1004 (c_parser_statement_after_labels): Likewise.
1005 (c_parser_if_statement): Likewise.
1006 (c_parser_switch_statement): Likewise.
1007 (c_parser_do_statement): Likewise.
1008 (c_parser_for_statement): Likewise.
1009 (c_parser_unary_expression): Likewise.
1010 (c_parser_postfix_expression): Likewise.
1011 (c_parser_postfix_expression_after_primary): Likewise.
1012 (c_parser_postfix_expression_after_primary): Likewise.
1013 (c_parser_omp_clause_name): Likewise.
1014 (c_finish_omp_declare_simd): Likewise.
1015 (c_parser_cilk_verify_simd): Likewise.
1016 * c-typeck.c (build_array_ref): Likewise.
1017 (build_function_call_vec): Likewise.
1018 (convert_arguments): Likewise.
1019 (build_compound_expr): Likewise.
1020 (c_finish_return): Likewise.
1021 (c_finish_if_stmt): Likewise.
1022 (c_finish_loop): Likewise.
1023 (build_binary_op): Likewise.
1025 2014-01-23 Marek Polacek <polacek@redhat.com>
1028 * c-typeck.c (parser_build_binary_op): Use location instead of
1030 (build_binary_op): Pass location to shorten_compare.
1032 2014-01-23 Marek Polacek <polacek@redhat.com>
1035 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1038 2014-01-23 Marek Polacek <polacek@redhat.com>
1041 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1042 of a comma expression.
1043 (emit_side_effect_warnings): Likewise.
1045 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1048 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1049 function to use walk_tree and moved a lot of its functionality to
1050 expand_array_notations.
1051 (expand_array_notations): New function.
1053 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1055 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1056 attribute an attribute without value.
1058 2014-01-23 Jakub Jelinek <jakub@redhat.com>
1061 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1062 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1064 2014-01-22 Marek Polacek <polacek@redhat.com>
1067 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1068 of remove_c_maybe_const_expr on op1 and op2.
1070 2014-01-15 Jakub Jelinek <jakub@redhat.com>
1073 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1074 effects, preevaluate rhs using SAVE_EXPR first.
1076 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1079 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1080 statements with if-elseif statements.
1082 2014-01-06 Marek Polacek <polacek@redhat.com>
1085 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1086 defined bit-field types only in ISO C.
1088 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1090 Update copyright years
1092 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1094 * c-array-notation.c: Use the standard form for the copyright notice.
1096 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1098 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1099 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1100 field in parser is not empty. If not-empty, call the function
1101 c_parser_finish_omp_declare_simd.
1102 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1103 between SIMD-enabled functions and #pragma simd. Added new parameter.
1104 (c_parser_cilk_all_clauses): Modified the usage of the function
1105 c_parser_cilk_clause_vectorlength as mentioned above.
1106 (c_parser_cilk_simd_fn_vector_attrs): New function.
1107 (c_finish_cilk_simd_fn_tokens): Likewise.
1108 (is_cilkplus_vector_p): Likewise.
1109 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1110 "nomask," and "mask" strings in clause name.
1111 (c_parser_omp_all_clauses): Added 3 new case statements:
1112 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1113 PRAGMA_CILK_CLAUSE_NOMASK.
1114 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1115 check for vector attribute and if so call the function
1116 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1117 called the function c_finish_cilk_simd_fn_tokens.
1118 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1119 parser field is non-empty. If so, parse them as you would parse
1120 the omp declare simd pragma.
1121 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1122 Added a check when step is a parameter and flag it as error.
1123 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1124 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1127 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1129 * c-parser.c (c_parser_omp_parallel): Fix description.
1131 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1133 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1134 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1135 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1136 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1138 2013-12-04 Joseph Myers <joseph@codesourcery.com>
1141 * c-parser.c (c_parser_alignas_specifier): Use
1142 c_sizeof_or_alignof_type instead of c_alignof.
1143 (c_parser_alignof_expression): Likewise, with min_alignof
1144 parameter depending on alignof spelling used.
1146 2013-12-04 Marek Polacek <polacek@redhat.com>
1149 * c-decl.c (start_function): Don't warn for missing prototype for
1152 2013-12-03 Marek Polacek <polacek@redhat.com>
1155 * c-decl.c (build_compound_literal): Allow compound literals with
1156 empty initial value.
1158 2013-12-02 Joseph Myers <joseph@codesourcery.com>
1161 * c-typeck.c (build_modify_expr): Diagnose assignment to
1162 expression with array type.
1164 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1167 * c-typeck.c (process_init_element): Do not treat a string as
1168 initializing a whole array when used with a designator for an
1171 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1174 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1175 an inline function following a static declaration.
1177 2013-11-28 Jakub Jelinek <jakub@redhat.com>
1180 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1181 to p_name before calling c_parser_omp_teams instead of after.
1182 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1183 argument. Remove unused p_name variable.
1185 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
1186 Jakub Jelinek <jakub@redhat.com>
1188 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1189 external_scope is NULL.
1191 2013-11-27 Tom de Vries <tom@codesourcery.com>
1192 Marc Glisse <marc.glisse@inria.fr>
1195 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1197 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1199 * c-typeck.c: Add required include files from gimple.h.
1201 2013-11-22 David Malcolm <dmalcolm@redhat.com>
1203 * c-decl.c (define_label, shadow_tag_warned)
1204 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1205 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1206 (declspecs_add_type): Remove use of in_system_header macro.
1207 * c-parser.c (c_parser_unary_expression): Likewise.
1208 * c-typeck.c (store_init_value, process_init_element)
1209 (c_start_case): Likewise.
1211 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1214 * c-parser.c (c_parser_set_source_position_from_token): Remove
1215 reference to in_system_header from comment.
1217 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1219 * c-decl.c (grokdeclarator): Update comment to refer to
1220 tree_to_[su]hwi rather than tree_low_cst.
1222 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1224 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1225 tree_to_uhwi throughout.
1227 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1229 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1232 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1234 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1237 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
1239 * c-parser.c (c_parser_cilk_simd): New.
1240 (c_parser_cilk_verify_simd): New.
1241 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1242 (c_parser_omp_for_loop): Add case for NE_EXPR.
1243 Set c_break_label for CILK_SIMD.
1244 (c_parser_cilk_clause_vectorlength): New.
1245 (c_parser_cilk_clause_linear): New.
1246 (c_parser_cilk_clause_name): New.
1247 (c_parser_cilk_all_clauses): New.
1248 * c-typeck.c (build_unary_op): Pass location argument to
1250 (build_modify_expr): Same.
1251 (build_asm_expr): Same.
1252 (c_finish_bc_stmt): Error on break/continue in loops.
1254 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
1256 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1258 2013-11-14 Diego Novillo <dnovillo@google.com>
1260 * c-decl.c: Include print-tree.h.
1261 Include stor-layout.h.
1264 Include stringpool.h.
1265 * c-lang.c: Include fold-const.h.
1266 * c-parser.c: Include stringpool.h.
1268 Include stor-layout.h.
1270 Include trans-mem.h.
1271 * c-typeck.c: Include stor-layout.h.
1272 Include trans-mem.h.
1276 2013-11-13 Joseph Myers <joseph@codesourcery.com>
1278 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1279 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1281 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1282 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1284 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1285 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1286 (c_parser_declarator, c_parser_direct_declarator_inner)
1287 (c_parser_parameter_declaration, c_parser_type_name): All callers
1289 (c_parser_declaration_or_fndef): Handle declarations with type
1290 determined from the initializer.
1292 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
1294 * c-typeck.c: Include gimplify.h.
1296 2013-11-12 Joseph Myers <joseph@codesourcery.com>
1298 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1299 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1301 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1302 or _Thread_local as appropriate in diagnostics.
1303 (build_null_declspecs): Initialize ret->thread_gnu_p.
1304 (declspecs_add_scspec): Handle either __thread or _Thread_local
1305 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1306 pedantic. Do not disallow _Thread_local extern and _Thread_local
1309 2013-11-07 Joseph Myers <joseph@codesourcery.com>
1310 Andrew MacLeod <amacleod@redhat.com>
1312 * c-aux-info.c (gen_type): Handle atomic qualifier.
1313 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1314 qualifiers when compating types.
1315 (shadow_tag_warned): Handle atomic_p in declspecs.
1316 (quals_from_declspecs): Likewise.
1317 (start_decl): Use c_type_promotes_to when promoting argument
1319 (grokdeclarator): Handle _Atomic.
1320 (get_parm_info): Diagnose any qualifier on "void" as only
1322 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1323 comparing types. Use c_type_promotes_to when promoting argument
1325 (finish_function): Use c_type_promotes_to when promoting argument
1327 (build_null_declspecs): Handle atomic_p in declspecs.
1328 (declspecs_add_qual): Handle RID_ATOMIC.
1329 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1330 (c_token_starts_declspecs): Handle RID_ATOMIC.
1331 (c_parser_declspecs): Handle atomic type specifiers and
1333 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1334 from types of expressions with atomic type.
1335 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1336 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1337 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1338 (c_parser_statement_after_labels, c_parser_switch_statement)
1339 (c_parser_for_statement, c_parser_expr_no_commas)
1340 (c_parser_conditional_expression, c_parser_binary_expression)
1341 (c_parser_cast_expression, c_parser_unary_expression)
1342 (c_parser_postfix_expression)
1343 (c_parser_postfix_expression_after_primary, c_parser_expression):
1344 Use convert_lvalue_to_rvalue.
1345 (c_parser_expression_conv, c_parser_expr_list): Document
1346 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1347 (c_parser_objc_synchronized_statement): Use
1348 convert_lvalue_to_rvalue.
1349 (c_parser_objc_selector): Handle RID_ATOMIC.
1350 (c_parser_objc_receiver, c_parser_array_notation): Use
1351 convert_lvalue_to_rvalue.
1352 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1353 _Atomic (type-name).
1354 (struct c_declspecs): Add atomic_p field.
1355 (convert_lvalue_to_rvalue): Declare.
1356 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1357 corresponding atomic types.
1358 (qualify_type): Don't add _Atomic qualifiers from second argument.
1359 (comp_target_types): Do not allow _Atomic mismatches.
1360 (type_lists_compatible_p): Do not remove atomic qualifiers when
1362 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1363 (build_atomic_assign): New functions.
1364 (build_unary_op): Use build_atomic_assign for atomic increment and
1366 (build_conditional_expr): Do not treat _Atomic void as a qualified
1368 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1369 (find_anonymous_field_with_type, convert_to_anonymous_field)
1370 (convert_for_assignment): Do not remove atomic qualifiers when
1372 (digest_init): Do not accept initialization of arrays of atomic
1373 elements by string constants.
1374 (build_asm_expr): Use convert_lvalue_to_rvalue.
1375 (build_binary_op): Do not treat _Atomic void as a qualified
1378 2013-11-06 DJ Delorie <dj@redhat.com>
1380 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1381 both explicit and builtin, print the location of the explicit one.
1383 2013-11-05 Tobias Burnus <burnus@net-b.de>
1385 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1386 c_parser_omp_distribute, c_parser_omp_teams,
1387 c_parser_omp_target, c_parser_omp_declare): Handle
1390 2013-11-03 Marek Polacek <polacek@redhat.com>
1392 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1394 2013-11-01 Jakub Jelinek <jakub@redhat.com>
1396 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1397 check_dup_generic at the end, unless remove is true.
1398 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1400 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1402 2013-10-31 Jakub Jelinek <jakub@redhat.com>
1404 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1405 with decl that is not pointer nor array.
1407 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1409 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1410 a spawning function is found.
1411 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1412 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1413 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1414 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1416 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1417 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1419 (c_finish_return): Added a check to reject _Cilk_spawn in return
1421 (build_cilk_spawn): New function.
1422 (build_cilk_sync): Likewise.
1423 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1425 2013-10-27 Tobias Burnus <burnus@net-b.de>
1428 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1429 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1430 (c_parser_statement_after_labels): Update calls.
1432 2013-10-24 Tobias Burnus <burnus@net-b.de>
1435 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1436 Handle PRAGMA_IVDEP.
1437 (c_parser_statement_after_labels): Update call.
1439 2013-10-24 Marek Polacek <polacek@redhat.com>
1441 * c-parser.c (c_parser_struct_declaration): Add a comment.
1442 (c_parser_declarator): Don't allow _Alignas here.
1444 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
1446 * c-parser.c: Include omp-low.h.
1447 * c-typeck.c: Likewise.
1449 2013-10-17 Marek Polacek <polacek@redhat.com>
1452 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1453 Document syntax of the array-declarator.
1454 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1456 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1457 (c_parser_struct_declaration): Likewise.
1458 (c_parser_declarator): Likewise.
1459 (c_parser_direct_declarator_inner): Likewise.
1460 (c_parser_parameter_declaration): Likewise.
1461 (c_parser_type_name): Likewise.
1463 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1465 * c-lang.h (current_omp_declare_target_attribute): New extern
1467 * c-parser.c: Include c-lang.h.
1468 (struct c_parser): Change tokens to c_token *.
1469 Add tokens_buf field. Change tokens_avail type to unsigned int.
1470 (c_parser_consume_token): If parser->tokens isn't
1471 &parser->tokens_buf[0], increment parser->tokens.
1472 (c_parser_consume_pragma): Likewise.
1473 (enum pragma_context): Add pragma_struct and pragma_param.
1474 (c_parser_external_declaration): Adjust
1475 c_parser_declaration_or_fndef caller.
1476 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1477 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1478 Adjust recursive call.
1479 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1481 (c_parser_parameter_declaration): Use pragma_param instead of
1483 (c_parser_compound_statement_nostart, c_parser_label,
1484 c_parser_for_statement): Adjust
1485 c_parser_declaration_or_fndef callers.
1486 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1487 it through to c_parser_conditional_expression.
1488 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1489 pass it through to c_parser_binary_expression. Adjust recursive
1491 (c_parser_binary_expression): Remove prec argument, add
1492 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1493 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1494 binop matches it, use build2 instead of parser_build_binary_op.
1495 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1496 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1497 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1498 Handle pragma_struct and pragma_param the same as pragma_external.
1499 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1500 (c_parser_omp_variable_list): Parse array sections for
1501 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1502 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1503 (c_parser_omp_clause_reduction): Handle user defined reductions.
1504 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1505 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1506 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1507 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1508 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1509 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1510 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1511 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1512 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1513 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1514 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1515 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1516 (c_parser_omp_for_loop): Add CODE argument, pass it through
1517 to c_finish_omp_for. Change last argument to cclauses,
1518 and adjust uses to grab parallel clauses from the array of all
1519 the split clauses. Adjust c_parser_binary_expression,
1520 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1521 (omp_split_clauses): New function.
1522 (c_parser_omp_simd): New function.
1523 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1524 Allow the function to be called also when parsing combined constructs,
1525 and call c_parser_omp_simd when parsing for simd.
1526 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1527 #pragma omp section, require exactly one structured-block instead of
1528 sequence of statements.
1529 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1530 Allow the function to be called also when parsing combined constructs.
1531 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1532 Allow the function to be called also when parsing combined
1534 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1535 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1536 c_parser_omp_teams, c_parser_omp_target_data,
1537 c_parser_omp_target_update, c_parser_omp_target,
1538 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1539 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1540 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1541 (c_parser_omp_construct): Add p_name and mask vars. Handle
1542 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1543 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1544 and c_parser_omp_sections callers.
1545 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1546 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1547 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1548 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1549 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1551 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1552 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1553 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1554 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1555 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1556 * c-typeck.c: Include tree-inline.h.
1557 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1558 handle_omp_array_sections_1, handle_omp_array_sections,
1559 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1560 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1561 user defined reductions.
1562 (c_tree_equal): New function.
1563 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1564 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1565 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1566 c_check_omp_declare_reduction_r): New prototypes.
1567 * c-decl.c (current_omp_declare_target_attribute): New variable.
1568 (c_decl_attributes): New function.
1569 (start_decl, start_function): Use it instead of decl_attributes.
1570 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1571 c_omp_reduction_decl, c_omp_reduction_lookup,
1572 c_check_omp_declare_reduction_r): New functions.
1574 2013-09-25 Tom Tromey <tromey@redhat.com>
1576 * Make-lang.in (c/gccspec.o): Remove.
1577 (CFLAGS-c/gccspec.o): New variable.
1578 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1579 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1580 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1582 2013-09-25 Tom Tromey <tromey@redhat.com>
1584 * Make-lang.in (c/gccspec.o): Don't use subshell.
1586 2013-09-18 Marek Polacek <polacek@redhat.com>
1589 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1590 Remove unnecessary check.
1592 2013-09-18 Marek Polacek <polacek@redhat.com>
1595 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1596 no_sanitize_undefined attribute.
1598 2013-09-13 Kai Tietz <ktietz@redhat.com>
1601 * c-decl.c (c_builtin_function_ext_scope): Remove
1602 wrong assumption that it is never called on prexisting
1605 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1607 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1609 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1611 * c-objc-common.c (c_tree_printer): Tidy.
1613 2013-08-30 Marek Polacek <polacek@redhat.com>
1615 * c-typeck.c (build_binary_op): Add division by zero and shift
1618 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
1619 Joseph Myers <joseph@codesourcery.com>
1622 * c-typeck.c (c_common_type): Prefer double_type_node over
1623 other REAL_TYPE types with the same precision.
1624 (convert_arguments): Likewise.
1626 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1628 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1629 (c_initialize_diagnostics): Call a destructor for the early printer.
1631 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1633 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1634 printer initialization.
1636 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1639 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1640 check for truth values.
1641 (expand_array_notation_exprs): Added truth values case. Removed an
1642 unwanted else. Added for-loop to walk through subtrees in default
1645 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1647 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1649 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1651 * c-parser.c (struct c_generic_association): Fix typo.
1653 2013-07-23 Tom Tromey <tromey@redhat.com>
1654 Joseph Myers <joseph@codesourcery.com>
1656 * c-parser.c (struct c_generic_association): New.
1657 (c_generic_association_d): New typedef.
1658 (c_parser_generic_selection): New function.
1659 (c_parser_postfix_expression): Handle RID_GENERIC.
1661 2013-07-13 Jason Merrill <jason@redhat.com>
1664 * c-decl.c (finish_struct): Check for too-large class.
1666 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1669 * c-typeck.c (set_init_index): When folding, check for index overflow.
1671 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1673 * c-parser.c (c_parser_array_notation): Removed rejection of array
1674 notations in an array of function pointers.
1676 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1678 * c-array-notation.c (make_triplet_val_inv): New function.
1679 (create_cmp_incr): Likewise.
1680 (create_array_refs): Likewise.
1681 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1682 Also modularized common parts between functions and called the function.
1683 (build_array_notation_expr): Likewise.
1684 (fix_conditional_array_notations_1): Likewise.
1685 (fix_array_notation_expr): Likewise.
1686 (fix_array_notation_call_expr): Likewise.
1688 2013-06-18 Marek Polacek <polacek@redhat.com>
1691 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1693 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1695 * c-array-notation.c (build_array_notation_expr): Reject array notation
1696 mismatch between LHS and RHS even inside a call_expr. Also, removed
1697 a couple while statements that were dead code.
1699 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1701 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1702 excessive precision expressions in function parameters. Also removed
1703 couple unwanted while statements.
1705 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1707 * c-array-notation.c (expand_array_notation_exprs): Added
1708 ARRAY_NOTATION_REF case.
1710 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1712 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1713 function to c-family/array-notation-common.c.
1714 (is_cilkplus_reduce_builtin): Likewise.
1715 (find_rank): Likewise.
1716 (extract_array_notation_exprs): Likewise.
1717 (replace_array_notations): Likewise.
1718 (find_inv_trees): Likewise.
1719 (replace_inv_trees): Likewise.
1720 (contains_array_notation_expr): Likewise.
1721 (find_correct_array_notation_type): Likewise.
1722 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1723 (struct inv_list): Moved this to c-family/array-notation-common.c.
1724 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1726 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1728 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1729 reduction functions outside the for-loop. Added a check if the fundecl
1730 is non-NULL. Finally, removed an unwanted if-statement, and made the
1733 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1735 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1736 condition of the if-statement matches the rank of else-block and then-
1737 block when array notations are used.
1738 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1739 expression after the entire function body is parsed.
1740 (c_parser_expr_no_commas): Delayed creating array notation expressions
1741 to the end of function parsing.
1742 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1743 whole if-statement instead of just the condition.
1744 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1746 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1749 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1750 array to NULL_TREE if they are unused. Also added a check for the
1751 field to be NULL before its fields are used in future.
1753 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1756 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1757 (build_array_notation_expr): Likewise.
1759 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1761 * c-typeck.c (build_array_ref): Added a check to see if array's
1762 index is greater than one. If true, then emit an error.
1763 (build_function_call_vec): Exclude error reporting and checking
1764 for builtin array-notation functions.
1765 (convert_arguments): Likewise.
1766 (c_finish_return): Added a check for array notations as a return
1767 expression. If true, then emit an error.
1768 (c_finish_loop): Added a check for array notations in a loop
1769 condition. If true then emit an error.
1770 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1771 (build_binary_op): Added a check for array notation expr inside
1772 op1 and op0. If present, we call another function to find correct
1774 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1775 * c-parser.c (c_parser_compound_statement): Check if array
1776 notation code is used in tree, if so, then transform them into
1778 (c_parser_expr_no_commas): Check if array notation is used in LHS
1779 or RHS, if so, then build array notation expression instead of
1781 (c_parser_postfix_expression_after_primary): Added a check for
1782 colon(s) after square braces, if so then handle it like an array
1783 notation. Also, break up array notations in unary op if found.
1784 (c_parser_direct_declarator_inner): Added a check for array
1786 (c_parser_compound_statement): Added a check for array notation in
1787 a stmt. If one is present, then expand array notation expr.
1788 (c_parser_if_statement): Likewise.
1789 (c_parser_switch_statement): Added a check for array notations in
1790 a switch statement's condition. If true, then output an error.
1791 (c_parser_while_statement): Similarly, but for a while.
1792 (c_parser_do_statement): Similarly, but for a do-while.
1793 (c_parser_for_statement): Similarly, but for a for-loop.
1794 (c_parser_unary_expression): Check if array notation is used in a
1795 pre-increment or pre-decrement expression. If true, then expand
1797 (c_parser_array_notation): New function.
1798 * c-array-notation.c: New file.
1799 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1801 2013-05-23 Mike Stump <mikestump@comcast.net>
1803 * c-typeck.c (convert_for_assignment): Handle references to memory
1806 2013-05-16 Jason Merrill <jason@redhat.com>
1808 * Make-lang.in (cc1$(exeext)): Use link mutex.
1810 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1812 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1813 to simply use OPT_Wpointer_arith.
1814 (build_unary_op): Likewise.
1816 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1819 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1820 argument. If set, or it temporarily for parsing of the first
1821 argument into force_folding_builtin_constant_p.
1822 (c_parser_postfix_expression): Adjust callers.
1824 2013-03-21 Richard Biener <rguenther@suse.de>
1826 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1827 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1829 2013-02-12 Marek Polacek <polacek@redhat.com>
1832 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1835 2013-01-24 Jakub Jelinek <jakub@redhat.com>
1838 * c-typeck.c (set_nonincremental_init_from_string): If
1839 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1841 (process_init_element): Likewise.
1843 2012-12-20 Jakub Jelinek <jakub@redhat.com>
1846 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1847 argument, don't call default_function_array_conversion
1848 nor c_fully_fold here.
1849 (c_parser_asm_statement): Adjust callers.
1850 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1851 and outputs here, and call default_function_array_conversion
1852 on inputs that don't need to be addressable.
1854 2012-12-18 Jakub Jelinek <jakub@redhat.com>
1857 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1858 warning require that both c_common_unsigned_type as well as
1859 c_common_signed_type is the same for both mvl and mvr types.
1861 2012-11-16 Diego Novillo <dnovillo@google.com>
1863 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1865 * c-common.c: Use new vec API in vec.h.
1866 * c-common.h: Likewise.
1867 * c-gimplify.c: Likewise.
1868 * c-pragma.c: Likewise.
1869 * c-pretty-print.c: Likewise.
1870 * c-pretty-print.h: Likewise.
1871 * c-semantics.c: Likewise.
1872 * c-decl.c: Likewise.
1873 * c-parser.c: Likewise.
1874 * c-tree.h: Likewise.
1875 * c-typeck.c: Likewise.
1877 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1880 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1882 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1885 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1886 shadows a function, unless the variable is a function or a
1887 pointer-to-function.
1889 2012-10-12 Jakub Jelinek <jakub@redhat.com>
1892 * c-parser.c (struct c_tree_loc_pair): Removed.
1893 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1894 add location_t * and tree * arguments, fill in array of 3
1895 sizeof_arg trees and corresponding locs.
1896 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1897 c_parser_expr_list callers.
1898 (c_parser_postfix_expression_after_primary): Likewise. Pass
1899 array of 3 sizeof_arg trees and locs (corresponding to first
1900 3 arguments) to sizeof_pointer_memaccess_warning.
1902 2012-10-09 Lawrence Crowl <crowl@google.com>
1904 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1905 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1908 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1911 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1914 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
1917 * c-typeck.c: Include c-common.h.
1918 (enum stv_conv): Moved to c-common.h.
1919 (scalar_to_vector): Moved to c-common.c.
1920 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1921 * Make-lang.in: c-typeck.c depends on c-common.h.
1923 2012-10-04 Arnaud Charlet <charlet@adacore.com>
1925 * c-decl.c (c_write_global_declarations): Fix handling of
1928 2012-09-30 Sharad Singhai <singhai@google.com>
1930 * c-decl.c (c_write_global_declarations): Use a different method
1931 to determine if the dump has ben initialized.
1933 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1936 * c-typeck.c (c_cast_expr): When casting to a type requiring
1937 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1940 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1943 * c-typeck.c (build_unary_op): Pass original argument of
1944 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1945 any C_MAYBE_CONST_EXPR, if it has integer operands.
1946 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1947 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1948 to c_objc_common_truthvalue_conversion, then remove any
1949 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1950 c_objc_common_truthvalue_conversion not
1951 c_common_truthvalue_conversion.
1952 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1953 call note_integer_operands for arguments with integer operands
1954 that are not integer constants.
1956 2012-09-13 Jakub Jelinek <jakub@redhat.com>
1959 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1960 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1962 2012-08-31 Jakub Jelinek <jakub@redhat.com>
1965 * c-convert.c (convert): Don't call fold_convert_loc if
1966 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1967 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1968 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1970 2012-08-24 Jakub Jelinek <jakub@redhat.com>
1973 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1974 for nested and empty_ok arguments in the call to
1975 c_parser_declaration_or_fndef.
1977 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1979 * c-tree.h (c_last_sizeof_arg): Declare.
1980 * c-parser.c (struct c_tree_loc_pair): New type.
1981 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1983 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1984 (c_parser_postfix_expression_after_primary): Likewise. Call
1985 sizeof_pointer_memaccess_warning if needed.
1986 (sizeof_ptr_memacc_comptypes): New function.
1987 * c-typeck.c (c_last_sizeof_arg): New global variable.
1988 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1990 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1992 * c-lang.h (lang_decl): Add variable_size GTY option.
1994 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1996 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1997 * Make-lang.in: Fix dependencies.
1999 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2001 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2002 and add language Makefile hooks.
2003 * config-lang.in: New file.
2004 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2005 add the required "normal" config-lang.in rules.
2006 * c-lang.h: Moved from gcc/ to here.
2007 * c-tree.h: Likewise.
2008 * c-objc-common.c: Likewise.
2009 * c-objc-common.h: Likewise.
2010 * c-typeck.c: Likewise.
2011 * c-convert.c: Likewise.
2012 * c-lang.c: Likewise.
2013 * c-aux-info.c: Likewise.
2014 * c-errors.c: Likewise.
2015 * gccspec.c: Likewise.
2016 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2017 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2019 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2021 Copying and distribution of this file, with or without modification,
2022 are permitted in any medium without royalty provided the copyright
2023 notice and this notice are preserved.