1 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
3 * Make-lang.in: Remove extra slash.
5 2020-05-19 Martin Liska <mliska@suse.cz>
7 * c-parser.c: Fix typo.
9 2020-05-14 Jakub Jelinek <jakub@redhat.com>
11 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
13 2020-05-07 Richard Biener <rguenther@suse.de>
16 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
19 2020-04-30 Jakub Jelinek <jakub@redhat.com>
22 * c-decl.c (set_labels_context_r): In addition to context-less
23 LABEL_DECLs adjust also LABEL_DECLs with context equal to
24 parent function if any.
25 (store_parm_decls): Adjust comment.
27 2020-04-19 Jakub Jelinek <jakub@redhat.com>
30 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
33 2020-04-17 Jakub Jelinek <jakub@redhat.com>
36 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
39 2020-04-15 Jakub Jelinek <jakub@redhat.com>
42 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
43 requires directive when not at file scope.
45 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
48 * c-decl.c (c_check_in_current_scope): New function.
49 * c-tree.h (c_check_in_current_scope): Declare it.
50 * c-parser.c (c_parser_oacc_declare): Add check that variables
51 are declared in the same scope as the directive. Fix handling
54 2020-04-07 Jakub Jelinek <jakub@redhat.com>
57 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
58 if c_parser_omp_master succeeded.
60 2020-03-23 Jakub Jelinek <jakub@redhat.com>
64 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
65 the function_start_locus location. Don't do that afterwards for the
66 __GIMPLE body parsing.
68 2020-03-19 Jakub Jelinek <jakub@redhat.com>
71 * c-tree.h (finish_function): Add location_t argument defaulted to
73 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
74 set it to the locus of closing } if non-NULL.
75 (c_parser_compound_statement_nostart): Return locus of closing }.
76 (c_parser_parse_rtl_body): Likewise.
77 (c_parser_declaration_or_fndef): Propagate locus of closing } to
79 * c-decl.c (finish_function): Add end_loc argument, use it instead of
80 input_location to set function_end_locus.
82 2020-03-17 Jakub Jelinek <jakub@redhat.com>
85 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
86 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
87 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
88 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
90 (finish_incomplete_vars): New function, moved from finish_struct. Use
91 relayout_decl instead of layout_decl.
92 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
93 being TYPE_VFIELD. Use finish_incomplete_vars.
94 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
95 finish_incomplete_vars.
96 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
97 also on ENUMERAL_TYPEs.
99 2020-03-16 Jakub Jelinek <jakub@redhat.com>
102 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
104 2020-03-13 Martin Sebor <msebor@redhat.com>
107 * c-decl.c (builtin_structptr_type_count): New constant.
108 (match_builtin_function_types): Reject decls that are incompatible
109 in types pointed to by pointers.
110 (diagnose_mismatched_decls): Adjust comments.
112 2020-03-05 Joseph Myers <joseph@codesourcery.com>
115 * c-typeck.c (pop_init_level): Do not diagnose initializers as
116 empty when initialized type is error_mark_node.
117 (set_designator, process_init_element): Ignore initializers for
118 elements of a variable-size type or of error_mark_node.
120 2020-03-01 Martin Sebor <msebor@redhat.com>
123 * c-decl.c (types_close_enough_to_match): New function.
124 (match_builtin_function_types):
125 (diagnose_mismatched_decls): Add missing inform call to a warning.
127 2020-03-01 Martin Sebor <msebor@redhat.com>
130 * c-typeck.c (build_functype_attribute_variant): New function.
131 (composite_type): Call it.
133 2020-02-25 Jakub Jelinek <jakub@redhat.com>
136 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
137 Rename last argument from probablity to probability.
139 2020-02-13 Jakub Jelinek <jakub@redhat.com>
142 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
143 *expr if it has side effects.
145 2020-01-30 Jeff Law <law@redhat.com>
148 * c-parser.c (c_parser_switch_statement): Make sure to request
149 marking the switch expr as used.
151 2020-01-22 Joseph Myers <joseph@codesourcery.com>
154 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
155 argument with integer operands.
157 2020-01-16 Kerem Kat <keremkat@gmail.com>
160 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
161 to support 4 available tokens.
163 2020-01-15 Joseph Myers <joseph@codesourcery.com>
166 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
167 determine whether to set DECL_CONTEXT.
169 2020-01-13 Joseph Myers <joseph@codesourcery.com>
172 * c-typeck.c (build_c_cast): Check for expressions with integer
173 operands that can occur in an unevaluated part of an integer
174 constant expression and call note_integer_operands as needed.
176 2019-01-08 Richard Biener <rguenther@suse.de>
179 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
182 2020-01-01 Jakub Jelinek <jakub@redhat.com>
184 Update copyright years.
186 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
188 * c-decl.c (collect_source_ref_cb): Delete.
189 (for_each_global_decl): Rename into...
190 (collect_source_refs): ...this. Call collect_source_ref directly.
191 (c_parse_final_cleanups): Always call collect_source_ref on the main
194 2019-12-19 Julian Brown <julian@codesourcery.com>
195 Cesar Philippidis <cesar@codesourcery.com>
197 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
199 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
200 Allow deref (->) in variable lists if true.
201 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
202 Pass to c_parser_omp_variable_list.
203 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
204 call to c_parser_omp_variable_list.
205 (c_parser_oacc_all_clauses): Support attach and detach clauses.
206 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
207 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
208 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
209 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
210 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
211 and detach. Support deref.
212 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
213 GOMP_MAP_ALWAYS_POINTER for OpenACC.
214 (c_oacc_check_attachments): New function.
215 (c_finish_omp_clauses): Check attach/detach arguments for being
216 pointers using above. Support deref.
218 2019-12-19 Julian Brown <julian@codesourcery.com>
219 Maciej W. Rozycki <macro@codesourcery.com>
220 Tobias Burnus <tobias@codesourcery.com>
221 Thomas Schwinge <thomas@codesourcery.com>
223 * c-parser.c (c_parser_omp_clause_name): Support no_create.
224 (c_parser_oacc_data_clause): Likewise.
225 (c_parser_oacc_all_clauses): Likewise.
226 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
227 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
228 PRAGMA_OACC_CLAUSE_NO_CREATE.
229 * c-typeck.c (handle_omp_array_sections): Support
232 2019-12-09 David Malcolm <dmalcolm@redhat.com>
234 * c-objc-common.c (range_label_for_type_mismatch::get_text):
235 Replace label_text ctor calls.
237 2019-12-04 Joseph Myers <joseph@codesourcery.com>
241 * c-typeck.c (convert_lvalue_to_rvalue): Call
242 require_complete_type for arguments not of void types.
243 (build_indirect_ref): Do not diagnose dereferencing pointers to
245 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
247 2019-12-03 Joseph Myers <joseph@codesourcery.com>
250 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
251 old-style parameter definitions.
253 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
257 * c-decl.c (flexible_array_type_p): Move to common code.
259 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
261 * c-decl.c (start_decl): Allow initialization of variables whose
262 size is a POLY_INT_CST.
263 (finish_decl): Use verify_type_context to check whether the target
264 allows variables with a particular type to have static or thread-local
265 storage duration. Don't raise a second error if such variables do
266 not have a constant size.
267 (grokdeclarator): Use verify_type_context to check whether the
268 target allows fields or array elements to have a particular type.
269 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
270 the target allows pointer difference for the types involved.
271 (build_unary_op): Likewise for pointer increment and decrement.
273 2019-11-29 Joseph Myers <joseph@codesourcery.com>
275 * c-parser.c (struct c_parser): Add members raw_tokens and
277 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
278 using previously-lexed raw tokens.
279 (c_parser_peek_nth_token_raw)
280 (c_parser_check_balanced_raw_token_sequence): New functions.
281 (c_parser_nth_token_starts_std_attributes): Use
282 c_parser_check_balanced_raw_token_sequence for Objective-C.
284 2019-11-25 Joseph Myers <joseph@codesourcery.com>
287 * c-decl.c (finish_declspecs): Use int instead of decimal
288 floating-point types if decimal floating-point not supported.
290 2019-11-25 Joseph Myers <joseph@codesourcery.com>
292 * c-tree.h (struct c_declarator): Use a structure for id member.
293 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
294 declarators at the start, not when handling individual declarators
295 later. Use u.id.id instead of u.id.
296 (grokfield): Use u.id.id instead of u.id.
297 (build_id_declarator): Set u.id.id and u.id.attrs.
298 (finish_declspecs): Handle postfix attributes in case of typedef
300 * c-parser.c (c_parser_direct_declarator)
301 (c_parser_direct_declarator_inner): Place declarator for
302 attributes inside that for function or array, not outside. Set
303 u.id.attrs for identifiers.
304 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
305 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
308 2019-11-22 Jakub Jelinek <jakub@redhat.com>
311 * c-decl.c (identifier_global_tag): Define.
313 2019-11-20 Richard Biener <rguenther@suse.de>
316 * c-decl.c (grokdeclarator): Prevent inlining of nested
317 function with VLA arguments.
319 2019-11-20 Joseph Myers <joseph@codesourcery.com>
321 * c-decl.c (c_warn_type_attributes): New function.
322 (groktypename, grokdeclarator, finish_declspecs): Call
323 c_warn_type_attributes before applying attributes to types.
324 * c-tree.h (c_warn_type_attributes): Declare.
326 2019-11-19 Joseph Myers <joseph@codesourcery.com>
328 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
330 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
331 pedwarn for unknown standard attributes and return error_mark_node
334 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
336 * c-parser.c (c_parser_parse_rtl_body): Always call
337 run_rtl_passes, even if startwith pass is not provided.
339 2019-11-15 Joseph Myers <joseph@codesourcery.com>
341 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
342 duplicate standard attributes.
344 2019-11-15 Joseph Myers <joseph@codesourcery.com>
346 * c-decl.c (std_attribute_table): Add maybe_unused.
348 2019-11-15 Joseph Myers <joseph@codesourcery.com>
350 * c-decl.c (std_attribute_table): Add fallthrough.
351 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
352 attribute at top level.
354 2019-11-15 Joseph Myers <joseph@codesourcery.com>
356 * c-decl.c (std_attribute_table): New.
357 (c_init_decl_processing): Register attributes from
359 * c-parser.c (c_parser_attribute_arguments): Add arguments
360 require_string and allow_empty_args. All callers changed.
361 (c_parser_std_attribute): Set require_string argument for
362 "deprecated" attribute.
364 2019-11-14 Joseph Myers <joseph@codesourcery.com>
366 * c-parser.c (c_parser_postfix_expression)
367 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
368 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
370 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
372 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
373 of build_same_sized_truth_vector_type.
374 (build_vec_cmp): Likewise.
376 2019-11-14 Jakub Jelinek <jakub@redhat.com>
378 * c-parser.c (c_parser_omp_context_selector): Don't require score
379 argument to fit into shwi, just to be INTEGER_CST. Diagnose
382 * c-parser.c (c_parser_omp_context_selector): Rename
383 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
384 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
385 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
388 2019-11-14 Joseph Myers <joseph@codesourcery.com>
390 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
391 ctsk_tagfirstref_attrs.
392 (struct c_declspecs): Update description of attrs. Add
393 postfix_attrs and non_std_attrs_seen_p. Increase size of
394 typespec_kind bit-field.
395 (c_warn_unused_attributes): New declaration.
396 (parser_xref_tag): Update prototype.
397 * c-decl.c (c_warn_unused_attributes): New function.
398 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
399 ctsk_tagref_attrs. Handle attribute declarations.
400 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
401 (grokdeclarator): Handle standard attributes.
402 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
403 attributes to incomplete type reference.
404 (xref_tag): Update call to parser_xref_tag.
405 (declspecs_add_addrspace, declspecs_add_type)
406 (declspecs_add_scspec, declspecs_add_attrs): Set
407 non_std_attrs_seen_p.
408 (finish_declspecs): Apply postfix standard attributes to type.
409 * c-parser.c (c_token_starts_declspecs)
410 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
411 (c_parser_next_tokens_start_declaration): Update comments.
412 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
413 parser->tokens[2] to parser->tokens[1].
414 (c_parser_nth_token_starts_std_attributes)
415 (c_parser_std_attribute_specifier_sequence): New functions.
416 (c_parser_declaration_or_fndef): Add arguments have_attrs and
417 attrs. All callers changed. Handle standard attributes.
418 (c_parser_parms_declarator, c_parser_parms_list_declarator)
419 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
421 (c_parser_declspecs): Add arguments start_std_attr_ok and
422 end_std_attr_ok. All callers changed. Handle standard
424 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
425 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
426 (c_parser_compound_statement_nostart, c_parser_all_labels)
427 (c_parser_label, c_parser_statement, c_parser_for_statement):
428 Handle standard attributes.
429 * c-parser.h (c_parser_declspecs): Update prototype.
430 * gimple-parser.c (c_parser_gimple_declaration): Update call to
433 2019-11-12 Martin Liska <mliska@suse.cz>
435 * gimple-parser.c: Do not include params.h.
437 2019-11-12 Martin Liska <mliska@suse.cz>
439 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
440 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
443 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
444 Frederik Harwath <frederik@codesourcery.com>
447 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
448 (c_parser_oacc_kernels_parallel): Rename function to...
449 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
450 (c_parser_omp_construct): Update accordingly.
453 2019-11-11 Jakub Jelinek <jakub@redhat.com>
455 * c-parser.c (c_parser_translation_unit): Diagnose declare target
456 without corresponding end declare target.
458 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
460 * c-convert.c (convert): Only handle vector conversions if one of
461 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
463 * c-typeck.c (build_array_ref): Only allow vector indexing if the
464 vectors satisfy gnu_vector_type_p.
465 (build_unary_op): Only allow unary operators to be applied to
466 vectors if they satisfy gnu_vector_type_p.
467 (digest_init): Only allow by-element initialization of vectors
468 if they satisfy gnu_vector_type_p.
469 (really_start_incremental_init): Likewise.
470 (push_init_level): Likewise.
471 (pop_init_level): Likewise.
472 (process_init_element): Likewise.
473 (build_binary_op): Only allow binary operators to be applied to
474 vectors if they satisfy gnu_vector_type_p.
476 2019-11-08 Joseph Myers <joseph@codesourcery.com>
478 * c-decl.c (grokparms): Convert () in a function definition to
480 (store_parm_decls_oldstyle): Pedwarn for C2x.
481 (store_parm_decls): Update comment about () not generating a
484 2019-11-07 Joseph Myers <joseph@codesourcery.com>
486 * c-parser.c (c_parser_attribute_arguments): New function.
487 Factored out of c_parser_gnu_attribute.
488 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
489 (c_parser_balanced_token_sequence, c_parser_std_attribute)
490 (c_parser_std_attribute_specifier): New functions.
491 (c_parser_transaction_attributes): Use
492 c_parser_std_attribute_specifier.
494 2019-11-07 Joseph Myers <joseph@codesourcery.com>
496 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
497 lex_joined_string and translate_strings_p.
498 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
500 (c_parser_string_literal): New function.
501 (c_parser_static_assert_declaration_no_semi): Use
502 c_parser_string_literal. Do not set lex_untranslated_string.
503 (c_parser_asm_string_literal): Use c_parser_string_literal.
504 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
505 (c_parser_gnu_attributes): Set and restore translate_strings_p
506 instead of lex_untranslated_string.
507 (c_parser_asm_statement): Do not set lex_untranslated_string.
508 (c_parser_asm_operands): Likewise.
509 (c_parser_has_attribute_expression): Set and restore
510 translate_strings_p instead of lex_untranslated_string.
511 (c_parser_postfix_expression): Use c_parser_string_literal.
512 (pragma_lex): Likewise.
513 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
514 (c_parse_file): Set translate_strings_p.
515 * gimple-parser.c (c_parser_gimple_postfix_expression)
516 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
517 * c-parser.c (c_parser_string_literal): Declare function.
519 2019-11-02 Jakub Jelinek <jakub@redhat.com>
521 * c-parser.c (c_finish_omp_declare_variant): Use
522 omp_get_context_selector instead of c_omp_get_context_selector.
524 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
526 * c-tree.h (c_simulate_enum_decl): Declare.
527 * c-decl.c (c_simulate_enum_decl): New function.
528 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
530 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
532 * c-tree.h (c_simulate_builtin_function_decl): Declare.
533 * c-decl.c (c_simulate_builtin_function_decl): New function.
534 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
537 2019-10-28 Martin Sebor <msebor@redhat.com>
540 * c-decl.c (names_builtin_p): Define a new function.
542 2019-10-28 Richard Biener <rguenther@suse.de>
545 * gimple-parser.c (c_parser_parse_gimple_body): Make
546 current_bb the entry block initially to easier recover
548 (c_parser_gimple_compound_statement): Adjust.
550 2019-10-24 Jakub Jelinek <jakub@redhat.com>
552 * c-parser.c (c_finish_omp_declare_variant): Use
553 omp_context_selector_matches instead of
554 c_omp_context_selector_matches.
555 * c-decl.c (c_decl_attributes): Add "omp declare target block"
556 attribute in between declare target and end declare target
559 2019-10-15 Joseph Myers <joseph@codesourcery.com>
561 * c-parser.c (c_parser_attribute_any_word): Rename to
562 c_parser_gnu_attribute_any_word. All callers changed.
563 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
565 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
567 (c_parser_declaration_or_fndef, c_parser_declspecs)
568 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
569 (c_parser_struct_declaration, c_parser_declarator)
570 (c_parser_gnu_attribute, c_parser_compound_statement)
571 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
572 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
573 attribute-related syntax productions.
575 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
577 * c-objc-common.c (useful_aka_type_p): Replace with...
578 (get_aka_type): ...this new function. Given the original type,
579 decide which aka type to print (if any). Only look through typedefs
580 if user_facing_original_type_p.
581 (print_type): Update accordingly.
583 2019-10-14 Jakub Jelinek <jakub@redhat.com>
585 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
586 into int NESTED, if it is 2, diagnose missing commas in between
588 (c_parser_omp_context_selector): Pass 2 as last argument to
589 c_parser_omp_all_clauses.
591 2019-10-12 Jakub Jelinek <jakub@redhat.com>
593 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
594 For simd properties, put them directly into TREE_VALUE.
595 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
596 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
597 add "omp declare variant base" attribute rather than
598 "omp declare variant".
600 2019-10-11 Joseph Myers <joseph@codesourcery.com>
602 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
604 2019-10-10 Jakub Jelinek <jakub@redhat.com>
606 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
607 true, terminate processing on closing paren and don't skip to end of
609 (c_parser_omp_declare_simd): Handle also declare variant.
610 (omp_construct_selectors, omp_device_selectors,
611 omp_implementation_selectors, omp_user_selectors): New variables.
612 (c_parser_omp_context_selector,
613 c_parser_omp_context_selector_specification,
614 c_finish_omp_declare_variant): New functions.
615 (c_finish_omp_declare_simd): Handle both declare simd and
617 (c_parser_omp_declare): Handle declare variant.
619 2019-10-02 Joseph Myers <joseph@codesourcery.com>
621 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
624 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
626 * c-objc-common.c (useful_aka_type_p): New function.
627 (print_type): Use it to decide whether an aka type is worth printing.
629 2019-09-27 Jakub Jelinek <jakub@redhat.com>
632 * c-parser.c (c_parser_predefined_identifier): New function.
633 (c_parser_postfix_expression): Use it.
634 (c_parser_omp_variable_list): Parse predefined identifiers.
635 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
636 in shared and firstprivate clauses, even when they are predetermined
639 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
641 * c-typeck.c (build_function_call_vec): Take the original function
642 decl as an optional final parameter. Pass all built-in calls to
643 check_builtin_function_arguments.
645 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
648 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
649 of identifiers in the external scope only for variables and functions.
651 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
654 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
656 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
659 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
660 after determining that the first token is not
661 PRAGMA_GCC_PCH_PREPROCESS.
663 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
665 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
666 FUNCTION_DECL to the right value in the presence of nested declarators.
668 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
671 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
673 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
676 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
677 of a built_in_function.
678 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
680 2019-08-10 Jakub Jelinek <jakub@redhat.com>
682 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
683 (c_parser_omp_clause_device_type): New function.
684 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
685 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
686 (c_parser_omp_declare_target): Handle device_type clauses. Remove
687 diagnostics for declare target with clauses nested in clause-less
688 declare target declaration-definition-seq.
689 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
691 2019-08-09 Jakub Jelinek <jakub@redhat.com>
693 * c-parser.c (check_no_duplicate_clause): Simplify using
695 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
696 directive name modifiers.
697 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
700 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
701 check_no_duplicate_clause call. Comment it out, instead emit a
702 warning for duplicate dist_schedule clauses.
704 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
706 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
708 2019-08-08 Jakub Jelinek <jakub@redhat.com>
710 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
711 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
712 instead of generic_head to track duplicates.
714 2019-08-07 Jakub Jelinek <jakub@redhat.com>
716 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
717 (c_parser_omp_clause_use_device_addr): New function.
718 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
719 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
720 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
721 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
722 map or use_device_* clauses.
723 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
724 in OpenMP, require pointer type rather than pointer or array type.
725 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
727 2019-07-31 Jakub Jelinek <jakub@redhat.com>
730 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
731 even if finish is UNKNOWN_LOCATION, just use start as finish in that
734 2019-07-25 Martin Liska <mliska@suse.cz>
735 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
738 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
740 2019-07-25 Martin Liska <mliska@suse.cz>
742 * c-decl.c (merge_decls): Use new macros
743 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
745 2019-07-23 Richard Biener <rguenther@suse.de>
747 PR tree-optimization/83518
748 * gimple-parser.c (c_parser_parse_gimple_body): When we have
749 a CFG also rebuild cgraph edges.
751 2019-07-20 Jakub Jelinek <jakub@redhat.com>
753 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
754 (c_parser_omp_clause_bind): New function.
755 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
756 (OMP_LOOP_CLAUSE_MASK): Define.
757 (c_parser_omp_loop): New function.
758 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
759 loop combined with parallel or teams.
760 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
761 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
763 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
766 * c-decl.c (finish_function): Check targetm.warn_func_return
767 before issuing a -Wreturn-type warning.
769 2019-07-12 Alexandre Oliva <oliva@adacore.com>
771 * gimple-parser.c (c_parser_gimple_try_stmt): New.
772 (c_parser_compound_statement): Call it.
774 2019-07-12 Jakub Jelinek <jakub@redhat.com>
776 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
777 (c_parser_omp_clause_order): New function.
778 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
779 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
780 PRAGMA_OMP_CLAUSE_ORDER.
781 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
783 2019-07-10 Richard Biener <rguenther@suse.de>
785 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
786 _Literal (int *) &x for address literals.
788 2019-07-09 Martin Sebor <msebor@redhat.com>
791 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
793 (field_decl_cmp): Same.
794 * c-parser.c (c_parser_struct_or_union_specifier): Same.
796 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
798 2019-07-09 Martin Sebor <msebor@redhat.com>
801 * c-decl.c: Change class-key from class to struct and vice versa
802 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
803 * gimple-parser.c: Same.
805 2019-07-01 Richard Biener <rguenther@suse.de>
807 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
808 _Literal (char *) &"foo" for address literals pointing to
811 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
813 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
814 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
815 C incompatibility if alternate "__intN__" form is used.
817 2019-06-24 Martin Sebor <msebor@redhat.com>
819 * c-typeck.c (build_binary_op): Hyphenate floating-point.
821 2019-06-10 Jakub Jelinek <jakub@redhat.com>
823 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
824 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
825 (c_parser_omp_scan_loop_body): New function.
826 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
827 inscan reduction clauses.
828 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
829 non-inscan reductions on the same construct, or inscan reductions with
830 ordered or schedule clauses, or inscan array reductions.
832 2019-06-05 Martin Sebor <msebor@redhat.com>
835 * c-typeck.c (c_finish_return): Only consider functions returning
836 pointers as candidates for -Wreturn-local-addr.
838 2019-06-05 Martin Sebor <msebor@redhat.com>
840 * c-decl.c (start_decl): Adjust quoting and hyphenation
844 (start_function): Same.
845 (declspecs_add_type): Same.
846 * c-parser.c (warn_for_abs): Same.
847 * c-typeck.c (build_binary_op): Same.
849 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
852 * c-parser.c (c_finish_oacc_routine): Rework checking if already
853 marked with an OpenACC 'routine' directive.
856 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
857 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
860 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
861 clauses from "omp declare target" attribute.
863 2019-05-16 Martin Sebor <msebor@redhat.com>
865 * c-decl.c (start_decl): Quote keywords, operators, and
866 types in diagnostics.
868 * c-parser.c (c_parser_asm_statement): Same.
869 (c_parser_conditional_expression): Same.
870 (c_parser_transaction_cancel): Same.
871 * c-typeck.c (c_common_type): Same.
872 (build_conditional_expr): Same.
874 (process_init_element): Same.
875 (build_binary_op): Same.
877 2019-05-17 Richard Biener <rguenther@suse.de>
879 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
880 (c_parser_gimple_unary_expression): Likewise.
881 (c_parser_gimple_parentized_ternary_expression): New function.
883 2019-05-16 Richard Biener <rguenther@suse.de>
885 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
886 (c_parser_gimple_unary_expression): Likewise.
888 2019-05-15 Richard Biener <rguenther@suse.de>
890 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
893 2019-05-14 Richard Biener <rguenther@suse.de>
895 * gimple-parser.c (c_parser_gimple_statement): Remove
896 questionable auto-promotion to VIEW_CONVERT_EXPR.
897 (c_parser_gimple_typespec): Split out from __MEM parsing.
898 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
899 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
900 as __VIEW_CONVERT with -gimple.
902 2019-05-09 Martin Liska <mliska@suse.cz>
904 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
906 (c_parser_gimple_unary_expression): Parse also binary expression
908 (c_parser_gimple_parentized_binary_expression): New function.
910 2019-05-09 Martin Liska <mliska@suse.cz>
912 * gimple-parser.c (struct gimple_parser): Add probability.
913 for gimple_parser_edge.
914 (gimple_parser::push_edge): Add new argument probability.
915 (c_parser_gimple_parse_bb_spec): Parse also probability
917 (c_parser_parse_gimple_body): Set edge probability.
918 (c_parser_gimple_compound_statement): Consume token
919 before calling c_parser_gimple_goto_stmt.
921 (c_parser_gimple_statement): Pass new argument.
922 (c_parser_gimple_goto_stmt): Likewise.
923 (c_parser_gimple_if_stmt): Likewise.
924 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
925 * c-parser.c (c_parser_declaration_or_fndef): Pass
926 hot_bb_threshold argument.
927 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
929 (c_parser_gimple_parse_bb_spec_edge_probability): New.
931 2019-04-26 Jakub Jelinek <jakub@redhat.com>
934 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
935 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
936 (c_parser_do_statement): Likewise.
937 (c_parser_for_statement): Likewise. Formatting fixes.
938 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
939 emit DEBUG_BEGIN_STMTs if needed.
941 2019-04-19 Jakub Jelinek <jakub@redhat.com>
944 * c-typeck.c (struct c_switch): Remove outside_range_p member.
945 (c_start_case): Don't clear it.
946 (do_case): Adjust c_add_case_label caller.
947 (c_finish_case): Adjust c_do_switch_warnings caller.
950 * c-decl.c (merge_decls): If remove is main variant and
951 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
952 variant that has newdecl as TYPE_NAME if any.
954 2019-04-12 Jakub Jelinek <jakub@redhat.com>
957 * c-decl.c (merge_decls): When newdecl's type is its main variant,
958 don't try to remove it from the variant list, but instead assert
961 2019-04-01 Richard Biener <rguenther@suse.de>
964 * c-tree.h (c_get_alias_set): Declare.
965 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
966 * c-objc-common.c (c_get_alias_set): Treat enumeral types
967 as the underlying integer type.
969 2019-03-19 Martin Sebor <msebor@redhat.com>
971 PR tree-optimization/89688
972 * c-decl.c (finish_decl): Call braced_lists_to_string for more
973 kinds of initializers.
975 2019-03-19 Jakub Jelinek <jakub@redhat.com>
978 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
979 return type even if quals_used is 0. Formatting fixes.
981 2019-03-14 Richard Biener <rguenther@suse.de>
983 * c-tree.h (enum c_declspec_il): New.
984 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
986 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
987 Pass start pass and declspec_il to c_parser_parse_gimple_body.
988 (c_parser_declspecs): Adjust.
989 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
990 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
992 (struct gimple_parser): New.
993 (gimple_parser::push_edge): New method.
994 (c_parser_gimple_parse_bb_spec): New helper.
995 (c_parser_parse_gimple_body): Get start pass and IL specification.
996 Initialize SSA and CFG.
997 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
998 Build a gimple_parser parsing state and pass it along.
999 (c_parser_gimple_statement): Change intermittend __PHI internal
1000 function argument for the edge.
1001 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1002 (c_parser_gimple_goto_stmt): Record edges to build.
1003 (c_parser_gimple_if_stmt): Likewise.
1004 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1005 (c_parser_gimple_or_rtl_pass_list): Likewise.
1007 2019-03-11 Martin Liska <mliska@suse.cz>
1009 * c-decl.c (check_for_loop_decls): Wrap an option name
1010 in a string format message and fix GNU coding style.
1011 * c-parser.c (c_parser_declspecs): Likewise.
1013 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1015 PR tree-optimization/89550
1016 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1018 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1019 or warning returned true.
1021 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1024 * c-typeck.c (convert_arguments): Call inform_declaration only if
1025 the previous warning_at call returned true.
1027 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1029 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1030 parameter. Adjust all users.
1031 (c_parser_oacc_simple_clause): Replace parser with loc formal
1032 parameter. Adjust all users.
1034 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1037 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1038 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1040 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1043 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1044 before c_decl_attributes rather than after it.
1046 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1049 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1050 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1051 instead of 3 nested ifs.
1053 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1056 * c-decl.c (finish_decl): Do not complete array types for arrays
1057 with external linkage not at file scope.
1059 2019-02-05 Richard Biener <rguenther@suse.de>
1062 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1063 all type variants when not supported.
1065 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1068 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1069 * c-decl.c (decl_jump_unsafe): Return false for
1070 C_DECL_COMPOUND_LITERAL_P decls.
1071 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1073 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1076 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1080 * c-decl.c (last_fileptr_type): Remove.
1081 (last_structptr_types): New variable.
1082 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1083 {old,new}rettype instead of the types themselves. Assert
1084 last_structptr_types array has the same number of elements
1085 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1086 argument oldtype and newtype. Instead of handling
1087 just fileptr_type_node specially, handle all builtin_structptr_types
1088 pointer nodes. Formatting fix.
1090 2019-01-24 Martin Sebor <msebor@redhat.com>
1095 * c-decl.c (match_builtin_function_types): Add arguments.
1096 (diagnose_mismatched_decls): Diagnose mismatched declarations
1097 of built-ins more strictly.
1099 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1102 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1103 on #pragma omp cancel with different modifiers.
1105 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1109 * c-typeck.c (convert_for_assignment): Upate the
1110 warn_for_address_or_pointer_of_packed_member call.
1112 2019-01-16 Tom Honermann <tom@honermann.net>
1113 Jason Merrill <jason@redhat.com>
1115 * c-typeck.c (digest_init): Revised the error message produced for
1116 ill-formed cases of array initialization with a string literal.
1117 (error_init): Make variadic.
1119 2019-01-12 Jakub Jelinek <jakub@redhat.com>
1121 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1123 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1126 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1127 if current_function_decl is non-NULL.
1129 2019-01-07 Joseph Myers <joseph@codesourcery.com>
1133 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1134 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1135 functions declared but never defined only for external scope, not
1138 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1141 * c-parser.c (c_parser_postfix_expression): Parse
1142 __builtin_convertvector.
1144 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1146 Update copyright years.
1148 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1151 * c-typeck.c (convert_for_assignment): Call
1152 warn_for_address_or_pointer_of_packed_member.
1154 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1156 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1157 a more specific error message (instead of just falling through).
1159 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1161 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1162 asm qualifier is first seen; use that to give nicer "duplicate asm
1163 qualifier" messages. Delete 'quals" variable, instead pass the
1164 "is_volatile_ flag to build_asm_stmt directly.
1165 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1166 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1168 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1170 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1171 "done" boolean variable.
1173 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1176 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1177 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1178 (build_binary_op): Use struct op_location_t and
1179 class binary_op_rich_location.
1181 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1184 * c-convert.c (convert): Call c_fully_fold before calling
1185 ubsan_instrument_float_cast.
1187 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1189 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1192 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1194 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1195 after asm. Pass a flag for it to build_asm_expr.
1196 * c-tree.h (build_asm_expr): Update declaration.
1197 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1200 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1203 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1204 combination of volatile and goto, in any order, without repetitions.
1206 2018-12-04 James Norris <jnorris@codesourcery.com>
1207 Cesar Philippidis <cesar@codesourcery.com>
1208 Julian Brown <julian@codesourcery.com>
1210 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1213 2018-11-30 Richard Biener <rguenther@suse.de>
1215 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1216 _Literal (type) { ... } as empty aggregate or vector constructor.
1218 2018-11-29 Martin Sebor <msebor@redhat.com>
1221 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1222 (convert_arguments): Add comments. Pass additional argument to
1225 2018-11-29 Martin Sebor <msebor@redhat.com>
1229 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1231 2018-11-23 Martin Sebor <msebor@redhat.com>
1234 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1235 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1237 2018-11-20 Martin Sebor <msebor@redhat.com>
1239 * c-parser.c (c_parser_has_attribute_expression): New function.
1240 (c_parser_attribute): New function.
1241 (c_parser_attributes): Move code into c_parser_attribute.
1242 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1244 2018-11-15 Martin Sebor <msebor@redhat.com>
1247 * c-decl.c (header_for_builtin_fn): Declare.
1248 (diagnose_mismatched_decls): Diagnose declarations of built-in
1249 functions without a prototype.
1250 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1251 (convert_argument): Same.
1252 (convert_arguments): Factor code out into convert_argument.
1253 Detect mismatches between built-in formal arguments in calls
1254 to built-in without prototype.
1255 (build_conditional_expr): Same.
1256 (type_or_builtin_type): New function.
1257 (convert_for_assignment): Add argument. Conditionally issue
1258 warnings instead of errors for mismatches.
1260 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1262 * c-decl.c: Replace "source_location" with "location_t".
1263 * c-tree.h: Likewise.
1264 * c-typeck.c: Likewise.
1265 * gimple-parser.c: Likewise.
1267 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1269 * c-parser.c (c_parser_omp_clause_final): Use
1270 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1271 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1272 parsing instead of c_parser_paren_condition.
1273 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1274 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1275 c_fully_fold instead of c_parser_condition.
1276 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1277 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1278 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1279 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1280 c_parser_expr_no_commas instead of c_parser_expression.
1282 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1283 reduction clause with inscan modifier.
1285 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1286 clauses other than atomic_default_mem_order.
1288 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1290 * c-parser.c: Include memmode.h.
1291 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1292 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1293 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1294 task_reduction clauses.
1295 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1296 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1297 section, or lvalue assignment expression.
1298 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1299 (c_parser_omp_clause_lastprivate): Parse optional
1300 conditional: modifier.
1301 (c_parser_omp_clause_hint): Require constant integer expression rather
1302 than just integer expression.
1303 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1305 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1306 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1307 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1309 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1310 iterators. Parse mutexinoutset and depobj kinds.
1311 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1313 (c_parser_omp_all_clauses): Likewise. Handle
1314 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1315 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1316 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1317 default memory order from requires directive if any. Adjust
1318 c_finish_omp_atomic caller.
1319 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1320 (c_parser_omp_flush): Parse flush with memory-order-clause.
1321 (c_parser_omp_for_loop): Allow NE_EXPR even in
1322 OpenMP loops, adjust c_finish_omp_for caller.
1323 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1324 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1325 Allow to be called while parsing combined parallel master.
1326 Parse combined master taskloop{, simd}.
1327 (c_parser_omp_parallel): Parse combined
1328 parallel master{, taskloop{, simd}} constructs.
1329 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1330 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1331 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1332 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1333 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1334 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1335 around teams body. Use SET_EXPR_LOCATION.
1336 (c_parser_omp_target_data): Allow target data
1337 with only use_device_ptr clauses.
1338 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1339 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1340 (c_parser_omp_requires): New function.
1341 (c_finish_taskloop_clauses): New function.
1342 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1343 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1344 declaration. Disallow in_reduction clause when combined with parallel
1346 (c_parser_omp_construct): Adjust c_parser_omp_master and
1347 c_parser_omp_taskgroup callers.
1348 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1350 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1351 like OMP_CLAUSE_REDUCTION.
1352 (handle_omp_array_sections): Likewise. Call save_expr on array
1353 reductions before calling build_index_type. Handle depend clauses
1355 (struct c_find_omp_var_s): New type.
1356 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1357 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1358 with static, runtime or auto schedule kinds. Call save_expr for whole
1359 array reduction sizes. Diagnose reductions with zero sized elements
1360 or variable length structures. Diagnose nogroup clause used with
1361 reduction clause(s). Handle depend clause with
1362 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1363 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1364 some different type for other kinds. Use build_unary_op with
1365 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1366 Handle depend clauses with iterators. Remove no longer needed special
1367 case that predetermined const qualified vars may be specified in
1368 firstprivate clause. Complain if const qualified vars are mentioned
1369 in data-sharing clauses other than firstprivate or shared. Use
1370 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1371 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1372 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1373 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1375 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1377 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1378 logic for change to name_hint::operator bool.
1379 (undeclared_variable): Likewise.
1380 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1381 (c_parser_parameter_declaration): Likewise.
1383 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1385 * c-errors.c (pedwarn_c11): New function.
1386 * c-parser.c (disable_extension_diagnostics): Save
1387 warn_c11_c2x_compat and set it to 0.
1388 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1389 (c_parser_static_assert_declaration_no_semi): Handle
1390 _Static_assert without string constant.
1391 * c-tree.h (pedwarn_c11): New prototype.
1393 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1395 * Make-lang.in (selftest-c): New.
1396 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1397 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1398 from gcc/Makefile.in.
1400 2018-10-02 Richard Biener <rguenther@suse.de>
1402 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1404 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1407 * c-typeck.c (build_binary_op): Use excess precision for
1408 comparisons of integers and floating-point for C11 and later.
1410 2018-09-26 Martin Jambor <mjambor@suse.cz>
1413 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1416 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1418 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1419 Update for new param.
1420 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1423 2018-09-17 Martin Jambor <mjambor@suse.cz>
1426 * c-parser.c: (warn_for_abs): New function.
1427 (c_parser_postfix_expression_after_primary): Call it.
1429 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1431 * c-typeck.c (digest_init): Shorten overlength strings.
1433 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1435 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1437 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1439 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1440 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1442 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1444 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1445 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1447 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1450 * c-decl.c (implicitly_declare): Update call to
1451 maybe_add_include_fixit to suggest overriding the location, as it
1453 * c-objc-common.c (c_tree_printer): Update for conversion of
1454 show_caret_p to a tri-state.
1456 2018-08-27 Martin Liska <mliska@suse.cz>
1458 * c-decl.c (locate_old_decl): Use new function
1459 fndecl_built_in_p and remove check for FUNCTION_DECL if
1461 (diagnose_mismatched_decls): Likewise.
1462 (merge_decls): Likewise.
1463 (warn_if_shadowing): Likewise.
1464 (pushdecl): Likewise.
1465 (implicitly_declare): Likewise.
1466 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1467 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1468 * c-typeck.c (build_function_call_vec): Likewise.
1469 (convert_arguments): Likewise.
1471 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1474 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1475 (diagnose_mismatched_decls): Likewise, in various places.
1476 (warn_if_shadowing): Likewise.
1477 (implicit_decl_warning): Likewise.
1478 (implicitly_declare): Likewise.
1479 (undeclared_variable): Likewise.
1480 (declare_label): Likewise.
1481 (grokdeclarator): Likewise.
1482 (start_function): Likewise.
1483 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1484 (c_parser_parameter_declaration): Likewise.
1485 (c_parser_binary_expression): Likewise.
1486 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1487 (parser_build_binary_op): Likewise.
1488 (build_unary_op): Likewise.
1489 (error_init): Likewise.
1490 (pedwarn_init): Likewise.
1491 (warning_init): Likewise.
1492 (convert_for_assignment): Likewise.
1494 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1496 * c-objc-common.c: Include "gcc-rich-location.h".
1497 (c_tree_printer): Move implemenation of '%T' to...
1498 (print_type): ...this new function.
1499 (range_label_for_type_mismatch::get_text): New function.
1500 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1501 range for the various ic_argpass cases.
1502 (class maybe_range_label_for_tree_type_mismatch): New class.
1503 (build_binary_op): Use it when calling binary_op_error.
1505 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1507 * c-decl.c (start_decl): Do not warn if variables is named as main
1508 and is a local variable.
1510 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1513 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1514 objects of unknown size.
1516 2018-08-13 Martin Sebor <msebor@redhat.com>
1518 PR tree-optimization/71625
1519 * c-parser.c (c_parser_declaration_or_fndef): Call
1520 braced_list_to_string.
1522 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1525 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1528 2018-08-01 Martin Sebor <msebor@redhat.com>
1530 PR tree-optimization/86650
1531 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1532 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1534 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1537 * c-typeck.c (init_field_decl_cmp): New function.
1538 (output_pending_init_elements): Use it for field comparisons
1539 instead of pure bit_position comparisons.
1541 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1543 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1544 type here, instead add "omp declare target implicit" attribute.
1545 (finish_decl): Diagnose vars without mappable type here.
1547 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1548 Thomas Schwinge <thomas@codesourcery.com>
1549 Cesar Philippidis <cesar@codesourcery.com>
1551 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1552 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1553 to their non-present_or_* counterparts. Make 'self' an alias to
1554 PRAGMA_OACC_CLAUSE_HOST.
1555 (c_parser_oacc_data_clause): Update GOMP mappings for
1556 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1557 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1558 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1559 Remove support for present_or_* clauses.
1560 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1561 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1562 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1563 (OACC_DATA_CLAUSE_MASK): Likewise.
1564 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1565 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1566 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1567 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1568 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1570 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1572 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1573 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1574 (c_parser_gimple_unary_expression): Likewise.
1576 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1579 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1580 before doing POINTER_DIFF_EXPR.
1582 2018-06-07 Marek Polacek <polacek@redhat.com>
1585 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1586 for loop initial declarations.
1588 2018-05-30 David Pagan <dave.pagan@oracle.com>
1591 * c-decl.c (grokdeclarator): Update check for return type warnings.
1592 (start_function): Likewise.
1593 (finish_function): Likewise.
1594 * c-typeck.c (c_finish_return): Update check for return type warnings.
1595 Pass OPT_Wreturn_type to pedwarn when appropriate.
1597 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1599 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1602 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1604 * gimple-parser.c: Include internal-fn.h.
1605 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1606 (c_parser_gimple_call_internal): New function.
1607 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1608 Fix typos in comment.
1610 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1613 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1614 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1616 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1617 fold_offsetof_1, pass argtype as TYPE to it and drop the
1620 2018-05-02 David Pagan <dave.pagan@oracle.com>
1623 * c-decl.c (old_style_parameter_scope): New function.
1624 * c-parser.c (c_parser_postfix_expression): Check for statement
1625 expressions in old-style function parameter list declarations.
1626 * c-parser.h (old_style_parameter_scope): New extern declaration.
1628 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1631 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1632 it is not TREE_STATIC.
1633 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1634 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1635 its COMPOUND_LITERAL_EXPR_DECL.
1637 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1639 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1640 where all functions return the same _FloatN or _FloatNx type,
1641 treat integer types as _Float64 instead of double.
1643 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1646 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1647 building vector comparison, diagnose it and return error_mark_node.
1649 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1652 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1653 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1654 INTEGER_TYPE element type.
1656 2018-03-13 David Pagan <dave.pagan@oracle.com>
1659 * c-typeck.c (output_init_element): Ensure field initializer
1660 expression is always evaluated if there are side effects.
1662 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1665 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1666 !building_stmt_list_p ().
1668 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1671 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1672 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1673 and include the BIND_EXPR in the list of things that need to be
1676 2018-02-09 Nathan Sidwell <nathan@acm.org>
1679 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1680 to strict_aliasing_warning.
1682 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1684 * c-typeck.c (really_start_incremental_init, push_init_level,
1685 set_nonincremental_init, output_init_element, process_init_element):
1686 Use DECL_UNNAMED_BIT_FIELD.
1688 2018-01-31 Marek Polacek <polacek@redhat.com>
1691 * c-parser.c (c_parser_compound_statement_nostart): Call
1692 expansion_point_location_if_in_system_header.
1694 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1697 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1700 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1703 * c-tree.h (decl_constant_value_1): Add a bool argument.
1704 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1705 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1706 (decl_constant_value): Adjust caller.
1707 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1708 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1709 decl_constant_value returns initializer that has BLKmode or
1711 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1714 Alan Hayward <alan.hayward@arm.com>
1715 David Sherwood <david.sherwood@arm.com>
1717 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1718 TYPE_VECTOR_SUBPARTS.
1720 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1722 Update copyright years.
1724 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1727 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1728 c_parser_conditional_expression, c_parser_cast_expression,
1729 c_parser_sizeof_expression, c_parser_alignof_expression,
1730 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1731 c_parser_transaction_expression): Use set_error () method instead
1732 of setting value member to error_mark_node.
1734 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1736 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1737 and _Float<N>X built-in functions.
1739 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1742 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1743 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1744 incomplete vars rather than after it.
1747 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1748 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1749 and consider empty ones if there are no other stmts. For
1750 -Wunused-value walk all statements before the one only followed by
1753 2017-12-22 Mike Stump <mikestump@comcast.net>
1754 Eric Botcazou <ebotcazou@adacore.com>
1756 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1757 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1758 (c_parser_do_statement): Likewise.
1759 (c_parser_for_statement): Likewise.
1760 (c_parser_statement_after_labels): Adjust calls to above.
1761 (c_parse_pragma_ivdep): New static function.
1762 (c_parser_pragma_unroll): Likewise.
1763 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1764 <PRAGMA_UNROLL>: New case.
1766 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1768 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1769 perform_integral_promotions, digest_init): Replace Yoda conditions
1770 with typical order conditions.
1771 * c-decl.c (check_bitfield_type_and_width): Likewise.
1773 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1775 * c-typeck.c (c_safe_arg_type_equiv_p,
1776 c_safe_function_type_cast_p): New function.
1777 (build_c_cast): Implement -Wcast-function-type.
1779 2017-12-14 Richard Biener <rguenther@suse.de>
1782 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1783 like REALPART_EXPR for the behavior of whether its operand
1786 2017-12-12 Marek Polacek <polacek@redhat.com>
1789 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1791 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1793 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1794 * c-parser.c (add_debug_begin_stmt): New.
1795 (c_parser_declaration_or_fndef): Call it.
1796 (c_parser_compound_statement_nostart): Likewise.
1797 (c_parser_statement_after_labels): Likewise.
1798 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1800 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1802 * c-decl.c (build_compound_literal): Add parameter alignas_align
1803 and set alignment of decl if nonzero.
1804 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1805 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1807 (c_parser_struct_declaration): Update syntax comment.
1808 (c_parser_type_name): Add alignas_ok argument and pass it to
1810 (c_parser_cast_expression): Pass true to c_parser_type_name and
1811 give error if a cast used an _Alignas specifier.
1812 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1813 give error if sizeof (type-name) used an _Alignas specifier.
1814 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1815 give error if _Alignof (type-name) used an _Alignas specifier.
1816 (c_parser_postfix_expression_after_paren_type): Check specified
1817 alignment for a compound literal and pass it to
1818 build_compound_literal.
1819 * c-parser.h (c_parser_type_name): Update prototype.
1820 * c-tree.h (build_compound_literal): Update prototype.
1822 2017-12-07 Martin Sebor <msebor@redhat.com>
1825 * c-decl.c (c_decl_attributes): Look up existing declaration and
1826 pass it to decl_attributes.
1828 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1831 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1832 reserved for use by the implementation.
1834 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1836 * c-decl.c: Include "c-family/c-spellcheck.h".
1838 2017-12-05 Martin Liska <mliska@suse.cz>
1839 Jakub Jelinek <jakub@redhat.com>
1841 * c-typeck.c (pointer_diff): Add new argument and instrument
1842 pointer subtraction.
1843 (build_binary_op): Similar for pointer comparison.
1845 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1848 * c-parser.c: Include tree-iterator.h.
1849 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1850 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1854 * c-tree.h (decl_constant_value_1): Declare.
1855 * c-typeck.c (decl_constant_value_1): New function.
1856 (decl_constant_value): Use it.
1857 * c-fold.c (c_fully_fold_internal): If in_init, use
1858 decl_constant_value_1 instead of decl_constant_value.
1860 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1862 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1864 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1867 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1868 c_switch_covers_all_cases_p returns true.
1870 2017-11-28 Julia Koval <julia.koval@intel.com>
1871 Sebastian Peryt <sebastian.peryt@intel.com>
1873 * Make-lang.in (c/c-array-notation.o): Remove.
1874 * c-array-notation.c: Delete.
1875 * c-decl.c: Remove cilkplus condition.
1876 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1877 c_parser_cilk_verify_simd, c_parser_array_notation,
1878 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1879 c_parser_cilk_simd_fn_vector_attrs,
1880 c_finish_cilk_simd_fn_tokens): Delete.
1881 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1882 (c_parser_direct_declarator_inner): Ditto.
1883 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1884 (c_parser_attributes, c_parser_compound_statement,
1885 c_parser_statement_after_labels, c_parser_if_statement,
1886 c_parser_switch_statement, c_parser_while_statement,
1887 c_parser_do_statement, c_parser_for_statement,
1888 c_parser_unary_expression, c_parser_postfix_expression,
1889 c_parser_postfix_expression_after_primary,
1890 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1891 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1893 * c-typeck.c (build_array_ref, build_function_call_vec,
1895 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1896 c_finish_loop, build_binary_op): Remove cilkplus support.
1898 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1900 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1903 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1905 * Make-lang.in (c.install-plugin): Install backend import library.
1907 2017-11-23 Jakub Jelinek <jakub@redhat.com>
1909 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1910 pragma_stmt context.
1912 2017-11-23 Mike Stump <mikestump@comcast.net>
1913 Eric Botcazou <ebotcazou@adacore.com>
1915 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1917 (c_parser_do_statement): Likewise.
1918 (c_parser_for_statement): Likewise.
1920 2017-11-22 David Malcolm <dmalcolm@redhat.com>
1923 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1924 bool to bool *. Within '%T' handling, if showing an "aka", use
1925 "quoted" param to add appropriate quoting.
1927 2017-11-22 Marek Polacek <polacek@redhat.com>
1932 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1934 2017-11-21 David Malcolm <dmalcolm@redhat.com>
1937 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1938 earlier failed lookups.
1940 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1942 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1943 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1945 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1948 * c-decl.c: Include "c-family/known-headers.h".
1949 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1950 to known-headers.cc.
1951 (class suggest_missing_header): Move to known-header.h.
1952 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1953 than get_c_name_hint.
1955 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1957 * c-decl.c (get_c_name_hint): New function.
1958 (class suggest_missing_header): New class.
1959 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1960 suggest missing headers to the user.
1962 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1964 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1965 Include "c-family/name-hint.h"
1966 (implicit_decl_warning): Convert "hint" from
1967 const char * to name_hint. Pass location to
1968 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1969 warning was not printed.
1970 (undeclared_variable): Likewise for "guessed_id".
1971 (lookup_name_fuzzy): Convert return type from const char *
1972 to name_hint. Add location_t param.
1973 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1974 Include "c-family/name-hint.h"
1975 (c_parser_declaration_or_fndef): Convert "hint" from
1976 const char * to name_hint. Pass location to lookup_name_fuzzy.
1977 (c_parser_parameter_declaration): Likewise.
1979 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1983 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1985 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1986 handle_omp_array_sections): Likewise.
1987 (digest_init): Don't call decl_constant_value_for_optimization.
1988 * c-tree.h (decl_constant_value_for_optimization): Removed.
1989 * c-fold.c (c_fold_array_ref): New function.
1990 (c_fully_fold_internal): Add LVAL argument, propagate it through
1991 recursive calls. For VAR_P call decl_constant_value and
1992 unshare if not LVAL and either optimizing or IN_INIT. Remove
1993 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1994 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1995 (c_fully_fold): Add LVAL argument, pass it through to
1996 c_fully_fold_internal.
1997 (decl_constant_value_for_optimization): Removed.
1999 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2002 * c-parser.c (check_tgmath_function): New function.
2003 (enum tgmath_parm_kind): New enum.
2004 (c_parser_postfix_expression): Handle __builtin_tgmath.
2006 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2008 * c-decl.c (implicit_decl_warning): Update for renaming of
2009 pedwarn_at_rich_loc and warning_at_rich_loc.
2010 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2011 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2012 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2013 (c_parser_struct_or_union_specifier): Likewise for renaming of
2014 pedwarn_at_rich_loc.
2015 (c_parser_parameter_declaration): Likewise for renaming of
2017 * c-typeck.c (build_component_ref): Likewise.
2018 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2019 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2020 (set_init_label): Likewise for renaming of error_at_rich_loc.
2022 2017-10-30 Richard Biener <rguenther@suse.de>
2024 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2027 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2029 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2030 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2032 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2035 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2038 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2041 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2042 newdecl to corresponding __builtin_ if any.
2044 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2047 * c-decl.c (diagnose_mismatched_decls): Use
2048 OPT_Wbuiltin_declaration_mismatch.
2050 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2052 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2053 use it to guard calls to maybe_suggest_missing_token_insertion.
2054 (c_parser_parms_list_declarator): Override default value of new
2055 "type_is_unique" param to c_parser_require.
2056 (c_parser_asm_statement): Likewise.
2057 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2060 2017-10-11 Nathan Sidwell <nathan@acm.org>
2062 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2064 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2066 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2067 operating on trees as wide_ints.
2068 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2069 (c_tree_equal): Likewise.
2071 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2073 * c-decl.c (push_parm_decl): Store c_parm's location into the
2075 (build_c_parm): Add "loc" param and store it within the c_parm.
2076 * c-parser.c (struct c_parser): Add "last_token_location" field.
2077 (c_parser_consume_token): Store location of the token into the
2079 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2080 when handling a FUNCTION_DECL, if it doesn't already have them.
2081 (c_parser_parameter_declaration): Generate a location for the
2082 parameter, and pass it to the call to build_c_parm.
2083 * c-tree.h (struct c_parm): Add field "loc".
2084 (build_c_parm): Add location_t param.
2085 * c-typeck.c (get_fndecl_argument_location): New function.
2086 (inform_for_arg): New function.
2087 (convert_for_assignment): Use inform_for_arg when dealing with
2090 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2092 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2094 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2095 don't SET_DECL_C_BIT_FIELD here.
2098 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2099 instead of trying to set just TREE_READONLY manually.
2101 2017-09-16 Tom de Vries <tom@codesourcery.com>
2104 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2107 2017-09-15 Joseph Myers <joseph@codesourcery.com>
2110 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2112 (build_conditional_expr): For C11, generate result with excess
2113 precision when one argument is an integer and the other is of a
2114 type using excess precision.
2116 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2118 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2120 2017-09-13 Marek Polacek <polacek@redhat.com>
2123 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2124 than expr.original_type.
2126 2017-09-12 Nathan Sidwell <nathan@acm.org>
2128 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2129 resort_sorted_fields): Moved from c-family/c-common.c.
2130 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2132 2017-09-01 Joseph Myers <joseph@codesourcery.com>
2135 * c-typeck.c (build_atomic_assign): Handle argument with excess
2136 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2137 argument passed to build_binary_op and convert_for_assignment but
2138 not for call to c_fully_fold.
2139 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2140 Ensure build_binary_op is called with argument with original
2141 semantic type. Avoid calling c_fully_fold with an
2142 EXCESS_PRECISION_EXPR from build_binary_op.
2144 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2147 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2149 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2150 Alan Hayward <alan.hayward@arm.com>
2151 David Sherwood <david.sherwood@arm.com>
2153 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2154 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2155 m1 and m2 to the signed equivalent of a fixed-point
2158 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2160 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2161 than CAN_HAVE_LOCATION_P when determining whether to use the
2162 location_t value within "value".
2164 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2166 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2167 rather than peeking the location of the first token.
2168 * c-tree.h (c_expr::get_location): New method.
2170 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2172 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2173 to check_function_arguments.
2175 2017-08-18 Marek Polacek <polacek@redhat.com>
2177 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2180 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2183 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2184 (check_bitfield_type_and_width): Don't allow bit-field with
2185 warn_if_not_aligned type.
2187 2017-08-14 Martin Sebor <msebor@redhat.com>
2190 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2192 2017-08-11 Marek Polacek <polacek@redhat.com>
2195 * c-decl.c (pushtag): Only print inform if the warning was printed.
2196 (grokdeclarator): Likewise.
2198 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2200 * c-parser.c (c_parser_error): Rename to...
2201 (c_parser_error_richloc): ...this, making static, and adding
2202 "richloc" parameter, passing it to the c_parse_error call,
2203 rather than calling c_parser_set_source_position_from_token.
2204 (c_parser_error): Reintroduce, reimplementing in terms of the
2205 above, converting return type from void to bool.
2206 (class token_pair): New class.
2207 (struct matching_paren_traits): New struct.
2208 (matching_parens): New typedef.
2209 (struct matching_brace_traits): New struct.
2210 (matching_braces): New typedef.
2211 (get_matching_symbol): New function.
2212 (c_parser_require): Add param MATCHING_LOCATION, using it to
2213 highlight matching "opening" tokens for missing "closing" tokens.
2214 (c_parser_skip_until_found): Likewise.
2215 (c_parser_static_assert_declaration_no_semi): Convert explicit
2216 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2217 class matching_parens, so that the pertinent open parenthesis is
2218 highlighted when there are problems locating the close
2220 (c_parser_struct_or_union_specifier): Likewise.
2221 (c_parser_typeof_specifier): Likewise.
2222 (c_parser_alignas_specifier): Likewise.
2223 (c_parser_simple_asm_expr): Likewise.
2224 (c_parser_braced_init): Likewise, for matching_braces.
2225 (c_parser_paren_condition): Likewise, for matching_parens.
2226 (c_parser_switch_statement): Likewise.
2227 (c_parser_for_statement): Likewise.
2228 (c_parser_asm_statement): Likewise.
2229 (c_parser_asm_operands): Likewise.
2230 (c_parser_cast_expression): Likewise.
2231 (c_parser_sizeof_expression): Likewise.
2232 (c_parser_alignof_expression): Likewise.
2233 (c_parser_generic_selection): Likewise.
2234 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2235 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2236 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2237 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2238 c_parser_skip_until_found call.
2239 (c_parser_objc_class_definition): Use class matching_parens as
2241 (c_parser_objc_method_decl): Likewise.
2242 (c_parser_objc_try_catch_finally_statement): Likewise.
2243 (c_parser_objc_synchronized_statement): Likewise.
2244 (c_parser_objc_at_property_declaration): Likewise.
2245 (c_parser_oacc_wait_list): Likewise.
2246 (c_parser_omp_var_list_parens): Likewise.
2247 (c_parser_omp_clause_collapse): Likewise.
2248 (c_parser_omp_clause_default): Likewise.
2249 (c_parser_omp_clause_if): Likewise.
2250 (c_parser_omp_clause_num_threads): Likewise.
2251 (c_parser_omp_clause_num_tasks): Likewise.
2252 (c_parser_omp_clause_grainsize): Likewise.
2253 (c_parser_omp_clause_priority): Likewise.
2254 (c_parser_omp_clause_hint): Likewise.
2255 (c_parser_omp_clause_defaultmap): Likewise.
2256 (c_parser_oacc_single_int_clause): Likewise.
2257 (c_parser_omp_clause_ordered): Likewise.
2258 (c_parser_omp_clause_reduction): Likewise.
2259 (c_parser_omp_clause_schedule): Likewise.
2260 (c_parser_omp_clause_num_teams): Likewise.
2261 (c_parser_omp_clause_thread_limit): Likewise.
2262 (c_parser_omp_clause_aligned): Likewise.
2263 (c_parser_omp_clause_linear): Likewise.
2264 (c_parser_omp_clause_safelen): Likewise.
2265 (c_parser_omp_clause_simdlen): Likewise.
2266 (c_parser_omp_clause_depend): Likewise.
2267 (c_parser_omp_clause_map): Likewise.
2268 (c_parser_omp_clause_device): Likewise.
2269 (c_parser_omp_clause_dist_schedule): Likewise.
2270 (c_parser_omp_clause_proc_bind): Likewise.
2271 (c_parser_omp_clause_uniform): Likewise.
2272 (c_parser_omp_for_loop): Likewise.
2273 (c_parser_cilk_clause_vectorlength): Likewise.
2274 (c_parser_cilk_clause_linear): Likewise.
2275 (c_parser_transaction_expression): Likewise.
2276 * c-parser.h (c_parser_require): Add param matching_location with
2277 default UNKNOWN_LOCATION.
2278 (c_parser_error): Convert return type from void to bool.
2279 (c_parser_skip_until_found): Add param matching_location with
2280 default UNKNOWN_LOCATION.
2282 2017-08-09 Marek Polacek <polacek@redhat.com>
2284 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2285 * c-tree.h (build_external_ref): Update declaration.
2286 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2287 (build_external_ref): Change the type of a parameter to bool.
2288 (parser_build_binary_op): Use true/false instead of 1/0.
2289 (pointer_diff): Likewise.
2290 (build_modify_expr): Likewise.
2291 (set_designator): Change the type of a parameter to bool.
2292 (set_init_index): Use true/false instead of 1/0.
2293 (set_init_label): Likewise.
2294 (output_init_element): Change the type of a parameter to bool.
2295 (output_pending_init_elements): Use true/false instead of 1/0.
2296 (process_init_element): Likewise.
2297 (build_binary_op): Change the type of a parameter to bool.
2299 2017-08-09 Marek Polacek <polacek@redhat.com>
2302 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2303 Call emit_diagnostic_valist instead of pedwarn.
2304 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2305 Print the relevant types in diagnostics.
2307 2017-08-09 Marek Polacek <polacek@redhat.com>
2310 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2311 build_conditional_expr.
2312 * c-parser.c (c_parser_conditional_expression): Create locations for
2313 EXP1 and EXP2 from their source ranges. Pass the locations down to
2314 build_conditional_expr.
2315 * c-tree.h (build_conditional_expr): Update declaration.
2316 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2317 For -Wsign-compare, also print the types.
2319 2017-08-08 Martin Liska <mliska@suse.cz>
2321 * c-convert.c: Include header files.
2322 * c-typeck.c: Likewise.
2324 2017-08-07 Martin Liska <mliska@suse.cz>
2326 * c-parser.c (c_parser_attributes): Canonicalize name of an
2329 2017-08-02 Marek Polacek <polacek@redhat.com>
2332 * c-parser.c (c_parser_unary_expression): Use set_error.
2336 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2337 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2339 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2340 Martin Liska <mliska@suse.cz>
2342 * c-typeck.c (c_finish_goto_label): Build gimple predict
2345 2017-07-31 Martin Liska <mliska@suse.cz>
2348 * c-convert.c (convert): Guard condition with flag_sanitize_p
2349 also with current_function_decl non-null equality.
2350 * c-decl.c (grokdeclarator): Likewise.
2351 * c-typeck.c (build_binary_op): Likewise.
2353 2017-07-25 Marek Polacek <polacek@redhat.com>
2355 * c-decl.c (grokfield): Remove local variable.
2357 2017-07-25 Marek Polacek <polacek@redhat.com>
2360 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2361 macro expansion if the body is in { }.
2362 (c_parser_while_statement): Likewise.
2363 (c_parser_for_statement): Likewise.
2365 2017-07-18 Nathan Sidwell <nathan@acm.org>
2367 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2369 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2371 * c-decl.c (implicitly_declare): When suggesting a missing
2372 #include, provide a fix-it hint.
2374 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2376 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2377 and call that instead.
2378 * c-tree.h (selftest::run_c_tests): New decl.
2380 2017-06-26 Marek Polacek <polacek@redhat.com>
2383 * c-parser.c (c_parser_if_body): Set the location of the
2384 body of the conditional after parsing all the labels. Call
2385 warn_for_multistatement_macros.
2386 (c_parser_else_body): Likewise.
2387 (c_parser_switch_statement): Likewise.
2388 (c_parser_while_statement): Likewise.
2389 (c_parser_for_statement): Likewise.
2390 (c_parser_statement): Add a default argument. Save the location
2391 after labels have been parsed.
2392 (c_parser_c99_block_statement): Likewise.
2394 2017-06-19 Richard Biener <rguenther@suse.de>
2396 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2397 negated _Literals to parse _Literal (int) -1.
2399 2017-06-13 Martin Liska <mliska@suse.cz>
2402 * c-convert.c (convert): Use sanitize_flags_p.
2403 * c-decl.c (grokdeclarator): Likewise.
2404 * c-typeck.c (convert_for_assignment): Likewise.
2405 (c_finish_return): Likewise.
2406 (build_binary_op): Likewise.
2408 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2411 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2412 to sizetype before size_binop.
2414 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2416 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2419 2017-06-06 Marek Polacek <polacek@redhat.com>
2422 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2424 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2426 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2428 * c-parser.c (c_parser_binary_expression): Implement the
2429 -Wsizeof_pointer_div warning.
2430 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2431 from a parenthesized expression.
2432 (c_parser_expr_list): Use c_last_sizeof_loc.
2433 * c-tree.h (c_last_sizeof_loc): New external.
2434 * c-typeck.c (c_last_sizeof_loc): New variable.
2435 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2437 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2440 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2442 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2444 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2447 2017-05-24 Martin Sebor <msebor@redhat.com>
2450 * c-fold.c (c_fully_fold_internal): Adjust.
2451 * c-typeck.c (parser_build_unary_op): Adjust.
2453 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2455 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2456 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2459 2017-05-23 Marek Polacek <polacek@redhat.com>
2461 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2464 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2466 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2467 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2468 it returned invariant. Call tree_invariant_p unconditionally
2469 afterwards to decide whether to return expr or op0.
2471 2017-05-22 Nathan Sidwell <nathan@acm.org>
2473 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2475 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2477 * c-parser.c (c_parser_omp_clause_default): Handle
2478 "OMP_CLAUSE_DEFAULT_PRESENT".
2480 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2482 * config-lang.in (gtfiles): Add c-family/c-format.c.
2484 2017-05-18 Nathan Sidwell <nathan@acm.org>
2486 * c-decl.c (pushdecl_top_level): Delete unused function.
2488 2017-05-18 Marek Polacek <polacek@redhat.com>
2490 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2491 (check_earlier_gotos): Likewise.
2492 (define_label): Likewise.
2493 (pending_xref_error): Likewise.
2494 (smallest_type_quals_location): Likewise.
2495 (grokdeclarator): Likewise.
2496 (grokparms): Likewise.
2497 (identifier_global_value): Likewise.
2498 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2499 (find_init_member): Likewise.
2501 2017-05-18 Marek Polacek <polacek@redhat.com>
2503 * c-decl.c (start_decl): Use false/true instead of 0/1.
2504 (grokdeclarator): Likewise.
2505 (finish_struct): Likewise.
2506 (start_function): Change the return type to bool. Use false/true
2508 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2509 * c-tree.h (start_function): Update.
2510 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2511 (set_designator): Change the return type to bool. Use false/true
2514 2017-05-17 Marek Polacek <polacek@redhat.com>
2516 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2517 * c-typeck.c: Likewise.
2519 2017-05-17 Marek Polacek <polacek@redhat.com>
2522 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2523 DECL_IGNORED_P even for non-static compound literals.
2525 2017-05-17 Martin Liska <mliska@suse.cz>
2527 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2528 use it instead of int type.
2530 2017-05-17 Marek Polacek <polacek@redhat.com>
2532 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2534 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2535 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2536 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2537 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2539 (c_parser_conditional_expression): Likewise.
2540 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2541 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2542 (process_init_element): Likewise.
2543 (build_binary_op): Likewise.
2544 (handle_omp_array_sections_1): Likewise.
2546 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2548 * c-parser.c (c_parser_omp_clause_num_gangs)
2549 (c_parser_omp_clause_num_workers)
2550 (c_parser_omp_clause_vector_length): Merge functions into...
2551 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2554 2017-05-11 Nathan Sidwell <nathan@acm.org>
2556 * gimple-parser.c: Don't #include tree-dump.h.
2558 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2561 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2563 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2566 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2567 incorrect __MEM syntax.
2569 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2572 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2575 2017-05-09 Nathan Sidwell <nathan@acm.org>
2577 * c-tree.h (pushdecl): Declare.
2579 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2581 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2582 with diagnostic_report_diagnostic.
2583 * c-errors.c (pedwarn_c99): Likewise.
2584 (pedwarn_c90): Likewise.
2586 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2589 * c-gimplify.c (c_gimplify_expr): Remove calls to
2590 cilk_gimplifY_call_params_in_spawned_fn.
2592 2017-04-25 David Malcolm <dmalcolm@redhat.com>
2594 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2595 hint for removing extra semicolon.
2597 2017-04-21 Jakub Jelinek <jakub@redhat.com>
2600 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2601 enabled, set specs->type to integer_type_node.
2603 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2605 * c-array-notation.c: Fix typo in comment.
2607 2017-03-29 Marek Polacek <polacek@redhat.com>
2610 * c-decl.c (finish_decl): Check VAR_P.
2612 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2615 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2616 * c-typeck.c (c_mark_addressable): Likewise. Look through
2617 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2619 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2621 2017-03-23 Marek Polacek <polacek@redhat.com>
2623 * c-tree.h: Remove a C_RID_YYCODE reference.
2625 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2628 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2629 optional COMPOUND_EXPR with ubsan instrumentation.
2631 2017-03-17 Marek Polacek <polacek@redhat.com>
2633 * c-parser.c: Add C11 references.
2635 2017-03-15 Marek Polacek <polacek@redhat.com>
2637 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2639 2017-03-11 Marek Polacek <polacek@redhat.com>
2641 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2643 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2645 PR translation/79848
2646 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2648 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2650 2017-03-09 Marek Polacek <polacek@redhat.com>
2653 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2654 parameter declarations with initializers.
2656 2017-03-09 Jakub Jelinek <jakub@redhat.com>
2659 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2662 2017-03-07 Jakub Jelinek <jakub@redhat.com>
2665 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2666 for "may only be used in compound statements" diagnostics, change it
2667 such that the same translatable string is used for all pragmas. For
2668 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2670 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2671 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2672 "may only be used in compound statements" diagnostics, such that the
2673 same translatable string is used for all pragmas.
2675 2017-03-04 Marek Polacek <polacek@redhat.com>
2678 * c-decl.c (implicit_decl_warning): Add missing space.
2680 2017-03-03 Marek Polacek <polacek@redhat.com>
2683 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2684 current_function_prototype_arg_types is error_mark_node. Fix
2685 formatting. Use TREE_VALUE instead of TREE_TYPE.
2687 2017-03-03 Jakub Jelinek <jakub@redhat.com>
2690 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2691 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2692 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2696 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2697 instead of %<_Generic>.
2698 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2699 (c_parser_omp_target_exit_data): Use %<release%> instead of
2702 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2704 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2705 instead of just cond ? "..." : "...".
2706 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2707 for "enter"/"exit" keyword.
2708 (c_finish_oacc_routine): Don't use %s to supply portions of the
2711 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2714 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2715 handle -Wrestrict here.
2716 * c-typeck.c (build_function_call_vec): Adjust
2717 check_function_arguments caller.
2719 2017-02-23 Richard Biener <rguenther@suse.de>
2722 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2723 to initialize c_exprs to return.
2724 (c_parser_gimple_binary_expression): Likewise.
2725 (c_parser_gimple_unary_expression): Likewise.
2726 (c_parser_gimple_postfix_expression): Likewise.
2728 2017-02-22 Marek Polacek <polacek@redhat.com>
2731 * c-typeck.c (convert_arguments): Handle error_mark_node.
2733 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2735 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2736 value of c_parser_parse_ssa_name against error_mark_node and emit
2737 error if ssa name is anonymous and written as default definition.
2739 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2741 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2744 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2747 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2748 ignore #pragma omp target even when not followed by identifier.
2750 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2752 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2753 (c_parser_gimple_unary_expression): Likewise.
2755 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2757 * c-parser.c (c_parser_oacc_declare): Add missing space in
2760 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2763 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2764 set_c_expr_source_range when parsing ssa-name.
2766 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2767 Richard Biener <rguenther@suse.de>
2769 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2770 building IL when arguments are error_mark_node.
2771 (c_parser_gimple_unary_expression): Likewise.
2772 (c_parser_gimple_if_stmt): Likewise.
2773 (c_parser_gimple_switch_stmt): Likewise.
2774 (c_parser_gimple_return_stmt): Likewise.
2775 (c_parser_parse_ssa_name): When name lookup fails do not build
2776 an SSA name. Use undeclared rather than not declared in error
2779 2017-02-09 Marek Polacek <polacek@redhat.com>
2782 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2783 instead of c_parser_skip_until_found.
2785 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2788 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2789 symtab_node::get on automatic variables.
2791 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2792 Chung-Lin Tang <cltang@codesourcery.com>
2794 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2795 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2797 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2799 2017-02-07 Richard Biener <rguenther@suse.de>
2801 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2802 (c_parser_gimple_postfix_expression_after_primary):
2803 Do not use c_build_function_call_vec to avoid folding and promotion.
2806 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2809 * c-decl.c (pop_scope): Pass main_input_filename to
2810 build_translation_unit_decl.
2812 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2814 * c-parser.c: Include "read-rtl-function.h" and
2816 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2817 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2818 production. Update for renaming of field "gimple_pass" to
2819 "gimple_or_rtl_pass". If __RTL was seen, call
2820 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2821 to an auto_timevar, to cope with early exit.
2822 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2823 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2824 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2826 (c_parser_parse_rtl_body): New function.
2827 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2828 (struct c_declspecs): Rename field "gimple_pass" to
2829 "gimple_or_rtl_pass". Add field "rtl_p".
2830 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2831 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2832 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2833 (c_parser_gimple_or_rtl_pass_list): ...this.
2835 2017-01-20 Marek Polacek <polacek@redhat.com>
2838 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2840 2017-01-13 Richard Biener <rguenther@suse.de>
2842 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2845 2017-01-13 Richard Biener <rguenther@suse.de>
2847 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2848 _Literal ( type-name ) number.
2850 2017-01-12 Richard Biener <rguenther@suse.de>
2852 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2855 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2858 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2861 2017-01-11 Richard Biener <rguenther@suse.de>
2864 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2865 returns on parse errors.
2867 2017-01-04 Marek Polacek <polacek@redhat.com>
2870 * c-parser.c (c_parser_postfix_expression): Mark zero character
2871 constants by setting original_type in c_expr.
2872 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2873 with a zero character constant.
2874 (char_type_p): New function.
2876 2017-01-04 David Malcolm <dmalcolm@redhat.com>
2878 * c-parser.c (c_parser_declaration_or_fndef): Create a
2879 rich_location at init_loc and parse it to start_init.
2880 (last_init_list_comma): New global.
2881 (c_parser_braced_init): Update last_init_list_comma when parsing
2882 commas. Pass it to pop_init_level. Pass location of closing
2883 brace to pop_init_level.
2884 (c_parser_postfix_expression_after_paren_type): Create a
2885 rich_location at type_loc and parse it to start_init.
2886 (c_parser_omp_declare_reduction): Likewise for loc.
2887 * c-tree.h (start_init): Add rich_location * param.
2888 (pop_init_level): Add location_t param.
2889 * c-typeck.c (struct initializer_stack): Add field
2890 "missing_brace_richloc".
2891 (start_init): Add richloc param, use it to initialize
2892 the stack node's missing_brace_richloc.
2893 (last_init_list_comma): New decl.
2894 (finish_implicit_inits): Pass last_init_list_comma to
2896 (push_init_level): When finding missing open braces, add fix-it
2897 hints to the richloc.
2898 (pop_init_level): Add "insert_before" param and pass it
2899 when calling pop_init_level. Add fixits about missing
2900 close braces to any richloc. Use the richloc for the
2901 -Wmissing-braces warning.
2902 (set_designator): Pass last_init_list_comma to pop_init_level.
2903 (process_init_element): Likewise.
2905 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2907 Update copyright years.
2909 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2912 * c-typeck.c (build_function_call_vec): If check_function_arguments
2913 returns true, set TREE_NO_WARNING on CALL_EXPR.
2916 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2917 to *expr instead of overwriting it.
2919 2016-12-20 Richard Biener <rguenther@suse.de>
2921 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2923 (c_parser_gimple_statement): Only build assigns for non-error
2925 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2927 2016-12-14 Martin Jambor <mjambor@suse.cz>
2929 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2931 (c_finish_oacc_routine): Adjusted call to
2932 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2933 to use their new names.
2934 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2936 (c_parser_oacc_update): Likewise.
2937 (c_parser_omp_simd): Likewise.
2938 (c_parser_omp_target_update): Likewise.
2939 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2940 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2942 (c_finish_omp_cancellation_point): Likewise.
2943 * gimple-parser.c: Do not include omp-low.h
2945 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2946 James Norris <jnorris@codesourcery.com>
2948 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2949 EXIT_DATA,WAIT} are not used in compound statements.
2950 (c_parser_oacc_enter_exit_data): Update diagnostics.
2952 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2955 * c-decl.c (diagnose_mismatched_decls): Use
2956 OPT_Wbuiltin_declaration_mismatch here too.
2958 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
2959 Alan Hayward <alan.hayward@arm.com>
2960 David Sherwood <david.sherwood@arm.com>
2962 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2963 (make_label, finish_struct): Likewise.
2965 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2966 Richard Biener <rguenther@suse.de>
2968 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2969 * config-lang.in (gtfiles): Add c/c-parser.h.
2970 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2971 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2972 * c-parser.c (enum c_id_kind, struct c_token,
2973 c_parser_next_token_is, c_parser_next_token_is_not,
2974 c_parser_next_token_is_keyword,
2975 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2977 * c-parser.h: ... new header.
2978 * c-parser.c: Include c-parser.h and gimple-parser.h.
2979 (c_parser_peek_token, c_parser_peek_2nd_token,
2980 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2981 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2982 c_parser_error, c_parser_require, c_parser_skip_until_found,
2983 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2984 c_parser_type_name): Export.
2985 (c_parser_tokens_buf): New function.
2986 (c_parser_error): Likewise.
2987 (c_parser_set_error): Likewise.
2988 (c_parser_declspecs): Handle RID_GIMPLE.
2989 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2990 via c_parser_parse_gimple_body.
2991 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2992 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2993 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2994 c_parser_error, c_parser_require, c_parser_skip_until_found,
2995 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2996 c_parser_type_name): Declare.
2997 (struct c_parser): Declare forward.
2998 (c_parser_tokens_buf): Declare.
2999 (c_parser_error): Likewise.
3000 (c_parser_set_error): Likewise.
3001 * gimple-parser.c: New file.
3002 * gimple-parser.h: Likewise.
3004 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3007 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3010 2016-09-11 Le-Chun Wu <lcwu@google.com>
3011 Mark Wielaard <mjw@redhat.com>
3013 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3014 to the given -Wshadow= variant.
3016 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3018 * c-typeck.c: Include memmodel.h.
3020 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3023 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3024 instead of lhd_return_null_tree_v.
3026 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3029 * c-decl.c (smallest_type_quals_location): New static function.
3030 (grokdeclarator): Try to find the correct location for an ignored
3033 2016-09-26 Marek Polacek <polacek@redhat.com>
3036 * c-decl.c (pop_scope): Add gcc_fallthrough.
3038 2016-09-26 Marek Polacek <polacek@redhat.com>
3041 * c-parser.c (struct c_token): Add flags field.
3042 (c_lex_one_token): Pass it to c_lex_with_flags.
3043 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3044 into IFN_FALLTHROUGH.
3045 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3046 attribute fallthrough after a case label or default label.
3047 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3049 2016-09-24 Marek Polacek <polacek@redhat.com>
3052 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3053 have boolean value. Warn about ++/-- on booleans.
3055 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3057 * c-parser.c (incomplete_record_decls): Remove unnecessary
3058 = vNULL initialization of file scope vec.
3060 2016-09-16 Marek Polacek <polacek@redhat.com>
3062 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3064 2016-09-14 Marek Polacek <polacek@redhat.com>
3066 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3067 (fix_array_notation_expr): Likewise.
3068 * c-decl.c (finish_decl): Likewise.
3069 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3070 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3071 (function_to_pointer_conversion): Use false instead of 0.
3072 (convert_lvalue_to_rvalue): Likewise.
3073 (parser_build_unary_op): Likewise.
3074 (build_atomic_assign): Likewise.
3075 (build_unary_op): Change nonconvert parameter type to bool, use
3076 true/false instead of 1/0.
3077 (build_binary_op): Use true instead of 1.
3079 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3081 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3082 of add_fixit_insert to add_fixit_insert_before.
3084 2016-09-13 Marek Polacek <polacek@redhat.com>
3086 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3089 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3092 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3093 COMPOUND_EXPR to warn_for_omitted_condop.
3095 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3097 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3098 c_get_substring_location for this new langhook.
3100 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3103 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3105 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3106 instead of mark_exp_read on low_bound/length expression.
3107 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3108 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3109 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3110 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3111 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3112 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3113 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3114 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3115 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3116 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3117 instead of mark_expr_read.
3118 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3119 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3120 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3121 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3122 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3123 array section bases outside of depend clause, for depend clause
3124 use convert_lvalue_to_rvalue on the base.
3125 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3126 linear, aligned, map, to and from clauses.
3127 (c_omp_clause_copy_ctor): New function.
3129 2016-09-01 Marek Polacek <polacek@redhat.com>
3132 * c-typeck.c (composite_type): Add FALLTHRU comment.
3134 2016-08-31 David Malcolm <dmalcolm@redhat.com>
3136 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3137 to the insertion fixits for "struct", "union", and "enum".
3139 2016-08-30 David Malcolm <dmalcolm@redhat.com>
3141 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3142 rather than add_fixit_misspelled_id.
3143 (undeclared_variable): Likewise.
3144 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3145 now-redundant "here" params from add_fixit_insert method calls.
3146 (c_parser_parameter_declaration): Likewise.
3147 * c-typeck.c (build_component_ref): Remove now-redundant range
3148 param from add_fixit_replace method calls.
3150 2016-08-25 Marek Polacek <polacek@redhat.com>
3152 * c-typeck.c (parser_build_binary_op): Pass LHS to
3153 warn_logical_not_parentheses.
3155 2016-08-25 Marek Polacek <polacek@redhat.com>
3158 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3159 or _FloatN or _FloatNx is not supported.
3160 (finish_declspecs): Set type to integer_type_node when _FloatN or
3161 _FloatNx is not supported.
3163 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3166 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3167 (struct c_declspecs): Add field floatn_nx_idx.
3168 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3169 and _FloatNx type specifiers.
3170 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3171 (c_parser_declspecs, c_parser_attribute_any_word)
3172 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3173 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3174 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3175 narrower than double.
3177 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3178 Martin Liska <mliska@suse.cz>
3181 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3182 % to determine val element to change. Assert that
3183 wchar_bytes * charwidth fits into val array.
3185 2016-08-12 Marek Polacek <polacek@redhat.com>
3188 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3189 (c_parser_postfix_expression): Likewise.
3190 * c-typeck.c (build_unary_op): Adjust fall through comment.
3191 (c_mark_addressable): Likewise.
3193 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3196 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3197 array member through typedef, for orig_qual_indirect == 0 clear
3200 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3203 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3204 this up to selftest::run_c_tests.
3205 (selftest::run_c_tests): New function.
3207 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3209 * c-parser.c (struct oacc_routine_data): Add error_seen and
3210 fndecl_seen members.
3211 (c_finish_oacc_routine): Use these.
3212 (c_parser_declaration_or_fndef): Adjust.
3213 (c_parser_oacc_routine): Likewise. Support more C language
3214 constructs, and improve diagnostics. Move pragma context
3216 (c_parser_pragma): ... here.
3218 * c-parser.c (struct oacc_routine_data): New.
3219 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3221 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3222 declare target" attribute.
3224 2016-08-01 Jan Beulich <jbeulich@suse.com>
3226 * c-fold.c (c_fully_fold_internal): Also emit shift count
3227 warnings for vector types.
3228 * c-typeck.c (build_binary_op): Likewise.
3230 2016-07-29 Marek Polacek <polacek@redhat.com>
3233 * c-decl.c (finish_struct): Rephrase an error message.
3236 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3237 to error node for invalid code.
3240 * c-decl.c (implicitly_declare): Return decl early not only for
3241 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3243 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3246 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3247 on GNU extern inline functions.
3249 2016-07-29 Marek Polacek <polacek@redhat.com>
3252 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3255 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3257 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3259 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3261 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3263 (best_macro_match): Likewise, converting from a typedef to a
3265 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3266 (lookup_name_fuzzy): Update for change of best_macro_match to a
3267 subclass with a ctor that calls cpp_forall_identifiers.
3269 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3271 * c-decl.c (implicit_decl_warning): Update for conversion of
3272 return type of lookup_name_fuzzy to const char *.
3273 (undeclared_variable): Likewise.
3274 (lookup_name_fuzzy): Convert return type from tree to
3276 * c-parser.c (c_parser_declaration_or_fndef): Update for
3277 conversion of return type of lookup_name_fuzzy to const char *.
3278 (c_parser_parameter_declaration): Likewise.
3280 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3282 * c-parser.c (c_parser_oacc_declare): Don't scan for
3284 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3285 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3286 zero-length subarrays.
3288 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3291 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3292 instead of FUZZY_LOOKUP_NAME.
3293 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3294 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3296 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3299 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3301 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3303 * c-parser.c (c_parser_generic_selection): Make type of variable
3305 (c_parser_omp_declare_simd): Likewise.
3307 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3309 * c-decl.c (struct c_struct_parse_info): Change member types
3310 from vec to auto_vec.
3311 (start_struct): Adjust.
3312 (finish_struct): Likewise.
3314 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3317 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3319 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3321 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3322 Move pragma context checking into...
3323 (c_parser_omp_cancellation_point): ... here, and improve
3324 diagnostic messages.
3325 * c-typeck.c (c_finish_omp_cancel)
3326 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3328 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3331 * c-typeck.c (c_build_qualified_type): Don't clear
3332 C_TYPE_INCOMPLETE_VARS for the main variant.
3334 2016-06-28 Martin Sebor <msebor@redhat.com>
3337 * c-typeck.c (output_init_element): Diagnose incompatible types
3338 before non-constant initializers.
3340 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3342 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3344 2016-06-23 Andi Kleen <ak@linux.intel.com>
3346 * Make-lang.in: Add support for autofdo.
3348 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3351 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3352 (implicit_decl_warning): When issuing warnings for implicit
3353 declarations, attempt to provide a suggestion via
3355 (undeclared_variable): Likewise when issuing errors.
3356 (lookup_name_in_scope): Likewise.
3357 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3358 (best_macro_match): New typedef.
3359 (find_closest_macro_cpp_cb): New function.
3360 (lookup_name_fuzzy): New function.
3361 * c-parser.c: Include gcc-rich-location.h.
3362 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3363 (c_keyword_starts_typename): ...this new function.
3364 (c_parser_declaration_or_fndef): When issuing errors about
3365 missing "struct" etc, add a fixit. For other kinds of errors,
3366 attempt to provide a suggestion via lookup_name_fuzzy.
3367 (c_parser_parms_declarator): When looking ahead to detect typos in
3368 type names, also reject CPP_KEYWORD.
3369 (c_parser_parameter_declaration): When issuing errors about
3370 unknown type names, attempt to provide a suggestion via
3372 * c-tree.h (c_keyword_starts_typename): New prototype.
3374 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3377 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3378 c_common_type returns error_mark_node.
3380 2016-06-19 Martin Sebor <msebor@redhat.com>
3383 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3384 __alignof__ (expression).
3386 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3388 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3390 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3392 * c-typeck.c (build_component_ref): Simplify fixit code by
3393 using gcc_rich_location::add_fixit_misspelled_id.
3394 (set_init_label): Likewise.
3396 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3398 * c-parser.c (c_parser_initelt): Provide location of name for new
3399 location_t param of set_init_label.
3400 * c-tree.h (set_init_label): Add location_t param.
3401 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3402 param and use it when issuing error messages about unrecognized
3403 field names. Attempt to provide a fixit hint if appropriate,
3404 otherwise update the error message to provide the type name.
3406 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3409 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3412 2016-06-08 Martin Sebor <msebor@redhat.com>
3413 Jakub Jelinek <jakub@redhat.com>
3417 * c-typeck.c (convert_arguments): Don't promote last argument
3418 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3420 2016-06-08 Marek Polacek <polacek@redhat.com>
3423 * c-decl.c (grokdeclarator): Check TYPE_P.
3426 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3429 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3431 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3432 and structure element reference, capture the location of the
3433 element name token and pass it to build_component_ref.
3434 (c_parser_postfix_expression_after_primary): Likewise for
3435 structure element dereference.
3436 (c_parser_omp_variable_list): Likewise for
3437 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3438 * c-tree.h (build_component_ref): Add location_t param.
3439 * c-typeck.c (build_component_ref): Add location_t param
3440 COMPONENT_LOC. Use it, if available, when issuing hints about
3441 mispelled member names to provide a fixit replacement hint.
3443 2016-06-06 Marek Polacek <polacek@redhat.com>
3446 * c-parser.c (c_parser_direct_declarator): Set location.
3448 2016-06-06 Marek Polacek <polacek@redhat.com>
3450 * c-typeck.c (comptypes_internal): Handle comparisons of
3451 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3452 TYPE_REF_CAN_ALIAS_ALL.
3454 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3456 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3457 arguments as addressable when async clause exists.
3459 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3462 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3463 when combined with target construct.
3465 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3467 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3468 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3470 2016-05-25 Marek Polacek <polacek@redhat.com>
3473 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3476 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3478 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3480 * c-parser.c (c_parser_oacc_declare): Add support for
3481 GOMP_MAP_FIRSTPRIVATE_POINTER.
3482 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3483 argument with enum c_omp_region_type ort.
3484 (handle_omp_array_sections): Likewise. Update call to
3485 handle_omp_array_sections_1.
3486 (c_finish_omp_clauses): Add specific errors and warning messages for
3487 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3488 call to handle_omp_array_sections.
3490 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3492 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3494 2016-05-24 Richard Biener <rguenther@suse.de>
3498 * c-typeck.c (build_array_ref): Do not complain about indexing
3499 non-lvalue vectors. Adjust for function name change.
3501 2016-05-20 Martin Sebor <msebor@redhat.com>
3504 * c-typeck.c (error_init): Use
3505 expansion_point_location_if_in_system_header.
3506 (warning_init): Same.
3508 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3511 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3513 (c_parser_postfix_expression): Likewise.
3514 * c-tree.h (c_expr::set_error): New method.
3515 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3516 that result's range is initialized.
3518 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3520 * c-typeck.c (parser_build_unary_op): Fix formatting.
3522 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3524 * c-decl.c (grokdeclarator): Remove errmsg and use of
3525 targetm.invalid_return_type.
3526 (grokparms): Remove errmsg and use of
3527 targetm.invalid_parameter_type.
3529 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3531 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3532 function return type.
3534 2016-05-12 Marek Polacek <polacek@redhat.com>
3537 * c-decl.c (build_compound_literal): Pass LOC down to
3538 c_incomplete_type_error.
3539 * c-tree.h (require_complete_type): Adjust declaration.
3540 (c_incomplete_type_error): Likewise.
3541 * c-typeck.c (require_complete_type): Add location parameter, pass it
3542 down to c_incomplete_type_error.
3543 (c_incomplete_type_error): Add location parameter, pass it down to
3545 (build_component_ref): Pass location down to c_incomplete_type_error.
3546 (default_conversion): Pass location down to require_complete_type.
3547 (build_array_ref): Likewise.
3548 (build_function_call_vec): Likewise.
3549 (convert_arguments): Likewise.
3550 (build_unary_op): Likewise.
3551 (build_c_cast): Likewise.
3552 (build_modify_expr): Likewise.
3553 (convert_for_assignment): Likewise.
3554 (c_finish_omp_clauses): Likewise.
3556 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3559 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3561 * c-errors.c (pedwarn_c90): Return true if warned.
3562 * c-tree.h (pedwarn_c90): Change return type to bool.
3563 (enum c_declspec_word): Add new enumerator cdw_atomic.
3565 2016-05-11 Marek Polacek <polacek@redhat.com>
3568 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3569 diagnose_mismatched_attributes and call it.
3571 2016-05-10 Marek Polacek <polacek@redhat.com>
3574 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3575 on a declaration following the definition.
3577 2016-05-05 Jakub Jelinek <jakub@redhat.com>
3579 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3580 parse it through to c_parser_c99_block_statement.
3581 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3584 2016-05-04 Marek Polacek <polacek@redhat.com>
3586 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3589 2016-05-04 Marek Polacek <polacek@redhat.com>
3592 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3593 for macro expansions.
3595 2016-05-03 Marek Polacek <polacek@redhat.com>
3598 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3599 check_builtin_function_arguments.
3601 2016-05-03 Richard Biener <rguenther@suse.de>
3603 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3604 the checksum from the previous stage.
3606 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3608 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3609 c_finish_omp_clauses.
3610 (c_parser_omp_all_clauses): Likewise.
3611 (c_parser_oacc_cache): Likewise.
3612 (c_parser_oacc_loop): Likewise.
3613 (omp_split_clauses): Likewise.
3614 (c_parser_omp_declare_target): Likewise.
3615 (c_parser_cilk_all_clauses): Likewise.
3616 (c_parser_cilk_for): Likewise.
3617 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3618 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3620 2016-05-02 Marek Polacek <polacek@redhat.com>
3623 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3626 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3629 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3630 OACC_LOOP_CLAUSE_MASK.
3631 (c_parser_oacc_kernels_parallel): Update call to
3632 c_oacc_split_loop_clauses.
3634 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3636 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3637 argument to build_modify_expr in two cases.
3639 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3641 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3642 warn_for_memset instead of warning directly here.
3644 2016-04-26 Marek Polacek <polacek@redhat.com>
3647 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3649 (c_parser_for_statement): ... here.
3650 (c_parser_if_statement): Use it.
3651 (c_parser_switch_statement): Use it.
3652 (c_parser_while_statement): Use it.
3655 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3657 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3660 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3661 instead of c_finish_cilk_clauses.
3662 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3663 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3664 floating-point variables in the linear clause for Cilk Plus.
3666 2016-04-18 Michael Matz <matz@suse.de>
3668 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3669 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3671 2016-04-15 Marek Polacek <polacek@redhat.com>
3674 * c-typeck.c (build_unary_op): Pass location down to error and
3677 2016-04-15 Jakub Jelinek <jakub@redhat.com>
3680 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3682 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3683 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3684 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3685 Adjust c_parser_pragma callers.
3686 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3688 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3690 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3691 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3692 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3693 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3694 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3695 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3696 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3697 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3699 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3700 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3703 2016-04-13 Marek Polacek <polacek@redhat.com>
3706 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3708 (c_parser_statement): Likewise.
3709 (c_parser_c99_block_statement): Likewise.
3710 (c_parser_while_statement): Likewise.
3711 (c_parser_for_statement): Likewise.
3712 (c_parser_if_body): Don't set IF_P here.
3713 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3714 about dangling else here.
3715 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3716 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3717 warn about dangling else here.
3719 2016-04-04 Marek Polacek <polacek@redhat.com>
3722 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3724 2016-03-31 Marek Polacek <polacek@redhat.com>
3727 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3729 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3732 * c-parser.c (c_parser_postfix_expression): Set the source range
3733 for uses of "__builtin_types_compatible_p".
3735 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3738 * c-typeck.c (composite_type): Don't count void_list_node
3739 into len, if the list is terminated by void_list_node, start
3740 with void_list_node instead of NULL for newargs. Stop
3743 2016-03-16 Marek Polacek <polacek@redhat.com>
3746 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3747 nested functions returning VM types.
3749 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3751 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3752 when calling c_finish_omp_clauses.
3754 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3757 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3760 2016-03-04 Marek Polacek <polacek@redhat.com>
3763 * c-parser.c (c_parser_postfix_expression): Call
3764 c_parser_cast_expression rather than c_parser_postfix_expression.
3766 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3770 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3771 of incomplete decls to error_mark_node.
3773 2016-02-24 Marek Polacek <polacek@redhat.com>
3776 * c-decl.c (finish_decl): Don't update the copy of the type of a
3777 different decl type.
3779 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3782 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3783 in id_kind reclassification.
3785 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3788 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3790 2016-02-16 James Norris <jnorris@codesourcery.com>
3793 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3795 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3797 * c-decl.c (build_null_declspecs): Zero the entire struct.
3800 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3801 callers changed. If nested_p is true, use it to call
3802 finish_implicit_inits.
3803 * c-tree.h (finish_implicit_inits): Declare.
3804 * c-typeck.c (finish_implicit_inits): New function. Move code
3806 (push_init_level): ... here.
3807 (set_designator, process_init_element): Call finish_implicit_inits.
3809 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3812 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3813 arguments for -Waddress warning.
3815 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3818 * c-decl.c (finish_enum): When honoring mode attribute,
3819 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3821 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3824 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3825 all type variants, not just TYPE_MAIN_VARIANT.
3827 2016-01-27 Jakub Jelinek <jakub@redhat.com>
3830 * c-decl.c (c_write_global_declarations_1): Warn with
3831 warn_unused_function if static prototype without definition
3834 2016-01-27 Marek Polacek <polacek@redhat.com>
3837 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3838 to unsigned, if needed. Add -Wsign-compare warning.
3840 2016-01-26 Jakub Jelinek <jakub@redhat.com>
3842 PR tree-optimization/69483
3843 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3845 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3848 * c-tree.h (incomplete_record_decls): Declare.
3849 * c-parser.c (incomplete_record_decls): Define.
3850 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3851 report error if any decl has zero size.
3852 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3853 or enum type to incomplete_record_decls.
3855 2016-01-14 Tom de Vries <tom@codesourcery.com>
3857 PR tree-optimization/68773
3858 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3861 2016-01-14 Marek Polacek <polacek@redhat.com>
3864 * c-decl.c (grokdeclarator): Provide more information for invalid
3867 2016-01-06 David Malcolm <dmalcolm@redhat.com>
3869 * c-parser.c (c_parser_unary_expression): For dereferences, build
3870 a combined location before calling build_indirect_ref, so that
3871 error reports cover the full range, manually updating the c_expr
3874 2016-01-06 Marek Polacek <polacek@redhat.com>
3877 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3878 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3881 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3883 Update copyright years.
3885 2016-01-04 Marek Polacek <polacek@redhat.com>
3888 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3889 optimization to use __atomic_fetch_* built-in if possible.
3891 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3893 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3895 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3898 2015-12-22 Marek Polacek <polacek@redhat.com>
3901 * c-typeck.c (build_component_ref): Warn when acessing elements of
3902 atomic structures or unions.
3904 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3906 * c-typeck.c: Include "gcc-rich-location.h".
3907 (build_binary_op): In the two places that call binary_op_error,
3908 create a gcc_rich_location and populate it with the location of
3909 the binary op and its two operands.
3911 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3913 * c-parser.c (c_parser_statement_after_labels): When calling
3914 c_finish_return, Use the return expression's location if it has
3915 one, falling back to the location of the first token within it.
3916 * c-typeck.c (c_finish_return): When issuing warnings about
3917 the incorrect presence/absence of a return value, issue a note
3918 showing the declaration of the function.
3920 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3922 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3924 (c_parser_peek_nth_token): New function.
3925 (c_parser_peek_conflict_marker): New function.
3926 (c_parser_error): Detect conflict markers and report them as such.
3928 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3930 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3931 to preserve range information for the primary expression
3932 in the call to c_parser_postfix_expression_after_primary.
3934 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3936 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3937 expression location, falling back on the first token location,
3938 rather than always using the latter.
3940 2015-12-16 Marek Polacek <polacek@redhat.com>
3943 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3946 2015-12-15 Marek Polacek <polacek@redhat.com>
3949 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3952 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3954 * c-parser.c (c_parser_alignof_expression): Capture location of
3955 closing parenthesis (if any), or of end of unary expression, and
3956 use it to build a src_range for the expression.
3958 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3961 * c-parser.c (c_parser_get_builtin_args): Add
3962 "out_close_paren_loc" param, and write back to it.
3963 (c_parser_postfix_expression): Capture the closing
3964 parenthesis location for RID_CHOOSE_EXPR,
3965 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3966 RID_BUILTIN_SHUFFLE and use it to set the source range
3967 for such expressions; within RID_BUILTIN_COMPLEX set
3968 the underlying location.
3970 2015-12-07 Marek Polacek <polacek@redhat.com>
3973 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3974 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3976 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3978 * c-tree.h (c_build_va_arg): Adjust prototype.
3979 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3980 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3981 parameter, adjust throughout and issue an error if EXPR is a component
3982 with reverse storage order.
3984 2015-12-02 Jason Merrill <jason@redhat.com>
3986 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3987 (c_fully_fold_internal, decl_constant_value_for_optimization):
3988 Move from c-common.c.
3989 * c-tree.h: Declare decl_constant_value_for_optimization.
3990 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3992 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3995 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3996 following link from declarator to next declarator. Track original
3997 qualified type and pass it to c_build_qualified_type.
3998 * c-typeck.c (c_build_qualified_type): Add arguments
3999 orig_qual_type and orig_qual_indirect.
4001 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4003 * c-parser.c (c_parser_omp_clause_name)
4004 (c_parser_oacc_all_clauses): Alphabetical sorting.
4006 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4009 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4012 2015-12-01 Julian Brown <julian@codesourcery.com>
4013 Cesar Philippidis <cesar@codesourcery.com>
4014 James Norris <James_Norris@mentor.com>
4016 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4017 (c_parser_oacc_clause_use_device): New function.
4018 (c_parser_oacc_all_clauses): Add use_device support.
4019 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4020 (c_parser_oacc_host_data): New function.
4021 (c_parser_omp_construct): Add host_data support.
4022 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4023 * c-typeck.c (c_finish_oacc_host_data): New function.
4024 (c_finish_omp_clauses): Add use_device support.
4026 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4029 * c-decl.c: Set TYPE_PACKED in variants.
4031 2015-11-27 Martin Liska <mliska@suse.cz>
4034 * c-array-notation.c (fix_builtin_array_notation_fn):
4035 Use release_vec_vec instead of vec::release.
4036 (build_array_notation_expr): Likewise.
4037 (fix_conditional_array_notations_1): Likewise.
4038 (fix_array_notation_expr): Likewise.
4039 (fix_array_notation_call_expr): Likewise.
4041 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4044 * c-parser.c (c_parser_compound_statement_nostart): If
4045 last_label is true, use pragma_stmt instead of pragma_compound
4046 as second c_parser_pragma argument.
4047 (c_parser_omp_ordered, c_parser_omp_target_update,
4048 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4049 false as second argument to c_parser_skip_to_pragma_eol after
4050 diagnosing standalone directives used in pragma_stmt context.
4052 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4054 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4055 with "if (ENABLE_OFFLOADING)".
4057 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4060 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4061 for various Objective-C constructs: Class.name syntax,
4062 @selector(), @protocol(), @encode(), and [] message syntax.
4064 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4067 * c-typeck.c (should_suggest_deref_p): New function.
4068 (build_component_ref): Special-case POINTER_TYPE when
4069 generating a "not a structure of union" error message, and
4070 suggest a "->" rather than a ".", providing a fix-it hint.
4072 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4074 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4075 candidate into a new function, find_closest_identifier.
4077 2015-11-19 Marek Polacek <polacek@redhat.com>
4080 * c-typeck.c (parser_build_binary_op): Properly handle
4081 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4083 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4085 * c-parser.c (set_c_expr_source_range): Bulletproof both
4086 overloaded implementations against NULL expr->value.
4087 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4089 (c_parser_unary_expression): Likewise when handling addresses of
4091 (c_parser_postfix_expression): Likewise for statement expressions,
4092 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4093 __builtin_va_arg, and for __builtin_offset_of.
4094 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4095 src_range using the range of the braced initializer.
4096 (c_parser_transaction_expression): Set src_range for "ret" to a
4097 sane pair of values.
4099 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4101 * c-parser.c (c_finish_omp_declare_simd): Look for
4102 "simd" attribute as well. Update error message.
4104 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4106 * c-parser.c (c_parser_omp_declare_target): Adjust.
4108 2015-11-14 Jakub Jelinek <jakub@redhat.com>
4110 * c-typeck.c (c_finish_omp_clauses): Don't mark
4111 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4113 2015-11-14 Marek Polacek <polacek@redhat.com>
4115 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4116 * c-typeck.c: Likewise.
4118 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4120 * c-decl.c (warn_defaults_to): Pass line_table to
4122 * c-errors.c (pedwarn_c99): Likewise.
4123 (pedwarn_c90): Likewise.
4124 * c-parser.c (set_c_expr_source_range): New functions.
4125 (c_token::get_range): New method.
4126 (c_token::get_finish): New method.
4127 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4128 based on the range from the start of the LHS to the end of the
4130 (c_parser_conditional_expression): Likewise, based on the range
4131 from the start of the cond.value to the end of exp2.value.
4132 (c_parser_binary_expression): Call set_c_expr_source_range on
4133 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4134 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4135 based on the cast_loc through to the end of the expr.
4136 (c_parser_unary_expression): Likewise, based on the
4137 op_loc through to the end of op.
4138 (c_parser_sizeof_expression) Likewise, based on the start of the
4139 sizeof token through to either the closing paren or the end of
4141 (c_parser_postfix_expression): Likewise, using the token range,
4142 or from the open paren through to the close paren for
4143 parenthesized expressions.
4144 (c_parser_postfix_expression_after_primary): Likewise, for
4145 various kinds of expression.
4146 * c-tree.h (struct c_expr): Add field "src_range".
4147 (c_expr::get_start): New method.
4148 (c_expr::get_finish): New method.
4149 (set_c_expr_source_range): New decls.
4150 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4151 on ret for prefix unary ops.
4152 (parser_build_binary_op): Likewise, running from the start of
4153 arg1.value through to the end of arg2.value.
4155 2015-11-13 Marek Polacek <polacek@redhat.com>
4158 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4160 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4162 * c-typeck.c: Include spellcheck.h.
4163 (lookup_field_fuzzy_find_candidates): New function.
4164 (lookup_field_fuzzy): New function.
4165 (build_component_ref): If the field was not found, try using
4166 lookup_field_fuzzy and potentially offer a suggestion.
4168 2015-11-12 James Norris <jnorris@codesourcery.com>
4169 Joseph Myers <joseph@codesourcery.com>
4171 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4172 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4173 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4174 and PRAGMA_OMP_CLAUSE_LINK.
4175 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4176 and PRAGMA_OACC_CLAUSE_LINK.
4177 (OACC_DECLARE_CLAUSE_MASK): New definition.
4178 (c_parser_oacc_declare): New function.
4180 2015-11-12 Marek Polacek <polacek@redhat.com>
4183 * c-parser.c (c_parser_for_statement): Reclassify the token in
4186 2015-11-11 Marek Polacek <polacek@redhat.com>
4190 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4191 checking the size of an array.
4193 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4195 * c-array-notation.c: Remove unused header files.
4196 * c-aux-info.c: Likewise.
4197 * c-convert.c: Likewise.
4198 * c-decl.c: Likewise.
4199 * c-errors.c: Likewise.
4200 * c-lang.c: Likewise.
4201 * c-objc-common.c: Likewise.
4202 * c-parser.c: Likewise.
4203 * c-typeck.c: Likewise.
4204 * gccspec.c: Likewise.
4206 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4207 Cesar Philippidis <cesar@codesourcery.com>
4208 James Norris <jnorris@codesourcery.com>
4209 Julian Brown <julian@codesourcery.com>
4210 Nathan Sidwell <nathan@codesourcery.com>
4212 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4214 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4215 (c_parser_pragma): Parse 'acc routine'.
4216 (OACC_ROUTINE_CLAUSE_MARK): Define.
4217 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4219 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4222 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4223 location of the backward-goto to the start of the loop body.
4225 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4228 * c-parser.c (c_parser_while_statement): Finish the loop before
4229 parsing ahead for misleading indentation.
4230 (c_parser_for_statement): Likewise.
4232 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4234 * c-decl.c (finish_struct): If the structure has reverse storage
4235 order, rewrite the type of array fields with scalar component. Call
4236 maybe_apply_pragma_scalar_storage_order on entry.
4237 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4238 errors on bit-fields and reverse SSO here and not...
4239 (c_mark_addressable): ...here.
4240 (output_init_element): Adjust call to initializer_constant_valid_p.
4241 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4243 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4245 * c-decl.c (warn_defaults_to): Update for change in signature
4246 of diagnostic_set_info.
4247 * c-errors.c (pedwarn_c99): Likewise.
4248 (pedwarn_c90): Likewise.
4249 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4250 for textinfo::set_location.
4252 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4253 Thomas Schwinge <thomas@codesourcery.com>
4254 James Norris <jnorris@codesourcery.com>
4256 * c-parser.c (c_parser_omp_clause_name): Add support for
4257 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4258 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4259 default(none) in OpenACC.
4260 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4262 (c_parser_oacc_clause_tile): New function.
4263 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4264 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4265 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4267 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4268 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4270 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4271 (c_parser_oacc_update): Update the error message for missing clauses.
4272 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4273 and OMP_CLAUSE_INDEPENDENT.
4275 2015-11-05 Marek Polacek <polacek@redhat.com>
4278 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4279 deal with pre-evaluation on invalid types.
4281 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4282 Ilya Verbin <ilya.verbin@intel.com>
4284 * c-parser.c: Include context.h and gimple-expr.h.
4285 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4286 monotonic together with nonmonotonic.
4287 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4288 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4289 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4290 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4291 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4292 expressions on combined target teams before the target.
4293 (c_parser_omp_declare_target): If decl has "omp declare target" or
4294 "omp declare target link" attribute, and cgraph or varpool node already
4295 exists, then set corresponding flags. Call c_finish_omp_clauses
4296 in the parenthesized extended-list syntax case.
4297 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4299 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4300 on OMP_CLAUSE_REDUCTION array sections.
4301 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4302 into the constant offset, or for variable low-bound using
4303 POINTER_PLUS_EXPR. For structure element based array sections use
4304 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4305 (c_finish_omp_clauses): Drop generic_field_head, structure
4306 elements are now always mapped even as array section bases,
4307 diagnose same var in data sharing and mapping clauses. Diagnose if
4308 linear step on declare simd is neither a constant nor a uniform
4309 parameter. Look through POINTER_PLUS_EXPR for array section
4310 reductions. Diagnose the same var or function appearing multiple
4311 times on the same directive. Fix up wording for the to clause if t
4312 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4313 modifier on kinds other than dynamic or guided or nonmonotonic
4314 modifier together with ordered clause.
4316 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4317 Chung-Lin Tang <cltang@codesourcery.com>
4319 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4321 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4323 * c-array-notation.c: Reorder #include's and remove duplicates.
4324 * c-aux-info.c: Likewise.
4325 * c-convert.c: Likewise.
4326 * c-decl.c: Likewise.
4327 * c-errors.c: Likewise.
4328 * c-lang.c: Likewise.
4329 * c-objc-common.c: Likewise.
4330 * c-parser.c: Likewise.
4331 * c-typeck.c: Likewise.
4333 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4336 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4337 after calling build_qualified_type.
4339 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4340 Thomas Schwinge <thomas@codesourcery.com>
4341 James Norris <jnorris@codesourcery.com>
4342 Joseph Myers <joseph@codesourcery.com>
4343 Julian Brown <julian@codesourcery.com>
4344 Bernd Schmidt <bschmidt@redhat.com>
4346 * c-parser.c (c_parser_oacc_shape_clause): New.
4347 (c_parser_oacc_simple_clause): New.
4348 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4349 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4351 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4352 James Norris <jnorris@codesourcery.com>
4353 Cesar Philippidis <cesar@codesourcery.com>
4357 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4358 parameters, and handle these. Adjust all users.
4359 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4361 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4363 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4365 (c_finish_omp_construct): Declare function.
4366 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4367 Merge functions into...
4368 (c_finish_omp_construct): ... this new function.
4370 2015-10-22 Richard Biener <rguenther@suse.de>
4372 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4373 before folding a MINUS_EXPR.
4375 2015-10-21 Marek Polacek <polacek@redhat.com>
4378 * c-decl.c (start_function): Warn about vararg functions without
4381 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4383 * c-typeck.c (build_conditional_expr): Use boolean vector
4384 type for vector comparison.
4385 (build_vec_cmp): New.
4386 (build_binary_op): Use build_vec_cmp for comparison.
4388 2015-10-20 Marek Polacek <polacek@redhat.com>
4390 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4392 2015-10-20 Marek Polacek <polacek@redhat.com>
4395 * c-parser.c (c_parser_attributes): Break out of the loop if the
4396 token after an attribute isn't a comma.
4398 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4399 Aldy Hernandez <aldyh@redhat.com>
4401 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4402 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4403 (c_parser_omp_variable_list): Handle structure elements for
4404 map, to and from clauses. Handle array sections in reduction
4405 clause. Formatting fixes.
4406 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4407 if clause modifiers.
4408 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4409 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4410 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4411 c_parser_omp_clause_is_device_ptr): New functions.
4412 (c_parser_omp_clause_ordered): Parse optional parameter.
4413 (c_parser_omp_clause_reduction): Handle array reductions.
4414 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4415 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4417 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4418 (c_parser_omp_clause_depend_sink): New function.
4419 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4420 (c_parser_omp_clause_map): Parse release/delete map kinds and
4421 optional always modifier.
4422 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4423 and c_finish_omp_clauses callers.
4424 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4425 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4426 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4427 (OMP_CRITICAL_CLAUSE_MASK): Define.
4428 (c_parser_omp_critical): Parse critical clauses.
4429 (c_parser_omp_for_loop): Handle doacross loops, adjust
4430 c_finish_omp_for and c_finish_omp_clauses callers.
4431 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4432 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4433 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4434 (c_parser_omp_for): Disallow ordered clause when combined with
4435 distribute. Disallow linear clause when combined with distribute
4436 and not combined with simd.
4437 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4438 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4439 parse clauses and if depend clause is found, don't parse a body.
4440 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4441 Allow target parallel without for after it.
4442 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4443 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4444 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4446 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4447 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4448 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4449 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4451 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4452 defaultmap and is_device_ptr clauses.
4453 (c_parser_omp_target): Parse target parallel and target simd. Set
4454 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4455 and target exit data. Diagnose invalid map kinds.
4456 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4457 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4459 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4461 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4462 (c_parser_omp_taskloop): New function.
4463 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4464 handle PRAGMA_OMP_TASKLOOP.
4465 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4466 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4467 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4468 Add IS_OMP argument, handle structure element bases, diagnose
4469 bitfields, pass IS_OMP recursively, diagnose known zero length
4470 array sections in depend clauses, handle array sections in reduction
4471 clause, diagnose negative length even for pointers.
4472 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4473 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4474 array sections in reduction clause, set
4475 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4476 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4477 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4478 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4480 2015-10-06 Marek Polacek <polacek@redhat.com>
4482 * c-parser.c (c_parser_statement_after_labels): Use
4483 protected_set_expr_location.
4484 (c_parser_omp_clause_num_gangs): Likewise.
4485 (c_parser_omp_clause_num_threads): Likewise.
4486 (c_parser_omp_clause_num_workers): Likewise.
4487 (c_parser_omp_clause_vector_length): Likewise.
4488 (c_parser_omp_clause_num_teams): Likewise.
4489 (c_parser_omp_clause_thread_limit): Likewise.
4490 * c-typeck.c (build_c_cast): Likewise.
4491 (c_cast_expr): Likewise.
4493 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4495 * c-typeck.c (c_tree_equal): Use real_equal instead of
4498 2015-10-04 Jason Merrill <jason@redhat.com>
4500 * c-parser.c (c_lex_one_token): Handle @synchronized.
4501 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4502 can change whether the function is transaction_safe.
4504 2015-10-02 Marek Polacek <polacek@redhat.com>
4507 * c-typeck.c (convert_for_assignment): Use the expansion point
4508 location throughout.
4510 2015-10-02 Marek Polacek <polacek@redhat.com>
4513 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4514 and pass it down to c_parser_if_statement.
4515 (c_parser_else_body): Add CHAIN parameter and pass it down to
4516 c_parser_statement_after_labels.
4517 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4518 duplicated if-else-if conditions.
4520 2015-10-01 Marek Polacek <polacek@redhat.com>
4522 * c-typeck.c (convert_for_assignment): Improve commentary.
4524 2015-09-30 Marek Polacek <polacek@redhat.com>
4527 * c-typeck.c (c_finish_return): Use the expansion point location for
4528 certain "return with value" warnings.
4530 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4532 * c-parser.c (pragma_lex): Add loc argument.
4534 2015-09-15 Marek Polacek <polacek@redhat.com>
4537 * c-decl.c (tag_exists_p): New function.
4538 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4539 struct/union/enum keywords are missing.
4540 * c-tree.h (tag_exists_p): Declare.
4542 2015-09-15 Marek Polacek <polacek@redhat.com>
4544 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4545 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4546 Return NULL_TREE instead of 0.
4547 (lookup_name): Return NULL_TREE instead of 0.
4548 (lookup_name_in_scope): Likewise.
4549 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4550 (parser_xref_tag): Use false instead of 0.
4551 (start_struct): Use true instead of 1.
4552 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4554 2015-09-14 Marek Polacek <polacek@redhat.com>
4556 * c-typeck.c (set_nonincremental_init_from_string): Use
4557 HOST_WIDE_INT_M1U when shifting a negative value.
4559 2015-09-09 Mark Wielaard <mjw@redhat.com>
4561 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4564 2015-09-10 Jakub Jelinek <jakub@redhat.com>
4567 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4568 into OMP_FOR_PRE_BODY rather than before the loop.
4570 2015-09-09 Jakub Jelinek <jakub@redhat.com>
4573 * c-parser.c (c_parser_oacc_all_clauses,
4574 c_parser_omp_all_clauses): Remove invalid clause from
4575 list of clauses even if parser->error is set.
4578 * c-parser.c (c_parser_omp_clause_aligned,
4579 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4581 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4585 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4586 instead of c_parser_unary_expression. If the result is !lvalue_p,
4587 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4589 2015-09-04 Marek Polacek <polacek@redhat.com>
4592 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4594 2015-09-03 Martin Sebor <msebor@redhat.com>
4597 * c-typeck.c (convert_arguments, parser_build_unary_op,
4598 build_conditional_expr, c_cast_expr, convert_for_assignment,
4599 build_binary_op, _objc_common_truthvalue_conversion): Call
4601 (c_decl_implicit): Define.
4603 2015-09-02 Marek Polacek <polacek@redhat.com>
4606 * c-parser.c (c_parser_enum_specifier): Give a better error for
4609 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4611 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4613 2015-08-12 Marek Polacek <polacek@redhat.com>
4615 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4618 2015-08-03 Marek Polacek <polacek@redhat.com>
4621 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4623 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4625 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4627 * c-parser.c (c_parser_if_body): Take token_indent_info
4628 argument. Call warn_for_misleading_indentation even when the
4629 body is a semicolon. Extract token_indent_infos corresponding
4630 to the guard, body and next tokens. Adjust call to
4631 warn_for_misleading_indentation accordingly.
4632 (c_parser_else_body): Likewise.
4633 (c_parser_if_statement): Likewise.
4634 (c_parser_while_statement): Likewise.
4635 (c_parser_for_statement): Likewise.
4637 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4638 Manuel López-Ibáñez <manu@gcc.gnu.org>
4640 * c-decl.c (get_parm_info): Remove static var. Update warning
4643 2015-07-27 Marek Polacek <polacek@redhat.com>
4647 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4649 2015-07-20 Marek Polacek <polacek@redhat.com>
4652 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4653 (build_binary_op): Warn about left shift overflows.
4655 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4657 * c-array-notation.c: Adjust includes for flags.h changes.
4658 * c-objc-common.c: Likewise.
4660 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4662 * c-array-notation.c: Adjust includes.
4663 * c-aux-info.c: Likewise.
4664 * c-convert.c: Likewise.
4665 * c-decl.c: Likewise.
4666 * c-errors.c: Likewise.
4667 * c-lang.c: Likewise.
4668 * c-objc-common.c: Likewise.
4669 * c-parser.c: Likewise.
4670 * c-typeck.c: Likewise.
4672 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4675 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4677 2015-06-29 Marek Polacek <polacek@redhat.com>
4680 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4681 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4682 about -Wswitch-bool here.
4683 (do_case): Update c_add_case_label call.
4684 (c_finish_case): Update c_do_switch_warnings call.
4686 2015-06-27 Marek Polacek <polacek@redhat.com>
4688 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4690 2015-06-26 Marek Polacek <polacek@redhat.com>
4692 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4694 * c-typeck.c (array_to_pointer_conversion): Likewise.
4695 (build_unary_op): Likewise.
4696 (c_finish_return): Likewise.
4698 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4700 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4701 * c-parser.c: Likewise.
4703 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4705 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4706 instead of pointer_hash.
4707 (detect_field_duplicates): Likewise.
4709 2015-06-25 Marek Polacek <polacek@redhat.com>
4711 * c-array-notation.c: Use VAR_P throughout.
4712 * c-decl.c: Likewise.
4713 * c-objc-common.c: Likewise.
4714 * c-parser.c: Likewise.
4715 * c-typeck.c: Likewise.
4717 2015-06-25 Marek Polacek <polacek@redhat.com>
4719 * c-decl.c: Use is_global_var throughout.
4720 * c-parser.c: Likewise.
4721 * c-typeck.c: Likewise.
4723 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4725 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4726 * c-aux-info.c: Likewise.
4727 * c-convert.c: Likewise.
4728 * c-decl.c: Likewise.
4729 * c-errors.c: Likewise.
4730 * c-lang.c: Likewise.
4731 * c-objc-common.c: Likewise.
4732 * c-parser.c: Likewise.
4733 * c-typeck.c: Likewise.
4735 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4738 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4741 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4743 * c-decl.c (pop_scope): Register the main translation unit
4744 through the new debug hook.
4746 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4748 * c-array-notation.c : Adjust include files.
4749 * c-aux-info.c : Likewise.
4750 * c-convert.c : Likewise.
4751 * c-decl.c : Likewise.
4752 * c-errors.c : Likewise.
4753 * c-lang.c : Likewise.
4754 * c-lang.h : Likewise.
4755 * c-objc-common.c : Likewise.
4756 * c-parser.c : Likewise.
4757 * c-typeck.c : Likewise.
4759 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4761 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4762 immediately clobber it.
4763 (c_write_global_declarations_1): Remove call to
4764 check_global_declaration_1.
4765 (c_write_global_declarations_2): Remove.
4766 (c_write_final_cleanups): Rename from c_write_global_declarations.
4767 Remove call to finalize_compilation_unit.
4768 Remove calls to debugging hooks.
4769 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4770 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4771 * c-tree.h: Remove c_write_global_declarations.
4773 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4775 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4776 * c-aux-info.c: Likewise.
4777 * c-convert.c: Likewise.
4778 * c-decl.c: Likewise.
4779 * c-errors.c: Likewise.
4780 * c-lang.c: Likewise.
4781 * c-objc-common.c: Likewise.
4782 * c-parser.c: Likewise.
4783 * c-typeck.c: Likewise.
4785 2015-06-04 Marek Polacek <polacek@redhat.com>
4788 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4791 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4793 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4794 Warn for empty struct.
4795 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4797 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4799 * c-decl.c (start_function): Call plugin before parsing.
4800 (finish_function): Call plugin after parsing.
4802 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4805 * c-decl.c (merge_decls): Merge DECL_COMMON.
4807 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4809 * Make-lang.in (check_gcc_pallelize): Define.
4811 2015-05-22 Marek Polacek <polacek@redhat.com>
4814 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4817 2015-05-21 Marek Polacek <polacek@redhat.com>
4819 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4822 2015-05-20 Marek Polacek <polacek@redhat.com>
4824 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4825 * c-typeck.c: Likewise.
4827 2015-05-19 Marek Polacek <polacek@redhat.com>
4829 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4831 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4834 * c-parser.c (c_parser_omp_for_loop): Don't add
4835 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4836 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4837 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4840 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4842 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4845 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4848 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4851 2015-05-14 Marek Polacek <polacek@redhat.com>
4855 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4858 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4860 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4861 to add a call to warn_for_misleading_indentation.
4862 (c_parser_else_body): Likewise, adding param "else_loc".
4863 (c_parser_if_statement): Check for misleading indentation.
4864 (c_parser_while_statement): Likewise.
4865 (c_parser_for_statement): Likewise.
4867 2015-05-08 Marek Polacek <polacek@redhat.com>
4870 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4871 (output_init_element): Likewise.
4873 2015-05-07 Marek Polacek <polacek@redhat.com>
4876 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4879 2015-04-30 Marek Polacek <polacek@redhat.com>
4881 * c-typeck.c (set_init_label): Call error_at instead of error and
4884 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4887 * c-typeck.c (c_build_va_arg): Clarify the error message.
4889 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4891 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4892 OMP_STANDALONE_CLAUSES.
4894 2015-04-28 Marek Polacek <polacek@redhat.com>
4896 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4898 2015-04-28 Marek Polacek <polacek@redhat.com>
4901 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4903 2015-04-25 Marek Polacek <polacek@redhat.com>
4906 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4909 2015-04-23 Marek Polacek <polacek@redhat.com>
4912 * c-decl.c (set_labels_context_r): New function.
4913 (store_parm_decls): Call it via walk_tree_without_duplicates.
4914 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4915 instead of create_tmp_var. Build TARGET_EXPR instead of
4917 (build_atomic_assign): Use create_tmp_var_raw instead of
4918 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4920 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4922 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4923 (c_parser_omp_target_update): Add missed %> to error_at ().
4925 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4928 * c-decl.c (c_default_pointer_mode): Remove definition.
4929 * c-tree.h (c_default_pointer_mode): Remove declaration.
4931 2015-03-27 Tobias Burnus <burnus@net-b.de>
4934 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4936 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4937 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4938 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4940 2015-03-19 Jakub Jelinek <jakub@redhat.com>
4942 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4943 attribute for DECL_EXTERNAL VAR_DECLs.
4945 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4947 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4950 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4953 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4954 before preparing arguments to warn_logical_not_parentheses.
4956 2015-03-09 Jakub Jelinek <jakub@redhat.com>
4959 * c-typeck.c (parser_build_binary_op): Don't warn for
4960 !!x == y or !b == y where b is _Bool.
4962 2015-03-09 Marek Polacek <polacek@redhat.com>
4964 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4965 * c-decl.c (grokdeclarator): Likewise.
4966 * c-typeck.c (build_binary_op): Likewise.
4968 2015-02-27 Marek Polacek <polacek@redhat.com>
4971 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4973 2015-02-14 Marek Polacek <polacek@redhat.com>
4976 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4977 declared through a typedef name.
4979 2015-02-13 Marek Polacek <polacek@redhat.com>
4982 * c-decl.c (grokdeclarator): Print also the type when giving
4983 the error message about array's incomplete element type.
4985 2015-02-11 Jakub Jelinek <jakub@redhat.com>
4988 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4989 check in the POP macro.
4991 2015-02-09 Marek Polacek <polacek@redhat.com>
4994 * c-typeck.c (process_init_element): Don't always wrap
4995 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4996 initializing a range of elements.
4998 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5002 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5004 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5006 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5007 processing enum declaration.
5009 2015-01-29 Marek Polacek <polacek@redhat.com>
5012 * c-typeck.c (pop_init_level): If constructor_elements has
5013 exactly one element with integer_zerop value, set constructor_zeroinit
5014 to 1. Remove braces around warning_init call.
5016 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5019 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5020 of FUNCTION_DECLs with error_mark_node.
5022 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5025 * c-typeck.c (convert_arguments): Return -1 if there are
5026 error_args, even if we've diagnosed too many arguments.
5028 2015-01-21 Richard Biener <rguenther@suse.de>
5031 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5032 for builtins the user declared correctly.
5034 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5035 Bernd Schmidt <bernds@codesourcery.com>
5036 Cesar Philippidis <cesar@codesourcery.com>
5037 James Norris <jnorris@codesourcery.com>
5038 Jakub Jelinek <jakub@redhat.com>
5039 Ilmir Usmanov <i.usmanov@samsung.com>
5041 * c-parser.c: Include "gomp-constants.h".
5042 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5043 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5044 Use OMP_CLAUSE_SET_MAP_KIND.
5045 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5046 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5047 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5048 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5049 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5050 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5051 "copyout", "create", "delete", "deviceptr", "gang", "host",
5052 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5053 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5054 "present_or_create", "pcreate", "seq", "self", "vector",
5055 "vector_length", "wait", "worker".
5056 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5057 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5058 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5059 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5060 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5061 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5062 (c_parser_oacc_data_clause_deviceptr)
5063 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5064 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5065 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5066 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5067 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5068 (c_parser_oacc_parallel, c_parser_oacc_update)
5069 (c_parser_oacc_wait): New functions.
5070 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5071 (c_finish_oacc_data): New prototypes.
5072 * c-typeck.c: Include "gomp-constants.h".
5073 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5074 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5075 OMP_CLAUSE_SET_MAP_KIND.
5076 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5077 (c_finish_oacc_data): New functions.
5078 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5079 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5080 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5081 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5082 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5083 GOMP_MAP_FORCE_DEVICEPTR.
5085 2015-01-09 Michael Collison <michael.collison@linaro.org>
5087 * c-array-notation.c: Include hash-set.h, machmode.h,
5088 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5089 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5090 * c-aux-info.c: Ditto.
5091 * c-convert.c: Ditto.
5093 * c-errors.c: Ditto.
5094 * c-lang.c: Dittoxs.
5095 * c-objc-common.c: Ditto.
5096 * c-parser.c: Ditto.
5097 * c-typeck.c: Include hash-set.h, machmode.h,
5098 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5099 fold-const.h, wide-int.h, inchash.h, real.h and
5100 fixed-value.h due to flattening of tree.h.
5102 2015-01-07 Marek Polacek <polacek@redhat.com>
5105 * c-typeck.c (process_init_element): Disallow initialization of
5106 a flexible array member with a string constant if the structure
5109 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5112 * c-typeck.c (convert_for_assignment, c_finish_return): For
5113 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5114 types also set in_late_binary_op around convert call.
5115 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5116 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5117 result on expr as last argument to ubsan_instrument_float_cast,
5118 if in_late_binary_op, don't use c_save_expr but save_expr.
5120 Update copyright years.
5122 2015-01-05 Marek Polacek <polacek@redhat.com>
5125 * c-typeck.c (build_array_ref): Pass loc down to
5126 warn_array_subscript_with_type_char.
5128 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5130 * c-typeck.c: New behavious for pointers to arrays with qualifiers
5131 (common-pointer-type): For pointers to arrays take qualifiers from
5133 (build_conditional_expr): Add warnings for lost qualifiers.
5134 (comp-target-types): Allow pointers to arrays with different qualifiers.
5135 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5136 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5137 to PEDWARN_FOR_QUALIFIERS.
5139 2014-12-17 Jakub Jelinek <jakub@redhat.com>
5142 * c-convert.c: Include ubsan.h.
5143 (convert): For real -> integral casts and
5144 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5145 instead instrument the float cast directly.
5147 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5149 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5150 c_finish_stmt_expr): Remove NULL last argument from
5151 create_tmp_var_raw and create_tmp_var calls.
5152 * c-array-notation.c (fix_builtin_array_notation_fn,
5153 build_array_notation_expr, fix_conditional_array_notations_1,
5154 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5156 2014-11-28 Marek Polacek <polacek@redhat.com>
5159 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5160 convert the right operand to integer type.
5162 2014-11-25 Marek Polacek <polacek@redhat.com>
5165 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5166 for inline functions.
5168 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5171 * c-typeck.c (build_array_ref): Adjust
5172 convert_vector_to_pointer_for_subscript caller. If it returns true,
5173 call non_lvalue_loc on the result.
5175 2014-11-11 Richard Biener <rguenther@suse.de>
5177 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5180 2014-11-10 Andi Kleen <ak@linux.intel.com>
5183 * c-parser.c (c_parser_statement_after_labels): Call
5185 (c_parser_if_statement): Dito.
5186 (c_parser_switch_statement): Dito.
5187 (c_parser_while_statement): Dito.
5188 (c_parser_do_statement): Dito.
5189 (c_parser_for_statement): Dito.
5190 * c-typeck.c (c_finish_loop): Dito.
5192 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5194 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5195 OPT_Wshift_count_overflow in the warnings.
5197 2014-10-30 Marek Polacek <polacek@redhat.com>
5199 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5200 print the stripped version as well, if they're not the same.
5202 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5204 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5207 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5209 * c-decl.c: Adjust include files.
5210 * c-parser.c: Ditto.
5212 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5213 Tom Tromey <tromey@redhat.com>
5215 * c-tree.h (enum c_oracle_request): New.
5216 (c_binding_oracle_function): New typedef.
5217 (c_binding_oracle, c_pushtag, c_bind): Declare.
5218 * c-decl.c (c_binding_oracle): New global.
5219 (I_SYMBOL_CHECKED): New macro.
5220 (i_symbol_binding): New function.
5221 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5222 (I_TAG_CHECKED): New macro.
5223 (i_tag_binding): New function.
5224 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5225 (I_LABEL_CHECKED): New macro.
5226 (i_label_binding): New function.
5227 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5228 (c_print_identifier): Save and restore c_binding_oracle.
5229 (c_pushtag, c_bind): New functions.
5231 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5233 * c-typeck.c: Adjust include files.
5235 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5238 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5239 initialization here...
5240 (c_initialize_diagnostics): ... but here. Set defaults after
5241 building pretty-printer.
5243 2014-10-23 Marek Polacek <polacek@redhat.com>
5246 * c-decl.c (pop_scope): Don't print warning in external_scope.
5248 2014-10-19 Marek Polacek <polacek@redhat.com>
5251 * c-typeck.c (output_init_element): Allow initializing objects with
5252 static storage duration with compound literals even in C99 and add
5255 2014-10-17 Marek Polacek <polacek@redhat.com>
5258 * c-typeck.c (digest_init): Allow initializing objects with static
5259 storage duration with compound literals even in C99 and add pedwarn
5262 2014-10-17 Marek Polacek <polacek@redhat.com>
5265 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5266 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5267 error multiple times. Print the type.
5269 2014-10-17 Marek Polacek <polacek@redhat.com>
5272 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5275 2014-10-17 Marek Polacek <polacek@redhat.com>
5277 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5278 (start_function): Use OPT_Wimplicit_int instead of 0.
5279 (store_parm_decls_oldstyle): Likewise.
5281 2014-10-17 Alan Modra <amodra@gmail.com>
5284 * c-decl.c (merge_decls): Don't merge section name or tls model
5285 to newdecl symtab node, instead merge to olddecl. Override
5286 existing olddecl section name. Set tls_model for all thread-local
5287 vars, not just OMP thread-private ones. Remove incorrect comment.
5289 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5291 * c-decl.c: Adjust include files.
5293 2014-10-14 DJ Delorie <dj@redhat.com>
5295 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5296 (c_token_starts_typename): Check all __intN, not just __int128.
5297 (c_token_starts_declspecs): Likewise.
5298 (c_parser_declspecs): Likewise.
5299 (c_parser_attribute_any_word): Likewise.
5300 (c_parser_objc_selector): Likewise.
5301 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5302 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5304 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5306 (finish_declspecs): Likewise.
5308 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5310 * c-parser.c (c_parser_all_labels): New function to replace
5312 (c_parser_statement): Call the new function.
5314 2014-10-09 Marek Polacek <polacek@redhat.com>
5317 * c-typeck.c (pop_init_level): Don't warn about initializing
5320 2014-10-07 Marek Polacek <polacek@redhat.com>
5323 * c-decl.c (header_for_builtin_fn): New function.
5324 (implicitly_declare): Suggest which header to include.
5326 2014-10-07 Marek Polacek <polacek@redhat.com>
5328 * c-convert.c (convert): Use error_operand_p.
5329 * c-typeck.c (require_complete_type): Likewise.
5330 (really_atomic_lvalue): Likewise.
5331 (digest_init): Likewise.
5332 (handle_omp_array_sections_1): Likewise.
5334 2014-10-03 Marek Polacek <polacek@redhat.com>
5337 * c-decl.c (pop_scope): Don't warn about "inline function declared
5338 but never defined" for functions marked with gnu_inline attribute.
5340 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5343 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5344 on low_bound and length.
5346 2014-09-24 Marek Polacek <polacek@redhat.com>
5350 * c-parser.c: Don't define CPP_KEYWORD.
5351 (c_parser_switch_statement): Pass original type to c_finish_case.
5352 * c-tree.h (c_finish_case): Update declaration.
5353 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5354 conditionally to c_do_switch_warnings.
5356 2014-09-03 Marek Polacek <polacek@redhat.com>
5359 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5362 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5363 Balaji V. Iyer <balaji.v.iyer@intel.com>
5364 Igor Zamyatin <igor.zamyatin@intel.com>
5366 * c-parser.c (c_parser_cilk_for): New function.
5367 (c_parser_cilk_grainsize): Likewise.
5368 (c_get_temp_regvar): Likewise.
5369 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5370 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5371 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5372 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5375 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5377 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5378 with using HOST_WIDE_INT without truncation to 'int'
5380 2014-08-22 Marek Polacek <polacek@redhat.com>
5383 * c-typeck.c (parser_build_binary_op): Adjust call to
5384 warn_logical_not_parentheses.
5386 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5389 * c-parser.c (c_parser_array_notation): Check for correct
5390 type of an array added.
5392 2014-08-19 Marek Polacek <polacek@redhat.com>
5395 * c-typeck.c (build_binary_op): If either operand of a comparison
5396 is a boolean expression, call maybe_warn_bool_compare.
5398 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5401 * c-typeck.c (build_c_cast): Do a conversion even when the
5402 TYPE_MAIN_VARIANTs are the same.
5404 2014-08-19 Marek Polacek <polacek@redhat.com>
5406 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5407 pedwarn_c99 instead of pedwarn.
5408 (grokfield): Likewise.
5409 (warn_defaults_to): New function.
5410 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5411 Unconditionally call pedwarn_c99 instead of pedwarn.
5412 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5413 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5414 check flag_isoc11 before.
5415 * c-errors.c (pedwarn_c99): Change the return type to bool.
5416 Handle -Wc99-c11-compat.
5417 * c-parser.c (disable_extension_diagnostics): Handle
5418 warn_c99_c11_compat.
5419 (restore_extension_diagnostics): Likewise.
5420 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5421 instead of pedwarn, don't check flag_isoc11 before.
5422 (c_parser_declspecs): Likewise.
5423 (c_parser_alignas_specifier): Likewise.
5424 (c_parser_alignof_expression): Likewise.
5425 (c_parser_generic_selection): Likewise.
5426 * c-tree.h (pedwarn_c99): Update declaration.
5427 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5430 2014-08-19 Marek Polacek <polacek@redhat.com>
5432 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5434 * c-errors.c: Include "opts.h".
5435 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5436 * c-parser.c (disable_extension_diagnostics): Handle negative value
5437 of warn_c90_c99_compat, too.
5438 (restore_extension_diagnostics): Likewise.
5439 (c_parser_compound_statement_nostart): Pass
5440 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5442 2014-08-12 Marek Polacek <polacek@redhat.com>
5444 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5446 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5448 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5450 2014-08-10 Marek Polacek <polacek@redhat.com>
5453 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5454 Call pedwarn_c90 instead of pedwarn.
5455 (check_bitfield_type_and_width): Likewise.
5456 (declspecs_add_qual): Likewise.
5457 (declspecs_add_type): Likewise.
5458 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5459 Adjust to only call pedwarn_c90.
5460 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5461 pedwarn_c90 instead of pedwarn.
5462 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5463 * c-parser.c (disable_extension_diagnostics): Handle
5464 warn_c90_c99_compat.
5465 (restore_extension_diagnostics): Likewise.
5466 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5467 pedwarn_c90 instead of pedwarn.
5468 (c_parser_initelt): Likewise.
5469 (c_parser_postfix_expression): Likewise.
5470 (c_parser_postfix_expression_after_paren_type): Likewise.
5471 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5472 * c-tree.h: Fix formatting.
5473 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5474 pedwarn_c90 instead of pedwarn.
5476 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5478 * c-typeck.c: Remove include of pointer-set.h.
5480 2014-08-07 Marek Polacek <polacek@redhat.com>
5482 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5484 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5486 * c-typeck.c: Use hash_map instead of pointer_map.
5488 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5490 * c-decl.c: Use hash_set instead of pointer_set.
5492 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5495 * c-array-notation.c (expand_array_notations): Handling
5498 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5501 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5504 2014-07-30 Tom Tromey <tromey@redhat.com>
5506 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5508 (really_start_incremental_init, push_init_level): Initialize
5510 (pop_init_level): Set global designator_depth.
5511 (process_init_element): Check for designated_init attribute.
5513 2014-07-20 Marek Polacek <polacek@redhat.com>
5516 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5517 (implicitly_declare): Pass location to implicit_decl_warning.
5519 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5522 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5523 If non-NULL, call c_parser_check_literal_zero.
5524 (c_parser_check_literal_zero): New function.
5525 (c_parser_postfix_expression_after_primary): Adjust
5526 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5528 2014-07-06 Marek Polacek <polacek@redhat.com>
5531 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5532 * c-tree.h (C_ARRAY_PARAMETER): Define.
5533 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5536 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5537 Chen Gang <gang.chen.5i5j@gmail.com>
5539 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5542 2014-07-01 Marek Polacek <polacek@redhat.com>
5544 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5545 instead of 0 to WARN_FOR_ASSIGNMENT.
5547 2014-07-01 Marek Polacek <polacek@redhat.com>
5550 * c-typeck.c (convert_for_assignment): Pass
5551 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5553 2014-06-30 Marek Polacek <polacek@redhat.com>
5555 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5556 has no_sanitize_undefined attribute.
5558 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5561 * c-array-notation.c (fix_builtin_array_notation_fn):
5562 Check for 0 arguments in builtin call. Check that bultin argument is
5564 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5567 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5569 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5570 qualifiers in __auto_type for atomic types.
5571 (c_parser_typeof_specifier): Discard all type qualifiers in
5572 __typeof__ for atomic types.
5574 2014-06-25 Marek Polacek <polacek@redhat.com>
5577 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5578 the return expression to c_finish_return.
5580 2014-06-25 Jakub Jelinek <jakub@redhat.com>
5582 * c-typeck.c (c_finish_omp_clauses): Make sure
5583 OMP_CLAUSE_LINEAR_STEP has correct type.
5585 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5589 2014-06-24 Jakub Jelinek <jakub@redhat.com>
5591 * c-parser.c (c_parser_omp_for_loop): For
5592 #pragma omp parallel for simd move lastprivate clause from parallel
5593 to for rather than simd.
5595 2014-06-23 Marek Polacek <polacek@redhat.com>
5597 * c-typeck.c (parser_build_binary_op): Don't call
5598 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5600 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5602 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5603 * c-decl.c (merge_decls): Likewise.
5605 2014-06-09 Marek Polacek <polacek@redhat.com>
5608 * c-typeck.c (error_init): Call inform instead of error_at.
5609 (pedwarn_init): Call inform instead of pedwarn.
5610 (warning_init): Call inform instead of warning_at.
5612 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
5614 * c-decl.c (merge_decls): Use set_decl_section_name.
5615 (duplicate_decls): Remove node if it exists.
5617 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5620 * c-typeck.c (push_init_level, process_init_element,
5621 pop_init_level): Correct check for zero initialization, move
5622 missing brace warning to respect zero initialization.
5624 2014-06-05 Marek Polacek <polacek@redhat.com>
5627 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5629 2014-06-05 Marek Polacek <polacek@redhat.com>
5632 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5633 on the left hand side operand of a comparison.
5635 2014-06-05 Marek Polacek <polacek@redhat.com>
5638 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5639 Print note only if the warning was printed.
5641 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5644 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5647 2014-06-03 Marek Polacek <polacek@redhat.com>
5650 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5652 * c-tree.h (c_start_case): Update.
5653 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5654 switch condition has boolean value.
5656 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
5658 * c-decl.c: Include builtins.h.
5659 * c-parser.c: Likewise.
5661 2014-05-27 Marek Polacek <polacek@redhat.com>
5664 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5665 error and warning calls to error_at and warning_at. Pass location of
5666 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5667 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5668 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5670 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5673 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5674 function parameters.
5676 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
5678 * c-decl.c (merge_decls): Preserve symtab node pointers.
5679 (duplicate_decls): Free new decl.
5681 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5683 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5686 * c-parser.c (c_parser_omp_target): Return bool values.
5688 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5690 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5691 num_teams_loc variable to num_thread_limit_loc.
5693 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5695 * c-array-notation.c (expand_array_notations): Use void_node
5696 instead of void_zero_node.
5698 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5700 * c-decl.c (finish_struct): Adjust.
5701 (finish_enum): Likewise.
5703 (record_inline_static): Likewise.
5704 (push_scope): Likewise.
5705 (make_label): Likewise.
5706 (lookup_label_for_goto): Likewise.
5707 (finish_struct): Likewise.
5708 (finish_enum): Likewise.
5709 (store_parm_decls): Likewise.
5710 (c_push_function_context): Likewise.
5711 * c-lang.h: Remove usage of variable_size gty attribute.
5712 * c-parser.c (c_parse_init): Adjust.
5713 (c_parse_file): Likewise.
5715 2014-05-13 Marek Polacek <polacek@redhat.com>
5718 * c-typeck.c (convert_for_assignment): Pass location to
5719 WARN_FOR_ASSIGNMENT instead of input_location.
5721 2014-05-10 Marek Polacek <polacek@redhat.com>
5723 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5724 maybe_warn_string_init.
5725 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5726 maybe_warn_string_init.
5727 * c-tree.h (maybe_warn_string_init): Update declaration.
5728 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5729 Call pedwarn_init with loc instead of with input_location.
5730 (digest_init): Pass init_loc to maybe_warn_string_init.
5731 (pop_init_level): Call pedwarn_init with loc instead of with
5733 (set_init_index): Likewise.
5734 (process_init_element): Likewise.
5736 2014-05-09 Marek Polacek <polacek@redhat.com>
5739 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5740 (c_parser_initelt): Pass location to set_init_label. Pass array index
5741 location to set_init_index.
5742 * c-tree.h (push_init_level): Update declaration.
5743 (pop_init_level): Likewise.
5744 (set_init_index): Likewise.
5745 (set_init_label): Likewise.
5746 * c-typeck.c (error_init): Add location parameter. Call error_at
5748 (digest_init): Pass init_loc to error_init.
5749 (really_start_incremental_init):
5750 (push_init_level): Add location parameter. Pass loc to pop_init_level
5752 (pop_init_level): Likewise.
5753 (set_designator): Add location parameter. Pass loc to pop_init_level,
5754 push_init_level, and error_init.
5755 (set_init_index): Add location parameter. Pass loc to error_init and
5757 (set_init_label): Likewise.
5758 (output_init_element): Pass loc to error_init.
5759 (process_init_element): Pass loc to error_init, pop_init_level,
5760 pedwarn_init, and push_init_level.
5762 2014-05-09 Marek Polacek <polacek@redhat.com>
5765 * c-parser.c (c_parser_attributes): Parse the arguments as an
5766 expression-list if the attribute takes identifier.
5768 2014-05-08 Marek Polacek <polacek@redhat.com>
5771 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5774 2014-05-08 Marek Polacek <polacek@redhat.com>
5777 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5780 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5781 Mike Stump <mikestump@comcast.net>
5782 Richard Sandiford <rdsandiford@googlemail.com>
5784 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5785 (finish_enum): Use wide-int interfaces.
5786 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5787 * c-typeck.c (build_c_cast): Likewise.
5788 (set_nonincremental_init_from_string): Likewise.
5789 (c_tree_equal): Likewise.
5791 2014-05-02 Marek Polacek <polacek@redhat.com>
5794 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5795 Return size_one_node when the type is not complete.
5796 (pointer_diff): Remove comment.
5797 (build_unary_op): Improve error messages.
5799 2014-05-02 Marek Polacek <polacek@redhat.com>
5801 * c-typeck.c (c_finish_return): Separate warning_at calls.
5803 2014-05-02 Marek Polacek <polacek@redhat.com>
5805 * c-tree.h (error_init): Remove declaration.
5806 (pedwarn_init): Likewise.
5807 * c-typeck.c (error_init): Make static and move above.
5808 (pedwarn_init): Likewise.
5809 (warning_init): Move above.
5810 (maybe_warn_string_init): Likewise.
5812 2014-05-01 Jeff Law <law@redhat.com>
5816 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5817 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5820 2014-05-02 Marek Polacek <polacek@redhat.com>
5823 * c-typeck.c (push_init_level): Set constructor_designated to
5824 p->designated for structures.
5826 2014-05-01 Marek Polacek <polacek@redhat.com>
5829 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5830 function-definition has an attribute after the declarator.
5832 2014-05-01 Marek Polacek <polacek@redhat.com>
5835 * c-typeck.c (warning_init): Add location_t parameter. Call
5836 warning_at instead of warning.
5837 (push_init_level): Pass input_location to warning_init.
5838 (add_pending_init): Add location_t parameter. Pass loc to
5840 (set_nonincremental_init): Pass input_location to add_pending_init.
5841 (set_nonincremental_init_from_string): Likewise.
5842 (output_init_element): Pass loc to warning_init and to
5845 2014-05-01 Marek Polacek <polacek@redhat.com>
5848 * c-typeck.c (c_finish_return): Distinguish between label and variable
5849 when warning about returning local address.
5851 2014-05-01 Marek Polacek <polacek@redhat.com>
5854 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5857 2014-05-01 Marek Polacek <polacek@redhat.com>
5860 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5861 instead of 0 to WARN_FOR_QUALIFIERS.
5863 2014-05-01 Marek Polacek <polacek@redhat.com>
5866 * c-typeck.c (default_conversion): Use better location for
5869 2014-04-30 Marek Polacek <polacek@redhat.com>
5871 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5872 also when SANITIZE_FLOAT_DIVIDE is on.
5874 2014-04-30 Marek Polacek <polacek@redhat.com>
5877 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5878 and pedwarn_init. Use loc insted of input_location.
5880 2014-04-30 Marek Polacek <polacek@redhat.com>
5883 * c-typeck.c (build_binary_op): Use location when warning about
5886 2014-04-25 Marek Polacek <polacek@redhat.com>
5889 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5890 always_inline/noinline and hot/cold attributes.
5892 2014-04-25 Marek Polacek <polacek@redhat.com>
5895 * c-parser.c (c_parser_initelt): Pass input_location to
5896 process_init_element.
5897 (c_parser_initval): Pass loc to process_init_element.
5898 * c-tree.h (process_init_element): Adjust declaration.
5899 * c-typeck.c (push_init_level): Pass input_location to
5900 process_init_element.
5901 (pop_init_level): Likewise.
5902 (set_designator): Likewise.
5903 (output_init_element): Add location_t parameter. Pass loc to
5905 (output_pending_init_elements): Pass input_location to
5906 output_init_element.
5907 (process_init_element): Add location_t parameter. Pass loc to
5908 output_init_element.
5910 2014-04-24 Jakub Jelinek <jakub@redhat.com>
5912 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5913 atomic-clause, allow comma in between atomic-clause and
5916 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5919 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5920 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5922 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5925 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5926 create_tmp_var instead build_decl for creating temps.
5927 (build_array_notation_expr): Likewise.
5928 (fix_conditional_array_notations_1): Likewise.
5929 (fix_array_notation_expr): Likewise.
5930 (fix_array_notation_call_expr): Likewise.
5932 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5935 * c-tree.h (c_build_function_call_vec): New prototype.
5936 * c-typeck.c (build_function_call_vec): Don't call
5937 resolve_overloaded_builtin here.
5938 (c_build_function_call_vec): New wrapper function around
5939 build_function_call_vec. Call resolve_overloaded_builtin here.
5940 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5941 Call c_build_function_call_vec instead of build_function_call_vec.
5942 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5943 * c-decl.c (finish_decl): Likewise.
5945 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5948 * c-typeck.c: Use correct format string in cast-qual warning
5950 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5952 * c-decl.c (c_decl_attributes): Use
5953 lang_hooks.types.omp_mappable_type.
5954 * c-typeck.c (c_finish_omp_clauses): Likewise.
5956 2014-03-06 Marek Polacek <polacek@redhat.com>
5959 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5960 of checking tree code.
5962 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5964 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5965 (c_parser_parameter_declaration): Likewise.
5967 2014-02-19 Marek Polacek <polacek@redhat.com>
5970 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5971 Call mark_exp_read on exp.value.
5972 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5973 TREE_ADDRESSABLE on old instead of val.
5974 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5976 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5978 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5979 C_EXPR_APPEND by vec_safe_push.
5980 * c-tree.h (C_EXPR_APPEND): Remove.
5982 2014-01-31 Marek Polacek <polacek@redhat.com>
5985 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5986 build_function_call_vec.
5987 (build_function_call): Likewise.
5988 (build_atomic_assign): Likewise.
5989 (build_function_call_vec): Add arg_loc parameter. Use it.
5990 (convert_arguments): Likewise.
5991 (convert_for_assignment): Rename rhs_loc to expr_loc.
5992 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5993 (c_parser_objc_keywordexpr): Likewise.
5994 (c_parser_postfix_expression_after_primary): Call
5995 build_function_call_vec with expr_loc rather than op_loc.
5996 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5997 build_function_call_vec.
5998 (c_parser_expr_list): Add locations parameter. Fill it with locations
5999 of function arguments.
6000 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6002 2014-01-30 Marek Polacek <polacek@redhat.com>
6005 * c-typeck.c (build_function_call_vec): Use loc parameter.
6006 (convert_arguments): Add location parameter. Use it.
6007 (ep_convert_and_check): Likewise.
6008 (build_atomic_assign): Adjust convert_for_assignment call.
6009 (build_modify_expr): Likewise.
6010 (digest_init): Likewise.
6011 (c_finish_return): Likewise.
6012 (build_conditional_expr): Adjust ep_convert_and_check calls.
6013 (convert_for_assignment): Add rhs_loc parameter. Use it.
6014 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6017 2014-01-30 Richard Biener <rguenther@suse.de>
6020 * c-typeck.c (build_function_call_vec): Do not replace calls
6021 to a function via an incompatible type with a runtime abort.
6023 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6025 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6026 flag_enable_cilkplus with flag_cilkplus.
6027 (c_parser_direct_declarator_inner): Likewise.
6028 (c_parser_attribute_any_word): Likewise.
6029 (c_parser_attributes): Likewise.
6030 (c_parser_compound_statement): Likewise.
6031 (c_parser_statement_after_labels): Likewise.
6032 (c_parser_if_statement): Likewise.
6033 (c_parser_switch_statement): Likewise.
6034 (c_parser_do_statement): Likewise.
6035 (c_parser_for_statement): Likewise.
6036 (c_parser_unary_expression): Likewise.
6037 (c_parser_postfix_expression): Likewise.
6038 (c_parser_postfix_expression_after_primary): Likewise.
6039 (c_parser_postfix_expression_after_primary): Likewise.
6040 (c_parser_omp_clause_name): Likewise.
6041 (c_finish_omp_declare_simd): Likewise.
6042 (c_parser_cilk_verify_simd): Likewise.
6043 * c-typeck.c (build_array_ref): Likewise.
6044 (build_function_call_vec): Likewise.
6045 (convert_arguments): Likewise.
6046 (build_compound_expr): Likewise.
6047 (c_finish_return): Likewise.
6048 (c_finish_if_stmt): Likewise.
6049 (c_finish_loop): Likewise.
6050 (build_binary_op): Likewise.
6052 2014-01-23 Marek Polacek <polacek@redhat.com>
6055 * c-typeck.c (parser_build_binary_op): Use location instead of
6057 (build_binary_op): Pass location to shorten_compare.
6059 2014-01-23 Marek Polacek <polacek@redhat.com>
6062 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6065 2014-01-23 Marek Polacek <polacek@redhat.com>
6068 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6069 of a comma expression.
6070 (emit_side_effect_warnings): Likewise.
6072 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6075 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6076 function to use walk_tree and moved a lot of its functionality to
6077 expand_array_notations.
6078 (expand_array_notations): New function.
6080 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6082 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6083 attribute an attribute without value.
6085 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6088 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6089 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6091 2014-01-22 Marek Polacek <polacek@redhat.com>
6094 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6095 of remove_c_maybe_const_expr on op1 and op2.
6097 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6100 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6101 effects, preevaluate rhs using SAVE_EXPR first.
6103 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6106 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6107 statements with if-elseif statements.
6109 2014-01-06 Marek Polacek <polacek@redhat.com>
6112 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6113 defined bit-field types only in ISO C.
6115 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6117 Update copyright years
6119 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6121 * c-array-notation.c: Use the standard form for the copyright notice.
6123 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6125 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6126 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6127 field in parser is not empty. If not-empty, call the function
6128 c_parser_finish_omp_declare_simd.
6129 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6130 between SIMD-enabled functions and #pragma simd. Added new parameter.
6131 (c_parser_cilk_all_clauses): Modified the usage of the function
6132 c_parser_cilk_clause_vectorlength as mentioned above.
6133 (c_parser_cilk_simd_fn_vector_attrs): New function.
6134 (c_finish_cilk_simd_fn_tokens): Likewise.
6135 (is_cilkplus_vector_p): Likewise.
6136 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6137 "nomask," and "mask" strings in clause name.
6138 (c_parser_omp_all_clauses): Added 3 new case statements:
6139 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6140 PRAGMA_CILK_CLAUSE_NOMASK.
6141 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6142 check for vector attribute and if so call the function
6143 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6144 called the function c_finish_cilk_simd_fn_tokens.
6145 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6146 parser field is non-empty. If so, parse them as you would parse
6147 the omp declare simd pragma.
6148 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6149 Added a check when step is a parameter and flag it as error.
6150 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6151 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6154 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6156 * c-parser.c (c_parser_omp_parallel): Fix description.
6158 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6160 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6161 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6162 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6163 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6165 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6168 * c-parser.c (c_parser_alignas_specifier): Use
6169 c_sizeof_or_alignof_type instead of c_alignof.
6170 (c_parser_alignof_expression): Likewise, with min_alignof
6171 parameter depending on alignof spelling used.
6173 2013-12-04 Marek Polacek <polacek@redhat.com>
6176 * c-decl.c (start_function): Don't warn for missing prototype for
6179 2013-12-03 Marek Polacek <polacek@redhat.com>
6182 * c-decl.c (build_compound_literal): Allow compound literals with
6183 empty initial value.
6185 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6188 * c-typeck.c (build_modify_expr): Diagnose assignment to
6189 expression with array type.
6191 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6194 * c-typeck.c (process_init_element): Do not treat a string as
6195 initializing a whole array when used with a designator for an
6198 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6201 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6202 an inline function following a static declaration.
6204 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6207 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6208 to p_name before calling c_parser_omp_teams instead of after.
6209 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6210 argument. Remove unused p_name variable.
6212 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6213 Jakub Jelinek <jakub@redhat.com>
6215 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6216 external_scope is NULL.
6218 2013-11-27 Tom de Vries <tom@codesourcery.com>
6219 Marc Glisse <marc.glisse@inria.fr>
6222 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6224 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6226 * c-typeck.c: Add required include files from gimple.h.
6228 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6230 * c-decl.c (define_label, shadow_tag_warned)
6231 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6232 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6233 (declspecs_add_type): Remove use of in_system_header macro.
6234 * c-parser.c (c_parser_unary_expression): Likewise.
6235 * c-typeck.c (store_init_value, process_init_element)
6236 (c_start_case): Likewise.
6238 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6241 * c-parser.c (c_parser_set_source_position_from_token): Remove
6242 reference to in_system_header from comment.
6244 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6246 * c-decl.c (grokdeclarator): Update comment to refer to
6247 tree_to_[su]hwi rather than tree_low_cst.
6249 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6251 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6252 tree_to_uhwi throughout.
6254 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6256 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6259 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6261 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6264 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6266 * c-parser.c (c_parser_cilk_simd): New.
6267 (c_parser_cilk_verify_simd): New.
6268 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6269 (c_parser_omp_for_loop): Add case for NE_EXPR.
6270 Set c_break_label for CILK_SIMD.
6271 (c_parser_cilk_clause_vectorlength): New.
6272 (c_parser_cilk_clause_linear): New.
6273 (c_parser_cilk_clause_name): New.
6274 (c_parser_cilk_all_clauses): New.
6275 * c-typeck.c (build_unary_op): Pass location argument to
6277 (build_modify_expr): Same.
6278 (build_asm_expr): Same.
6279 (c_finish_bc_stmt): Error on break/continue in loops.
6281 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6283 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6285 2013-11-14 Diego Novillo <dnovillo@google.com>
6287 * c-decl.c: Include print-tree.h.
6288 Include stor-layout.h.
6291 Include stringpool.h.
6292 * c-lang.c: Include fold-const.h.
6293 * c-parser.c: Include stringpool.h.
6295 Include stor-layout.h.
6297 Include trans-mem.h.
6298 * c-typeck.c: Include stor-layout.h.
6299 Include trans-mem.h.
6303 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6305 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6306 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6308 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6309 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6311 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6312 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6313 (c_parser_declarator, c_parser_direct_declarator_inner)
6314 (c_parser_parameter_declaration, c_parser_type_name): All callers
6316 (c_parser_declaration_or_fndef): Handle declarations with type
6317 determined from the initializer.
6319 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6321 * c-typeck.c: Include gimplify.h.
6323 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6325 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6326 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6328 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6329 or _Thread_local as appropriate in diagnostics.
6330 (build_null_declspecs): Initialize ret->thread_gnu_p.
6331 (declspecs_add_scspec): Handle either __thread or _Thread_local
6332 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6333 pedantic. Do not disallow _Thread_local extern and _Thread_local
6336 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6337 Andrew MacLeod <amacleod@redhat.com>
6339 * c-aux-info.c (gen_type): Handle atomic qualifier.
6340 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6341 qualifiers when compating types.
6342 (shadow_tag_warned): Handle atomic_p in declspecs.
6343 (quals_from_declspecs): Likewise.
6344 (start_decl): Use c_type_promotes_to when promoting argument
6346 (grokdeclarator): Handle _Atomic.
6347 (get_parm_info): Diagnose any qualifier on "void" as only
6349 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6350 comparing types. Use c_type_promotes_to when promoting argument
6352 (finish_function): Use c_type_promotes_to when promoting argument
6354 (build_null_declspecs): Handle atomic_p in declspecs.
6355 (declspecs_add_qual): Handle RID_ATOMIC.
6356 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6357 (c_token_starts_declspecs): Handle RID_ATOMIC.
6358 (c_parser_declspecs): Handle atomic type specifiers and
6360 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6361 from types of expressions with atomic type.
6362 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6363 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6364 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6365 (c_parser_statement_after_labels, c_parser_switch_statement)
6366 (c_parser_for_statement, c_parser_expr_no_commas)
6367 (c_parser_conditional_expression, c_parser_binary_expression)
6368 (c_parser_cast_expression, c_parser_unary_expression)
6369 (c_parser_postfix_expression)
6370 (c_parser_postfix_expression_after_primary, c_parser_expression):
6371 Use convert_lvalue_to_rvalue.
6372 (c_parser_expression_conv, c_parser_expr_list): Document
6373 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6374 (c_parser_objc_synchronized_statement): Use
6375 convert_lvalue_to_rvalue.
6376 (c_parser_objc_selector): Handle RID_ATOMIC.
6377 (c_parser_objc_receiver, c_parser_array_notation): Use
6378 convert_lvalue_to_rvalue.
6379 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6380 _Atomic (type-name).
6381 (struct c_declspecs): Add atomic_p field.
6382 (convert_lvalue_to_rvalue): Declare.
6383 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6384 corresponding atomic types.
6385 (qualify_type): Don't add _Atomic qualifiers from second argument.
6386 (comp_target_types): Do not allow _Atomic mismatches.
6387 (type_lists_compatible_p): Do not remove atomic qualifiers when
6389 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6390 (build_atomic_assign): New functions.
6391 (build_unary_op): Use build_atomic_assign for atomic increment and
6393 (build_conditional_expr): Do not treat _Atomic void as a qualified
6395 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6396 (find_anonymous_field_with_type, convert_to_anonymous_field)
6397 (convert_for_assignment): Do not remove atomic qualifiers when
6399 (digest_init): Do not accept initialization of arrays of atomic
6400 elements by string constants.
6401 (build_asm_expr): Use convert_lvalue_to_rvalue.
6402 (build_binary_op): Do not treat _Atomic void as a qualified
6405 2013-11-06 DJ Delorie <dj@redhat.com>
6407 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6408 both explicit and builtin, print the location of the explicit one.
6410 2013-11-05 Tobias Burnus <burnus@net-b.de>
6412 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6413 c_parser_omp_distribute, c_parser_omp_teams,
6414 c_parser_omp_target, c_parser_omp_declare): Handle
6417 2013-11-03 Marek Polacek <polacek@redhat.com>
6419 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6421 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6423 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6424 check_dup_generic at the end, unless remove is true.
6425 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6427 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6429 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6431 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6432 with decl that is not pointer nor array.
6434 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6436 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6437 a spawning function is found.
6438 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6439 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6440 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6441 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6443 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6444 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6446 (c_finish_return): Added a check to reject _Cilk_spawn in return
6448 (build_cilk_spawn): New function.
6449 (build_cilk_sync): Likewise.
6450 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6452 2013-10-27 Tobias Burnus <burnus@net-b.de>
6455 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6456 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6457 (c_parser_statement_after_labels): Update calls.
6459 2013-10-24 Tobias Burnus <burnus@net-b.de>
6462 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6463 Handle PRAGMA_IVDEP.
6464 (c_parser_statement_after_labels): Update call.
6466 2013-10-24 Marek Polacek <polacek@redhat.com>
6468 * c-parser.c (c_parser_struct_declaration): Add a comment.
6469 (c_parser_declarator): Don't allow _Alignas here.
6471 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6473 * c-parser.c: Include omp-low.h.
6474 * c-typeck.c: Likewise.
6476 2013-10-17 Marek Polacek <polacek@redhat.com>
6479 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6480 Document syntax of the array-declarator.
6481 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6483 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6484 (c_parser_struct_declaration): Likewise.
6485 (c_parser_declarator): Likewise.
6486 (c_parser_direct_declarator_inner): Likewise.
6487 (c_parser_parameter_declaration): Likewise.
6488 (c_parser_type_name): Likewise.
6490 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6492 * c-lang.h (current_omp_declare_target_attribute): New extern
6494 * c-parser.c: Include c-lang.h.
6495 (struct c_parser): Change tokens to c_token *.
6496 Add tokens_buf field. Change tokens_avail type to unsigned int.
6497 (c_parser_consume_token): If parser->tokens isn't
6498 &parser->tokens_buf[0], increment parser->tokens.
6499 (c_parser_consume_pragma): Likewise.
6500 (enum pragma_context): Add pragma_struct and pragma_param.
6501 (c_parser_external_declaration): Adjust
6502 c_parser_declaration_or_fndef caller.
6503 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6504 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6505 Adjust recursive call.
6506 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6508 (c_parser_parameter_declaration): Use pragma_param instead of
6510 (c_parser_compound_statement_nostart, c_parser_label,
6511 c_parser_for_statement): Adjust
6512 c_parser_declaration_or_fndef callers.
6513 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6514 it through to c_parser_conditional_expression.
6515 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6516 pass it through to c_parser_binary_expression. Adjust recursive
6518 (c_parser_binary_expression): Remove prec argument, add
6519 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6520 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6521 binop matches it, use build2 instead of parser_build_binary_op.
6522 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6523 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6524 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6525 Handle pragma_struct and pragma_param the same as pragma_external.
6526 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6527 (c_parser_omp_variable_list): Parse array sections for
6528 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6529 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6530 (c_parser_omp_clause_reduction): Handle user defined reductions.
6531 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6532 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6533 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6534 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6535 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6536 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6537 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6538 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6539 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6540 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6541 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6542 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6543 (c_parser_omp_for_loop): Add CODE argument, pass it through
6544 to c_finish_omp_for. Change last argument to cclauses,
6545 and adjust uses to grab parallel clauses from the array of all
6546 the split clauses. Adjust c_parser_binary_expression,
6547 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6548 (omp_split_clauses): New function.
6549 (c_parser_omp_simd): New function.
6550 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6551 Allow the function to be called also when parsing combined constructs,
6552 and call c_parser_omp_simd when parsing for simd.
6553 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6554 #pragma omp section, require exactly one structured-block instead of
6555 sequence of statements.
6556 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6557 Allow the function to be called also when parsing combined constructs.
6558 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6559 Allow the function to be called also when parsing combined
6561 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6562 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6563 c_parser_omp_teams, c_parser_omp_target_data,
6564 c_parser_omp_target_update, c_parser_omp_target,
6565 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6566 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6567 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6568 (c_parser_omp_construct): Add p_name and mask vars. Handle
6569 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6570 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6571 and c_parser_omp_sections callers.
6572 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6573 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6574 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6575 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6576 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6578 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6579 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6580 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6581 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6582 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6583 * c-typeck.c: Include tree-inline.h.
6584 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6585 handle_omp_array_sections_1, handle_omp_array_sections,
6586 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6587 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6588 user defined reductions.
6589 (c_tree_equal): New function.
6590 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6591 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6592 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6593 c_check_omp_declare_reduction_r): New prototypes.
6594 * c-decl.c (current_omp_declare_target_attribute): New variable.
6595 (c_decl_attributes): New function.
6596 (start_decl, start_function): Use it instead of decl_attributes.
6597 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6598 c_omp_reduction_decl, c_omp_reduction_lookup,
6599 c_check_omp_declare_reduction_r): New functions.
6601 2013-09-25 Tom Tromey <tromey@redhat.com>
6603 * Make-lang.in (c/gccspec.o): Remove.
6604 (CFLAGS-c/gccspec.o): New variable.
6605 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6606 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6607 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6609 2013-09-25 Tom Tromey <tromey@redhat.com>
6611 * Make-lang.in (c/gccspec.o): Don't use subshell.
6613 2013-09-18 Marek Polacek <polacek@redhat.com>
6616 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6617 Remove unnecessary check.
6619 2013-09-18 Marek Polacek <polacek@redhat.com>
6622 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6623 no_sanitize_undefined attribute.
6625 2013-09-13 Kai Tietz <ktietz@redhat.com>
6628 * c-decl.c (c_builtin_function_ext_scope): Remove
6629 wrong assumption that it is never called on prexisting
6632 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6634 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6636 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6638 * c-objc-common.c (c_tree_printer): Tidy.
6640 2013-08-30 Marek Polacek <polacek@redhat.com>
6642 * c-typeck.c (build_binary_op): Add division by zero and shift
6645 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6646 Joseph Myers <joseph@codesourcery.com>
6649 * c-typeck.c (c_common_type): Prefer double_type_node over
6650 other REAL_TYPE types with the same precision.
6651 (convert_arguments): Likewise.
6653 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6655 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6656 (c_initialize_diagnostics): Call a destructor for the early printer.
6658 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6660 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6661 printer initialization.
6663 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
6666 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6667 check for truth values.
6668 (expand_array_notation_exprs): Added truth values case. Removed an
6669 unwanted else. Added for-loop to walk through subtrees in default
6672 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6674 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6676 2013-07-23 Joseph Myers <joseph@codesourcery.com>
6678 * c-parser.c (struct c_generic_association): Fix typo.
6680 2013-07-23 Tom Tromey <tromey@redhat.com>
6681 Joseph Myers <joseph@codesourcery.com>
6683 * c-parser.c (struct c_generic_association): New.
6684 (c_generic_association_d): New typedef.
6685 (c_parser_generic_selection): New function.
6686 (c_parser_postfix_expression): Handle RID_GENERIC.
6688 2013-07-13 Jason Merrill <jason@redhat.com>
6691 * c-decl.c (finish_struct): Check for too-large class.
6693 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6696 * c-typeck.c (set_init_index): When folding, check for index overflow.
6698 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6700 * c-parser.c (c_parser_array_notation): Removed rejection of array
6701 notations in an array of function pointers.
6703 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6705 * c-array-notation.c (make_triplet_val_inv): New function.
6706 (create_cmp_incr): Likewise.
6707 (create_array_refs): Likewise.
6708 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6709 Also modularized common parts between functions and called the function.
6710 (build_array_notation_expr): Likewise.
6711 (fix_conditional_array_notations_1): Likewise.
6712 (fix_array_notation_expr): Likewise.
6713 (fix_array_notation_call_expr): Likewise.
6715 2013-06-18 Marek Polacek <polacek@redhat.com>
6718 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6720 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6722 * c-array-notation.c (build_array_notation_expr): Reject array notation
6723 mismatch between LHS and RHS even inside a call_expr. Also, removed
6724 a couple while statements that were dead code.
6726 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6728 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6729 excessive precision expressions in function parameters. Also removed
6730 couple unwanted while statements.
6732 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6734 * c-array-notation.c (expand_array_notation_exprs): Added
6735 ARRAY_NOTATION_REF case.
6737 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6739 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6740 function to c-family/array-notation-common.c.
6741 (is_cilkplus_reduce_builtin): Likewise.
6742 (find_rank): Likewise.
6743 (extract_array_notation_exprs): Likewise.
6744 (replace_array_notations): Likewise.
6745 (find_inv_trees): Likewise.
6746 (replace_inv_trees): Likewise.
6747 (contains_array_notation_expr): Likewise.
6748 (find_correct_array_notation_type): Likewise.
6749 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6750 (struct inv_list): Moved this to c-family/array-notation-common.c.
6751 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6753 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6755 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6756 reduction functions outside the for-loop. Added a check if the fundecl
6757 is non-NULL. Finally, removed an unwanted if-statement, and made the
6760 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6762 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6763 condition of the if-statement matches the rank of else-block and then-
6764 block when array notations are used.
6765 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6766 expression after the entire function body is parsed.
6767 (c_parser_expr_no_commas): Delayed creating array notation expressions
6768 to the end of function parsing.
6769 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6770 whole if-statement instead of just the condition.
6771 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6773 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6776 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6777 array to NULL_TREE if they are unused. Also added a check for the
6778 field to be NULL before its fields are used in future.
6780 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6783 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6784 (build_array_notation_expr): Likewise.
6786 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6788 * c-typeck.c (build_array_ref): Added a check to see if array's
6789 index is greater than one. If true, then emit an error.
6790 (build_function_call_vec): Exclude error reporting and checking
6791 for builtin array-notation functions.
6792 (convert_arguments): Likewise.
6793 (c_finish_return): Added a check for array notations as a return
6794 expression. If true, then emit an error.
6795 (c_finish_loop): Added a check for array notations in a loop
6796 condition. If true then emit an error.
6797 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6798 (build_binary_op): Added a check for array notation expr inside
6799 op1 and op0. If present, we call another function to find correct
6801 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6802 * c-parser.c (c_parser_compound_statement): Check if array
6803 notation code is used in tree, if so, then transform them into
6805 (c_parser_expr_no_commas): Check if array notation is used in LHS
6806 or RHS, if so, then build array notation expression instead of
6808 (c_parser_postfix_expression_after_primary): Added a check for
6809 colon(s) after square braces, if so then handle it like an array
6810 notation. Also, break up array notations in unary op if found.
6811 (c_parser_direct_declarator_inner): Added a check for array
6813 (c_parser_compound_statement): Added a check for array notation in
6814 a stmt. If one is present, then expand array notation expr.
6815 (c_parser_if_statement): Likewise.
6816 (c_parser_switch_statement): Added a check for array notations in
6817 a switch statement's condition. If true, then output an error.
6818 (c_parser_while_statement): Similarly, but for a while.
6819 (c_parser_do_statement): Similarly, but for a do-while.
6820 (c_parser_for_statement): Similarly, but for a for-loop.
6821 (c_parser_unary_expression): Check if array notation is used in a
6822 pre-increment or pre-decrement expression. If true, then expand
6824 (c_parser_array_notation): New function.
6825 * c-array-notation.c: New file.
6826 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6828 2013-05-23 Mike Stump <mikestump@comcast.net>
6830 * c-typeck.c (convert_for_assignment): Handle references to memory
6833 2013-05-16 Jason Merrill <jason@redhat.com>
6835 * Make-lang.in (cc1$(exeext)): Use link mutex.
6837 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6839 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6840 to simply use OPT_Wpointer_arith.
6841 (build_unary_op): Likewise.
6843 2013-04-03 Jakub Jelinek <jakub@redhat.com>
6846 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6847 argument. If set, or it temporarily for parsing of the first
6848 argument into force_folding_builtin_constant_p.
6849 (c_parser_postfix_expression): Adjust callers.
6851 2013-03-21 Richard Biener <rguenther@suse.de>
6853 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6854 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6856 2013-02-12 Marek Polacek <polacek@redhat.com>
6859 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6862 2013-01-24 Jakub Jelinek <jakub@redhat.com>
6865 * c-typeck.c (set_nonincremental_init_from_string): If
6866 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6868 (process_init_element): Likewise.
6870 2012-12-20 Jakub Jelinek <jakub@redhat.com>
6873 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6874 argument, don't call default_function_array_conversion
6875 nor c_fully_fold here.
6876 (c_parser_asm_statement): Adjust callers.
6877 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6878 and outputs here, and call default_function_array_conversion
6879 on inputs that don't need to be addressable.
6881 2012-12-18 Jakub Jelinek <jakub@redhat.com>
6884 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6885 warning require that both c_common_unsigned_type as well as
6886 c_common_signed_type is the same for both mvl and mvr types.
6888 2012-11-16 Diego Novillo <dnovillo@google.com>
6890 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6892 * c-common.c: Use new vec API in vec.h.
6893 * c-common.h: Likewise.
6894 * c-gimplify.c: Likewise.
6895 * c-pragma.c: Likewise.
6896 * c-pretty-print.c: Likewise.
6897 * c-pretty-print.h: Likewise.
6898 * c-semantics.c: Likewise.
6899 * c-decl.c: Likewise.
6900 * c-parser.c: Likewise.
6901 * c-tree.h: Likewise.
6902 * c-typeck.c: Likewise.
6904 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6907 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6909 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6912 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6913 shadows a function, unless the variable is a function or a
6914 pointer-to-function.
6916 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6919 * c-parser.c (struct c_tree_loc_pair): Removed.
6920 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6921 add location_t * and tree * arguments, fill in array of 3
6922 sizeof_arg trees and corresponding locs.
6923 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6924 c_parser_expr_list callers.
6925 (c_parser_postfix_expression_after_primary): Likewise. Pass
6926 array of 3 sizeof_arg trees and locs (corresponding to first
6927 3 arguments) to sizeof_pointer_memaccess_warning.
6929 2012-10-09 Lawrence Crowl <crowl@google.com>
6931 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6932 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6935 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6938 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6941 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
6944 * c-typeck.c: Include c-common.h.
6945 (enum stv_conv): Moved to c-common.h.
6946 (scalar_to_vector): Moved to c-common.c.
6947 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6948 * Make-lang.in: c-typeck.c depends on c-common.h.
6950 2012-10-04 Arnaud Charlet <charlet@adacore.com>
6952 * c-decl.c (c_write_global_declarations): Fix handling of
6955 2012-09-30 Sharad Singhai <singhai@google.com>
6957 * c-decl.c (c_write_global_declarations): Use a different method
6958 to determine if the dump has ben initialized.
6960 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6963 * c-typeck.c (c_cast_expr): When casting to a type requiring
6964 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6967 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6970 * c-typeck.c (build_unary_op): Pass original argument of
6971 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6972 any C_MAYBE_CONST_EXPR, if it has integer operands.
6973 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6974 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6975 to c_objc_common_truthvalue_conversion, then remove any
6976 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6977 c_objc_common_truthvalue_conversion not
6978 c_common_truthvalue_conversion.
6979 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6980 call note_integer_operands for arguments with integer operands
6981 that are not integer constants.
6983 2012-09-13 Jakub Jelinek <jakub@redhat.com>
6986 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6987 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6989 2012-08-31 Jakub Jelinek <jakub@redhat.com>
6992 * c-convert.c (convert): Don't call fold_convert_loc if
6993 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6994 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6995 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6997 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7000 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7001 for nested and empty_ok arguments in the call to
7002 c_parser_declaration_or_fndef.
7004 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7006 * c-tree.h (c_last_sizeof_arg): Declare.
7007 * c-parser.c (struct c_tree_loc_pair): New type.
7008 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7010 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7011 (c_parser_postfix_expression_after_primary): Likewise. Call
7012 sizeof_pointer_memaccess_warning if needed.
7013 (sizeof_ptr_memacc_comptypes): New function.
7014 * c-typeck.c (c_last_sizeof_arg): New global variable.
7015 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7017 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7019 * c-lang.h (lang_decl): Add variable_size GTY option.
7021 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7023 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7024 * Make-lang.in: Fix dependencies.
7026 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7028 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7029 and add language Makefile hooks.
7030 * config-lang.in: New file.
7031 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7032 add the required "normal" config-lang.in rules.
7033 * c-lang.h: Moved from gcc/ to here.
7034 * c-tree.h: Likewise.
7035 * c-objc-common.c: Likewise.
7036 * c-objc-common.h: Likewise.
7037 * c-typeck.c: Likewise.
7038 * c-convert.c: Likewise.
7039 * c-lang.c: Likewise.
7040 * c-aux-info.c: Likewise.
7041 * c-errors.c: Likewise.
7042 * gccspec.c: Likewise.
7043 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7044 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7046 Copyright (C) 2012-2020 Free Software Foundation, Inc.
7048 Copying and distribution of this file, with or without modification,
7049 are permitted in any medium without royalty provided the copyright
7050 notice and this notice are preserved.