1 2020-01-22 Joseph Myers <joseph@codesourcery.com>
4 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
5 argument with integer operands.
7 2020-01-16 Kerem Kat <keremkat@gmail.com>
10 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
11 to support 4 available tokens.
13 2020-01-15 Joseph Myers <joseph@codesourcery.com>
16 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
17 determine whether to set DECL_CONTEXT.
19 2020-01-13 Joseph Myers <joseph@codesourcery.com>
22 * c-typeck.c (build_c_cast): Check for expressions with integer
23 operands that can occur in an unevaluated part of an integer
24 constant expression and call note_integer_operands as needed.
26 2019-01-08 Richard Biener <rguenther@suse.de>
29 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
32 2020-01-01 Jakub Jelinek <jakub@redhat.com>
34 Update copyright years.
36 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
38 * c-decl.c (collect_source_ref_cb): Delete.
39 (for_each_global_decl): Rename into...
40 (collect_source_refs): ...this. Call collect_source_ref directly.
41 (c_parse_final_cleanups): Always call collect_source_ref on the main
44 2019-12-19 Julian Brown <julian@codesourcery.com>
45 Cesar Philippidis <cesar@codesourcery.com>
47 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
49 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
50 Allow deref (->) in variable lists if true.
51 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
52 Pass to c_parser_omp_variable_list.
53 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
54 call to c_parser_omp_variable_list.
55 (c_parser_oacc_all_clauses): Support attach and detach clauses.
56 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
57 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
58 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
59 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
60 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
61 and detach. Support deref.
62 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
63 GOMP_MAP_ALWAYS_POINTER for OpenACC.
64 (c_oacc_check_attachments): New function.
65 (c_finish_omp_clauses): Check attach/detach arguments for being
66 pointers using above. Support deref.
68 2019-12-19 Julian Brown <julian@codesourcery.com>
69 Maciej W. Rozycki <macro@codesourcery.com>
70 Tobias Burnus <tobias@codesourcery.com>
71 Thomas Schwinge <thomas@codesourcery.com>
73 * c-parser.c (c_parser_omp_clause_name): Support no_create.
74 (c_parser_oacc_data_clause): Likewise.
75 (c_parser_oacc_all_clauses): Likewise.
76 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
77 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
78 PRAGMA_OACC_CLAUSE_NO_CREATE.
79 * c-typeck.c (handle_omp_array_sections): Support
82 2019-12-09 David Malcolm <dmalcolm@redhat.com>
84 * c-objc-common.c (range_label_for_type_mismatch::get_text):
85 Replace label_text ctor calls.
87 2019-12-04 Joseph Myers <joseph@codesourcery.com>
91 * c-typeck.c (convert_lvalue_to_rvalue): Call
92 require_complete_type for arguments not of void types.
93 (build_indirect_ref): Do not diagnose dereferencing pointers to
95 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
97 2019-12-03 Joseph Myers <joseph@codesourcery.com>
100 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
101 old-style parameter definitions.
103 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
107 * c-decl.c (flexible_array_type_p): Move to common code.
109 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
111 * c-decl.c (start_decl): Allow initialization of variables whose
112 size is a POLY_INT_CST.
113 (finish_decl): Use verify_type_context to check whether the target
114 allows variables with a particular type to have static or thread-local
115 storage duration. Don't raise a second error if such variables do
116 not have a constant size.
117 (grokdeclarator): Use verify_type_context to check whether the
118 target allows fields or array elements to have a particular type.
119 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
120 the target allows pointer difference for the types involved.
121 (build_unary_op): Likewise for pointer increment and decrement.
123 2019-11-29 Joseph Myers <joseph@codesourcery.com>
125 * c-parser.c (struct c_parser): Add members raw_tokens and
127 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
128 using previously-lexed raw tokens.
129 (c_parser_peek_nth_token_raw)
130 (c_parser_check_balanced_raw_token_sequence): New functions.
131 (c_parser_nth_token_starts_std_attributes): Use
132 c_parser_check_balanced_raw_token_sequence for Objective-C.
134 2019-11-25 Joseph Myers <joseph@codesourcery.com>
137 * c-decl.c (finish_declspecs): Use int instead of decimal
138 floating-point types if decimal floating-point not supported.
140 2019-11-25 Joseph Myers <joseph@codesourcery.com>
142 * c-tree.h (struct c_declarator): Use a structure for id member.
143 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
144 declarators at the start, not when handling individual declarators
145 later. Use u.id.id instead of u.id.
146 (grokfield): Use u.id.id instead of u.id.
147 (build_id_declarator): Set u.id.id and u.id.attrs.
148 (finish_declspecs): Handle postfix attributes in case of typedef
150 * c-parser.c (c_parser_direct_declarator)
151 (c_parser_direct_declarator_inner): Place declarator for
152 attributes inside that for function or array, not outside. Set
153 u.id.attrs for identifiers.
154 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
155 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
158 2019-11-22 Jakub Jelinek <jakub@redhat.com>
161 * c-decl.c (identifier_global_tag): Define.
163 2019-11-20 Richard Biener <rguenther@suse.de>
166 * c-decl.c (grokdeclarator): Prevent inlining of nested
167 function with VLA arguments.
169 2019-11-20 Joseph Myers <joseph@codesourcery.com>
171 * c-decl.c (c_warn_type_attributes): New function.
172 (groktypename, grokdeclarator, finish_declspecs): Call
173 c_warn_type_attributes before applying attributes to types.
174 * c-tree.h (c_warn_type_attributes): Declare.
176 2019-11-19 Joseph Myers <joseph@codesourcery.com>
178 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
180 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
181 pedwarn for unknown standard attributes and return error_mark_node
184 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
186 * c-parser.c (c_parser_parse_rtl_body): Always call
187 run_rtl_passes, even if startwith pass is not provided.
189 2019-11-15 Joseph Myers <joseph@codesourcery.com>
191 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
192 duplicate standard attributes.
194 2019-11-15 Joseph Myers <joseph@codesourcery.com>
196 * c-decl.c (std_attribute_table): Add maybe_unused.
198 2019-11-15 Joseph Myers <joseph@codesourcery.com>
200 * c-decl.c (std_attribute_table): Add fallthrough.
201 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
202 attribute at top level.
204 2019-11-15 Joseph Myers <joseph@codesourcery.com>
206 * c-decl.c (std_attribute_table): New.
207 (c_init_decl_processing): Register attributes from
209 * c-parser.c (c_parser_attribute_arguments): Add arguments
210 require_string and allow_empty_args. All callers changed.
211 (c_parser_std_attribute): Set require_string argument for
212 "deprecated" attribute.
214 2019-11-14 Joseph Myers <joseph@codesourcery.com>
216 * c-parser.c (c_parser_postfix_expression)
217 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
218 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
220 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
222 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
223 of build_same_sized_truth_vector_type.
224 (build_vec_cmp): Likewise.
226 2019-11-14 Jakub Jelinek <jakub@redhat.com>
228 * c-parser.c (c_parser_omp_context_selector): Don't require score
229 argument to fit into shwi, just to be INTEGER_CST. Diagnose
232 * c-parser.c (c_parser_omp_context_selector): Rename
233 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
234 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
235 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
238 2019-11-14 Joseph Myers <joseph@codesourcery.com>
240 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
241 ctsk_tagfirstref_attrs.
242 (struct c_declspecs): Update description of attrs. Add
243 postfix_attrs and non_std_attrs_seen_p. Increase size of
244 typespec_kind bit-field.
245 (c_warn_unused_attributes): New declaration.
246 (parser_xref_tag): Update prototype.
247 * c-decl.c (c_warn_unused_attributes): New function.
248 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
249 ctsk_tagref_attrs. Handle attribute declarations.
250 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
251 (grokdeclarator): Handle standard attributes.
252 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
253 attributes to incomplete type reference.
254 (xref_tag): Update call to parser_xref_tag.
255 (declspecs_add_addrspace, declspecs_add_type)
256 (declspecs_add_scspec, declspecs_add_attrs): Set
257 non_std_attrs_seen_p.
258 (finish_declspecs): Apply postfix standard attributes to type.
259 * c-parser.c (c_token_starts_declspecs)
260 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
261 (c_parser_next_tokens_start_declaration): Update comments.
262 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
263 parser->tokens[2] to parser->tokens[1].
264 (c_parser_nth_token_starts_std_attributes)
265 (c_parser_std_attribute_specifier_sequence): New functions.
266 (c_parser_declaration_or_fndef): Add arguments have_attrs and
267 attrs. All callers changed. Handle standard attributes.
268 (c_parser_parms_declarator, c_parser_parms_list_declarator)
269 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
271 (c_parser_declspecs): Add arguments start_std_attr_ok and
272 end_std_attr_ok. All callers changed. Handle standard
274 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
275 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
276 (c_parser_compound_statement_nostart, c_parser_all_labels)
277 (c_parser_label, c_parser_statement, c_parser_for_statement):
278 Handle standard attributes.
279 * c-parser.h (c_parser_declspecs): Update prototype.
280 * gimple-parser.c (c_parser_gimple_declaration): Update call to
283 2019-11-12 Martin Liska <mliska@suse.cz>
285 * gimple-parser.c: Do not include params.h.
287 2019-11-12 Martin Liska <mliska@suse.cz>
289 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
290 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
293 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
294 Frederik Harwath <frederik@codesourcery.com>
297 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
298 (c_parser_oacc_kernels_parallel): Rename function to...
299 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
300 (c_parser_omp_construct): Update accordingly.
303 2019-11-11 Jakub Jelinek <jakub@redhat.com>
305 * c-parser.c (c_parser_translation_unit): Diagnose declare target
306 without corresponding end declare target.
308 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
310 * c-convert.c (convert): Only handle vector conversions if one of
311 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
313 * c-typeck.c (build_array_ref): Only allow vector indexing if the
314 vectors satisfy gnu_vector_type_p.
315 (build_unary_op): Only allow unary operators to be applied to
316 vectors if they satisfy gnu_vector_type_p.
317 (digest_init): Only allow by-element initialization of vectors
318 if they satisfy gnu_vector_type_p.
319 (really_start_incremental_init): Likewise.
320 (push_init_level): Likewise.
321 (pop_init_level): Likewise.
322 (process_init_element): Likewise.
323 (build_binary_op): Only allow binary operators to be applied to
324 vectors if they satisfy gnu_vector_type_p.
326 2019-11-08 Joseph Myers <joseph@codesourcery.com>
328 * c-decl.c (grokparms): Convert () in a function definition to
330 (store_parm_decls_oldstyle): Pedwarn for C2x.
331 (store_parm_decls): Update comment about () not generating a
334 2019-11-07 Joseph Myers <joseph@codesourcery.com>
336 * c-parser.c (c_parser_attribute_arguments): New function.
337 Factored out of c_parser_gnu_attribute.
338 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
339 (c_parser_balanced_token_sequence, c_parser_std_attribute)
340 (c_parser_std_attribute_specifier): New functions.
341 (c_parser_transaction_attributes): Use
342 c_parser_std_attribute_specifier.
344 2019-11-07 Joseph Myers <joseph@codesourcery.com>
346 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
347 lex_joined_string and translate_strings_p.
348 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
350 (c_parser_string_literal): New function.
351 (c_parser_static_assert_declaration_no_semi): Use
352 c_parser_string_literal. Do not set lex_untranslated_string.
353 (c_parser_asm_string_literal): Use c_parser_string_literal.
354 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
355 (c_parser_gnu_attributes): Set and restore translate_strings_p
356 instead of lex_untranslated_string.
357 (c_parser_asm_statement): Do not set lex_untranslated_string.
358 (c_parser_asm_operands): Likewise.
359 (c_parser_has_attribute_expression): Set and restore
360 translate_strings_p instead of lex_untranslated_string.
361 (c_parser_postfix_expression): Use c_parser_string_literal.
362 (pragma_lex): Likewise.
363 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
364 (c_parse_file): Set translate_strings_p.
365 * gimple-parser.c (c_parser_gimple_postfix_expression)
366 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
367 * c-parser.c (c_parser_string_literal): Declare function.
369 2019-11-02 Jakub Jelinek <jakub@redhat.com>
371 * c-parser.c (c_finish_omp_declare_variant): Use
372 omp_get_context_selector instead of c_omp_get_context_selector.
374 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
376 * c-tree.h (c_simulate_enum_decl): Declare.
377 * c-decl.c (c_simulate_enum_decl): New function.
378 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
380 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
382 * c-tree.h (c_simulate_builtin_function_decl): Declare.
383 * c-decl.c (c_simulate_builtin_function_decl): New function.
384 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
387 2019-10-28 Martin Sebor <msebor@redhat.com>
390 * c-decl.c (names_builtin_p): Define a new function.
392 2019-10-28 Richard Biener <rguenther@suse.de>
395 * gimple-parser.c (c_parser_parse_gimple_body): Make
396 current_bb the entry block initially to easier recover
398 (c_parser_gimple_compound_statement): Adjust.
400 2019-10-24 Jakub Jelinek <jakub@redhat.com>
402 * c-parser.c (c_finish_omp_declare_variant): Use
403 omp_context_selector_matches instead of
404 c_omp_context_selector_matches.
405 * c-decl.c (c_decl_attributes): Add "omp declare target block"
406 attribute in between declare target and end declare target
409 2019-10-15 Joseph Myers <joseph@codesourcery.com>
411 * c-parser.c (c_parser_attribute_any_word): Rename to
412 c_parser_gnu_attribute_any_word. All callers changed.
413 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
415 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
417 (c_parser_declaration_or_fndef, c_parser_declspecs)
418 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
419 (c_parser_struct_declaration, c_parser_declarator)
420 (c_parser_gnu_attribute, c_parser_compound_statement)
421 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
422 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
423 attribute-related syntax productions.
425 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
427 * c-objc-common.c (useful_aka_type_p): Replace with...
428 (get_aka_type): ...this new function. Given the original type,
429 decide which aka type to print (if any). Only look through typedefs
430 if user_facing_original_type_p.
431 (print_type): Update accordingly.
433 2019-10-14 Jakub Jelinek <jakub@redhat.com>
435 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
436 into int NESTED, if it is 2, diagnose missing commas in between
438 (c_parser_omp_context_selector): Pass 2 as last argument to
439 c_parser_omp_all_clauses.
441 2019-10-12 Jakub Jelinek <jakub@redhat.com>
443 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
444 For simd properties, put them directly into TREE_VALUE.
445 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
446 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
447 add "omp declare variant base" attribute rather than
448 "omp declare variant".
450 2019-10-11 Joseph Myers <joseph@codesourcery.com>
452 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
454 2019-10-10 Jakub Jelinek <jakub@redhat.com>
456 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
457 true, terminate processing on closing paren and don't skip to end of
459 (c_parser_omp_declare_simd): Handle also declare variant.
460 (omp_construct_selectors, omp_device_selectors,
461 omp_implementation_selectors, omp_user_selectors): New variables.
462 (c_parser_omp_context_selector,
463 c_parser_omp_context_selector_specification,
464 c_finish_omp_declare_variant): New functions.
465 (c_finish_omp_declare_simd): Handle both declare simd and
467 (c_parser_omp_declare): Handle declare variant.
469 2019-10-02 Joseph Myers <joseph@codesourcery.com>
471 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
474 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
476 * c-objc-common.c (useful_aka_type_p): New function.
477 (print_type): Use it to decide whether an aka type is worth printing.
479 2019-09-27 Jakub Jelinek <jakub@redhat.com>
482 * c-parser.c (c_parser_predefined_identifier): New function.
483 (c_parser_postfix_expression): Use it.
484 (c_parser_omp_variable_list): Parse predefined identifiers.
485 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
486 in shared and firstprivate clauses, even when they are predetermined
489 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
491 * c-typeck.c (build_function_call_vec): Take the original function
492 decl as an optional final parameter. Pass all built-in calls to
493 check_builtin_function_arguments.
495 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
498 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
499 of identifiers in the external scope only for variables and functions.
501 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
504 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
506 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
509 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
510 after determining that the first token is not
511 PRAGMA_GCC_PCH_PREPROCESS.
513 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
515 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
516 FUNCTION_DECL to the right value in the presence of nested declarators.
518 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
521 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
523 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
526 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
527 of a built_in_function.
528 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
530 2019-08-10 Jakub Jelinek <jakub@redhat.com>
532 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
533 (c_parser_omp_clause_device_type): New function.
534 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
535 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
536 (c_parser_omp_declare_target): Handle device_type clauses. Remove
537 diagnostics for declare target with clauses nested in clause-less
538 declare target declaration-definition-seq.
539 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
541 2019-08-09 Jakub Jelinek <jakub@redhat.com>
543 * c-parser.c (check_no_duplicate_clause): Simplify using
545 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
546 directive name modifiers.
547 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
550 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
551 check_no_duplicate_clause call. Comment it out, instead emit a
552 warning for duplicate dist_schedule clauses.
554 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
556 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
558 2019-08-08 Jakub Jelinek <jakub@redhat.com>
560 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
561 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
562 instead of generic_head to track duplicates.
564 2019-08-07 Jakub Jelinek <jakub@redhat.com>
566 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
567 (c_parser_omp_clause_use_device_addr): New function.
568 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
569 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
570 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
571 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
572 map or use_device_* clauses.
573 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
574 in OpenMP, require pointer type rather than pointer or array type.
575 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
577 2019-07-31 Jakub Jelinek <jakub@redhat.com>
580 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
581 even if finish is UNKNOWN_LOCATION, just use start as finish in that
584 2019-07-25 Martin Liska <mliska@suse.cz>
585 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
588 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
590 2019-07-25 Martin Liska <mliska@suse.cz>
592 * c-decl.c (merge_decls): Use new macros
593 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
595 2019-07-23 Richard Biener <rguenther@suse.de>
597 PR tree-optimization/83518
598 * gimple-parser.c (c_parser_parse_gimple_body): When we have
599 a CFG also rebuild cgraph edges.
601 2019-07-20 Jakub Jelinek <jakub@redhat.com>
603 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
604 (c_parser_omp_clause_bind): New function.
605 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
606 (OMP_LOOP_CLAUSE_MASK): Define.
607 (c_parser_omp_loop): New function.
608 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
609 loop combined with parallel or teams.
610 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
611 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
613 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
616 * c-decl.c (finish_function): Check targetm.warn_func_return
617 before issuing a -Wreturn-type warning.
619 2019-07-12 Alexandre Oliva <oliva@adacore.com>
621 * gimple-parser.c (c_parser_gimple_try_stmt): New.
622 (c_parser_compound_statement): Call it.
624 2019-07-12 Jakub Jelinek <jakub@redhat.com>
626 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
627 (c_parser_omp_clause_order): New function.
628 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
629 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
630 PRAGMA_OMP_CLAUSE_ORDER.
631 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
633 2019-07-10 Richard Biener <rguenther@suse.de>
635 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
636 _Literal (int *) &x for address literals.
638 2019-07-09 Martin Sebor <msebor@redhat.com>
641 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
643 (field_decl_cmp): Same.
644 * c-parser.c (c_parser_struct_or_union_specifier): Same.
646 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
648 2019-07-09 Martin Sebor <msebor@redhat.com>
651 * c-decl.c: Change class-key from class to struct and vice versa
652 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
653 * gimple-parser.c: Same.
655 2019-07-01 Richard Biener <rguenther@suse.de>
657 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
658 _Literal (char *) &"foo" for address literals pointing to
661 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
663 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
664 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
665 C incompatibility if alternate "__intN__" form is used.
667 2019-06-24 Martin Sebor <msebor@redhat.com>
669 * c-typeck.c (build_binary_op): Hyphenate floating-point.
671 2019-06-10 Jakub Jelinek <jakub@redhat.com>
673 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
674 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
675 (c_parser_omp_scan_loop_body): New function.
676 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
677 inscan reduction clauses.
678 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
679 non-inscan reductions on the same construct, or inscan reductions with
680 ordered or schedule clauses, or inscan array reductions.
682 2019-06-05 Martin Sebor <msebor@redhat.com>
685 * c-typeck.c (c_finish_return): Only consider functions returning
686 pointers as candidates for -Wreturn-local-addr.
688 2019-06-05 Martin Sebor <msebor@redhat.com>
690 * c-decl.c (start_decl): Adjust quoting and hyphenation
694 (start_function): Same.
695 (declspecs_add_type): Same.
696 * c-parser.c (warn_for_abs): Same.
697 * c-typeck.c (build_binary_op): Same.
699 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
702 * c-parser.c (c_finish_oacc_routine): Rework checking if already
703 marked with an OpenACC 'routine' directive.
706 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
707 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
710 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
711 clauses from "omp declare target" attribute.
713 2019-05-16 Martin Sebor <msebor@redhat.com>
715 * c-decl.c (start_decl): Quote keywords, operators, and
716 types in diagnostics.
718 * c-parser.c (c_parser_asm_statement): Same.
719 (c_parser_conditional_expression): Same.
720 (c_parser_transaction_cancel): Same.
721 * c-typeck.c (c_common_type): Same.
722 (build_conditional_expr): Same.
724 (process_init_element): Same.
725 (build_binary_op): Same.
727 2019-05-17 Richard Biener <rguenther@suse.de>
729 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
730 (c_parser_gimple_unary_expression): Likewise.
731 (c_parser_gimple_parentized_ternary_expression): New function.
733 2019-05-16 Richard Biener <rguenther@suse.de>
735 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
736 (c_parser_gimple_unary_expression): Likewise.
738 2019-05-15 Richard Biener <rguenther@suse.de>
740 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
743 2019-05-14 Richard Biener <rguenther@suse.de>
745 * gimple-parser.c (c_parser_gimple_statement): Remove
746 questionable auto-promotion to VIEW_CONVERT_EXPR.
747 (c_parser_gimple_typespec): Split out from __MEM parsing.
748 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
749 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
750 as __VIEW_CONVERT with -gimple.
752 2019-05-09 Martin Liska <mliska@suse.cz>
754 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
756 (c_parser_gimple_unary_expression): Parse also binary expression
758 (c_parser_gimple_parentized_binary_expression): New function.
760 2019-05-09 Martin Liska <mliska@suse.cz>
762 * gimple-parser.c (struct gimple_parser): Add probability.
763 for gimple_parser_edge.
764 (gimple_parser::push_edge): Add new argument probability.
765 (c_parser_gimple_parse_bb_spec): Parse also probability
767 (c_parser_parse_gimple_body): Set edge probability.
768 (c_parser_gimple_compound_statement): Consume token
769 before calling c_parser_gimple_goto_stmt.
771 (c_parser_gimple_statement): Pass new argument.
772 (c_parser_gimple_goto_stmt): Likewise.
773 (c_parser_gimple_if_stmt): Likewise.
774 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
775 * c-parser.c (c_parser_declaration_or_fndef): Pass
776 hot_bb_threshold argument.
777 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
779 (c_parser_gimple_parse_bb_spec_edge_probability): New.
781 2019-04-26 Jakub Jelinek <jakub@redhat.com>
784 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
785 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
786 (c_parser_do_statement): Likewise.
787 (c_parser_for_statement): Likewise. Formatting fixes.
788 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
789 emit DEBUG_BEGIN_STMTs if needed.
791 2019-04-19 Jakub Jelinek <jakub@redhat.com>
794 * c-typeck.c (struct c_switch): Remove outside_range_p member.
795 (c_start_case): Don't clear it.
796 (do_case): Adjust c_add_case_label caller.
797 (c_finish_case): Adjust c_do_switch_warnings caller.
800 * c-decl.c (merge_decls): If remove is main variant and
801 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
802 variant that has newdecl as TYPE_NAME if any.
804 2019-04-12 Jakub Jelinek <jakub@redhat.com>
807 * c-decl.c (merge_decls): When newdecl's type is its main variant,
808 don't try to remove it from the variant list, but instead assert
811 2019-04-01 Richard Biener <rguenther@suse.de>
814 * c-tree.h (c_get_alias_set): Declare.
815 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
816 * c-objc-common.c (c_get_alias_set): Treat enumeral types
817 as the underlying integer type.
819 2019-03-19 Martin Sebor <msebor@redhat.com>
821 PR tree-optimization/89688
822 * c-decl.c (finish_decl): Call braced_lists_to_string for more
823 kinds of initializers.
825 2019-03-19 Jakub Jelinek <jakub@redhat.com>
828 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
829 return type even if quals_used is 0. Formatting fixes.
831 2019-03-14 Richard Biener <rguenther@suse.de>
833 * c-tree.h (enum c_declspec_il): New.
834 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
836 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
837 Pass start pass and declspec_il to c_parser_parse_gimple_body.
838 (c_parser_declspecs): Adjust.
839 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
840 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
842 (struct gimple_parser): New.
843 (gimple_parser::push_edge): New method.
844 (c_parser_gimple_parse_bb_spec): New helper.
845 (c_parser_parse_gimple_body): Get start pass and IL specification.
846 Initialize SSA and CFG.
847 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
848 Build a gimple_parser parsing state and pass it along.
849 (c_parser_gimple_statement): Change intermittend __PHI internal
850 function argument for the edge.
851 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
852 (c_parser_gimple_goto_stmt): Record edges to build.
853 (c_parser_gimple_if_stmt): Likewise.
854 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
855 (c_parser_gimple_or_rtl_pass_list): Likewise.
857 2019-03-11 Martin Liska <mliska@suse.cz>
859 * c-decl.c (check_for_loop_decls): Wrap an option name
860 in a string format message and fix GNU coding style.
861 * c-parser.c (c_parser_declspecs): Likewise.
863 2019-03-08 Jakub Jelinek <jakub@redhat.com>
865 PR tree-optimization/89550
866 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
868 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
869 or warning returned true.
871 2019-02-28 Jakub Jelinek <jakub@redhat.com>
874 * c-typeck.c (convert_arguments): Call inform_declaration only if
875 the previous warning_at call returned true.
877 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
879 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
880 parameter. Adjust all users.
881 (c_parser_oacc_simple_clause): Replace parser with loc formal
882 parameter. Adjust all users.
884 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
887 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
888 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
890 2019-02-15 Jakub Jelinek <jakub@redhat.com>
893 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
894 before c_decl_attributes rather than after it.
896 2019-02-06 Jakub Jelinek <jakub@redhat.com>
899 * c-parser.c (c_parser_declaration_or_fndef): Don't update
900 DECL_ARGUMENTS of d if it has been defined already. Use a single if
901 instead of 3 nested ifs.
903 2019-02-06 Joseph Myers <joseph@codesourcery.com>
906 * c-decl.c (finish_decl): Do not complete array types for arrays
907 with external linkage not at file scope.
909 2019-02-05 Richard Biener <rguenther@suse.de>
912 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
913 all type variants when not supported.
915 2019-01-30 Jakub Jelinek <jakub@redhat.com>
918 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
919 * c-decl.c (decl_jump_unsafe): Return false for
920 C_DECL_COMPOUND_LITERAL_P decls.
921 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
923 2019-01-29 Jakub Jelinek <jakub@redhat.com>
926 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
930 * c-decl.c (last_fileptr_type): Remove.
931 (last_structptr_types): New variable.
932 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
933 {old,new}rettype instead of the types themselves. Assert
934 last_structptr_types array has the same number of elements
935 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
936 argument oldtype and newtype. Instead of handling
937 just fileptr_type_node specially, handle all builtin_structptr_types
938 pointer nodes. Formatting fix.
940 2019-01-24 Martin Sebor <msebor@redhat.com>
945 * c-decl.c (match_builtin_function_types): Add arguments.
946 (diagnose_mismatched_decls): Diagnose mismatched declarations
947 of built-ins more strictly.
949 2019-01-24 Jakub Jelinek <jakub@redhat.com>
952 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
953 on #pragma omp cancel with different modifiers.
955 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
959 * c-typeck.c (convert_for_assignment): Upate the
960 warn_for_address_or_pointer_of_packed_member call.
962 2019-01-16 Tom Honermann <tom@honermann.net>
963 Jason Merrill <jason@redhat.com>
965 * c-typeck.c (digest_init): Revised the error message produced for
966 ill-formed cases of array initialization with a string literal.
967 (error_init): Make variadic.
969 2019-01-12 Jakub Jelinek <jakub@redhat.com>
971 * c-typeck.c (convert_for_assignment): Fix a comment typo.
973 2019-01-07 Jakub Jelinek <jakub@redhat.com>
976 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
977 if current_function_decl is non-NULL.
979 2019-01-07 Joseph Myers <joseph@codesourcery.com>
983 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
984 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
985 functions declared but never defined only for external scope, not
988 2019-01-07 Jakub Jelinek <jakub@redhat.com>
991 * c-parser.c (c_parser_postfix_expression): Parse
992 __builtin_convertvector.
994 2019-01-01 Jakub Jelinek <jakub@redhat.com>
996 Update copyright years.
998 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1001 * c-typeck.c (convert_for_assignment): Call
1002 warn_for_address_or_pointer_of_packed_member.
1004 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1006 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1007 a more specific error message (instead of just falling through).
1009 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1011 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1012 asm qualifier is first seen; use that to give nicer "duplicate asm
1013 qualifier" messages. Delete 'quals" variable, instead pass the
1014 "is_volatile_ flag to build_asm_stmt directly.
1015 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1016 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1018 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1020 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1021 "done" boolean variable.
1023 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1026 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1027 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1028 (build_binary_op): Use struct op_location_t and
1029 class binary_op_rich_location.
1031 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1034 * c-convert.c (convert): Call c_fully_fold before calling
1035 ubsan_instrument_float_cast.
1037 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1039 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1042 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1044 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1045 after asm. Pass a flag for it to build_asm_expr.
1046 * c-tree.h (build_asm_expr): Update declaration.
1047 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1050 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1053 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1054 combination of volatile and goto, in any order, without repetitions.
1056 2018-12-04 James Norris <jnorris@codesourcery.com>
1057 Cesar Philippidis <cesar@codesourcery.com>
1058 Julian Brown <julian@codesourcery.com>
1060 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1063 2018-11-30 Richard Biener <rguenther@suse.de>
1065 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1066 _Literal (type) { ... } as empty aggregate or vector constructor.
1068 2018-11-29 Martin Sebor <msebor@redhat.com>
1071 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1072 (convert_arguments): Add comments. Pass additional argument to
1075 2018-11-29 Martin Sebor <msebor@redhat.com>
1079 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1081 2018-11-23 Martin Sebor <msebor@redhat.com>
1084 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1085 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1087 2018-11-20 Martin Sebor <msebor@redhat.com>
1089 * c-parser.c (c_parser_has_attribute_expression): New function.
1090 (c_parser_attribute): New function.
1091 (c_parser_attributes): Move code into c_parser_attribute.
1092 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1094 2018-11-15 Martin Sebor <msebor@redhat.com>
1097 * c-decl.c (header_for_builtin_fn): Declare.
1098 (diagnose_mismatched_decls): Diagnose declarations of built-in
1099 functions without a prototype.
1100 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1101 (convert_argument): Same.
1102 (convert_arguments): Factor code out into convert_argument.
1103 Detect mismatches between built-in formal arguments in calls
1104 to built-in without prototype.
1105 (build_conditional_expr): Same.
1106 (type_or_builtin_type): New function.
1107 (convert_for_assignment): Add argument. Conditionally issue
1108 warnings instead of errors for mismatches.
1110 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1112 * c-decl.c: Replace "source_location" with "location_t".
1113 * c-tree.h: Likewise.
1114 * c-typeck.c: Likewise.
1115 * gimple-parser.c: Likewise.
1117 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1119 * c-parser.c (c_parser_omp_clause_final): Use
1120 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1121 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1122 parsing instead of c_parser_paren_condition.
1123 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1124 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1125 c_fully_fold instead of c_parser_condition.
1126 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1127 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1128 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1129 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1130 c_parser_expr_no_commas instead of c_parser_expression.
1132 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1133 reduction clause with inscan modifier.
1135 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1136 clauses other than atomic_default_mem_order.
1138 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1140 * c-parser.c: Include memmode.h.
1141 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1142 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1143 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1144 task_reduction clauses.
1145 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1146 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1147 section, or lvalue assignment expression.
1148 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1149 (c_parser_omp_clause_lastprivate): Parse optional
1150 conditional: modifier.
1151 (c_parser_omp_clause_hint): Require constant integer expression rather
1152 than just integer expression.
1153 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1155 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1156 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1157 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1159 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1160 iterators. Parse mutexinoutset and depobj kinds.
1161 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1163 (c_parser_omp_all_clauses): Likewise. Handle
1164 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1165 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1166 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1167 default memory order from requires directive if any. Adjust
1168 c_finish_omp_atomic caller.
1169 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1170 (c_parser_omp_flush): Parse flush with memory-order-clause.
1171 (c_parser_omp_for_loop): Allow NE_EXPR even in
1172 OpenMP loops, adjust c_finish_omp_for caller.
1173 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1174 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1175 Allow to be called while parsing combined parallel master.
1176 Parse combined master taskloop{, simd}.
1177 (c_parser_omp_parallel): Parse combined
1178 parallel master{, taskloop{, simd}} constructs.
1179 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1180 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1181 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1182 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1183 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1184 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1185 around teams body. Use SET_EXPR_LOCATION.
1186 (c_parser_omp_target_data): Allow target data
1187 with only use_device_ptr clauses.
1188 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1189 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1190 (c_parser_omp_requires): New function.
1191 (c_finish_taskloop_clauses): New function.
1192 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1193 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1194 declaration. Disallow in_reduction clause when combined with parallel
1196 (c_parser_omp_construct): Adjust c_parser_omp_master and
1197 c_parser_omp_taskgroup callers.
1198 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1200 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1201 like OMP_CLAUSE_REDUCTION.
1202 (handle_omp_array_sections): Likewise. Call save_expr on array
1203 reductions before calling build_index_type. Handle depend clauses
1205 (struct c_find_omp_var_s): New type.
1206 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1207 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1208 with static, runtime or auto schedule kinds. Call save_expr for whole
1209 array reduction sizes. Diagnose reductions with zero sized elements
1210 or variable length structures. Diagnose nogroup clause used with
1211 reduction clause(s). Handle depend clause with
1212 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1213 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1214 some different type for other kinds. Use build_unary_op with
1215 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1216 Handle depend clauses with iterators. Remove no longer needed special
1217 case that predetermined const qualified vars may be specified in
1218 firstprivate clause. Complain if const qualified vars are mentioned
1219 in data-sharing clauses other than firstprivate or shared. Use
1220 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1221 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1222 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1223 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1225 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1227 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1228 logic for change to name_hint::operator bool.
1229 (undeclared_variable): Likewise.
1230 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1231 (c_parser_parameter_declaration): Likewise.
1233 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1235 * c-errors.c (pedwarn_c11): New function.
1236 * c-parser.c (disable_extension_diagnostics): Save
1237 warn_c11_c2x_compat and set it to 0.
1238 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1239 (c_parser_static_assert_declaration_no_semi): Handle
1240 _Static_assert without string constant.
1241 * c-tree.h (pedwarn_c11): New prototype.
1243 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1245 * Make-lang.in (selftest-c): New.
1246 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1247 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1248 from gcc/Makefile.in.
1250 2018-10-02 Richard Biener <rguenther@suse.de>
1252 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1254 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1257 * c-typeck.c (build_binary_op): Use excess precision for
1258 comparisons of integers and floating-point for C11 and later.
1260 2018-09-26 Martin Jambor <mjambor@suse.cz>
1263 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1266 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1268 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1269 Update for new param.
1270 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1273 2018-09-17 Martin Jambor <mjambor@suse.cz>
1276 * c-parser.c: (warn_for_abs): New function.
1277 (c_parser_postfix_expression_after_primary): Call it.
1279 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1281 * c-typeck.c (digest_init): Shorten overlength strings.
1283 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1285 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1287 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1289 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1290 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1292 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1294 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1295 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1297 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1300 * c-decl.c (implicitly_declare): Update call to
1301 maybe_add_include_fixit to suggest overriding the location, as it
1303 * c-objc-common.c (c_tree_printer): Update for conversion of
1304 show_caret_p to a tri-state.
1306 2018-08-27 Martin Liska <mliska@suse.cz>
1308 * c-decl.c (locate_old_decl): Use new function
1309 fndecl_built_in_p and remove check for FUNCTION_DECL if
1311 (diagnose_mismatched_decls): Likewise.
1312 (merge_decls): Likewise.
1313 (warn_if_shadowing): Likewise.
1314 (pushdecl): Likewise.
1315 (implicitly_declare): Likewise.
1316 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1317 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1318 * c-typeck.c (build_function_call_vec): Likewise.
1319 (convert_arguments): Likewise.
1321 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1324 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1325 (diagnose_mismatched_decls): Likewise, in various places.
1326 (warn_if_shadowing): Likewise.
1327 (implicit_decl_warning): Likewise.
1328 (implicitly_declare): Likewise.
1329 (undeclared_variable): Likewise.
1330 (declare_label): Likewise.
1331 (grokdeclarator): Likewise.
1332 (start_function): Likewise.
1333 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1334 (c_parser_parameter_declaration): Likewise.
1335 (c_parser_binary_expression): Likewise.
1336 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1337 (parser_build_binary_op): Likewise.
1338 (build_unary_op): Likewise.
1339 (error_init): Likewise.
1340 (pedwarn_init): Likewise.
1341 (warning_init): Likewise.
1342 (convert_for_assignment): Likewise.
1344 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1346 * c-objc-common.c: Include "gcc-rich-location.h".
1347 (c_tree_printer): Move implemenation of '%T' to...
1348 (print_type): ...this new function.
1349 (range_label_for_type_mismatch::get_text): New function.
1350 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1351 range for the various ic_argpass cases.
1352 (class maybe_range_label_for_tree_type_mismatch): New class.
1353 (build_binary_op): Use it when calling binary_op_error.
1355 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1357 * c-decl.c (start_decl): Do not warn if variables is named as main
1358 and is a local variable.
1360 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1363 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1364 objects of unknown size.
1366 2018-08-13 Martin Sebor <msebor@redhat.com>
1368 PR tree-optimization/71625
1369 * c-parser.c (c_parser_declaration_or_fndef): Call
1370 braced_list_to_string.
1372 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1375 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1378 2018-08-01 Martin Sebor <msebor@redhat.com>
1380 PR tree-optimization/86650
1381 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1382 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1384 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1387 * c-typeck.c (init_field_decl_cmp): New function.
1388 (output_pending_init_elements): Use it for field comparisons
1389 instead of pure bit_position comparisons.
1391 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1393 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1394 type here, instead add "omp declare target implicit" attribute.
1395 (finish_decl): Diagnose vars without mappable type here.
1397 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1398 Thomas Schwinge <thomas@codesourcery.com>
1399 Cesar Philippidis <cesar@codesourcery.com>
1401 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1402 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1403 to their non-present_or_* counterparts. Make 'self' an alias to
1404 PRAGMA_OACC_CLAUSE_HOST.
1405 (c_parser_oacc_data_clause): Update GOMP mappings for
1406 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1407 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1408 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1409 Remove support for present_or_* clauses.
1410 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1411 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1412 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1413 (OACC_DATA_CLAUSE_MASK): Likewise.
1414 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1415 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1416 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1417 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1418 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1420 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1422 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1423 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1424 (c_parser_gimple_unary_expression): Likewise.
1426 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1429 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1430 before doing POINTER_DIFF_EXPR.
1432 2018-06-07 Marek Polacek <polacek@redhat.com>
1435 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1436 for loop initial declarations.
1438 2018-05-30 David Pagan <dave.pagan@oracle.com>
1441 * c-decl.c (grokdeclarator): Update check for return type warnings.
1442 (start_function): Likewise.
1443 (finish_function): Likewise.
1444 * c-typeck.c (c_finish_return): Update check for return type warnings.
1445 Pass OPT_Wreturn_type to pedwarn when appropriate.
1447 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1449 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1452 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1454 * gimple-parser.c: Include internal-fn.h.
1455 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1456 (c_parser_gimple_call_internal): New function.
1457 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1458 Fix typos in comment.
1460 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1463 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1464 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1466 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1467 fold_offsetof_1, pass argtype as TYPE to it and drop the
1470 2018-05-02 David Pagan <dave.pagan@oracle.com>
1473 * c-decl.c (old_style_parameter_scope): New function.
1474 * c-parser.c (c_parser_postfix_expression): Check for statement
1475 expressions in old-style function parameter list declarations.
1476 * c-parser.h (old_style_parameter_scope): New extern declaration.
1478 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1481 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1482 it is not TREE_STATIC.
1483 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1484 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1485 its COMPOUND_LITERAL_EXPR_DECL.
1487 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1489 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1490 where all functions return the same _FloatN or _FloatNx type,
1491 treat integer types as _Float64 instead of double.
1493 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1496 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1497 building vector comparison, diagnose it and return error_mark_node.
1499 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1502 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1503 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1504 INTEGER_TYPE element type.
1506 2018-03-13 David Pagan <dave.pagan@oracle.com>
1509 * c-typeck.c (output_init_element): Ensure field initializer
1510 expression is always evaluated if there are side effects.
1512 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1515 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1516 !building_stmt_list_p ().
1518 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1521 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1522 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1523 and include the BIND_EXPR in the list of things that need to be
1526 2018-02-09 Nathan Sidwell <nathan@acm.org>
1529 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1530 to strict_aliasing_warning.
1532 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1534 * c-typeck.c (really_start_incremental_init, push_init_level,
1535 set_nonincremental_init, output_init_element, process_init_element):
1536 Use DECL_UNNAMED_BIT_FIELD.
1538 2018-01-31 Marek Polacek <polacek@redhat.com>
1541 * c-parser.c (c_parser_compound_statement_nostart): Call
1542 expansion_point_location_if_in_system_header.
1544 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1547 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1550 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1553 * c-tree.h (decl_constant_value_1): Add a bool argument.
1554 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1555 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1556 (decl_constant_value): Adjust caller.
1557 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1558 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1559 decl_constant_value returns initializer that has BLKmode or
1561 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1563 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1564 Alan Hayward <alan.hayward@arm.com>
1565 David Sherwood <david.sherwood@arm.com>
1567 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1568 TYPE_VECTOR_SUBPARTS.
1570 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1572 Update copyright years.
1574 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1577 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1578 c_parser_conditional_expression, c_parser_cast_expression,
1579 c_parser_sizeof_expression, c_parser_alignof_expression,
1580 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1581 c_parser_transaction_expression): Use set_error () method instead
1582 of setting value member to error_mark_node.
1584 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1586 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1587 and _Float<N>X built-in functions.
1589 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1592 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1593 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1594 incomplete vars rather than after it.
1597 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1598 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1599 and consider empty ones if there are no other stmts. For
1600 -Wunused-value walk all statements before the one only followed by
1603 2017-12-22 Mike Stump <mikestump@comcast.net>
1604 Eric Botcazou <ebotcazou@adacore.com>
1606 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1607 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1608 (c_parser_do_statement): Likewise.
1609 (c_parser_for_statement): Likewise.
1610 (c_parser_statement_after_labels): Adjust calls to above.
1611 (c_parse_pragma_ivdep): New static function.
1612 (c_parser_pragma_unroll): Likewise.
1613 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1614 <PRAGMA_UNROLL>: New case.
1616 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1618 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1619 perform_integral_promotions, digest_init): Replace Yoda conditions
1620 with typical order conditions.
1621 * c-decl.c (check_bitfield_type_and_width): Likewise.
1623 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1625 * c-typeck.c (c_safe_arg_type_equiv_p,
1626 c_safe_function_type_cast_p): New function.
1627 (build_c_cast): Implement -Wcast-function-type.
1629 2017-12-14 Richard Biener <rguenther@suse.de>
1632 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1633 like REALPART_EXPR for the behavior of whether its operand
1636 2017-12-12 Marek Polacek <polacek@redhat.com>
1639 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1641 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1643 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1644 * c-parser.c (add_debug_begin_stmt): New.
1645 (c_parser_declaration_or_fndef): Call it.
1646 (c_parser_compound_statement_nostart): Likewise.
1647 (c_parser_statement_after_labels): Likewise.
1648 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1650 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1652 * c-decl.c (build_compound_literal): Add parameter alignas_align
1653 and set alignment of decl if nonzero.
1654 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1655 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1657 (c_parser_struct_declaration): Update syntax comment.
1658 (c_parser_type_name): Add alignas_ok argument and pass it to
1660 (c_parser_cast_expression): Pass true to c_parser_type_name and
1661 give error if a cast used an _Alignas specifier.
1662 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1663 give error if sizeof (type-name) used an _Alignas specifier.
1664 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1665 give error if _Alignof (type-name) used an _Alignas specifier.
1666 (c_parser_postfix_expression_after_paren_type): Check specified
1667 alignment for a compound literal and pass it to
1668 build_compound_literal.
1669 * c-parser.h (c_parser_type_name): Update prototype.
1670 * c-tree.h (build_compound_literal): Update prototype.
1672 2017-12-07 Martin Sebor <msebor@redhat.com>
1675 * c-decl.c (c_decl_attributes): Look up existing declaration and
1676 pass it to decl_attributes.
1678 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1681 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1682 reserved for use by the implementation.
1684 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1686 * c-decl.c: Include "c-family/c-spellcheck.h".
1688 2017-12-05 Martin Liska <mliska@suse.cz>
1689 Jakub Jelinek <jakub@redhat.com>
1691 * c-typeck.c (pointer_diff): Add new argument and instrument
1692 pointer subtraction.
1693 (build_binary_op): Similar for pointer comparison.
1695 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1698 * c-parser.c: Include tree-iterator.h.
1699 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1700 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1704 * c-tree.h (decl_constant_value_1): Declare.
1705 * c-typeck.c (decl_constant_value_1): New function.
1706 (decl_constant_value): Use it.
1707 * c-fold.c (c_fully_fold_internal): If in_init, use
1708 decl_constant_value_1 instead of decl_constant_value.
1710 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1712 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1714 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1717 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1718 c_switch_covers_all_cases_p returns true.
1720 2017-11-28 Julia Koval <julia.koval@intel.com>
1721 Sebastian Peryt <sebastian.peryt@intel.com>
1723 * Make-lang.in (c/c-array-notation.o): Remove.
1724 * c-array-notation.c: Delete.
1725 * c-decl.c: Remove cilkplus condition.
1726 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1727 c_parser_cilk_verify_simd, c_parser_array_notation,
1728 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1729 c_parser_cilk_simd_fn_vector_attrs,
1730 c_finish_cilk_simd_fn_tokens): Delete.
1731 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1732 (c_parser_direct_declarator_inner): Ditto.
1733 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1734 (c_parser_attributes, c_parser_compound_statement,
1735 c_parser_statement_after_labels, c_parser_if_statement,
1736 c_parser_switch_statement, c_parser_while_statement,
1737 c_parser_do_statement, c_parser_for_statement,
1738 c_parser_unary_expression, c_parser_postfix_expression,
1739 c_parser_postfix_expression_after_primary,
1740 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1741 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1743 * c-typeck.c (build_array_ref, build_function_call_vec,
1745 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1746 c_finish_loop, build_binary_op): Remove cilkplus support.
1748 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1750 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1753 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1755 * Make-lang.in (c.install-plugin): Install backend import library.
1757 2017-11-23 Jakub Jelinek <jakub@redhat.com>
1759 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1760 pragma_stmt context.
1762 2017-11-23 Mike Stump <mikestump@comcast.net>
1763 Eric Botcazou <ebotcazou@adacore.com>
1765 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1767 (c_parser_do_statement): Likewise.
1768 (c_parser_for_statement): Likewise.
1770 2017-11-22 David Malcolm <dmalcolm@redhat.com>
1773 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1774 bool to bool *. Within '%T' handling, if showing an "aka", use
1775 "quoted" param to add appropriate quoting.
1777 2017-11-22 Marek Polacek <polacek@redhat.com>
1782 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1784 2017-11-21 David Malcolm <dmalcolm@redhat.com>
1787 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1788 earlier failed lookups.
1790 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1792 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1793 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1795 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1798 * c-decl.c: Include "c-family/known-headers.h".
1799 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1800 to known-headers.cc.
1801 (class suggest_missing_header): Move to known-header.h.
1802 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1803 than get_c_name_hint.
1805 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1807 * c-decl.c (get_c_name_hint): New function.
1808 (class suggest_missing_header): New class.
1809 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1810 suggest missing headers to the user.
1812 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1814 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1815 Include "c-family/name-hint.h"
1816 (implicit_decl_warning): Convert "hint" from
1817 const char * to name_hint. Pass location to
1818 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1819 warning was not printed.
1820 (undeclared_variable): Likewise for "guessed_id".
1821 (lookup_name_fuzzy): Convert return type from const char *
1822 to name_hint. Add location_t param.
1823 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1824 Include "c-family/name-hint.h"
1825 (c_parser_declaration_or_fndef): Convert "hint" from
1826 const char * to name_hint. Pass location to lookup_name_fuzzy.
1827 (c_parser_parameter_declaration): Likewise.
1829 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1833 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1835 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1836 handle_omp_array_sections): Likewise.
1837 (digest_init): Don't call decl_constant_value_for_optimization.
1838 * c-tree.h (decl_constant_value_for_optimization): Removed.
1839 * c-fold.c (c_fold_array_ref): New function.
1840 (c_fully_fold_internal): Add LVAL argument, propagate it through
1841 recursive calls. For VAR_P call decl_constant_value and
1842 unshare if not LVAL and either optimizing or IN_INIT. Remove
1843 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1844 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1845 (c_fully_fold): Add LVAL argument, pass it through to
1846 c_fully_fold_internal.
1847 (decl_constant_value_for_optimization): Removed.
1849 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1852 * c-parser.c (check_tgmath_function): New function.
1853 (enum tgmath_parm_kind): New enum.
1854 (c_parser_postfix_expression): Handle __builtin_tgmath.
1856 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1858 * c-decl.c (implicit_decl_warning): Update for renaming of
1859 pedwarn_at_rich_loc and warning_at_rich_loc.
1860 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1861 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1862 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1863 (c_parser_struct_or_union_specifier): Likewise for renaming of
1864 pedwarn_at_rich_loc.
1865 (c_parser_parameter_declaration): Likewise for renaming of
1867 * c-typeck.c (build_component_ref): Likewise.
1868 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1869 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1870 (set_init_label): Likewise for renaming of error_at_rich_loc.
1872 2017-10-30 Richard Biener <rguenther@suse.de>
1874 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1877 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1879 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1880 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1882 2017-10-25 David Malcolm <dmalcolm@redhat.com>
1885 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1888 2017-10-25 Jakub Jelinek <jakub@redhat.com>
1891 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1892 newdecl to corresponding __builtin_ if any.
1894 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1897 * c-decl.c (diagnose_mismatched_decls): Use
1898 OPT_Wbuiltin_declaration_mismatch.
1900 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1902 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1903 use it to guard calls to maybe_suggest_missing_token_insertion.
1904 (c_parser_parms_list_declarator): Override default value of new
1905 "type_is_unique" param to c_parser_require.
1906 (c_parser_asm_statement): Likewise.
1907 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1910 2017-10-11 Nathan Sidwell <nathan@acm.org>
1912 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1914 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1916 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1917 operating on trees as wide_ints.
1918 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1919 (c_tree_equal): Likewise.
1921 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1923 * c-decl.c (push_parm_decl): Store c_parm's location into the
1925 (build_c_parm): Add "loc" param and store it within the c_parm.
1926 * c-parser.c (struct c_parser): Add "last_token_location" field.
1927 (c_parser_consume_token): Store location of the token into the
1929 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1930 when handling a FUNCTION_DECL, if it doesn't already have them.
1931 (c_parser_parameter_declaration): Generate a location for the
1932 parameter, and pass it to the call to build_c_parm.
1933 * c-tree.h (struct c_parm): Add field "loc".
1934 (build_c_parm): Add location_t param.
1935 * c-typeck.c (get_fndecl_argument_location): New function.
1936 (inform_for_arg): New function.
1937 (convert_for_assignment): Use inform_for_arg when dealing with
1940 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1942 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1944 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1945 don't SET_DECL_C_BIT_FIELD here.
1948 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1949 instead of trying to set just TREE_READONLY manually.
1951 2017-09-16 Tom de Vries <tom@codesourcery.com>
1954 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1957 2017-09-15 Joseph Myers <joseph@codesourcery.com>
1960 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1962 (build_conditional_expr): For C11, generate result with excess
1963 precision when one argument is an integer and the other is of a
1964 type using excess precision.
1966 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1968 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1970 2017-09-13 Marek Polacek <polacek@redhat.com>
1973 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1974 than expr.original_type.
1976 2017-09-12 Nathan Sidwell <nathan@acm.org>
1978 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1979 resort_sorted_fields): Moved from c-family/c-common.c.
1980 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1982 2017-09-01 Joseph Myers <joseph@codesourcery.com>
1985 * c-typeck.c (build_atomic_assign): Handle argument with excess
1986 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1987 argument passed to build_binary_op and convert_for_assignment but
1988 not for call to c_fully_fold.
1989 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1990 Ensure build_binary_op is called with argument with original
1991 semantic type. Avoid calling c_fully_fold with an
1992 EXCESS_PRECISION_EXPR from build_binary_op.
1994 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1997 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1999 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2000 Alan Hayward <alan.hayward@arm.com>
2001 David Sherwood <david.sherwood@arm.com>
2003 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2004 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2005 m1 and m2 to the signed equivalent of a fixed-point
2008 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2010 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2011 than CAN_HAVE_LOCATION_P when determining whether to use the
2012 location_t value within "value".
2014 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2016 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2017 rather than peeking the location of the first token.
2018 * c-tree.h (c_expr::get_location): New method.
2020 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2022 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2023 to check_function_arguments.
2025 2017-08-18 Marek Polacek <polacek@redhat.com>
2027 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2030 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2033 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2034 (check_bitfield_type_and_width): Don't allow bit-field with
2035 warn_if_not_aligned type.
2037 2017-08-14 Martin Sebor <msebor@redhat.com>
2040 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2042 2017-08-11 Marek Polacek <polacek@redhat.com>
2045 * c-decl.c (pushtag): Only print inform if the warning was printed.
2046 (grokdeclarator): Likewise.
2048 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2050 * c-parser.c (c_parser_error): Rename to...
2051 (c_parser_error_richloc): ...this, making static, and adding
2052 "richloc" parameter, passing it to the c_parse_error call,
2053 rather than calling c_parser_set_source_position_from_token.
2054 (c_parser_error): Reintroduce, reimplementing in terms of the
2055 above, converting return type from void to bool.
2056 (class token_pair): New class.
2057 (struct matching_paren_traits): New struct.
2058 (matching_parens): New typedef.
2059 (struct matching_brace_traits): New struct.
2060 (matching_braces): New typedef.
2061 (get_matching_symbol): New function.
2062 (c_parser_require): Add param MATCHING_LOCATION, using it to
2063 highlight matching "opening" tokens for missing "closing" tokens.
2064 (c_parser_skip_until_found): Likewise.
2065 (c_parser_static_assert_declaration_no_semi): Convert explicit
2066 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2067 class matching_parens, so that the pertinent open parenthesis is
2068 highlighted when there are problems locating the close
2070 (c_parser_struct_or_union_specifier): Likewise.
2071 (c_parser_typeof_specifier): Likewise.
2072 (c_parser_alignas_specifier): Likewise.
2073 (c_parser_simple_asm_expr): Likewise.
2074 (c_parser_braced_init): Likewise, for matching_braces.
2075 (c_parser_paren_condition): Likewise, for matching_parens.
2076 (c_parser_switch_statement): Likewise.
2077 (c_parser_for_statement): Likewise.
2078 (c_parser_asm_statement): Likewise.
2079 (c_parser_asm_operands): Likewise.
2080 (c_parser_cast_expression): Likewise.
2081 (c_parser_sizeof_expression): Likewise.
2082 (c_parser_alignof_expression): Likewise.
2083 (c_parser_generic_selection): Likewise.
2084 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2085 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2086 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2087 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2088 c_parser_skip_until_found call.
2089 (c_parser_objc_class_definition): Use class matching_parens as
2091 (c_parser_objc_method_decl): Likewise.
2092 (c_parser_objc_try_catch_finally_statement): Likewise.
2093 (c_parser_objc_synchronized_statement): Likewise.
2094 (c_parser_objc_at_property_declaration): Likewise.
2095 (c_parser_oacc_wait_list): Likewise.
2096 (c_parser_omp_var_list_parens): Likewise.
2097 (c_parser_omp_clause_collapse): Likewise.
2098 (c_parser_omp_clause_default): Likewise.
2099 (c_parser_omp_clause_if): Likewise.
2100 (c_parser_omp_clause_num_threads): Likewise.
2101 (c_parser_omp_clause_num_tasks): Likewise.
2102 (c_parser_omp_clause_grainsize): Likewise.
2103 (c_parser_omp_clause_priority): Likewise.
2104 (c_parser_omp_clause_hint): Likewise.
2105 (c_parser_omp_clause_defaultmap): Likewise.
2106 (c_parser_oacc_single_int_clause): Likewise.
2107 (c_parser_omp_clause_ordered): Likewise.
2108 (c_parser_omp_clause_reduction): Likewise.
2109 (c_parser_omp_clause_schedule): Likewise.
2110 (c_parser_omp_clause_num_teams): Likewise.
2111 (c_parser_omp_clause_thread_limit): Likewise.
2112 (c_parser_omp_clause_aligned): Likewise.
2113 (c_parser_omp_clause_linear): Likewise.
2114 (c_parser_omp_clause_safelen): Likewise.
2115 (c_parser_omp_clause_simdlen): Likewise.
2116 (c_parser_omp_clause_depend): Likewise.
2117 (c_parser_omp_clause_map): Likewise.
2118 (c_parser_omp_clause_device): Likewise.
2119 (c_parser_omp_clause_dist_schedule): Likewise.
2120 (c_parser_omp_clause_proc_bind): Likewise.
2121 (c_parser_omp_clause_uniform): Likewise.
2122 (c_parser_omp_for_loop): Likewise.
2123 (c_parser_cilk_clause_vectorlength): Likewise.
2124 (c_parser_cilk_clause_linear): Likewise.
2125 (c_parser_transaction_expression): Likewise.
2126 * c-parser.h (c_parser_require): Add param matching_location with
2127 default UNKNOWN_LOCATION.
2128 (c_parser_error): Convert return type from void to bool.
2129 (c_parser_skip_until_found): Add param matching_location with
2130 default UNKNOWN_LOCATION.
2132 2017-08-09 Marek Polacek <polacek@redhat.com>
2134 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2135 * c-tree.h (build_external_ref): Update declaration.
2136 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2137 (build_external_ref): Change the type of a parameter to bool.
2138 (parser_build_binary_op): Use true/false instead of 1/0.
2139 (pointer_diff): Likewise.
2140 (build_modify_expr): Likewise.
2141 (set_designator): Change the type of a parameter to bool.
2142 (set_init_index): Use true/false instead of 1/0.
2143 (set_init_label): Likewise.
2144 (output_init_element): Change the type of a parameter to bool.
2145 (output_pending_init_elements): Use true/false instead of 1/0.
2146 (process_init_element): Likewise.
2147 (build_binary_op): Change the type of a parameter to bool.
2149 2017-08-09 Marek Polacek <polacek@redhat.com>
2152 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2153 Call emit_diagnostic_valist instead of pedwarn.
2154 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2155 Print the relevant types in diagnostics.
2157 2017-08-09 Marek Polacek <polacek@redhat.com>
2160 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2161 build_conditional_expr.
2162 * c-parser.c (c_parser_conditional_expression): Create locations for
2163 EXP1 and EXP2 from their source ranges. Pass the locations down to
2164 build_conditional_expr.
2165 * c-tree.h (build_conditional_expr): Update declaration.
2166 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2167 For -Wsign-compare, also print the types.
2169 2017-08-08 Martin Liska <mliska@suse.cz>
2171 * c-convert.c: Include header files.
2172 * c-typeck.c: Likewise.
2174 2017-08-07 Martin Liska <mliska@suse.cz>
2176 * c-parser.c (c_parser_attributes): Canonicalize name of an
2179 2017-08-02 Marek Polacek <polacek@redhat.com>
2182 * c-parser.c (c_parser_unary_expression): Use set_error.
2186 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2187 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2189 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2190 Martin Liska <mliska@suse.cz>
2192 * c-typeck.c (c_finish_goto_label): Build gimple predict
2195 2017-07-31 Martin Liska <mliska@suse.cz>
2198 * c-convert.c (convert): Guard condition with flag_sanitize_p
2199 also with current_function_decl non-null equality.
2200 * c-decl.c (grokdeclarator): Likewise.
2201 * c-typeck.c (build_binary_op): Likewise.
2203 2017-07-25 Marek Polacek <polacek@redhat.com>
2205 * c-decl.c (grokfield): Remove local variable.
2207 2017-07-25 Marek Polacek <polacek@redhat.com>
2210 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2211 macro expansion if the body is in { }.
2212 (c_parser_while_statement): Likewise.
2213 (c_parser_for_statement): Likewise.
2215 2017-07-18 Nathan Sidwell <nathan@acm.org>
2217 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2219 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2221 * c-decl.c (implicitly_declare): When suggesting a missing
2222 #include, provide a fix-it hint.
2224 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2226 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2227 and call that instead.
2228 * c-tree.h (selftest::run_c_tests): New decl.
2230 2017-06-26 Marek Polacek <polacek@redhat.com>
2233 * c-parser.c (c_parser_if_body): Set the location of the
2234 body of the conditional after parsing all the labels. Call
2235 warn_for_multistatement_macros.
2236 (c_parser_else_body): Likewise.
2237 (c_parser_switch_statement): Likewise.
2238 (c_parser_while_statement): Likewise.
2239 (c_parser_for_statement): Likewise.
2240 (c_parser_statement): Add a default argument. Save the location
2241 after labels have been parsed.
2242 (c_parser_c99_block_statement): Likewise.
2244 2017-06-19 Richard Biener <rguenther@suse.de>
2246 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2247 negated _Literals to parse _Literal (int) -1.
2249 2017-06-13 Martin Liska <mliska@suse.cz>
2252 * c-convert.c (convert): Use sanitize_flags_p.
2253 * c-decl.c (grokdeclarator): Likewise.
2254 * c-typeck.c (convert_for_assignment): Likewise.
2255 (c_finish_return): Likewise.
2256 (build_binary_op): Likewise.
2258 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2261 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2262 to sizetype before size_binop.
2264 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2266 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2269 2017-06-06 Marek Polacek <polacek@redhat.com>
2272 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2274 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2276 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2278 * c-parser.c (c_parser_binary_expression): Implement the
2279 -Wsizeof_pointer_div warning.
2280 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2281 from a parenthesized expression.
2282 (c_parser_expr_list): Use c_last_sizeof_loc.
2283 * c-tree.h (c_last_sizeof_loc): New external.
2284 * c-typeck.c (c_last_sizeof_loc): New variable.
2285 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2287 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2290 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2292 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2294 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2297 2017-05-24 Martin Sebor <msebor@redhat.com>
2300 * c-fold.c (c_fully_fold_internal): Adjust.
2301 * c-typeck.c (parser_build_unary_op): Adjust.
2303 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2305 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2306 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2309 2017-05-23 Marek Polacek <polacek@redhat.com>
2311 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2314 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2316 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2317 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2318 it returned invariant. Call tree_invariant_p unconditionally
2319 afterwards to decide whether to return expr or op0.
2321 2017-05-22 Nathan Sidwell <nathan@acm.org>
2323 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2325 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2327 * c-parser.c (c_parser_omp_clause_default): Handle
2328 "OMP_CLAUSE_DEFAULT_PRESENT".
2330 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2332 * config-lang.in (gtfiles): Add c-family/c-format.c.
2334 2017-05-18 Nathan Sidwell <nathan@acm.org>
2336 * c-decl.c (pushdecl_top_level): Delete unused function.
2338 2017-05-18 Marek Polacek <polacek@redhat.com>
2340 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2341 (check_earlier_gotos): Likewise.
2342 (define_label): Likewise.
2343 (pending_xref_error): Likewise.
2344 (smallest_type_quals_location): Likewise.
2345 (grokdeclarator): Likewise.
2346 (grokparms): Likewise.
2347 (identifier_global_value): Likewise.
2348 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2349 (find_init_member): Likewise.
2351 2017-05-18 Marek Polacek <polacek@redhat.com>
2353 * c-decl.c (start_decl): Use false/true instead of 0/1.
2354 (grokdeclarator): Likewise.
2355 (finish_struct): Likewise.
2356 (start_function): Change the return type to bool. Use false/true
2358 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2359 * c-tree.h (start_function): Update.
2360 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2361 (set_designator): Change the return type to bool. Use false/true
2364 2017-05-17 Marek Polacek <polacek@redhat.com>
2366 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2367 * c-typeck.c: Likewise.
2369 2017-05-17 Marek Polacek <polacek@redhat.com>
2372 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2373 DECL_IGNORED_P even for non-static compound literals.
2375 2017-05-17 Martin Liska <mliska@suse.cz>
2377 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2378 use it instead of int type.
2380 2017-05-17 Marek Polacek <polacek@redhat.com>
2382 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2384 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2385 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2386 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2387 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2389 (c_parser_conditional_expression): Likewise.
2390 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2391 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2392 (process_init_element): Likewise.
2393 (build_binary_op): Likewise.
2394 (handle_omp_array_sections_1): Likewise.
2396 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2398 * c-parser.c (c_parser_omp_clause_num_gangs)
2399 (c_parser_omp_clause_num_workers)
2400 (c_parser_omp_clause_vector_length): Merge functions into...
2401 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2404 2017-05-11 Nathan Sidwell <nathan@acm.org>
2406 * gimple-parser.c: Don't #include tree-dump.h.
2408 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2411 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2413 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2416 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2417 incorrect __MEM syntax.
2419 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2422 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2425 2017-05-09 Nathan Sidwell <nathan@acm.org>
2427 * c-tree.h (pushdecl): Declare.
2429 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2431 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2432 with diagnostic_report_diagnostic.
2433 * c-errors.c (pedwarn_c99): Likewise.
2434 (pedwarn_c90): Likewise.
2436 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2439 * c-gimplify.c (c_gimplify_expr): Remove calls to
2440 cilk_gimplifY_call_params_in_spawned_fn.
2442 2017-04-25 David Malcolm <dmalcolm@redhat.com>
2444 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2445 hint for removing extra semicolon.
2447 2017-04-21 Jakub Jelinek <jakub@redhat.com>
2450 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2451 enabled, set specs->type to integer_type_node.
2453 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2455 * c-array-notation.c: Fix typo in comment.
2457 2017-03-29 Marek Polacek <polacek@redhat.com>
2460 * c-decl.c (finish_decl): Check VAR_P.
2462 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2465 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2466 * c-typeck.c (c_mark_addressable): Likewise. Look through
2467 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2469 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2471 2017-03-23 Marek Polacek <polacek@redhat.com>
2473 * c-tree.h: Remove a C_RID_YYCODE reference.
2475 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2478 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2479 optional COMPOUND_EXPR with ubsan instrumentation.
2481 2017-03-17 Marek Polacek <polacek@redhat.com>
2483 * c-parser.c: Add C11 references.
2485 2017-03-15 Marek Polacek <polacek@redhat.com>
2487 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2489 2017-03-11 Marek Polacek <polacek@redhat.com>
2491 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2493 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2495 PR translation/79848
2496 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2498 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2500 2017-03-09 Marek Polacek <polacek@redhat.com>
2503 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2504 parameter declarations with initializers.
2506 2017-03-09 Jakub Jelinek <jakub@redhat.com>
2509 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2512 2017-03-07 Jakub Jelinek <jakub@redhat.com>
2515 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2516 for "may only be used in compound statements" diagnostics, change it
2517 such that the same translatable string is used for all pragmas. For
2518 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2520 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2521 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2522 "may only be used in compound statements" diagnostics, such that the
2523 same translatable string is used for all pragmas.
2525 2017-03-04 Marek Polacek <polacek@redhat.com>
2528 * c-decl.c (implicit_decl_warning): Add missing space.
2530 2017-03-03 Marek Polacek <polacek@redhat.com>
2533 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2534 current_function_prototype_arg_types is error_mark_node. Fix
2535 formatting. Use TREE_VALUE instead of TREE_TYPE.
2537 2017-03-03 Jakub Jelinek <jakub@redhat.com>
2540 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2541 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2542 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2546 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2547 instead of %<_Generic>.
2548 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2549 (c_parser_omp_target_exit_data): Use %<release%> instead of
2552 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2554 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2555 instead of just cond ? "..." : "...".
2556 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2557 for "enter"/"exit" keyword.
2558 (c_finish_oacc_routine): Don't use %s to supply portions of the
2561 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2564 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2565 handle -Wrestrict here.
2566 * c-typeck.c (build_function_call_vec): Adjust
2567 check_function_arguments caller.
2569 2017-02-23 Richard Biener <rguenther@suse.de>
2572 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2573 to initialize c_exprs to return.
2574 (c_parser_gimple_binary_expression): Likewise.
2575 (c_parser_gimple_unary_expression): Likewise.
2576 (c_parser_gimple_postfix_expression): Likewise.
2578 2017-02-22 Marek Polacek <polacek@redhat.com>
2581 * c-typeck.c (convert_arguments): Handle error_mark_node.
2583 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2585 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2586 value of c_parser_parse_ssa_name against error_mark_node and emit
2587 error if ssa name is anonymous and written as default definition.
2589 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2591 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2594 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2597 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2598 ignore #pragma omp target even when not followed by identifier.
2600 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2602 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2603 (c_parser_gimple_unary_expression): Likewise.
2605 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2607 * c-parser.c (c_parser_oacc_declare): Add missing space in
2610 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2613 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2614 set_c_expr_source_range when parsing ssa-name.
2616 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2617 Richard Biener <rguenther@suse.de>
2619 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2620 building IL when arguments are error_mark_node.
2621 (c_parser_gimple_unary_expression): Likewise.
2622 (c_parser_gimple_if_stmt): Likewise.
2623 (c_parser_gimple_switch_stmt): Likewise.
2624 (c_parser_gimple_return_stmt): Likewise.
2625 (c_parser_parse_ssa_name): When name lookup fails do not build
2626 an SSA name. Use undeclared rather than not declared in error
2629 2017-02-09 Marek Polacek <polacek@redhat.com>
2632 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2633 instead of c_parser_skip_until_found.
2635 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2638 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2639 symtab_node::get on automatic variables.
2641 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2642 Chung-Lin Tang <cltang@codesourcery.com>
2644 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2645 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2647 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2649 2017-02-07 Richard Biener <rguenther@suse.de>
2651 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2652 (c_parser_gimple_postfix_expression_after_primary):
2653 Do not use c_build_function_call_vec to avoid folding and promotion.
2656 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2659 * c-decl.c (pop_scope): Pass main_input_filename to
2660 build_translation_unit_decl.
2662 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2664 * c-parser.c: Include "read-rtl-function.h" and
2666 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2667 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2668 production. Update for renaming of field "gimple_pass" to
2669 "gimple_or_rtl_pass". If __RTL was seen, call
2670 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2671 to an auto_timevar, to cope with early exit.
2672 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2673 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2674 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2676 (c_parser_parse_rtl_body): New function.
2677 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2678 (struct c_declspecs): Rename field "gimple_pass" to
2679 "gimple_or_rtl_pass". Add field "rtl_p".
2680 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2681 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2682 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2683 (c_parser_gimple_or_rtl_pass_list): ...this.
2685 2017-01-20 Marek Polacek <polacek@redhat.com>
2688 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2690 2017-01-13 Richard Biener <rguenther@suse.de>
2692 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2695 2017-01-13 Richard Biener <rguenther@suse.de>
2697 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2698 _Literal ( type-name ) number.
2700 2017-01-12 Richard Biener <rguenther@suse.de>
2702 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2705 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2708 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2711 2017-01-11 Richard Biener <rguenther@suse.de>
2714 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2715 returns on parse errors.
2717 2017-01-04 Marek Polacek <polacek@redhat.com>
2720 * c-parser.c (c_parser_postfix_expression): Mark zero character
2721 constants by setting original_type in c_expr.
2722 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2723 with a zero character constant.
2724 (char_type_p): New function.
2726 2017-01-04 David Malcolm <dmalcolm@redhat.com>
2728 * c-parser.c (c_parser_declaration_or_fndef): Create a
2729 rich_location at init_loc and parse it to start_init.
2730 (last_init_list_comma): New global.
2731 (c_parser_braced_init): Update last_init_list_comma when parsing
2732 commas. Pass it to pop_init_level. Pass location of closing
2733 brace to pop_init_level.
2734 (c_parser_postfix_expression_after_paren_type): Create a
2735 rich_location at type_loc and parse it to start_init.
2736 (c_parser_omp_declare_reduction): Likewise for loc.
2737 * c-tree.h (start_init): Add rich_location * param.
2738 (pop_init_level): Add location_t param.
2739 * c-typeck.c (struct initializer_stack): Add field
2740 "missing_brace_richloc".
2741 (start_init): Add richloc param, use it to initialize
2742 the stack node's missing_brace_richloc.
2743 (last_init_list_comma): New decl.
2744 (finish_implicit_inits): Pass last_init_list_comma to
2746 (push_init_level): When finding missing open braces, add fix-it
2747 hints to the richloc.
2748 (pop_init_level): Add "insert_before" param and pass it
2749 when calling pop_init_level. Add fixits about missing
2750 close braces to any richloc. Use the richloc for the
2751 -Wmissing-braces warning.
2752 (set_designator): Pass last_init_list_comma to pop_init_level.
2753 (process_init_element): Likewise.
2755 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2757 Update copyright years.
2759 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2762 * c-typeck.c (build_function_call_vec): If check_function_arguments
2763 returns true, set TREE_NO_WARNING on CALL_EXPR.
2766 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2767 to *expr instead of overwriting it.
2769 2016-12-20 Richard Biener <rguenther@suse.de>
2771 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2773 (c_parser_gimple_statement): Only build assigns for non-error
2775 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2777 2016-12-14 Martin Jambor <mjambor@suse.cz>
2779 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2781 (c_finish_oacc_routine): Adjusted call to
2782 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2783 to use their new names.
2784 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2786 (c_parser_oacc_update): Likewise.
2787 (c_parser_omp_simd): Likewise.
2788 (c_parser_omp_target_update): Likewise.
2789 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2790 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2792 (c_finish_omp_cancellation_point): Likewise.
2793 * gimple-parser.c: Do not include omp-low.h
2795 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2796 James Norris <jnorris@codesourcery.com>
2798 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2799 EXIT_DATA,WAIT} are not used in compound statements.
2800 (c_parser_oacc_enter_exit_data): Update diagnostics.
2802 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2805 * c-decl.c (diagnose_mismatched_decls): Use
2806 OPT_Wbuiltin_declaration_mismatch here too.
2808 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
2809 Alan Hayward <alan.hayward@arm.com>
2810 David Sherwood <david.sherwood@arm.com>
2812 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2813 (make_label, finish_struct): Likewise.
2815 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2816 Richard Biener <rguenther@suse.de>
2818 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2819 * config-lang.in (gtfiles): Add c/c-parser.h.
2820 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2821 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2822 * c-parser.c (enum c_id_kind, struct c_token,
2823 c_parser_next_token_is, c_parser_next_token_is_not,
2824 c_parser_next_token_is_keyword,
2825 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2827 * c-parser.h: ... new header.
2828 * c-parser.c: Include c-parser.h and gimple-parser.h.
2829 (c_parser_peek_token, c_parser_peek_2nd_token,
2830 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2831 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2832 c_parser_error, c_parser_require, c_parser_skip_until_found,
2833 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2834 c_parser_type_name): Export.
2835 (c_parser_tokens_buf): New function.
2836 (c_parser_error): Likewise.
2837 (c_parser_set_error): Likewise.
2838 (c_parser_declspecs): Handle RID_GIMPLE.
2839 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2840 via c_parser_parse_gimple_body.
2841 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2842 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2843 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2844 c_parser_error, c_parser_require, c_parser_skip_until_found,
2845 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2846 c_parser_type_name): Declare.
2847 (struct c_parser): Declare forward.
2848 (c_parser_tokens_buf): Declare.
2849 (c_parser_error): Likewise.
2850 (c_parser_set_error): Likewise.
2851 * gimple-parser.c: New file.
2852 * gimple-parser.h: Likewise.
2854 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2857 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2860 2016-09-11 Le-Chun Wu <lcwu@google.com>
2861 Mark Wielaard <mjw@redhat.com>
2863 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2864 to the given -Wshadow= variant.
2866 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2868 * c-typeck.c: Include memmodel.h.
2870 2016-10-13 Jakub Jelinek <jakub@redhat.com>
2873 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2874 instead of lhd_return_null_tree_v.
2876 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2879 * c-decl.c (smallest_type_quals_location): New static function.
2880 (grokdeclarator): Try to find the correct location for an ignored
2883 2016-09-26 Marek Polacek <polacek@redhat.com>
2886 * c-decl.c (pop_scope): Add gcc_fallthrough.
2888 2016-09-26 Marek Polacek <polacek@redhat.com>
2891 * c-parser.c (struct c_token): Add flags field.
2892 (c_lex_one_token): Pass it to c_lex_with_flags.
2893 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2894 into IFN_FALLTHROUGH.
2895 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2896 attribute fallthrough after a case label or default label.
2897 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2899 2016-09-24 Marek Polacek <polacek@redhat.com>
2902 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2903 have boolean value. Warn about ++/-- on booleans.
2905 2016-09-23 Jakub Jelinek <jakub@redhat.com>
2907 * c-parser.c (incomplete_record_decls): Remove unnecessary
2908 = vNULL initialization of file scope vec.
2910 2016-09-16 Marek Polacek <polacek@redhat.com>
2912 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2914 2016-09-14 Marek Polacek <polacek@redhat.com>
2916 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2917 (fix_array_notation_expr): Likewise.
2918 * c-decl.c (finish_decl): Likewise.
2919 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2920 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2921 (function_to_pointer_conversion): Use false instead of 0.
2922 (convert_lvalue_to_rvalue): Likewise.
2923 (parser_build_unary_op): Likewise.
2924 (build_atomic_assign): Likewise.
2925 (build_unary_op): Change nonconvert parameter type to bool, use
2926 true/false instead of 1/0.
2927 (build_binary_op): Use true instead of 1.
2929 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2931 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2932 of add_fixit_insert to add_fixit_insert_before.
2934 2016-09-13 Marek Polacek <polacek@redhat.com>
2936 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2939 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2942 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2943 COMPOUND_EXPR to warn_for_omitted_condop.
2945 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2947 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2948 c_get_substring_location for this new langhook.
2950 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2953 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2955 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2956 instead of mark_exp_read on low_bound/length expression.
2957 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2958 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2959 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2960 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2961 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2962 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2963 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2964 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2965 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2966 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2967 instead of mark_expr_read.
2968 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2969 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2970 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2971 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2972 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2973 array section bases outside of depend clause, for depend clause
2974 use convert_lvalue_to_rvalue on the base.
2975 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2976 linear, aligned, map, to and from clauses.
2977 (c_omp_clause_copy_ctor): New function.
2979 2016-09-01 Marek Polacek <polacek@redhat.com>
2982 * c-typeck.c (composite_type): Add FALLTHRU comment.
2984 2016-08-31 David Malcolm <dmalcolm@redhat.com>
2986 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2987 to the insertion fixits for "struct", "union", and "enum".
2989 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2991 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2992 rather than add_fixit_misspelled_id.
2993 (undeclared_variable): Likewise.
2994 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2995 now-redundant "here" params from add_fixit_insert method calls.
2996 (c_parser_parameter_declaration): Likewise.
2997 * c-typeck.c (build_component_ref): Remove now-redundant range
2998 param from add_fixit_replace method calls.
3000 2016-08-25 Marek Polacek <polacek@redhat.com>
3002 * c-typeck.c (parser_build_binary_op): Pass LHS to
3003 warn_logical_not_parentheses.
3005 2016-08-25 Marek Polacek <polacek@redhat.com>
3008 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3009 or _FloatN or _FloatNx is not supported.
3010 (finish_declspecs): Set type to integer_type_node when _FloatN or
3011 _FloatNx is not supported.
3013 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3016 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3017 (struct c_declspecs): Add field floatn_nx_idx.
3018 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3019 and _FloatNx type specifiers.
3020 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3021 (c_parser_declspecs, c_parser_attribute_any_word)
3022 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3023 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3024 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3025 narrower than double.
3027 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3028 Martin Liska <mliska@suse.cz>
3031 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3032 % to determine val element to change. Assert that
3033 wchar_bytes * charwidth fits into val array.
3035 2016-08-12 Marek Polacek <polacek@redhat.com>
3038 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3039 (c_parser_postfix_expression): Likewise.
3040 * c-typeck.c (build_unary_op): Adjust fall through comment.
3041 (c_mark_addressable): Likewise.
3043 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3046 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3047 array member through typedef, for orig_qual_indirect == 0 clear
3050 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3053 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3054 this up to selftest::run_c_tests.
3055 (selftest::run_c_tests): New function.
3057 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3059 * c-parser.c (struct oacc_routine_data): Add error_seen and
3060 fndecl_seen members.
3061 (c_finish_oacc_routine): Use these.
3062 (c_parser_declaration_or_fndef): Adjust.
3063 (c_parser_oacc_routine): Likewise. Support more C language
3064 constructs, and improve diagnostics. Move pragma context
3066 (c_parser_pragma): ... here.
3068 * c-parser.c (struct oacc_routine_data): New.
3069 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3071 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3072 declare target" attribute.
3074 2016-08-01 Jan Beulich <jbeulich@suse.com>
3076 * c-fold.c (c_fully_fold_internal): Also emit shift count
3077 warnings for vector types.
3078 * c-typeck.c (build_binary_op): Likewise.
3080 2016-07-29 Marek Polacek <polacek@redhat.com>
3083 * c-decl.c (finish_struct): Rephrase an error message.
3086 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3087 to error node for invalid code.
3090 * c-decl.c (implicitly_declare): Return decl early not only for
3091 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3093 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3096 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3097 on GNU extern inline functions.
3099 2016-07-29 Marek Polacek <polacek@redhat.com>
3102 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3105 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3107 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3109 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3111 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3113 (best_macro_match): Likewise, converting from a typedef to a
3115 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3116 (lookup_name_fuzzy): Update for change of best_macro_match to a
3117 subclass with a ctor that calls cpp_forall_identifiers.
3119 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3121 * c-decl.c (implicit_decl_warning): Update for conversion of
3122 return type of lookup_name_fuzzy to const char *.
3123 (undeclared_variable): Likewise.
3124 (lookup_name_fuzzy): Convert return type from tree to
3126 * c-parser.c (c_parser_declaration_or_fndef): Update for
3127 conversion of return type of lookup_name_fuzzy to const char *.
3128 (c_parser_parameter_declaration): Likewise.
3130 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3132 * c-parser.c (c_parser_oacc_declare): Don't scan for
3134 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3135 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3136 zero-length subarrays.
3138 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3141 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3142 instead of FUZZY_LOOKUP_NAME.
3143 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3144 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3146 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3149 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3151 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3153 * c-parser.c (c_parser_generic_selection): Make type of variable
3155 (c_parser_omp_declare_simd): Likewise.
3157 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3159 * c-decl.c (struct c_struct_parse_info): Change member types
3160 from vec to auto_vec.
3161 (start_struct): Adjust.
3162 (finish_struct): Likewise.
3164 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3167 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3169 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3171 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3172 Move pragma context checking into...
3173 (c_parser_omp_cancellation_point): ... here, and improve
3174 diagnostic messages.
3175 * c-typeck.c (c_finish_omp_cancel)
3176 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3178 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3181 * c-typeck.c (c_build_qualified_type): Don't clear
3182 C_TYPE_INCOMPLETE_VARS for the main variant.
3184 2016-06-28 Martin Sebor <msebor@redhat.com>
3187 * c-typeck.c (output_init_element): Diagnose incompatible types
3188 before non-constant initializers.
3190 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3192 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3194 2016-06-23 Andi Kleen <ak@linux.intel.com>
3196 * Make-lang.in: Add support for autofdo.
3198 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3201 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3202 (implicit_decl_warning): When issuing warnings for implicit
3203 declarations, attempt to provide a suggestion via
3205 (undeclared_variable): Likewise when issuing errors.
3206 (lookup_name_in_scope): Likewise.
3207 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3208 (best_macro_match): New typedef.
3209 (find_closest_macro_cpp_cb): New function.
3210 (lookup_name_fuzzy): New function.
3211 * c-parser.c: Include gcc-rich-location.h.
3212 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3213 (c_keyword_starts_typename): ...this new function.
3214 (c_parser_declaration_or_fndef): When issuing errors about
3215 missing "struct" etc, add a fixit. For other kinds of errors,
3216 attempt to provide a suggestion via lookup_name_fuzzy.
3217 (c_parser_parms_declarator): When looking ahead to detect typos in
3218 type names, also reject CPP_KEYWORD.
3219 (c_parser_parameter_declaration): When issuing errors about
3220 unknown type names, attempt to provide a suggestion via
3222 * c-tree.h (c_keyword_starts_typename): New prototype.
3224 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3227 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3228 c_common_type returns error_mark_node.
3230 2016-06-19 Martin Sebor <msebor@redhat.com>
3233 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3234 __alignof__ (expression).
3236 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3238 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3240 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3242 * c-typeck.c (build_component_ref): Simplify fixit code by
3243 using gcc_rich_location::add_fixit_misspelled_id.
3244 (set_init_label): Likewise.
3246 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3248 * c-parser.c (c_parser_initelt): Provide location of name for new
3249 location_t param of set_init_label.
3250 * c-tree.h (set_init_label): Add location_t param.
3251 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3252 param and use it when issuing error messages about unrecognized
3253 field names. Attempt to provide a fixit hint if appropriate,
3254 otherwise update the error message to provide the type name.
3256 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3259 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3262 2016-06-08 Martin Sebor <msebor@redhat.com>
3263 Jakub Jelinek <jakub@redhat.com>
3267 * c-typeck.c (convert_arguments): Don't promote last argument
3268 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3270 2016-06-08 Marek Polacek <polacek@redhat.com>
3273 * c-decl.c (grokdeclarator): Check TYPE_P.
3276 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3279 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3281 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3282 and structure element reference, capture the location of the
3283 element name token and pass it to build_component_ref.
3284 (c_parser_postfix_expression_after_primary): Likewise for
3285 structure element dereference.
3286 (c_parser_omp_variable_list): Likewise for
3287 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3288 * c-tree.h (build_component_ref): Add location_t param.
3289 * c-typeck.c (build_component_ref): Add location_t param
3290 COMPONENT_LOC. Use it, if available, when issuing hints about
3291 mispelled member names to provide a fixit replacement hint.
3293 2016-06-06 Marek Polacek <polacek@redhat.com>
3296 * c-parser.c (c_parser_direct_declarator): Set location.
3298 2016-06-06 Marek Polacek <polacek@redhat.com>
3300 * c-typeck.c (comptypes_internal): Handle comparisons of
3301 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3302 TYPE_REF_CAN_ALIAS_ALL.
3304 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3306 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3307 arguments as addressable when async clause exists.
3309 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3312 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3313 when combined with target construct.
3315 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3317 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3318 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3320 2016-05-25 Marek Polacek <polacek@redhat.com>
3323 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3326 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3328 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3330 * c-parser.c (c_parser_oacc_declare): Add support for
3331 GOMP_MAP_FIRSTPRIVATE_POINTER.
3332 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3333 argument with enum c_omp_region_type ort.
3334 (handle_omp_array_sections): Likewise. Update call to
3335 handle_omp_array_sections_1.
3336 (c_finish_omp_clauses): Add specific errors and warning messages for
3337 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3338 call to handle_omp_array_sections.
3340 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3342 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3344 2016-05-24 Richard Biener <rguenther@suse.de>
3348 * c-typeck.c (build_array_ref): Do not complain about indexing
3349 non-lvalue vectors. Adjust for function name change.
3351 2016-05-20 Martin Sebor <msebor@redhat.com>
3354 * c-typeck.c (error_init): Use
3355 expansion_point_location_if_in_system_header.
3356 (warning_init): Same.
3358 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3361 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3363 (c_parser_postfix_expression): Likewise.
3364 * c-tree.h (c_expr::set_error): New method.
3365 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3366 that result's range is initialized.
3368 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3370 * c-typeck.c (parser_build_unary_op): Fix formatting.
3372 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3374 * c-decl.c (grokdeclarator): Remove errmsg and use of
3375 targetm.invalid_return_type.
3376 (grokparms): Remove errmsg and use of
3377 targetm.invalid_parameter_type.
3379 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3381 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3382 function return type.
3384 2016-05-12 Marek Polacek <polacek@redhat.com>
3387 * c-decl.c (build_compound_literal): Pass LOC down to
3388 c_incomplete_type_error.
3389 * c-tree.h (require_complete_type): Adjust declaration.
3390 (c_incomplete_type_error): Likewise.
3391 * c-typeck.c (require_complete_type): Add location parameter, pass it
3392 down to c_incomplete_type_error.
3393 (c_incomplete_type_error): Add location parameter, pass it down to
3395 (build_component_ref): Pass location down to c_incomplete_type_error.
3396 (default_conversion): Pass location down to require_complete_type.
3397 (build_array_ref): Likewise.
3398 (build_function_call_vec): Likewise.
3399 (convert_arguments): Likewise.
3400 (build_unary_op): Likewise.
3401 (build_c_cast): Likewise.
3402 (build_modify_expr): Likewise.
3403 (convert_for_assignment): Likewise.
3404 (c_finish_omp_clauses): Likewise.
3406 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3409 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3411 * c-errors.c (pedwarn_c90): Return true if warned.
3412 * c-tree.h (pedwarn_c90): Change return type to bool.
3413 (enum c_declspec_word): Add new enumerator cdw_atomic.
3415 2016-05-11 Marek Polacek <polacek@redhat.com>
3418 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3419 diagnose_mismatched_attributes and call it.
3421 2016-05-10 Marek Polacek <polacek@redhat.com>
3424 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3425 on a declaration following the definition.
3427 2016-05-05 Jakub Jelinek <jakub@redhat.com>
3429 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3430 parse it through to c_parser_c99_block_statement.
3431 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3434 2016-05-04 Marek Polacek <polacek@redhat.com>
3436 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3439 2016-05-04 Marek Polacek <polacek@redhat.com>
3442 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3443 for macro expansions.
3445 2016-05-03 Marek Polacek <polacek@redhat.com>
3448 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3449 check_builtin_function_arguments.
3451 2016-05-03 Richard Biener <rguenther@suse.de>
3453 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3454 the checksum from the previous stage.
3456 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3458 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3459 c_finish_omp_clauses.
3460 (c_parser_omp_all_clauses): Likewise.
3461 (c_parser_oacc_cache): Likewise.
3462 (c_parser_oacc_loop): Likewise.
3463 (omp_split_clauses): Likewise.
3464 (c_parser_omp_declare_target): Likewise.
3465 (c_parser_cilk_all_clauses): Likewise.
3466 (c_parser_cilk_for): Likewise.
3467 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3468 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3470 2016-05-02 Marek Polacek <polacek@redhat.com>
3473 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3476 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3479 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3480 OACC_LOOP_CLAUSE_MASK.
3481 (c_parser_oacc_kernels_parallel): Update call to
3482 c_oacc_split_loop_clauses.
3484 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3486 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3487 argument to build_modify_expr in two cases.
3489 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3491 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3492 warn_for_memset instead of warning directly here.
3494 2016-04-26 Marek Polacek <polacek@redhat.com>
3497 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3499 (c_parser_for_statement): ... here.
3500 (c_parser_if_statement): Use it.
3501 (c_parser_switch_statement): Use it.
3502 (c_parser_while_statement): Use it.
3505 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3507 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3510 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3511 instead of c_finish_cilk_clauses.
3512 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3513 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3514 floating-point variables in the linear clause for Cilk Plus.
3516 2016-04-18 Michael Matz <matz@suse.de>
3518 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3519 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3521 2016-04-15 Marek Polacek <polacek@redhat.com>
3524 * c-typeck.c (build_unary_op): Pass location down to error and
3527 2016-04-15 Jakub Jelinek <jakub@redhat.com>
3530 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3532 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3533 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3534 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3535 Adjust c_parser_pragma callers.
3536 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3538 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3540 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3541 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3542 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3543 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3544 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3545 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3546 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3547 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3549 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3550 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3553 2016-04-13 Marek Polacek <polacek@redhat.com>
3556 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3558 (c_parser_statement): Likewise.
3559 (c_parser_c99_block_statement): Likewise.
3560 (c_parser_while_statement): Likewise.
3561 (c_parser_for_statement): Likewise.
3562 (c_parser_if_body): Don't set IF_P here.
3563 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3564 about dangling else here.
3565 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3566 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3567 warn about dangling else here.
3569 2016-04-04 Marek Polacek <polacek@redhat.com>
3572 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3574 2016-03-31 Marek Polacek <polacek@redhat.com>
3577 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3579 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3582 * c-parser.c (c_parser_postfix_expression): Set the source range
3583 for uses of "__builtin_types_compatible_p".
3585 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3588 * c-typeck.c (composite_type): Don't count void_list_node
3589 into len, if the list is terminated by void_list_node, start
3590 with void_list_node instead of NULL for newargs. Stop
3593 2016-03-16 Marek Polacek <polacek@redhat.com>
3596 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3597 nested functions returning VM types.
3599 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3601 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3602 when calling c_finish_omp_clauses.
3604 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3607 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3610 2016-03-04 Marek Polacek <polacek@redhat.com>
3613 * c-parser.c (c_parser_postfix_expression): Call
3614 c_parser_cast_expression rather than c_parser_postfix_expression.
3616 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3620 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3621 of incomplete decls to error_mark_node.
3623 2016-02-24 Marek Polacek <polacek@redhat.com>
3626 * c-decl.c (finish_decl): Don't update the copy of the type of a
3627 different decl type.
3629 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3632 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3633 in id_kind reclassification.
3635 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3638 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3640 2016-02-16 James Norris <jnorris@codesourcery.com>
3643 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3645 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3647 * c-decl.c (build_null_declspecs): Zero the entire struct.
3650 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3651 callers changed. If nested_p is true, use it to call
3652 finish_implicit_inits.
3653 * c-tree.h (finish_implicit_inits): Declare.
3654 * c-typeck.c (finish_implicit_inits): New function. Move code
3656 (push_init_level): ... here.
3657 (set_designator, process_init_element): Call finish_implicit_inits.
3659 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3662 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3663 arguments for -Waddress warning.
3665 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3668 * c-decl.c (finish_enum): When honoring mode attribute,
3669 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3671 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3674 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3675 all type variants, not just TYPE_MAIN_VARIANT.
3677 2016-01-27 Jakub Jelinek <jakub@redhat.com>
3680 * c-decl.c (c_write_global_declarations_1): Warn with
3681 warn_unused_function if static prototype without definition
3684 2016-01-27 Marek Polacek <polacek@redhat.com>
3687 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3688 to unsigned, if needed. Add -Wsign-compare warning.
3690 2016-01-26 Jakub Jelinek <jakub@redhat.com>
3692 PR tree-optimization/69483
3693 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3695 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3698 * c-tree.h (incomplete_record_decls): Declare.
3699 * c-parser.c (incomplete_record_decls): Define.
3700 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3701 report error if any decl has zero size.
3702 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3703 or enum type to incomplete_record_decls.
3705 2016-01-14 Tom de Vries <tom@codesourcery.com>
3707 PR tree-optimization/68773
3708 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3711 2016-01-14 Marek Polacek <polacek@redhat.com>
3714 * c-decl.c (grokdeclarator): Provide more information for invalid
3717 2016-01-06 David Malcolm <dmalcolm@redhat.com>
3719 * c-parser.c (c_parser_unary_expression): For dereferences, build
3720 a combined location before calling build_indirect_ref, so that
3721 error reports cover the full range, manually updating the c_expr
3724 2016-01-06 Marek Polacek <polacek@redhat.com>
3727 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3728 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3731 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3733 Update copyright years.
3735 2016-01-04 Marek Polacek <polacek@redhat.com>
3738 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3739 optimization to use __atomic_fetch_* built-in if possible.
3741 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3743 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3745 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3748 2015-12-22 Marek Polacek <polacek@redhat.com>
3751 * c-typeck.c (build_component_ref): Warn when acessing elements of
3752 atomic structures or unions.
3754 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3756 * c-typeck.c: Include "gcc-rich-location.h".
3757 (build_binary_op): In the two places that call binary_op_error,
3758 create a gcc_rich_location and populate it with the location of
3759 the binary op and its two operands.
3761 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3763 * c-parser.c (c_parser_statement_after_labels): When calling
3764 c_finish_return, Use the return expression's location if it has
3765 one, falling back to the location of the first token within it.
3766 * c-typeck.c (c_finish_return): When issuing warnings about
3767 the incorrect presence/absence of a return value, issue a note
3768 showing the declaration of the function.
3770 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3772 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3774 (c_parser_peek_nth_token): New function.
3775 (c_parser_peek_conflict_marker): New function.
3776 (c_parser_error): Detect conflict markers and report them as such.
3778 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3780 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3781 to preserve range information for the primary expression
3782 in the call to c_parser_postfix_expression_after_primary.
3784 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3786 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3787 expression location, falling back on the first token location,
3788 rather than always using the latter.
3790 2015-12-16 Marek Polacek <polacek@redhat.com>
3793 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3796 2015-12-15 Marek Polacek <polacek@redhat.com>
3799 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3802 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3804 * c-parser.c (c_parser_alignof_expression): Capture location of
3805 closing parenthesis (if any), or of end of unary expression, and
3806 use it to build a src_range for the expression.
3808 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3811 * c-parser.c (c_parser_get_builtin_args): Add
3812 "out_close_paren_loc" param, and write back to it.
3813 (c_parser_postfix_expression): Capture the closing
3814 parenthesis location for RID_CHOOSE_EXPR,
3815 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3816 RID_BUILTIN_SHUFFLE and use it to set the source range
3817 for such expressions; within RID_BUILTIN_COMPLEX set
3818 the underlying location.
3820 2015-12-07 Marek Polacek <polacek@redhat.com>
3823 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3824 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3826 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3828 * c-tree.h (c_build_va_arg): Adjust prototype.
3829 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3830 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3831 parameter, adjust throughout and issue an error if EXPR is a component
3832 with reverse storage order.
3834 2015-12-02 Jason Merrill <jason@redhat.com>
3836 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3837 (c_fully_fold_internal, decl_constant_value_for_optimization):
3838 Move from c-common.c.
3839 * c-tree.h: Declare decl_constant_value_for_optimization.
3840 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3842 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3845 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3846 following link from declarator to next declarator. Track original
3847 qualified type and pass it to c_build_qualified_type.
3848 * c-typeck.c (c_build_qualified_type): Add arguments
3849 orig_qual_type and orig_qual_indirect.
3851 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3853 * c-parser.c (c_parser_omp_clause_name)
3854 (c_parser_oacc_all_clauses): Alphabetical sorting.
3856 2015-12-02 Jakub Jelinek <jakub@redhat.com>
3859 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3862 2015-12-01 Julian Brown <julian@codesourcery.com>
3863 Cesar Philippidis <cesar@codesourcery.com>
3864 James Norris <James_Norris@mentor.com>
3866 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3867 (c_parser_oacc_clause_use_device): New function.
3868 (c_parser_oacc_all_clauses): Add use_device support.
3869 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3870 (c_parser_oacc_host_data): New function.
3871 (c_parser_omp_construct): Add host_data support.
3872 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3873 * c-typeck.c (c_finish_oacc_host_data): New function.
3874 (c_finish_omp_clauses): Add use_device support.
3876 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3879 * c-decl.c: Set TYPE_PACKED in variants.
3881 2015-11-27 Martin Liska <mliska@suse.cz>
3884 * c-array-notation.c (fix_builtin_array_notation_fn):
3885 Use release_vec_vec instead of vec::release.
3886 (build_array_notation_expr): Likewise.
3887 (fix_conditional_array_notations_1): Likewise.
3888 (fix_array_notation_expr): Likewise.
3889 (fix_array_notation_call_expr): Likewise.
3891 2015-11-27 Jakub Jelinek <jakub@redhat.com>
3894 * c-parser.c (c_parser_compound_statement_nostart): If
3895 last_label is true, use pragma_stmt instead of pragma_compound
3896 as second c_parser_pragma argument.
3897 (c_parser_omp_ordered, c_parser_omp_target_update,
3898 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3899 false as second argument to c_parser_skip_to_pragma_eol after
3900 diagnosing standalone directives used in pragma_stmt context.
3902 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3904 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3905 with "if (ENABLE_OFFLOADING)".
3907 2015-11-23 David Malcolm <dmalcolm@redhat.com>
3910 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3911 for various Objective-C constructs: Class.name syntax,
3912 @selector(), @protocol(), @encode(), and [] message syntax.
3914 2015-11-20 David Malcolm <dmalcolm@redhat.com>
3917 * c-typeck.c (should_suggest_deref_p): New function.
3918 (build_component_ref): Special-case POINTER_TYPE when
3919 generating a "not a structure of union" error message, and
3920 suggest a "->" rather than a ".", providing a fix-it hint.
3922 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3924 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3925 candidate into a new function, find_closest_identifier.
3927 2015-11-19 Marek Polacek <polacek@redhat.com>
3930 * c-typeck.c (parser_build_binary_op): Properly handle
3931 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3933 2015-11-17 David Malcolm <dmalcolm@redhat.com>
3935 * c-parser.c (set_c_expr_source_range): Bulletproof both
3936 overloaded implementations against NULL expr->value.
3937 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3939 (c_parser_unary_expression): Likewise when handling addresses of
3941 (c_parser_postfix_expression): Likewise for statement expressions,
3942 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3943 __builtin_va_arg, and for __builtin_offset_of.
3944 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3945 src_range using the range of the braced initializer.
3946 (c_parser_transaction_expression): Set src_range for "ret" to a
3947 sane pair of values.
3949 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3951 * c-parser.c (c_finish_omp_declare_simd): Look for
3952 "simd" attribute as well. Update error message.
3954 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3956 * c-parser.c (c_parser_omp_declare_target): Adjust.
3958 2015-11-14 Jakub Jelinek <jakub@redhat.com>
3960 * c-typeck.c (c_finish_omp_clauses): Don't mark
3961 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3963 2015-11-14 Marek Polacek <polacek@redhat.com>
3965 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3966 * c-typeck.c: Likewise.
3968 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3970 * c-decl.c (warn_defaults_to): Pass line_table to
3972 * c-errors.c (pedwarn_c99): Likewise.
3973 (pedwarn_c90): Likewise.
3974 * c-parser.c (set_c_expr_source_range): New functions.
3975 (c_token::get_range): New method.
3976 (c_token::get_finish): New method.
3977 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3978 based on the range from the start of the LHS to the end of the
3980 (c_parser_conditional_expression): Likewise, based on the range
3981 from the start of the cond.value to the end of exp2.value.
3982 (c_parser_binary_expression): Call set_c_expr_source_range on
3983 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3984 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3985 based on the cast_loc through to the end of the expr.
3986 (c_parser_unary_expression): Likewise, based on the
3987 op_loc through to the end of op.
3988 (c_parser_sizeof_expression) Likewise, based on the start of the
3989 sizeof token through to either the closing paren or the end of
3991 (c_parser_postfix_expression): Likewise, using the token range,
3992 or from the open paren through to the close paren for
3993 parenthesized expressions.
3994 (c_parser_postfix_expression_after_primary): Likewise, for
3995 various kinds of expression.
3996 * c-tree.h (struct c_expr): Add field "src_range".
3997 (c_expr::get_start): New method.
3998 (c_expr::get_finish): New method.
3999 (set_c_expr_source_range): New decls.
4000 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4001 on ret for prefix unary ops.
4002 (parser_build_binary_op): Likewise, running from the start of
4003 arg1.value through to the end of arg2.value.
4005 2015-11-13 Marek Polacek <polacek@redhat.com>
4008 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4010 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4012 * c-typeck.c: Include spellcheck.h.
4013 (lookup_field_fuzzy_find_candidates): New function.
4014 (lookup_field_fuzzy): New function.
4015 (build_component_ref): If the field was not found, try using
4016 lookup_field_fuzzy and potentially offer a suggestion.
4018 2015-11-12 James Norris <jnorris@codesourcery.com>
4019 Joseph Myers <joseph@codesourcery.com>
4021 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4022 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4023 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4024 and PRAGMA_OMP_CLAUSE_LINK.
4025 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4026 and PRAGMA_OACC_CLAUSE_LINK.
4027 (OACC_DECLARE_CLAUSE_MASK): New definition.
4028 (c_parser_oacc_declare): New function.
4030 2015-11-12 Marek Polacek <polacek@redhat.com>
4033 * c-parser.c (c_parser_for_statement): Reclassify the token in
4036 2015-11-11 Marek Polacek <polacek@redhat.com>
4040 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4041 checking the size of an array.
4043 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4045 * c-array-notation.c: Remove unused header files.
4046 * c-aux-info.c: Likewise.
4047 * c-convert.c: Likewise.
4048 * c-decl.c: Likewise.
4049 * c-errors.c: Likewise.
4050 * c-lang.c: Likewise.
4051 * c-objc-common.c: Likewise.
4052 * c-parser.c: Likewise.
4053 * c-typeck.c: Likewise.
4054 * gccspec.c: Likewise.
4056 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4057 Cesar Philippidis <cesar@codesourcery.com>
4058 James Norris <jnorris@codesourcery.com>
4059 Julian Brown <julian@codesourcery.com>
4060 Nathan Sidwell <nathan@codesourcery.com>
4062 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4064 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4065 (c_parser_pragma): Parse 'acc routine'.
4066 (OACC_ROUTINE_CLAUSE_MARK): Define.
4067 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4069 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4072 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4073 location of the backward-goto to the start of the loop body.
4075 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4078 * c-parser.c (c_parser_while_statement): Finish the loop before
4079 parsing ahead for misleading indentation.
4080 (c_parser_for_statement): Likewise.
4082 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4084 * c-decl.c (finish_struct): If the structure has reverse storage
4085 order, rewrite the type of array fields with scalar component. Call
4086 maybe_apply_pragma_scalar_storage_order on entry.
4087 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4088 errors on bit-fields and reverse SSO here and not...
4089 (c_mark_addressable): ...here.
4090 (output_init_element): Adjust call to initializer_constant_valid_p.
4091 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4093 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4095 * c-decl.c (warn_defaults_to): Update for change in signature
4096 of diagnostic_set_info.
4097 * c-errors.c (pedwarn_c99): Likewise.
4098 (pedwarn_c90): Likewise.
4099 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4100 for textinfo::set_location.
4102 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4103 Thomas Schwinge <thomas@codesourcery.com>
4104 James Norris <jnorris@codesourcery.com>
4106 * c-parser.c (c_parser_omp_clause_name): Add support for
4107 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4108 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4109 default(none) in OpenACC.
4110 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4112 (c_parser_oacc_clause_tile): New function.
4113 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4114 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4115 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4117 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4118 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4120 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4121 (c_parser_oacc_update): Update the error message for missing clauses.
4122 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4123 and OMP_CLAUSE_INDEPENDENT.
4125 2015-11-05 Marek Polacek <polacek@redhat.com>
4128 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4129 deal with pre-evaluation on invalid types.
4131 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4132 Ilya Verbin <ilya.verbin@intel.com>
4134 * c-parser.c: Include context.h and gimple-expr.h.
4135 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4136 monotonic together with nonmonotonic.
4137 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4138 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4139 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4140 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4141 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4142 expressions on combined target teams before the target.
4143 (c_parser_omp_declare_target): If decl has "omp declare target" or
4144 "omp declare target link" attribute, and cgraph or varpool node already
4145 exists, then set corresponding flags. Call c_finish_omp_clauses
4146 in the parenthesized extended-list syntax case.
4147 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4149 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4150 on OMP_CLAUSE_REDUCTION array sections.
4151 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4152 into the constant offset, or for variable low-bound using
4153 POINTER_PLUS_EXPR. For structure element based array sections use
4154 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4155 (c_finish_omp_clauses): Drop generic_field_head, structure
4156 elements are now always mapped even as array section bases,
4157 diagnose same var in data sharing and mapping clauses. Diagnose if
4158 linear step on declare simd is neither a constant nor a uniform
4159 parameter. Look through POINTER_PLUS_EXPR for array section
4160 reductions. Diagnose the same var or function appearing multiple
4161 times on the same directive. Fix up wording for the to clause if t
4162 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4163 modifier on kinds other than dynamic or guided or nonmonotonic
4164 modifier together with ordered clause.
4166 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4167 Chung-Lin Tang <cltang@codesourcery.com>
4169 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4171 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4173 * c-array-notation.c: Reorder #include's and remove duplicates.
4174 * c-aux-info.c: Likewise.
4175 * c-convert.c: Likewise.
4176 * c-decl.c: Likewise.
4177 * c-errors.c: Likewise.
4178 * c-lang.c: Likewise.
4179 * c-objc-common.c: Likewise.
4180 * c-parser.c: Likewise.
4181 * c-typeck.c: Likewise.
4183 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4186 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4187 after calling build_qualified_type.
4189 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4190 Thomas Schwinge <thomas@codesourcery.com>
4191 James Norris <jnorris@codesourcery.com>
4192 Joseph Myers <joseph@codesourcery.com>
4193 Julian Brown <julian@codesourcery.com>
4194 Bernd Schmidt <bschmidt@redhat.com>
4196 * c-parser.c (c_parser_oacc_shape_clause): New.
4197 (c_parser_oacc_simple_clause): New.
4198 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4199 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4201 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4202 James Norris <jnorris@codesourcery.com>
4203 Cesar Philippidis <cesar@codesourcery.com>
4207 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4208 parameters, and handle these. Adjust all users.
4209 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4211 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4213 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4215 (c_finish_omp_construct): Declare function.
4216 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4217 Merge functions into...
4218 (c_finish_omp_construct): ... this new function.
4220 2015-10-22 Richard Biener <rguenther@suse.de>
4222 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4223 before folding a MINUS_EXPR.
4225 2015-10-21 Marek Polacek <polacek@redhat.com>
4228 * c-decl.c (start_function): Warn about vararg functions without
4231 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4233 * c-typeck.c (build_conditional_expr): Use boolean vector
4234 type for vector comparison.
4235 (build_vec_cmp): New.
4236 (build_binary_op): Use build_vec_cmp for comparison.
4238 2015-10-20 Marek Polacek <polacek@redhat.com>
4240 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4242 2015-10-20 Marek Polacek <polacek@redhat.com>
4245 * c-parser.c (c_parser_attributes): Break out of the loop if the
4246 token after an attribute isn't a comma.
4248 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4249 Aldy Hernandez <aldyh@redhat.com>
4251 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4252 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4253 (c_parser_omp_variable_list): Handle structure elements for
4254 map, to and from clauses. Handle array sections in reduction
4255 clause. Formatting fixes.
4256 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4257 if clause modifiers.
4258 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4259 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4260 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4261 c_parser_omp_clause_is_device_ptr): New functions.
4262 (c_parser_omp_clause_ordered): Parse optional parameter.
4263 (c_parser_omp_clause_reduction): Handle array reductions.
4264 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4265 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4267 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4268 (c_parser_omp_clause_depend_sink): New function.
4269 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4270 (c_parser_omp_clause_map): Parse release/delete map kinds and
4271 optional always modifier.
4272 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4273 and c_finish_omp_clauses callers.
4274 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4275 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4276 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4277 (OMP_CRITICAL_CLAUSE_MASK): Define.
4278 (c_parser_omp_critical): Parse critical clauses.
4279 (c_parser_omp_for_loop): Handle doacross loops, adjust
4280 c_finish_omp_for and c_finish_omp_clauses callers.
4281 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4282 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4283 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4284 (c_parser_omp_for): Disallow ordered clause when combined with
4285 distribute. Disallow linear clause when combined with distribute
4286 and not combined with simd.
4287 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4288 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4289 parse clauses and if depend clause is found, don't parse a body.
4290 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4291 Allow target parallel without for after it.
4292 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4293 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4294 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4296 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4297 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4298 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4299 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4301 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4302 defaultmap and is_device_ptr clauses.
4303 (c_parser_omp_target): Parse target parallel and target simd. Set
4304 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4305 and target exit data. Diagnose invalid map kinds.
4306 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4307 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4309 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4311 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4312 (c_parser_omp_taskloop): New function.
4313 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4314 handle PRAGMA_OMP_TASKLOOP.
4315 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4316 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4317 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4318 Add IS_OMP argument, handle structure element bases, diagnose
4319 bitfields, pass IS_OMP recursively, diagnose known zero length
4320 array sections in depend clauses, handle array sections in reduction
4321 clause, diagnose negative length even for pointers.
4322 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4323 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4324 array sections in reduction clause, set
4325 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4326 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4327 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4328 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4330 2015-10-06 Marek Polacek <polacek@redhat.com>
4332 * c-parser.c (c_parser_statement_after_labels): Use
4333 protected_set_expr_location.
4334 (c_parser_omp_clause_num_gangs): Likewise.
4335 (c_parser_omp_clause_num_threads): Likewise.
4336 (c_parser_omp_clause_num_workers): Likewise.
4337 (c_parser_omp_clause_vector_length): Likewise.
4338 (c_parser_omp_clause_num_teams): Likewise.
4339 (c_parser_omp_clause_thread_limit): Likewise.
4340 * c-typeck.c (build_c_cast): Likewise.
4341 (c_cast_expr): Likewise.
4343 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4345 * c-typeck.c (c_tree_equal): Use real_equal instead of
4348 2015-10-04 Jason Merrill <jason@redhat.com>
4350 * c-parser.c (c_lex_one_token): Handle @synchronized.
4351 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4352 can change whether the function is transaction_safe.
4354 2015-10-02 Marek Polacek <polacek@redhat.com>
4357 * c-typeck.c (convert_for_assignment): Use the expansion point
4358 location throughout.
4360 2015-10-02 Marek Polacek <polacek@redhat.com>
4363 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4364 and pass it down to c_parser_if_statement.
4365 (c_parser_else_body): Add CHAIN parameter and pass it down to
4366 c_parser_statement_after_labels.
4367 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4368 duplicated if-else-if conditions.
4370 2015-10-01 Marek Polacek <polacek@redhat.com>
4372 * c-typeck.c (convert_for_assignment): Improve commentary.
4374 2015-09-30 Marek Polacek <polacek@redhat.com>
4377 * c-typeck.c (c_finish_return): Use the expansion point location for
4378 certain "return with value" warnings.
4380 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4382 * c-parser.c (pragma_lex): Add loc argument.
4384 2015-09-15 Marek Polacek <polacek@redhat.com>
4387 * c-decl.c (tag_exists_p): New function.
4388 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4389 struct/union/enum keywords are missing.
4390 * c-tree.h (tag_exists_p): Declare.
4392 2015-09-15 Marek Polacek <polacek@redhat.com>
4394 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4395 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4396 Return NULL_TREE instead of 0.
4397 (lookup_name): Return NULL_TREE instead of 0.
4398 (lookup_name_in_scope): Likewise.
4399 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4400 (parser_xref_tag): Use false instead of 0.
4401 (start_struct): Use true instead of 1.
4402 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4404 2015-09-14 Marek Polacek <polacek@redhat.com>
4406 * c-typeck.c (set_nonincremental_init_from_string): Use
4407 HOST_WIDE_INT_M1U when shifting a negative value.
4409 2015-09-09 Mark Wielaard <mjw@redhat.com>
4411 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4414 2015-09-10 Jakub Jelinek <jakub@redhat.com>
4417 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4418 into OMP_FOR_PRE_BODY rather than before the loop.
4420 2015-09-09 Jakub Jelinek <jakub@redhat.com>
4423 * c-parser.c (c_parser_oacc_all_clauses,
4424 c_parser_omp_all_clauses): Remove invalid clause from
4425 list of clauses even if parser->error is set.
4428 * c-parser.c (c_parser_omp_clause_aligned,
4429 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4431 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4435 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4436 instead of c_parser_unary_expression. If the result is !lvalue_p,
4437 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4439 2015-09-04 Marek Polacek <polacek@redhat.com>
4442 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4444 2015-09-03 Martin Sebor <msebor@redhat.com>
4447 * c-typeck.c (convert_arguments, parser_build_unary_op,
4448 build_conditional_expr, c_cast_expr, convert_for_assignment,
4449 build_binary_op, _objc_common_truthvalue_conversion): Call
4451 (c_decl_implicit): Define.
4453 2015-09-02 Marek Polacek <polacek@redhat.com>
4456 * c-parser.c (c_parser_enum_specifier): Give a better error for
4459 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4461 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4463 2015-08-12 Marek Polacek <polacek@redhat.com>
4465 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4468 2015-08-03 Marek Polacek <polacek@redhat.com>
4471 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4473 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4475 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4477 * c-parser.c (c_parser_if_body): Take token_indent_info
4478 argument. Call warn_for_misleading_indentation even when the
4479 body is a semicolon. Extract token_indent_infos corresponding
4480 to the guard, body and next tokens. Adjust call to
4481 warn_for_misleading_indentation accordingly.
4482 (c_parser_else_body): Likewise.
4483 (c_parser_if_statement): Likewise.
4484 (c_parser_while_statement): Likewise.
4485 (c_parser_for_statement): Likewise.
4487 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4488 Manuel López-Ibáñez <manu@gcc.gnu.org>
4490 * c-decl.c (get_parm_info): Remove static var. Update warning
4493 2015-07-27 Marek Polacek <polacek@redhat.com>
4497 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4499 2015-07-20 Marek Polacek <polacek@redhat.com>
4502 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4503 (build_binary_op): Warn about left shift overflows.
4505 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4507 * c-array-notation.c: Adjust includes for flags.h changes.
4508 * c-objc-common.c: Likewise.
4510 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4512 * c-array-notation.c: Adjust includes.
4513 * c-aux-info.c: Likewise.
4514 * c-convert.c: Likewise.
4515 * c-decl.c: Likewise.
4516 * c-errors.c: Likewise.
4517 * c-lang.c: Likewise.
4518 * c-objc-common.c: Likewise.
4519 * c-parser.c: Likewise.
4520 * c-typeck.c: Likewise.
4522 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4525 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4527 2015-06-29 Marek Polacek <polacek@redhat.com>
4530 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4531 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4532 about -Wswitch-bool here.
4533 (do_case): Update c_add_case_label call.
4534 (c_finish_case): Update c_do_switch_warnings call.
4536 2015-06-27 Marek Polacek <polacek@redhat.com>
4538 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4540 2015-06-26 Marek Polacek <polacek@redhat.com>
4542 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4544 * c-typeck.c (array_to_pointer_conversion): Likewise.
4545 (build_unary_op): Likewise.
4546 (c_finish_return): Likewise.
4548 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4550 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4551 * c-parser.c: Likewise.
4553 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4555 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4556 instead of pointer_hash.
4557 (detect_field_duplicates): Likewise.
4559 2015-06-25 Marek Polacek <polacek@redhat.com>
4561 * c-array-notation.c: Use VAR_P throughout.
4562 * c-decl.c: Likewise.
4563 * c-objc-common.c: Likewise.
4564 * c-parser.c: Likewise.
4565 * c-typeck.c: Likewise.
4567 2015-06-25 Marek Polacek <polacek@redhat.com>
4569 * c-decl.c: Use is_global_var throughout.
4570 * c-parser.c: Likewise.
4571 * c-typeck.c: Likewise.
4573 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4575 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4576 * c-aux-info.c: Likewise.
4577 * c-convert.c: Likewise.
4578 * c-decl.c: Likewise.
4579 * c-errors.c: Likewise.
4580 * c-lang.c: Likewise.
4581 * c-objc-common.c: Likewise.
4582 * c-parser.c: Likewise.
4583 * c-typeck.c: Likewise.
4585 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4588 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4591 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4593 * c-decl.c (pop_scope): Register the main translation unit
4594 through the new debug hook.
4596 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4598 * c-array-notation.c : Adjust include files.
4599 * c-aux-info.c : Likewise.
4600 * c-convert.c : Likewise.
4601 * c-decl.c : Likewise.
4602 * c-errors.c : Likewise.
4603 * c-lang.c : Likewise.
4604 * c-lang.h : Likewise.
4605 * c-objc-common.c : Likewise.
4606 * c-parser.c : Likewise.
4607 * c-typeck.c : Likewise.
4609 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4611 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4612 immediately clobber it.
4613 (c_write_global_declarations_1): Remove call to
4614 check_global_declaration_1.
4615 (c_write_global_declarations_2): Remove.
4616 (c_write_final_cleanups): Rename from c_write_global_declarations.
4617 Remove call to finalize_compilation_unit.
4618 Remove calls to debugging hooks.
4619 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4620 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4621 * c-tree.h: Remove c_write_global_declarations.
4623 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4625 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4626 * c-aux-info.c: Likewise.
4627 * c-convert.c: Likewise.
4628 * c-decl.c: Likewise.
4629 * c-errors.c: Likewise.
4630 * c-lang.c: Likewise.
4631 * c-objc-common.c: Likewise.
4632 * c-parser.c: Likewise.
4633 * c-typeck.c: Likewise.
4635 2015-06-04 Marek Polacek <polacek@redhat.com>
4638 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4641 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4643 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4644 Warn for empty struct.
4645 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4647 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4649 * c-decl.c (start_function): Call plugin before parsing.
4650 (finish_function): Call plugin after parsing.
4652 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4655 * c-decl.c (merge_decls): Merge DECL_COMMON.
4657 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4659 * Make-lang.in (check_gcc_pallelize): Define.
4661 2015-05-22 Marek Polacek <polacek@redhat.com>
4664 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4667 2015-05-21 Marek Polacek <polacek@redhat.com>
4669 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4672 2015-05-20 Marek Polacek <polacek@redhat.com>
4674 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4675 * c-typeck.c: Likewise.
4677 2015-05-19 Marek Polacek <polacek@redhat.com>
4679 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4681 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4684 * c-parser.c (c_parser_omp_for_loop): Don't add
4685 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4686 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4687 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4690 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4692 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4695 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4698 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4701 2015-05-14 Marek Polacek <polacek@redhat.com>
4705 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4708 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4710 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4711 to add a call to warn_for_misleading_indentation.
4712 (c_parser_else_body): Likewise, adding param "else_loc".
4713 (c_parser_if_statement): Check for misleading indentation.
4714 (c_parser_while_statement): Likewise.
4715 (c_parser_for_statement): Likewise.
4717 2015-05-08 Marek Polacek <polacek@redhat.com>
4720 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4721 (output_init_element): Likewise.
4723 2015-05-07 Marek Polacek <polacek@redhat.com>
4726 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4729 2015-04-30 Marek Polacek <polacek@redhat.com>
4731 * c-typeck.c (set_init_label): Call error_at instead of error and
4734 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4737 * c-typeck.c (c_build_va_arg): Clarify the error message.
4739 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4741 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4742 OMP_STANDALONE_CLAUSES.
4744 2015-04-28 Marek Polacek <polacek@redhat.com>
4746 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4748 2015-04-28 Marek Polacek <polacek@redhat.com>
4751 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4753 2015-04-25 Marek Polacek <polacek@redhat.com>
4756 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4759 2015-04-23 Marek Polacek <polacek@redhat.com>
4762 * c-decl.c (set_labels_context_r): New function.
4763 (store_parm_decls): Call it via walk_tree_without_duplicates.
4764 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4765 instead of create_tmp_var. Build TARGET_EXPR instead of
4767 (build_atomic_assign): Use create_tmp_var_raw instead of
4768 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4770 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4772 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4773 (c_parser_omp_target_update): Add missed %> to error_at ().
4775 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4778 * c-decl.c (c_default_pointer_mode): Remove definition.
4779 * c-tree.h (c_default_pointer_mode): Remove declaration.
4781 2015-03-27 Tobias Burnus <burnus@net-b.de>
4784 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4786 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4787 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4788 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4790 2015-03-19 Jakub Jelinek <jakub@redhat.com>
4792 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4793 attribute for DECL_EXTERNAL VAR_DECLs.
4795 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4797 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4800 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4803 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4804 before preparing arguments to warn_logical_not_parentheses.
4806 2015-03-09 Jakub Jelinek <jakub@redhat.com>
4809 * c-typeck.c (parser_build_binary_op): Don't warn for
4810 !!x == y or !b == y where b is _Bool.
4812 2015-03-09 Marek Polacek <polacek@redhat.com>
4814 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4815 * c-decl.c (grokdeclarator): Likewise.
4816 * c-typeck.c (build_binary_op): Likewise.
4818 2015-02-27 Marek Polacek <polacek@redhat.com>
4821 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4823 2015-02-14 Marek Polacek <polacek@redhat.com>
4826 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4827 declared through a typedef name.
4829 2015-02-13 Marek Polacek <polacek@redhat.com>
4832 * c-decl.c (grokdeclarator): Print also the type when giving
4833 the error message about array's incomplete element type.
4835 2015-02-11 Jakub Jelinek <jakub@redhat.com>
4838 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4839 check in the POP macro.
4841 2015-02-09 Marek Polacek <polacek@redhat.com>
4844 * c-typeck.c (process_init_element): Don't always wrap
4845 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4846 initializing a range of elements.
4848 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4852 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4854 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
4856 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4857 processing enum declaration.
4859 2015-01-29 Marek Polacek <polacek@redhat.com>
4862 * c-typeck.c (pop_init_level): If constructor_elements has
4863 exactly one element with integer_zerop value, set constructor_zeroinit
4864 to 1. Remove braces around warning_init call.
4866 2015-01-27 Jakub Jelinek <jakub@redhat.com>
4869 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4870 of FUNCTION_DECLs with error_mark_node.
4872 2015-01-26 Jakub Jelinek <jakub@redhat.com>
4875 * c-typeck.c (convert_arguments): Return -1 if there are
4876 error_args, even if we've diagnosed too many arguments.
4878 2015-01-21 Richard Biener <rguenther@suse.de>
4881 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4882 for builtins the user declared correctly.
4884 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4885 Bernd Schmidt <bernds@codesourcery.com>
4886 Cesar Philippidis <cesar@codesourcery.com>
4887 James Norris <jnorris@codesourcery.com>
4888 Jakub Jelinek <jakub@redhat.com>
4889 Ilmir Usmanov <i.usmanov@samsung.com>
4891 * c-parser.c: Include "gomp-constants.h".
4892 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4893 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4894 Use OMP_CLAUSE_SET_MAP_KIND.
4895 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4896 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4897 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4898 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4899 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4900 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4901 "copyout", "create", "delete", "deviceptr", "gang", "host",
4902 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4903 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4904 "present_or_create", "pcreate", "seq", "self", "vector",
4905 "vector_length", "wait", "worker".
4906 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4907 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4908 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4909 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4910 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4911 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4912 (c_parser_oacc_data_clause_deviceptr)
4913 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4914 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4915 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4916 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4917 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4918 (c_parser_oacc_parallel, c_parser_oacc_update)
4919 (c_parser_oacc_wait): New functions.
4920 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4921 (c_finish_oacc_data): New prototypes.
4922 * c-typeck.c: Include "gomp-constants.h".
4923 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4924 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4925 OMP_CLAUSE_SET_MAP_KIND.
4926 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4927 (c_finish_oacc_data): New functions.
4928 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4929 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4930 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4931 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4932 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4933 GOMP_MAP_FORCE_DEVICEPTR.
4935 2015-01-09 Michael Collison <michael.collison@linaro.org>
4937 * c-array-notation.c: Include hash-set.h, machmode.h,
4938 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4939 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4940 * c-aux-info.c: Ditto.
4941 * c-convert.c: Ditto.
4943 * c-errors.c: Ditto.
4944 * c-lang.c: Dittoxs.
4945 * c-objc-common.c: Ditto.
4946 * c-parser.c: Ditto.
4947 * c-typeck.c: Include hash-set.h, machmode.h,
4948 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4949 fold-const.h, wide-int.h, inchash.h, real.h and
4950 fixed-value.h due to flattening of tree.h.
4952 2015-01-07 Marek Polacek <polacek@redhat.com>
4955 * c-typeck.c (process_init_element): Disallow initialization of
4956 a flexible array member with a string constant if the structure
4959 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4962 * c-typeck.c (convert_for_assignment, c_finish_return): For
4963 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4964 types also set in_late_binary_op around convert call.
4965 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4966 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4967 result on expr as last argument to ubsan_instrument_float_cast,
4968 if in_late_binary_op, don't use c_save_expr but save_expr.
4970 Update copyright years.
4972 2015-01-05 Marek Polacek <polacek@redhat.com>
4975 * c-typeck.c (build_array_ref): Pass loc down to
4976 warn_array_subscript_with_type_char.
4978 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4980 * c-typeck.c: New behavious for pointers to arrays with qualifiers
4981 (common-pointer-type): For pointers to arrays take qualifiers from
4983 (build_conditional_expr): Add warnings for lost qualifiers.
4984 (comp-target-types): Allow pointers to arrays with different qualifiers.
4985 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4986 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4987 to PEDWARN_FOR_QUALIFIERS.
4989 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4992 * c-convert.c: Include ubsan.h.
4993 (convert): For real -> integral casts and
4994 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4995 instead instrument the float cast directly.
4997 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4999 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5000 c_finish_stmt_expr): Remove NULL last argument from
5001 create_tmp_var_raw and create_tmp_var calls.
5002 * c-array-notation.c (fix_builtin_array_notation_fn,
5003 build_array_notation_expr, fix_conditional_array_notations_1,
5004 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5006 2014-11-28 Marek Polacek <polacek@redhat.com>
5009 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5010 convert the right operand to integer type.
5012 2014-11-25 Marek Polacek <polacek@redhat.com>
5015 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5016 for inline functions.
5018 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5021 * c-typeck.c (build_array_ref): Adjust
5022 convert_vector_to_pointer_for_subscript caller. If it returns true,
5023 call non_lvalue_loc on the result.
5025 2014-11-11 Richard Biener <rguenther@suse.de>
5027 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5030 2014-11-10 Andi Kleen <ak@linux.intel.com>
5033 * c-parser.c (c_parser_statement_after_labels): Call
5035 (c_parser_if_statement): Dito.
5036 (c_parser_switch_statement): Dito.
5037 (c_parser_while_statement): Dito.
5038 (c_parser_do_statement): Dito.
5039 (c_parser_for_statement): Dito.
5040 * c-typeck.c (c_finish_loop): Dito.
5042 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5044 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5045 OPT_Wshift_count_overflow in the warnings.
5047 2014-10-30 Marek Polacek <polacek@redhat.com>
5049 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5050 print the stripped version as well, if they're not the same.
5052 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5054 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5057 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5059 * c-decl.c: Adjust include files.
5060 * c-parser.c: Ditto.
5062 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5063 Tom Tromey <tromey@redhat.com>
5065 * c-tree.h (enum c_oracle_request): New.
5066 (c_binding_oracle_function): New typedef.
5067 (c_binding_oracle, c_pushtag, c_bind): Declare.
5068 * c-decl.c (c_binding_oracle): New global.
5069 (I_SYMBOL_CHECKED): New macro.
5070 (i_symbol_binding): New function.
5071 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5072 (I_TAG_CHECKED): New macro.
5073 (i_tag_binding): New function.
5074 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5075 (I_LABEL_CHECKED): New macro.
5076 (i_label_binding): New function.
5077 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5078 (c_print_identifier): Save and restore c_binding_oracle.
5079 (c_pushtag, c_bind): New functions.
5081 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5083 * c-typeck.c: Adjust include files.
5085 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5088 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5089 initialization here...
5090 (c_initialize_diagnostics): ... but here. Set defaults after
5091 building pretty-printer.
5093 2014-10-23 Marek Polacek <polacek@redhat.com>
5096 * c-decl.c (pop_scope): Don't print warning in external_scope.
5098 2014-10-19 Marek Polacek <polacek@redhat.com>
5101 * c-typeck.c (output_init_element): Allow initializing objects with
5102 static storage duration with compound literals even in C99 and add
5105 2014-10-17 Marek Polacek <polacek@redhat.com>
5108 * c-typeck.c (digest_init): Allow initializing objects with static
5109 storage duration with compound literals even in C99 and add pedwarn
5112 2014-10-17 Marek Polacek <polacek@redhat.com>
5115 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5116 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5117 error multiple times. Print the type.
5119 2014-10-17 Marek Polacek <polacek@redhat.com>
5122 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5125 2014-10-17 Marek Polacek <polacek@redhat.com>
5127 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5128 (start_function): Use OPT_Wimplicit_int instead of 0.
5129 (store_parm_decls_oldstyle): Likewise.
5131 2014-10-17 Alan Modra <amodra@gmail.com>
5134 * c-decl.c (merge_decls): Don't merge section name or tls model
5135 to newdecl symtab node, instead merge to olddecl. Override
5136 existing olddecl section name. Set tls_model for all thread-local
5137 vars, not just OMP thread-private ones. Remove incorrect comment.
5139 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5141 * c-decl.c: Adjust include files.
5143 2014-10-14 DJ Delorie <dj@redhat.com>
5145 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5146 (c_token_starts_typename): Check all __intN, not just __int128.
5147 (c_token_starts_declspecs): Likewise.
5148 (c_parser_declspecs): Likewise.
5149 (c_parser_attribute_any_word): Likewise.
5150 (c_parser_objc_selector): Likewise.
5151 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5152 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5154 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5156 (finish_declspecs): Likewise.
5158 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5160 * c-parser.c (c_parser_all_labels): New function to replace
5162 (c_parser_statement): Call the new function.
5164 2014-10-09 Marek Polacek <polacek@redhat.com>
5167 * c-typeck.c (pop_init_level): Don't warn about initializing
5170 2014-10-07 Marek Polacek <polacek@redhat.com>
5173 * c-decl.c (header_for_builtin_fn): New function.
5174 (implicitly_declare): Suggest which header to include.
5176 2014-10-07 Marek Polacek <polacek@redhat.com>
5178 * c-convert.c (convert): Use error_operand_p.
5179 * c-typeck.c (require_complete_type): Likewise.
5180 (really_atomic_lvalue): Likewise.
5181 (digest_init): Likewise.
5182 (handle_omp_array_sections_1): Likewise.
5184 2014-10-03 Marek Polacek <polacek@redhat.com>
5187 * c-decl.c (pop_scope): Don't warn about "inline function declared
5188 but never defined" for functions marked with gnu_inline attribute.
5190 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5193 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5194 on low_bound and length.
5196 2014-09-24 Marek Polacek <polacek@redhat.com>
5200 * c-parser.c: Don't define CPP_KEYWORD.
5201 (c_parser_switch_statement): Pass original type to c_finish_case.
5202 * c-tree.h (c_finish_case): Update declaration.
5203 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5204 conditionally to c_do_switch_warnings.
5206 2014-09-03 Marek Polacek <polacek@redhat.com>
5209 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5212 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5213 Balaji V. Iyer <balaji.v.iyer@intel.com>
5214 Igor Zamyatin <igor.zamyatin@intel.com>
5216 * c-parser.c (c_parser_cilk_for): New function.
5217 (c_parser_cilk_grainsize): Likewise.
5218 (c_get_temp_regvar): Likewise.
5219 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5220 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5221 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5222 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5225 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5227 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5228 with using HOST_WIDE_INT without truncation to 'int'
5230 2014-08-22 Marek Polacek <polacek@redhat.com>
5233 * c-typeck.c (parser_build_binary_op): Adjust call to
5234 warn_logical_not_parentheses.
5236 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5239 * c-parser.c (c_parser_array_notation): Check for correct
5240 type of an array added.
5242 2014-08-19 Marek Polacek <polacek@redhat.com>
5245 * c-typeck.c (build_binary_op): If either operand of a comparison
5246 is a boolean expression, call maybe_warn_bool_compare.
5248 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5251 * c-typeck.c (build_c_cast): Do a conversion even when the
5252 TYPE_MAIN_VARIANTs are the same.
5254 2014-08-19 Marek Polacek <polacek@redhat.com>
5256 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5257 pedwarn_c99 instead of pedwarn.
5258 (grokfield): Likewise.
5259 (warn_defaults_to): New function.
5260 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5261 Unconditionally call pedwarn_c99 instead of pedwarn.
5262 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5263 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5264 check flag_isoc11 before.
5265 * c-errors.c (pedwarn_c99): Change the return type to bool.
5266 Handle -Wc99-c11-compat.
5267 * c-parser.c (disable_extension_diagnostics): Handle
5268 warn_c99_c11_compat.
5269 (restore_extension_diagnostics): Likewise.
5270 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5271 instead of pedwarn, don't check flag_isoc11 before.
5272 (c_parser_declspecs): Likewise.
5273 (c_parser_alignas_specifier): Likewise.
5274 (c_parser_alignof_expression): Likewise.
5275 (c_parser_generic_selection): Likewise.
5276 * c-tree.h (pedwarn_c99): Update declaration.
5277 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5280 2014-08-19 Marek Polacek <polacek@redhat.com>
5282 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5284 * c-errors.c: Include "opts.h".
5285 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5286 * c-parser.c (disable_extension_diagnostics): Handle negative value
5287 of warn_c90_c99_compat, too.
5288 (restore_extension_diagnostics): Likewise.
5289 (c_parser_compound_statement_nostart): Pass
5290 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5292 2014-08-12 Marek Polacek <polacek@redhat.com>
5294 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5296 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5298 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5300 2014-08-10 Marek Polacek <polacek@redhat.com>
5303 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5304 Call pedwarn_c90 instead of pedwarn.
5305 (check_bitfield_type_and_width): Likewise.
5306 (declspecs_add_qual): Likewise.
5307 (declspecs_add_type): Likewise.
5308 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5309 Adjust to only call pedwarn_c90.
5310 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5311 pedwarn_c90 instead of pedwarn.
5312 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5313 * c-parser.c (disable_extension_diagnostics): Handle
5314 warn_c90_c99_compat.
5315 (restore_extension_diagnostics): Likewise.
5316 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5317 pedwarn_c90 instead of pedwarn.
5318 (c_parser_initelt): Likewise.
5319 (c_parser_postfix_expression): Likewise.
5320 (c_parser_postfix_expression_after_paren_type): Likewise.
5321 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5322 * c-tree.h: Fix formatting.
5323 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5324 pedwarn_c90 instead of pedwarn.
5326 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5328 * c-typeck.c: Remove include of pointer-set.h.
5330 2014-08-07 Marek Polacek <polacek@redhat.com>
5332 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5334 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5336 * c-typeck.c: Use hash_map instead of pointer_map.
5338 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5340 * c-decl.c: Use hash_set instead of pointer_set.
5342 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5345 * c-array-notation.c (expand_array_notations): Handling
5348 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5351 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5354 2014-07-30 Tom Tromey <tromey@redhat.com>
5356 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5358 (really_start_incremental_init, push_init_level): Initialize
5360 (pop_init_level): Set global designator_depth.
5361 (process_init_element): Check for designated_init attribute.
5363 2014-07-20 Marek Polacek <polacek@redhat.com>
5366 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5367 (implicitly_declare): Pass location to implicit_decl_warning.
5369 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5372 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5373 If non-NULL, call c_parser_check_literal_zero.
5374 (c_parser_check_literal_zero): New function.
5375 (c_parser_postfix_expression_after_primary): Adjust
5376 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5378 2014-07-06 Marek Polacek <polacek@redhat.com>
5381 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5382 * c-tree.h (C_ARRAY_PARAMETER): Define.
5383 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5386 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5387 Chen Gang <gang.chen.5i5j@gmail.com>
5389 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5392 2014-07-01 Marek Polacek <polacek@redhat.com>
5394 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5395 instead of 0 to WARN_FOR_ASSIGNMENT.
5397 2014-07-01 Marek Polacek <polacek@redhat.com>
5400 * c-typeck.c (convert_for_assignment): Pass
5401 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5403 2014-06-30 Marek Polacek <polacek@redhat.com>
5405 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5406 has no_sanitize_undefined attribute.
5408 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5411 * c-array-notation.c (fix_builtin_array_notation_fn):
5412 Check for 0 arguments in builtin call. Check that bultin argument is
5414 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5417 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5419 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5420 qualifiers in __auto_type for atomic types.
5421 (c_parser_typeof_specifier): Discard all type qualifiers in
5422 __typeof__ for atomic types.
5424 2014-06-25 Marek Polacek <polacek@redhat.com>
5427 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5428 the return expression to c_finish_return.
5430 2014-06-25 Jakub Jelinek <jakub@redhat.com>
5432 * c-typeck.c (c_finish_omp_clauses): Make sure
5433 OMP_CLAUSE_LINEAR_STEP has correct type.
5435 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5439 2014-06-24 Jakub Jelinek <jakub@redhat.com>
5441 * c-parser.c (c_parser_omp_for_loop): For
5442 #pragma omp parallel for simd move lastprivate clause from parallel
5443 to for rather than simd.
5445 2014-06-23 Marek Polacek <polacek@redhat.com>
5447 * c-typeck.c (parser_build_binary_op): Don't call
5448 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5450 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5452 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5453 * c-decl.c (merge_decls): Likewise.
5455 2014-06-09 Marek Polacek <polacek@redhat.com>
5458 * c-typeck.c (error_init): Call inform instead of error_at.
5459 (pedwarn_init): Call inform instead of pedwarn.
5460 (warning_init): Call inform instead of warning_at.
5462 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
5464 * c-decl.c (merge_decls): Use set_decl_section_name.
5465 (duplicate_decls): Remove node if it exists.
5467 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5470 * c-typeck.c (push_init_level, process_init_element,
5471 pop_init_level): Correct check for zero initialization, move
5472 missing brace warning to respect zero initialization.
5474 2014-06-05 Marek Polacek <polacek@redhat.com>
5477 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5479 2014-06-05 Marek Polacek <polacek@redhat.com>
5482 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5483 on the left hand side operand of a comparison.
5485 2014-06-05 Marek Polacek <polacek@redhat.com>
5488 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5489 Print note only if the warning was printed.
5491 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5494 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5497 2014-06-03 Marek Polacek <polacek@redhat.com>
5500 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5502 * c-tree.h (c_start_case): Update.
5503 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5504 switch condition has boolean value.
5506 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
5508 * c-decl.c: Include builtins.h.
5509 * c-parser.c: Likewise.
5511 2014-05-27 Marek Polacek <polacek@redhat.com>
5514 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5515 error and warning calls to error_at and warning_at. Pass location of
5516 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5517 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5518 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5520 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5523 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5524 function parameters.
5526 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
5528 * c-decl.c (merge_decls): Preserve symtab node pointers.
5529 (duplicate_decls): Free new decl.
5531 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5533 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5536 * c-parser.c (c_parser_omp_target): Return bool values.
5538 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5540 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5541 num_teams_loc variable to num_thread_limit_loc.
5543 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5545 * c-array-notation.c (expand_array_notations): Use void_node
5546 instead of void_zero_node.
5548 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5550 * c-decl.c (finish_struct): Adjust.
5551 (finish_enum): Likewise.
5553 (record_inline_static): Likewise.
5554 (push_scope): Likewise.
5555 (make_label): Likewise.
5556 (lookup_label_for_goto): Likewise.
5557 (finish_struct): Likewise.
5558 (finish_enum): Likewise.
5559 (store_parm_decls): Likewise.
5560 (c_push_function_context): Likewise.
5561 * c-lang.h: Remove usage of variable_size gty attribute.
5562 * c-parser.c (c_parse_init): Adjust.
5563 (c_parse_file): Likewise.
5565 2014-05-13 Marek Polacek <polacek@redhat.com>
5568 * c-typeck.c (convert_for_assignment): Pass location to
5569 WARN_FOR_ASSIGNMENT instead of input_location.
5571 2014-05-10 Marek Polacek <polacek@redhat.com>
5573 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5574 maybe_warn_string_init.
5575 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5576 maybe_warn_string_init.
5577 * c-tree.h (maybe_warn_string_init): Update declaration.
5578 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5579 Call pedwarn_init with loc instead of with input_location.
5580 (digest_init): Pass init_loc to maybe_warn_string_init.
5581 (pop_init_level): Call pedwarn_init with loc instead of with
5583 (set_init_index): Likewise.
5584 (process_init_element): Likewise.
5586 2014-05-09 Marek Polacek <polacek@redhat.com>
5589 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5590 (c_parser_initelt): Pass location to set_init_label. Pass array index
5591 location to set_init_index.
5592 * c-tree.h (push_init_level): Update declaration.
5593 (pop_init_level): Likewise.
5594 (set_init_index): Likewise.
5595 (set_init_label): Likewise.
5596 * c-typeck.c (error_init): Add location parameter. Call error_at
5598 (digest_init): Pass init_loc to error_init.
5599 (really_start_incremental_init):
5600 (push_init_level): Add location parameter. Pass loc to pop_init_level
5602 (pop_init_level): Likewise.
5603 (set_designator): Add location parameter. Pass loc to pop_init_level,
5604 push_init_level, and error_init.
5605 (set_init_index): Add location parameter. Pass loc to error_init and
5607 (set_init_label): Likewise.
5608 (output_init_element): Pass loc to error_init.
5609 (process_init_element): Pass loc to error_init, pop_init_level,
5610 pedwarn_init, and push_init_level.
5612 2014-05-09 Marek Polacek <polacek@redhat.com>
5615 * c-parser.c (c_parser_attributes): Parse the arguments as an
5616 expression-list if the attribute takes identifier.
5618 2014-05-08 Marek Polacek <polacek@redhat.com>
5621 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5624 2014-05-08 Marek Polacek <polacek@redhat.com>
5627 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5630 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5631 Mike Stump <mikestump@comcast.net>
5632 Richard Sandiford <rdsandiford@googlemail.com>
5634 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5635 (finish_enum): Use wide-int interfaces.
5636 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5637 * c-typeck.c (build_c_cast): Likewise.
5638 (set_nonincremental_init_from_string): Likewise.
5639 (c_tree_equal): Likewise.
5641 2014-05-02 Marek Polacek <polacek@redhat.com>
5644 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5645 Return size_one_node when the type is not complete.
5646 (pointer_diff): Remove comment.
5647 (build_unary_op): Improve error messages.
5649 2014-05-02 Marek Polacek <polacek@redhat.com>
5651 * c-typeck.c (c_finish_return): Separate warning_at calls.
5653 2014-05-02 Marek Polacek <polacek@redhat.com>
5655 * c-tree.h (error_init): Remove declaration.
5656 (pedwarn_init): Likewise.
5657 * c-typeck.c (error_init): Make static and move above.
5658 (pedwarn_init): Likewise.
5659 (warning_init): Move above.
5660 (maybe_warn_string_init): Likewise.
5662 2014-05-01 Jeff Law <law@redhat.com>
5666 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5667 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5670 2014-05-02 Marek Polacek <polacek@redhat.com>
5673 * c-typeck.c (push_init_level): Set constructor_designated to
5674 p->designated for structures.
5676 2014-05-01 Marek Polacek <polacek@redhat.com>
5679 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5680 function-definition has an attribute after the declarator.
5682 2014-05-01 Marek Polacek <polacek@redhat.com>
5685 * c-typeck.c (warning_init): Add location_t parameter. Call
5686 warning_at instead of warning.
5687 (push_init_level): Pass input_location to warning_init.
5688 (add_pending_init): Add location_t parameter. Pass loc to
5690 (set_nonincremental_init): Pass input_location to add_pending_init.
5691 (set_nonincremental_init_from_string): Likewise.
5692 (output_init_element): Pass loc to warning_init and to
5695 2014-05-01 Marek Polacek <polacek@redhat.com>
5698 * c-typeck.c (c_finish_return): Distinguish between label and variable
5699 when warning about returning local address.
5701 2014-05-01 Marek Polacek <polacek@redhat.com>
5704 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5707 2014-05-01 Marek Polacek <polacek@redhat.com>
5710 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5711 instead of 0 to WARN_FOR_QUALIFIERS.
5713 2014-05-01 Marek Polacek <polacek@redhat.com>
5716 * c-typeck.c (default_conversion): Use better location for
5719 2014-04-30 Marek Polacek <polacek@redhat.com>
5721 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5722 also when SANITIZE_FLOAT_DIVIDE is on.
5724 2014-04-30 Marek Polacek <polacek@redhat.com>
5727 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5728 and pedwarn_init. Use loc insted of input_location.
5730 2014-04-30 Marek Polacek <polacek@redhat.com>
5733 * c-typeck.c (build_binary_op): Use location when warning about
5736 2014-04-25 Marek Polacek <polacek@redhat.com>
5739 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5740 always_inline/noinline and hot/cold attributes.
5742 2014-04-25 Marek Polacek <polacek@redhat.com>
5745 * c-parser.c (c_parser_initelt): Pass input_location to
5746 process_init_element.
5747 (c_parser_initval): Pass loc to process_init_element.
5748 * c-tree.h (process_init_element): Adjust declaration.
5749 * c-typeck.c (push_init_level): Pass input_location to
5750 process_init_element.
5751 (pop_init_level): Likewise.
5752 (set_designator): Likewise.
5753 (output_init_element): Add location_t parameter. Pass loc to
5755 (output_pending_init_elements): Pass input_location to
5756 output_init_element.
5757 (process_init_element): Add location_t parameter. Pass loc to
5758 output_init_element.
5760 2014-04-24 Jakub Jelinek <jakub@redhat.com>
5762 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5763 atomic-clause, allow comma in between atomic-clause and
5766 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5769 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5770 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5772 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5775 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5776 create_tmp_var instead build_decl for creating temps.
5777 (build_array_notation_expr): Likewise.
5778 (fix_conditional_array_notations_1): Likewise.
5779 (fix_array_notation_expr): Likewise.
5780 (fix_array_notation_call_expr): Likewise.
5782 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5785 * c-tree.h (c_build_function_call_vec): New prototype.
5786 * c-typeck.c (build_function_call_vec): Don't call
5787 resolve_overloaded_builtin here.
5788 (c_build_function_call_vec): New wrapper function around
5789 build_function_call_vec. Call resolve_overloaded_builtin here.
5790 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5791 Call c_build_function_call_vec instead of build_function_call_vec.
5792 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5793 * c-decl.c (finish_decl): Likewise.
5795 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5798 * c-typeck.c: Use correct format string in cast-qual warning
5800 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5802 * c-decl.c (c_decl_attributes): Use
5803 lang_hooks.types.omp_mappable_type.
5804 * c-typeck.c (c_finish_omp_clauses): Likewise.
5806 2014-03-06 Marek Polacek <polacek@redhat.com>
5809 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5810 of checking tree code.
5812 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5814 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5815 (c_parser_parameter_declaration): Likewise.
5817 2014-02-19 Marek Polacek <polacek@redhat.com>
5820 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5821 Call mark_exp_read on exp.value.
5822 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5823 TREE_ADDRESSABLE on old instead of val.
5824 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5826 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5828 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5829 C_EXPR_APPEND by vec_safe_push.
5830 * c-tree.h (C_EXPR_APPEND): Remove.
5832 2014-01-31 Marek Polacek <polacek@redhat.com>
5835 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5836 build_function_call_vec.
5837 (build_function_call): Likewise.
5838 (build_atomic_assign): Likewise.
5839 (build_function_call_vec): Add arg_loc parameter. Use it.
5840 (convert_arguments): Likewise.
5841 (convert_for_assignment): Rename rhs_loc to expr_loc.
5842 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5843 (c_parser_objc_keywordexpr): Likewise.
5844 (c_parser_postfix_expression_after_primary): Call
5845 build_function_call_vec with expr_loc rather than op_loc.
5846 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5847 build_function_call_vec.
5848 (c_parser_expr_list): Add locations parameter. Fill it with locations
5849 of function arguments.
5850 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5852 2014-01-30 Marek Polacek <polacek@redhat.com>
5855 * c-typeck.c (build_function_call_vec): Use loc parameter.
5856 (convert_arguments): Add location parameter. Use it.
5857 (ep_convert_and_check): Likewise.
5858 (build_atomic_assign): Adjust convert_for_assignment call.
5859 (build_modify_expr): Likewise.
5860 (digest_init): Likewise.
5861 (c_finish_return): Likewise.
5862 (build_conditional_expr): Adjust ep_convert_and_check calls.
5863 (convert_for_assignment): Add rhs_loc parameter. Use it.
5864 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5867 2014-01-30 Richard Biener <rguenther@suse.de>
5870 * c-typeck.c (build_function_call_vec): Do not replace calls
5871 to a function via an incompatible type with a runtime abort.
5873 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5875 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5876 flag_enable_cilkplus with flag_cilkplus.
5877 (c_parser_direct_declarator_inner): Likewise.
5878 (c_parser_attribute_any_word): Likewise.
5879 (c_parser_attributes): Likewise.
5880 (c_parser_compound_statement): Likewise.
5881 (c_parser_statement_after_labels): Likewise.
5882 (c_parser_if_statement): Likewise.
5883 (c_parser_switch_statement): Likewise.
5884 (c_parser_do_statement): Likewise.
5885 (c_parser_for_statement): Likewise.
5886 (c_parser_unary_expression): Likewise.
5887 (c_parser_postfix_expression): Likewise.
5888 (c_parser_postfix_expression_after_primary): Likewise.
5889 (c_parser_postfix_expression_after_primary): Likewise.
5890 (c_parser_omp_clause_name): Likewise.
5891 (c_finish_omp_declare_simd): Likewise.
5892 (c_parser_cilk_verify_simd): Likewise.
5893 * c-typeck.c (build_array_ref): Likewise.
5894 (build_function_call_vec): Likewise.
5895 (convert_arguments): Likewise.
5896 (build_compound_expr): Likewise.
5897 (c_finish_return): Likewise.
5898 (c_finish_if_stmt): Likewise.
5899 (c_finish_loop): Likewise.
5900 (build_binary_op): Likewise.
5902 2014-01-23 Marek Polacek <polacek@redhat.com>
5905 * c-typeck.c (parser_build_binary_op): Use location instead of
5907 (build_binary_op): Pass location to shorten_compare.
5909 2014-01-23 Marek Polacek <polacek@redhat.com>
5912 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5915 2014-01-23 Marek Polacek <polacek@redhat.com>
5918 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5919 of a comma expression.
5920 (emit_side_effect_warnings): Likewise.
5922 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5925 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5926 function to use walk_tree and moved a lot of its functionality to
5927 expand_array_notations.
5928 (expand_array_notations): New function.
5930 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5932 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5933 attribute an attribute without value.
5935 2014-01-23 Jakub Jelinek <jakub@redhat.com>
5938 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5939 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5941 2014-01-22 Marek Polacek <polacek@redhat.com>
5944 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5945 of remove_c_maybe_const_expr on op1 and op2.
5947 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5950 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5951 effects, preevaluate rhs using SAVE_EXPR first.
5953 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5956 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5957 statements with if-elseif statements.
5959 2014-01-06 Marek Polacek <polacek@redhat.com>
5962 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5963 defined bit-field types only in ISO C.
5965 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5967 Update copyright years
5969 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5971 * c-array-notation.c: Use the standard form for the copyright notice.
5973 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5975 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5976 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5977 field in parser is not empty. If not-empty, call the function
5978 c_parser_finish_omp_declare_simd.
5979 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5980 between SIMD-enabled functions and #pragma simd. Added new parameter.
5981 (c_parser_cilk_all_clauses): Modified the usage of the function
5982 c_parser_cilk_clause_vectorlength as mentioned above.
5983 (c_parser_cilk_simd_fn_vector_attrs): New function.
5984 (c_finish_cilk_simd_fn_tokens): Likewise.
5985 (is_cilkplus_vector_p): Likewise.
5986 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5987 "nomask," and "mask" strings in clause name.
5988 (c_parser_omp_all_clauses): Added 3 new case statements:
5989 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5990 PRAGMA_CILK_CLAUSE_NOMASK.
5991 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5992 check for vector attribute and if so call the function
5993 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5994 called the function c_finish_cilk_simd_fn_tokens.
5995 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5996 parser field is non-empty. If so, parse them as you would parse
5997 the omp declare simd pragma.
5998 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5999 Added a check when step is a parameter and flag it as error.
6000 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6001 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6004 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6006 * c-parser.c (c_parser_omp_parallel): Fix description.
6008 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6010 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6011 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6012 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6013 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6015 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6018 * c-parser.c (c_parser_alignas_specifier): Use
6019 c_sizeof_or_alignof_type instead of c_alignof.
6020 (c_parser_alignof_expression): Likewise, with min_alignof
6021 parameter depending on alignof spelling used.
6023 2013-12-04 Marek Polacek <polacek@redhat.com>
6026 * c-decl.c (start_function): Don't warn for missing prototype for
6029 2013-12-03 Marek Polacek <polacek@redhat.com>
6032 * c-decl.c (build_compound_literal): Allow compound literals with
6033 empty initial value.
6035 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6038 * c-typeck.c (build_modify_expr): Diagnose assignment to
6039 expression with array type.
6041 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6044 * c-typeck.c (process_init_element): Do not treat a string as
6045 initializing a whole array when used with a designator for an
6048 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6051 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6052 an inline function following a static declaration.
6054 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6057 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6058 to p_name before calling c_parser_omp_teams instead of after.
6059 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6060 argument. Remove unused p_name variable.
6062 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6063 Jakub Jelinek <jakub@redhat.com>
6065 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6066 external_scope is NULL.
6068 2013-11-27 Tom de Vries <tom@codesourcery.com>
6069 Marc Glisse <marc.glisse@inria.fr>
6072 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6074 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6076 * c-typeck.c: Add required include files from gimple.h.
6078 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6080 * c-decl.c (define_label, shadow_tag_warned)
6081 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6082 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6083 (declspecs_add_type): Remove use of in_system_header macro.
6084 * c-parser.c (c_parser_unary_expression): Likewise.
6085 * c-typeck.c (store_init_value, process_init_element)
6086 (c_start_case): Likewise.
6088 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6091 * c-parser.c (c_parser_set_source_position_from_token): Remove
6092 reference to in_system_header from comment.
6094 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6096 * c-decl.c (grokdeclarator): Update comment to refer to
6097 tree_to_[su]hwi rather than tree_low_cst.
6099 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6101 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6102 tree_to_uhwi throughout.
6104 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6106 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6109 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6111 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6114 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6116 * c-parser.c (c_parser_cilk_simd): New.
6117 (c_parser_cilk_verify_simd): New.
6118 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6119 (c_parser_omp_for_loop): Add case for NE_EXPR.
6120 Set c_break_label for CILK_SIMD.
6121 (c_parser_cilk_clause_vectorlength): New.
6122 (c_parser_cilk_clause_linear): New.
6123 (c_parser_cilk_clause_name): New.
6124 (c_parser_cilk_all_clauses): New.
6125 * c-typeck.c (build_unary_op): Pass location argument to
6127 (build_modify_expr): Same.
6128 (build_asm_expr): Same.
6129 (c_finish_bc_stmt): Error on break/continue in loops.
6131 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6133 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6135 2013-11-14 Diego Novillo <dnovillo@google.com>
6137 * c-decl.c: Include print-tree.h.
6138 Include stor-layout.h.
6141 Include stringpool.h.
6142 * c-lang.c: Include fold-const.h.
6143 * c-parser.c: Include stringpool.h.
6145 Include stor-layout.h.
6147 Include trans-mem.h.
6148 * c-typeck.c: Include stor-layout.h.
6149 Include trans-mem.h.
6153 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6155 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6156 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6158 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6159 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6161 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6162 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6163 (c_parser_declarator, c_parser_direct_declarator_inner)
6164 (c_parser_parameter_declaration, c_parser_type_name): All callers
6166 (c_parser_declaration_or_fndef): Handle declarations with type
6167 determined from the initializer.
6169 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6171 * c-typeck.c: Include gimplify.h.
6173 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6175 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6176 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6178 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6179 or _Thread_local as appropriate in diagnostics.
6180 (build_null_declspecs): Initialize ret->thread_gnu_p.
6181 (declspecs_add_scspec): Handle either __thread or _Thread_local
6182 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6183 pedantic. Do not disallow _Thread_local extern and _Thread_local
6186 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6187 Andrew MacLeod <amacleod@redhat.com>
6189 * c-aux-info.c (gen_type): Handle atomic qualifier.
6190 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6191 qualifiers when compating types.
6192 (shadow_tag_warned): Handle atomic_p in declspecs.
6193 (quals_from_declspecs): Likewise.
6194 (start_decl): Use c_type_promotes_to when promoting argument
6196 (grokdeclarator): Handle _Atomic.
6197 (get_parm_info): Diagnose any qualifier on "void" as only
6199 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6200 comparing types. Use c_type_promotes_to when promoting argument
6202 (finish_function): Use c_type_promotes_to when promoting argument
6204 (build_null_declspecs): Handle atomic_p in declspecs.
6205 (declspecs_add_qual): Handle RID_ATOMIC.
6206 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6207 (c_token_starts_declspecs): Handle RID_ATOMIC.
6208 (c_parser_declspecs): Handle atomic type specifiers and
6210 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6211 from types of expressions with atomic type.
6212 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6213 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6214 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6215 (c_parser_statement_after_labels, c_parser_switch_statement)
6216 (c_parser_for_statement, c_parser_expr_no_commas)
6217 (c_parser_conditional_expression, c_parser_binary_expression)
6218 (c_parser_cast_expression, c_parser_unary_expression)
6219 (c_parser_postfix_expression)
6220 (c_parser_postfix_expression_after_primary, c_parser_expression):
6221 Use convert_lvalue_to_rvalue.
6222 (c_parser_expression_conv, c_parser_expr_list): Document
6223 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6224 (c_parser_objc_synchronized_statement): Use
6225 convert_lvalue_to_rvalue.
6226 (c_parser_objc_selector): Handle RID_ATOMIC.
6227 (c_parser_objc_receiver, c_parser_array_notation): Use
6228 convert_lvalue_to_rvalue.
6229 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6230 _Atomic (type-name).
6231 (struct c_declspecs): Add atomic_p field.
6232 (convert_lvalue_to_rvalue): Declare.
6233 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6234 corresponding atomic types.
6235 (qualify_type): Don't add _Atomic qualifiers from second argument.
6236 (comp_target_types): Do not allow _Atomic mismatches.
6237 (type_lists_compatible_p): Do not remove atomic qualifiers when
6239 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6240 (build_atomic_assign): New functions.
6241 (build_unary_op): Use build_atomic_assign for atomic increment and
6243 (build_conditional_expr): Do not treat _Atomic void as a qualified
6245 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6246 (find_anonymous_field_with_type, convert_to_anonymous_field)
6247 (convert_for_assignment): Do not remove atomic qualifiers when
6249 (digest_init): Do not accept initialization of arrays of atomic
6250 elements by string constants.
6251 (build_asm_expr): Use convert_lvalue_to_rvalue.
6252 (build_binary_op): Do not treat _Atomic void as a qualified
6255 2013-11-06 DJ Delorie <dj@redhat.com>
6257 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6258 both explicit and builtin, print the location of the explicit one.
6260 2013-11-05 Tobias Burnus <burnus@net-b.de>
6262 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6263 c_parser_omp_distribute, c_parser_omp_teams,
6264 c_parser_omp_target, c_parser_omp_declare): Handle
6267 2013-11-03 Marek Polacek <polacek@redhat.com>
6269 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6271 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6273 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6274 check_dup_generic at the end, unless remove is true.
6275 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6277 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6279 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6281 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6282 with decl that is not pointer nor array.
6284 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6286 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6287 a spawning function is found.
6288 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6289 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6290 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6291 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6293 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6294 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6296 (c_finish_return): Added a check to reject _Cilk_spawn in return
6298 (build_cilk_spawn): New function.
6299 (build_cilk_sync): Likewise.
6300 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6302 2013-10-27 Tobias Burnus <burnus@net-b.de>
6305 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6306 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6307 (c_parser_statement_after_labels): Update calls.
6309 2013-10-24 Tobias Burnus <burnus@net-b.de>
6312 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6313 Handle PRAGMA_IVDEP.
6314 (c_parser_statement_after_labels): Update call.
6316 2013-10-24 Marek Polacek <polacek@redhat.com>
6318 * c-parser.c (c_parser_struct_declaration): Add a comment.
6319 (c_parser_declarator): Don't allow _Alignas here.
6321 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6323 * c-parser.c: Include omp-low.h.
6324 * c-typeck.c: Likewise.
6326 2013-10-17 Marek Polacek <polacek@redhat.com>
6329 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6330 Document syntax of the array-declarator.
6331 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6333 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6334 (c_parser_struct_declaration): Likewise.
6335 (c_parser_declarator): Likewise.
6336 (c_parser_direct_declarator_inner): Likewise.
6337 (c_parser_parameter_declaration): Likewise.
6338 (c_parser_type_name): Likewise.
6340 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6342 * c-lang.h (current_omp_declare_target_attribute): New extern
6344 * c-parser.c: Include c-lang.h.
6345 (struct c_parser): Change tokens to c_token *.
6346 Add tokens_buf field. Change tokens_avail type to unsigned int.
6347 (c_parser_consume_token): If parser->tokens isn't
6348 &parser->tokens_buf[0], increment parser->tokens.
6349 (c_parser_consume_pragma): Likewise.
6350 (enum pragma_context): Add pragma_struct and pragma_param.
6351 (c_parser_external_declaration): Adjust
6352 c_parser_declaration_or_fndef caller.
6353 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6354 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6355 Adjust recursive call.
6356 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6358 (c_parser_parameter_declaration): Use pragma_param instead of
6360 (c_parser_compound_statement_nostart, c_parser_label,
6361 c_parser_for_statement): Adjust
6362 c_parser_declaration_or_fndef callers.
6363 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6364 it through to c_parser_conditional_expression.
6365 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6366 pass it through to c_parser_binary_expression. Adjust recursive
6368 (c_parser_binary_expression): Remove prec argument, add
6369 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6370 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6371 binop matches it, use build2 instead of parser_build_binary_op.
6372 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6373 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6374 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6375 Handle pragma_struct and pragma_param the same as pragma_external.
6376 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6377 (c_parser_omp_variable_list): Parse array sections for
6378 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6379 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6380 (c_parser_omp_clause_reduction): Handle user defined reductions.
6381 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6382 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6383 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6384 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6385 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6386 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6387 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6388 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6389 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6390 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6391 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6392 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6393 (c_parser_omp_for_loop): Add CODE argument, pass it through
6394 to c_finish_omp_for. Change last argument to cclauses,
6395 and adjust uses to grab parallel clauses from the array of all
6396 the split clauses. Adjust c_parser_binary_expression,
6397 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6398 (omp_split_clauses): New function.
6399 (c_parser_omp_simd): New function.
6400 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6401 Allow the function to be called also when parsing combined constructs,
6402 and call c_parser_omp_simd when parsing for simd.
6403 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6404 #pragma omp section, require exactly one structured-block instead of
6405 sequence of statements.
6406 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6407 Allow the function to be called also when parsing combined constructs.
6408 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6409 Allow the function to be called also when parsing combined
6411 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6412 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6413 c_parser_omp_teams, c_parser_omp_target_data,
6414 c_parser_omp_target_update, c_parser_omp_target,
6415 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6416 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6417 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6418 (c_parser_omp_construct): Add p_name and mask vars. Handle
6419 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6420 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6421 and c_parser_omp_sections callers.
6422 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6423 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6424 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6425 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6426 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6428 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6429 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6430 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6431 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6432 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6433 * c-typeck.c: Include tree-inline.h.
6434 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6435 handle_omp_array_sections_1, handle_omp_array_sections,
6436 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6437 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6438 user defined reductions.
6439 (c_tree_equal): New function.
6440 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6441 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6442 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6443 c_check_omp_declare_reduction_r): New prototypes.
6444 * c-decl.c (current_omp_declare_target_attribute): New variable.
6445 (c_decl_attributes): New function.
6446 (start_decl, start_function): Use it instead of decl_attributes.
6447 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6448 c_omp_reduction_decl, c_omp_reduction_lookup,
6449 c_check_omp_declare_reduction_r): New functions.
6451 2013-09-25 Tom Tromey <tromey@redhat.com>
6453 * Make-lang.in (c/gccspec.o): Remove.
6454 (CFLAGS-c/gccspec.o): New variable.
6455 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6456 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6457 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6459 2013-09-25 Tom Tromey <tromey@redhat.com>
6461 * Make-lang.in (c/gccspec.o): Don't use subshell.
6463 2013-09-18 Marek Polacek <polacek@redhat.com>
6466 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6467 Remove unnecessary check.
6469 2013-09-18 Marek Polacek <polacek@redhat.com>
6472 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6473 no_sanitize_undefined attribute.
6475 2013-09-13 Kai Tietz <ktietz@redhat.com>
6478 * c-decl.c (c_builtin_function_ext_scope): Remove
6479 wrong assumption that it is never called on prexisting
6482 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6484 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6486 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6488 * c-objc-common.c (c_tree_printer): Tidy.
6490 2013-08-30 Marek Polacek <polacek@redhat.com>
6492 * c-typeck.c (build_binary_op): Add division by zero and shift
6495 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6496 Joseph Myers <joseph@codesourcery.com>
6499 * c-typeck.c (c_common_type): Prefer double_type_node over
6500 other REAL_TYPE types with the same precision.
6501 (convert_arguments): Likewise.
6503 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6505 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6506 (c_initialize_diagnostics): Call a destructor for the early printer.
6508 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6510 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6511 printer initialization.
6513 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
6516 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6517 check for truth values.
6518 (expand_array_notation_exprs): Added truth values case. Removed an
6519 unwanted else. Added for-loop to walk through subtrees in default
6522 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6524 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6526 2013-07-23 Joseph Myers <joseph@codesourcery.com>
6528 * c-parser.c (struct c_generic_association): Fix typo.
6530 2013-07-23 Tom Tromey <tromey@redhat.com>
6531 Joseph Myers <joseph@codesourcery.com>
6533 * c-parser.c (struct c_generic_association): New.
6534 (c_generic_association_d): New typedef.
6535 (c_parser_generic_selection): New function.
6536 (c_parser_postfix_expression): Handle RID_GENERIC.
6538 2013-07-13 Jason Merrill <jason@redhat.com>
6541 * c-decl.c (finish_struct): Check for too-large class.
6543 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6546 * c-typeck.c (set_init_index): When folding, check for index overflow.
6548 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6550 * c-parser.c (c_parser_array_notation): Removed rejection of array
6551 notations in an array of function pointers.
6553 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6555 * c-array-notation.c (make_triplet_val_inv): New function.
6556 (create_cmp_incr): Likewise.
6557 (create_array_refs): Likewise.
6558 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6559 Also modularized common parts between functions and called the function.
6560 (build_array_notation_expr): Likewise.
6561 (fix_conditional_array_notations_1): Likewise.
6562 (fix_array_notation_expr): Likewise.
6563 (fix_array_notation_call_expr): Likewise.
6565 2013-06-18 Marek Polacek <polacek@redhat.com>
6568 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6570 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6572 * c-array-notation.c (build_array_notation_expr): Reject array notation
6573 mismatch between LHS and RHS even inside a call_expr. Also, removed
6574 a couple while statements that were dead code.
6576 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6578 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6579 excessive precision expressions in function parameters. Also removed
6580 couple unwanted while statements.
6582 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6584 * c-array-notation.c (expand_array_notation_exprs): Added
6585 ARRAY_NOTATION_REF case.
6587 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6589 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6590 function to c-family/array-notation-common.c.
6591 (is_cilkplus_reduce_builtin): Likewise.
6592 (find_rank): Likewise.
6593 (extract_array_notation_exprs): Likewise.
6594 (replace_array_notations): Likewise.
6595 (find_inv_trees): Likewise.
6596 (replace_inv_trees): Likewise.
6597 (contains_array_notation_expr): Likewise.
6598 (find_correct_array_notation_type): Likewise.
6599 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6600 (struct inv_list): Moved this to c-family/array-notation-common.c.
6601 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6603 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6605 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6606 reduction functions outside the for-loop. Added a check if the fundecl
6607 is non-NULL. Finally, removed an unwanted if-statement, and made the
6610 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6612 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6613 condition of the if-statement matches the rank of else-block and then-
6614 block when array notations are used.
6615 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6616 expression after the entire function body is parsed.
6617 (c_parser_expr_no_commas): Delayed creating array notation expressions
6618 to the end of function parsing.
6619 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6620 whole if-statement instead of just the condition.
6621 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6623 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6626 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6627 array to NULL_TREE if they are unused. Also added a check for the
6628 field to be NULL before its fields are used in future.
6630 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6633 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6634 (build_array_notation_expr): Likewise.
6636 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6638 * c-typeck.c (build_array_ref): Added a check to see if array's
6639 index is greater than one. If true, then emit an error.
6640 (build_function_call_vec): Exclude error reporting and checking
6641 for builtin array-notation functions.
6642 (convert_arguments): Likewise.
6643 (c_finish_return): Added a check for array notations as a return
6644 expression. If true, then emit an error.
6645 (c_finish_loop): Added a check for array notations in a loop
6646 condition. If true then emit an error.
6647 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6648 (build_binary_op): Added a check for array notation expr inside
6649 op1 and op0. If present, we call another function to find correct
6651 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6652 * c-parser.c (c_parser_compound_statement): Check if array
6653 notation code is used in tree, if so, then transform them into
6655 (c_parser_expr_no_commas): Check if array notation is used in LHS
6656 or RHS, if so, then build array notation expression instead of
6658 (c_parser_postfix_expression_after_primary): Added a check for
6659 colon(s) after square braces, if so then handle it like an array
6660 notation. Also, break up array notations in unary op if found.
6661 (c_parser_direct_declarator_inner): Added a check for array
6663 (c_parser_compound_statement): Added a check for array notation in
6664 a stmt. If one is present, then expand array notation expr.
6665 (c_parser_if_statement): Likewise.
6666 (c_parser_switch_statement): Added a check for array notations in
6667 a switch statement's condition. If true, then output an error.
6668 (c_parser_while_statement): Similarly, but for a while.
6669 (c_parser_do_statement): Similarly, but for a do-while.
6670 (c_parser_for_statement): Similarly, but for a for-loop.
6671 (c_parser_unary_expression): Check if array notation is used in a
6672 pre-increment or pre-decrement expression. If true, then expand
6674 (c_parser_array_notation): New function.
6675 * c-array-notation.c: New file.
6676 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6678 2013-05-23 Mike Stump <mikestump@comcast.net>
6680 * c-typeck.c (convert_for_assignment): Handle references to memory
6683 2013-05-16 Jason Merrill <jason@redhat.com>
6685 * Make-lang.in (cc1$(exeext)): Use link mutex.
6687 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6689 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6690 to simply use OPT_Wpointer_arith.
6691 (build_unary_op): Likewise.
6693 2013-04-03 Jakub Jelinek <jakub@redhat.com>
6696 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6697 argument. If set, or it temporarily for parsing of the first
6698 argument into force_folding_builtin_constant_p.
6699 (c_parser_postfix_expression): Adjust callers.
6701 2013-03-21 Richard Biener <rguenther@suse.de>
6703 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6704 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6706 2013-02-12 Marek Polacek <polacek@redhat.com>
6709 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6712 2013-01-24 Jakub Jelinek <jakub@redhat.com>
6715 * c-typeck.c (set_nonincremental_init_from_string): If
6716 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6718 (process_init_element): Likewise.
6720 2012-12-20 Jakub Jelinek <jakub@redhat.com>
6723 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6724 argument, don't call default_function_array_conversion
6725 nor c_fully_fold here.
6726 (c_parser_asm_statement): Adjust callers.
6727 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6728 and outputs here, and call default_function_array_conversion
6729 on inputs that don't need to be addressable.
6731 2012-12-18 Jakub Jelinek <jakub@redhat.com>
6734 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6735 warning require that both c_common_unsigned_type as well as
6736 c_common_signed_type is the same for both mvl and mvr types.
6738 2012-11-16 Diego Novillo <dnovillo@google.com>
6740 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6742 * c-common.c: Use new vec API in vec.h.
6743 * c-common.h: Likewise.
6744 * c-gimplify.c: Likewise.
6745 * c-pragma.c: Likewise.
6746 * c-pretty-print.c: Likewise.
6747 * c-pretty-print.h: Likewise.
6748 * c-semantics.c: Likewise.
6749 * c-decl.c: Likewise.
6750 * c-parser.c: Likewise.
6751 * c-tree.h: Likewise.
6752 * c-typeck.c: Likewise.
6754 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6757 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6759 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6762 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6763 shadows a function, unless the variable is a function or a
6764 pointer-to-function.
6766 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6769 * c-parser.c (struct c_tree_loc_pair): Removed.
6770 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6771 add location_t * and tree * arguments, fill in array of 3
6772 sizeof_arg trees and corresponding locs.
6773 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6774 c_parser_expr_list callers.
6775 (c_parser_postfix_expression_after_primary): Likewise. Pass
6776 array of 3 sizeof_arg trees and locs (corresponding to first
6777 3 arguments) to sizeof_pointer_memaccess_warning.
6779 2012-10-09 Lawrence Crowl <crowl@google.com>
6781 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6782 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6785 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6788 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6791 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
6794 * c-typeck.c: Include c-common.h.
6795 (enum stv_conv): Moved to c-common.h.
6796 (scalar_to_vector): Moved to c-common.c.
6797 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6798 * Make-lang.in: c-typeck.c depends on c-common.h.
6800 2012-10-04 Arnaud Charlet <charlet@adacore.com>
6802 * c-decl.c (c_write_global_declarations): Fix handling of
6805 2012-09-30 Sharad Singhai <singhai@google.com>
6807 * c-decl.c (c_write_global_declarations): Use a different method
6808 to determine if the dump has ben initialized.
6810 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6813 * c-typeck.c (c_cast_expr): When casting to a type requiring
6814 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6817 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6820 * c-typeck.c (build_unary_op): Pass original argument of
6821 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6822 any C_MAYBE_CONST_EXPR, if it has integer operands.
6823 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6824 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6825 to c_objc_common_truthvalue_conversion, then remove any
6826 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6827 c_objc_common_truthvalue_conversion not
6828 c_common_truthvalue_conversion.
6829 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6830 call note_integer_operands for arguments with integer operands
6831 that are not integer constants.
6833 2012-09-13 Jakub Jelinek <jakub@redhat.com>
6836 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6837 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6839 2012-08-31 Jakub Jelinek <jakub@redhat.com>
6842 * c-convert.c (convert): Don't call fold_convert_loc if
6843 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6844 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6845 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6847 2012-08-24 Jakub Jelinek <jakub@redhat.com>
6850 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6851 for nested and empty_ok arguments in the call to
6852 c_parser_declaration_or_fndef.
6854 2012-08-17 Jakub Jelinek <jakub@redhat.com>
6856 * c-tree.h (c_last_sizeof_arg): Declare.
6857 * c-parser.c (struct c_tree_loc_pair): New type.
6858 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6860 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6861 (c_parser_postfix_expression_after_primary): Likewise. Call
6862 sizeof_pointer_memaccess_warning if needed.
6863 (sizeof_ptr_memacc_comptypes): New function.
6864 * c-typeck.c (c_last_sizeof_arg): New global variable.
6865 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6867 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
6869 * c-lang.h (lang_decl): Add variable_size GTY option.
6871 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6873 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6874 * Make-lang.in: Fix dependencies.
6876 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6878 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6879 and add language Makefile hooks.
6880 * config-lang.in: New file.
6881 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6882 add the required "normal" config-lang.in rules.
6883 * c-lang.h: Moved from gcc/ to here.
6884 * c-tree.h: Likewise.
6885 * c-objc-common.c: Likewise.
6886 * c-objc-common.h: Likewise.
6887 * c-typeck.c: Likewise.
6888 * c-convert.c: Likewise.
6889 * c-lang.c: Likewise.
6890 * c-aux-info.c: Likewise.
6891 * c-errors.c: Likewise.
6892 * gccspec.c: Likewise.
6893 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6894 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6896 Copyright (C) 2012-2020 Free Software Foundation, Inc.
6898 Copying and distribution of this file, with or without modification,
6899 are permitted in any medium without royalty provided the copyright
6900 notice and this notice are preserved.