1 2020-06-03 Mark Wielaard <mark@klomp.org>
3 * c-parser.c (struct c_parser): Add seen_string_literal
5 (c_parser_consume_token): Reset seen_string_literal.
6 (c_parser_error_richloc): Add name_hint if seen_string_literal
7 and next token is a CPP_NAME and we have a missing header
8 suggestion for the name.
9 (c_parser_string_literal): Set seen_string_literal.
11 2020-06-03 Mark Wielaard <mark@klomp.org>
13 * c-parser.c (c_parser_postfix_expression_after_primary): Add
14 scope with matching_parens after CPP_OPEN_PAREN.
16 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
18 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
20 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
22 * Make-lang.in: Remove extra slash.
24 2020-05-19 Martin Liska <mliska@suse.cz>
26 * c-parser.c: Fix typo.
28 2020-05-14 Jakub Jelinek <jakub@redhat.com>
30 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
32 2020-05-07 Richard Biener <rguenther@suse.de>
35 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
38 2020-04-30 Jakub Jelinek <jakub@redhat.com>
41 * c-decl.c (set_labels_context_r): In addition to context-less
42 LABEL_DECLs adjust also LABEL_DECLs with context equal to
43 parent function if any.
44 (store_parm_decls): Adjust comment.
46 2020-04-19 Jakub Jelinek <jakub@redhat.com>
49 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
52 2020-04-17 Jakub Jelinek <jakub@redhat.com>
55 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
58 2020-04-15 Jakub Jelinek <jakub@redhat.com>
61 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
62 requires directive when not at file scope.
64 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
67 * c-decl.c (c_check_in_current_scope): New function.
68 * c-tree.h (c_check_in_current_scope): Declare it.
69 * c-parser.c (c_parser_oacc_declare): Add check that variables
70 are declared in the same scope as the directive. Fix handling
73 2020-04-07 Jakub Jelinek <jakub@redhat.com>
76 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
77 if c_parser_omp_master succeeded.
79 2020-03-23 Jakub Jelinek <jakub@redhat.com>
83 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
84 the function_start_locus location. Don't do that afterwards for the
85 __GIMPLE body parsing.
87 2020-03-19 Jakub Jelinek <jakub@redhat.com>
90 * c-tree.h (finish_function): Add location_t argument defaulted to
92 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
93 set it to the locus of closing } if non-NULL.
94 (c_parser_compound_statement_nostart): Return locus of closing }.
95 (c_parser_parse_rtl_body): Likewise.
96 (c_parser_declaration_or_fndef): Propagate locus of closing } to
98 * c-decl.c (finish_function): Add end_loc argument, use it instead of
99 input_location to set function_end_locus.
101 2020-03-17 Jakub Jelinek <jakub@redhat.com>
104 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
105 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
106 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
107 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
109 (finish_incomplete_vars): New function, moved from finish_struct. Use
110 relayout_decl instead of layout_decl.
111 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
112 being TYPE_VFIELD. Use finish_incomplete_vars.
113 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
114 finish_incomplete_vars.
115 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
116 also on ENUMERAL_TYPEs.
118 2020-03-16 Jakub Jelinek <jakub@redhat.com>
121 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
123 2020-03-13 Martin Sebor <msebor@redhat.com>
126 * c-decl.c (builtin_structptr_type_count): New constant.
127 (match_builtin_function_types): Reject decls that are incompatible
128 in types pointed to by pointers.
129 (diagnose_mismatched_decls): Adjust comments.
131 2020-03-05 Joseph Myers <joseph@codesourcery.com>
134 * c-typeck.c (pop_init_level): Do not diagnose initializers as
135 empty when initialized type is error_mark_node.
136 (set_designator, process_init_element): Ignore initializers for
137 elements of a variable-size type or of error_mark_node.
139 2020-03-01 Martin Sebor <msebor@redhat.com>
142 * c-decl.c (types_close_enough_to_match): New function.
143 (match_builtin_function_types):
144 (diagnose_mismatched_decls): Add missing inform call to a warning.
146 2020-03-01 Martin Sebor <msebor@redhat.com>
149 * c-typeck.c (build_functype_attribute_variant): New function.
150 (composite_type): Call it.
152 2020-02-25 Jakub Jelinek <jakub@redhat.com>
155 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
156 Rename last argument from probablity to probability.
158 2020-02-13 Jakub Jelinek <jakub@redhat.com>
161 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
162 *expr if it has side effects.
164 2020-01-30 Jeff Law <law@redhat.com>
167 * c-parser.c (c_parser_switch_statement): Make sure to request
168 marking the switch expr as used.
170 2020-01-22 Joseph Myers <joseph@codesourcery.com>
173 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
174 argument with integer operands.
176 2020-01-16 Kerem Kat <keremkat@gmail.com>
179 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
180 to support 4 available tokens.
182 2020-01-15 Joseph Myers <joseph@codesourcery.com>
185 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
186 determine whether to set DECL_CONTEXT.
188 2020-01-13 Joseph Myers <joseph@codesourcery.com>
191 * c-typeck.c (build_c_cast): Check for expressions with integer
192 operands that can occur in an unevaluated part of an integer
193 constant expression and call note_integer_operands as needed.
195 2019-01-08 Richard Biener <rguenther@suse.de>
198 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
201 2020-01-01 Jakub Jelinek <jakub@redhat.com>
203 Update copyright years.
205 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
207 * c-decl.c (collect_source_ref_cb): Delete.
208 (for_each_global_decl): Rename into...
209 (collect_source_refs): ...this. Call collect_source_ref directly.
210 (c_parse_final_cleanups): Always call collect_source_ref on the main
213 2019-12-19 Julian Brown <julian@codesourcery.com>
214 Cesar Philippidis <cesar@codesourcery.com>
216 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
218 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
219 Allow deref (->) in variable lists if true.
220 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
221 Pass to c_parser_omp_variable_list.
222 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
223 call to c_parser_omp_variable_list.
224 (c_parser_oacc_all_clauses): Support attach and detach clauses.
225 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
226 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
227 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
228 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
229 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
230 and detach. Support deref.
231 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
232 GOMP_MAP_ALWAYS_POINTER for OpenACC.
233 (c_oacc_check_attachments): New function.
234 (c_finish_omp_clauses): Check attach/detach arguments for being
235 pointers using above. Support deref.
237 2019-12-19 Julian Brown <julian@codesourcery.com>
238 Maciej W. Rozycki <macro@codesourcery.com>
239 Tobias Burnus <tobias@codesourcery.com>
240 Thomas Schwinge <thomas@codesourcery.com>
242 * c-parser.c (c_parser_omp_clause_name): Support no_create.
243 (c_parser_oacc_data_clause): Likewise.
244 (c_parser_oacc_all_clauses): Likewise.
245 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
246 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
247 PRAGMA_OACC_CLAUSE_NO_CREATE.
248 * c-typeck.c (handle_omp_array_sections): Support
251 2019-12-09 David Malcolm <dmalcolm@redhat.com>
253 * c-objc-common.c (range_label_for_type_mismatch::get_text):
254 Replace label_text ctor calls.
256 2019-12-04 Joseph Myers <joseph@codesourcery.com>
260 * c-typeck.c (convert_lvalue_to_rvalue): Call
261 require_complete_type for arguments not of void types.
262 (build_indirect_ref): Do not diagnose dereferencing pointers to
264 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
266 2019-12-03 Joseph Myers <joseph@codesourcery.com>
269 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
270 old-style parameter definitions.
272 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
276 * c-decl.c (flexible_array_type_p): Move to common code.
278 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
280 * c-decl.c (start_decl): Allow initialization of variables whose
281 size is a POLY_INT_CST.
282 (finish_decl): Use verify_type_context to check whether the target
283 allows variables with a particular type to have static or thread-local
284 storage duration. Don't raise a second error if such variables do
285 not have a constant size.
286 (grokdeclarator): Use verify_type_context to check whether the
287 target allows fields or array elements to have a particular type.
288 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
289 the target allows pointer difference for the types involved.
290 (build_unary_op): Likewise for pointer increment and decrement.
292 2019-11-29 Joseph Myers <joseph@codesourcery.com>
294 * c-parser.c (struct c_parser): Add members raw_tokens and
296 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
297 using previously-lexed raw tokens.
298 (c_parser_peek_nth_token_raw)
299 (c_parser_check_balanced_raw_token_sequence): New functions.
300 (c_parser_nth_token_starts_std_attributes): Use
301 c_parser_check_balanced_raw_token_sequence for Objective-C.
303 2019-11-25 Joseph Myers <joseph@codesourcery.com>
306 * c-decl.c (finish_declspecs): Use int instead of decimal
307 floating-point types if decimal floating-point not supported.
309 2019-11-25 Joseph Myers <joseph@codesourcery.com>
311 * c-tree.h (struct c_declarator): Use a structure for id member.
312 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
313 declarators at the start, not when handling individual declarators
314 later. Use u.id.id instead of u.id.
315 (grokfield): Use u.id.id instead of u.id.
316 (build_id_declarator): Set u.id.id and u.id.attrs.
317 (finish_declspecs): Handle postfix attributes in case of typedef
319 * c-parser.c (c_parser_direct_declarator)
320 (c_parser_direct_declarator_inner): Place declarator for
321 attributes inside that for function or array, not outside. Set
322 u.id.attrs for identifiers.
323 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
324 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
327 2019-11-22 Jakub Jelinek <jakub@redhat.com>
330 * c-decl.c (identifier_global_tag): Define.
332 2019-11-20 Richard Biener <rguenther@suse.de>
335 * c-decl.c (grokdeclarator): Prevent inlining of nested
336 function with VLA arguments.
338 2019-11-20 Joseph Myers <joseph@codesourcery.com>
340 * c-decl.c (c_warn_type_attributes): New function.
341 (groktypename, grokdeclarator, finish_declspecs): Call
342 c_warn_type_attributes before applying attributes to types.
343 * c-tree.h (c_warn_type_attributes): Declare.
345 2019-11-19 Joseph Myers <joseph@codesourcery.com>
347 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
349 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
350 pedwarn for unknown standard attributes and return error_mark_node
353 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
355 * c-parser.c (c_parser_parse_rtl_body): Always call
356 run_rtl_passes, even if startwith pass is not provided.
358 2019-11-15 Joseph Myers <joseph@codesourcery.com>
360 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
361 duplicate standard attributes.
363 2019-11-15 Joseph Myers <joseph@codesourcery.com>
365 * c-decl.c (std_attribute_table): Add maybe_unused.
367 2019-11-15 Joseph Myers <joseph@codesourcery.com>
369 * c-decl.c (std_attribute_table): Add fallthrough.
370 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
371 attribute at top level.
373 2019-11-15 Joseph Myers <joseph@codesourcery.com>
375 * c-decl.c (std_attribute_table): New.
376 (c_init_decl_processing): Register attributes from
378 * c-parser.c (c_parser_attribute_arguments): Add arguments
379 require_string and allow_empty_args. All callers changed.
380 (c_parser_std_attribute): Set require_string argument for
381 "deprecated" attribute.
383 2019-11-14 Joseph Myers <joseph@codesourcery.com>
385 * c-parser.c (c_parser_postfix_expression)
386 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
387 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
389 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
391 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
392 of build_same_sized_truth_vector_type.
393 (build_vec_cmp): Likewise.
395 2019-11-14 Jakub Jelinek <jakub@redhat.com>
397 * c-parser.c (c_parser_omp_context_selector): Don't require score
398 argument to fit into shwi, just to be INTEGER_CST. Diagnose
401 * c-parser.c (c_parser_omp_context_selector): Rename
402 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
403 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
404 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
407 2019-11-14 Joseph Myers <joseph@codesourcery.com>
409 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
410 ctsk_tagfirstref_attrs.
411 (struct c_declspecs): Update description of attrs. Add
412 postfix_attrs and non_std_attrs_seen_p. Increase size of
413 typespec_kind bit-field.
414 (c_warn_unused_attributes): New declaration.
415 (parser_xref_tag): Update prototype.
416 * c-decl.c (c_warn_unused_attributes): New function.
417 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
418 ctsk_tagref_attrs. Handle attribute declarations.
419 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
420 (grokdeclarator): Handle standard attributes.
421 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
422 attributes to incomplete type reference.
423 (xref_tag): Update call to parser_xref_tag.
424 (declspecs_add_addrspace, declspecs_add_type)
425 (declspecs_add_scspec, declspecs_add_attrs): Set
426 non_std_attrs_seen_p.
427 (finish_declspecs): Apply postfix standard attributes to type.
428 * c-parser.c (c_token_starts_declspecs)
429 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
430 (c_parser_next_tokens_start_declaration): Update comments.
431 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
432 parser->tokens[2] to parser->tokens[1].
433 (c_parser_nth_token_starts_std_attributes)
434 (c_parser_std_attribute_specifier_sequence): New functions.
435 (c_parser_declaration_or_fndef): Add arguments have_attrs and
436 attrs. All callers changed. Handle standard attributes.
437 (c_parser_parms_declarator, c_parser_parms_list_declarator)
438 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
440 (c_parser_declspecs): Add arguments start_std_attr_ok and
441 end_std_attr_ok. All callers changed. Handle standard
443 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
444 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
445 (c_parser_compound_statement_nostart, c_parser_all_labels)
446 (c_parser_label, c_parser_statement, c_parser_for_statement):
447 Handle standard attributes.
448 * c-parser.h (c_parser_declspecs): Update prototype.
449 * gimple-parser.c (c_parser_gimple_declaration): Update call to
452 2019-11-12 Martin Liska <mliska@suse.cz>
454 * gimple-parser.c: Do not include params.h.
456 2019-11-12 Martin Liska <mliska@suse.cz>
458 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
459 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
462 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
463 Frederik Harwath <frederik@codesourcery.com>
466 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
467 (c_parser_oacc_kernels_parallel): Rename function to...
468 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
469 (c_parser_omp_construct): Update accordingly.
472 2019-11-11 Jakub Jelinek <jakub@redhat.com>
474 * c-parser.c (c_parser_translation_unit): Diagnose declare target
475 without corresponding end declare target.
477 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
479 * c-convert.c (convert): Only handle vector conversions if one of
480 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
482 * c-typeck.c (build_array_ref): Only allow vector indexing if the
483 vectors satisfy gnu_vector_type_p.
484 (build_unary_op): Only allow unary operators to be applied to
485 vectors if they satisfy gnu_vector_type_p.
486 (digest_init): Only allow by-element initialization of vectors
487 if they satisfy gnu_vector_type_p.
488 (really_start_incremental_init): Likewise.
489 (push_init_level): Likewise.
490 (pop_init_level): Likewise.
491 (process_init_element): Likewise.
492 (build_binary_op): Only allow binary operators to be applied to
493 vectors if they satisfy gnu_vector_type_p.
495 2019-11-08 Joseph Myers <joseph@codesourcery.com>
497 * c-decl.c (grokparms): Convert () in a function definition to
499 (store_parm_decls_oldstyle): Pedwarn for C2x.
500 (store_parm_decls): Update comment about () not generating a
503 2019-11-07 Joseph Myers <joseph@codesourcery.com>
505 * c-parser.c (c_parser_attribute_arguments): New function.
506 Factored out of c_parser_gnu_attribute.
507 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
508 (c_parser_balanced_token_sequence, c_parser_std_attribute)
509 (c_parser_std_attribute_specifier): New functions.
510 (c_parser_transaction_attributes): Use
511 c_parser_std_attribute_specifier.
513 2019-11-07 Joseph Myers <joseph@codesourcery.com>
515 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
516 lex_joined_string and translate_strings_p.
517 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
519 (c_parser_string_literal): New function.
520 (c_parser_static_assert_declaration_no_semi): Use
521 c_parser_string_literal. Do not set lex_untranslated_string.
522 (c_parser_asm_string_literal): Use c_parser_string_literal.
523 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
524 (c_parser_gnu_attributes): Set and restore translate_strings_p
525 instead of lex_untranslated_string.
526 (c_parser_asm_statement): Do not set lex_untranslated_string.
527 (c_parser_asm_operands): Likewise.
528 (c_parser_has_attribute_expression): Set and restore
529 translate_strings_p instead of lex_untranslated_string.
530 (c_parser_postfix_expression): Use c_parser_string_literal.
531 (pragma_lex): Likewise.
532 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
533 (c_parse_file): Set translate_strings_p.
534 * gimple-parser.c (c_parser_gimple_postfix_expression)
535 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
536 * c-parser.c (c_parser_string_literal): Declare function.
538 2019-11-02 Jakub Jelinek <jakub@redhat.com>
540 * c-parser.c (c_finish_omp_declare_variant): Use
541 omp_get_context_selector instead of c_omp_get_context_selector.
543 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
545 * c-tree.h (c_simulate_enum_decl): Declare.
546 * c-decl.c (c_simulate_enum_decl): New function.
547 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
549 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
551 * c-tree.h (c_simulate_builtin_function_decl): Declare.
552 * c-decl.c (c_simulate_builtin_function_decl): New function.
553 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
556 2019-10-28 Martin Sebor <msebor@redhat.com>
559 * c-decl.c (names_builtin_p): Define a new function.
561 2019-10-28 Richard Biener <rguenther@suse.de>
564 * gimple-parser.c (c_parser_parse_gimple_body): Make
565 current_bb the entry block initially to easier recover
567 (c_parser_gimple_compound_statement): Adjust.
569 2019-10-24 Jakub Jelinek <jakub@redhat.com>
571 * c-parser.c (c_finish_omp_declare_variant): Use
572 omp_context_selector_matches instead of
573 c_omp_context_selector_matches.
574 * c-decl.c (c_decl_attributes): Add "omp declare target block"
575 attribute in between declare target and end declare target
578 2019-10-15 Joseph Myers <joseph@codesourcery.com>
580 * c-parser.c (c_parser_attribute_any_word): Rename to
581 c_parser_gnu_attribute_any_word. All callers changed.
582 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
584 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
586 (c_parser_declaration_or_fndef, c_parser_declspecs)
587 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
588 (c_parser_struct_declaration, c_parser_declarator)
589 (c_parser_gnu_attribute, c_parser_compound_statement)
590 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
591 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
592 attribute-related syntax productions.
594 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
596 * c-objc-common.c (useful_aka_type_p): Replace with...
597 (get_aka_type): ...this new function. Given the original type,
598 decide which aka type to print (if any). Only look through typedefs
599 if user_facing_original_type_p.
600 (print_type): Update accordingly.
602 2019-10-14 Jakub Jelinek <jakub@redhat.com>
604 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
605 into int NESTED, if it is 2, diagnose missing commas in between
607 (c_parser_omp_context_selector): Pass 2 as last argument to
608 c_parser_omp_all_clauses.
610 2019-10-12 Jakub Jelinek <jakub@redhat.com>
612 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
613 For simd properties, put them directly into TREE_VALUE.
614 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
615 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
616 add "omp declare variant base" attribute rather than
617 "omp declare variant".
619 2019-10-11 Joseph Myers <joseph@codesourcery.com>
621 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
623 2019-10-10 Jakub Jelinek <jakub@redhat.com>
625 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
626 true, terminate processing on closing paren and don't skip to end of
628 (c_parser_omp_declare_simd): Handle also declare variant.
629 (omp_construct_selectors, omp_device_selectors,
630 omp_implementation_selectors, omp_user_selectors): New variables.
631 (c_parser_omp_context_selector,
632 c_parser_omp_context_selector_specification,
633 c_finish_omp_declare_variant): New functions.
634 (c_finish_omp_declare_simd): Handle both declare simd and
636 (c_parser_omp_declare): Handle declare variant.
638 2019-10-02 Joseph Myers <joseph@codesourcery.com>
640 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
643 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
645 * c-objc-common.c (useful_aka_type_p): New function.
646 (print_type): Use it to decide whether an aka type is worth printing.
648 2019-09-27 Jakub Jelinek <jakub@redhat.com>
651 * c-parser.c (c_parser_predefined_identifier): New function.
652 (c_parser_postfix_expression): Use it.
653 (c_parser_omp_variable_list): Parse predefined identifiers.
654 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
655 in shared and firstprivate clauses, even when they are predetermined
658 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
660 * c-typeck.c (build_function_call_vec): Take the original function
661 decl as an optional final parameter. Pass all built-in calls to
662 check_builtin_function_arguments.
664 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
667 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
668 of identifiers in the external scope only for variables and functions.
670 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
673 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
675 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
678 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
679 after determining that the first token is not
680 PRAGMA_GCC_PCH_PREPROCESS.
682 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
684 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
685 FUNCTION_DECL to the right value in the presence of nested declarators.
687 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
690 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
692 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
695 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
696 of a built_in_function.
697 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
699 2019-08-10 Jakub Jelinek <jakub@redhat.com>
701 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
702 (c_parser_omp_clause_device_type): New function.
703 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
704 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
705 (c_parser_omp_declare_target): Handle device_type clauses. Remove
706 diagnostics for declare target with clauses nested in clause-less
707 declare target declaration-definition-seq.
708 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
710 2019-08-09 Jakub Jelinek <jakub@redhat.com>
712 * c-parser.c (check_no_duplicate_clause): Simplify using
714 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
715 directive name modifiers.
716 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
719 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
720 check_no_duplicate_clause call. Comment it out, instead emit a
721 warning for duplicate dist_schedule clauses.
723 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
725 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
727 2019-08-08 Jakub Jelinek <jakub@redhat.com>
729 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
730 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
731 instead of generic_head to track duplicates.
733 2019-08-07 Jakub Jelinek <jakub@redhat.com>
735 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
736 (c_parser_omp_clause_use_device_addr): New function.
737 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
738 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
739 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
740 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
741 map or use_device_* clauses.
742 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
743 in OpenMP, require pointer type rather than pointer or array type.
744 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
746 2019-07-31 Jakub Jelinek <jakub@redhat.com>
749 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
750 even if finish is UNKNOWN_LOCATION, just use start as finish in that
753 2019-07-25 Martin Liska <mliska@suse.cz>
754 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
757 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
759 2019-07-25 Martin Liska <mliska@suse.cz>
761 * c-decl.c (merge_decls): Use new macros
762 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
764 2019-07-23 Richard Biener <rguenther@suse.de>
766 PR tree-optimization/83518
767 * gimple-parser.c (c_parser_parse_gimple_body): When we have
768 a CFG also rebuild cgraph edges.
770 2019-07-20 Jakub Jelinek <jakub@redhat.com>
772 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
773 (c_parser_omp_clause_bind): New function.
774 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
775 (OMP_LOOP_CLAUSE_MASK): Define.
776 (c_parser_omp_loop): New function.
777 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
778 loop combined with parallel or teams.
779 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
780 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
782 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
785 * c-decl.c (finish_function): Check targetm.warn_func_return
786 before issuing a -Wreturn-type warning.
788 2019-07-12 Alexandre Oliva <oliva@adacore.com>
790 * gimple-parser.c (c_parser_gimple_try_stmt): New.
791 (c_parser_compound_statement): Call it.
793 2019-07-12 Jakub Jelinek <jakub@redhat.com>
795 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
796 (c_parser_omp_clause_order): New function.
797 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
798 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
799 PRAGMA_OMP_CLAUSE_ORDER.
800 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
802 2019-07-10 Richard Biener <rguenther@suse.de>
804 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
805 _Literal (int *) &x for address literals.
807 2019-07-09 Martin Sebor <msebor@redhat.com>
810 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
812 (field_decl_cmp): Same.
813 * c-parser.c (c_parser_struct_or_union_specifier): Same.
815 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
817 2019-07-09 Martin Sebor <msebor@redhat.com>
820 * c-decl.c: Change class-key from class to struct and vice versa
821 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
822 * gimple-parser.c: Same.
824 2019-07-01 Richard Biener <rguenther@suse.de>
826 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
827 _Literal (char *) &"foo" for address literals pointing to
830 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
832 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
833 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
834 C incompatibility if alternate "__intN__" form is used.
836 2019-06-24 Martin Sebor <msebor@redhat.com>
838 * c-typeck.c (build_binary_op): Hyphenate floating-point.
840 2019-06-10 Jakub Jelinek <jakub@redhat.com>
842 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
843 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
844 (c_parser_omp_scan_loop_body): New function.
845 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
846 inscan reduction clauses.
847 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
848 non-inscan reductions on the same construct, or inscan reductions with
849 ordered or schedule clauses, or inscan array reductions.
851 2019-06-05 Martin Sebor <msebor@redhat.com>
854 * c-typeck.c (c_finish_return): Only consider functions returning
855 pointers as candidates for -Wreturn-local-addr.
857 2019-06-05 Martin Sebor <msebor@redhat.com>
859 * c-decl.c (start_decl): Adjust quoting and hyphenation
863 (start_function): Same.
864 (declspecs_add_type): Same.
865 * c-parser.c (warn_for_abs): Same.
866 * c-typeck.c (build_binary_op): Same.
868 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
871 * c-parser.c (c_finish_oacc_routine): Rework checking if already
872 marked with an OpenACC 'routine' directive.
875 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
876 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
879 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
880 clauses from "omp declare target" attribute.
882 2019-05-16 Martin Sebor <msebor@redhat.com>
884 * c-decl.c (start_decl): Quote keywords, operators, and
885 types in diagnostics.
887 * c-parser.c (c_parser_asm_statement): Same.
888 (c_parser_conditional_expression): Same.
889 (c_parser_transaction_cancel): Same.
890 * c-typeck.c (c_common_type): Same.
891 (build_conditional_expr): Same.
893 (process_init_element): Same.
894 (build_binary_op): Same.
896 2019-05-17 Richard Biener <rguenther@suse.de>
898 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
899 (c_parser_gimple_unary_expression): Likewise.
900 (c_parser_gimple_parentized_ternary_expression): New function.
902 2019-05-16 Richard Biener <rguenther@suse.de>
904 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
905 (c_parser_gimple_unary_expression): Likewise.
907 2019-05-15 Richard Biener <rguenther@suse.de>
909 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
912 2019-05-14 Richard Biener <rguenther@suse.de>
914 * gimple-parser.c (c_parser_gimple_statement): Remove
915 questionable auto-promotion to VIEW_CONVERT_EXPR.
916 (c_parser_gimple_typespec): Split out from __MEM parsing.
917 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
918 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
919 as __VIEW_CONVERT with -gimple.
921 2019-05-09 Martin Liska <mliska@suse.cz>
923 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
925 (c_parser_gimple_unary_expression): Parse also binary expression
927 (c_parser_gimple_parentized_binary_expression): New function.
929 2019-05-09 Martin Liska <mliska@suse.cz>
931 * gimple-parser.c (struct gimple_parser): Add probability.
932 for gimple_parser_edge.
933 (gimple_parser::push_edge): Add new argument probability.
934 (c_parser_gimple_parse_bb_spec): Parse also probability
936 (c_parser_parse_gimple_body): Set edge probability.
937 (c_parser_gimple_compound_statement): Consume token
938 before calling c_parser_gimple_goto_stmt.
940 (c_parser_gimple_statement): Pass new argument.
941 (c_parser_gimple_goto_stmt): Likewise.
942 (c_parser_gimple_if_stmt): Likewise.
943 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
944 * c-parser.c (c_parser_declaration_or_fndef): Pass
945 hot_bb_threshold argument.
946 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
948 (c_parser_gimple_parse_bb_spec_edge_probability): New.
950 2019-04-26 Jakub Jelinek <jakub@redhat.com>
953 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
954 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
955 (c_parser_do_statement): Likewise.
956 (c_parser_for_statement): Likewise. Formatting fixes.
957 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
958 emit DEBUG_BEGIN_STMTs if needed.
960 2019-04-19 Jakub Jelinek <jakub@redhat.com>
963 * c-typeck.c (struct c_switch): Remove outside_range_p member.
964 (c_start_case): Don't clear it.
965 (do_case): Adjust c_add_case_label caller.
966 (c_finish_case): Adjust c_do_switch_warnings caller.
969 * c-decl.c (merge_decls): If remove is main variant and
970 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
971 variant that has newdecl as TYPE_NAME if any.
973 2019-04-12 Jakub Jelinek <jakub@redhat.com>
976 * c-decl.c (merge_decls): When newdecl's type is its main variant,
977 don't try to remove it from the variant list, but instead assert
980 2019-04-01 Richard Biener <rguenther@suse.de>
983 * c-tree.h (c_get_alias_set): Declare.
984 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
985 * c-objc-common.c (c_get_alias_set): Treat enumeral types
986 as the underlying integer type.
988 2019-03-19 Martin Sebor <msebor@redhat.com>
990 PR tree-optimization/89688
991 * c-decl.c (finish_decl): Call braced_lists_to_string for more
992 kinds of initializers.
994 2019-03-19 Jakub Jelinek <jakub@redhat.com>
997 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
998 return type even if quals_used is 0. Formatting fixes.
1000 2019-03-14 Richard Biener <rguenther@suse.de>
1002 * c-tree.h (enum c_declspec_il): New.
1003 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1005 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1006 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1007 (c_parser_declspecs): Adjust.
1008 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1009 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1011 (struct gimple_parser): New.
1012 (gimple_parser::push_edge): New method.
1013 (c_parser_gimple_parse_bb_spec): New helper.
1014 (c_parser_parse_gimple_body): Get start pass and IL specification.
1015 Initialize SSA and CFG.
1016 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1017 Build a gimple_parser parsing state and pass it along.
1018 (c_parser_gimple_statement): Change intermittend __PHI internal
1019 function argument for the edge.
1020 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1021 (c_parser_gimple_goto_stmt): Record edges to build.
1022 (c_parser_gimple_if_stmt): Likewise.
1023 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1024 (c_parser_gimple_or_rtl_pass_list): Likewise.
1026 2019-03-11 Martin Liska <mliska@suse.cz>
1028 * c-decl.c (check_for_loop_decls): Wrap an option name
1029 in a string format message and fix GNU coding style.
1030 * c-parser.c (c_parser_declspecs): Likewise.
1032 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1034 PR tree-optimization/89550
1035 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1037 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1038 or warning returned true.
1040 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1043 * c-typeck.c (convert_arguments): Call inform_declaration only if
1044 the previous warning_at call returned true.
1046 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1048 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1049 parameter. Adjust all users.
1050 (c_parser_oacc_simple_clause): Replace parser with loc formal
1051 parameter. Adjust all users.
1053 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1056 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1057 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1059 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1062 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1063 before c_decl_attributes rather than after it.
1065 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1068 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1069 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1070 instead of 3 nested ifs.
1072 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1075 * c-decl.c (finish_decl): Do not complete array types for arrays
1076 with external linkage not at file scope.
1078 2019-02-05 Richard Biener <rguenther@suse.de>
1081 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1082 all type variants when not supported.
1084 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1087 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1088 * c-decl.c (decl_jump_unsafe): Return false for
1089 C_DECL_COMPOUND_LITERAL_P decls.
1090 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1092 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1095 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1099 * c-decl.c (last_fileptr_type): Remove.
1100 (last_structptr_types): New variable.
1101 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1102 {old,new}rettype instead of the types themselves. Assert
1103 last_structptr_types array has the same number of elements
1104 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1105 argument oldtype and newtype. Instead of handling
1106 just fileptr_type_node specially, handle all builtin_structptr_types
1107 pointer nodes. Formatting fix.
1109 2019-01-24 Martin Sebor <msebor@redhat.com>
1114 * c-decl.c (match_builtin_function_types): Add arguments.
1115 (diagnose_mismatched_decls): Diagnose mismatched declarations
1116 of built-ins more strictly.
1118 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1121 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1122 on #pragma omp cancel with different modifiers.
1124 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1128 * c-typeck.c (convert_for_assignment): Upate the
1129 warn_for_address_or_pointer_of_packed_member call.
1131 2019-01-16 Tom Honermann <tom@honermann.net>
1132 Jason Merrill <jason@redhat.com>
1134 * c-typeck.c (digest_init): Revised the error message produced for
1135 ill-formed cases of array initialization with a string literal.
1136 (error_init): Make variadic.
1138 2019-01-12 Jakub Jelinek <jakub@redhat.com>
1140 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1142 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1145 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1146 if current_function_decl is non-NULL.
1148 2019-01-07 Joseph Myers <joseph@codesourcery.com>
1152 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1153 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1154 functions declared but never defined only for external scope, not
1157 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1160 * c-parser.c (c_parser_postfix_expression): Parse
1161 __builtin_convertvector.
1163 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1165 Update copyright years.
1167 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1170 * c-typeck.c (convert_for_assignment): Call
1171 warn_for_address_or_pointer_of_packed_member.
1173 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1175 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1176 a more specific error message (instead of just falling through).
1178 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1180 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1181 asm qualifier is first seen; use that to give nicer "duplicate asm
1182 qualifier" messages. Delete 'quals" variable, instead pass the
1183 "is_volatile_ flag to build_asm_stmt directly.
1184 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1185 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1187 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1189 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1190 "done" boolean variable.
1192 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1195 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1196 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1197 (build_binary_op): Use struct op_location_t and
1198 class binary_op_rich_location.
1200 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1203 * c-convert.c (convert): Call c_fully_fold before calling
1204 ubsan_instrument_float_cast.
1206 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1208 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1211 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1213 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1214 after asm. Pass a flag for it to build_asm_expr.
1215 * c-tree.h (build_asm_expr): Update declaration.
1216 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1219 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1222 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1223 combination of volatile and goto, in any order, without repetitions.
1225 2018-12-04 James Norris <jnorris@codesourcery.com>
1226 Cesar Philippidis <cesar@codesourcery.com>
1227 Julian Brown <julian@codesourcery.com>
1229 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1232 2018-11-30 Richard Biener <rguenther@suse.de>
1234 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1235 _Literal (type) { ... } as empty aggregate or vector constructor.
1237 2018-11-29 Martin Sebor <msebor@redhat.com>
1240 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1241 (convert_arguments): Add comments. Pass additional argument to
1244 2018-11-29 Martin Sebor <msebor@redhat.com>
1248 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1250 2018-11-23 Martin Sebor <msebor@redhat.com>
1253 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1254 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1256 2018-11-20 Martin Sebor <msebor@redhat.com>
1258 * c-parser.c (c_parser_has_attribute_expression): New function.
1259 (c_parser_attribute): New function.
1260 (c_parser_attributes): Move code into c_parser_attribute.
1261 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1263 2018-11-15 Martin Sebor <msebor@redhat.com>
1266 * c-decl.c (header_for_builtin_fn): Declare.
1267 (diagnose_mismatched_decls): Diagnose declarations of built-in
1268 functions without a prototype.
1269 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1270 (convert_argument): Same.
1271 (convert_arguments): Factor code out into convert_argument.
1272 Detect mismatches between built-in formal arguments in calls
1273 to built-in without prototype.
1274 (build_conditional_expr): Same.
1275 (type_or_builtin_type): New function.
1276 (convert_for_assignment): Add argument. Conditionally issue
1277 warnings instead of errors for mismatches.
1279 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1281 * c-decl.c: Replace "source_location" with "location_t".
1282 * c-tree.h: Likewise.
1283 * c-typeck.c: Likewise.
1284 * gimple-parser.c: Likewise.
1286 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1288 * c-parser.c (c_parser_omp_clause_final): Use
1289 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1290 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1291 parsing instead of c_parser_paren_condition.
1292 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1293 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1294 c_fully_fold instead of c_parser_condition.
1295 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1296 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1297 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1298 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1299 c_parser_expr_no_commas instead of c_parser_expression.
1301 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1302 reduction clause with inscan modifier.
1304 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1305 clauses other than atomic_default_mem_order.
1307 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1309 * c-parser.c: Include memmode.h.
1310 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1311 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1312 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1313 task_reduction clauses.
1314 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1315 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1316 section, or lvalue assignment expression.
1317 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1318 (c_parser_omp_clause_lastprivate): Parse optional
1319 conditional: modifier.
1320 (c_parser_omp_clause_hint): Require constant integer expression rather
1321 than just integer expression.
1322 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1324 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1325 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1326 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1328 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1329 iterators. Parse mutexinoutset and depobj kinds.
1330 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1332 (c_parser_omp_all_clauses): Likewise. Handle
1333 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1334 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1335 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1336 default memory order from requires directive if any. Adjust
1337 c_finish_omp_atomic caller.
1338 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1339 (c_parser_omp_flush): Parse flush with memory-order-clause.
1340 (c_parser_omp_for_loop): Allow NE_EXPR even in
1341 OpenMP loops, adjust c_finish_omp_for caller.
1342 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1343 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1344 Allow to be called while parsing combined parallel master.
1345 Parse combined master taskloop{, simd}.
1346 (c_parser_omp_parallel): Parse combined
1347 parallel master{, taskloop{, simd}} constructs.
1348 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1349 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1350 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1351 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1352 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1353 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1354 around teams body. Use SET_EXPR_LOCATION.
1355 (c_parser_omp_target_data): Allow target data
1356 with only use_device_ptr clauses.
1357 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1358 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1359 (c_parser_omp_requires): New function.
1360 (c_finish_taskloop_clauses): New function.
1361 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1362 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1363 declaration. Disallow in_reduction clause when combined with parallel
1365 (c_parser_omp_construct): Adjust c_parser_omp_master and
1366 c_parser_omp_taskgroup callers.
1367 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1369 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1370 like OMP_CLAUSE_REDUCTION.
1371 (handle_omp_array_sections): Likewise. Call save_expr on array
1372 reductions before calling build_index_type. Handle depend clauses
1374 (struct c_find_omp_var_s): New type.
1375 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1376 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1377 with static, runtime or auto schedule kinds. Call save_expr for whole
1378 array reduction sizes. Diagnose reductions with zero sized elements
1379 or variable length structures. Diagnose nogroup clause used with
1380 reduction clause(s). Handle depend clause with
1381 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1382 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1383 some different type for other kinds. Use build_unary_op with
1384 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1385 Handle depend clauses with iterators. Remove no longer needed special
1386 case that predetermined const qualified vars may be specified in
1387 firstprivate clause. Complain if const qualified vars are mentioned
1388 in data-sharing clauses other than firstprivate or shared. Use
1389 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1390 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1391 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1392 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1394 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1396 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1397 logic for change to name_hint::operator bool.
1398 (undeclared_variable): Likewise.
1399 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1400 (c_parser_parameter_declaration): Likewise.
1402 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1404 * c-errors.c (pedwarn_c11): New function.
1405 * c-parser.c (disable_extension_diagnostics): Save
1406 warn_c11_c2x_compat and set it to 0.
1407 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1408 (c_parser_static_assert_declaration_no_semi): Handle
1409 _Static_assert without string constant.
1410 * c-tree.h (pedwarn_c11): New prototype.
1412 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1414 * Make-lang.in (selftest-c): New.
1415 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1416 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1417 from gcc/Makefile.in.
1419 2018-10-02 Richard Biener <rguenther@suse.de>
1421 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1423 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1426 * c-typeck.c (build_binary_op): Use excess precision for
1427 comparisons of integers and floating-point for C11 and later.
1429 2018-09-26 Martin Jambor <mjambor@suse.cz>
1432 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1435 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1437 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1438 Update for new param.
1439 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1442 2018-09-17 Martin Jambor <mjambor@suse.cz>
1445 * c-parser.c: (warn_for_abs): New function.
1446 (c_parser_postfix_expression_after_primary): Call it.
1448 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1450 * c-typeck.c (digest_init): Shorten overlength strings.
1452 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1454 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1456 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1458 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1459 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1461 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1463 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1464 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1466 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1469 * c-decl.c (implicitly_declare): Update call to
1470 maybe_add_include_fixit to suggest overriding the location, as it
1472 * c-objc-common.c (c_tree_printer): Update for conversion of
1473 show_caret_p to a tri-state.
1475 2018-08-27 Martin Liska <mliska@suse.cz>
1477 * c-decl.c (locate_old_decl): Use new function
1478 fndecl_built_in_p and remove check for FUNCTION_DECL if
1480 (diagnose_mismatched_decls): Likewise.
1481 (merge_decls): Likewise.
1482 (warn_if_shadowing): Likewise.
1483 (pushdecl): Likewise.
1484 (implicitly_declare): Likewise.
1485 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1486 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1487 * c-typeck.c (build_function_call_vec): Likewise.
1488 (convert_arguments): Likewise.
1490 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1493 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1494 (diagnose_mismatched_decls): Likewise, in various places.
1495 (warn_if_shadowing): Likewise.
1496 (implicit_decl_warning): Likewise.
1497 (implicitly_declare): Likewise.
1498 (undeclared_variable): Likewise.
1499 (declare_label): Likewise.
1500 (grokdeclarator): Likewise.
1501 (start_function): Likewise.
1502 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1503 (c_parser_parameter_declaration): Likewise.
1504 (c_parser_binary_expression): Likewise.
1505 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1506 (parser_build_binary_op): Likewise.
1507 (build_unary_op): Likewise.
1508 (error_init): Likewise.
1509 (pedwarn_init): Likewise.
1510 (warning_init): Likewise.
1511 (convert_for_assignment): Likewise.
1513 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1515 * c-objc-common.c: Include "gcc-rich-location.h".
1516 (c_tree_printer): Move implemenation of '%T' to...
1517 (print_type): ...this new function.
1518 (range_label_for_type_mismatch::get_text): New function.
1519 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1520 range for the various ic_argpass cases.
1521 (class maybe_range_label_for_tree_type_mismatch): New class.
1522 (build_binary_op): Use it when calling binary_op_error.
1524 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1526 * c-decl.c (start_decl): Do not warn if variables is named as main
1527 and is a local variable.
1529 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1532 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1533 objects of unknown size.
1535 2018-08-13 Martin Sebor <msebor@redhat.com>
1537 PR tree-optimization/71625
1538 * c-parser.c (c_parser_declaration_or_fndef): Call
1539 braced_list_to_string.
1541 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1544 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1547 2018-08-01 Martin Sebor <msebor@redhat.com>
1549 PR tree-optimization/86650
1550 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1551 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1553 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1556 * c-typeck.c (init_field_decl_cmp): New function.
1557 (output_pending_init_elements): Use it for field comparisons
1558 instead of pure bit_position comparisons.
1560 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1562 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1563 type here, instead add "omp declare target implicit" attribute.
1564 (finish_decl): Diagnose vars without mappable type here.
1566 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1567 Thomas Schwinge <thomas@codesourcery.com>
1568 Cesar Philippidis <cesar@codesourcery.com>
1570 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1571 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1572 to their non-present_or_* counterparts. Make 'self' an alias to
1573 PRAGMA_OACC_CLAUSE_HOST.
1574 (c_parser_oacc_data_clause): Update GOMP mappings for
1575 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1576 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1577 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1578 Remove support for present_or_* clauses.
1579 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1580 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1581 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1582 (OACC_DATA_CLAUSE_MASK): Likewise.
1583 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1584 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1585 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1586 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1587 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1589 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1591 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1592 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1593 (c_parser_gimple_unary_expression): Likewise.
1595 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1598 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1599 before doing POINTER_DIFF_EXPR.
1601 2018-06-07 Marek Polacek <polacek@redhat.com>
1604 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1605 for loop initial declarations.
1607 2018-05-30 David Pagan <dave.pagan@oracle.com>
1610 * c-decl.c (grokdeclarator): Update check for return type warnings.
1611 (start_function): Likewise.
1612 (finish_function): Likewise.
1613 * c-typeck.c (c_finish_return): Update check for return type warnings.
1614 Pass OPT_Wreturn_type to pedwarn when appropriate.
1616 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1618 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1621 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1623 * gimple-parser.c: Include internal-fn.h.
1624 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1625 (c_parser_gimple_call_internal): New function.
1626 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1627 Fix typos in comment.
1629 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1632 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1633 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1635 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1636 fold_offsetof_1, pass argtype as TYPE to it and drop the
1639 2018-05-02 David Pagan <dave.pagan@oracle.com>
1642 * c-decl.c (old_style_parameter_scope): New function.
1643 * c-parser.c (c_parser_postfix_expression): Check for statement
1644 expressions in old-style function parameter list declarations.
1645 * c-parser.h (old_style_parameter_scope): New extern declaration.
1647 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1650 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1651 it is not TREE_STATIC.
1652 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1653 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1654 its COMPOUND_LITERAL_EXPR_DECL.
1656 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1658 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1659 where all functions return the same _FloatN or _FloatNx type,
1660 treat integer types as _Float64 instead of double.
1662 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1665 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1666 building vector comparison, diagnose it and return error_mark_node.
1668 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1671 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1672 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1673 INTEGER_TYPE element type.
1675 2018-03-13 David Pagan <dave.pagan@oracle.com>
1678 * c-typeck.c (output_init_element): Ensure field initializer
1679 expression is always evaluated if there are side effects.
1681 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1684 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1685 !building_stmt_list_p ().
1687 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1690 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1691 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1692 and include the BIND_EXPR in the list of things that need to be
1695 2018-02-09 Nathan Sidwell <nathan@acm.org>
1698 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1699 to strict_aliasing_warning.
1701 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1703 * c-typeck.c (really_start_incremental_init, push_init_level,
1704 set_nonincremental_init, output_init_element, process_init_element):
1705 Use DECL_UNNAMED_BIT_FIELD.
1707 2018-01-31 Marek Polacek <polacek@redhat.com>
1710 * c-parser.c (c_parser_compound_statement_nostart): Call
1711 expansion_point_location_if_in_system_header.
1713 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1716 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1719 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1722 * c-tree.h (decl_constant_value_1): Add a bool argument.
1723 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1724 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1725 (decl_constant_value): Adjust caller.
1726 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1727 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1728 decl_constant_value returns initializer that has BLKmode or
1730 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1733 Alan Hayward <alan.hayward@arm.com>
1734 David Sherwood <david.sherwood@arm.com>
1736 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1737 TYPE_VECTOR_SUBPARTS.
1739 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1741 Update copyright years.
1743 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1746 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1747 c_parser_conditional_expression, c_parser_cast_expression,
1748 c_parser_sizeof_expression, c_parser_alignof_expression,
1749 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1750 c_parser_transaction_expression): Use set_error () method instead
1751 of setting value member to error_mark_node.
1753 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1755 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1756 and _Float<N>X built-in functions.
1758 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1761 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1762 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1763 incomplete vars rather than after it.
1766 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1767 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1768 and consider empty ones if there are no other stmts. For
1769 -Wunused-value walk all statements before the one only followed by
1772 2017-12-22 Mike Stump <mikestump@comcast.net>
1773 Eric Botcazou <ebotcazou@adacore.com>
1775 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1776 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1777 (c_parser_do_statement): Likewise.
1778 (c_parser_for_statement): Likewise.
1779 (c_parser_statement_after_labels): Adjust calls to above.
1780 (c_parse_pragma_ivdep): New static function.
1781 (c_parser_pragma_unroll): Likewise.
1782 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1783 <PRAGMA_UNROLL>: New case.
1785 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1787 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1788 perform_integral_promotions, digest_init): Replace Yoda conditions
1789 with typical order conditions.
1790 * c-decl.c (check_bitfield_type_and_width): Likewise.
1792 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1794 * c-typeck.c (c_safe_arg_type_equiv_p,
1795 c_safe_function_type_cast_p): New function.
1796 (build_c_cast): Implement -Wcast-function-type.
1798 2017-12-14 Richard Biener <rguenther@suse.de>
1801 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1802 like REALPART_EXPR for the behavior of whether its operand
1805 2017-12-12 Marek Polacek <polacek@redhat.com>
1808 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1810 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1812 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1813 * c-parser.c (add_debug_begin_stmt): New.
1814 (c_parser_declaration_or_fndef): Call it.
1815 (c_parser_compound_statement_nostart): Likewise.
1816 (c_parser_statement_after_labels): Likewise.
1817 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1819 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1821 * c-decl.c (build_compound_literal): Add parameter alignas_align
1822 and set alignment of decl if nonzero.
1823 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1824 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1826 (c_parser_struct_declaration): Update syntax comment.
1827 (c_parser_type_name): Add alignas_ok argument and pass it to
1829 (c_parser_cast_expression): Pass true to c_parser_type_name and
1830 give error if a cast used an _Alignas specifier.
1831 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1832 give error if sizeof (type-name) used an _Alignas specifier.
1833 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1834 give error if _Alignof (type-name) used an _Alignas specifier.
1835 (c_parser_postfix_expression_after_paren_type): Check specified
1836 alignment for a compound literal and pass it to
1837 build_compound_literal.
1838 * c-parser.h (c_parser_type_name): Update prototype.
1839 * c-tree.h (build_compound_literal): Update prototype.
1841 2017-12-07 Martin Sebor <msebor@redhat.com>
1844 * c-decl.c (c_decl_attributes): Look up existing declaration and
1845 pass it to decl_attributes.
1847 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1850 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1851 reserved for use by the implementation.
1853 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1855 * c-decl.c: Include "c-family/c-spellcheck.h".
1857 2017-12-05 Martin Liska <mliska@suse.cz>
1858 Jakub Jelinek <jakub@redhat.com>
1860 * c-typeck.c (pointer_diff): Add new argument and instrument
1861 pointer subtraction.
1862 (build_binary_op): Similar for pointer comparison.
1864 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1867 * c-parser.c: Include tree-iterator.h.
1868 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1869 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1873 * c-tree.h (decl_constant_value_1): Declare.
1874 * c-typeck.c (decl_constant_value_1): New function.
1875 (decl_constant_value): Use it.
1876 * c-fold.c (c_fully_fold_internal): If in_init, use
1877 decl_constant_value_1 instead of decl_constant_value.
1879 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1881 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1883 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1886 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1887 c_switch_covers_all_cases_p returns true.
1889 2017-11-28 Julia Koval <julia.koval@intel.com>
1890 Sebastian Peryt <sebastian.peryt@intel.com>
1892 * Make-lang.in (c/c-array-notation.o): Remove.
1893 * c-array-notation.c: Delete.
1894 * c-decl.c: Remove cilkplus condition.
1895 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1896 c_parser_cilk_verify_simd, c_parser_array_notation,
1897 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1898 c_parser_cilk_simd_fn_vector_attrs,
1899 c_finish_cilk_simd_fn_tokens): Delete.
1900 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1901 (c_parser_direct_declarator_inner): Ditto.
1902 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1903 (c_parser_attributes, c_parser_compound_statement,
1904 c_parser_statement_after_labels, c_parser_if_statement,
1905 c_parser_switch_statement, c_parser_while_statement,
1906 c_parser_do_statement, c_parser_for_statement,
1907 c_parser_unary_expression, c_parser_postfix_expression,
1908 c_parser_postfix_expression_after_primary,
1909 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1910 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1912 * c-typeck.c (build_array_ref, build_function_call_vec,
1914 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1915 c_finish_loop, build_binary_op): Remove cilkplus support.
1917 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1919 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1922 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1924 * Make-lang.in (c.install-plugin): Install backend import library.
1926 2017-11-23 Jakub Jelinek <jakub@redhat.com>
1928 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1929 pragma_stmt context.
1931 2017-11-23 Mike Stump <mikestump@comcast.net>
1932 Eric Botcazou <ebotcazou@adacore.com>
1934 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1936 (c_parser_do_statement): Likewise.
1937 (c_parser_for_statement): Likewise.
1939 2017-11-22 David Malcolm <dmalcolm@redhat.com>
1942 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1943 bool to bool *. Within '%T' handling, if showing an "aka", use
1944 "quoted" param to add appropriate quoting.
1946 2017-11-22 Marek Polacek <polacek@redhat.com>
1951 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1953 2017-11-21 David Malcolm <dmalcolm@redhat.com>
1956 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1957 earlier failed lookups.
1959 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1961 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1962 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1964 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1967 * c-decl.c: Include "c-family/known-headers.h".
1968 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1969 to known-headers.cc.
1970 (class suggest_missing_header): Move to known-header.h.
1971 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1972 than get_c_name_hint.
1974 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1976 * c-decl.c (get_c_name_hint): New function.
1977 (class suggest_missing_header): New class.
1978 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1979 suggest missing headers to the user.
1981 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1983 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1984 Include "c-family/name-hint.h"
1985 (implicit_decl_warning): Convert "hint" from
1986 const char * to name_hint. Pass location to
1987 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1988 warning was not printed.
1989 (undeclared_variable): Likewise for "guessed_id".
1990 (lookup_name_fuzzy): Convert return type from const char *
1991 to name_hint. Add location_t param.
1992 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1993 Include "c-family/name-hint.h"
1994 (c_parser_declaration_or_fndef): Convert "hint" from
1995 const char * to name_hint. Pass location to lookup_name_fuzzy.
1996 (c_parser_parameter_declaration): Likewise.
1998 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2002 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2004 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2005 handle_omp_array_sections): Likewise.
2006 (digest_init): Don't call decl_constant_value_for_optimization.
2007 * c-tree.h (decl_constant_value_for_optimization): Removed.
2008 * c-fold.c (c_fold_array_ref): New function.
2009 (c_fully_fold_internal): Add LVAL argument, propagate it through
2010 recursive calls. For VAR_P call decl_constant_value and
2011 unshare if not LVAL and either optimizing or IN_INIT. Remove
2012 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2013 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2014 (c_fully_fold): Add LVAL argument, pass it through to
2015 c_fully_fold_internal.
2016 (decl_constant_value_for_optimization): Removed.
2018 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2021 * c-parser.c (check_tgmath_function): New function.
2022 (enum tgmath_parm_kind): New enum.
2023 (c_parser_postfix_expression): Handle __builtin_tgmath.
2025 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2027 * c-decl.c (implicit_decl_warning): Update for renaming of
2028 pedwarn_at_rich_loc and warning_at_rich_loc.
2029 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2030 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2031 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2032 (c_parser_struct_or_union_specifier): Likewise for renaming of
2033 pedwarn_at_rich_loc.
2034 (c_parser_parameter_declaration): Likewise for renaming of
2036 * c-typeck.c (build_component_ref): Likewise.
2037 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2038 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2039 (set_init_label): Likewise for renaming of error_at_rich_loc.
2041 2017-10-30 Richard Biener <rguenther@suse.de>
2043 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2046 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2048 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2049 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2051 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2054 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2057 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2060 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2061 newdecl to corresponding __builtin_ if any.
2063 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2066 * c-decl.c (diagnose_mismatched_decls): Use
2067 OPT_Wbuiltin_declaration_mismatch.
2069 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2071 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2072 use it to guard calls to maybe_suggest_missing_token_insertion.
2073 (c_parser_parms_list_declarator): Override default value of new
2074 "type_is_unique" param to c_parser_require.
2075 (c_parser_asm_statement): Likewise.
2076 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2079 2017-10-11 Nathan Sidwell <nathan@acm.org>
2081 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2083 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2085 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2086 operating on trees as wide_ints.
2087 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2088 (c_tree_equal): Likewise.
2090 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2092 * c-decl.c (push_parm_decl): Store c_parm's location into the
2094 (build_c_parm): Add "loc" param and store it within the c_parm.
2095 * c-parser.c (struct c_parser): Add "last_token_location" field.
2096 (c_parser_consume_token): Store location of the token into the
2098 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2099 when handling a FUNCTION_DECL, if it doesn't already have them.
2100 (c_parser_parameter_declaration): Generate a location for the
2101 parameter, and pass it to the call to build_c_parm.
2102 * c-tree.h (struct c_parm): Add field "loc".
2103 (build_c_parm): Add location_t param.
2104 * c-typeck.c (get_fndecl_argument_location): New function.
2105 (inform_for_arg): New function.
2106 (convert_for_assignment): Use inform_for_arg when dealing with
2109 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2111 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2113 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2114 don't SET_DECL_C_BIT_FIELD here.
2117 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2118 instead of trying to set just TREE_READONLY manually.
2120 2017-09-16 Tom de Vries <tom@codesourcery.com>
2123 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2126 2017-09-15 Joseph Myers <joseph@codesourcery.com>
2129 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2131 (build_conditional_expr): For C11, generate result with excess
2132 precision when one argument is an integer and the other is of a
2133 type using excess precision.
2135 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2137 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2139 2017-09-13 Marek Polacek <polacek@redhat.com>
2142 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2143 than expr.original_type.
2145 2017-09-12 Nathan Sidwell <nathan@acm.org>
2147 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2148 resort_sorted_fields): Moved from c-family/c-common.c.
2149 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2151 2017-09-01 Joseph Myers <joseph@codesourcery.com>
2154 * c-typeck.c (build_atomic_assign): Handle argument with excess
2155 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2156 argument passed to build_binary_op and convert_for_assignment but
2157 not for call to c_fully_fold.
2158 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2159 Ensure build_binary_op is called with argument with original
2160 semantic type. Avoid calling c_fully_fold with an
2161 EXCESS_PRECISION_EXPR from build_binary_op.
2163 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2166 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2168 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2169 Alan Hayward <alan.hayward@arm.com>
2170 David Sherwood <david.sherwood@arm.com>
2172 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2173 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2174 m1 and m2 to the signed equivalent of a fixed-point
2177 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2179 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2180 than CAN_HAVE_LOCATION_P when determining whether to use the
2181 location_t value within "value".
2183 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2185 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2186 rather than peeking the location of the first token.
2187 * c-tree.h (c_expr::get_location): New method.
2189 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2191 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2192 to check_function_arguments.
2194 2017-08-18 Marek Polacek <polacek@redhat.com>
2196 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2199 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2202 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2203 (check_bitfield_type_and_width): Don't allow bit-field with
2204 warn_if_not_aligned type.
2206 2017-08-14 Martin Sebor <msebor@redhat.com>
2209 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2211 2017-08-11 Marek Polacek <polacek@redhat.com>
2214 * c-decl.c (pushtag): Only print inform if the warning was printed.
2215 (grokdeclarator): Likewise.
2217 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2219 * c-parser.c (c_parser_error): Rename to...
2220 (c_parser_error_richloc): ...this, making static, and adding
2221 "richloc" parameter, passing it to the c_parse_error call,
2222 rather than calling c_parser_set_source_position_from_token.
2223 (c_parser_error): Reintroduce, reimplementing in terms of the
2224 above, converting return type from void to bool.
2225 (class token_pair): New class.
2226 (struct matching_paren_traits): New struct.
2227 (matching_parens): New typedef.
2228 (struct matching_brace_traits): New struct.
2229 (matching_braces): New typedef.
2230 (get_matching_symbol): New function.
2231 (c_parser_require): Add param MATCHING_LOCATION, using it to
2232 highlight matching "opening" tokens for missing "closing" tokens.
2233 (c_parser_skip_until_found): Likewise.
2234 (c_parser_static_assert_declaration_no_semi): Convert explicit
2235 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2236 class matching_parens, so that the pertinent open parenthesis is
2237 highlighted when there are problems locating the close
2239 (c_parser_struct_or_union_specifier): Likewise.
2240 (c_parser_typeof_specifier): Likewise.
2241 (c_parser_alignas_specifier): Likewise.
2242 (c_parser_simple_asm_expr): Likewise.
2243 (c_parser_braced_init): Likewise, for matching_braces.
2244 (c_parser_paren_condition): Likewise, for matching_parens.
2245 (c_parser_switch_statement): Likewise.
2246 (c_parser_for_statement): Likewise.
2247 (c_parser_asm_statement): Likewise.
2248 (c_parser_asm_operands): Likewise.
2249 (c_parser_cast_expression): Likewise.
2250 (c_parser_sizeof_expression): Likewise.
2251 (c_parser_alignof_expression): Likewise.
2252 (c_parser_generic_selection): Likewise.
2253 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2254 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2255 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2256 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2257 c_parser_skip_until_found call.
2258 (c_parser_objc_class_definition): Use class matching_parens as
2260 (c_parser_objc_method_decl): Likewise.
2261 (c_parser_objc_try_catch_finally_statement): Likewise.
2262 (c_parser_objc_synchronized_statement): Likewise.
2263 (c_parser_objc_at_property_declaration): Likewise.
2264 (c_parser_oacc_wait_list): Likewise.
2265 (c_parser_omp_var_list_parens): Likewise.
2266 (c_parser_omp_clause_collapse): Likewise.
2267 (c_parser_omp_clause_default): Likewise.
2268 (c_parser_omp_clause_if): Likewise.
2269 (c_parser_omp_clause_num_threads): Likewise.
2270 (c_parser_omp_clause_num_tasks): Likewise.
2271 (c_parser_omp_clause_grainsize): Likewise.
2272 (c_parser_omp_clause_priority): Likewise.
2273 (c_parser_omp_clause_hint): Likewise.
2274 (c_parser_omp_clause_defaultmap): Likewise.
2275 (c_parser_oacc_single_int_clause): Likewise.
2276 (c_parser_omp_clause_ordered): Likewise.
2277 (c_parser_omp_clause_reduction): Likewise.
2278 (c_parser_omp_clause_schedule): Likewise.
2279 (c_parser_omp_clause_num_teams): Likewise.
2280 (c_parser_omp_clause_thread_limit): Likewise.
2281 (c_parser_omp_clause_aligned): Likewise.
2282 (c_parser_omp_clause_linear): Likewise.
2283 (c_parser_omp_clause_safelen): Likewise.
2284 (c_parser_omp_clause_simdlen): Likewise.
2285 (c_parser_omp_clause_depend): Likewise.
2286 (c_parser_omp_clause_map): Likewise.
2287 (c_parser_omp_clause_device): Likewise.
2288 (c_parser_omp_clause_dist_schedule): Likewise.
2289 (c_parser_omp_clause_proc_bind): Likewise.
2290 (c_parser_omp_clause_uniform): Likewise.
2291 (c_parser_omp_for_loop): Likewise.
2292 (c_parser_cilk_clause_vectorlength): Likewise.
2293 (c_parser_cilk_clause_linear): Likewise.
2294 (c_parser_transaction_expression): Likewise.
2295 * c-parser.h (c_parser_require): Add param matching_location with
2296 default UNKNOWN_LOCATION.
2297 (c_parser_error): Convert return type from void to bool.
2298 (c_parser_skip_until_found): Add param matching_location with
2299 default UNKNOWN_LOCATION.
2301 2017-08-09 Marek Polacek <polacek@redhat.com>
2303 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2304 * c-tree.h (build_external_ref): Update declaration.
2305 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2306 (build_external_ref): Change the type of a parameter to bool.
2307 (parser_build_binary_op): Use true/false instead of 1/0.
2308 (pointer_diff): Likewise.
2309 (build_modify_expr): Likewise.
2310 (set_designator): Change the type of a parameter to bool.
2311 (set_init_index): Use true/false instead of 1/0.
2312 (set_init_label): Likewise.
2313 (output_init_element): Change the type of a parameter to bool.
2314 (output_pending_init_elements): Use true/false instead of 1/0.
2315 (process_init_element): Likewise.
2316 (build_binary_op): Change the type of a parameter to bool.
2318 2017-08-09 Marek Polacek <polacek@redhat.com>
2321 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2322 Call emit_diagnostic_valist instead of pedwarn.
2323 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2324 Print the relevant types in diagnostics.
2326 2017-08-09 Marek Polacek <polacek@redhat.com>
2329 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2330 build_conditional_expr.
2331 * c-parser.c (c_parser_conditional_expression): Create locations for
2332 EXP1 and EXP2 from their source ranges. Pass the locations down to
2333 build_conditional_expr.
2334 * c-tree.h (build_conditional_expr): Update declaration.
2335 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2336 For -Wsign-compare, also print the types.
2338 2017-08-08 Martin Liska <mliska@suse.cz>
2340 * c-convert.c: Include header files.
2341 * c-typeck.c: Likewise.
2343 2017-08-07 Martin Liska <mliska@suse.cz>
2345 * c-parser.c (c_parser_attributes): Canonicalize name of an
2348 2017-08-02 Marek Polacek <polacek@redhat.com>
2351 * c-parser.c (c_parser_unary_expression): Use set_error.
2355 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2356 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2358 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2359 Martin Liska <mliska@suse.cz>
2361 * c-typeck.c (c_finish_goto_label): Build gimple predict
2364 2017-07-31 Martin Liska <mliska@suse.cz>
2367 * c-convert.c (convert): Guard condition with flag_sanitize_p
2368 also with current_function_decl non-null equality.
2369 * c-decl.c (grokdeclarator): Likewise.
2370 * c-typeck.c (build_binary_op): Likewise.
2372 2017-07-25 Marek Polacek <polacek@redhat.com>
2374 * c-decl.c (grokfield): Remove local variable.
2376 2017-07-25 Marek Polacek <polacek@redhat.com>
2379 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2380 macro expansion if the body is in { }.
2381 (c_parser_while_statement): Likewise.
2382 (c_parser_for_statement): Likewise.
2384 2017-07-18 Nathan Sidwell <nathan@acm.org>
2386 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2388 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2390 * c-decl.c (implicitly_declare): When suggesting a missing
2391 #include, provide a fix-it hint.
2393 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2395 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2396 and call that instead.
2397 * c-tree.h (selftest::run_c_tests): New decl.
2399 2017-06-26 Marek Polacek <polacek@redhat.com>
2402 * c-parser.c (c_parser_if_body): Set the location of the
2403 body of the conditional after parsing all the labels. Call
2404 warn_for_multistatement_macros.
2405 (c_parser_else_body): Likewise.
2406 (c_parser_switch_statement): Likewise.
2407 (c_parser_while_statement): Likewise.
2408 (c_parser_for_statement): Likewise.
2409 (c_parser_statement): Add a default argument. Save the location
2410 after labels have been parsed.
2411 (c_parser_c99_block_statement): Likewise.
2413 2017-06-19 Richard Biener <rguenther@suse.de>
2415 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2416 negated _Literals to parse _Literal (int) -1.
2418 2017-06-13 Martin Liska <mliska@suse.cz>
2421 * c-convert.c (convert): Use sanitize_flags_p.
2422 * c-decl.c (grokdeclarator): Likewise.
2423 * c-typeck.c (convert_for_assignment): Likewise.
2424 (c_finish_return): Likewise.
2425 (build_binary_op): Likewise.
2427 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2430 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2431 to sizetype before size_binop.
2433 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2435 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2438 2017-06-06 Marek Polacek <polacek@redhat.com>
2441 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2443 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2445 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2447 * c-parser.c (c_parser_binary_expression): Implement the
2448 -Wsizeof_pointer_div warning.
2449 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2450 from a parenthesized expression.
2451 (c_parser_expr_list): Use c_last_sizeof_loc.
2452 * c-tree.h (c_last_sizeof_loc): New external.
2453 * c-typeck.c (c_last_sizeof_loc): New variable.
2454 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2456 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2459 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2461 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2463 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2466 2017-05-24 Martin Sebor <msebor@redhat.com>
2469 * c-fold.c (c_fully_fold_internal): Adjust.
2470 * c-typeck.c (parser_build_unary_op): Adjust.
2472 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2474 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2475 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2478 2017-05-23 Marek Polacek <polacek@redhat.com>
2480 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2483 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2485 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2486 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2487 it returned invariant. Call tree_invariant_p unconditionally
2488 afterwards to decide whether to return expr or op0.
2490 2017-05-22 Nathan Sidwell <nathan@acm.org>
2492 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2494 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2496 * c-parser.c (c_parser_omp_clause_default): Handle
2497 "OMP_CLAUSE_DEFAULT_PRESENT".
2499 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2501 * config-lang.in (gtfiles): Add c-family/c-format.c.
2503 2017-05-18 Nathan Sidwell <nathan@acm.org>
2505 * c-decl.c (pushdecl_top_level): Delete unused function.
2507 2017-05-18 Marek Polacek <polacek@redhat.com>
2509 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2510 (check_earlier_gotos): Likewise.
2511 (define_label): Likewise.
2512 (pending_xref_error): Likewise.
2513 (smallest_type_quals_location): Likewise.
2514 (grokdeclarator): Likewise.
2515 (grokparms): Likewise.
2516 (identifier_global_value): Likewise.
2517 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2518 (find_init_member): Likewise.
2520 2017-05-18 Marek Polacek <polacek@redhat.com>
2522 * c-decl.c (start_decl): Use false/true instead of 0/1.
2523 (grokdeclarator): Likewise.
2524 (finish_struct): Likewise.
2525 (start_function): Change the return type to bool. Use false/true
2527 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2528 * c-tree.h (start_function): Update.
2529 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2530 (set_designator): Change the return type to bool. Use false/true
2533 2017-05-17 Marek Polacek <polacek@redhat.com>
2535 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2536 * c-typeck.c: Likewise.
2538 2017-05-17 Marek Polacek <polacek@redhat.com>
2541 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2542 DECL_IGNORED_P even for non-static compound literals.
2544 2017-05-17 Martin Liska <mliska@suse.cz>
2546 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2547 use it instead of int type.
2549 2017-05-17 Marek Polacek <polacek@redhat.com>
2551 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2553 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2554 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2555 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2556 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2558 (c_parser_conditional_expression): Likewise.
2559 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2560 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2561 (process_init_element): Likewise.
2562 (build_binary_op): Likewise.
2563 (handle_omp_array_sections_1): Likewise.
2565 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2567 * c-parser.c (c_parser_omp_clause_num_gangs)
2568 (c_parser_omp_clause_num_workers)
2569 (c_parser_omp_clause_vector_length): Merge functions into...
2570 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2573 2017-05-11 Nathan Sidwell <nathan@acm.org>
2575 * gimple-parser.c: Don't #include tree-dump.h.
2577 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2580 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2582 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2585 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2586 incorrect __MEM syntax.
2588 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2591 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2594 2017-05-09 Nathan Sidwell <nathan@acm.org>
2596 * c-tree.h (pushdecl): Declare.
2598 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2600 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2601 with diagnostic_report_diagnostic.
2602 * c-errors.c (pedwarn_c99): Likewise.
2603 (pedwarn_c90): Likewise.
2605 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2608 * c-gimplify.c (c_gimplify_expr): Remove calls to
2609 cilk_gimplifY_call_params_in_spawned_fn.
2611 2017-04-25 David Malcolm <dmalcolm@redhat.com>
2613 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2614 hint for removing extra semicolon.
2616 2017-04-21 Jakub Jelinek <jakub@redhat.com>
2619 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2620 enabled, set specs->type to integer_type_node.
2622 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2624 * c-array-notation.c: Fix typo in comment.
2626 2017-03-29 Marek Polacek <polacek@redhat.com>
2629 * c-decl.c (finish_decl): Check VAR_P.
2631 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2634 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2635 * c-typeck.c (c_mark_addressable): Likewise. Look through
2636 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2638 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2640 2017-03-23 Marek Polacek <polacek@redhat.com>
2642 * c-tree.h: Remove a C_RID_YYCODE reference.
2644 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2647 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2648 optional COMPOUND_EXPR with ubsan instrumentation.
2650 2017-03-17 Marek Polacek <polacek@redhat.com>
2652 * c-parser.c: Add C11 references.
2654 2017-03-15 Marek Polacek <polacek@redhat.com>
2656 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2658 2017-03-11 Marek Polacek <polacek@redhat.com>
2660 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2662 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2664 PR translation/79848
2665 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2667 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2669 2017-03-09 Marek Polacek <polacek@redhat.com>
2672 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2673 parameter declarations with initializers.
2675 2017-03-09 Jakub Jelinek <jakub@redhat.com>
2678 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2681 2017-03-07 Jakub Jelinek <jakub@redhat.com>
2684 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2685 for "may only be used in compound statements" diagnostics, change it
2686 such that the same translatable string is used for all pragmas. For
2687 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2689 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2690 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2691 "may only be used in compound statements" diagnostics, such that the
2692 same translatable string is used for all pragmas.
2694 2017-03-04 Marek Polacek <polacek@redhat.com>
2697 * c-decl.c (implicit_decl_warning): Add missing space.
2699 2017-03-03 Marek Polacek <polacek@redhat.com>
2702 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2703 current_function_prototype_arg_types is error_mark_node. Fix
2704 formatting. Use TREE_VALUE instead of TREE_TYPE.
2706 2017-03-03 Jakub Jelinek <jakub@redhat.com>
2709 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2710 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2711 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2715 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2716 instead of %<_Generic>.
2717 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2718 (c_parser_omp_target_exit_data): Use %<release%> instead of
2721 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2723 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2724 instead of just cond ? "..." : "...".
2725 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2726 for "enter"/"exit" keyword.
2727 (c_finish_oacc_routine): Don't use %s to supply portions of the
2730 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2733 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2734 handle -Wrestrict here.
2735 * c-typeck.c (build_function_call_vec): Adjust
2736 check_function_arguments caller.
2738 2017-02-23 Richard Biener <rguenther@suse.de>
2741 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2742 to initialize c_exprs to return.
2743 (c_parser_gimple_binary_expression): Likewise.
2744 (c_parser_gimple_unary_expression): Likewise.
2745 (c_parser_gimple_postfix_expression): Likewise.
2747 2017-02-22 Marek Polacek <polacek@redhat.com>
2750 * c-typeck.c (convert_arguments): Handle error_mark_node.
2752 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2754 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2755 value of c_parser_parse_ssa_name against error_mark_node and emit
2756 error if ssa name is anonymous and written as default definition.
2758 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2760 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2763 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2766 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2767 ignore #pragma omp target even when not followed by identifier.
2769 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2771 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2772 (c_parser_gimple_unary_expression): Likewise.
2774 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2776 * c-parser.c (c_parser_oacc_declare): Add missing space in
2779 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2782 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2783 set_c_expr_source_range when parsing ssa-name.
2785 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2786 Richard Biener <rguenther@suse.de>
2788 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2789 building IL when arguments are error_mark_node.
2790 (c_parser_gimple_unary_expression): Likewise.
2791 (c_parser_gimple_if_stmt): Likewise.
2792 (c_parser_gimple_switch_stmt): Likewise.
2793 (c_parser_gimple_return_stmt): Likewise.
2794 (c_parser_parse_ssa_name): When name lookup fails do not build
2795 an SSA name. Use undeclared rather than not declared in error
2798 2017-02-09 Marek Polacek <polacek@redhat.com>
2801 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2802 instead of c_parser_skip_until_found.
2804 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2807 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2808 symtab_node::get on automatic variables.
2810 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2811 Chung-Lin Tang <cltang@codesourcery.com>
2813 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2814 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2816 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2818 2017-02-07 Richard Biener <rguenther@suse.de>
2820 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2821 (c_parser_gimple_postfix_expression_after_primary):
2822 Do not use c_build_function_call_vec to avoid folding and promotion.
2825 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2828 * c-decl.c (pop_scope): Pass main_input_filename to
2829 build_translation_unit_decl.
2831 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2833 * c-parser.c: Include "read-rtl-function.h" and
2835 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2836 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2837 production. Update for renaming of field "gimple_pass" to
2838 "gimple_or_rtl_pass". If __RTL was seen, call
2839 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2840 to an auto_timevar, to cope with early exit.
2841 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2842 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2843 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2845 (c_parser_parse_rtl_body): New function.
2846 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2847 (struct c_declspecs): Rename field "gimple_pass" to
2848 "gimple_or_rtl_pass". Add field "rtl_p".
2849 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2850 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2851 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2852 (c_parser_gimple_or_rtl_pass_list): ...this.
2854 2017-01-20 Marek Polacek <polacek@redhat.com>
2857 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2859 2017-01-13 Richard Biener <rguenther@suse.de>
2861 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2864 2017-01-13 Richard Biener <rguenther@suse.de>
2866 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2867 _Literal ( type-name ) number.
2869 2017-01-12 Richard Biener <rguenther@suse.de>
2871 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2874 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2877 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2880 2017-01-11 Richard Biener <rguenther@suse.de>
2883 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2884 returns on parse errors.
2886 2017-01-04 Marek Polacek <polacek@redhat.com>
2889 * c-parser.c (c_parser_postfix_expression): Mark zero character
2890 constants by setting original_type in c_expr.
2891 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2892 with a zero character constant.
2893 (char_type_p): New function.
2895 2017-01-04 David Malcolm <dmalcolm@redhat.com>
2897 * c-parser.c (c_parser_declaration_or_fndef): Create a
2898 rich_location at init_loc and parse it to start_init.
2899 (last_init_list_comma): New global.
2900 (c_parser_braced_init): Update last_init_list_comma when parsing
2901 commas. Pass it to pop_init_level. Pass location of closing
2902 brace to pop_init_level.
2903 (c_parser_postfix_expression_after_paren_type): Create a
2904 rich_location at type_loc and parse it to start_init.
2905 (c_parser_omp_declare_reduction): Likewise for loc.
2906 * c-tree.h (start_init): Add rich_location * param.
2907 (pop_init_level): Add location_t param.
2908 * c-typeck.c (struct initializer_stack): Add field
2909 "missing_brace_richloc".
2910 (start_init): Add richloc param, use it to initialize
2911 the stack node's missing_brace_richloc.
2912 (last_init_list_comma): New decl.
2913 (finish_implicit_inits): Pass last_init_list_comma to
2915 (push_init_level): When finding missing open braces, add fix-it
2916 hints to the richloc.
2917 (pop_init_level): Add "insert_before" param and pass it
2918 when calling pop_init_level. Add fixits about missing
2919 close braces to any richloc. Use the richloc for the
2920 -Wmissing-braces warning.
2921 (set_designator): Pass last_init_list_comma to pop_init_level.
2922 (process_init_element): Likewise.
2924 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2926 Update copyright years.
2928 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2931 * c-typeck.c (build_function_call_vec): If check_function_arguments
2932 returns true, set TREE_NO_WARNING on CALL_EXPR.
2935 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2936 to *expr instead of overwriting it.
2938 2016-12-20 Richard Biener <rguenther@suse.de>
2940 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2942 (c_parser_gimple_statement): Only build assigns for non-error
2944 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2946 2016-12-14 Martin Jambor <mjambor@suse.cz>
2948 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2950 (c_finish_oacc_routine): Adjusted call to
2951 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2952 to use their new names.
2953 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2955 (c_parser_oacc_update): Likewise.
2956 (c_parser_omp_simd): Likewise.
2957 (c_parser_omp_target_update): Likewise.
2958 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2959 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2961 (c_finish_omp_cancellation_point): Likewise.
2962 * gimple-parser.c: Do not include omp-low.h
2964 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2965 James Norris <jnorris@codesourcery.com>
2967 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2968 EXIT_DATA,WAIT} are not used in compound statements.
2969 (c_parser_oacc_enter_exit_data): Update diagnostics.
2971 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2974 * c-decl.c (diagnose_mismatched_decls): Use
2975 OPT_Wbuiltin_declaration_mismatch here too.
2977 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
2978 Alan Hayward <alan.hayward@arm.com>
2979 David Sherwood <david.sherwood@arm.com>
2981 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2982 (make_label, finish_struct): Likewise.
2984 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2985 Richard Biener <rguenther@suse.de>
2987 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2988 * config-lang.in (gtfiles): Add c/c-parser.h.
2989 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2990 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2991 * c-parser.c (enum c_id_kind, struct c_token,
2992 c_parser_next_token_is, c_parser_next_token_is_not,
2993 c_parser_next_token_is_keyword,
2994 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2996 * c-parser.h: ... new header.
2997 * c-parser.c: Include c-parser.h and gimple-parser.h.
2998 (c_parser_peek_token, c_parser_peek_2nd_token,
2999 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3000 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3001 c_parser_error, c_parser_require, c_parser_skip_until_found,
3002 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3003 c_parser_type_name): Export.
3004 (c_parser_tokens_buf): New function.
3005 (c_parser_error): Likewise.
3006 (c_parser_set_error): Likewise.
3007 (c_parser_declspecs): Handle RID_GIMPLE.
3008 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3009 via c_parser_parse_gimple_body.
3010 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3011 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3012 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3013 c_parser_error, c_parser_require, c_parser_skip_until_found,
3014 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3015 c_parser_type_name): Declare.
3016 (struct c_parser): Declare forward.
3017 (c_parser_tokens_buf): Declare.
3018 (c_parser_error): Likewise.
3019 (c_parser_set_error): Likewise.
3020 * gimple-parser.c: New file.
3021 * gimple-parser.h: Likewise.
3023 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3026 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3029 2016-09-11 Le-Chun Wu <lcwu@google.com>
3030 Mark Wielaard <mjw@redhat.com>
3032 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3033 to the given -Wshadow= variant.
3035 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3037 * c-typeck.c: Include memmodel.h.
3039 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3042 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3043 instead of lhd_return_null_tree_v.
3045 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3048 * c-decl.c (smallest_type_quals_location): New static function.
3049 (grokdeclarator): Try to find the correct location for an ignored
3052 2016-09-26 Marek Polacek <polacek@redhat.com>
3055 * c-decl.c (pop_scope): Add gcc_fallthrough.
3057 2016-09-26 Marek Polacek <polacek@redhat.com>
3060 * c-parser.c (struct c_token): Add flags field.
3061 (c_lex_one_token): Pass it to c_lex_with_flags.
3062 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3063 into IFN_FALLTHROUGH.
3064 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3065 attribute fallthrough after a case label or default label.
3066 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3068 2016-09-24 Marek Polacek <polacek@redhat.com>
3071 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3072 have boolean value. Warn about ++/-- on booleans.
3074 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3076 * c-parser.c (incomplete_record_decls): Remove unnecessary
3077 = vNULL initialization of file scope vec.
3079 2016-09-16 Marek Polacek <polacek@redhat.com>
3081 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3083 2016-09-14 Marek Polacek <polacek@redhat.com>
3085 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3086 (fix_array_notation_expr): Likewise.
3087 * c-decl.c (finish_decl): Likewise.
3088 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3089 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3090 (function_to_pointer_conversion): Use false instead of 0.
3091 (convert_lvalue_to_rvalue): Likewise.
3092 (parser_build_unary_op): Likewise.
3093 (build_atomic_assign): Likewise.
3094 (build_unary_op): Change nonconvert parameter type to bool, use
3095 true/false instead of 1/0.
3096 (build_binary_op): Use true instead of 1.
3098 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3100 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3101 of add_fixit_insert to add_fixit_insert_before.
3103 2016-09-13 Marek Polacek <polacek@redhat.com>
3105 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3108 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3111 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3112 COMPOUND_EXPR to warn_for_omitted_condop.
3114 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3116 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3117 c_get_substring_location for this new langhook.
3119 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3122 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3124 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3125 instead of mark_exp_read on low_bound/length expression.
3126 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3127 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3128 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3129 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3130 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3131 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3132 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3133 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3134 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3135 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3136 instead of mark_expr_read.
3137 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3138 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3139 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3140 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3141 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3142 array section bases outside of depend clause, for depend clause
3143 use convert_lvalue_to_rvalue on the base.
3144 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3145 linear, aligned, map, to and from clauses.
3146 (c_omp_clause_copy_ctor): New function.
3148 2016-09-01 Marek Polacek <polacek@redhat.com>
3151 * c-typeck.c (composite_type): Add FALLTHRU comment.
3153 2016-08-31 David Malcolm <dmalcolm@redhat.com>
3155 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3156 to the insertion fixits for "struct", "union", and "enum".
3158 2016-08-30 David Malcolm <dmalcolm@redhat.com>
3160 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3161 rather than add_fixit_misspelled_id.
3162 (undeclared_variable): Likewise.
3163 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3164 now-redundant "here" params from add_fixit_insert method calls.
3165 (c_parser_parameter_declaration): Likewise.
3166 * c-typeck.c (build_component_ref): Remove now-redundant range
3167 param from add_fixit_replace method calls.
3169 2016-08-25 Marek Polacek <polacek@redhat.com>
3171 * c-typeck.c (parser_build_binary_op): Pass LHS to
3172 warn_logical_not_parentheses.
3174 2016-08-25 Marek Polacek <polacek@redhat.com>
3177 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3178 or _FloatN or _FloatNx is not supported.
3179 (finish_declspecs): Set type to integer_type_node when _FloatN or
3180 _FloatNx is not supported.
3182 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3185 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3186 (struct c_declspecs): Add field floatn_nx_idx.
3187 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3188 and _FloatNx type specifiers.
3189 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3190 (c_parser_declspecs, c_parser_attribute_any_word)
3191 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3192 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3193 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3194 narrower than double.
3196 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3197 Martin Liska <mliska@suse.cz>
3200 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3201 % to determine val element to change. Assert that
3202 wchar_bytes * charwidth fits into val array.
3204 2016-08-12 Marek Polacek <polacek@redhat.com>
3207 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3208 (c_parser_postfix_expression): Likewise.
3209 * c-typeck.c (build_unary_op): Adjust fall through comment.
3210 (c_mark_addressable): Likewise.
3212 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3215 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3216 array member through typedef, for orig_qual_indirect == 0 clear
3219 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3222 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3223 this up to selftest::run_c_tests.
3224 (selftest::run_c_tests): New function.
3226 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3228 * c-parser.c (struct oacc_routine_data): Add error_seen and
3229 fndecl_seen members.
3230 (c_finish_oacc_routine): Use these.
3231 (c_parser_declaration_or_fndef): Adjust.
3232 (c_parser_oacc_routine): Likewise. Support more C language
3233 constructs, and improve diagnostics. Move pragma context
3235 (c_parser_pragma): ... here.
3237 * c-parser.c (struct oacc_routine_data): New.
3238 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3240 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3241 declare target" attribute.
3243 2016-08-01 Jan Beulich <jbeulich@suse.com>
3245 * c-fold.c (c_fully_fold_internal): Also emit shift count
3246 warnings for vector types.
3247 * c-typeck.c (build_binary_op): Likewise.
3249 2016-07-29 Marek Polacek <polacek@redhat.com>
3252 * c-decl.c (finish_struct): Rephrase an error message.
3255 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3256 to error node for invalid code.
3259 * c-decl.c (implicitly_declare): Return decl early not only for
3260 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3262 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3265 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3266 on GNU extern inline functions.
3268 2016-07-29 Marek Polacek <polacek@redhat.com>
3271 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3274 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3276 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3278 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3280 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3282 (best_macro_match): Likewise, converting from a typedef to a
3284 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3285 (lookup_name_fuzzy): Update for change of best_macro_match to a
3286 subclass with a ctor that calls cpp_forall_identifiers.
3288 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3290 * c-decl.c (implicit_decl_warning): Update for conversion of
3291 return type of lookup_name_fuzzy to const char *.
3292 (undeclared_variable): Likewise.
3293 (lookup_name_fuzzy): Convert return type from tree to
3295 * c-parser.c (c_parser_declaration_or_fndef): Update for
3296 conversion of return type of lookup_name_fuzzy to const char *.
3297 (c_parser_parameter_declaration): Likewise.
3299 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3301 * c-parser.c (c_parser_oacc_declare): Don't scan for
3303 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3304 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3305 zero-length subarrays.
3307 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3310 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3311 instead of FUZZY_LOOKUP_NAME.
3312 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3313 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3315 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3318 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3320 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3322 * c-parser.c (c_parser_generic_selection): Make type of variable
3324 (c_parser_omp_declare_simd): Likewise.
3326 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3328 * c-decl.c (struct c_struct_parse_info): Change member types
3329 from vec to auto_vec.
3330 (start_struct): Adjust.
3331 (finish_struct): Likewise.
3333 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3336 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3338 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3340 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3341 Move pragma context checking into...
3342 (c_parser_omp_cancellation_point): ... here, and improve
3343 diagnostic messages.
3344 * c-typeck.c (c_finish_omp_cancel)
3345 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3347 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3350 * c-typeck.c (c_build_qualified_type): Don't clear
3351 C_TYPE_INCOMPLETE_VARS for the main variant.
3353 2016-06-28 Martin Sebor <msebor@redhat.com>
3356 * c-typeck.c (output_init_element): Diagnose incompatible types
3357 before non-constant initializers.
3359 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3361 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3363 2016-06-23 Andi Kleen <ak@linux.intel.com>
3365 * Make-lang.in: Add support for autofdo.
3367 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3370 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3371 (implicit_decl_warning): When issuing warnings for implicit
3372 declarations, attempt to provide a suggestion via
3374 (undeclared_variable): Likewise when issuing errors.
3375 (lookup_name_in_scope): Likewise.
3376 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3377 (best_macro_match): New typedef.
3378 (find_closest_macro_cpp_cb): New function.
3379 (lookup_name_fuzzy): New function.
3380 * c-parser.c: Include gcc-rich-location.h.
3381 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3382 (c_keyword_starts_typename): ...this new function.
3383 (c_parser_declaration_or_fndef): When issuing errors about
3384 missing "struct" etc, add a fixit. For other kinds of errors,
3385 attempt to provide a suggestion via lookup_name_fuzzy.
3386 (c_parser_parms_declarator): When looking ahead to detect typos in
3387 type names, also reject CPP_KEYWORD.
3388 (c_parser_parameter_declaration): When issuing errors about
3389 unknown type names, attempt to provide a suggestion via
3391 * c-tree.h (c_keyword_starts_typename): New prototype.
3393 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3396 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3397 c_common_type returns error_mark_node.
3399 2016-06-19 Martin Sebor <msebor@redhat.com>
3402 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3403 __alignof__ (expression).
3405 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3407 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3409 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3411 * c-typeck.c (build_component_ref): Simplify fixit code by
3412 using gcc_rich_location::add_fixit_misspelled_id.
3413 (set_init_label): Likewise.
3415 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3417 * c-parser.c (c_parser_initelt): Provide location of name for new
3418 location_t param of set_init_label.
3419 * c-tree.h (set_init_label): Add location_t param.
3420 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3421 param and use it when issuing error messages about unrecognized
3422 field names. Attempt to provide a fixit hint if appropriate,
3423 otherwise update the error message to provide the type name.
3425 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3428 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3431 2016-06-08 Martin Sebor <msebor@redhat.com>
3432 Jakub Jelinek <jakub@redhat.com>
3436 * c-typeck.c (convert_arguments): Don't promote last argument
3437 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3439 2016-06-08 Marek Polacek <polacek@redhat.com>
3442 * c-decl.c (grokdeclarator): Check TYPE_P.
3445 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3448 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3450 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3451 and structure element reference, capture the location of the
3452 element name token and pass it to build_component_ref.
3453 (c_parser_postfix_expression_after_primary): Likewise for
3454 structure element dereference.
3455 (c_parser_omp_variable_list): Likewise for
3456 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3457 * c-tree.h (build_component_ref): Add location_t param.
3458 * c-typeck.c (build_component_ref): Add location_t param
3459 COMPONENT_LOC. Use it, if available, when issuing hints about
3460 mispelled member names to provide a fixit replacement hint.
3462 2016-06-06 Marek Polacek <polacek@redhat.com>
3465 * c-parser.c (c_parser_direct_declarator): Set location.
3467 2016-06-06 Marek Polacek <polacek@redhat.com>
3469 * c-typeck.c (comptypes_internal): Handle comparisons of
3470 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3471 TYPE_REF_CAN_ALIAS_ALL.
3473 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3475 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3476 arguments as addressable when async clause exists.
3478 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3481 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3482 when combined with target construct.
3484 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3486 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3487 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3489 2016-05-25 Marek Polacek <polacek@redhat.com>
3492 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3495 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3497 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3499 * c-parser.c (c_parser_oacc_declare): Add support for
3500 GOMP_MAP_FIRSTPRIVATE_POINTER.
3501 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3502 argument with enum c_omp_region_type ort.
3503 (handle_omp_array_sections): Likewise. Update call to
3504 handle_omp_array_sections_1.
3505 (c_finish_omp_clauses): Add specific errors and warning messages for
3506 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3507 call to handle_omp_array_sections.
3509 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3511 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3513 2016-05-24 Richard Biener <rguenther@suse.de>
3517 * c-typeck.c (build_array_ref): Do not complain about indexing
3518 non-lvalue vectors. Adjust for function name change.
3520 2016-05-20 Martin Sebor <msebor@redhat.com>
3523 * c-typeck.c (error_init): Use
3524 expansion_point_location_if_in_system_header.
3525 (warning_init): Same.
3527 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3530 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3532 (c_parser_postfix_expression): Likewise.
3533 * c-tree.h (c_expr::set_error): New method.
3534 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3535 that result's range is initialized.
3537 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3539 * c-typeck.c (parser_build_unary_op): Fix formatting.
3541 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3543 * c-decl.c (grokdeclarator): Remove errmsg and use of
3544 targetm.invalid_return_type.
3545 (grokparms): Remove errmsg and use of
3546 targetm.invalid_parameter_type.
3548 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3550 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3551 function return type.
3553 2016-05-12 Marek Polacek <polacek@redhat.com>
3556 * c-decl.c (build_compound_literal): Pass LOC down to
3557 c_incomplete_type_error.
3558 * c-tree.h (require_complete_type): Adjust declaration.
3559 (c_incomplete_type_error): Likewise.
3560 * c-typeck.c (require_complete_type): Add location parameter, pass it
3561 down to c_incomplete_type_error.
3562 (c_incomplete_type_error): Add location parameter, pass it down to
3564 (build_component_ref): Pass location down to c_incomplete_type_error.
3565 (default_conversion): Pass location down to require_complete_type.
3566 (build_array_ref): Likewise.
3567 (build_function_call_vec): Likewise.
3568 (convert_arguments): Likewise.
3569 (build_unary_op): Likewise.
3570 (build_c_cast): Likewise.
3571 (build_modify_expr): Likewise.
3572 (convert_for_assignment): Likewise.
3573 (c_finish_omp_clauses): Likewise.
3575 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3578 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3580 * c-errors.c (pedwarn_c90): Return true if warned.
3581 * c-tree.h (pedwarn_c90): Change return type to bool.
3582 (enum c_declspec_word): Add new enumerator cdw_atomic.
3584 2016-05-11 Marek Polacek <polacek@redhat.com>
3587 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3588 diagnose_mismatched_attributes and call it.
3590 2016-05-10 Marek Polacek <polacek@redhat.com>
3593 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3594 on a declaration following the definition.
3596 2016-05-05 Jakub Jelinek <jakub@redhat.com>
3598 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3599 parse it through to c_parser_c99_block_statement.
3600 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3603 2016-05-04 Marek Polacek <polacek@redhat.com>
3605 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3608 2016-05-04 Marek Polacek <polacek@redhat.com>
3611 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3612 for macro expansions.
3614 2016-05-03 Marek Polacek <polacek@redhat.com>
3617 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3618 check_builtin_function_arguments.
3620 2016-05-03 Richard Biener <rguenther@suse.de>
3622 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3623 the checksum from the previous stage.
3625 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3627 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3628 c_finish_omp_clauses.
3629 (c_parser_omp_all_clauses): Likewise.
3630 (c_parser_oacc_cache): Likewise.
3631 (c_parser_oacc_loop): Likewise.
3632 (omp_split_clauses): Likewise.
3633 (c_parser_omp_declare_target): Likewise.
3634 (c_parser_cilk_all_clauses): Likewise.
3635 (c_parser_cilk_for): Likewise.
3636 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3637 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3639 2016-05-02 Marek Polacek <polacek@redhat.com>
3642 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3645 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3648 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3649 OACC_LOOP_CLAUSE_MASK.
3650 (c_parser_oacc_kernels_parallel): Update call to
3651 c_oacc_split_loop_clauses.
3653 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3655 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3656 argument to build_modify_expr in two cases.
3658 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3660 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3661 warn_for_memset instead of warning directly here.
3663 2016-04-26 Marek Polacek <polacek@redhat.com>
3666 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3668 (c_parser_for_statement): ... here.
3669 (c_parser_if_statement): Use it.
3670 (c_parser_switch_statement): Use it.
3671 (c_parser_while_statement): Use it.
3674 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3676 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3679 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3680 instead of c_finish_cilk_clauses.
3681 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3682 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3683 floating-point variables in the linear clause for Cilk Plus.
3685 2016-04-18 Michael Matz <matz@suse.de>
3687 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3688 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3690 2016-04-15 Marek Polacek <polacek@redhat.com>
3693 * c-typeck.c (build_unary_op): Pass location down to error and
3696 2016-04-15 Jakub Jelinek <jakub@redhat.com>
3699 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3701 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3702 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3703 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3704 Adjust c_parser_pragma callers.
3705 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3707 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3709 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3710 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3711 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3712 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3713 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3714 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3715 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3716 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3718 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3719 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3722 2016-04-13 Marek Polacek <polacek@redhat.com>
3725 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3727 (c_parser_statement): Likewise.
3728 (c_parser_c99_block_statement): Likewise.
3729 (c_parser_while_statement): Likewise.
3730 (c_parser_for_statement): Likewise.
3731 (c_parser_if_body): Don't set IF_P here.
3732 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3733 about dangling else here.
3734 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3735 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3736 warn about dangling else here.
3738 2016-04-04 Marek Polacek <polacek@redhat.com>
3741 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3743 2016-03-31 Marek Polacek <polacek@redhat.com>
3746 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3748 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3751 * c-parser.c (c_parser_postfix_expression): Set the source range
3752 for uses of "__builtin_types_compatible_p".
3754 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3757 * c-typeck.c (composite_type): Don't count void_list_node
3758 into len, if the list is terminated by void_list_node, start
3759 with void_list_node instead of NULL for newargs. Stop
3762 2016-03-16 Marek Polacek <polacek@redhat.com>
3765 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3766 nested functions returning VM types.
3768 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3770 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3771 when calling c_finish_omp_clauses.
3773 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3776 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3779 2016-03-04 Marek Polacek <polacek@redhat.com>
3782 * c-parser.c (c_parser_postfix_expression): Call
3783 c_parser_cast_expression rather than c_parser_postfix_expression.
3785 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3789 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3790 of incomplete decls to error_mark_node.
3792 2016-02-24 Marek Polacek <polacek@redhat.com>
3795 * c-decl.c (finish_decl): Don't update the copy of the type of a
3796 different decl type.
3798 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3801 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3802 in id_kind reclassification.
3804 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3807 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3809 2016-02-16 James Norris <jnorris@codesourcery.com>
3812 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3814 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3816 * c-decl.c (build_null_declspecs): Zero the entire struct.
3819 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3820 callers changed. If nested_p is true, use it to call
3821 finish_implicit_inits.
3822 * c-tree.h (finish_implicit_inits): Declare.
3823 * c-typeck.c (finish_implicit_inits): New function. Move code
3825 (push_init_level): ... here.
3826 (set_designator, process_init_element): Call finish_implicit_inits.
3828 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3831 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3832 arguments for -Waddress warning.
3834 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3837 * c-decl.c (finish_enum): When honoring mode attribute,
3838 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3840 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3843 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3844 all type variants, not just TYPE_MAIN_VARIANT.
3846 2016-01-27 Jakub Jelinek <jakub@redhat.com>
3849 * c-decl.c (c_write_global_declarations_1): Warn with
3850 warn_unused_function if static prototype without definition
3853 2016-01-27 Marek Polacek <polacek@redhat.com>
3856 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3857 to unsigned, if needed. Add -Wsign-compare warning.
3859 2016-01-26 Jakub Jelinek <jakub@redhat.com>
3861 PR tree-optimization/69483
3862 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3864 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3867 * c-tree.h (incomplete_record_decls): Declare.
3868 * c-parser.c (incomplete_record_decls): Define.
3869 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3870 report error if any decl has zero size.
3871 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3872 or enum type to incomplete_record_decls.
3874 2016-01-14 Tom de Vries <tom@codesourcery.com>
3876 PR tree-optimization/68773
3877 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3880 2016-01-14 Marek Polacek <polacek@redhat.com>
3883 * c-decl.c (grokdeclarator): Provide more information for invalid
3886 2016-01-06 David Malcolm <dmalcolm@redhat.com>
3888 * c-parser.c (c_parser_unary_expression): For dereferences, build
3889 a combined location before calling build_indirect_ref, so that
3890 error reports cover the full range, manually updating the c_expr
3893 2016-01-06 Marek Polacek <polacek@redhat.com>
3896 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3897 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3900 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3902 Update copyright years.
3904 2016-01-04 Marek Polacek <polacek@redhat.com>
3907 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3908 optimization to use __atomic_fetch_* built-in if possible.
3910 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3912 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3914 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3917 2015-12-22 Marek Polacek <polacek@redhat.com>
3920 * c-typeck.c (build_component_ref): Warn when acessing elements of
3921 atomic structures or unions.
3923 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3925 * c-typeck.c: Include "gcc-rich-location.h".
3926 (build_binary_op): In the two places that call binary_op_error,
3927 create a gcc_rich_location and populate it with the location of
3928 the binary op and its two operands.
3930 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3932 * c-parser.c (c_parser_statement_after_labels): When calling
3933 c_finish_return, Use the return expression's location if it has
3934 one, falling back to the location of the first token within it.
3935 * c-typeck.c (c_finish_return): When issuing warnings about
3936 the incorrect presence/absence of a return value, issue a note
3937 showing the declaration of the function.
3939 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3941 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3943 (c_parser_peek_nth_token): New function.
3944 (c_parser_peek_conflict_marker): New function.
3945 (c_parser_error): Detect conflict markers and report them as such.
3947 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3949 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3950 to preserve range information for the primary expression
3951 in the call to c_parser_postfix_expression_after_primary.
3953 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3955 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3956 expression location, falling back on the first token location,
3957 rather than always using the latter.
3959 2015-12-16 Marek Polacek <polacek@redhat.com>
3962 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3965 2015-12-15 Marek Polacek <polacek@redhat.com>
3968 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3971 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3973 * c-parser.c (c_parser_alignof_expression): Capture location of
3974 closing parenthesis (if any), or of end of unary expression, and
3975 use it to build a src_range for the expression.
3977 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3980 * c-parser.c (c_parser_get_builtin_args): Add
3981 "out_close_paren_loc" param, and write back to it.
3982 (c_parser_postfix_expression): Capture the closing
3983 parenthesis location for RID_CHOOSE_EXPR,
3984 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3985 RID_BUILTIN_SHUFFLE and use it to set the source range
3986 for such expressions; within RID_BUILTIN_COMPLEX set
3987 the underlying location.
3989 2015-12-07 Marek Polacek <polacek@redhat.com>
3992 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3993 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3995 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3997 * c-tree.h (c_build_va_arg): Adjust prototype.
3998 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3999 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4000 parameter, adjust throughout and issue an error if EXPR is a component
4001 with reverse storage order.
4003 2015-12-02 Jason Merrill <jason@redhat.com>
4005 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4006 (c_fully_fold_internal, decl_constant_value_for_optimization):
4007 Move from c-common.c.
4008 * c-tree.h: Declare decl_constant_value_for_optimization.
4009 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4011 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4014 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4015 following link from declarator to next declarator. Track original
4016 qualified type and pass it to c_build_qualified_type.
4017 * c-typeck.c (c_build_qualified_type): Add arguments
4018 orig_qual_type and orig_qual_indirect.
4020 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4022 * c-parser.c (c_parser_omp_clause_name)
4023 (c_parser_oacc_all_clauses): Alphabetical sorting.
4025 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4028 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4031 2015-12-01 Julian Brown <julian@codesourcery.com>
4032 Cesar Philippidis <cesar@codesourcery.com>
4033 James Norris <James_Norris@mentor.com>
4035 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4036 (c_parser_oacc_clause_use_device): New function.
4037 (c_parser_oacc_all_clauses): Add use_device support.
4038 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4039 (c_parser_oacc_host_data): New function.
4040 (c_parser_omp_construct): Add host_data support.
4041 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4042 * c-typeck.c (c_finish_oacc_host_data): New function.
4043 (c_finish_omp_clauses): Add use_device support.
4045 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4048 * c-decl.c: Set TYPE_PACKED in variants.
4050 2015-11-27 Martin Liska <mliska@suse.cz>
4053 * c-array-notation.c (fix_builtin_array_notation_fn):
4054 Use release_vec_vec instead of vec::release.
4055 (build_array_notation_expr): Likewise.
4056 (fix_conditional_array_notations_1): Likewise.
4057 (fix_array_notation_expr): Likewise.
4058 (fix_array_notation_call_expr): Likewise.
4060 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4063 * c-parser.c (c_parser_compound_statement_nostart): If
4064 last_label is true, use pragma_stmt instead of pragma_compound
4065 as second c_parser_pragma argument.
4066 (c_parser_omp_ordered, c_parser_omp_target_update,
4067 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4068 false as second argument to c_parser_skip_to_pragma_eol after
4069 diagnosing standalone directives used in pragma_stmt context.
4071 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4073 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4074 with "if (ENABLE_OFFLOADING)".
4076 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4079 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4080 for various Objective-C constructs: Class.name syntax,
4081 @selector(), @protocol(), @encode(), and [] message syntax.
4083 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4086 * c-typeck.c (should_suggest_deref_p): New function.
4087 (build_component_ref): Special-case POINTER_TYPE when
4088 generating a "not a structure of union" error message, and
4089 suggest a "->" rather than a ".", providing a fix-it hint.
4091 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4093 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4094 candidate into a new function, find_closest_identifier.
4096 2015-11-19 Marek Polacek <polacek@redhat.com>
4099 * c-typeck.c (parser_build_binary_op): Properly handle
4100 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4102 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4104 * c-parser.c (set_c_expr_source_range): Bulletproof both
4105 overloaded implementations against NULL expr->value.
4106 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4108 (c_parser_unary_expression): Likewise when handling addresses of
4110 (c_parser_postfix_expression): Likewise for statement expressions,
4111 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4112 __builtin_va_arg, and for __builtin_offset_of.
4113 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4114 src_range using the range of the braced initializer.
4115 (c_parser_transaction_expression): Set src_range for "ret" to a
4116 sane pair of values.
4118 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4120 * c-parser.c (c_finish_omp_declare_simd): Look for
4121 "simd" attribute as well. Update error message.
4123 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4125 * c-parser.c (c_parser_omp_declare_target): Adjust.
4127 2015-11-14 Jakub Jelinek <jakub@redhat.com>
4129 * c-typeck.c (c_finish_omp_clauses): Don't mark
4130 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4132 2015-11-14 Marek Polacek <polacek@redhat.com>
4134 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4135 * c-typeck.c: Likewise.
4137 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4139 * c-decl.c (warn_defaults_to): Pass line_table to
4141 * c-errors.c (pedwarn_c99): Likewise.
4142 (pedwarn_c90): Likewise.
4143 * c-parser.c (set_c_expr_source_range): New functions.
4144 (c_token::get_range): New method.
4145 (c_token::get_finish): New method.
4146 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4147 based on the range from the start of the LHS to the end of the
4149 (c_parser_conditional_expression): Likewise, based on the range
4150 from the start of the cond.value to the end of exp2.value.
4151 (c_parser_binary_expression): Call set_c_expr_source_range on
4152 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4153 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4154 based on the cast_loc through to the end of the expr.
4155 (c_parser_unary_expression): Likewise, based on the
4156 op_loc through to the end of op.
4157 (c_parser_sizeof_expression) Likewise, based on the start of the
4158 sizeof token through to either the closing paren or the end of
4160 (c_parser_postfix_expression): Likewise, using the token range,
4161 or from the open paren through to the close paren for
4162 parenthesized expressions.
4163 (c_parser_postfix_expression_after_primary): Likewise, for
4164 various kinds of expression.
4165 * c-tree.h (struct c_expr): Add field "src_range".
4166 (c_expr::get_start): New method.
4167 (c_expr::get_finish): New method.
4168 (set_c_expr_source_range): New decls.
4169 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4170 on ret for prefix unary ops.
4171 (parser_build_binary_op): Likewise, running from the start of
4172 arg1.value through to the end of arg2.value.
4174 2015-11-13 Marek Polacek <polacek@redhat.com>
4177 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4179 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4181 * c-typeck.c: Include spellcheck.h.
4182 (lookup_field_fuzzy_find_candidates): New function.
4183 (lookup_field_fuzzy): New function.
4184 (build_component_ref): If the field was not found, try using
4185 lookup_field_fuzzy and potentially offer a suggestion.
4187 2015-11-12 James Norris <jnorris@codesourcery.com>
4188 Joseph Myers <joseph@codesourcery.com>
4190 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4191 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4192 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4193 and PRAGMA_OMP_CLAUSE_LINK.
4194 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4195 and PRAGMA_OACC_CLAUSE_LINK.
4196 (OACC_DECLARE_CLAUSE_MASK): New definition.
4197 (c_parser_oacc_declare): New function.
4199 2015-11-12 Marek Polacek <polacek@redhat.com>
4202 * c-parser.c (c_parser_for_statement): Reclassify the token in
4205 2015-11-11 Marek Polacek <polacek@redhat.com>
4209 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4210 checking the size of an array.
4212 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4214 * c-array-notation.c: Remove unused header files.
4215 * c-aux-info.c: Likewise.
4216 * c-convert.c: Likewise.
4217 * c-decl.c: Likewise.
4218 * c-errors.c: Likewise.
4219 * c-lang.c: Likewise.
4220 * c-objc-common.c: Likewise.
4221 * c-parser.c: Likewise.
4222 * c-typeck.c: Likewise.
4223 * gccspec.c: Likewise.
4225 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4226 Cesar Philippidis <cesar@codesourcery.com>
4227 James Norris <jnorris@codesourcery.com>
4228 Julian Brown <julian@codesourcery.com>
4229 Nathan Sidwell <nathan@codesourcery.com>
4231 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4233 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4234 (c_parser_pragma): Parse 'acc routine'.
4235 (OACC_ROUTINE_CLAUSE_MARK): Define.
4236 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4238 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4241 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4242 location of the backward-goto to the start of the loop body.
4244 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4247 * c-parser.c (c_parser_while_statement): Finish the loop before
4248 parsing ahead for misleading indentation.
4249 (c_parser_for_statement): Likewise.
4251 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4253 * c-decl.c (finish_struct): If the structure has reverse storage
4254 order, rewrite the type of array fields with scalar component. Call
4255 maybe_apply_pragma_scalar_storage_order on entry.
4256 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4257 errors on bit-fields and reverse SSO here and not...
4258 (c_mark_addressable): ...here.
4259 (output_init_element): Adjust call to initializer_constant_valid_p.
4260 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4262 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4264 * c-decl.c (warn_defaults_to): Update for change in signature
4265 of diagnostic_set_info.
4266 * c-errors.c (pedwarn_c99): Likewise.
4267 (pedwarn_c90): Likewise.
4268 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4269 for textinfo::set_location.
4271 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4272 Thomas Schwinge <thomas@codesourcery.com>
4273 James Norris <jnorris@codesourcery.com>
4275 * c-parser.c (c_parser_omp_clause_name): Add support for
4276 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4277 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4278 default(none) in OpenACC.
4279 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4281 (c_parser_oacc_clause_tile): New function.
4282 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4283 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4284 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4286 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4287 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4289 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4290 (c_parser_oacc_update): Update the error message for missing clauses.
4291 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4292 and OMP_CLAUSE_INDEPENDENT.
4294 2015-11-05 Marek Polacek <polacek@redhat.com>
4297 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4298 deal with pre-evaluation on invalid types.
4300 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4301 Ilya Verbin <ilya.verbin@intel.com>
4303 * c-parser.c: Include context.h and gimple-expr.h.
4304 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4305 monotonic together with nonmonotonic.
4306 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4307 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4308 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4309 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4310 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4311 expressions on combined target teams before the target.
4312 (c_parser_omp_declare_target): If decl has "omp declare target" or
4313 "omp declare target link" attribute, and cgraph or varpool node already
4314 exists, then set corresponding flags. Call c_finish_omp_clauses
4315 in the parenthesized extended-list syntax case.
4316 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4318 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4319 on OMP_CLAUSE_REDUCTION array sections.
4320 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4321 into the constant offset, or for variable low-bound using
4322 POINTER_PLUS_EXPR. For structure element based array sections use
4323 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4324 (c_finish_omp_clauses): Drop generic_field_head, structure
4325 elements are now always mapped even as array section bases,
4326 diagnose same var in data sharing and mapping clauses. Diagnose if
4327 linear step on declare simd is neither a constant nor a uniform
4328 parameter. Look through POINTER_PLUS_EXPR for array section
4329 reductions. Diagnose the same var or function appearing multiple
4330 times on the same directive. Fix up wording for the to clause if t
4331 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4332 modifier on kinds other than dynamic or guided or nonmonotonic
4333 modifier together with ordered clause.
4335 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4336 Chung-Lin Tang <cltang@codesourcery.com>
4338 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4340 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4342 * c-array-notation.c: Reorder #include's and remove duplicates.
4343 * c-aux-info.c: Likewise.
4344 * c-convert.c: Likewise.
4345 * c-decl.c: Likewise.
4346 * c-errors.c: Likewise.
4347 * c-lang.c: Likewise.
4348 * c-objc-common.c: Likewise.
4349 * c-parser.c: Likewise.
4350 * c-typeck.c: Likewise.
4352 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4355 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4356 after calling build_qualified_type.
4358 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4359 Thomas Schwinge <thomas@codesourcery.com>
4360 James Norris <jnorris@codesourcery.com>
4361 Joseph Myers <joseph@codesourcery.com>
4362 Julian Brown <julian@codesourcery.com>
4363 Bernd Schmidt <bschmidt@redhat.com>
4365 * c-parser.c (c_parser_oacc_shape_clause): New.
4366 (c_parser_oacc_simple_clause): New.
4367 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4368 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4370 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4371 James Norris <jnorris@codesourcery.com>
4372 Cesar Philippidis <cesar@codesourcery.com>
4376 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4377 parameters, and handle these. Adjust all users.
4378 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4380 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4382 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4384 (c_finish_omp_construct): Declare function.
4385 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4386 Merge functions into...
4387 (c_finish_omp_construct): ... this new function.
4389 2015-10-22 Richard Biener <rguenther@suse.de>
4391 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4392 before folding a MINUS_EXPR.
4394 2015-10-21 Marek Polacek <polacek@redhat.com>
4397 * c-decl.c (start_function): Warn about vararg functions without
4400 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4402 * c-typeck.c (build_conditional_expr): Use boolean vector
4403 type for vector comparison.
4404 (build_vec_cmp): New.
4405 (build_binary_op): Use build_vec_cmp for comparison.
4407 2015-10-20 Marek Polacek <polacek@redhat.com>
4409 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4411 2015-10-20 Marek Polacek <polacek@redhat.com>
4414 * c-parser.c (c_parser_attributes): Break out of the loop if the
4415 token after an attribute isn't a comma.
4417 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4418 Aldy Hernandez <aldyh@redhat.com>
4420 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4421 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4422 (c_parser_omp_variable_list): Handle structure elements for
4423 map, to and from clauses. Handle array sections in reduction
4424 clause. Formatting fixes.
4425 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4426 if clause modifiers.
4427 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4428 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4429 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4430 c_parser_omp_clause_is_device_ptr): New functions.
4431 (c_parser_omp_clause_ordered): Parse optional parameter.
4432 (c_parser_omp_clause_reduction): Handle array reductions.
4433 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4434 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4436 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4437 (c_parser_omp_clause_depend_sink): New function.
4438 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4439 (c_parser_omp_clause_map): Parse release/delete map kinds and
4440 optional always modifier.
4441 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4442 and c_finish_omp_clauses callers.
4443 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4444 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4445 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4446 (OMP_CRITICAL_CLAUSE_MASK): Define.
4447 (c_parser_omp_critical): Parse critical clauses.
4448 (c_parser_omp_for_loop): Handle doacross loops, adjust
4449 c_finish_omp_for and c_finish_omp_clauses callers.
4450 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4451 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4452 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4453 (c_parser_omp_for): Disallow ordered clause when combined with
4454 distribute. Disallow linear clause when combined with distribute
4455 and not combined with simd.
4456 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4457 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4458 parse clauses and if depend clause is found, don't parse a body.
4459 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4460 Allow target parallel without for after it.
4461 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4462 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4463 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4465 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4466 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4467 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4468 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4470 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4471 defaultmap and is_device_ptr clauses.
4472 (c_parser_omp_target): Parse target parallel and target simd. Set
4473 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4474 and target exit data. Diagnose invalid map kinds.
4475 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4476 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4478 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4480 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4481 (c_parser_omp_taskloop): New function.
4482 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4483 handle PRAGMA_OMP_TASKLOOP.
4484 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4485 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4486 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4487 Add IS_OMP argument, handle structure element bases, diagnose
4488 bitfields, pass IS_OMP recursively, diagnose known zero length
4489 array sections in depend clauses, handle array sections in reduction
4490 clause, diagnose negative length even for pointers.
4491 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4492 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4493 array sections in reduction clause, set
4494 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4495 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4496 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4497 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4499 2015-10-06 Marek Polacek <polacek@redhat.com>
4501 * c-parser.c (c_parser_statement_after_labels): Use
4502 protected_set_expr_location.
4503 (c_parser_omp_clause_num_gangs): Likewise.
4504 (c_parser_omp_clause_num_threads): Likewise.
4505 (c_parser_omp_clause_num_workers): Likewise.
4506 (c_parser_omp_clause_vector_length): Likewise.
4507 (c_parser_omp_clause_num_teams): Likewise.
4508 (c_parser_omp_clause_thread_limit): Likewise.
4509 * c-typeck.c (build_c_cast): Likewise.
4510 (c_cast_expr): Likewise.
4512 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4514 * c-typeck.c (c_tree_equal): Use real_equal instead of
4517 2015-10-04 Jason Merrill <jason@redhat.com>
4519 * c-parser.c (c_lex_one_token): Handle @synchronized.
4520 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4521 can change whether the function is transaction_safe.
4523 2015-10-02 Marek Polacek <polacek@redhat.com>
4526 * c-typeck.c (convert_for_assignment): Use the expansion point
4527 location throughout.
4529 2015-10-02 Marek Polacek <polacek@redhat.com>
4532 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4533 and pass it down to c_parser_if_statement.
4534 (c_parser_else_body): Add CHAIN parameter and pass it down to
4535 c_parser_statement_after_labels.
4536 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4537 duplicated if-else-if conditions.
4539 2015-10-01 Marek Polacek <polacek@redhat.com>
4541 * c-typeck.c (convert_for_assignment): Improve commentary.
4543 2015-09-30 Marek Polacek <polacek@redhat.com>
4546 * c-typeck.c (c_finish_return): Use the expansion point location for
4547 certain "return with value" warnings.
4549 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4551 * c-parser.c (pragma_lex): Add loc argument.
4553 2015-09-15 Marek Polacek <polacek@redhat.com>
4556 * c-decl.c (tag_exists_p): New function.
4557 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4558 struct/union/enum keywords are missing.
4559 * c-tree.h (tag_exists_p): Declare.
4561 2015-09-15 Marek Polacek <polacek@redhat.com>
4563 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4564 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4565 Return NULL_TREE instead of 0.
4566 (lookup_name): Return NULL_TREE instead of 0.
4567 (lookup_name_in_scope): Likewise.
4568 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4569 (parser_xref_tag): Use false instead of 0.
4570 (start_struct): Use true instead of 1.
4571 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4573 2015-09-14 Marek Polacek <polacek@redhat.com>
4575 * c-typeck.c (set_nonincremental_init_from_string): Use
4576 HOST_WIDE_INT_M1U when shifting a negative value.
4578 2015-09-09 Mark Wielaard <mjw@redhat.com>
4580 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4583 2015-09-10 Jakub Jelinek <jakub@redhat.com>
4586 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4587 into OMP_FOR_PRE_BODY rather than before the loop.
4589 2015-09-09 Jakub Jelinek <jakub@redhat.com>
4592 * c-parser.c (c_parser_oacc_all_clauses,
4593 c_parser_omp_all_clauses): Remove invalid clause from
4594 list of clauses even if parser->error is set.
4597 * c-parser.c (c_parser_omp_clause_aligned,
4598 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4600 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4604 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4605 instead of c_parser_unary_expression. If the result is !lvalue_p,
4606 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4608 2015-09-04 Marek Polacek <polacek@redhat.com>
4611 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4613 2015-09-03 Martin Sebor <msebor@redhat.com>
4616 * c-typeck.c (convert_arguments, parser_build_unary_op,
4617 build_conditional_expr, c_cast_expr, convert_for_assignment,
4618 build_binary_op, _objc_common_truthvalue_conversion): Call
4620 (c_decl_implicit): Define.
4622 2015-09-02 Marek Polacek <polacek@redhat.com>
4625 * c-parser.c (c_parser_enum_specifier): Give a better error for
4628 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4630 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4632 2015-08-12 Marek Polacek <polacek@redhat.com>
4634 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4637 2015-08-03 Marek Polacek <polacek@redhat.com>
4640 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4642 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4644 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4646 * c-parser.c (c_parser_if_body): Take token_indent_info
4647 argument. Call warn_for_misleading_indentation even when the
4648 body is a semicolon. Extract token_indent_infos corresponding
4649 to the guard, body and next tokens. Adjust call to
4650 warn_for_misleading_indentation accordingly.
4651 (c_parser_else_body): Likewise.
4652 (c_parser_if_statement): Likewise.
4653 (c_parser_while_statement): Likewise.
4654 (c_parser_for_statement): Likewise.
4656 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4657 Manuel López-Ibáñez <manu@gcc.gnu.org>
4659 * c-decl.c (get_parm_info): Remove static var. Update warning
4662 2015-07-27 Marek Polacek <polacek@redhat.com>
4666 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4668 2015-07-20 Marek Polacek <polacek@redhat.com>
4671 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4672 (build_binary_op): Warn about left shift overflows.
4674 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4676 * c-array-notation.c: Adjust includes for flags.h changes.
4677 * c-objc-common.c: Likewise.
4679 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4681 * c-array-notation.c: Adjust includes.
4682 * c-aux-info.c: Likewise.
4683 * c-convert.c: Likewise.
4684 * c-decl.c: Likewise.
4685 * c-errors.c: Likewise.
4686 * c-lang.c: Likewise.
4687 * c-objc-common.c: Likewise.
4688 * c-parser.c: Likewise.
4689 * c-typeck.c: Likewise.
4691 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4694 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4696 2015-06-29 Marek Polacek <polacek@redhat.com>
4699 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4700 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4701 about -Wswitch-bool here.
4702 (do_case): Update c_add_case_label call.
4703 (c_finish_case): Update c_do_switch_warnings call.
4705 2015-06-27 Marek Polacek <polacek@redhat.com>
4707 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4709 2015-06-26 Marek Polacek <polacek@redhat.com>
4711 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4713 * c-typeck.c (array_to_pointer_conversion): Likewise.
4714 (build_unary_op): Likewise.
4715 (c_finish_return): Likewise.
4717 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4719 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4720 * c-parser.c: Likewise.
4722 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4724 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4725 instead of pointer_hash.
4726 (detect_field_duplicates): Likewise.
4728 2015-06-25 Marek Polacek <polacek@redhat.com>
4730 * c-array-notation.c: Use VAR_P throughout.
4731 * c-decl.c: Likewise.
4732 * c-objc-common.c: Likewise.
4733 * c-parser.c: Likewise.
4734 * c-typeck.c: Likewise.
4736 2015-06-25 Marek Polacek <polacek@redhat.com>
4738 * c-decl.c: Use is_global_var throughout.
4739 * c-parser.c: Likewise.
4740 * c-typeck.c: Likewise.
4742 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4744 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4745 * c-aux-info.c: Likewise.
4746 * c-convert.c: Likewise.
4747 * c-decl.c: Likewise.
4748 * c-errors.c: Likewise.
4749 * c-lang.c: Likewise.
4750 * c-objc-common.c: Likewise.
4751 * c-parser.c: Likewise.
4752 * c-typeck.c: Likewise.
4754 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4757 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4760 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4762 * c-decl.c (pop_scope): Register the main translation unit
4763 through the new debug hook.
4765 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4767 * c-array-notation.c : Adjust include files.
4768 * c-aux-info.c : Likewise.
4769 * c-convert.c : Likewise.
4770 * c-decl.c : Likewise.
4771 * c-errors.c : Likewise.
4772 * c-lang.c : Likewise.
4773 * c-lang.h : Likewise.
4774 * c-objc-common.c : Likewise.
4775 * c-parser.c : Likewise.
4776 * c-typeck.c : Likewise.
4778 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4780 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4781 immediately clobber it.
4782 (c_write_global_declarations_1): Remove call to
4783 check_global_declaration_1.
4784 (c_write_global_declarations_2): Remove.
4785 (c_write_final_cleanups): Rename from c_write_global_declarations.
4786 Remove call to finalize_compilation_unit.
4787 Remove calls to debugging hooks.
4788 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4789 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4790 * c-tree.h: Remove c_write_global_declarations.
4792 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4794 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4795 * c-aux-info.c: Likewise.
4796 * c-convert.c: Likewise.
4797 * c-decl.c: Likewise.
4798 * c-errors.c: Likewise.
4799 * c-lang.c: Likewise.
4800 * c-objc-common.c: Likewise.
4801 * c-parser.c: Likewise.
4802 * c-typeck.c: Likewise.
4804 2015-06-04 Marek Polacek <polacek@redhat.com>
4807 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4810 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4812 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4813 Warn for empty struct.
4814 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4816 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4818 * c-decl.c (start_function): Call plugin before parsing.
4819 (finish_function): Call plugin after parsing.
4821 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4824 * c-decl.c (merge_decls): Merge DECL_COMMON.
4826 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4828 * Make-lang.in (check_gcc_pallelize): Define.
4830 2015-05-22 Marek Polacek <polacek@redhat.com>
4833 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4836 2015-05-21 Marek Polacek <polacek@redhat.com>
4838 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4841 2015-05-20 Marek Polacek <polacek@redhat.com>
4843 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4844 * c-typeck.c: Likewise.
4846 2015-05-19 Marek Polacek <polacek@redhat.com>
4848 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4850 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4853 * c-parser.c (c_parser_omp_for_loop): Don't add
4854 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4855 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4856 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4859 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4861 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4864 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4867 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4870 2015-05-14 Marek Polacek <polacek@redhat.com>
4874 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4877 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4879 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4880 to add a call to warn_for_misleading_indentation.
4881 (c_parser_else_body): Likewise, adding param "else_loc".
4882 (c_parser_if_statement): Check for misleading indentation.
4883 (c_parser_while_statement): Likewise.
4884 (c_parser_for_statement): Likewise.
4886 2015-05-08 Marek Polacek <polacek@redhat.com>
4889 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4890 (output_init_element): Likewise.
4892 2015-05-07 Marek Polacek <polacek@redhat.com>
4895 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4898 2015-04-30 Marek Polacek <polacek@redhat.com>
4900 * c-typeck.c (set_init_label): Call error_at instead of error and
4903 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4906 * c-typeck.c (c_build_va_arg): Clarify the error message.
4908 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4910 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4911 OMP_STANDALONE_CLAUSES.
4913 2015-04-28 Marek Polacek <polacek@redhat.com>
4915 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4917 2015-04-28 Marek Polacek <polacek@redhat.com>
4920 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4922 2015-04-25 Marek Polacek <polacek@redhat.com>
4925 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4928 2015-04-23 Marek Polacek <polacek@redhat.com>
4931 * c-decl.c (set_labels_context_r): New function.
4932 (store_parm_decls): Call it via walk_tree_without_duplicates.
4933 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4934 instead of create_tmp_var. Build TARGET_EXPR instead of
4936 (build_atomic_assign): Use create_tmp_var_raw instead of
4937 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4939 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4941 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4942 (c_parser_omp_target_update): Add missed %> to error_at ().
4944 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4947 * c-decl.c (c_default_pointer_mode): Remove definition.
4948 * c-tree.h (c_default_pointer_mode): Remove declaration.
4950 2015-03-27 Tobias Burnus <burnus@net-b.de>
4953 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4955 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4956 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4957 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4959 2015-03-19 Jakub Jelinek <jakub@redhat.com>
4961 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4962 attribute for DECL_EXTERNAL VAR_DECLs.
4964 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4966 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4969 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4972 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4973 before preparing arguments to warn_logical_not_parentheses.
4975 2015-03-09 Jakub Jelinek <jakub@redhat.com>
4978 * c-typeck.c (parser_build_binary_op): Don't warn for
4979 !!x == y or !b == y where b is _Bool.
4981 2015-03-09 Marek Polacek <polacek@redhat.com>
4983 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4984 * c-decl.c (grokdeclarator): Likewise.
4985 * c-typeck.c (build_binary_op): Likewise.
4987 2015-02-27 Marek Polacek <polacek@redhat.com>
4990 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4992 2015-02-14 Marek Polacek <polacek@redhat.com>
4995 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4996 declared through a typedef name.
4998 2015-02-13 Marek Polacek <polacek@redhat.com>
5001 * c-decl.c (grokdeclarator): Print also the type when giving
5002 the error message about array's incomplete element type.
5004 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5007 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5008 check in the POP macro.
5010 2015-02-09 Marek Polacek <polacek@redhat.com>
5013 * c-typeck.c (process_init_element): Don't always wrap
5014 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5015 initializing a range of elements.
5017 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5021 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5023 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5025 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5026 processing enum declaration.
5028 2015-01-29 Marek Polacek <polacek@redhat.com>
5031 * c-typeck.c (pop_init_level): If constructor_elements has
5032 exactly one element with integer_zerop value, set constructor_zeroinit
5033 to 1. Remove braces around warning_init call.
5035 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5038 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5039 of FUNCTION_DECLs with error_mark_node.
5041 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5044 * c-typeck.c (convert_arguments): Return -1 if there are
5045 error_args, even if we've diagnosed too many arguments.
5047 2015-01-21 Richard Biener <rguenther@suse.de>
5050 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5051 for builtins the user declared correctly.
5053 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5054 Bernd Schmidt <bernds@codesourcery.com>
5055 Cesar Philippidis <cesar@codesourcery.com>
5056 James Norris <jnorris@codesourcery.com>
5057 Jakub Jelinek <jakub@redhat.com>
5058 Ilmir Usmanov <i.usmanov@samsung.com>
5060 * c-parser.c: Include "gomp-constants.h".
5061 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5062 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5063 Use OMP_CLAUSE_SET_MAP_KIND.
5064 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5065 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5066 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5067 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5068 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5069 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5070 "copyout", "create", "delete", "deviceptr", "gang", "host",
5071 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5072 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5073 "present_or_create", "pcreate", "seq", "self", "vector",
5074 "vector_length", "wait", "worker".
5075 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5076 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5077 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5078 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5079 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5080 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5081 (c_parser_oacc_data_clause_deviceptr)
5082 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5083 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5084 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5085 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5086 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5087 (c_parser_oacc_parallel, c_parser_oacc_update)
5088 (c_parser_oacc_wait): New functions.
5089 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5090 (c_finish_oacc_data): New prototypes.
5091 * c-typeck.c: Include "gomp-constants.h".
5092 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5093 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5094 OMP_CLAUSE_SET_MAP_KIND.
5095 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5096 (c_finish_oacc_data): New functions.
5097 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5098 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5099 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5100 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5101 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5102 GOMP_MAP_FORCE_DEVICEPTR.
5104 2015-01-09 Michael Collison <michael.collison@linaro.org>
5106 * c-array-notation.c: Include hash-set.h, machmode.h,
5107 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5108 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5109 * c-aux-info.c: Ditto.
5110 * c-convert.c: Ditto.
5112 * c-errors.c: Ditto.
5113 * c-lang.c: Dittoxs.
5114 * c-objc-common.c: Ditto.
5115 * c-parser.c: Ditto.
5116 * c-typeck.c: Include hash-set.h, machmode.h,
5117 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5118 fold-const.h, wide-int.h, inchash.h, real.h and
5119 fixed-value.h due to flattening of tree.h.
5121 2015-01-07 Marek Polacek <polacek@redhat.com>
5124 * c-typeck.c (process_init_element): Disallow initialization of
5125 a flexible array member with a string constant if the structure
5128 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5131 * c-typeck.c (convert_for_assignment, c_finish_return): For
5132 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5133 types also set in_late_binary_op around convert call.
5134 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5135 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5136 result on expr as last argument to ubsan_instrument_float_cast,
5137 if in_late_binary_op, don't use c_save_expr but save_expr.
5139 Update copyright years.
5141 2015-01-05 Marek Polacek <polacek@redhat.com>
5144 * c-typeck.c (build_array_ref): Pass loc down to
5145 warn_array_subscript_with_type_char.
5147 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5149 * c-typeck.c: New behavious for pointers to arrays with qualifiers
5150 (common-pointer-type): For pointers to arrays take qualifiers from
5152 (build_conditional_expr): Add warnings for lost qualifiers.
5153 (comp-target-types): Allow pointers to arrays with different qualifiers.
5154 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5155 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5156 to PEDWARN_FOR_QUALIFIERS.
5158 2014-12-17 Jakub Jelinek <jakub@redhat.com>
5161 * c-convert.c: Include ubsan.h.
5162 (convert): For real -> integral casts and
5163 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5164 instead instrument the float cast directly.
5166 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5168 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5169 c_finish_stmt_expr): Remove NULL last argument from
5170 create_tmp_var_raw and create_tmp_var calls.
5171 * c-array-notation.c (fix_builtin_array_notation_fn,
5172 build_array_notation_expr, fix_conditional_array_notations_1,
5173 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5175 2014-11-28 Marek Polacek <polacek@redhat.com>
5178 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5179 convert the right operand to integer type.
5181 2014-11-25 Marek Polacek <polacek@redhat.com>
5184 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5185 for inline functions.
5187 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5190 * c-typeck.c (build_array_ref): Adjust
5191 convert_vector_to_pointer_for_subscript caller. If it returns true,
5192 call non_lvalue_loc on the result.
5194 2014-11-11 Richard Biener <rguenther@suse.de>
5196 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5199 2014-11-10 Andi Kleen <ak@linux.intel.com>
5202 * c-parser.c (c_parser_statement_after_labels): Call
5204 (c_parser_if_statement): Dito.
5205 (c_parser_switch_statement): Dito.
5206 (c_parser_while_statement): Dito.
5207 (c_parser_do_statement): Dito.
5208 (c_parser_for_statement): Dito.
5209 * c-typeck.c (c_finish_loop): Dito.
5211 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5213 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5214 OPT_Wshift_count_overflow in the warnings.
5216 2014-10-30 Marek Polacek <polacek@redhat.com>
5218 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5219 print the stripped version as well, if they're not the same.
5221 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5223 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5226 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5228 * c-decl.c: Adjust include files.
5229 * c-parser.c: Ditto.
5231 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5232 Tom Tromey <tromey@redhat.com>
5234 * c-tree.h (enum c_oracle_request): New.
5235 (c_binding_oracle_function): New typedef.
5236 (c_binding_oracle, c_pushtag, c_bind): Declare.
5237 * c-decl.c (c_binding_oracle): New global.
5238 (I_SYMBOL_CHECKED): New macro.
5239 (i_symbol_binding): New function.
5240 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5241 (I_TAG_CHECKED): New macro.
5242 (i_tag_binding): New function.
5243 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5244 (I_LABEL_CHECKED): New macro.
5245 (i_label_binding): New function.
5246 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5247 (c_print_identifier): Save and restore c_binding_oracle.
5248 (c_pushtag, c_bind): New functions.
5250 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5252 * c-typeck.c: Adjust include files.
5254 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5257 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5258 initialization here...
5259 (c_initialize_diagnostics): ... but here. Set defaults after
5260 building pretty-printer.
5262 2014-10-23 Marek Polacek <polacek@redhat.com>
5265 * c-decl.c (pop_scope): Don't print warning in external_scope.
5267 2014-10-19 Marek Polacek <polacek@redhat.com>
5270 * c-typeck.c (output_init_element): Allow initializing objects with
5271 static storage duration with compound literals even in C99 and add
5274 2014-10-17 Marek Polacek <polacek@redhat.com>
5277 * c-typeck.c (digest_init): Allow initializing objects with static
5278 storage duration with compound literals even in C99 and add pedwarn
5281 2014-10-17 Marek Polacek <polacek@redhat.com>
5284 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5285 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5286 error multiple times. Print the type.
5288 2014-10-17 Marek Polacek <polacek@redhat.com>
5291 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5294 2014-10-17 Marek Polacek <polacek@redhat.com>
5296 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5297 (start_function): Use OPT_Wimplicit_int instead of 0.
5298 (store_parm_decls_oldstyle): Likewise.
5300 2014-10-17 Alan Modra <amodra@gmail.com>
5303 * c-decl.c (merge_decls): Don't merge section name or tls model
5304 to newdecl symtab node, instead merge to olddecl. Override
5305 existing olddecl section name. Set tls_model for all thread-local
5306 vars, not just OMP thread-private ones. Remove incorrect comment.
5308 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5310 * c-decl.c: Adjust include files.
5312 2014-10-14 DJ Delorie <dj@redhat.com>
5314 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5315 (c_token_starts_typename): Check all __intN, not just __int128.
5316 (c_token_starts_declspecs): Likewise.
5317 (c_parser_declspecs): Likewise.
5318 (c_parser_attribute_any_word): Likewise.
5319 (c_parser_objc_selector): Likewise.
5320 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5321 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5323 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5325 (finish_declspecs): Likewise.
5327 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5329 * c-parser.c (c_parser_all_labels): New function to replace
5331 (c_parser_statement): Call the new function.
5333 2014-10-09 Marek Polacek <polacek@redhat.com>
5336 * c-typeck.c (pop_init_level): Don't warn about initializing
5339 2014-10-07 Marek Polacek <polacek@redhat.com>
5342 * c-decl.c (header_for_builtin_fn): New function.
5343 (implicitly_declare): Suggest which header to include.
5345 2014-10-07 Marek Polacek <polacek@redhat.com>
5347 * c-convert.c (convert): Use error_operand_p.
5348 * c-typeck.c (require_complete_type): Likewise.
5349 (really_atomic_lvalue): Likewise.
5350 (digest_init): Likewise.
5351 (handle_omp_array_sections_1): Likewise.
5353 2014-10-03 Marek Polacek <polacek@redhat.com>
5356 * c-decl.c (pop_scope): Don't warn about "inline function declared
5357 but never defined" for functions marked with gnu_inline attribute.
5359 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5362 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5363 on low_bound and length.
5365 2014-09-24 Marek Polacek <polacek@redhat.com>
5369 * c-parser.c: Don't define CPP_KEYWORD.
5370 (c_parser_switch_statement): Pass original type to c_finish_case.
5371 * c-tree.h (c_finish_case): Update declaration.
5372 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5373 conditionally to c_do_switch_warnings.
5375 2014-09-03 Marek Polacek <polacek@redhat.com>
5378 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5381 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5382 Balaji V. Iyer <balaji.v.iyer@intel.com>
5383 Igor Zamyatin <igor.zamyatin@intel.com>
5385 * c-parser.c (c_parser_cilk_for): New function.
5386 (c_parser_cilk_grainsize): Likewise.
5387 (c_get_temp_regvar): Likewise.
5388 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5389 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5390 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5391 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5394 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5396 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5397 with using HOST_WIDE_INT without truncation to 'int'
5399 2014-08-22 Marek Polacek <polacek@redhat.com>
5402 * c-typeck.c (parser_build_binary_op): Adjust call to
5403 warn_logical_not_parentheses.
5405 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5408 * c-parser.c (c_parser_array_notation): Check for correct
5409 type of an array added.
5411 2014-08-19 Marek Polacek <polacek@redhat.com>
5414 * c-typeck.c (build_binary_op): If either operand of a comparison
5415 is a boolean expression, call maybe_warn_bool_compare.
5417 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5420 * c-typeck.c (build_c_cast): Do a conversion even when the
5421 TYPE_MAIN_VARIANTs are the same.
5423 2014-08-19 Marek Polacek <polacek@redhat.com>
5425 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5426 pedwarn_c99 instead of pedwarn.
5427 (grokfield): Likewise.
5428 (warn_defaults_to): New function.
5429 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5430 Unconditionally call pedwarn_c99 instead of pedwarn.
5431 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5432 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5433 check flag_isoc11 before.
5434 * c-errors.c (pedwarn_c99): Change the return type to bool.
5435 Handle -Wc99-c11-compat.
5436 * c-parser.c (disable_extension_diagnostics): Handle
5437 warn_c99_c11_compat.
5438 (restore_extension_diagnostics): Likewise.
5439 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5440 instead of pedwarn, don't check flag_isoc11 before.
5441 (c_parser_declspecs): Likewise.
5442 (c_parser_alignas_specifier): Likewise.
5443 (c_parser_alignof_expression): Likewise.
5444 (c_parser_generic_selection): Likewise.
5445 * c-tree.h (pedwarn_c99): Update declaration.
5446 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5449 2014-08-19 Marek Polacek <polacek@redhat.com>
5451 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5453 * c-errors.c: Include "opts.h".
5454 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5455 * c-parser.c (disable_extension_diagnostics): Handle negative value
5456 of warn_c90_c99_compat, too.
5457 (restore_extension_diagnostics): Likewise.
5458 (c_parser_compound_statement_nostart): Pass
5459 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5461 2014-08-12 Marek Polacek <polacek@redhat.com>
5463 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5465 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5467 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5469 2014-08-10 Marek Polacek <polacek@redhat.com>
5472 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5473 Call pedwarn_c90 instead of pedwarn.
5474 (check_bitfield_type_and_width): Likewise.
5475 (declspecs_add_qual): Likewise.
5476 (declspecs_add_type): Likewise.
5477 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5478 Adjust to only call pedwarn_c90.
5479 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5480 pedwarn_c90 instead of pedwarn.
5481 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5482 * c-parser.c (disable_extension_diagnostics): Handle
5483 warn_c90_c99_compat.
5484 (restore_extension_diagnostics): Likewise.
5485 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5486 pedwarn_c90 instead of pedwarn.
5487 (c_parser_initelt): Likewise.
5488 (c_parser_postfix_expression): Likewise.
5489 (c_parser_postfix_expression_after_paren_type): Likewise.
5490 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5491 * c-tree.h: Fix formatting.
5492 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5493 pedwarn_c90 instead of pedwarn.
5495 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5497 * c-typeck.c: Remove include of pointer-set.h.
5499 2014-08-07 Marek Polacek <polacek@redhat.com>
5501 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5503 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5505 * c-typeck.c: Use hash_map instead of pointer_map.
5507 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5509 * c-decl.c: Use hash_set instead of pointer_set.
5511 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5514 * c-array-notation.c (expand_array_notations): Handling
5517 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5520 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5523 2014-07-30 Tom Tromey <tromey@redhat.com>
5525 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5527 (really_start_incremental_init, push_init_level): Initialize
5529 (pop_init_level): Set global designator_depth.
5530 (process_init_element): Check for designated_init attribute.
5532 2014-07-20 Marek Polacek <polacek@redhat.com>
5535 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5536 (implicitly_declare): Pass location to implicit_decl_warning.
5538 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5541 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5542 If non-NULL, call c_parser_check_literal_zero.
5543 (c_parser_check_literal_zero): New function.
5544 (c_parser_postfix_expression_after_primary): Adjust
5545 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5547 2014-07-06 Marek Polacek <polacek@redhat.com>
5550 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5551 * c-tree.h (C_ARRAY_PARAMETER): Define.
5552 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5555 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5556 Chen Gang <gang.chen.5i5j@gmail.com>
5558 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5561 2014-07-01 Marek Polacek <polacek@redhat.com>
5563 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5564 instead of 0 to WARN_FOR_ASSIGNMENT.
5566 2014-07-01 Marek Polacek <polacek@redhat.com>
5569 * c-typeck.c (convert_for_assignment): Pass
5570 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5572 2014-06-30 Marek Polacek <polacek@redhat.com>
5574 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5575 has no_sanitize_undefined attribute.
5577 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5580 * c-array-notation.c (fix_builtin_array_notation_fn):
5581 Check for 0 arguments in builtin call. Check that bultin argument is
5583 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5586 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5588 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5589 qualifiers in __auto_type for atomic types.
5590 (c_parser_typeof_specifier): Discard all type qualifiers in
5591 __typeof__ for atomic types.
5593 2014-06-25 Marek Polacek <polacek@redhat.com>
5596 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5597 the return expression to c_finish_return.
5599 2014-06-25 Jakub Jelinek <jakub@redhat.com>
5601 * c-typeck.c (c_finish_omp_clauses): Make sure
5602 OMP_CLAUSE_LINEAR_STEP has correct type.
5604 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5608 2014-06-24 Jakub Jelinek <jakub@redhat.com>
5610 * c-parser.c (c_parser_omp_for_loop): For
5611 #pragma omp parallel for simd move lastprivate clause from parallel
5612 to for rather than simd.
5614 2014-06-23 Marek Polacek <polacek@redhat.com>
5616 * c-typeck.c (parser_build_binary_op): Don't call
5617 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5619 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5621 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5622 * c-decl.c (merge_decls): Likewise.
5624 2014-06-09 Marek Polacek <polacek@redhat.com>
5627 * c-typeck.c (error_init): Call inform instead of error_at.
5628 (pedwarn_init): Call inform instead of pedwarn.
5629 (warning_init): Call inform instead of warning_at.
5631 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
5633 * c-decl.c (merge_decls): Use set_decl_section_name.
5634 (duplicate_decls): Remove node if it exists.
5636 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5639 * c-typeck.c (push_init_level, process_init_element,
5640 pop_init_level): Correct check for zero initialization, move
5641 missing brace warning to respect zero initialization.
5643 2014-06-05 Marek Polacek <polacek@redhat.com>
5646 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5648 2014-06-05 Marek Polacek <polacek@redhat.com>
5651 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5652 on the left hand side operand of a comparison.
5654 2014-06-05 Marek Polacek <polacek@redhat.com>
5657 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5658 Print note only if the warning was printed.
5660 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5663 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5666 2014-06-03 Marek Polacek <polacek@redhat.com>
5669 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5671 * c-tree.h (c_start_case): Update.
5672 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5673 switch condition has boolean value.
5675 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
5677 * c-decl.c: Include builtins.h.
5678 * c-parser.c: Likewise.
5680 2014-05-27 Marek Polacek <polacek@redhat.com>
5683 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5684 error and warning calls to error_at and warning_at. Pass location of
5685 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5686 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5687 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5689 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5692 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5693 function parameters.
5695 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
5697 * c-decl.c (merge_decls): Preserve symtab node pointers.
5698 (duplicate_decls): Free new decl.
5700 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5702 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5705 * c-parser.c (c_parser_omp_target): Return bool values.
5707 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5709 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5710 num_teams_loc variable to num_thread_limit_loc.
5712 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5714 * c-array-notation.c (expand_array_notations): Use void_node
5715 instead of void_zero_node.
5717 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5719 * c-decl.c (finish_struct): Adjust.
5720 (finish_enum): Likewise.
5722 (record_inline_static): Likewise.
5723 (push_scope): Likewise.
5724 (make_label): Likewise.
5725 (lookup_label_for_goto): Likewise.
5726 (finish_struct): Likewise.
5727 (finish_enum): Likewise.
5728 (store_parm_decls): Likewise.
5729 (c_push_function_context): Likewise.
5730 * c-lang.h: Remove usage of variable_size gty attribute.
5731 * c-parser.c (c_parse_init): Adjust.
5732 (c_parse_file): Likewise.
5734 2014-05-13 Marek Polacek <polacek@redhat.com>
5737 * c-typeck.c (convert_for_assignment): Pass location to
5738 WARN_FOR_ASSIGNMENT instead of input_location.
5740 2014-05-10 Marek Polacek <polacek@redhat.com>
5742 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5743 maybe_warn_string_init.
5744 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5745 maybe_warn_string_init.
5746 * c-tree.h (maybe_warn_string_init): Update declaration.
5747 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5748 Call pedwarn_init with loc instead of with input_location.
5749 (digest_init): Pass init_loc to maybe_warn_string_init.
5750 (pop_init_level): Call pedwarn_init with loc instead of with
5752 (set_init_index): Likewise.
5753 (process_init_element): Likewise.
5755 2014-05-09 Marek Polacek <polacek@redhat.com>
5758 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5759 (c_parser_initelt): Pass location to set_init_label. Pass array index
5760 location to set_init_index.
5761 * c-tree.h (push_init_level): Update declaration.
5762 (pop_init_level): Likewise.
5763 (set_init_index): Likewise.
5764 (set_init_label): Likewise.
5765 * c-typeck.c (error_init): Add location parameter. Call error_at
5767 (digest_init): Pass init_loc to error_init.
5768 (really_start_incremental_init):
5769 (push_init_level): Add location parameter. Pass loc to pop_init_level
5771 (pop_init_level): Likewise.
5772 (set_designator): Add location parameter. Pass loc to pop_init_level,
5773 push_init_level, and error_init.
5774 (set_init_index): Add location parameter. Pass loc to error_init and
5776 (set_init_label): Likewise.
5777 (output_init_element): Pass loc to error_init.
5778 (process_init_element): Pass loc to error_init, pop_init_level,
5779 pedwarn_init, and push_init_level.
5781 2014-05-09 Marek Polacek <polacek@redhat.com>
5784 * c-parser.c (c_parser_attributes): Parse the arguments as an
5785 expression-list if the attribute takes identifier.
5787 2014-05-08 Marek Polacek <polacek@redhat.com>
5790 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5793 2014-05-08 Marek Polacek <polacek@redhat.com>
5796 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5799 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5800 Mike Stump <mikestump@comcast.net>
5801 Richard Sandiford <rdsandiford@googlemail.com>
5803 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5804 (finish_enum): Use wide-int interfaces.
5805 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5806 * c-typeck.c (build_c_cast): Likewise.
5807 (set_nonincremental_init_from_string): Likewise.
5808 (c_tree_equal): Likewise.
5810 2014-05-02 Marek Polacek <polacek@redhat.com>
5813 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5814 Return size_one_node when the type is not complete.
5815 (pointer_diff): Remove comment.
5816 (build_unary_op): Improve error messages.
5818 2014-05-02 Marek Polacek <polacek@redhat.com>
5820 * c-typeck.c (c_finish_return): Separate warning_at calls.
5822 2014-05-02 Marek Polacek <polacek@redhat.com>
5824 * c-tree.h (error_init): Remove declaration.
5825 (pedwarn_init): Likewise.
5826 * c-typeck.c (error_init): Make static and move above.
5827 (pedwarn_init): Likewise.
5828 (warning_init): Move above.
5829 (maybe_warn_string_init): Likewise.
5831 2014-05-01 Jeff Law <law@redhat.com>
5835 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5836 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5839 2014-05-02 Marek Polacek <polacek@redhat.com>
5842 * c-typeck.c (push_init_level): Set constructor_designated to
5843 p->designated for structures.
5845 2014-05-01 Marek Polacek <polacek@redhat.com>
5848 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5849 function-definition has an attribute after the declarator.
5851 2014-05-01 Marek Polacek <polacek@redhat.com>
5854 * c-typeck.c (warning_init): Add location_t parameter. Call
5855 warning_at instead of warning.
5856 (push_init_level): Pass input_location to warning_init.
5857 (add_pending_init): Add location_t parameter. Pass loc to
5859 (set_nonincremental_init): Pass input_location to add_pending_init.
5860 (set_nonincremental_init_from_string): Likewise.
5861 (output_init_element): Pass loc to warning_init and to
5864 2014-05-01 Marek Polacek <polacek@redhat.com>
5867 * c-typeck.c (c_finish_return): Distinguish between label and variable
5868 when warning about returning local address.
5870 2014-05-01 Marek Polacek <polacek@redhat.com>
5873 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5876 2014-05-01 Marek Polacek <polacek@redhat.com>
5879 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5880 instead of 0 to WARN_FOR_QUALIFIERS.
5882 2014-05-01 Marek Polacek <polacek@redhat.com>
5885 * c-typeck.c (default_conversion): Use better location for
5888 2014-04-30 Marek Polacek <polacek@redhat.com>
5890 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5891 also when SANITIZE_FLOAT_DIVIDE is on.
5893 2014-04-30 Marek Polacek <polacek@redhat.com>
5896 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5897 and pedwarn_init. Use loc insted of input_location.
5899 2014-04-30 Marek Polacek <polacek@redhat.com>
5902 * c-typeck.c (build_binary_op): Use location when warning about
5905 2014-04-25 Marek Polacek <polacek@redhat.com>
5908 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5909 always_inline/noinline and hot/cold attributes.
5911 2014-04-25 Marek Polacek <polacek@redhat.com>
5914 * c-parser.c (c_parser_initelt): Pass input_location to
5915 process_init_element.
5916 (c_parser_initval): Pass loc to process_init_element.
5917 * c-tree.h (process_init_element): Adjust declaration.
5918 * c-typeck.c (push_init_level): Pass input_location to
5919 process_init_element.
5920 (pop_init_level): Likewise.
5921 (set_designator): Likewise.
5922 (output_init_element): Add location_t parameter. Pass loc to
5924 (output_pending_init_elements): Pass input_location to
5925 output_init_element.
5926 (process_init_element): Add location_t parameter. Pass loc to
5927 output_init_element.
5929 2014-04-24 Jakub Jelinek <jakub@redhat.com>
5931 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5932 atomic-clause, allow comma in between atomic-clause and
5935 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5938 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5939 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5941 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5944 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5945 create_tmp_var instead build_decl for creating temps.
5946 (build_array_notation_expr): Likewise.
5947 (fix_conditional_array_notations_1): Likewise.
5948 (fix_array_notation_expr): Likewise.
5949 (fix_array_notation_call_expr): Likewise.
5951 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5954 * c-tree.h (c_build_function_call_vec): New prototype.
5955 * c-typeck.c (build_function_call_vec): Don't call
5956 resolve_overloaded_builtin here.
5957 (c_build_function_call_vec): New wrapper function around
5958 build_function_call_vec. Call resolve_overloaded_builtin here.
5959 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5960 Call c_build_function_call_vec instead of build_function_call_vec.
5961 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5962 * c-decl.c (finish_decl): Likewise.
5964 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5967 * c-typeck.c: Use correct format string in cast-qual warning
5969 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5971 * c-decl.c (c_decl_attributes): Use
5972 lang_hooks.types.omp_mappable_type.
5973 * c-typeck.c (c_finish_omp_clauses): Likewise.
5975 2014-03-06 Marek Polacek <polacek@redhat.com>
5978 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5979 of checking tree code.
5981 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5983 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5984 (c_parser_parameter_declaration): Likewise.
5986 2014-02-19 Marek Polacek <polacek@redhat.com>
5989 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5990 Call mark_exp_read on exp.value.
5991 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5992 TREE_ADDRESSABLE on old instead of val.
5993 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5995 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5997 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5998 C_EXPR_APPEND by vec_safe_push.
5999 * c-tree.h (C_EXPR_APPEND): Remove.
6001 2014-01-31 Marek Polacek <polacek@redhat.com>
6004 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6005 build_function_call_vec.
6006 (build_function_call): Likewise.
6007 (build_atomic_assign): Likewise.
6008 (build_function_call_vec): Add arg_loc parameter. Use it.
6009 (convert_arguments): Likewise.
6010 (convert_for_assignment): Rename rhs_loc to expr_loc.
6011 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6012 (c_parser_objc_keywordexpr): Likewise.
6013 (c_parser_postfix_expression_after_primary): Call
6014 build_function_call_vec with expr_loc rather than op_loc.
6015 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6016 build_function_call_vec.
6017 (c_parser_expr_list): Add locations parameter. Fill it with locations
6018 of function arguments.
6019 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6021 2014-01-30 Marek Polacek <polacek@redhat.com>
6024 * c-typeck.c (build_function_call_vec): Use loc parameter.
6025 (convert_arguments): Add location parameter. Use it.
6026 (ep_convert_and_check): Likewise.
6027 (build_atomic_assign): Adjust convert_for_assignment call.
6028 (build_modify_expr): Likewise.
6029 (digest_init): Likewise.
6030 (c_finish_return): Likewise.
6031 (build_conditional_expr): Adjust ep_convert_and_check calls.
6032 (convert_for_assignment): Add rhs_loc parameter. Use it.
6033 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6036 2014-01-30 Richard Biener <rguenther@suse.de>
6039 * c-typeck.c (build_function_call_vec): Do not replace calls
6040 to a function via an incompatible type with a runtime abort.
6042 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6044 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6045 flag_enable_cilkplus with flag_cilkplus.
6046 (c_parser_direct_declarator_inner): Likewise.
6047 (c_parser_attribute_any_word): Likewise.
6048 (c_parser_attributes): Likewise.
6049 (c_parser_compound_statement): Likewise.
6050 (c_parser_statement_after_labels): Likewise.
6051 (c_parser_if_statement): Likewise.
6052 (c_parser_switch_statement): Likewise.
6053 (c_parser_do_statement): Likewise.
6054 (c_parser_for_statement): Likewise.
6055 (c_parser_unary_expression): Likewise.
6056 (c_parser_postfix_expression): Likewise.
6057 (c_parser_postfix_expression_after_primary): Likewise.
6058 (c_parser_postfix_expression_after_primary): Likewise.
6059 (c_parser_omp_clause_name): Likewise.
6060 (c_finish_omp_declare_simd): Likewise.
6061 (c_parser_cilk_verify_simd): Likewise.
6062 * c-typeck.c (build_array_ref): Likewise.
6063 (build_function_call_vec): Likewise.
6064 (convert_arguments): Likewise.
6065 (build_compound_expr): Likewise.
6066 (c_finish_return): Likewise.
6067 (c_finish_if_stmt): Likewise.
6068 (c_finish_loop): Likewise.
6069 (build_binary_op): Likewise.
6071 2014-01-23 Marek Polacek <polacek@redhat.com>
6074 * c-typeck.c (parser_build_binary_op): Use location instead of
6076 (build_binary_op): Pass location to shorten_compare.
6078 2014-01-23 Marek Polacek <polacek@redhat.com>
6081 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6084 2014-01-23 Marek Polacek <polacek@redhat.com>
6087 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6088 of a comma expression.
6089 (emit_side_effect_warnings): Likewise.
6091 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6094 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6095 function to use walk_tree and moved a lot of its functionality to
6096 expand_array_notations.
6097 (expand_array_notations): New function.
6099 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6101 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6102 attribute an attribute without value.
6104 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6107 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6108 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6110 2014-01-22 Marek Polacek <polacek@redhat.com>
6113 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6114 of remove_c_maybe_const_expr on op1 and op2.
6116 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6119 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6120 effects, preevaluate rhs using SAVE_EXPR first.
6122 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6125 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6126 statements with if-elseif statements.
6128 2014-01-06 Marek Polacek <polacek@redhat.com>
6131 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6132 defined bit-field types only in ISO C.
6134 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6136 Update copyright years
6138 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6140 * c-array-notation.c: Use the standard form for the copyright notice.
6142 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6144 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6145 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6146 field in parser is not empty. If not-empty, call the function
6147 c_parser_finish_omp_declare_simd.
6148 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6149 between SIMD-enabled functions and #pragma simd. Added new parameter.
6150 (c_parser_cilk_all_clauses): Modified the usage of the function
6151 c_parser_cilk_clause_vectorlength as mentioned above.
6152 (c_parser_cilk_simd_fn_vector_attrs): New function.
6153 (c_finish_cilk_simd_fn_tokens): Likewise.
6154 (is_cilkplus_vector_p): Likewise.
6155 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6156 "nomask," and "mask" strings in clause name.
6157 (c_parser_omp_all_clauses): Added 3 new case statements:
6158 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6159 PRAGMA_CILK_CLAUSE_NOMASK.
6160 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6161 check for vector attribute and if so call the function
6162 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6163 called the function c_finish_cilk_simd_fn_tokens.
6164 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6165 parser field is non-empty. If so, parse them as you would parse
6166 the omp declare simd pragma.
6167 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6168 Added a check when step is a parameter and flag it as error.
6169 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6170 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6173 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6175 * c-parser.c (c_parser_omp_parallel): Fix description.
6177 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6179 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6180 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6181 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6182 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6184 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6187 * c-parser.c (c_parser_alignas_specifier): Use
6188 c_sizeof_or_alignof_type instead of c_alignof.
6189 (c_parser_alignof_expression): Likewise, with min_alignof
6190 parameter depending on alignof spelling used.
6192 2013-12-04 Marek Polacek <polacek@redhat.com>
6195 * c-decl.c (start_function): Don't warn for missing prototype for
6198 2013-12-03 Marek Polacek <polacek@redhat.com>
6201 * c-decl.c (build_compound_literal): Allow compound literals with
6202 empty initial value.
6204 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6207 * c-typeck.c (build_modify_expr): Diagnose assignment to
6208 expression with array type.
6210 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6213 * c-typeck.c (process_init_element): Do not treat a string as
6214 initializing a whole array when used with a designator for an
6217 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6220 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6221 an inline function following a static declaration.
6223 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6226 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6227 to p_name before calling c_parser_omp_teams instead of after.
6228 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6229 argument. Remove unused p_name variable.
6231 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6232 Jakub Jelinek <jakub@redhat.com>
6234 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6235 external_scope is NULL.
6237 2013-11-27 Tom de Vries <tom@codesourcery.com>
6238 Marc Glisse <marc.glisse@inria.fr>
6241 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6243 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6245 * c-typeck.c: Add required include files from gimple.h.
6247 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6249 * c-decl.c (define_label, shadow_tag_warned)
6250 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6251 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6252 (declspecs_add_type): Remove use of in_system_header macro.
6253 * c-parser.c (c_parser_unary_expression): Likewise.
6254 * c-typeck.c (store_init_value, process_init_element)
6255 (c_start_case): Likewise.
6257 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6260 * c-parser.c (c_parser_set_source_position_from_token): Remove
6261 reference to in_system_header from comment.
6263 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6265 * c-decl.c (grokdeclarator): Update comment to refer to
6266 tree_to_[su]hwi rather than tree_low_cst.
6268 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6270 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6271 tree_to_uhwi throughout.
6273 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6275 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6278 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6280 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6283 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6285 * c-parser.c (c_parser_cilk_simd): New.
6286 (c_parser_cilk_verify_simd): New.
6287 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6288 (c_parser_omp_for_loop): Add case for NE_EXPR.
6289 Set c_break_label for CILK_SIMD.
6290 (c_parser_cilk_clause_vectorlength): New.
6291 (c_parser_cilk_clause_linear): New.
6292 (c_parser_cilk_clause_name): New.
6293 (c_parser_cilk_all_clauses): New.
6294 * c-typeck.c (build_unary_op): Pass location argument to
6296 (build_modify_expr): Same.
6297 (build_asm_expr): Same.
6298 (c_finish_bc_stmt): Error on break/continue in loops.
6300 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6302 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6304 2013-11-14 Diego Novillo <dnovillo@google.com>
6306 * c-decl.c: Include print-tree.h.
6307 Include stor-layout.h.
6310 Include stringpool.h.
6311 * c-lang.c: Include fold-const.h.
6312 * c-parser.c: Include stringpool.h.
6314 Include stor-layout.h.
6316 Include trans-mem.h.
6317 * c-typeck.c: Include stor-layout.h.
6318 Include trans-mem.h.
6322 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6324 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6325 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6327 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6328 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6330 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6331 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6332 (c_parser_declarator, c_parser_direct_declarator_inner)
6333 (c_parser_parameter_declaration, c_parser_type_name): All callers
6335 (c_parser_declaration_or_fndef): Handle declarations with type
6336 determined from the initializer.
6338 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6340 * c-typeck.c: Include gimplify.h.
6342 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6344 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6345 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6347 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6348 or _Thread_local as appropriate in diagnostics.
6349 (build_null_declspecs): Initialize ret->thread_gnu_p.
6350 (declspecs_add_scspec): Handle either __thread or _Thread_local
6351 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6352 pedantic. Do not disallow _Thread_local extern and _Thread_local
6355 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6356 Andrew MacLeod <amacleod@redhat.com>
6358 * c-aux-info.c (gen_type): Handle atomic qualifier.
6359 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6360 qualifiers when compating types.
6361 (shadow_tag_warned): Handle atomic_p in declspecs.
6362 (quals_from_declspecs): Likewise.
6363 (start_decl): Use c_type_promotes_to when promoting argument
6365 (grokdeclarator): Handle _Atomic.
6366 (get_parm_info): Diagnose any qualifier on "void" as only
6368 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6369 comparing types. Use c_type_promotes_to when promoting argument
6371 (finish_function): Use c_type_promotes_to when promoting argument
6373 (build_null_declspecs): Handle atomic_p in declspecs.
6374 (declspecs_add_qual): Handle RID_ATOMIC.
6375 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6376 (c_token_starts_declspecs): Handle RID_ATOMIC.
6377 (c_parser_declspecs): Handle atomic type specifiers and
6379 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6380 from types of expressions with atomic type.
6381 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6382 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6383 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6384 (c_parser_statement_after_labels, c_parser_switch_statement)
6385 (c_parser_for_statement, c_parser_expr_no_commas)
6386 (c_parser_conditional_expression, c_parser_binary_expression)
6387 (c_parser_cast_expression, c_parser_unary_expression)
6388 (c_parser_postfix_expression)
6389 (c_parser_postfix_expression_after_primary, c_parser_expression):
6390 Use convert_lvalue_to_rvalue.
6391 (c_parser_expression_conv, c_parser_expr_list): Document
6392 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6393 (c_parser_objc_synchronized_statement): Use
6394 convert_lvalue_to_rvalue.
6395 (c_parser_objc_selector): Handle RID_ATOMIC.
6396 (c_parser_objc_receiver, c_parser_array_notation): Use
6397 convert_lvalue_to_rvalue.
6398 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6399 _Atomic (type-name).
6400 (struct c_declspecs): Add atomic_p field.
6401 (convert_lvalue_to_rvalue): Declare.
6402 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6403 corresponding atomic types.
6404 (qualify_type): Don't add _Atomic qualifiers from second argument.
6405 (comp_target_types): Do not allow _Atomic mismatches.
6406 (type_lists_compatible_p): Do not remove atomic qualifiers when
6408 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6409 (build_atomic_assign): New functions.
6410 (build_unary_op): Use build_atomic_assign for atomic increment and
6412 (build_conditional_expr): Do not treat _Atomic void as a qualified
6414 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6415 (find_anonymous_field_with_type, convert_to_anonymous_field)
6416 (convert_for_assignment): Do not remove atomic qualifiers when
6418 (digest_init): Do not accept initialization of arrays of atomic
6419 elements by string constants.
6420 (build_asm_expr): Use convert_lvalue_to_rvalue.
6421 (build_binary_op): Do not treat _Atomic void as a qualified
6424 2013-11-06 DJ Delorie <dj@redhat.com>
6426 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6427 both explicit and builtin, print the location of the explicit one.
6429 2013-11-05 Tobias Burnus <burnus@net-b.de>
6431 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6432 c_parser_omp_distribute, c_parser_omp_teams,
6433 c_parser_omp_target, c_parser_omp_declare): Handle
6436 2013-11-03 Marek Polacek <polacek@redhat.com>
6438 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6440 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6442 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6443 check_dup_generic at the end, unless remove is true.
6444 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6446 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6448 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6450 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6451 with decl that is not pointer nor array.
6453 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6455 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6456 a spawning function is found.
6457 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6458 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6459 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6460 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6462 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6463 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6465 (c_finish_return): Added a check to reject _Cilk_spawn in return
6467 (build_cilk_spawn): New function.
6468 (build_cilk_sync): Likewise.
6469 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6471 2013-10-27 Tobias Burnus <burnus@net-b.de>
6474 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6475 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6476 (c_parser_statement_after_labels): Update calls.
6478 2013-10-24 Tobias Burnus <burnus@net-b.de>
6481 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6482 Handle PRAGMA_IVDEP.
6483 (c_parser_statement_after_labels): Update call.
6485 2013-10-24 Marek Polacek <polacek@redhat.com>
6487 * c-parser.c (c_parser_struct_declaration): Add a comment.
6488 (c_parser_declarator): Don't allow _Alignas here.
6490 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6492 * c-parser.c: Include omp-low.h.
6493 * c-typeck.c: Likewise.
6495 2013-10-17 Marek Polacek <polacek@redhat.com>
6498 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6499 Document syntax of the array-declarator.
6500 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6502 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6503 (c_parser_struct_declaration): Likewise.
6504 (c_parser_declarator): Likewise.
6505 (c_parser_direct_declarator_inner): Likewise.
6506 (c_parser_parameter_declaration): Likewise.
6507 (c_parser_type_name): Likewise.
6509 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6511 * c-lang.h (current_omp_declare_target_attribute): New extern
6513 * c-parser.c: Include c-lang.h.
6514 (struct c_parser): Change tokens to c_token *.
6515 Add tokens_buf field. Change tokens_avail type to unsigned int.
6516 (c_parser_consume_token): If parser->tokens isn't
6517 &parser->tokens_buf[0], increment parser->tokens.
6518 (c_parser_consume_pragma): Likewise.
6519 (enum pragma_context): Add pragma_struct and pragma_param.
6520 (c_parser_external_declaration): Adjust
6521 c_parser_declaration_or_fndef caller.
6522 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6523 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6524 Adjust recursive call.
6525 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6527 (c_parser_parameter_declaration): Use pragma_param instead of
6529 (c_parser_compound_statement_nostart, c_parser_label,
6530 c_parser_for_statement): Adjust
6531 c_parser_declaration_or_fndef callers.
6532 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6533 it through to c_parser_conditional_expression.
6534 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6535 pass it through to c_parser_binary_expression. Adjust recursive
6537 (c_parser_binary_expression): Remove prec argument, add
6538 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6539 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6540 binop matches it, use build2 instead of parser_build_binary_op.
6541 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6542 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6543 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6544 Handle pragma_struct and pragma_param the same as pragma_external.
6545 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6546 (c_parser_omp_variable_list): Parse array sections for
6547 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6548 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6549 (c_parser_omp_clause_reduction): Handle user defined reductions.
6550 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6551 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6552 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6553 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6554 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6555 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6556 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6557 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6558 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6559 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6560 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6561 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6562 (c_parser_omp_for_loop): Add CODE argument, pass it through
6563 to c_finish_omp_for. Change last argument to cclauses,
6564 and adjust uses to grab parallel clauses from the array of all
6565 the split clauses. Adjust c_parser_binary_expression,
6566 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6567 (omp_split_clauses): New function.
6568 (c_parser_omp_simd): New function.
6569 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6570 Allow the function to be called also when parsing combined constructs,
6571 and call c_parser_omp_simd when parsing for simd.
6572 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6573 #pragma omp section, require exactly one structured-block instead of
6574 sequence of statements.
6575 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6576 Allow the function to be called also when parsing combined constructs.
6577 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6578 Allow the function to be called also when parsing combined
6580 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6581 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6582 c_parser_omp_teams, c_parser_omp_target_data,
6583 c_parser_omp_target_update, c_parser_omp_target,
6584 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6585 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6586 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6587 (c_parser_omp_construct): Add p_name and mask vars. Handle
6588 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6589 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6590 and c_parser_omp_sections callers.
6591 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6592 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6593 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6594 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6595 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6597 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6598 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6599 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6600 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6601 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6602 * c-typeck.c: Include tree-inline.h.
6603 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6604 handle_omp_array_sections_1, handle_omp_array_sections,
6605 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6606 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6607 user defined reductions.
6608 (c_tree_equal): New function.
6609 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6610 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6611 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6612 c_check_omp_declare_reduction_r): New prototypes.
6613 * c-decl.c (current_omp_declare_target_attribute): New variable.
6614 (c_decl_attributes): New function.
6615 (start_decl, start_function): Use it instead of decl_attributes.
6616 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6617 c_omp_reduction_decl, c_omp_reduction_lookup,
6618 c_check_omp_declare_reduction_r): New functions.
6620 2013-09-25 Tom Tromey <tromey@redhat.com>
6622 * Make-lang.in (c/gccspec.o): Remove.
6623 (CFLAGS-c/gccspec.o): New variable.
6624 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6625 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6626 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6628 2013-09-25 Tom Tromey <tromey@redhat.com>
6630 * Make-lang.in (c/gccspec.o): Don't use subshell.
6632 2013-09-18 Marek Polacek <polacek@redhat.com>
6635 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6636 Remove unnecessary check.
6638 2013-09-18 Marek Polacek <polacek@redhat.com>
6641 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6642 no_sanitize_undefined attribute.
6644 2013-09-13 Kai Tietz <ktietz@redhat.com>
6647 * c-decl.c (c_builtin_function_ext_scope): Remove
6648 wrong assumption that it is never called on prexisting
6651 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6653 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6655 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6657 * c-objc-common.c (c_tree_printer): Tidy.
6659 2013-08-30 Marek Polacek <polacek@redhat.com>
6661 * c-typeck.c (build_binary_op): Add division by zero and shift
6664 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6665 Joseph Myers <joseph@codesourcery.com>
6668 * c-typeck.c (c_common_type): Prefer double_type_node over
6669 other REAL_TYPE types with the same precision.
6670 (convert_arguments): Likewise.
6672 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6674 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6675 (c_initialize_diagnostics): Call a destructor for the early printer.
6677 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6679 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6680 printer initialization.
6682 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
6685 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6686 check for truth values.
6687 (expand_array_notation_exprs): Added truth values case. Removed an
6688 unwanted else. Added for-loop to walk through subtrees in default
6691 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6693 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6695 2013-07-23 Joseph Myers <joseph@codesourcery.com>
6697 * c-parser.c (struct c_generic_association): Fix typo.
6699 2013-07-23 Tom Tromey <tromey@redhat.com>
6700 Joseph Myers <joseph@codesourcery.com>
6702 * c-parser.c (struct c_generic_association): New.
6703 (c_generic_association_d): New typedef.
6704 (c_parser_generic_selection): New function.
6705 (c_parser_postfix_expression): Handle RID_GENERIC.
6707 2013-07-13 Jason Merrill <jason@redhat.com>
6710 * c-decl.c (finish_struct): Check for too-large class.
6712 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6715 * c-typeck.c (set_init_index): When folding, check for index overflow.
6717 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6719 * c-parser.c (c_parser_array_notation): Removed rejection of array
6720 notations in an array of function pointers.
6722 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6724 * c-array-notation.c (make_triplet_val_inv): New function.
6725 (create_cmp_incr): Likewise.
6726 (create_array_refs): Likewise.
6727 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6728 Also modularized common parts between functions and called the function.
6729 (build_array_notation_expr): Likewise.
6730 (fix_conditional_array_notations_1): Likewise.
6731 (fix_array_notation_expr): Likewise.
6732 (fix_array_notation_call_expr): Likewise.
6734 2013-06-18 Marek Polacek <polacek@redhat.com>
6737 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6739 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6741 * c-array-notation.c (build_array_notation_expr): Reject array notation
6742 mismatch between LHS and RHS even inside a call_expr. Also, removed
6743 a couple while statements that were dead code.
6745 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6747 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6748 excessive precision expressions in function parameters. Also removed
6749 couple unwanted while statements.
6751 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6753 * c-array-notation.c (expand_array_notation_exprs): Added
6754 ARRAY_NOTATION_REF case.
6756 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6758 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6759 function to c-family/array-notation-common.c.
6760 (is_cilkplus_reduce_builtin): Likewise.
6761 (find_rank): Likewise.
6762 (extract_array_notation_exprs): Likewise.
6763 (replace_array_notations): Likewise.
6764 (find_inv_trees): Likewise.
6765 (replace_inv_trees): Likewise.
6766 (contains_array_notation_expr): Likewise.
6767 (find_correct_array_notation_type): Likewise.
6768 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6769 (struct inv_list): Moved this to c-family/array-notation-common.c.
6770 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6772 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6774 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6775 reduction functions outside the for-loop. Added a check if the fundecl
6776 is non-NULL. Finally, removed an unwanted if-statement, and made the
6779 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6781 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6782 condition of the if-statement matches the rank of else-block and then-
6783 block when array notations are used.
6784 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6785 expression after the entire function body is parsed.
6786 (c_parser_expr_no_commas): Delayed creating array notation expressions
6787 to the end of function parsing.
6788 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6789 whole if-statement instead of just the condition.
6790 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6792 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6795 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6796 array to NULL_TREE if they are unused. Also added a check for the
6797 field to be NULL before its fields are used in future.
6799 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6802 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6803 (build_array_notation_expr): Likewise.
6805 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6807 * c-typeck.c (build_array_ref): Added a check to see if array's
6808 index is greater than one. If true, then emit an error.
6809 (build_function_call_vec): Exclude error reporting and checking
6810 for builtin array-notation functions.
6811 (convert_arguments): Likewise.
6812 (c_finish_return): Added a check for array notations as a return
6813 expression. If true, then emit an error.
6814 (c_finish_loop): Added a check for array notations in a loop
6815 condition. If true then emit an error.
6816 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6817 (build_binary_op): Added a check for array notation expr inside
6818 op1 and op0. If present, we call another function to find correct
6820 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6821 * c-parser.c (c_parser_compound_statement): Check if array
6822 notation code is used in tree, if so, then transform them into
6824 (c_parser_expr_no_commas): Check if array notation is used in LHS
6825 or RHS, if so, then build array notation expression instead of
6827 (c_parser_postfix_expression_after_primary): Added a check for
6828 colon(s) after square braces, if so then handle it like an array
6829 notation. Also, break up array notations in unary op if found.
6830 (c_parser_direct_declarator_inner): Added a check for array
6832 (c_parser_compound_statement): Added a check for array notation in
6833 a stmt. If one is present, then expand array notation expr.
6834 (c_parser_if_statement): Likewise.
6835 (c_parser_switch_statement): Added a check for array notations in
6836 a switch statement's condition. If true, then output an error.
6837 (c_parser_while_statement): Similarly, but for a while.
6838 (c_parser_do_statement): Similarly, but for a do-while.
6839 (c_parser_for_statement): Similarly, but for a for-loop.
6840 (c_parser_unary_expression): Check if array notation is used in a
6841 pre-increment or pre-decrement expression. If true, then expand
6843 (c_parser_array_notation): New function.
6844 * c-array-notation.c: New file.
6845 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6847 2013-05-23 Mike Stump <mikestump@comcast.net>
6849 * c-typeck.c (convert_for_assignment): Handle references to memory
6852 2013-05-16 Jason Merrill <jason@redhat.com>
6854 * Make-lang.in (cc1$(exeext)): Use link mutex.
6856 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6858 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6859 to simply use OPT_Wpointer_arith.
6860 (build_unary_op): Likewise.
6862 2013-04-03 Jakub Jelinek <jakub@redhat.com>
6865 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6866 argument. If set, or it temporarily for parsing of the first
6867 argument into force_folding_builtin_constant_p.
6868 (c_parser_postfix_expression): Adjust callers.
6870 2013-03-21 Richard Biener <rguenther@suse.de>
6872 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6873 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6875 2013-02-12 Marek Polacek <polacek@redhat.com>
6878 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6881 2013-01-24 Jakub Jelinek <jakub@redhat.com>
6884 * c-typeck.c (set_nonincremental_init_from_string): If
6885 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6887 (process_init_element): Likewise.
6889 2012-12-20 Jakub Jelinek <jakub@redhat.com>
6892 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6893 argument, don't call default_function_array_conversion
6894 nor c_fully_fold here.
6895 (c_parser_asm_statement): Adjust callers.
6896 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6897 and outputs here, and call default_function_array_conversion
6898 on inputs that don't need to be addressable.
6900 2012-12-18 Jakub Jelinek <jakub@redhat.com>
6903 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6904 warning require that both c_common_unsigned_type as well as
6905 c_common_signed_type is the same for both mvl and mvr types.
6907 2012-11-16 Diego Novillo <dnovillo@google.com>
6909 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6911 * c-common.c: Use new vec API in vec.h.
6912 * c-common.h: Likewise.
6913 * c-gimplify.c: Likewise.
6914 * c-pragma.c: Likewise.
6915 * c-pretty-print.c: Likewise.
6916 * c-pretty-print.h: Likewise.
6917 * c-semantics.c: Likewise.
6918 * c-decl.c: Likewise.
6919 * c-parser.c: Likewise.
6920 * c-tree.h: Likewise.
6921 * c-typeck.c: Likewise.
6923 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6926 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6928 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6931 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6932 shadows a function, unless the variable is a function or a
6933 pointer-to-function.
6935 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6938 * c-parser.c (struct c_tree_loc_pair): Removed.
6939 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6940 add location_t * and tree * arguments, fill in array of 3
6941 sizeof_arg trees and corresponding locs.
6942 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6943 c_parser_expr_list callers.
6944 (c_parser_postfix_expression_after_primary): Likewise. Pass
6945 array of 3 sizeof_arg trees and locs (corresponding to first
6946 3 arguments) to sizeof_pointer_memaccess_warning.
6948 2012-10-09 Lawrence Crowl <crowl@google.com>
6950 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6951 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6954 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6957 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6960 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
6963 * c-typeck.c: Include c-common.h.
6964 (enum stv_conv): Moved to c-common.h.
6965 (scalar_to_vector): Moved to c-common.c.
6966 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6967 * Make-lang.in: c-typeck.c depends on c-common.h.
6969 2012-10-04 Arnaud Charlet <charlet@adacore.com>
6971 * c-decl.c (c_write_global_declarations): Fix handling of
6974 2012-09-30 Sharad Singhai <singhai@google.com>
6976 * c-decl.c (c_write_global_declarations): Use a different method
6977 to determine if the dump has ben initialized.
6979 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6982 * c-typeck.c (c_cast_expr): When casting to a type requiring
6983 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6986 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6989 * c-typeck.c (build_unary_op): Pass original argument of
6990 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6991 any C_MAYBE_CONST_EXPR, if it has integer operands.
6992 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6993 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6994 to c_objc_common_truthvalue_conversion, then remove any
6995 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6996 c_objc_common_truthvalue_conversion not
6997 c_common_truthvalue_conversion.
6998 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6999 call note_integer_operands for arguments with integer operands
7000 that are not integer constants.
7002 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7005 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7006 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7008 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7011 * c-convert.c (convert): Don't call fold_convert_loc if
7012 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7013 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7014 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7016 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7019 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7020 for nested and empty_ok arguments in the call to
7021 c_parser_declaration_or_fndef.
7023 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7025 * c-tree.h (c_last_sizeof_arg): Declare.
7026 * c-parser.c (struct c_tree_loc_pair): New type.
7027 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7029 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7030 (c_parser_postfix_expression_after_primary): Likewise. Call
7031 sizeof_pointer_memaccess_warning if needed.
7032 (sizeof_ptr_memacc_comptypes): New function.
7033 * c-typeck.c (c_last_sizeof_arg): New global variable.
7034 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7036 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7038 * c-lang.h (lang_decl): Add variable_size GTY option.
7040 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7042 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7043 * Make-lang.in: Fix dependencies.
7045 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7047 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7048 and add language Makefile hooks.
7049 * config-lang.in: New file.
7050 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7051 add the required "normal" config-lang.in rules.
7052 * c-lang.h: Moved from gcc/ to here.
7053 * c-tree.h: Likewise.
7054 * c-objc-common.c: Likewise.
7055 * c-objc-common.h: Likewise.
7056 * c-typeck.c: Likewise.
7057 * c-convert.c: Likewise.
7058 * c-lang.c: Likewise.
7059 * c-aux-info.c: Likewise.
7060 * c-errors.c: Likewise.
7061 * gccspec.c: Likewise.
7062 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7063 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7065 Copyright (C) 2012-2020 Free Software Foundation, Inc.
7067 Copying and distribution of this file, with or without modification,
7068 are permitted in any medium without royalty provided the copyright
7069 notice and this notice are preserved.