1 2014-10-30 Marek Polacek <polacek@redhat.com>
3 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4 print the stripped version as well, if they're not the same.
6 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
11 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
13 * c-decl.c: Adjust include files.
16 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
17 Tom Tromey <tromey@redhat.com>
19 * c-tree.h (enum c_oracle_request): New.
20 (c_binding_oracle_function): New typedef.
21 (c_binding_oracle, c_pushtag, c_bind): Declare.
22 * c-decl.c (c_binding_oracle): New global.
23 (I_SYMBOL_CHECKED): New macro.
24 (i_symbol_binding): New function.
25 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
26 (I_TAG_CHECKED): New macro.
27 (i_tag_binding): New function.
28 (I_TAG_BINDING, I_TAG_DECL): Redefine.
29 (I_LABEL_CHECKED): New macro.
30 (i_label_binding): New function.
31 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
32 (c_print_identifier): Save and restore c_binding_oracle.
33 (c_pushtag, c_bind): New functions.
35 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
37 * c-typeck.c: Adjust include files.
39 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
42 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
43 initialization here...
44 (c_initialize_diagnostics): ... but here. Set defaults after
45 building pretty-printer.
47 2014-10-23 Marek Polacek <polacek@redhat.com>
50 * c-decl.c (pop_scope): Don't print warning in external_scope.
52 2014-10-19 Marek Polacek <polacek@redhat.com>
55 * c-typeck.c (output_init_element): Allow initializing objects with
56 static storage duration with compound literals even in C99 and add
59 2014-10-17 Marek Polacek <polacek@redhat.com>
62 * c-typeck.c (digest_init): Allow initializing objects with static
63 storage duration with compound literals even in C99 and add pedwarn
66 2014-10-17 Marek Polacek <polacek@redhat.com>
69 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
70 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
71 error multiple times. Print the type.
73 2014-10-17 Marek Polacek <polacek@redhat.com>
76 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
79 2014-10-17 Marek Polacek <polacek@redhat.com>
81 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
82 (start_function): Use OPT_Wimplicit_int instead of 0.
83 (store_parm_decls_oldstyle): Likewise.
85 2014-10-17 Alan Modra <amodra@gmail.com>
88 * c-decl.c (merge_decls): Don't merge section name or tls model
89 to newdecl symtab node, instead merge to olddecl. Override
90 existing olddecl section name. Set tls_model for all thread-local
91 vars, not just OMP thread-private ones. Remove incorrect comment.
93 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
95 * c-decl.c: Adjust include files.
97 2014-10-14 DJ Delorie <dj@redhat.com>
99 * c-parser.c (c_parse_init): Add RID entries for each __intN.
100 (c_token_starts_typename): Check all __intN, not just __int128.
101 (c_token_starts_declspecs): Likewise.
102 (c_parser_declspecs): Likewise.
103 (c_parser_attribute_any_word): Likewise.
104 (c_parser_objc_selector): Likewise.
105 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
106 (struct c_declspecs): Add int_n_idx field to record *which* __intN
108 * c-decl.c (declspecs_add_type): Check for all __intN, not just
110 (finish_declspecs): Likewise.
112 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
114 * c-parser.c (c_parser_all_labels): New function to replace
116 (c_parser_statement): Call the new function.
118 2014-10-09 Marek Polacek <polacek@redhat.com>
121 * c-typeck.c (pop_init_level): Don't warn about initializing
124 2014-10-07 Marek Polacek <polacek@redhat.com>
127 * c-decl.c (header_for_builtin_fn): New function.
128 (implicitly_declare): Suggest which header to include.
130 2014-10-07 Marek Polacek <polacek@redhat.com>
132 * c-convert.c (convert): Use error_operand_p.
133 * c-typeck.c (require_complete_type): Likewise.
134 (really_atomic_lvalue): Likewise.
135 (digest_init): Likewise.
136 (handle_omp_array_sections_1): Likewise.
138 2014-10-03 Marek Polacek <polacek@redhat.com>
141 * c-decl.c (pop_scope): Don't warn about "inline function declared
142 but never defined" for functions marked with gnu_inline attribute.
144 2014-09-25 Jakub Jelinek <jakub@redhat.com>
147 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
148 on low_bound and length.
150 2014-09-24 Marek Polacek <polacek@redhat.com>
154 * c-parser.c: Don't define CPP_KEYWORD.
155 (c_parser_switch_statement): Pass original type to c_finish_case.
156 * c-tree.h (c_finish_case): Update declaration.
157 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
158 conditionally to c_do_switch_warnings.
160 2014-09-03 Marek Polacek <polacek@redhat.com>
163 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
166 2014-09-02 Jakub Jelinek <jakub@redhat.com>
167 Balaji V. Iyer <balaji.v.iyer@intel.com>
168 Igor Zamyatin <igor.zamyatin@intel.com>
170 * c-parser.c (c_parser_cilk_for): New function.
171 (c_parser_cilk_grainsize): Likewise.
172 (c_get_temp_regvar): Likewise.
173 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
174 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
175 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
176 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
179 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
181 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
182 with using HOST_WIDE_INT without truncation to 'int'
184 2014-08-22 Marek Polacek <polacek@redhat.com>
187 * c-typeck.c (parser_build_binary_op): Adjust call to
188 warn_logical_not_parentheses.
190 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
193 * c-parser.c (c_parser_array_notation): Check for correct
194 type of an array added.
196 2014-08-19 Marek Polacek <polacek@redhat.com>
199 * c-typeck.c (build_binary_op): If either operand of a comparison
200 is a boolean expression, call maybe_warn_bool_compare.
202 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
205 * c-typeck.c (build_c_cast): Do a conversion even when the
206 TYPE_MAIN_VARIANTs are the same.
208 2014-08-19 Marek Polacek <polacek@redhat.com>
210 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
211 pedwarn_c99 instead of pedwarn.
212 (grokfield): Likewise.
213 (warn_defaults_to): New function.
214 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
215 Unconditionally call pedwarn_c99 instead of pedwarn.
216 (start_function): Call warn_defaults_to instead of pedwarn_c99.
217 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
218 check flag_isoc11 before.
219 * c-errors.c (pedwarn_c99): Change the return type to bool.
220 Handle -Wc99-c11-compat.
221 * c-parser.c (disable_extension_diagnostics): Handle
223 (restore_extension_diagnostics): Likewise.
224 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
225 instead of pedwarn, don't check flag_isoc11 before.
226 (c_parser_declspecs): Likewise.
227 (c_parser_alignas_specifier): Likewise.
228 (c_parser_alignof_expression): Likewise.
229 (c_parser_generic_selection): Likewise.
230 * c-tree.h (pedwarn_c99): Update declaration.
231 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
234 2014-08-19 Marek Polacek <polacek@redhat.com>
236 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
238 * c-errors.c: Include "opts.h".
239 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
240 * c-parser.c (disable_extension_diagnostics): Handle negative value
241 of warn_c90_c99_compat, too.
242 (restore_extension_diagnostics): Likewise.
243 (c_parser_compound_statement_nostart): Pass
244 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
246 2014-08-12 Marek Polacek <polacek@redhat.com>
248 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
250 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
252 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
254 2014-08-10 Marek Polacek <polacek@redhat.com>
257 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
258 Call pedwarn_c90 instead of pedwarn.
259 (check_bitfield_type_and_width): Likewise.
260 (declspecs_add_qual): Likewise.
261 (declspecs_add_type): Likewise.
262 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
263 Adjust to only call pedwarn_c90.
264 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
265 pedwarn_c90 instead of pedwarn.
266 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
267 * c-parser.c (disable_extension_diagnostics): Handle
269 (restore_extension_diagnostics): Likewise.
270 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
271 pedwarn_c90 instead of pedwarn.
272 (c_parser_initelt): Likewise.
273 (c_parser_postfix_expression): Likewise.
274 (c_parser_postfix_expression_after_paren_type): Likewise.
275 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
276 * c-tree.h: Fix formatting.
277 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
278 pedwarn_c90 instead of pedwarn.
280 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
282 * c-typeck.c: Remove include of pointer-set.h.
284 2014-08-07 Marek Polacek <polacek@redhat.com>
286 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
288 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
290 * c-typeck.c: Use hash_map instead of pointer_map.
292 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
294 * c-decl.c: Use hash_set instead of pointer_set.
296 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
299 * c-array-notation.c (expand_array_notations): Handling
302 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
305 * c-typeck.c (c_finish_return): Return 0 instead of the address of
308 2014-07-30 Tom Tromey <tromey@redhat.com>
310 * c-typeck.c (struct constructor_stack) <designator_depth>: New
312 (really_start_incremental_init, push_init_level): Initialize
314 (pop_init_level): Set global designator_depth.
315 (process_init_element): Check for designated_init attribute.
317 2014-07-20 Marek Polacek <polacek@redhat.com>
320 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
321 (implicitly_declare): Pass location to implicit_decl_warning.
323 2014-07-14 Jakub Jelinek <jakub@redhat.com>
326 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
327 If non-NULL, call c_parser_check_literal_zero.
328 (c_parser_check_literal_zero): New function.
329 (c_parser_postfix_expression_after_primary): Adjust
330 c_parser_expr_list caller, handle -Wmemset-transposed-args.
332 2014-07-06 Marek Polacek <polacek@redhat.com>
335 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
336 * c-tree.h (C_ARRAY_PARAMETER): Define.
337 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
340 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
341 Chen Gang <gang.chen.5i5j@gmail.com>
343 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
346 2014-07-01 Marek Polacek <polacek@redhat.com>
348 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
349 instead of 0 to WARN_FOR_ASSIGNMENT.
351 2014-07-01 Marek Polacek <polacek@redhat.com>
354 * c-typeck.c (convert_for_assignment): Pass
355 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
357 2014-06-30 Marek Polacek <polacek@redhat.com>
359 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
360 has no_sanitize_undefined attribute.
362 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
365 * c-array-notation.c (fix_builtin_array_notation_fn):
366 Check for 0 arguments in builtin call. Check that bultin argument is
368 * c-parser.c (c_parser_array_notation): Check for incorrect initial
371 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
373 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
374 qualifiers in __auto_type for atomic types.
375 (c_parser_typeof_specifier): Discard all type qualifiers in
376 __typeof__ for atomic types.
378 2014-06-25 Marek Polacek <polacek@redhat.com>
381 * c-parser.c (c_parser_statement_after_labels): Pass the location of
382 the return expression to c_finish_return.
384 2014-06-25 Jakub Jelinek <jakub@redhat.com>
386 * c-typeck.c (c_finish_omp_clauses): Make sure
387 OMP_CLAUSE_LINEAR_STEP has correct type.
389 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
393 2014-06-24 Jakub Jelinek <jakub@redhat.com>
395 * c-parser.c (c_parser_omp_for_loop): For
396 #pragma omp parallel for simd move lastprivate clause from parallel
397 to for rather than simd.
399 2014-06-23 Marek Polacek <polacek@redhat.com>
401 * c-typeck.c (parser_build_binary_op): Don't call
402 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
404 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
406 * c-parser.c (c_parser_omp_threadprivate): Likewise.
407 * c-decl.c (merge_decls): Likewise.
409 2014-06-09 Marek Polacek <polacek@redhat.com>
412 * c-typeck.c (error_init): Call inform instead of error_at.
413 (pedwarn_init): Call inform instead of pedwarn.
414 (warning_init): Call inform instead of warning_at.
416 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
418 * c-decl.c (merge_decls): Use set_decl_section_name.
419 (duplicate_decls): Remove node if it exists.
421 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
424 * c-typeck.c (push_init_level, process_init_element,
425 pop_init_level): Correct check for zero initialization, move
426 missing brace warning to respect zero initialization.
428 2014-06-05 Marek Polacek <polacek@redhat.com>
431 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
433 2014-06-05 Marek Polacek <polacek@redhat.com>
436 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
437 on the left hand side operand of a comparison.
439 2014-06-05 Marek Polacek <polacek@redhat.com>
442 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
443 Print note only if the warning was printed.
445 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
448 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
451 2014-06-03 Marek Polacek <polacek@redhat.com>
454 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
456 * c-tree.h (c_start_case): Update.
457 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
458 switch condition has boolean value.
460 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
462 * c-decl.c: Include builtins.h.
463 * c-parser.c: Likewise.
465 2014-05-27 Marek Polacek <polacek@redhat.com>
468 * c-typeck.c (convert_arguments): Get location of a parameter. Change
469 error and warning calls to error_at and warning_at. Pass location of
470 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
471 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
472 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
474 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
477 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
480 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
482 * c-decl.c (merge_decls): Preserve symtab node pointers.
483 (duplicate_decls): Free new decl.
485 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
487 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
490 * c-parser.c (c_parser_omp_target): Return bool values.
492 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
494 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
495 num_teams_loc variable to num_thread_limit_loc.
497 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
499 * c-array-notation.c (expand_array_notations): Use void_node
500 instead of void_zero_node.
502 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
504 * c-decl.c (finish_struct): Adjust.
505 (finish_enum): Likewise.
507 (record_inline_static): Likewise.
508 (push_scope): Likewise.
509 (make_label): Likewise.
510 (lookup_label_for_goto): Likewise.
511 (finish_struct): Likewise.
512 (finish_enum): Likewise.
513 (store_parm_decls): Likewise.
514 (c_push_function_context): Likewise.
515 * c-lang.h: Remove usage of variable_size gty attribute.
516 * c-parser.c (c_parse_init): Adjust.
517 (c_parse_file): Likewise.
519 2014-05-13 Marek Polacek <polacek@redhat.com>
522 * c-typeck.c (convert_for_assignment): Pass location to
523 WARN_FOR_ASSIGNMENT instead of input_location.
525 2014-05-10 Marek Polacek <polacek@redhat.com>
527 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
528 maybe_warn_string_init.
529 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
530 maybe_warn_string_init.
531 * c-tree.h (maybe_warn_string_init): Update declaration.
532 * c-typeck.c (maybe_warn_string_init): Add location parameter.
533 Call pedwarn_init with loc instead of with input_location.
534 (digest_init): Pass init_loc to maybe_warn_string_init.
535 (pop_init_level): Call pedwarn_init with loc instead of with
537 (set_init_index): Likewise.
538 (process_init_element): Likewise.
540 2014-05-09 Marek Polacek <polacek@redhat.com>
543 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
544 (c_parser_initelt): Pass location to set_init_label. Pass array index
545 location to set_init_index.
546 * c-tree.h (push_init_level): Update declaration.
547 (pop_init_level): Likewise.
548 (set_init_index): Likewise.
549 (set_init_label): Likewise.
550 * c-typeck.c (error_init): Add location parameter. Call error_at
552 (digest_init): Pass init_loc to error_init.
553 (really_start_incremental_init):
554 (push_init_level): Add location parameter. Pass loc to pop_init_level
556 (pop_init_level): Likewise.
557 (set_designator): Add location parameter. Pass loc to pop_init_level,
558 push_init_level, and error_init.
559 (set_init_index): Add location parameter. Pass loc to error_init and
561 (set_init_label): Likewise.
562 (output_init_element): Pass loc to error_init.
563 (process_init_element): Pass loc to error_init, pop_init_level,
564 pedwarn_init, and push_init_level.
566 2014-05-09 Marek Polacek <polacek@redhat.com>
569 * c-parser.c (c_parser_attributes): Parse the arguments as an
570 expression-list if the attribute takes identifier.
572 2014-05-08 Marek Polacek <polacek@redhat.com>
575 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
578 2014-05-08 Marek Polacek <polacek@redhat.com>
581 * c-decl.c (start_function): Warn for _Atomic-qualified return type
584 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
585 Mike Stump <mikestump@comcast.net>
586 Richard Sandiford <rdsandiford@googlemail.com>
588 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
589 (finish_enum): Use wide-int interfaces.
590 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
591 * c-typeck.c (build_c_cast): Likewise.
592 (set_nonincremental_init_from_string): Likewise.
593 (c_tree_equal): Likewise.
595 2014-05-02 Marek Polacek <polacek@redhat.com>
598 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
599 Return size_one_node when the type is not complete.
600 (pointer_diff): Remove comment.
601 (build_unary_op): Improve error messages.
603 2014-05-02 Marek Polacek <polacek@redhat.com>
605 * c-typeck.c (c_finish_return): Separate warning_at calls.
607 2014-05-02 Marek Polacek <polacek@redhat.com>
609 * c-tree.h (error_init): Remove declaration.
610 (pedwarn_init): Likewise.
611 * c-typeck.c (error_init): Make static and move above.
612 (pedwarn_init): Likewise.
613 (warning_init): Move above.
614 (maybe_warn_string_init): Likewise.
616 2014-05-01 Jeff Law <law@redhat.com>
620 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
621 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
624 2014-05-02 Marek Polacek <polacek@redhat.com>
627 * c-typeck.c (push_init_level): Set constructor_designated to
628 p->designated for structures.
630 2014-05-01 Marek Polacek <polacek@redhat.com>
633 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
634 function-definition has an attribute after the declarator.
636 2014-05-01 Marek Polacek <polacek@redhat.com>
639 * c-typeck.c (warning_init): Add location_t parameter. Call
640 warning_at instead of warning.
641 (push_init_level): Pass input_location to warning_init.
642 (add_pending_init): Add location_t parameter. Pass loc to
644 (set_nonincremental_init): Pass input_location to add_pending_init.
645 (set_nonincremental_init_from_string): Likewise.
646 (output_init_element): Pass loc to warning_init and to
649 2014-05-01 Marek Polacek <polacek@redhat.com>
652 * c-typeck.c (c_finish_return): Distinguish between label and variable
653 when warning about returning local address.
655 2014-05-01 Marek Polacek <polacek@redhat.com>
658 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
661 2014-05-01 Marek Polacek <polacek@redhat.com>
664 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
665 instead of 0 to WARN_FOR_QUALIFIERS.
667 2014-05-01 Marek Polacek <polacek@redhat.com>
670 * c-typeck.c (default_conversion): Use better location for
673 2014-04-30 Marek Polacek <polacek@redhat.com>
675 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
676 also when SANITIZE_FLOAT_DIVIDE is on.
678 2014-04-30 Marek Polacek <polacek@redhat.com>
681 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
682 and pedwarn_init. Use loc insted of input_location.
684 2014-04-30 Marek Polacek <polacek@redhat.com>
687 * c-typeck.c (build_binary_op): Use location when warning about
690 2014-04-25 Marek Polacek <polacek@redhat.com>
693 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
694 always_inline/noinline and hot/cold attributes.
696 2014-04-25 Marek Polacek <polacek@redhat.com>
699 * c-parser.c (c_parser_initelt): Pass input_location to
700 process_init_element.
701 (c_parser_initval): Pass loc to process_init_element.
702 * c-tree.h (process_init_element): Adjust declaration.
703 * c-typeck.c (push_init_level): Pass input_location to
704 process_init_element.
705 (pop_init_level): Likewise.
706 (set_designator): Likewise.
707 (output_init_element): Add location_t parameter. Pass loc to
709 (output_pending_init_elements): Pass input_location to
711 (process_init_element): Add location_t parameter. Pass loc to
714 2014-04-24 Jakub Jelinek <jakub@redhat.com>
716 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
717 atomic-clause, allow comma in between atomic-clause and
720 2014-04-22 Jakub Jelinek <jakub@redhat.com>
723 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
724 fails, don't set OM_PARALLEL_COMBINED and return NULL.
726 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
729 * c-array-notation.c (fix_builtin_array_notation_fn): Use
730 create_tmp_var instead build_decl for creating temps.
731 (build_array_notation_expr): Likewise.
732 (fix_conditional_array_notations_1): Likewise.
733 (fix_array_notation_expr): Likewise.
734 (fix_array_notation_call_expr): Likewise.
736 2014-03-28 Jakub Jelinek <jakub@redhat.com>
739 * c-tree.h (c_build_function_call_vec): New prototype.
740 * c-typeck.c (build_function_call_vec): Don't call
741 resolve_overloaded_builtin here.
742 (c_build_function_call_vec): New wrapper function around
743 build_function_call_vec. Call resolve_overloaded_builtin here.
744 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
745 Call c_build_function_call_vec instead of build_function_call_vec.
746 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
747 * c-decl.c (finish_decl): Likewise.
749 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
752 * c-typeck.c: Use correct format string in cast-qual warning
754 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
756 * c-decl.c (c_decl_attributes): Use
757 lang_hooks.types.omp_mappable_type.
758 * c-typeck.c (c_finish_omp_clauses): Likewise.
760 2014-03-06 Marek Polacek <polacek@redhat.com>
763 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
764 of checking tree code.
766 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
768 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
769 (c_parser_parameter_declaration): Likewise.
771 2014-02-19 Marek Polacek <polacek@redhat.com>
774 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
775 Call mark_exp_read on exp.value.
776 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
777 TREE_ADDRESSABLE on old instead of val.
778 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
780 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
782 * c-parser.c (c_parser_get_builtin_args): Replace calls to
783 C_EXPR_APPEND by vec_safe_push.
784 * c-tree.h (C_EXPR_APPEND): Remove.
786 2014-01-31 Marek Polacek <polacek@redhat.com>
789 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
790 build_function_call_vec.
791 (build_function_call): Likewise.
792 (build_atomic_assign): Likewise.
793 (build_function_call_vec): Add arg_loc parameter. Use it.
794 (convert_arguments): Likewise.
795 (convert_for_assignment): Rename rhs_loc to expr_loc.
796 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
797 (c_parser_objc_keywordexpr): Likewise.
798 (c_parser_postfix_expression_after_primary): Call
799 build_function_call_vec with expr_loc rather than op_loc.
800 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
801 build_function_call_vec.
802 (c_parser_expr_list): Add locations parameter. Fill it with locations
803 of function arguments.
804 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
806 2014-01-30 Marek Polacek <polacek@redhat.com>
809 * c-typeck.c (build_function_call_vec): Use loc parameter.
810 (convert_arguments): Add location parameter. Use it.
811 (ep_convert_and_check): Likewise.
812 (build_atomic_assign): Adjust convert_for_assignment call.
813 (build_modify_expr): Likewise.
814 (digest_init): Likewise.
815 (c_finish_return): Likewise.
816 (build_conditional_expr): Adjust ep_convert_and_check calls.
817 (convert_for_assignment): Add rhs_loc parameter. Use it.
818 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
821 2014-01-30 Richard Biener <rguenther@suse.de>
824 * c-typeck.c (build_function_call_vec): Do not replace calls
825 to a function via an incompatible type with a runtime abort.
827 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
829 * c-parser.c (c_parser_declaration_or_fndef): Replaced
830 flag_enable_cilkplus with flag_cilkplus.
831 (c_parser_direct_declarator_inner): Likewise.
832 (c_parser_attribute_any_word): Likewise.
833 (c_parser_attributes): Likewise.
834 (c_parser_compound_statement): Likewise.
835 (c_parser_statement_after_labels): Likewise.
836 (c_parser_if_statement): Likewise.
837 (c_parser_switch_statement): Likewise.
838 (c_parser_do_statement): Likewise.
839 (c_parser_for_statement): Likewise.
840 (c_parser_unary_expression): Likewise.
841 (c_parser_postfix_expression): Likewise.
842 (c_parser_postfix_expression_after_primary): Likewise.
843 (c_parser_postfix_expression_after_primary): Likewise.
844 (c_parser_omp_clause_name): Likewise.
845 (c_finish_omp_declare_simd): Likewise.
846 (c_parser_cilk_verify_simd): Likewise.
847 * c-typeck.c (build_array_ref): Likewise.
848 (build_function_call_vec): Likewise.
849 (convert_arguments): Likewise.
850 (build_compound_expr): Likewise.
851 (c_finish_return): Likewise.
852 (c_finish_if_stmt): Likewise.
853 (c_finish_loop): Likewise.
854 (build_binary_op): Likewise.
856 2014-01-23 Marek Polacek <polacek@redhat.com>
859 * c-typeck.c (parser_build_binary_op): Use location instead of
861 (build_binary_op): Pass location to shorten_compare.
863 2014-01-23 Marek Polacek <polacek@redhat.com>
866 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
869 2014-01-23 Marek Polacek <polacek@redhat.com>
872 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
873 of a comma expression.
874 (emit_side_effect_warnings): Likewise.
876 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
879 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
880 function to use walk_tree and moved a lot of its functionality to
881 expand_array_notations.
882 (expand_array_notations): New function.
884 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
886 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
887 attribute an attribute without value.
889 2014-01-23 Jakub Jelinek <jakub@redhat.com>
892 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
893 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
895 2014-01-22 Marek Polacek <polacek@redhat.com>
898 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
899 of remove_c_maybe_const_expr on op1 and op2.
901 2014-01-15 Jakub Jelinek <jakub@redhat.com>
904 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
905 effects, preevaluate rhs using SAVE_EXPR first.
907 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
910 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
911 statements with if-elseif statements.
913 2014-01-06 Marek Polacek <polacek@redhat.com>
916 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
917 defined bit-field types only in ISO C.
919 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
921 Update copyright years
923 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
925 * c-array-notation.c: Use the standard form for the copyright notice.
927 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
929 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
930 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
931 field in parser is not empty. If not-empty, call the function
932 c_parser_finish_omp_declare_simd.
933 (c_parser_cilk_clause_vectorlength): Modified function to be shared
934 between SIMD-enabled functions and #pragma simd. Added new parameter.
935 (c_parser_cilk_all_clauses): Modified the usage of the function
936 c_parser_cilk_clause_vectorlength as mentioned above.
937 (c_parser_cilk_simd_fn_vector_attrs): New function.
938 (c_finish_cilk_simd_fn_tokens): Likewise.
939 (is_cilkplus_vector_p): Likewise.
940 (c_parser_omp_clause_name): Added checking for "vectorlength,"
941 "nomask," and "mask" strings in clause name.
942 (c_parser_omp_all_clauses): Added 3 new case statements:
943 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
944 PRAGMA_CILK_CLAUSE_NOMASK.
945 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
946 check for vector attribute and if so call the function
947 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
948 called the function c_finish_cilk_simd_fn_tokens.
949 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
950 parser field is non-empty. If so, parse them as you would parse
951 the omp declare simd pragma.
952 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
953 Added a check when step is a parameter and flag it as error.
954 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
955 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
958 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
960 * c-parser.c (c_parser_omp_parallel): Fix description.
962 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
964 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
965 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
966 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
967 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
969 2013-12-04 Joseph Myers <joseph@codesourcery.com>
972 * c-parser.c (c_parser_alignas_specifier): Use
973 c_sizeof_or_alignof_type instead of c_alignof.
974 (c_parser_alignof_expression): Likewise, with min_alignof
975 parameter depending on alignof spelling used.
977 2013-12-04 Marek Polacek <polacek@redhat.com>
980 * c-decl.c (start_function): Don't warn for missing prototype for
983 2013-12-03 Marek Polacek <polacek@redhat.com>
986 * c-decl.c (build_compound_literal): Allow compound literals with
989 2013-12-02 Joseph Myers <joseph@codesourcery.com>
992 * c-typeck.c (build_modify_expr): Diagnose assignment to
993 expression with array type.
995 2013-11-29 Joseph Myers <joseph@codesourcery.com>
998 * c-typeck.c (process_init_element): Do not treat a string as
999 initializing a whole array when used with a designator for an
1002 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1005 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1006 an inline function following a static declaration.
1008 2013-11-28 Jakub Jelinek <jakub@redhat.com>
1011 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1012 to p_name before calling c_parser_omp_teams instead of after.
1013 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1014 argument. Remove unused p_name variable.
1016 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
1017 Jakub Jelinek <jakub@redhat.com>
1019 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1020 external_scope is NULL.
1022 2013-11-27 Tom de Vries <tom@codesourcery.com>
1023 Marc Glisse <marc.glisse@inria.fr>
1026 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1028 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1030 * c-typeck.c: Add required include files from gimple.h.
1032 2013-11-22 David Malcolm <dmalcolm@redhat.com>
1034 * c-decl.c (define_label, shadow_tag_warned)
1035 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1036 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1037 (declspecs_add_type): Remove use of in_system_header macro.
1038 * c-parser.c (c_parser_unary_expression): Likewise.
1039 * c-typeck.c (store_init_value, process_init_element)
1040 (c_start_case): Likewise.
1042 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1045 * c-parser.c (c_parser_set_source_position_from_token): Remove
1046 reference to in_system_header from comment.
1048 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1050 * c-decl.c (grokdeclarator): Update comment to refer to
1051 tree_to_[su]hwi rather than tree_low_cst.
1053 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1055 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1056 tree_to_uhwi throughout.
1058 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1060 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1063 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1065 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1068 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
1070 * c-parser.c (c_parser_cilk_simd): New.
1071 (c_parser_cilk_verify_simd): New.
1072 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1073 (c_parser_omp_for_loop): Add case for NE_EXPR.
1074 Set c_break_label for CILK_SIMD.
1075 (c_parser_cilk_clause_vectorlength): New.
1076 (c_parser_cilk_clause_linear): New.
1077 (c_parser_cilk_clause_name): New.
1078 (c_parser_cilk_all_clauses): New.
1079 * c-typeck.c (build_unary_op): Pass location argument to
1081 (build_modify_expr): Same.
1082 (build_asm_expr): Same.
1083 (c_finish_bc_stmt): Error on break/continue in loops.
1085 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
1087 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1089 2013-11-14 Diego Novillo <dnovillo@google.com>
1091 * c-decl.c: Include print-tree.h.
1092 Include stor-layout.h.
1095 Include stringpool.h.
1096 * c-lang.c: Include fold-const.h.
1097 * c-parser.c: Include stringpool.h.
1099 Include stor-layout.h.
1101 Include trans-mem.h.
1102 * c-typeck.c: Include stor-layout.h.
1103 Include trans-mem.h.
1107 2013-11-13 Joseph Myers <joseph@codesourcery.com>
1109 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1110 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1112 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1113 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1115 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1116 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1117 (c_parser_declarator, c_parser_direct_declarator_inner)
1118 (c_parser_parameter_declaration, c_parser_type_name): All callers
1120 (c_parser_declaration_or_fndef): Handle declarations with type
1121 determined from the initializer.
1123 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
1125 * c-typeck.c: Include gimplify.h.
1127 2013-11-12 Joseph Myers <joseph@codesourcery.com>
1129 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1130 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1132 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1133 or _Thread_local as appropriate in diagnostics.
1134 (build_null_declspecs): Initialize ret->thread_gnu_p.
1135 (declspecs_add_scspec): Handle either __thread or _Thread_local
1136 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1137 pedantic. Do not disallow _Thread_local extern and _Thread_local
1140 2013-11-07 Joseph Myers <joseph@codesourcery.com>
1141 Andrew MacLeod <amacleod@redhat.com>
1143 * c-aux-info.c (gen_type): Handle atomic qualifier.
1144 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1145 qualifiers when compating types.
1146 (shadow_tag_warned): Handle atomic_p in declspecs.
1147 (quals_from_declspecs): Likewise.
1148 (start_decl): Use c_type_promotes_to when promoting argument
1150 (grokdeclarator): Handle _Atomic.
1151 (get_parm_info): Diagnose any qualifier on "void" as only
1153 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1154 comparing types. Use c_type_promotes_to when promoting argument
1156 (finish_function): Use c_type_promotes_to when promoting argument
1158 (build_null_declspecs): Handle atomic_p in declspecs.
1159 (declspecs_add_qual): Handle RID_ATOMIC.
1160 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1161 (c_token_starts_declspecs): Handle RID_ATOMIC.
1162 (c_parser_declspecs): Handle atomic type specifiers and
1164 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1165 from types of expressions with atomic type.
1166 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1167 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1168 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1169 (c_parser_statement_after_labels, c_parser_switch_statement)
1170 (c_parser_for_statement, c_parser_expr_no_commas)
1171 (c_parser_conditional_expression, c_parser_binary_expression)
1172 (c_parser_cast_expression, c_parser_unary_expression)
1173 (c_parser_postfix_expression)
1174 (c_parser_postfix_expression_after_primary, c_parser_expression):
1175 Use convert_lvalue_to_rvalue.
1176 (c_parser_expression_conv, c_parser_expr_list): Document
1177 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1178 (c_parser_objc_synchronized_statement): Use
1179 convert_lvalue_to_rvalue.
1180 (c_parser_objc_selector): Handle RID_ATOMIC.
1181 (c_parser_objc_receiver, c_parser_array_notation): Use
1182 convert_lvalue_to_rvalue.
1183 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1184 _Atomic (type-name).
1185 (struct c_declspecs): Add atomic_p field.
1186 (convert_lvalue_to_rvalue): Declare.
1187 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1188 corresponding atomic types.
1189 (qualify_type): Don't add _Atomic qualifiers from second argument.
1190 (comp_target_types): Do not allow _Atomic mismatches.
1191 (type_lists_compatible_p): Do not remove atomic qualifiers when
1193 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1194 (build_atomic_assign): New functions.
1195 (build_unary_op): Use build_atomic_assign for atomic increment and
1197 (build_conditional_expr): Do not treat _Atomic void as a qualified
1199 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1200 (find_anonymous_field_with_type, convert_to_anonymous_field)
1201 (convert_for_assignment): Do not remove atomic qualifiers when
1203 (digest_init): Do not accept initialization of arrays of atomic
1204 elements by string constants.
1205 (build_asm_expr): Use convert_lvalue_to_rvalue.
1206 (build_binary_op): Do not treat _Atomic void as a qualified
1209 2013-11-06 DJ Delorie <dj@redhat.com>
1211 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1212 both explicit and builtin, print the location of the explicit one.
1214 2013-11-05 Tobias Burnus <burnus@net-b.de>
1216 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1217 c_parser_omp_distribute, c_parser_omp_teams,
1218 c_parser_omp_target, c_parser_omp_declare): Handle
1221 2013-11-03 Marek Polacek <polacek@redhat.com>
1223 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1225 2013-11-01 Jakub Jelinek <jakub@redhat.com>
1227 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1228 check_dup_generic at the end, unless remove is true.
1229 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1231 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1233 2013-10-31 Jakub Jelinek <jakub@redhat.com>
1235 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1236 with decl that is not pointer nor array.
1238 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1240 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1241 a spawning function is found.
1242 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1243 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1244 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1245 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1247 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1248 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1250 (c_finish_return): Added a check to reject _Cilk_spawn in return
1252 (build_cilk_spawn): New function.
1253 (build_cilk_sync): Likewise.
1254 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1256 2013-10-27 Tobias Burnus <burnus@net-b.de>
1259 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1260 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1261 (c_parser_statement_after_labels): Update calls.
1263 2013-10-24 Tobias Burnus <burnus@net-b.de>
1266 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1267 Handle PRAGMA_IVDEP.
1268 (c_parser_statement_after_labels): Update call.
1270 2013-10-24 Marek Polacek <polacek@redhat.com>
1272 * c-parser.c (c_parser_struct_declaration): Add a comment.
1273 (c_parser_declarator): Don't allow _Alignas here.
1275 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
1277 * c-parser.c: Include omp-low.h.
1278 * c-typeck.c: Likewise.
1280 2013-10-17 Marek Polacek <polacek@redhat.com>
1283 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1284 Document syntax of the array-declarator.
1285 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1287 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1288 (c_parser_struct_declaration): Likewise.
1289 (c_parser_declarator): Likewise.
1290 (c_parser_direct_declarator_inner): Likewise.
1291 (c_parser_parameter_declaration): Likewise.
1292 (c_parser_type_name): Likewise.
1294 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1296 * c-lang.h (current_omp_declare_target_attribute): New extern
1298 * c-parser.c: Include c-lang.h.
1299 (struct c_parser): Change tokens to c_token *.
1300 Add tokens_buf field. Change tokens_avail type to unsigned int.
1301 (c_parser_consume_token): If parser->tokens isn't
1302 &parser->tokens_buf[0], increment parser->tokens.
1303 (c_parser_consume_pragma): Likewise.
1304 (enum pragma_context): Add pragma_struct and pragma_param.
1305 (c_parser_external_declaration): Adjust
1306 c_parser_declaration_or_fndef caller.
1307 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1308 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1309 Adjust recursive call.
1310 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1312 (c_parser_parameter_declaration): Use pragma_param instead of
1314 (c_parser_compound_statement_nostart, c_parser_label,
1315 c_parser_for_statement): Adjust
1316 c_parser_declaration_or_fndef callers.
1317 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1318 it through to c_parser_conditional_expression.
1319 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1320 pass it through to c_parser_binary_expression. Adjust recursive
1322 (c_parser_binary_expression): Remove prec argument, add
1323 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1324 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1325 binop matches it, use build2 instead of parser_build_binary_op.
1326 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1327 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1328 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1329 Handle pragma_struct and pragma_param the same as pragma_external.
1330 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1331 (c_parser_omp_variable_list): Parse array sections for
1332 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1333 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1334 (c_parser_omp_clause_reduction): Handle user defined reductions.
1335 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1336 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1337 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1338 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1339 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1340 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1341 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1342 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1343 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1344 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1345 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1346 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1347 (c_parser_omp_for_loop): Add CODE argument, pass it through
1348 to c_finish_omp_for. Change last argument to cclauses,
1349 and adjust uses to grab parallel clauses from the array of all
1350 the split clauses. Adjust c_parser_binary_expression,
1351 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1352 (omp_split_clauses): New function.
1353 (c_parser_omp_simd): New function.
1354 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1355 Allow the function to be called also when parsing combined constructs,
1356 and call c_parser_omp_simd when parsing for simd.
1357 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1358 #pragma omp section, require exactly one structured-block instead of
1359 sequence of statements.
1360 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1361 Allow the function to be called also when parsing combined constructs.
1362 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1363 Allow the function to be called also when parsing combined
1365 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1366 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1367 c_parser_omp_teams, c_parser_omp_target_data,
1368 c_parser_omp_target_update, c_parser_omp_target,
1369 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1370 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1371 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1372 (c_parser_omp_construct): Add p_name and mask vars. Handle
1373 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1374 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1375 and c_parser_omp_sections callers.
1376 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1377 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1378 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1379 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1380 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1382 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1383 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1384 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1385 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1386 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1387 * c-typeck.c: Include tree-inline.h.
1388 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1389 handle_omp_array_sections_1, handle_omp_array_sections,
1390 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1391 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1392 user defined reductions.
1393 (c_tree_equal): New function.
1394 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1395 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1396 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1397 c_check_omp_declare_reduction_r): New prototypes.
1398 * c-decl.c (current_omp_declare_target_attribute): New variable.
1399 (c_decl_attributes): New function.
1400 (start_decl, start_function): Use it instead of decl_attributes.
1401 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1402 c_omp_reduction_decl, c_omp_reduction_lookup,
1403 c_check_omp_declare_reduction_r): New functions.
1405 2013-09-25 Tom Tromey <tromey@redhat.com>
1407 * Make-lang.in (c/gccspec.o): Remove.
1408 (CFLAGS-c/gccspec.o): New variable.
1409 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1410 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1411 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1413 2013-09-25 Tom Tromey <tromey@redhat.com>
1415 * Make-lang.in (c/gccspec.o): Don't use subshell.
1417 2013-09-18 Marek Polacek <polacek@redhat.com>
1420 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1421 Remove unnecessary check.
1423 2013-09-18 Marek Polacek <polacek@redhat.com>
1426 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1427 no_sanitize_undefined attribute.
1429 2013-09-13 Kai Tietz <ktietz@redhat.com>
1432 * c-decl.c (c_builtin_function_ext_scope): Remove
1433 wrong assumption that it is never called on prexisting
1436 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1438 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1440 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1442 * c-objc-common.c (c_tree_printer): Tidy.
1444 2013-08-30 Marek Polacek <polacek@redhat.com>
1446 * c-typeck.c (build_binary_op): Add division by zero and shift
1449 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
1450 Joseph Myers <joseph@codesourcery.com>
1453 * c-typeck.c (c_common_type): Prefer double_type_node over
1454 other REAL_TYPE types with the same precision.
1455 (convert_arguments): Likewise.
1457 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1459 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1460 (c_initialize_diagnostics): Call a destructor for the early printer.
1462 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1464 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1465 printer initialization.
1467 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1470 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1471 check for truth values.
1472 (expand_array_notation_exprs): Added truth values case. Removed an
1473 unwanted else. Added for-loop to walk through subtrees in default
1476 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1478 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1480 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1482 * c-parser.c (struct c_generic_association): Fix typo.
1484 2013-07-23 Tom Tromey <tromey@redhat.com>
1485 Joseph Myers <joseph@codesourcery.com>
1487 * c-parser.c (struct c_generic_association): New.
1488 (c_generic_association_d): New typedef.
1489 (c_parser_generic_selection): New function.
1490 (c_parser_postfix_expression): Handle RID_GENERIC.
1492 2013-07-13 Jason Merrill <jason@redhat.com>
1495 * c-decl.c (finish_struct): Check for too-large class.
1497 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1500 * c-typeck.c (set_init_index): When folding, check for index overflow.
1502 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1504 * c-parser.c (c_parser_array_notation): Removed rejection of array
1505 notations in an array of function pointers.
1507 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1509 * c-array-notation.c (make_triplet_val_inv): New function.
1510 (create_cmp_incr): Likewise.
1511 (create_array_refs): Likewise.
1512 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1513 Also modularized common parts between functions and called the function.
1514 (build_array_notation_expr): Likewise.
1515 (fix_conditional_array_notations_1): Likewise.
1516 (fix_array_notation_expr): Likewise.
1517 (fix_array_notation_call_expr): Likewise.
1519 2013-06-18 Marek Polacek <polacek@redhat.com>
1522 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1524 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1526 * c-array-notation.c (build_array_notation_expr): Reject array notation
1527 mismatch between LHS and RHS even inside a call_expr. Also, removed
1528 a couple while statements that were dead code.
1530 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1532 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1533 excessive precision expressions in function parameters. Also removed
1534 couple unwanted while statements.
1536 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1538 * c-array-notation.c (expand_array_notation_exprs): Added
1539 ARRAY_NOTATION_REF case.
1541 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1543 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1544 function to c-family/array-notation-common.c.
1545 (is_cilkplus_reduce_builtin): Likewise.
1546 (find_rank): Likewise.
1547 (extract_array_notation_exprs): Likewise.
1548 (replace_array_notations): Likewise.
1549 (find_inv_trees): Likewise.
1550 (replace_inv_trees): Likewise.
1551 (contains_array_notation_expr): Likewise.
1552 (find_correct_array_notation_type): Likewise.
1553 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1554 (struct inv_list): Moved this to c-family/array-notation-common.c.
1555 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1557 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1559 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1560 reduction functions outside the for-loop. Added a check if the fundecl
1561 is non-NULL. Finally, removed an unwanted if-statement, and made the
1564 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1566 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1567 condition of the if-statement matches the rank of else-block and then-
1568 block when array notations are used.
1569 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1570 expression after the entire function body is parsed.
1571 (c_parser_expr_no_commas): Delayed creating array notation expressions
1572 to the end of function parsing.
1573 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1574 whole if-statement instead of just the condition.
1575 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1577 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1580 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1581 array to NULL_TREE if they are unused. Also added a check for the
1582 field to be NULL before its fields are used in future.
1584 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1587 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1588 (build_array_notation_expr): Likewise.
1590 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1592 * c-typeck.c (build_array_ref): Added a check to see if array's
1593 index is greater than one. If true, then emit an error.
1594 (build_function_call_vec): Exclude error reporting and checking
1595 for builtin array-notation functions.
1596 (convert_arguments): Likewise.
1597 (c_finish_return): Added a check for array notations as a return
1598 expression. If true, then emit an error.
1599 (c_finish_loop): Added a check for array notations in a loop
1600 condition. If true then emit an error.
1601 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1602 (build_binary_op): Added a check for array notation expr inside
1603 op1 and op0. If present, we call another function to find correct
1605 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1606 * c-parser.c (c_parser_compound_statement): Check if array
1607 notation code is used in tree, if so, then transform them into
1609 (c_parser_expr_no_commas): Check if array notation is used in LHS
1610 or RHS, if so, then build array notation expression instead of
1612 (c_parser_postfix_expression_after_primary): Added a check for
1613 colon(s) after square braces, if so then handle it like an array
1614 notation. Also, break up array notations in unary op if found.
1615 (c_parser_direct_declarator_inner): Added a check for array
1617 (c_parser_compound_statement): Added a check for array notation in
1618 a stmt. If one is present, then expand array notation expr.
1619 (c_parser_if_statement): Likewise.
1620 (c_parser_switch_statement): Added a check for array notations in
1621 a switch statement's condition. If true, then output an error.
1622 (c_parser_while_statement): Similarly, but for a while.
1623 (c_parser_do_statement): Similarly, but for a do-while.
1624 (c_parser_for_statement): Similarly, but for a for-loop.
1625 (c_parser_unary_expression): Check if array notation is used in a
1626 pre-increment or pre-decrement expression. If true, then expand
1628 (c_parser_array_notation): New function.
1629 * c-array-notation.c: New file.
1630 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1632 2013-05-23 Mike Stump <mikestump@comcast.net>
1634 * c-typeck.c (convert_for_assignment): Handle references to memory
1637 2013-05-16 Jason Merrill <jason@redhat.com>
1639 * Make-lang.in (cc1$(exeext)): Use link mutex.
1641 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1643 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1644 to simply use OPT_Wpointer_arith.
1645 (build_unary_op): Likewise.
1647 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1650 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1651 argument. If set, or it temporarily for parsing of the first
1652 argument into force_folding_builtin_constant_p.
1653 (c_parser_postfix_expression): Adjust callers.
1655 2013-03-21 Richard Biener <rguenther@suse.de>
1657 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1658 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1660 2013-02-12 Marek Polacek <polacek@redhat.com>
1663 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1666 2013-01-24 Jakub Jelinek <jakub@redhat.com>
1669 * c-typeck.c (set_nonincremental_init_from_string): If
1670 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1672 (process_init_element): Likewise.
1674 2012-12-20 Jakub Jelinek <jakub@redhat.com>
1677 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1678 argument, don't call default_function_array_conversion
1679 nor c_fully_fold here.
1680 (c_parser_asm_statement): Adjust callers.
1681 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1682 and outputs here, and call default_function_array_conversion
1683 on inputs that don't need to be addressable.
1685 2012-12-18 Jakub Jelinek <jakub@redhat.com>
1688 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1689 warning require that both c_common_unsigned_type as well as
1690 c_common_signed_type is the same for both mvl and mvr types.
1692 2012-11-16 Diego Novillo <dnovillo@google.com>
1694 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1696 * c-common.c: Use new vec API in vec.h.
1697 * c-common.h: Likewise.
1698 * c-gimplify.c: Likewise.
1699 * c-pragma.c: Likewise.
1700 * c-pretty-print.c: Likewise.
1701 * c-pretty-print.h: Likewise.
1702 * c-semantics.c: Likewise.
1703 * c-decl.c: Likewise.
1704 * c-parser.c: Likewise.
1705 * c-tree.h: Likewise.
1706 * c-typeck.c: Likewise.
1708 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1711 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1713 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1716 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1717 shadows a function, unless the variable is a function or a
1718 pointer-to-function.
1720 2012-10-12 Jakub Jelinek <jakub@redhat.com>
1723 * c-parser.c (struct c_tree_loc_pair): Removed.
1724 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1725 add location_t * and tree * arguments, fill in array of 3
1726 sizeof_arg trees and corresponding locs.
1727 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1728 c_parser_expr_list callers.
1729 (c_parser_postfix_expression_after_primary): Likewise. Pass
1730 array of 3 sizeof_arg trees and locs (corresponding to first
1731 3 arguments) to sizeof_pointer_memaccess_warning.
1733 2012-10-09 Lawrence Crowl <crowl@google.com>
1735 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1736 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1739 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1742 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1745 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
1748 * c-typeck.c: Include c-common.h.
1749 (enum stv_conv): Moved to c-common.h.
1750 (scalar_to_vector): Moved to c-common.c.
1751 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1752 * Make-lang.in: c-typeck.c depends on c-common.h.
1754 2012-10-04 Arnaud Charlet <charlet@adacore.com>
1756 * c-decl.c (c_write_global_declarations): Fix handling of
1759 2012-09-30 Sharad Singhai <singhai@google.com>
1761 * c-decl.c (c_write_global_declarations): Use a different method
1762 to determine if the dump has ben initialized.
1764 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1767 * c-typeck.c (c_cast_expr): When casting to a type requiring
1768 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1771 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1774 * c-typeck.c (build_unary_op): Pass original argument of
1775 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1776 any C_MAYBE_CONST_EXPR, if it has integer operands.
1777 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1778 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1779 to c_objc_common_truthvalue_conversion, then remove any
1780 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1781 c_objc_common_truthvalue_conversion not
1782 c_common_truthvalue_conversion.
1783 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1784 call note_integer_operands for arguments with integer operands
1785 that are not integer constants.
1787 2012-09-13 Jakub Jelinek <jakub@redhat.com>
1790 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1791 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1793 2012-08-31 Jakub Jelinek <jakub@redhat.com>
1796 * c-convert.c (convert): Don't call fold_convert_loc if
1797 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1798 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1799 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1801 2012-08-24 Jakub Jelinek <jakub@redhat.com>
1804 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1805 for nested and empty_ok arguments in the call to
1806 c_parser_declaration_or_fndef.
1808 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1810 * c-tree.h (c_last_sizeof_arg): Declare.
1811 * c-parser.c (struct c_tree_loc_pair): New type.
1812 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1814 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1815 (c_parser_postfix_expression_after_primary): Likewise. Call
1816 sizeof_pointer_memaccess_warning if needed.
1817 (sizeof_ptr_memacc_comptypes): New function.
1818 * c-typeck.c (c_last_sizeof_arg): New global variable.
1819 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1821 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1823 * c-lang.h (lang_decl): Add variable_size GTY option.
1825 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1827 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1828 * Make-lang.in: Fix dependencies.
1830 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1832 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1833 and add language Makefile hooks.
1834 * config-lang.in: New file.
1835 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1836 add the required "normal" config-lang.in rules.
1837 * c-lang.h: Moved from gcc/ to here.
1838 * c-tree.h: Likewise.
1839 * c-objc-common.c: Likewise.
1840 * c-objc-common.h: Likewise.
1841 * c-typeck.c: Likewise.
1842 * c-convert.c: Likewise.
1843 * c-lang.c: Likewise.
1844 * c-aux-info.c: Likewise.
1845 * c-errors.c: Likewise.
1846 * gccspec.c: Likewise.
1847 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1848 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1850 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1852 Copying and distribution of this file, with or without modification,
1853 are permitted in any medium without royalty provided the copyright
1854 notice and this notice are preserved.