1 2019-07-10 Richard Biener <rguenther@suse.de>
3 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
4 _Literal (int *) &x for address literals.
6 2019-07-09 Martin Sebor <msebor@redhat.com>
9 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
11 (field_decl_cmp): Same.
12 * c-parser.c (c_parser_struct_or_union_specifier): Same.
14 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
16 2019-07-09 Martin Sebor <msebor@redhat.com>
19 * c-decl.c: Change class-key from class to struct and vice versa
20 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
21 * gimple-parser.c: Same.
23 2019-07-01 Richard Biener <rguenther@suse.de>
25 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
26 _Literal (char *) &"foo" for address literals pointing to
29 2019-06-24 Martin Sebor <msebor@redhat.com>
31 * c-typeck.c (build_binary_op): Hyphenate floating-point.
33 2019-06-10 Jakub Jelinek <jakub@redhat.com>
35 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
36 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
37 (c_parser_omp_scan_loop_body): New function.
38 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
39 inscan reduction clauses.
40 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
41 non-inscan reductions on the same construct, or inscan reductions with
42 ordered or schedule clauses, or inscan array reductions.
44 2019-06-05 Martin Sebor <msebor@redhat.com>
47 * c-typeck.c (c_finish_return): Only consider functions returning
48 pointers as candidates for -Wreturn-local-addr.
50 2019-06-05 Martin Sebor <msebor@redhat.com>
52 * c-decl.c (start_decl): Adjust quoting and hyphenation
56 (start_function): Same.
57 (declspecs_add_type): Same.
58 * c-parser.c (warn_for_abs): Same.
59 * c-typeck.c (build_binary_op): Same.
61 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
64 * c-parser.c (c_finish_oacc_routine): Rework checking if already
65 marked with an OpenACC 'routine' directive.
68 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
69 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
72 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
73 clauses from "omp declare target" attribute.
75 2019-05-16 Martin Sebor <msebor@redhat.com>
77 * c-decl.c (start_decl): Quote keywords, operators, and
80 * c-parser.c (c_parser_asm_statement): Same.
81 (c_parser_conditional_expression): Same.
82 (c_parser_transaction_cancel): Same.
83 * c-typeck.c (c_common_type): Same.
84 (build_conditional_expr): Same.
86 (process_init_element): Same.
87 (build_binary_op): Same.
89 2019-05-17 Richard Biener <rguenther@suse.de>
91 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
92 (c_parser_gimple_unary_expression): Likewise.
93 (c_parser_gimple_parentized_ternary_expression): New function.
95 2019-05-16 Richard Biener <rguenther@suse.de>
97 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
98 (c_parser_gimple_unary_expression): Likewise.
100 2019-05-15 Richard Biener <rguenther@suse.de>
102 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
105 2019-05-14 Richard Biener <rguenther@suse.de>
107 * gimple-parser.c (c_parser_gimple_statement): Remove
108 questionable auto-promotion to VIEW_CONVERT_EXPR.
109 (c_parser_gimple_typespec): Split out from __MEM parsing.
110 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
111 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
112 as __VIEW_CONVERT with -gimple.
114 2019-05-09 Martin Liska <mliska@suse.cz>
116 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
118 (c_parser_gimple_unary_expression): Parse also binary expression
120 (c_parser_gimple_parentized_binary_expression): New function.
122 2019-05-09 Martin Liska <mliska@suse.cz>
124 * gimple-parser.c (struct gimple_parser): Add probability.
125 for gimple_parser_edge.
126 (gimple_parser::push_edge): Add new argument probability.
127 (c_parser_gimple_parse_bb_spec): Parse also probability
129 (c_parser_parse_gimple_body): Set edge probability.
130 (c_parser_gimple_compound_statement): Consume token
131 before calling c_parser_gimple_goto_stmt.
133 (c_parser_gimple_statement): Pass new argument.
134 (c_parser_gimple_goto_stmt): Likewise.
135 (c_parser_gimple_if_stmt): Likewise.
136 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
137 * c-parser.c (c_parser_declaration_or_fndef): Pass
138 hot_bb_threshold argument.
139 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
141 (c_parser_gimple_parse_bb_spec_edge_probability): New.
143 2019-04-26 Jakub Jelinek <jakub@redhat.com>
146 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
147 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
148 (c_parser_do_statement): Likewise.
149 (c_parser_for_statement): Likewise. Formatting fixes.
150 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
151 emit DEBUG_BEGIN_STMTs if needed.
153 2019-04-19 Jakub Jelinek <jakub@redhat.com>
156 * c-typeck.c (struct c_switch): Remove outside_range_p member.
157 (c_start_case): Don't clear it.
158 (do_case): Adjust c_add_case_label caller.
159 (c_finish_case): Adjust c_do_switch_warnings caller.
162 * c-decl.c (merge_decls): If remove is main variant and
163 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
164 variant that has newdecl as TYPE_NAME if any.
166 2019-04-12 Jakub Jelinek <jakub@redhat.com>
169 * c-decl.c (merge_decls): When newdecl's type is its main variant,
170 don't try to remove it from the variant list, but instead assert
173 2019-04-01 Richard Biener <rguenther@suse.de>
176 * c-tree.h (c_get_alias_set): Declare.
177 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
178 * c-objc-common.c (c_get_alias_set): Treat enumeral types
179 as the underlying integer type.
181 2019-03-19 Martin Sebor <msebor@redhat.com>
183 PR tree-optimization/89688
184 * c-decl.c (finish_decl): Call braced_lists_to_string for more
185 kinds of initializers.
187 2019-03-19 Jakub Jelinek <jakub@redhat.com>
190 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
191 return type even if quals_used is 0. Formatting fixes.
193 2019-03-14 Richard Biener <rguenther@suse.de>
195 * c-tree.h (enum c_declspec_il): New.
196 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
198 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
199 Pass start pass and declspec_il to c_parser_parse_gimple_body.
200 (c_parser_declspecs): Adjust.
201 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
202 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
204 (struct gimple_parser): New.
205 (gimple_parser::push_edge): New method.
206 (c_parser_gimple_parse_bb_spec): New helper.
207 (c_parser_parse_gimple_body): Get start pass and IL specification.
208 Initialize SSA and CFG.
209 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
210 Build a gimple_parser parsing state and pass it along.
211 (c_parser_gimple_statement): Change intermittend __PHI internal
212 function argument for the edge.
213 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
214 (c_parser_gimple_goto_stmt): Record edges to build.
215 (c_parser_gimple_if_stmt): Likewise.
216 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
217 (c_parser_gimple_or_rtl_pass_list): Likewise.
219 2019-03-11 Martin Liska <mliska@suse.cz>
221 * c-decl.c (check_for_loop_decls): Wrap an option name
222 in a string format message and fix GNU coding style.
223 * c-parser.c (c_parser_declspecs): Likewise.
225 2019-03-08 Jakub Jelinek <jakub@redhat.com>
227 PR tree-optimization/89550
228 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
230 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
231 or warning returned true.
233 2019-02-28 Jakub Jelinek <jakub@redhat.com>
236 * c-typeck.c (convert_arguments): Call inform_declaration only if
237 the previous warning_at call returned true.
239 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
241 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
242 parameter. Adjust all users.
243 (c_parser_oacc_simple_clause): Replace parser with loc formal
244 parameter. Adjust all users.
246 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
249 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
250 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
252 2019-02-15 Jakub Jelinek <jakub@redhat.com>
255 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
256 before c_decl_attributes rather than after it.
258 2019-02-06 Jakub Jelinek <jakub@redhat.com>
261 * c-parser.c (c_parser_declaration_or_fndef): Don't update
262 DECL_ARGUMENTS of d if it has been defined already. Use a single if
263 instead of 3 nested ifs.
265 2019-02-06 Joseph Myers <joseph@codesourcery.com>
268 * c-decl.c (finish_decl): Do not complete array types for arrays
269 with external linkage not at file scope.
271 2019-02-05 Richard Biener <rguenther@suse.de>
274 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
275 all type variants when not supported.
277 2019-01-30 Jakub Jelinek <jakub@redhat.com>
280 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
281 * c-decl.c (decl_jump_unsafe): Return false for
282 C_DECL_COMPOUND_LITERAL_P decls.
283 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
285 2019-01-29 Jakub Jelinek <jakub@redhat.com>
288 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
292 * c-decl.c (last_fileptr_type): Remove.
293 (last_structptr_types): New variable.
294 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
295 {old,new}rettype instead of the types themselves. Assert
296 last_structptr_types array has the same number of elements
297 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
298 argument oldtype and newtype. Instead of handling
299 just fileptr_type_node specially, handle all builtin_structptr_types
300 pointer nodes. Formatting fix.
302 2019-01-24 Martin Sebor <msebor@redhat.com>
307 * c-decl.c (match_builtin_function_types): Add arguments.
308 (diagnose_mismatched_decls): Diagnose mismatched declarations
309 of built-ins more strictly.
311 2019-01-24 Jakub Jelinek <jakub@redhat.com>
314 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
315 on #pragma omp cancel with different modifiers.
317 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
321 * c-typeck.c (convert_for_assignment): Upate the
322 warn_for_address_or_pointer_of_packed_member call.
324 2019-01-16 Tom Honermann <tom@honermann.net>
325 Jason Merrill <jason@redhat.com>
327 * c-typeck.c (digest_init): Revised the error message produced for
328 ill-formed cases of array initialization with a string literal.
329 (error_init): Make variadic.
331 2019-01-12 Jakub Jelinek <jakub@redhat.com>
333 * c-typeck.c (convert_for_assignment): Fix a comment typo.
335 2019-01-07 Jakub Jelinek <jakub@redhat.com>
338 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
339 if current_function_decl is non-NULL.
341 2019-01-07 Joseph Myers <joseph@codesourcery.com>
345 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
346 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
347 functions declared but never defined only for external scope, not
350 2019-01-07 Jakub Jelinek <jakub@redhat.com>
353 * c-parser.c (c_parser_postfix_expression): Parse
354 __builtin_convertvector.
356 2019-01-01 Jakub Jelinek <jakub@redhat.com>
358 Update copyright years.
360 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
363 * c-typeck.c (convert_for_assignment): Call
364 warn_for_address_or_pointer_of_packed_member.
366 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
368 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
369 a more specific error message (instead of just falling through).
371 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
373 * c-parser.c (c_parser_asm_statement): Keep track of the location each
374 asm qualifier is first seen; use that to give nicer "duplicate asm
375 qualifier" messages. Delete 'quals" variable, instead pass the
376 "is_volatile_ flag to build_asm_stmt directly.
377 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
378 * c-typeck.c (build_asm_stmt): Ditto; adjust.
380 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
382 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
383 "done" boolean variable.
385 2018-12-19 David Malcolm <dmalcolm@redhat.com>
388 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
389 Move from here to gcc-rich-location.h and gcc-rich-location.c.
390 (build_binary_op): Use struct op_location_t and
391 class binary_op_rich_location.
393 2018-12-11 Jakub Jelinek <jakub@redhat.com>
396 * c-convert.c (convert): Call c_fully_fold before calling
397 ubsan_instrument_float_cast.
399 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
401 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
404 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
406 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
407 after asm. Pass a flag for it to build_asm_expr.
408 * c-tree.h (build_asm_expr): Update declaration.
409 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
412 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
415 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
416 combination of volatile and goto, in any order, without repetitions.
418 2018-12-04 James Norris <jnorris@codesourcery.com>
419 Cesar Philippidis <cesar@codesourcery.com>
420 Julian Brown <julian@codesourcery.com>
422 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
425 2018-11-30 Richard Biener <rguenther@suse.de>
427 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
428 _Literal (type) { ... } as empty aggregate or vector constructor.
430 2018-11-29 Martin Sebor <msebor@redhat.com>
433 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
434 (convert_arguments): Add comments. Pass additional argument to
437 2018-11-29 Martin Sebor <msebor@redhat.com>
441 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
443 2018-11-23 Martin Sebor <msebor@redhat.com>
446 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
447 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
449 2018-11-20 Martin Sebor <msebor@redhat.com>
451 * c-parser.c (c_parser_has_attribute_expression): New function.
452 (c_parser_attribute): New function.
453 (c_parser_attributes): Move code into c_parser_attribute.
454 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
456 2018-11-15 Martin Sebor <msebor@redhat.com>
459 * c-decl.c (header_for_builtin_fn): Declare.
460 (diagnose_mismatched_decls): Diagnose declarations of built-in
461 functions without a prototype.
462 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
463 (convert_argument): Same.
464 (convert_arguments): Factor code out into convert_argument.
465 Detect mismatches between built-in formal arguments in calls
466 to built-in without prototype.
467 (build_conditional_expr): Same.
468 (type_or_builtin_type): New function.
469 (convert_for_assignment): Add argument. Conditionally issue
470 warnings instead of errors for mismatches.
472 2018-11-13 David Malcolm <dmalcolm@redhat.com>
474 * c-decl.c: Replace "source_location" with "location_t".
475 * c-tree.h: Likewise.
476 * c-typeck.c: Likewise.
477 * gimple-parser.c: Likewise.
479 2018-11-09 Jakub Jelinek <jakub@redhat.com>
481 * c-parser.c (c_parser_omp_clause_final): Use
482 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
483 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
484 parsing instead of c_parser_paren_condition.
485 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
486 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
487 c_fully_fold instead of c_parser_condition.
488 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
489 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
490 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
491 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
492 c_parser_expr_no_commas instead of c_parser_expression.
494 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
495 reduction clause with inscan modifier.
497 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
498 clauses other than atomic_default_mem_order.
500 2018-11-08 Jakub Jelinek <jakub@redhat.com>
502 * c-parser.c: Include memmode.h.
503 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
504 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
505 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
506 task_reduction clauses.
507 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
508 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
509 section, or lvalue assignment expression.
510 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
511 (c_parser_omp_clause_lastprivate): Parse optional
512 conditional: modifier.
513 (c_parser_omp_clause_hint): Require constant integer expression rather
514 than just integer expression.
515 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
517 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
518 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
519 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
521 (c_parser_omp_clause_depend): Parse iterator modifier and handle
522 iterators. Parse mutexinoutset and depobj kinds.
523 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
525 (c_parser_omp_all_clauses): Likewise. Handle
526 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
527 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
528 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
529 default memory order from requires directive if any. Adjust
530 c_finish_omp_atomic caller.
531 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
532 (c_parser_omp_flush): Parse flush with memory-order-clause.
533 (c_parser_omp_for_loop): Allow NE_EXPR even in
534 OpenMP loops, adjust c_finish_omp_for caller.
535 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
536 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
537 Allow to be called while parsing combined parallel master.
538 Parse combined master taskloop{, simd}.
539 (c_parser_omp_parallel): Parse combined
540 parallel master{, taskloop{, simd}} constructs.
541 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
542 (OMP_TASKGROUP_CLAUSE_MASK): Define.
543 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
544 (OMP_TASKWAIT_CLAUSE_MASK): Define.
545 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
546 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
547 around teams body. Use SET_EXPR_LOCATION.
548 (c_parser_omp_target_data): Allow target data
549 with only use_device_ptr clauses.
550 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
551 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
552 (c_parser_omp_requires): New function.
553 (c_finish_taskloop_clauses): New function.
554 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
555 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
556 declaration. Disallow in_reduction clause when combined with parallel
558 (c_parser_omp_construct): Adjust c_parser_omp_master and
559 c_parser_omp_taskgroup callers.
560 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
562 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
563 like OMP_CLAUSE_REDUCTION.
564 (handle_omp_array_sections): Likewise. Call save_expr on array
565 reductions before calling build_index_type. Handle depend clauses
567 (struct c_find_omp_var_s): New type.
568 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
569 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
570 with static, runtime or auto schedule kinds. Call save_expr for whole
571 array reduction sizes. Diagnose reductions with zero sized elements
572 or variable length structures. Diagnose nogroup clause used with
573 reduction clause(s). Handle depend clause with
574 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
575 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
576 some different type for other kinds. Use build_unary_op with
577 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
578 Handle depend clauses with iterators. Remove no longer needed special
579 case that predetermined const qualified vars may be specified in
580 firstprivate clause. Complain if const qualified vars are mentioned
581 in data-sharing clauses other than firstprivate or shared. Use
582 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
583 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
584 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
585 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
587 2018-10-29 David Malcolm <dmalcolm@redhat.com>
589 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
590 logic for change to name_hint::operator bool.
591 (undeclared_variable): Likewise.
592 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
593 (c_parser_parameter_declaration): Likewise.
595 2018-10-17 Joseph Myers <joseph@codesourcery.com>
597 * c-errors.c (pedwarn_c11): New function.
598 * c-parser.c (disable_extension_diagnostics): Save
599 warn_c11_c2x_compat and set it to 0.
600 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
601 (c_parser_static_assert_declaration_no_semi): Handle
602 _Static_assert without string constant.
603 * c-tree.h (pedwarn_c11): New prototype.
605 2018-10-17 David Malcolm <dmalcolm@redhat.com>
607 * Make-lang.in (selftest-c): New.
608 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
609 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
610 from gcc/Makefile.in.
612 2018-10-02 Richard Biener <rguenther@suse.de>
614 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
616 2018-09-26 Joseph Myers <joseph@codesourcery.com>
619 * c-typeck.c (build_binary_op): Use excess precision for
620 comparisons of integers and floating-point for C11 and later.
622 2018-09-26 Martin Jambor <mjambor@suse.cz>
625 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
628 2018-09-17 David Malcolm <dmalcolm@redhat.com>
630 * c-objc-common.c (range_label_for_type_mismatch::get_text):
631 Update for new param.
632 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
635 2018-09-17 Martin Jambor <mjambor@suse.cz>
638 * c-parser.c: (warn_for_abs): New function.
639 (c_parser_postfix_expression_after_primary): Call it.
641 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
643 * c-typeck.c (digest_init): Shorten overlength strings.
645 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
647 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
649 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
651 * c-decl.c (finish_decl): Call braced_list_to_string here ...
652 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
654 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
656 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
657 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
659 2018-08-27 David Malcolm <dmalcolm@redhat.com>
662 * c-decl.c (implicitly_declare): Update call to
663 maybe_add_include_fixit to suggest overriding the location, as it
665 * c-objc-common.c (c_tree_printer): Update for conversion of
666 show_caret_p to a tri-state.
668 2018-08-27 Martin Liska <mliska@suse.cz>
670 * c-decl.c (locate_old_decl): Use new function
671 fndecl_built_in_p and remove check for FUNCTION_DECL if
673 (diagnose_mismatched_decls): Likewise.
674 (merge_decls): Likewise.
675 (warn_if_shadowing): Likewise.
676 (pushdecl): Likewise.
677 (implicitly_declare): Likewise.
678 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
679 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
680 * c-typeck.c (build_function_call_vec): Likewise.
681 (convert_arguments): Likewise.
683 2018-08-20 David Malcolm <dmalcolm@redhat.com>
686 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
687 (diagnose_mismatched_decls): Likewise, in various places.
688 (warn_if_shadowing): Likewise.
689 (implicit_decl_warning): Likewise.
690 (implicitly_declare): Likewise.
691 (undeclared_variable): Likewise.
692 (declare_label): Likewise.
693 (grokdeclarator): Likewise.
694 (start_function): Likewise.
695 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
696 (c_parser_parameter_declaration): Likewise.
697 (c_parser_binary_expression): Likewise.
698 * c-typeck.c (c_expr_sizeof_expr): Likewise.
699 (parser_build_binary_op): Likewise.
700 (build_unary_op): Likewise.
701 (error_init): Likewise.
702 (pedwarn_init): Likewise.
703 (warning_init): Likewise.
704 (convert_for_assignment): Likewise.
706 2018-08-15 David Malcolm <dmalcolm@redhat.com>
708 * c-objc-common.c: Include "gcc-rich-location.h".
709 (c_tree_printer): Move implemenation of '%T' to...
710 (print_type): ...this new function.
711 (range_label_for_type_mismatch::get_text): New function.
712 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
713 range for the various ic_argpass cases.
714 (class maybe_range_label_for_tree_type_mismatch): New class.
715 (build_binary_op): Use it when calling binary_op_error.
717 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
719 * c-decl.c (start_decl): Do not warn if variables is named as main
720 and is a local variable.
722 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
725 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
726 objects of unknown size.
728 2018-08-13 Martin Sebor <msebor@redhat.com>
730 PR tree-optimization/71625
731 * c-parser.c (c_parser_declaration_or_fndef): Call
732 braced_list_to_string.
734 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
737 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
740 2018-08-01 Martin Sebor <msebor@redhat.com>
742 PR tree-optimization/86650
743 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
744 and TREE_BLOCK (t) from within percent_K_format to this callsite.
746 2018-08-01 Jakub Jelinek <jakub@redhat.com>
749 * c-typeck.c (init_field_decl_cmp): New function.
750 (output_pending_init_elements): Use it for field comparisons
751 instead of pure bit_position comparisons.
753 2018-07-12 Jakub Jelinek <jakub@redhat.com>
755 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
756 type here, instead add "omp declare target implicit" attribute.
757 (finish_decl): Diagnose vars without mappable type here.
759 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
760 Thomas Schwinge <thomas@codesourcery.com>
761 Cesar Philippidis <cesar@codesourcery.com>
763 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
764 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
765 to their non-present_or_* counterparts. Make 'self' an alias to
766 PRAGMA_OACC_CLAUSE_HOST.
767 (c_parser_oacc_data_clause): Update GOMP mappings for
768 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
769 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
770 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
771 Remove support for present_or_* clauses.
772 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
773 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
774 (OACC_DECLARE_CLAUSE_MASK): Likewise.
775 (OACC_DATA_CLAUSE_MASK): Likewise.
776 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
777 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
778 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
779 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
780 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
782 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
784 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
785 * gimple-parser.c (c_parser_gimple_statement): Likewise.
786 (c_parser_gimple_unary_expression): Likewise.
788 2018-06-15 Jakub Jelinek <jakub@redhat.com>
791 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
792 before doing POINTER_DIFF_EXPR.
794 2018-06-07 Marek Polacek <polacek@redhat.com>
797 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
798 for loop initial declarations.
800 2018-05-30 David Pagan <dave.pagan@oracle.com>
803 * c-decl.c (grokdeclarator): Update check for return type warnings.
804 (start_function): Likewise.
805 (finish_function): Likewise.
806 * c-typeck.c (c_finish_return): Update check for return type warnings.
807 Pass OPT_Wreturn_type to pedwarn when appropriate.
809 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
811 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
814 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
816 * gimple-parser.c: Include internal-fn.h.
817 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
818 (c_parser_gimple_call_internal): New function.
819 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
820 Fix typos in comment.
822 2018-05-10 Jakub Jelinek <jakub@redhat.com>
825 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
826 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
828 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
829 fold_offsetof_1, pass argtype as TYPE to it and drop the
832 2018-05-02 David Pagan <dave.pagan@oracle.com>
835 * c-decl.c (old_style_parameter_scope): New function.
836 * c-parser.c (c_parser_postfix_expression): Check for statement
837 expressions in old-style function parameter list declarations.
838 * c-parser.h (old_style_parameter_scope): New extern declaration.
840 2018-04-25 Jakub Jelinek <jakub@redhat.com>
843 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
844 it is not TREE_STATIC.
845 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
846 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
847 its COMPOUND_LITERAL_EXPR_DECL.
849 2018-03-21 Joseph Myers <joseph@codesourcery.com>
851 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
852 where all functions return the same _FloatN or _FloatNx type,
853 treat integer types as _Float64 instead of double.
855 2018-03-21 Jakub Jelinek <jakub@redhat.com>
858 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
859 building vector comparison, diagnose it and return error_mark_node.
861 2018-03-15 Jakub Jelinek <jakub@redhat.com>
864 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
865 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
866 INTEGER_TYPE element type.
868 2018-03-13 David Pagan <dave.pagan@oracle.com>
871 * c-typeck.c (output_init_element): Ensure field initializer
872 expression is always evaluated if there are side effects.
874 2018-03-06 Jakub Jelinek <jakub@redhat.com>
877 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
878 !building_stmt_list_p ().
880 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
883 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
884 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
885 and include the BIND_EXPR in the list of things that need to be
888 2018-02-09 Nathan Sidwell <nathan@acm.org>
891 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
892 to strict_aliasing_warning.
894 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
896 * c-typeck.c (really_start_incremental_init, push_init_level,
897 set_nonincremental_init, output_init_element, process_init_element):
898 Use DECL_UNNAMED_BIT_FIELD.
900 2018-01-31 Marek Polacek <polacek@redhat.com>
903 * c-parser.c (c_parser_compound_statement_nostart): Call
904 expansion_point_location_if_in_system_header.
906 2018-01-17 David Malcolm <dmalcolm@redhat.com>
909 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
912 2018-01-13 Jakub Jelinek <jakub@redhat.com>
915 * c-tree.h (decl_constant_value_1): Add a bool argument.
916 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
917 returning a CONSTRUCTOR if it is true. Use error_operand_p.
918 (decl_constant_value): Adjust caller.
919 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
920 decl_constant_value_1 as IN_INIT. Otherwise, punt if
921 decl_constant_value returns initializer that has BLKmode or
923 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
925 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
926 Alan Hayward <alan.hayward@arm.com>
927 David Sherwood <david.sherwood@arm.com>
929 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
930 TYPE_VECTOR_SUBPARTS.
932 2018-01-03 Jakub Jelinek <jakub@redhat.com>
934 Update copyright years.
936 2018-01-01 Jakub Jelinek <jakub@redhat.com>
939 * c-parser.c (c_parser_braced_init, c_parser_initelt,
940 c_parser_conditional_expression, c_parser_cast_expression,
941 c_parser_sizeof_expression, c_parser_alignof_expression,
942 c_parser_postfix_expression, c_parser_omp_declare_reduction,
943 c_parser_transaction_expression): Use set_error () method instead
944 of setting value member to error_mark_node.
946 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
948 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
949 and _Float<N>X built-in functions.
951 2017-12-22 Jakub Jelinek <jakub@redhat.com>
954 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
955 TYPE_STUB_DECL and call rest_of_type_compilation before processing
956 incomplete vars rather than after it.
959 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
960 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
961 and consider empty ones if there are no other stmts. For
962 -Wunused-value walk all statements before the one only followed by
965 2017-12-22 Mike Stump <mikestump@comcast.net>
966 Eric Botcazou <ebotcazou@adacore.com>
968 * c-parser.c (c_parser_while_statement): Add unroll parameter and
969 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
970 (c_parser_do_statement): Likewise.
971 (c_parser_for_statement): Likewise.
972 (c_parser_statement_after_labels): Adjust calls to above.
973 (c_parse_pragma_ivdep): New static function.
974 (c_parser_pragma_unroll): Likewise.
975 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
976 <PRAGMA_UNROLL>: New case.
978 2017-12-19 Jakub Jelinek <jakub@redhat.com>
980 * c-typeck.c (comptypes_internal, function_types_compatible_p,
981 perform_integral_promotions, digest_init): Replace Yoda conditions
982 with typical order conditions.
983 * c-decl.c (check_bitfield_type_and_width): Likewise.
985 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
987 * c-typeck.c (c_safe_arg_type_equiv_p,
988 c_safe_function_type_cast_p): New function.
989 (build_c_cast): Implement -Wcast-function-type.
991 2017-12-14 Richard Biener <rguenther@suse.de>
994 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
995 like REALPART_EXPR for the behavior of whether its operand
998 2017-12-12 Marek Polacek <polacek@redhat.com>
1001 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1003 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1005 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1006 * c-parser.c (add_debug_begin_stmt): New.
1007 (c_parser_declaration_or_fndef): Call it.
1008 (c_parser_compound_statement_nostart): Likewise.
1009 (c_parser_statement_after_labels): Likewise.
1010 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1012 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1014 * c-decl.c (build_compound_literal): Add parameter alignas_align
1015 and set alignment of decl if nonzero.
1016 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1017 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1019 (c_parser_struct_declaration): Update syntax comment.
1020 (c_parser_type_name): Add alignas_ok argument and pass it to
1022 (c_parser_cast_expression): Pass true to c_parser_type_name and
1023 give error if a cast used an _Alignas specifier.
1024 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1025 give error if sizeof (type-name) used an _Alignas specifier.
1026 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1027 give error if _Alignof (type-name) used an _Alignas specifier.
1028 (c_parser_postfix_expression_after_paren_type): Check specified
1029 alignment for a compound literal and pass it to
1030 build_compound_literal.
1031 * c-parser.h (c_parser_type_name): Update prototype.
1032 * c-tree.h (build_compound_literal): Update prototype.
1034 2017-12-07 Martin Sebor <msebor@redhat.com>
1037 * c-decl.c (c_decl_attributes): Look up existing declaration and
1038 pass it to decl_attributes.
1040 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1043 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1044 reserved for use by the implementation.
1046 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1048 * c-decl.c: Include "c-family/c-spellcheck.h".
1050 2017-12-05 Martin Liska <mliska@suse.cz>
1051 Jakub Jelinek <jakub@redhat.com>
1053 * c-typeck.c (pointer_diff): Add new argument and instrument
1054 pointer subtraction.
1055 (build_binary_op): Similar for pointer comparison.
1057 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1060 * c-parser.c: Include tree-iterator.h.
1061 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1062 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1066 * c-tree.h (decl_constant_value_1): Declare.
1067 * c-typeck.c (decl_constant_value_1): New function.
1068 (decl_constant_value): Use it.
1069 * c-fold.c (c_fully_fold_internal): If in_init, use
1070 decl_constant_value_1 instead of decl_constant_value.
1072 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1074 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1076 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1079 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1080 c_switch_covers_all_cases_p returns true.
1082 2017-11-28 Julia Koval <julia.koval@intel.com>
1083 Sebastian Peryt <sebastian.peryt@intel.com>
1085 * Make-lang.in (c/c-array-notation.o): Remove.
1086 * c-array-notation.c: Delete.
1087 * c-decl.c: Remove cilkplus condition.
1088 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1089 c_parser_cilk_verify_simd, c_parser_array_notation,
1090 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1091 c_parser_cilk_simd_fn_vector_attrs,
1092 c_finish_cilk_simd_fn_tokens): Delete.
1093 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1094 (c_parser_direct_declarator_inner): Ditto.
1095 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1096 (c_parser_attributes, c_parser_compound_statement,
1097 c_parser_statement_after_labels, c_parser_if_statement,
1098 c_parser_switch_statement, c_parser_while_statement,
1099 c_parser_do_statement, c_parser_for_statement,
1100 c_parser_unary_expression, c_parser_postfix_expression,
1101 c_parser_postfix_expression_after_primary,
1102 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1103 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1105 * c-typeck.c (build_array_ref, build_function_call_vec,
1107 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1108 c_finish_loop, build_binary_op): Remove cilkplus support.
1110 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1112 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1115 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1117 * Make-lang.in (c.install-plugin): Install backend import library.
1119 2017-11-23 Jakub Jelinek <jakub@redhat.com>
1121 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1122 pragma_stmt context.
1124 2017-11-23 Mike Stump <mikestump@comcast.net>
1125 Eric Botcazou <ebotcazou@adacore.com>
1127 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1129 (c_parser_do_statement): Likewise.
1130 (c_parser_for_statement): Likewise.
1132 2017-11-22 David Malcolm <dmalcolm@redhat.com>
1135 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1136 bool to bool *. Within '%T' handling, if showing an "aka", use
1137 "quoted" param to add appropriate quoting.
1139 2017-11-22 Marek Polacek <polacek@redhat.com>
1144 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1146 2017-11-21 David Malcolm <dmalcolm@redhat.com>
1149 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1150 earlier failed lookups.
1152 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1154 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1155 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1157 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1160 * c-decl.c: Include "c-family/known-headers.h".
1161 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1162 to known-headers.cc.
1163 (class suggest_missing_header): Move to known-header.h.
1164 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1165 than get_c_name_hint.
1167 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1169 * c-decl.c (get_c_name_hint): New function.
1170 (class suggest_missing_header): New class.
1171 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1172 suggest missing headers to the user.
1174 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1176 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1177 Include "c-family/name-hint.h"
1178 (implicit_decl_warning): Convert "hint" from
1179 const char * to name_hint. Pass location to
1180 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1181 warning was not printed.
1182 (undeclared_variable): Likewise for "guessed_id".
1183 (lookup_name_fuzzy): Convert return type from const char *
1184 to name_hint. Add location_t param.
1185 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1186 Include "c-family/name-hint.h"
1187 (c_parser_declaration_or_fndef): Convert "hint" from
1188 const char * to name_hint. Pass location to lookup_name_fuzzy.
1189 (c_parser_parameter_declaration): Likewise.
1191 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1195 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1197 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1198 handle_omp_array_sections): Likewise.
1199 (digest_init): Don't call decl_constant_value_for_optimization.
1200 * c-tree.h (decl_constant_value_for_optimization): Removed.
1201 * c-fold.c (c_fold_array_ref): New function.
1202 (c_fully_fold_internal): Add LVAL argument, propagate it through
1203 recursive calls. For VAR_P call decl_constant_value and
1204 unshare if not LVAL and either optimizing or IN_INIT. Remove
1205 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1206 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1207 (c_fully_fold): Add LVAL argument, pass it through to
1208 c_fully_fold_internal.
1209 (decl_constant_value_for_optimization): Removed.
1211 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1214 * c-parser.c (check_tgmath_function): New function.
1215 (enum tgmath_parm_kind): New enum.
1216 (c_parser_postfix_expression): Handle __builtin_tgmath.
1218 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1220 * c-decl.c (implicit_decl_warning): Update for renaming of
1221 pedwarn_at_rich_loc and warning_at_rich_loc.
1222 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1223 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1224 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1225 (c_parser_struct_or_union_specifier): Likewise for renaming of
1226 pedwarn_at_rich_loc.
1227 (c_parser_parameter_declaration): Likewise for renaming of
1229 * c-typeck.c (build_component_ref): Likewise.
1230 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1231 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1232 (set_init_label): Likewise for renaming of error_at_rich_loc.
1234 2017-10-30 Richard Biener <rguenther@suse.de>
1236 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1239 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1241 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1242 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1244 2017-10-25 David Malcolm <dmalcolm@redhat.com>
1247 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1250 2017-10-25 Jakub Jelinek <jakub@redhat.com>
1253 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1254 newdecl to corresponding __builtin_ if any.
1256 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1259 * c-decl.c (diagnose_mismatched_decls): Use
1260 OPT_Wbuiltin_declaration_mismatch.
1262 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1264 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1265 use it to guard calls to maybe_suggest_missing_token_insertion.
1266 (c_parser_parms_list_declarator): Override default value of new
1267 "type_is_unique" param to c_parser_require.
1268 (c_parser_asm_statement): Likewise.
1269 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1272 2017-10-11 Nathan Sidwell <nathan@acm.org>
1274 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1276 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1278 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1279 operating on trees as wide_ints.
1280 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1281 (c_tree_equal): Likewise.
1283 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1285 * c-decl.c (push_parm_decl): Store c_parm's location into the
1287 (build_c_parm): Add "loc" param and store it within the c_parm.
1288 * c-parser.c (struct c_parser): Add "last_token_location" field.
1289 (c_parser_consume_token): Store location of the token into the
1291 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1292 when handling a FUNCTION_DECL, if it doesn't already have them.
1293 (c_parser_parameter_declaration): Generate a location for the
1294 parameter, and pass it to the call to build_c_parm.
1295 * c-tree.h (struct c_parm): Add field "loc".
1296 (build_c_parm): Add location_t param.
1297 * c-typeck.c (get_fndecl_argument_location): New function.
1298 (inform_for_arg): New function.
1299 (convert_for_assignment): Use inform_for_arg when dealing with
1302 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1304 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1306 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1307 don't SET_DECL_C_BIT_FIELD here.
1310 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1311 instead of trying to set just TREE_READONLY manually.
1313 2017-09-16 Tom de Vries <tom@codesourcery.com>
1316 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1319 2017-09-15 Joseph Myers <joseph@codesourcery.com>
1322 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1324 (build_conditional_expr): For C11, generate result with excess
1325 precision when one argument is an integer and the other is of a
1326 type using excess precision.
1328 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1330 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1332 2017-09-13 Marek Polacek <polacek@redhat.com>
1335 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1336 than expr.original_type.
1338 2017-09-12 Nathan Sidwell <nathan@acm.org>
1340 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1341 resort_sorted_fields): Moved from c-family/c-common.c.
1342 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1344 2017-09-01 Joseph Myers <joseph@codesourcery.com>
1347 * c-typeck.c (build_atomic_assign): Handle argument with excess
1348 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1349 argument passed to build_binary_op and convert_for_assignment but
1350 not for call to c_fully_fold.
1351 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1352 Ensure build_binary_op is called with argument with original
1353 semantic type. Avoid calling c_fully_fold with an
1354 EXCESS_PRECISION_EXPR from build_binary_op.
1356 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1359 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1361 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1362 Alan Hayward <alan.hayward@arm.com>
1363 David Sherwood <david.sherwood@arm.com>
1365 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1366 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1367 m1 and m2 to the signed equivalent of a fixed-point
1370 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1372 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1373 than CAN_HAVE_LOCATION_P when determining whether to use the
1374 location_t value within "value".
1376 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1378 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1379 rather than peeking the location of the first token.
1380 * c-tree.h (c_expr::get_location): New method.
1382 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1384 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1385 to check_function_arguments.
1387 2017-08-18 Marek Polacek <polacek@redhat.com>
1389 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1392 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1395 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1396 (check_bitfield_type_and_width): Don't allow bit-field with
1397 warn_if_not_aligned type.
1399 2017-08-14 Martin Sebor <msebor@redhat.com>
1402 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1404 2017-08-11 Marek Polacek <polacek@redhat.com>
1407 * c-decl.c (pushtag): Only print inform if the warning was printed.
1408 (grokdeclarator): Likewise.
1410 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1412 * c-parser.c (c_parser_error): Rename to...
1413 (c_parser_error_richloc): ...this, making static, and adding
1414 "richloc" parameter, passing it to the c_parse_error call,
1415 rather than calling c_parser_set_source_position_from_token.
1416 (c_parser_error): Reintroduce, reimplementing in terms of the
1417 above, converting return type from void to bool.
1418 (class token_pair): New class.
1419 (struct matching_paren_traits): New struct.
1420 (matching_parens): New typedef.
1421 (struct matching_brace_traits): New struct.
1422 (matching_braces): New typedef.
1423 (get_matching_symbol): New function.
1424 (c_parser_require): Add param MATCHING_LOCATION, using it to
1425 highlight matching "opening" tokens for missing "closing" tokens.
1426 (c_parser_skip_until_found): Likewise.
1427 (c_parser_static_assert_declaration_no_semi): Convert explicit
1428 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1429 class matching_parens, so that the pertinent open parenthesis is
1430 highlighted when there are problems locating the close
1432 (c_parser_struct_or_union_specifier): Likewise.
1433 (c_parser_typeof_specifier): Likewise.
1434 (c_parser_alignas_specifier): Likewise.
1435 (c_parser_simple_asm_expr): Likewise.
1436 (c_parser_braced_init): Likewise, for matching_braces.
1437 (c_parser_paren_condition): Likewise, for matching_parens.
1438 (c_parser_switch_statement): Likewise.
1439 (c_parser_for_statement): Likewise.
1440 (c_parser_asm_statement): Likewise.
1441 (c_parser_asm_operands): Likewise.
1442 (c_parser_cast_expression): Likewise.
1443 (c_parser_sizeof_expression): Likewise.
1444 (c_parser_alignof_expression): Likewise.
1445 (c_parser_generic_selection): Likewise.
1446 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1447 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1448 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1449 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1450 c_parser_skip_until_found call.
1451 (c_parser_objc_class_definition): Use class matching_parens as
1453 (c_parser_objc_method_decl): Likewise.
1454 (c_parser_objc_try_catch_finally_statement): Likewise.
1455 (c_parser_objc_synchronized_statement): Likewise.
1456 (c_parser_objc_at_property_declaration): Likewise.
1457 (c_parser_oacc_wait_list): Likewise.
1458 (c_parser_omp_var_list_parens): Likewise.
1459 (c_parser_omp_clause_collapse): Likewise.
1460 (c_parser_omp_clause_default): Likewise.
1461 (c_parser_omp_clause_if): Likewise.
1462 (c_parser_omp_clause_num_threads): Likewise.
1463 (c_parser_omp_clause_num_tasks): Likewise.
1464 (c_parser_omp_clause_grainsize): Likewise.
1465 (c_parser_omp_clause_priority): Likewise.
1466 (c_parser_omp_clause_hint): Likewise.
1467 (c_parser_omp_clause_defaultmap): Likewise.
1468 (c_parser_oacc_single_int_clause): Likewise.
1469 (c_parser_omp_clause_ordered): Likewise.
1470 (c_parser_omp_clause_reduction): Likewise.
1471 (c_parser_omp_clause_schedule): Likewise.
1472 (c_parser_omp_clause_num_teams): Likewise.
1473 (c_parser_omp_clause_thread_limit): Likewise.
1474 (c_parser_omp_clause_aligned): Likewise.
1475 (c_parser_omp_clause_linear): Likewise.
1476 (c_parser_omp_clause_safelen): Likewise.
1477 (c_parser_omp_clause_simdlen): Likewise.
1478 (c_parser_omp_clause_depend): Likewise.
1479 (c_parser_omp_clause_map): Likewise.
1480 (c_parser_omp_clause_device): Likewise.
1481 (c_parser_omp_clause_dist_schedule): Likewise.
1482 (c_parser_omp_clause_proc_bind): Likewise.
1483 (c_parser_omp_clause_uniform): Likewise.
1484 (c_parser_omp_for_loop): Likewise.
1485 (c_parser_cilk_clause_vectorlength): Likewise.
1486 (c_parser_cilk_clause_linear): Likewise.
1487 (c_parser_transaction_expression): Likewise.
1488 * c-parser.h (c_parser_require): Add param matching_location with
1489 default UNKNOWN_LOCATION.
1490 (c_parser_error): Convert return type from void to bool.
1491 (c_parser_skip_until_found): Add param matching_location with
1492 default UNKNOWN_LOCATION.
1494 2017-08-09 Marek Polacek <polacek@redhat.com>
1496 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1497 * c-tree.h (build_external_ref): Update declaration.
1498 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1499 (build_external_ref): Change the type of a parameter to bool.
1500 (parser_build_binary_op): Use true/false instead of 1/0.
1501 (pointer_diff): Likewise.
1502 (build_modify_expr): Likewise.
1503 (set_designator): Change the type of a parameter to bool.
1504 (set_init_index): Use true/false instead of 1/0.
1505 (set_init_label): Likewise.
1506 (output_init_element): Change the type of a parameter to bool.
1507 (output_pending_init_elements): Use true/false instead of 1/0.
1508 (process_init_element): Likewise.
1509 (build_binary_op): Change the type of a parameter to bool.
1511 2017-08-09 Marek Polacek <polacek@redhat.com>
1514 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1515 Call emit_diagnostic_valist instead of pedwarn.
1516 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1517 Print the relevant types in diagnostics.
1519 2017-08-09 Marek Polacek <polacek@redhat.com>
1522 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1523 build_conditional_expr.
1524 * c-parser.c (c_parser_conditional_expression): Create locations for
1525 EXP1 and EXP2 from their source ranges. Pass the locations down to
1526 build_conditional_expr.
1527 * c-tree.h (build_conditional_expr): Update declaration.
1528 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1529 For -Wsign-compare, also print the types.
1531 2017-08-08 Martin Liska <mliska@suse.cz>
1533 * c-convert.c: Include header files.
1534 * c-typeck.c: Likewise.
1536 2017-08-07 Martin Liska <mliska@suse.cz>
1538 * c-parser.c (c_parser_attributes): Canonicalize name of an
1541 2017-08-02 Marek Polacek <polacek@redhat.com>
1544 * c-parser.c (c_parser_unary_expression): Use set_error.
1548 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1549 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1551 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1552 Martin Liska <mliska@suse.cz>
1554 * c-typeck.c (c_finish_goto_label): Build gimple predict
1557 2017-07-31 Martin Liska <mliska@suse.cz>
1560 * c-convert.c (convert): Guard condition with flag_sanitize_p
1561 also with current_function_decl non-null equality.
1562 * c-decl.c (grokdeclarator): Likewise.
1563 * c-typeck.c (build_binary_op): Likewise.
1565 2017-07-25 Marek Polacek <polacek@redhat.com>
1567 * c-decl.c (grokfield): Remove local variable.
1569 2017-07-25 Marek Polacek <polacek@redhat.com>
1572 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1573 macro expansion if the body is in { }.
1574 (c_parser_while_statement): Likewise.
1575 (c_parser_for_statement): Likewise.
1577 2017-07-18 Nathan Sidwell <nathan@acm.org>
1579 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1581 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1583 * c-decl.c (implicitly_declare): When suggesting a missing
1584 #include, provide a fix-it hint.
1586 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1588 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1589 and call that instead.
1590 * c-tree.h (selftest::run_c_tests): New decl.
1592 2017-06-26 Marek Polacek <polacek@redhat.com>
1595 * c-parser.c (c_parser_if_body): Set the location of the
1596 body of the conditional after parsing all the labels. Call
1597 warn_for_multistatement_macros.
1598 (c_parser_else_body): Likewise.
1599 (c_parser_switch_statement): Likewise.
1600 (c_parser_while_statement): Likewise.
1601 (c_parser_for_statement): Likewise.
1602 (c_parser_statement): Add a default argument. Save the location
1603 after labels have been parsed.
1604 (c_parser_c99_block_statement): Likewise.
1606 2017-06-19 Richard Biener <rguenther@suse.de>
1608 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1609 negated _Literals to parse _Literal (int) -1.
1611 2017-06-13 Martin Liska <mliska@suse.cz>
1614 * c-convert.c (convert): Use sanitize_flags_p.
1615 * c-decl.c (grokdeclarator): Likewise.
1616 * c-typeck.c (convert_for_assignment): Likewise.
1617 (c_finish_return): Likewise.
1618 (build_binary_op): Likewise.
1620 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1623 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1624 to sizetype before size_binop.
1626 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1628 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1631 2017-06-06 Marek Polacek <polacek@redhat.com>
1634 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1636 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1638 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1640 * c-parser.c (c_parser_binary_expression): Implement the
1641 -Wsizeof_pointer_div warning.
1642 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1643 from a parenthesized expression.
1644 (c_parser_expr_list): Use c_last_sizeof_loc.
1645 * c-tree.h (c_last_sizeof_loc): New external.
1646 * c-typeck.c (c_last_sizeof_loc): New variable.
1647 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1649 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1652 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1654 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1656 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1659 2017-05-24 Martin Sebor <msebor@redhat.com>
1662 * c-fold.c (c_fully_fold_internal): Adjust.
1663 * c-typeck.c (parser_build_unary_op): Adjust.
1665 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1667 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1668 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1671 2017-05-23 Marek Polacek <polacek@redhat.com>
1673 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1676 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1678 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1679 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1680 it returned invariant. Call tree_invariant_p unconditionally
1681 afterwards to decide whether to return expr or op0.
1683 2017-05-22 Nathan Sidwell <nathan@acm.org>
1685 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1687 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1689 * c-parser.c (c_parser_omp_clause_default): Handle
1690 "OMP_CLAUSE_DEFAULT_PRESENT".
1692 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1694 * config-lang.in (gtfiles): Add c-family/c-format.c.
1696 2017-05-18 Nathan Sidwell <nathan@acm.org>
1698 * c-decl.c (pushdecl_top_level): Delete unused function.
1700 2017-05-18 Marek Polacek <polacek@redhat.com>
1702 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1703 (check_earlier_gotos): Likewise.
1704 (define_label): Likewise.
1705 (pending_xref_error): Likewise.
1706 (smallest_type_quals_location): Likewise.
1707 (grokdeclarator): Likewise.
1708 (grokparms): Likewise.
1709 (identifier_global_value): Likewise.
1710 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1711 (find_init_member): Likewise.
1713 2017-05-18 Marek Polacek <polacek@redhat.com>
1715 * c-decl.c (start_decl): Use false/true instead of 0/1.
1716 (grokdeclarator): Likewise.
1717 (finish_struct): Likewise.
1718 (start_function): Change the return type to bool. Use false/true
1720 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1721 * c-tree.h (start_function): Update.
1722 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1723 (set_designator): Change the return type to bool. Use false/true
1726 2017-05-17 Marek Polacek <polacek@redhat.com>
1728 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1729 * c-typeck.c: Likewise.
1731 2017-05-17 Marek Polacek <polacek@redhat.com>
1734 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1735 DECL_IGNORED_P even for non-static compound literals.
1737 2017-05-17 Martin Liska <mliska@suse.cz>
1739 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1740 use it instead of int type.
1742 2017-05-17 Marek Polacek <polacek@redhat.com>
1744 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1746 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1747 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1748 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1749 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1751 (c_parser_conditional_expression): Likewise.
1752 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1753 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1754 (process_init_element): Likewise.
1755 (build_binary_op): Likewise.
1756 (handle_omp_array_sections_1): Likewise.
1758 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1760 * c-parser.c (c_parser_omp_clause_num_gangs)
1761 (c_parser_omp_clause_num_workers)
1762 (c_parser_omp_clause_vector_length): Merge functions into...
1763 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1766 2017-05-11 Nathan Sidwell <nathan@acm.org>
1768 * gimple-parser.c: Don't #include tree-dump.h.
1770 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1773 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1775 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1778 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1779 incorrect __MEM syntax.
1781 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1784 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1787 2017-05-09 Nathan Sidwell <nathan@acm.org>
1789 * c-tree.h (pushdecl): Declare.
1791 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1793 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1794 with diagnostic_report_diagnostic.
1795 * c-errors.c (pedwarn_c99): Likewise.
1796 (pedwarn_c90): Likewise.
1798 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1801 * c-gimplify.c (c_gimplify_expr): Remove calls to
1802 cilk_gimplifY_call_params_in_spawned_fn.
1804 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1806 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1807 hint for removing extra semicolon.
1809 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1812 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1813 enabled, set specs->type to integer_type_node.
1815 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1817 * c-array-notation.c: Fix typo in comment.
1819 2017-03-29 Marek Polacek <polacek@redhat.com>
1822 * c-decl.c (finish_decl): Check VAR_P.
1824 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1827 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1828 * c-typeck.c (c_mark_addressable): Likewise. Look through
1829 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1831 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1833 2017-03-23 Marek Polacek <polacek@redhat.com>
1835 * c-tree.h: Remove a C_RID_YYCODE reference.
1837 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1840 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1841 optional COMPOUND_EXPR with ubsan instrumentation.
1843 2017-03-17 Marek Polacek <polacek@redhat.com>
1845 * c-parser.c: Add C11 references.
1847 2017-03-15 Marek Polacek <polacek@redhat.com>
1849 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1851 2017-03-11 Marek Polacek <polacek@redhat.com>
1853 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1855 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1857 PR translation/79848
1858 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1860 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1862 2017-03-09 Marek Polacek <polacek@redhat.com>
1865 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1866 parameter declarations with initializers.
1868 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1871 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1874 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1877 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1878 for "may only be used in compound statements" diagnostics, change it
1879 such that the same translatable string is used for all pragmas. For
1880 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1882 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1883 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1884 "may only be used in compound statements" diagnostics, such that the
1885 same translatable string is used for all pragmas.
1887 2017-03-04 Marek Polacek <polacek@redhat.com>
1890 * c-decl.c (implicit_decl_warning): Add missing space.
1892 2017-03-03 Marek Polacek <polacek@redhat.com>
1895 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1896 current_function_prototype_arg_types is error_mark_node. Fix
1897 formatting. Use TREE_VALUE instead of TREE_TYPE.
1899 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1902 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1903 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1904 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1908 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1909 instead of %<_Generic>.
1910 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1911 (c_parser_omp_target_exit_data): Use %<release%> instead of
1914 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1916 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1917 instead of just cond ? "..." : "...".
1918 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1919 for "enter"/"exit" keyword.
1920 (c_finish_oacc_routine): Don't use %s to supply portions of the
1923 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1926 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1927 handle -Wrestrict here.
1928 * c-typeck.c (build_function_call_vec): Adjust
1929 check_function_arguments caller.
1931 2017-02-23 Richard Biener <rguenther@suse.de>
1934 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1935 to initialize c_exprs to return.
1936 (c_parser_gimple_binary_expression): Likewise.
1937 (c_parser_gimple_unary_expression): Likewise.
1938 (c_parser_gimple_postfix_expression): Likewise.
1940 2017-02-22 Marek Polacek <polacek@redhat.com>
1943 * c-typeck.c (convert_arguments): Handle error_mark_node.
1945 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1947 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1948 value of c_parser_parse_ssa_name against error_mark_node and emit
1949 error if ssa name is anonymous and written as default definition.
1951 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1953 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1956 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1959 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1960 ignore #pragma omp target even when not followed by identifier.
1962 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1964 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1965 (c_parser_gimple_unary_expression): Likewise.
1967 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1969 * c-parser.c (c_parser_oacc_declare): Add missing space in
1972 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1975 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1976 set_c_expr_source_range when parsing ssa-name.
1978 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1979 Richard Biener <rguenther@suse.de>
1981 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1982 building IL when arguments are error_mark_node.
1983 (c_parser_gimple_unary_expression): Likewise.
1984 (c_parser_gimple_if_stmt): Likewise.
1985 (c_parser_gimple_switch_stmt): Likewise.
1986 (c_parser_gimple_return_stmt): Likewise.
1987 (c_parser_parse_ssa_name): When name lookup fails do not build
1988 an SSA name. Use undeclared rather than not declared in error
1991 2017-02-09 Marek Polacek <polacek@redhat.com>
1994 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1995 instead of c_parser_skip_until_found.
1997 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2000 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2001 symtab_node::get on automatic variables.
2003 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2004 Chung-Lin Tang <cltang@codesourcery.com>
2006 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2007 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2009 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2011 2017-02-07 Richard Biener <rguenther@suse.de>
2013 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2014 (c_parser_gimple_postfix_expression_after_primary):
2015 Do not use c_build_function_call_vec to avoid folding and promotion.
2018 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2021 * c-decl.c (pop_scope): Pass main_input_filename to
2022 build_translation_unit_decl.
2024 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2026 * c-parser.c: Include "read-rtl-function.h" and
2028 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2029 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2030 production. Update for renaming of field "gimple_pass" to
2031 "gimple_or_rtl_pass". If __RTL was seen, call
2032 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2033 to an auto_timevar, to cope with early exit.
2034 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2035 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2036 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2038 (c_parser_parse_rtl_body): New function.
2039 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2040 (struct c_declspecs): Rename field "gimple_pass" to
2041 "gimple_or_rtl_pass". Add field "rtl_p".
2042 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2043 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2044 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2045 (c_parser_gimple_or_rtl_pass_list): ...this.
2047 2017-01-20 Marek Polacek <polacek@redhat.com>
2050 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2052 2017-01-13 Richard Biener <rguenther@suse.de>
2054 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2057 2017-01-13 Richard Biener <rguenther@suse.de>
2059 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2060 _Literal ( type-name ) number.
2062 2017-01-12 Richard Biener <rguenther@suse.de>
2064 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2067 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2070 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2073 2017-01-11 Richard Biener <rguenther@suse.de>
2076 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2077 returns on parse errors.
2079 2017-01-04 Marek Polacek <polacek@redhat.com>
2082 * c-parser.c (c_parser_postfix_expression): Mark zero character
2083 constants by setting original_type in c_expr.
2084 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2085 with a zero character constant.
2086 (char_type_p): New function.
2088 2017-01-04 David Malcolm <dmalcolm@redhat.com>
2090 * c-parser.c (c_parser_declaration_or_fndef): Create a
2091 rich_location at init_loc and parse it to start_init.
2092 (last_init_list_comma): New global.
2093 (c_parser_braced_init): Update last_init_list_comma when parsing
2094 commas. Pass it to pop_init_level. Pass location of closing
2095 brace to pop_init_level.
2096 (c_parser_postfix_expression_after_paren_type): Create a
2097 rich_location at type_loc and parse it to start_init.
2098 (c_parser_omp_declare_reduction): Likewise for loc.
2099 * c-tree.h (start_init): Add rich_location * param.
2100 (pop_init_level): Add location_t param.
2101 * c-typeck.c (struct initializer_stack): Add field
2102 "missing_brace_richloc".
2103 (start_init): Add richloc param, use it to initialize
2104 the stack node's missing_brace_richloc.
2105 (last_init_list_comma): New decl.
2106 (finish_implicit_inits): Pass last_init_list_comma to
2108 (push_init_level): When finding missing open braces, add fix-it
2109 hints to the richloc.
2110 (pop_init_level): Add "insert_before" param and pass it
2111 when calling pop_init_level. Add fixits about missing
2112 close braces to any richloc. Use the richloc for the
2113 -Wmissing-braces warning.
2114 (set_designator): Pass last_init_list_comma to pop_init_level.
2115 (process_init_element): Likewise.
2117 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2119 Update copyright years.
2121 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2124 * c-typeck.c (build_function_call_vec): If check_function_arguments
2125 returns true, set TREE_NO_WARNING on CALL_EXPR.
2128 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2129 to *expr instead of overwriting it.
2131 2016-12-20 Richard Biener <rguenther@suse.de>
2133 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2135 (c_parser_gimple_statement): Only build assigns for non-error
2137 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2139 2016-12-14 Martin Jambor <mjambor@suse.cz>
2141 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2143 (c_finish_oacc_routine): Adjusted call to
2144 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2145 to use their new names.
2146 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2148 (c_parser_oacc_update): Likewise.
2149 (c_parser_omp_simd): Likewise.
2150 (c_parser_omp_target_update): Likewise.
2151 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2152 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2154 (c_finish_omp_cancellation_point): Likewise.
2155 * gimple-parser.c: Do not include omp-low.h
2157 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2158 James Norris <jnorris@codesourcery.com>
2160 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2161 EXIT_DATA,WAIT} are not used in compound statements.
2162 (c_parser_oacc_enter_exit_data): Update diagnostics.
2164 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2167 * c-decl.c (diagnose_mismatched_decls): Use
2168 OPT_Wbuiltin_declaration_mismatch here too.
2170 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
2171 Alan Hayward <alan.hayward@arm.com>
2172 David Sherwood <david.sherwood@arm.com>
2174 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2175 (make_label, finish_struct): Likewise.
2177 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2178 Richard Biener <rguenther@suse.de>
2180 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2181 * config-lang.in (gtfiles): Add c/c-parser.h.
2182 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2183 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2184 * c-parser.c (enum c_id_kind, struct c_token,
2185 c_parser_next_token_is, c_parser_next_token_is_not,
2186 c_parser_next_token_is_keyword,
2187 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2189 * c-parser.h: ... new header.
2190 * c-parser.c: Include c-parser.h and gimple-parser.h.
2191 (c_parser_peek_token, c_parser_peek_2nd_token,
2192 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2193 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2194 c_parser_error, c_parser_require, c_parser_skip_until_found,
2195 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2196 c_parser_type_name): Export.
2197 (c_parser_tokens_buf): New function.
2198 (c_parser_error): Likewise.
2199 (c_parser_set_error): Likewise.
2200 (c_parser_declspecs): Handle RID_GIMPLE.
2201 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2202 via c_parser_parse_gimple_body.
2203 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2204 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2205 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2206 c_parser_error, c_parser_require, c_parser_skip_until_found,
2207 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2208 c_parser_type_name): Declare.
2209 (struct c_parser): Declare forward.
2210 (c_parser_tokens_buf): Declare.
2211 (c_parser_error): Likewise.
2212 (c_parser_set_error): Likewise.
2213 * gimple-parser.c: New file.
2214 * gimple-parser.h: Likewise.
2216 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2219 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2222 2016-09-11 Le-Chun Wu <lcwu@google.com>
2223 Mark Wielaard <mjw@redhat.com>
2225 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2226 to the given -Wshadow= variant.
2228 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2230 * c-typeck.c: Include memmodel.h.
2232 2016-10-13 Jakub Jelinek <jakub@redhat.com>
2235 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2236 instead of lhd_return_null_tree_v.
2238 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2241 * c-decl.c (smallest_type_quals_location): New static function.
2242 (grokdeclarator): Try to find the correct location for an ignored
2245 2016-09-26 Marek Polacek <polacek@redhat.com>
2248 * c-decl.c (pop_scope): Add gcc_fallthrough.
2250 2016-09-26 Marek Polacek <polacek@redhat.com>
2253 * c-parser.c (struct c_token): Add flags field.
2254 (c_lex_one_token): Pass it to c_lex_with_flags.
2255 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2256 into IFN_FALLTHROUGH.
2257 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2258 attribute fallthrough after a case label or default label.
2259 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2261 2016-09-24 Marek Polacek <polacek@redhat.com>
2264 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2265 have boolean value. Warn about ++/-- on booleans.
2267 2016-09-23 Jakub Jelinek <jakub@redhat.com>
2269 * c-parser.c (incomplete_record_decls): Remove unnecessary
2270 = vNULL initialization of file scope vec.
2272 2016-09-16 Marek Polacek <polacek@redhat.com>
2274 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2276 2016-09-14 Marek Polacek <polacek@redhat.com>
2278 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2279 (fix_array_notation_expr): Likewise.
2280 * c-decl.c (finish_decl): Likewise.
2281 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2282 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2283 (function_to_pointer_conversion): Use false instead of 0.
2284 (convert_lvalue_to_rvalue): Likewise.
2285 (parser_build_unary_op): Likewise.
2286 (build_atomic_assign): Likewise.
2287 (build_unary_op): Change nonconvert parameter type to bool, use
2288 true/false instead of 1/0.
2289 (build_binary_op): Use true instead of 1.
2291 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2293 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2294 of add_fixit_insert to add_fixit_insert_before.
2296 2016-09-13 Marek Polacek <polacek@redhat.com>
2298 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2301 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2304 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2305 COMPOUND_EXPR to warn_for_omitted_condop.
2307 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2309 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2310 c_get_substring_location for this new langhook.
2312 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2315 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2317 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2318 instead of mark_exp_read on low_bound/length expression.
2319 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2320 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2321 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2322 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2323 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2324 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2325 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2326 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2327 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2328 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2329 instead of mark_expr_read.
2330 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2331 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2332 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2333 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2334 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2335 array section bases outside of depend clause, for depend clause
2336 use convert_lvalue_to_rvalue on the base.
2337 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2338 linear, aligned, map, to and from clauses.
2339 (c_omp_clause_copy_ctor): New function.
2341 2016-09-01 Marek Polacek <polacek@redhat.com>
2344 * c-typeck.c (composite_type): Add FALLTHRU comment.
2346 2016-08-31 David Malcolm <dmalcolm@redhat.com>
2348 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2349 to the insertion fixits for "struct", "union", and "enum".
2351 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2353 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2354 rather than add_fixit_misspelled_id.
2355 (undeclared_variable): Likewise.
2356 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2357 now-redundant "here" params from add_fixit_insert method calls.
2358 (c_parser_parameter_declaration): Likewise.
2359 * c-typeck.c (build_component_ref): Remove now-redundant range
2360 param from add_fixit_replace method calls.
2362 2016-08-25 Marek Polacek <polacek@redhat.com>
2364 * c-typeck.c (parser_build_binary_op): Pass LHS to
2365 warn_logical_not_parentheses.
2367 2016-08-25 Marek Polacek <polacek@redhat.com>
2370 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2371 or _FloatN or _FloatNx is not supported.
2372 (finish_declspecs): Set type to integer_type_node when _FloatN or
2373 _FloatNx is not supported.
2375 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2378 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2379 (struct c_declspecs): Add field floatn_nx_idx.
2380 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2381 and _FloatNx type specifiers.
2382 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2383 (c_parser_declspecs, c_parser_attribute_any_word)
2384 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2385 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2386 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2387 narrower than double.
2389 2016-08-12 Jakub Jelinek <jakub@redhat.com>
2390 Martin Liska <mliska@suse.cz>
2393 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2394 % to determine val element to change. Assert that
2395 wchar_bytes * charwidth fits into val array.
2397 2016-08-12 Marek Polacek <polacek@redhat.com>
2400 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2401 (c_parser_postfix_expression): Likewise.
2402 * c-typeck.c (build_unary_op): Adjust fall through comment.
2403 (c_mark_addressable): Likewise.
2405 2016-08-11 Jakub Jelinek <jakub@redhat.com>
2408 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2409 array member through typedef, for orig_qual_indirect == 0 clear
2412 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2415 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2416 this up to selftest::run_c_tests.
2417 (selftest::run_c_tests): New function.
2419 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2421 * c-parser.c (struct oacc_routine_data): Add error_seen and
2422 fndecl_seen members.
2423 (c_finish_oacc_routine): Use these.
2424 (c_parser_declaration_or_fndef): Adjust.
2425 (c_parser_oacc_routine): Likewise. Support more C language
2426 constructs, and improve diagnostics. Move pragma context
2428 (c_parser_pragma): ... here.
2430 * c-parser.c (struct oacc_routine_data): New.
2431 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2433 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2434 declare target" attribute.
2436 2016-08-01 Jan Beulich <jbeulich@suse.com>
2438 * c-fold.c (c_fully_fold_internal): Also emit shift count
2439 warnings for vector types.
2440 * c-typeck.c (build_binary_op): Likewise.
2442 2016-07-29 Marek Polacek <polacek@redhat.com>
2445 * c-decl.c (finish_struct): Rephrase an error message.
2448 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2449 to error node for invalid code.
2452 * c-decl.c (implicitly_declare): Return decl early not only for
2453 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2455 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2458 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2459 on GNU extern inline functions.
2461 2016-07-29 Marek Polacek <polacek@redhat.com>
2464 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2467 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2469 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2471 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2473 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2475 (best_macro_match): Likewise, converting from a typedef to a
2477 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2478 (lookup_name_fuzzy): Update for change of best_macro_match to a
2479 subclass with a ctor that calls cpp_forall_identifiers.
2481 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2483 * c-decl.c (implicit_decl_warning): Update for conversion of
2484 return type of lookup_name_fuzzy to const char *.
2485 (undeclared_variable): Likewise.
2486 (lookup_name_fuzzy): Convert return type from tree to
2488 * c-parser.c (c_parser_declaration_or_fndef): Update for
2489 conversion of return type of lookup_name_fuzzy to const char *.
2490 (c_parser_parameter_declaration): Likewise.
2492 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2494 * c-parser.c (c_parser_oacc_declare): Don't scan for
2496 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2497 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2498 zero-length subarrays.
2500 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2503 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2504 instead of FUZZY_LOOKUP_NAME.
2505 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2506 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2508 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2511 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2513 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2515 * c-parser.c (c_parser_generic_selection): Make type of variable
2517 (c_parser_omp_declare_simd): Likewise.
2519 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2521 * c-decl.c (struct c_struct_parse_info): Change member types
2522 from vec to auto_vec.
2523 (start_struct): Adjust.
2524 (finish_struct): Likewise.
2526 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2529 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2531 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2533 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2534 Move pragma context checking into...
2535 (c_parser_omp_cancellation_point): ... here, and improve
2536 diagnostic messages.
2537 * c-typeck.c (c_finish_omp_cancel)
2538 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2540 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2543 * c-typeck.c (c_build_qualified_type): Don't clear
2544 C_TYPE_INCOMPLETE_VARS for the main variant.
2546 2016-06-28 Martin Sebor <msebor@redhat.com>
2549 * c-typeck.c (output_init_element): Diagnose incompatible types
2550 before non-constant initializers.
2552 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2554 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2556 2016-06-23 Andi Kleen <ak@linux.intel.com>
2558 * Make-lang.in: Add support for autofdo.
2560 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2563 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2564 (implicit_decl_warning): When issuing warnings for implicit
2565 declarations, attempt to provide a suggestion via
2567 (undeclared_variable): Likewise when issuing errors.
2568 (lookup_name_in_scope): Likewise.
2569 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2570 (best_macro_match): New typedef.
2571 (find_closest_macro_cpp_cb): New function.
2572 (lookup_name_fuzzy): New function.
2573 * c-parser.c: Include gcc-rich-location.h.
2574 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2575 (c_keyword_starts_typename): ...this new function.
2576 (c_parser_declaration_or_fndef): When issuing errors about
2577 missing "struct" etc, add a fixit. For other kinds of errors,
2578 attempt to provide a suggestion via lookup_name_fuzzy.
2579 (c_parser_parms_declarator): When looking ahead to detect typos in
2580 type names, also reject CPP_KEYWORD.
2581 (c_parser_parameter_declaration): When issuing errors about
2582 unknown type names, attempt to provide a suggestion via
2584 * c-tree.h (c_keyword_starts_typename): New prototype.
2586 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2589 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2590 c_common_type returns error_mark_node.
2592 2016-06-19 Martin Sebor <msebor@redhat.com>
2595 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2596 __alignof__ (expression).
2598 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2600 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2602 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2604 * c-typeck.c (build_component_ref): Simplify fixit code by
2605 using gcc_rich_location::add_fixit_misspelled_id.
2606 (set_init_label): Likewise.
2608 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2610 * c-parser.c (c_parser_initelt): Provide location of name for new
2611 location_t param of set_init_label.
2612 * c-tree.h (set_init_label): Add location_t param.
2613 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2614 param and use it when issuing error messages about unrecognized
2615 field names. Attempt to provide a fixit hint if appropriate,
2616 otherwise update the error message to provide the type name.
2618 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2621 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2624 2016-06-08 Martin Sebor <msebor@redhat.com>
2625 Jakub Jelinek <jakub@redhat.com>
2629 * c-typeck.c (convert_arguments): Don't promote last argument
2630 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2632 2016-06-08 Marek Polacek <polacek@redhat.com>
2635 * c-decl.c (grokdeclarator): Check TYPE_P.
2638 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2641 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2643 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2644 and structure element reference, capture the location of the
2645 element name token and pass it to build_component_ref.
2646 (c_parser_postfix_expression_after_primary): Likewise for
2647 structure element dereference.
2648 (c_parser_omp_variable_list): Likewise for
2649 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2650 * c-tree.h (build_component_ref): Add location_t param.
2651 * c-typeck.c (build_component_ref): Add location_t param
2652 COMPONENT_LOC. Use it, if available, when issuing hints about
2653 mispelled member names to provide a fixit replacement hint.
2655 2016-06-06 Marek Polacek <polacek@redhat.com>
2658 * c-parser.c (c_parser_direct_declarator): Set location.
2660 2016-06-06 Marek Polacek <polacek@redhat.com>
2662 * c-typeck.c (comptypes_internal): Handle comparisons of
2663 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2664 TYPE_REF_CAN_ALIAS_ALL.
2666 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2668 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2669 arguments as addressable when async clause exists.
2671 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2674 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2675 when combined with target construct.
2677 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2679 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2680 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2682 2016-05-25 Marek Polacek <polacek@redhat.com>
2685 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2688 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2690 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2692 * c-parser.c (c_parser_oacc_declare): Add support for
2693 GOMP_MAP_FIRSTPRIVATE_POINTER.
2694 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2695 argument with enum c_omp_region_type ort.
2696 (handle_omp_array_sections): Likewise. Update call to
2697 handle_omp_array_sections_1.
2698 (c_finish_omp_clauses): Add specific errors and warning messages for
2699 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2700 call to handle_omp_array_sections.
2702 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2704 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2706 2016-05-24 Richard Biener <rguenther@suse.de>
2710 * c-typeck.c (build_array_ref): Do not complain about indexing
2711 non-lvalue vectors. Adjust for function name change.
2713 2016-05-20 Martin Sebor <msebor@redhat.com>
2716 * c-typeck.c (error_init): Use
2717 expansion_point_location_if_in_system_header.
2718 (warning_init): Same.
2720 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2723 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2725 (c_parser_postfix_expression): Likewise.
2726 * c-tree.h (c_expr::set_error): New method.
2727 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2728 that result's range is initialized.
2730 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2732 * c-typeck.c (parser_build_unary_op): Fix formatting.
2734 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2736 * c-decl.c (grokdeclarator): Remove errmsg and use of
2737 targetm.invalid_return_type.
2738 (grokparms): Remove errmsg and use of
2739 targetm.invalid_parameter_type.
2741 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2743 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2744 function return type.
2746 2016-05-12 Marek Polacek <polacek@redhat.com>
2749 * c-decl.c (build_compound_literal): Pass LOC down to
2750 c_incomplete_type_error.
2751 * c-tree.h (require_complete_type): Adjust declaration.
2752 (c_incomplete_type_error): Likewise.
2753 * c-typeck.c (require_complete_type): Add location parameter, pass it
2754 down to c_incomplete_type_error.
2755 (c_incomplete_type_error): Add location parameter, pass it down to
2757 (build_component_ref): Pass location down to c_incomplete_type_error.
2758 (default_conversion): Pass location down to require_complete_type.
2759 (build_array_ref): Likewise.
2760 (build_function_call_vec): Likewise.
2761 (convert_arguments): Likewise.
2762 (build_unary_op): Likewise.
2763 (build_c_cast): Likewise.
2764 (build_modify_expr): Likewise.
2765 (convert_for_assignment): Likewise.
2766 (c_finish_omp_clauses): Likewise.
2768 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2771 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2773 * c-errors.c (pedwarn_c90): Return true if warned.
2774 * c-tree.h (pedwarn_c90): Change return type to bool.
2775 (enum c_declspec_word): Add new enumerator cdw_atomic.
2777 2016-05-11 Marek Polacek <polacek@redhat.com>
2780 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2781 diagnose_mismatched_attributes and call it.
2783 2016-05-10 Marek Polacek <polacek@redhat.com>
2786 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2787 on a declaration following the definition.
2789 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2791 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2792 parse it through to c_parser_c99_block_statement.
2793 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2796 2016-05-04 Marek Polacek <polacek@redhat.com>
2798 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2801 2016-05-04 Marek Polacek <polacek@redhat.com>
2804 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2805 for macro expansions.
2807 2016-05-03 Marek Polacek <polacek@redhat.com>
2810 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2811 check_builtin_function_arguments.
2813 2016-05-03 Richard Biener <rguenther@suse.de>
2815 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2816 the checksum from the previous stage.
2818 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2820 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2821 c_finish_omp_clauses.
2822 (c_parser_omp_all_clauses): Likewise.
2823 (c_parser_oacc_cache): Likewise.
2824 (c_parser_oacc_loop): Likewise.
2825 (omp_split_clauses): Likewise.
2826 (c_parser_omp_declare_target): Likewise.
2827 (c_parser_cilk_all_clauses): Likewise.
2828 (c_parser_cilk_for): Likewise.
2829 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2830 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2832 2016-05-02 Marek Polacek <polacek@redhat.com>
2835 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2838 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2841 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2842 OACC_LOOP_CLAUSE_MASK.
2843 (c_parser_oacc_kernels_parallel): Update call to
2844 c_oacc_split_loop_clauses.
2846 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2848 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2849 argument to build_modify_expr in two cases.
2851 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2853 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2854 warn_for_memset instead of warning directly here.
2856 2016-04-26 Marek Polacek <polacek@redhat.com>
2859 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2861 (c_parser_for_statement): ... here.
2862 (c_parser_if_statement): Use it.
2863 (c_parser_switch_statement): Use it.
2864 (c_parser_while_statement): Use it.
2867 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2869 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2872 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2873 instead of c_finish_cilk_clauses.
2874 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2875 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2876 floating-point variables in the linear clause for Cilk Plus.
2878 2016-04-18 Michael Matz <matz@suse.de>
2880 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2881 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2883 2016-04-15 Marek Polacek <polacek@redhat.com>
2886 * c-typeck.c (build_unary_op): Pass location down to error and
2889 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2892 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2894 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2895 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2896 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2897 Adjust c_parser_pragma callers.
2898 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2900 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2902 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2903 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2904 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2905 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2906 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2907 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2908 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2909 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2911 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2912 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2915 2016-04-13 Marek Polacek <polacek@redhat.com>
2918 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2920 (c_parser_statement): Likewise.
2921 (c_parser_c99_block_statement): Likewise.
2922 (c_parser_while_statement): Likewise.
2923 (c_parser_for_statement): Likewise.
2924 (c_parser_if_body): Don't set IF_P here.
2925 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2926 about dangling else here.
2927 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2928 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2929 warn about dangling else here.
2931 2016-04-04 Marek Polacek <polacek@redhat.com>
2934 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2936 2016-03-31 Marek Polacek <polacek@redhat.com>
2939 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2941 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2944 * c-parser.c (c_parser_postfix_expression): Set the source range
2945 for uses of "__builtin_types_compatible_p".
2947 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2950 * c-typeck.c (composite_type): Don't count void_list_node
2951 into len, if the list is terminated by void_list_node, start
2952 with void_list_node instead of NULL for newargs. Stop
2955 2016-03-16 Marek Polacek <polacek@redhat.com>
2958 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2959 nested functions returning VM types.
2961 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2963 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2964 when calling c_finish_omp_clauses.
2966 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2969 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2972 2016-03-04 Marek Polacek <polacek@redhat.com>
2975 * c-parser.c (c_parser_postfix_expression): Call
2976 c_parser_cast_expression rather than c_parser_postfix_expression.
2978 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2982 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2983 of incomplete decls to error_mark_node.
2985 2016-02-24 Marek Polacek <polacek@redhat.com>
2988 * c-decl.c (finish_decl): Don't update the copy of the type of a
2989 different decl type.
2991 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2994 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2995 in id_kind reclassification.
2997 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3000 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3002 2016-02-16 James Norris <jnorris@codesourcery.com>
3005 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3007 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3009 * c-decl.c (build_null_declspecs): Zero the entire struct.
3012 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3013 callers changed. If nested_p is true, use it to call
3014 finish_implicit_inits.
3015 * c-tree.h (finish_implicit_inits): Declare.
3016 * c-typeck.c (finish_implicit_inits): New function. Move code
3018 (push_init_level): ... here.
3019 (set_designator, process_init_element): Call finish_implicit_inits.
3021 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3024 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3025 arguments for -Waddress warning.
3027 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3030 * c-decl.c (finish_enum): When honoring mode attribute,
3031 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3033 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3036 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3037 all type variants, not just TYPE_MAIN_VARIANT.
3039 2016-01-27 Jakub Jelinek <jakub@redhat.com>
3042 * c-decl.c (c_write_global_declarations_1): Warn with
3043 warn_unused_function if static prototype without definition
3046 2016-01-27 Marek Polacek <polacek@redhat.com>
3049 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3050 to unsigned, if needed. Add -Wsign-compare warning.
3052 2016-01-26 Jakub Jelinek <jakub@redhat.com>
3054 PR tree-optimization/69483
3055 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3057 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3060 * c-tree.h (incomplete_record_decls): Declare.
3061 * c-parser.c (incomplete_record_decls): Define.
3062 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3063 report error if any decl has zero size.
3064 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3065 or enum type to incomplete_record_decls.
3067 2016-01-14 Tom de Vries <tom@codesourcery.com>
3069 PR tree-optimization/68773
3070 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3073 2016-01-14 Marek Polacek <polacek@redhat.com>
3076 * c-decl.c (grokdeclarator): Provide more information for invalid
3079 2016-01-06 David Malcolm <dmalcolm@redhat.com>
3081 * c-parser.c (c_parser_unary_expression): For dereferences, build
3082 a combined location before calling build_indirect_ref, so that
3083 error reports cover the full range, manually updating the c_expr
3086 2016-01-06 Marek Polacek <polacek@redhat.com>
3089 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3090 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3093 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3095 Update copyright years.
3097 2016-01-04 Marek Polacek <polacek@redhat.com>
3100 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3101 optimization to use __atomic_fetch_* built-in if possible.
3103 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3105 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3107 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3110 2015-12-22 Marek Polacek <polacek@redhat.com>
3113 * c-typeck.c (build_component_ref): Warn when acessing elements of
3114 atomic structures or unions.
3116 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3118 * c-typeck.c: Include "gcc-rich-location.h".
3119 (build_binary_op): In the two places that call binary_op_error,
3120 create a gcc_rich_location and populate it with the location of
3121 the binary op and its two operands.
3123 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3125 * c-parser.c (c_parser_statement_after_labels): When calling
3126 c_finish_return, Use the return expression's location if it has
3127 one, falling back to the location of the first token within it.
3128 * c-typeck.c (c_finish_return): When issuing warnings about
3129 the incorrect presence/absence of a return value, issue a note
3130 showing the declaration of the function.
3132 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3134 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3136 (c_parser_peek_nth_token): New function.
3137 (c_parser_peek_conflict_marker): New function.
3138 (c_parser_error): Detect conflict markers and report them as such.
3140 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3142 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3143 to preserve range information for the primary expression
3144 in the call to c_parser_postfix_expression_after_primary.
3146 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3148 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3149 expression location, falling back on the first token location,
3150 rather than always using the latter.
3152 2015-12-16 Marek Polacek <polacek@redhat.com>
3155 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3158 2015-12-15 Marek Polacek <polacek@redhat.com>
3161 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3164 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3166 * c-parser.c (c_parser_alignof_expression): Capture location of
3167 closing parenthesis (if any), or of end of unary expression, and
3168 use it to build a src_range for the expression.
3170 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3173 * c-parser.c (c_parser_get_builtin_args): Add
3174 "out_close_paren_loc" param, and write back to it.
3175 (c_parser_postfix_expression): Capture the closing
3176 parenthesis location for RID_CHOOSE_EXPR,
3177 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3178 RID_BUILTIN_SHUFFLE and use it to set the source range
3179 for such expressions; within RID_BUILTIN_COMPLEX set
3180 the underlying location.
3182 2015-12-07 Marek Polacek <polacek@redhat.com>
3185 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3186 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3188 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3190 * c-tree.h (c_build_va_arg): Adjust prototype.
3191 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3192 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3193 parameter, adjust throughout and issue an error if EXPR is a component
3194 with reverse storage order.
3196 2015-12-02 Jason Merrill <jason@redhat.com>
3198 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3199 (c_fully_fold_internal, decl_constant_value_for_optimization):
3200 Move from c-common.c.
3201 * c-tree.h: Declare decl_constant_value_for_optimization.
3202 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3204 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3207 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3208 following link from declarator to next declarator. Track original
3209 qualified type and pass it to c_build_qualified_type.
3210 * c-typeck.c (c_build_qualified_type): Add arguments
3211 orig_qual_type and orig_qual_indirect.
3213 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3215 * c-parser.c (c_parser_omp_clause_name)
3216 (c_parser_oacc_all_clauses): Alphabetical sorting.
3218 2015-12-02 Jakub Jelinek <jakub@redhat.com>
3221 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3224 2015-12-01 Julian Brown <julian@codesourcery.com>
3225 Cesar Philippidis <cesar@codesourcery.com>
3226 James Norris <James_Norris@mentor.com>
3228 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3229 (c_parser_oacc_clause_use_device): New function.
3230 (c_parser_oacc_all_clauses): Add use_device support.
3231 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3232 (c_parser_oacc_host_data): New function.
3233 (c_parser_omp_construct): Add host_data support.
3234 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3235 * c-typeck.c (c_finish_oacc_host_data): New function.
3236 (c_finish_omp_clauses): Add use_device support.
3238 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3241 * c-decl.c: Set TYPE_PACKED in variants.
3243 2015-11-27 Martin Liska <mliska@suse.cz>
3246 * c-array-notation.c (fix_builtin_array_notation_fn):
3247 Use release_vec_vec instead of vec::release.
3248 (build_array_notation_expr): Likewise.
3249 (fix_conditional_array_notations_1): Likewise.
3250 (fix_array_notation_expr): Likewise.
3251 (fix_array_notation_call_expr): Likewise.
3253 2015-11-27 Jakub Jelinek <jakub@redhat.com>
3256 * c-parser.c (c_parser_compound_statement_nostart): If
3257 last_label is true, use pragma_stmt instead of pragma_compound
3258 as second c_parser_pragma argument.
3259 (c_parser_omp_ordered, c_parser_omp_target_update,
3260 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3261 false as second argument to c_parser_skip_to_pragma_eol after
3262 diagnosing standalone directives used in pragma_stmt context.
3264 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3266 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3267 with "if (ENABLE_OFFLOADING)".
3269 2015-11-23 David Malcolm <dmalcolm@redhat.com>
3272 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3273 for various Objective-C constructs: Class.name syntax,
3274 @selector(), @protocol(), @encode(), and [] message syntax.
3276 2015-11-20 David Malcolm <dmalcolm@redhat.com>
3279 * c-typeck.c (should_suggest_deref_p): New function.
3280 (build_component_ref): Special-case POINTER_TYPE when
3281 generating a "not a structure of union" error message, and
3282 suggest a "->" rather than a ".", providing a fix-it hint.
3284 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3286 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3287 candidate into a new function, find_closest_identifier.
3289 2015-11-19 Marek Polacek <polacek@redhat.com>
3292 * c-typeck.c (parser_build_binary_op): Properly handle
3293 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3295 2015-11-17 David Malcolm <dmalcolm@redhat.com>
3297 * c-parser.c (set_c_expr_source_range): Bulletproof both
3298 overloaded implementations against NULL expr->value.
3299 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3301 (c_parser_unary_expression): Likewise when handling addresses of
3303 (c_parser_postfix_expression): Likewise for statement expressions,
3304 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3305 __builtin_va_arg, and for __builtin_offset_of.
3306 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3307 src_range using the range of the braced initializer.
3308 (c_parser_transaction_expression): Set src_range for "ret" to a
3309 sane pair of values.
3311 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3313 * c-parser.c (c_finish_omp_declare_simd): Look for
3314 "simd" attribute as well. Update error message.
3316 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3318 * c-parser.c (c_parser_omp_declare_target): Adjust.
3320 2015-11-14 Jakub Jelinek <jakub@redhat.com>
3322 * c-typeck.c (c_finish_omp_clauses): Don't mark
3323 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3325 2015-11-14 Marek Polacek <polacek@redhat.com>
3327 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3328 * c-typeck.c: Likewise.
3330 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3332 * c-decl.c (warn_defaults_to): Pass line_table to
3334 * c-errors.c (pedwarn_c99): Likewise.
3335 (pedwarn_c90): Likewise.
3336 * c-parser.c (set_c_expr_source_range): New functions.
3337 (c_token::get_range): New method.
3338 (c_token::get_finish): New method.
3339 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3340 based on the range from the start of the LHS to the end of the
3342 (c_parser_conditional_expression): Likewise, based on the range
3343 from the start of the cond.value to the end of exp2.value.
3344 (c_parser_binary_expression): Call set_c_expr_source_range on
3345 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3346 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3347 based on the cast_loc through to the end of the expr.
3348 (c_parser_unary_expression): Likewise, based on the
3349 op_loc through to the end of op.
3350 (c_parser_sizeof_expression) Likewise, based on the start of the
3351 sizeof token through to either the closing paren or the end of
3353 (c_parser_postfix_expression): Likewise, using the token range,
3354 or from the open paren through to the close paren for
3355 parenthesized expressions.
3356 (c_parser_postfix_expression_after_primary): Likewise, for
3357 various kinds of expression.
3358 * c-tree.h (struct c_expr): Add field "src_range".
3359 (c_expr::get_start): New method.
3360 (c_expr::get_finish): New method.
3361 (set_c_expr_source_range): New decls.
3362 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3363 on ret for prefix unary ops.
3364 (parser_build_binary_op): Likewise, running from the start of
3365 arg1.value through to the end of arg2.value.
3367 2015-11-13 Marek Polacek <polacek@redhat.com>
3370 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3372 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3374 * c-typeck.c: Include spellcheck.h.
3375 (lookup_field_fuzzy_find_candidates): New function.
3376 (lookup_field_fuzzy): New function.
3377 (build_component_ref): If the field was not found, try using
3378 lookup_field_fuzzy and potentially offer a suggestion.
3380 2015-11-12 James Norris <jnorris@codesourcery.com>
3381 Joseph Myers <joseph@codesourcery.com>
3383 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3384 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3385 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3386 and PRAGMA_OMP_CLAUSE_LINK.
3387 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3388 and PRAGMA_OACC_CLAUSE_LINK.
3389 (OACC_DECLARE_CLAUSE_MASK): New definition.
3390 (c_parser_oacc_declare): New function.
3392 2015-11-12 Marek Polacek <polacek@redhat.com>
3395 * c-parser.c (c_parser_for_statement): Reclassify the token in
3398 2015-11-11 Marek Polacek <polacek@redhat.com>
3402 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3403 checking the size of an array.
3405 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3407 * c-array-notation.c: Remove unused header files.
3408 * c-aux-info.c: Likewise.
3409 * c-convert.c: Likewise.
3410 * c-decl.c: Likewise.
3411 * c-errors.c: Likewise.
3412 * c-lang.c: Likewise.
3413 * c-objc-common.c: Likewise.
3414 * c-parser.c: Likewise.
3415 * c-typeck.c: Likewise.
3416 * gccspec.c: Likewise.
3418 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3419 Cesar Philippidis <cesar@codesourcery.com>
3420 James Norris <jnorris@codesourcery.com>
3421 Julian Brown <julian@codesourcery.com>
3422 Nathan Sidwell <nathan@codesourcery.com>
3425 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3427 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3428 (c_parser_pragma): Parse 'acc routine'.
3429 (OACC_ROUTINE_CLAUSE_MARK): Define.
3430 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3432 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3435 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3436 location of the backward-goto to the start of the loop body.
3438 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3441 * c-parser.c (c_parser_while_statement): Finish the loop before
3442 parsing ahead for misleading indentation.
3443 (c_parser_for_statement): Likewise.
3445 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3447 * c-decl.c (finish_struct): If the structure has reverse storage
3448 order, rewrite the type of array fields with scalar component. Call
3449 maybe_apply_pragma_scalar_storage_order on entry.
3450 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3451 errors on bit-fields and reverse SSO here and not...
3452 (c_mark_addressable): ...here.
3453 (output_init_element): Adjust call to initializer_constant_valid_p.
3454 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3456 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3458 * c-decl.c (warn_defaults_to): Update for change in signature
3459 of diagnostic_set_info.
3460 * c-errors.c (pedwarn_c99): Likewise.
3461 (pedwarn_c90): Likewise.
3462 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3463 for textinfo::set_location.
3465 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3466 Thomas Schwinge <thomas@codesourcery.com>
3467 James Norris <jnorris@codesourcery.com>
3469 * c-parser.c (c_parser_omp_clause_name): Add support for
3470 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3471 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3472 default(none) in OpenACC.
3473 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3475 (c_parser_oacc_clause_tile): New function.
3476 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3477 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3478 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3480 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3481 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3483 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3484 (c_parser_oacc_update): Update the error message for missing clauses.
3485 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3486 and OMP_CLAUSE_INDEPENDENT.
3488 2015-11-05 Marek Polacek <polacek@redhat.com>
3491 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3492 deal with pre-evaluation on invalid types.
3494 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3495 Ilya Verbin <ilya.verbin@intel.com>
3497 * c-parser.c: Include context.h and gimple-expr.h.
3498 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3499 monotonic together with nonmonotonic.
3500 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3501 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3502 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3503 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3504 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3505 expressions on combined target teams before the target.
3506 (c_parser_omp_declare_target): If decl has "omp declare target" or
3507 "omp declare target link" attribute, and cgraph or varpool node already
3508 exists, then set corresponding flags. Call c_finish_omp_clauses
3509 in the parenthesized extended-list syntax case.
3510 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3512 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3513 on OMP_CLAUSE_REDUCTION array sections.
3514 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3515 into the constant offset, or for variable low-bound using
3516 POINTER_PLUS_EXPR. For structure element based array sections use
3517 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3518 (c_finish_omp_clauses): Drop generic_field_head, structure
3519 elements are now always mapped even as array section bases,
3520 diagnose same var in data sharing and mapping clauses. Diagnose if
3521 linear step on declare simd is neither a constant nor a uniform
3522 parameter. Look through POINTER_PLUS_EXPR for array section
3523 reductions. Diagnose the same var or function appearing multiple
3524 times on the same directive. Fix up wording for the to clause if t
3525 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3526 modifier on kinds other than dynamic or guided or nonmonotonic
3527 modifier together with ordered clause.
3529 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3530 Chung-Lin Tang <cltang@codesourcery.com>
3532 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3534 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3536 * c-array-notation.c: Reorder #include's and remove duplicates.
3537 * c-aux-info.c: Likewise.
3538 * c-convert.c: Likewise.
3539 * c-decl.c: Likewise.
3540 * c-errors.c: Likewise.
3541 * c-lang.c: Likewise.
3542 * c-objc-common.c: Likewise.
3543 * c-parser.c: Likewise.
3544 * c-typeck.c: Likewise.
3546 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3549 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3550 after calling build_qualified_type.
3552 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3553 Thomas Schwinge <thomas@codesourcery.com>
3554 James Norris <jnorris@codesourcery.com>
3555 Joseph Myers <joseph@codesourcery.com>
3556 Julian Brown <julian@codesourcery.com>
3557 Bernd Schmidt <bschmidt@redhat.com>
3559 * c-parser.c (c_parser_oacc_shape_clause): New.
3560 (c_parser_oacc_simple_clause): New.
3561 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3562 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3564 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3565 James Norris <jnorris@codesourcery.com>
3566 Cesar Philippidis <cesar@codesourcery.com>
3570 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3571 parameters, and handle these. Adjust all users.
3572 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3574 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3576 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3578 (c_finish_omp_construct): Declare function.
3579 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3580 Merge functions into...
3581 (c_finish_omp_construct): ... this new function.
3583 2015-10-22 Richard Biener <rguenther@suse.de>
3585 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3586 before folding a MINUS_EXPR.
3588 2015-10-21 Marek Polacek <polacek@redhat.com>
3591 * c-decl.c (start_function): Warn about vararg functions without
3594 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3596 * c-typeck.c (build_conditional_expr): Use boolean vector
3597 type for vector comparison.
3598 (build_vec_cmp): New.
3599 (build_binary_op): Use build_vec_cmp for comparison.
3601 2015-10-20 Marek Polacek <polacek@redhat.com>
3603 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3605 2015-10-20 Marek Polacek <polacek@redhat.com>
3608 * c-parser.c (c_parser_attributes): Break out of the loop if the
3609 token after an attribute isn't a comma.
3611 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3612 Aldy Hernandez <aldyh@redhat.com>
3614 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3615 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3616 (c_parser_omp_variable_list): Handle structure elements for
3617 map, to and from clauses. Handle array sections in reduction
3618 clause. Formatting fixes.
3619 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3620 if clause modifiers.
3621 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3622 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3623 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3624 c_parser_omp_clause_is_device_ptr): New functions.
3625 (c_parser_omp_clause_ordered): Parse optional parameter.
3626 (c_parser_omp_clause_reduction): Handle array reductions.
3627 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3628 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3630 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3631 (c_parser_omp_clause_depend_sink): New function.
3632 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3633 (c_parser_omp_clause_map): Parse release/delete map kinds and
3634 optional always modifier.
3635 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3636 and c_finish_omp_clauses callers.
3637 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3638 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3639 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3640 (OMP_CRITICAL_CLAUSE_MASK): Define.
3641 (c_parser_omp_critical): Parse critical clauses.
3642 (c_parser_omp_for_loop): Handle doacross loops, adjust
3643 c_finish_omp_for and c_finish_omp_clauses callers.
3644 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3645 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3646 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3647 (c_parser_omp_for): Disallow ordered clause when combined with
3648 distribute. Disallow linear clause when combined with distribute
3649 and not combined with simd.
3650 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3651 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3652 parse clauses and if depend clause is found, don't parse a body.
3653 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3654 Allow target parallel without for after it.
3655 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3656 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3657 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3659 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3660 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3661 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3662 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3664 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3665 defaultmap and is_device_ptr clauses.
3666 (c_parser_omp_target): Parse target parallel and target simd. Set
3667 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3668 and target exit data. Diagnose invalid map kinds.
3669 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3670 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3672 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3674 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3675 (c_parser_omp_taskloop): New function.
3676 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3677 handle PRAGMA_OMP_TASKLOOP.
3678 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3679 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3680 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3681 Add IS_OMP argument, handle structure element bases, diagnose
3682 bitfields, pass IS_OMP recursively, diagnose known zero length
3683 array sections in depend clauses, handle array sections in reduction
3684 clause, diagnose negative length even for pointers.
3685 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3686 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3687 array sections in reduction clause, set
3688 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3689 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3690 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3691 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3693 2015-10-06 Marek Polacek <polacek@redhat.com>
3695 * c-parser.c (c_parser_statement_after_labels): Use
3696 protected_set_expr_location.
3697 (c_parser_omp_clause_num_gangs): Likewise.
3698 (c_parser_omp_clause_num_threads): Likewise.
3699 (c_parser_omp_clause_num_workers): Likewise.
3700 (c_parser_omp_clause_vector_length): Likewise.
3701 (c_parser_omp_clause_num_teams): Likewise.
3702 (c_parser_omp_clause_thread_limit): Likewise.
3703 * c-typeck.c (build_c_cast): Likewise.
3704 (c_cast_expr): Likewise.
3706 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3708 * c-typeck.c (c_tree_equal): Use real_equal instead of
3711 2015-10-04 Jason Merrill <jason@redhat.com>
3713 * c-parser.c (c_lex_one_token): Handle @synchronized.
3714 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3715 can change whether the function is transaction_safe.
3717 2015-10-02 Marek Polacek <polacek@redhat.com>
3720 * c-typeck.c (convert_for_assignment): Use the expansion point
3721 location throughout.
3723 2015-10-02 Marek Polacek <polacek@redhat.com>
3726 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3727 and pass it down to c_parser_if_statement.
3728 (c_parser_else_body): Add CHAIN parameter and pass it down to
3729 c_parser_statement_after_labels.
3730 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3731 duplicated if-else-if conditions.
3733 2015-10-01 Marek Polacek <polacek@redhat.com>
3735 * c-typeck.c (convert_for_assignment): Improve commentary.
3737 2015-09-30 Marek Polacek <polacek@redhat.com>
3740 * c-typeck.c (c_finish_return): Use the expansion point location for
3741 certain "return with value" warnings.
3743 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3745 * c-parser.c (pragma_lex): Add loc argument.
3747 2015-09-15 Marek Polacek <polacek@redhat.com>
3750 * c-decl.c (tag_exists_p): New function.
3751 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3752 struct/union/enum keywords are missing.
3753 * c-tree.h (tag_exists_p): Declare.
3755 2015-09-15 Marek Polacek <polacek@redhat.com>
3757 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3758 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3759 Return NULL_TREE instead of 0.
3760 (lookup_name): Return NULL_TREE instead of 0.
3761 (lookup_name_in_scope): Likewise.
3762 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3763 (parser_xref_tag): Use false instead of 0.
3764 (start_struct): Use true instead of 1.
3765 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3767 2015-09-14 Marek Polacek <polacek@redhat.com>
3769 * c-typeck.c (set_nonincremental_init_from_string): Use
3770 HOST_WIDE_INT_M1U when shifting a negative value.
3772 2015-09-09 Mark Wielaard <mjw@redhat.com>
3774 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3777 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3780 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3781 into OMP_FOR_PRE_BODY rather than before the loop.
3783 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3786 * c-parser.c (c_parser_oacc_all_clauses,
3787 c_parser_omp_all_clauses): Remove invalid clause from
3788 list of clauses even if parser->error is set.
3791 * c-parser.c (c_parser_omp_clause_aligned,
3792 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3794 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3798 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3799 instead of c_parser_unary_expression. If the result is !lvalue_p,
3800 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3802 2015-09-04 Marek Polacek <polacek@redhat.com>
3805 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3807 2015-09-03 Martin Sebor <msebor@redhat.com>
3810 * c-typeck.c (convert_arguments, parser_build_unary_op,
3811 build_conditional_expr, c_cast_expr, convert_for_assignment,
3812 build_binary_op, _objc_common_truthvalue_conversion): Call
3814 (c_decl_implicit): Define.
3816 2015-09-02 Marek Polacek <polacek@redhat.com>
3819 * c-parser.c (c_parser_enum_specifier): Give a better error for
3822 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3824 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3826 2015-08-12 Marek Polacek <polacek@redhat.com>
3828 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3831 2015-08-03 Marek Polacek <polacek@redhat.com>
3834 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3836 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3838 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3840 * c-parser.c (c_parser_if_body): Take token_indent_info
3841 argument. Call warn_for_misleading_indentation even when the
3842 body is a semicolon. Extract token_indent_infos corresponding
3843 to the guard, body and next tokens. Adjust call to
3844 warn_for_misleading_indentation accordingly.
3845 (c_parser_else_body): Likewise.
3846 (c_parser_if_statement): Likewise.
3847 (c_parser_while_statement): Likewise.
3848 (c_parser_for_statement): Likewise.
3850 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3851 Manuel López-Ibáñez <manu@gcc.gnu.org>
3853 * c-decl.c (get_parm_info): Remove static var. Update warning
3856 2015-07-27 Marek Polacek <polacek@redhat.com>
3860 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3862 2015-07-20 Marek Polacek <polacek@redhat.com>
3865 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3866 (build_binary_op): Warn about left shift overflows.
3868 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3870 * c-array-notation.c: Adjust includes for flags.h changes.
3871 * c-objc-common.c: Likewise.
3873 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3875 * c-array-notation.c: Adjust includes.
3876 * c-aux-info.c: Likewise.
3877 * c-convert.c: Likewise.
3878 * c-decl.c: Likewise.
3879 * c-errors.c: Likewise.
3880 * c-lang.c: Likewise.
3881 * c-objc-common.c: Likewise.
3882 * c-parser.c: Likewise.
3883 * c-typeck.c: Likewise.
3885 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3888 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3890 2015-06-29 Marek Polacek <polacek@redhat.com>
3893 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3894 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3895 about -Wswitch-bool here.
3896 (do_case): Update c_add_case_label call.
3897 (c_finish_case): Update c_do_switch_warnings call.
3899 2015-06-27 Marek Polacek <polacek@redhat.com>
3901 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3903 2015-06-26 Marek Polacek <polacek@redhat.com>
3905 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3907 * c-typeck.c (array_to_pointer_conversion): Likewise.
3908 (build_unary_op): Likewise.
3909 (c_finish_return): Likewise.
3911 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3913 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3914 * c-parser.c: Likewise.
3916 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3918 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3919 instead of pointer_hash.
3920 (detect_field_duplicates): Likewise.
3922 2015-06-25 Marek Polacek <polacek@redhat.com>
3924 * c-array-notation.c: Use VAR_P throughout.
3925 * c-decl.c: Likewise.
3926 * c-objc-common.c: Likewise.
3927 * c-parser.c: Likewise.
3928 * c-typeck.c: Likewise.
3930 2015-06-25 Marek Polacek <polacek@redhat.com>
3932 * c-decl.c: Use is_global_var throughout.
3933 * c-parser.c: Likewise.
3934 * c-typeck.c: Likewise.
3936 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3938 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3939 * c-aux-info.c: Likewise.
3940 * c-convert.c: Likewise.
3941 * c-decl.c: Likewise.
3942 * c-errors.c: Likewise.
3943 * c-lang.c: Likewise.
3944 * c-objc-common.c: Likewise.
3945 * c-parser.c: Likewise.
3946 * c-typeck.c: Likewise.
3948 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3951 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3954 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3956 * c-decl.c (pop_scope): Register the main translation unit
3957 through the new debug hook.
3959 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3961 * c-array-notation.c : Adjust include files.
3962 * c-aux-info.c : Likewise.
3963 * c-convert.c : Likewise.
3964 * c-decl.c : Likewise.
3965 * c-errors.c : Likewise.
3966 * c-lang.c : Likewise.
3967 * c-lang.h : Likewise.
3968 * c-objc-common.c : Likewise.
3969 * c-parser.c : Likewise.
3970 * c-typeck.c : Likewise.
3972 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3974 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3975 immediately clobber it.
3976 (c_write_global_declarations_1): Remove call to
3977 check_global_declaration_1.
3978 (c_write_global_declarations_2): Remove.
3979 (c_write_final_cleanups): Rename from c_write_global_declarations.
3980 Remove call to finalize_compilation_unit.
3981 Remove calls to debugging hooks.
3982 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3983 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3984 * c-tree.h: Remove c_write_global_declarations.
3986 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3988 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3989 * c-aux-info.c: Likewise.
3990 * c-convert.c: Likewise.
3991 * c-decl.c: Likewise.
3992 * c-errors.c: Likewise.
3993 * c-lang.c: Likewise.
3994 * c-objc-common.c: Likewise.
3995 * c-parser.c: Likewise.
3996 * c-typeck.c: Likewise.
3998 2015-06-04 Marek Polacek <polacek@redhat.com>
4001 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4004 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4006 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4007 Warn for empty struct.
4008 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4010 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4012 * c-decl.c (start_function): Call plugin before parsing.
4013 (finish_function): Call plugin after parsing.
4015 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4018 * c-decl.c (merge_decls): Merge DECL_COMMON.
4020 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4022 * Make-lang.in (check_gcc_pallelize): Define.
4024 2015-05-22 Marek Polacek <polacek@redhat.com>
4027 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4030 2015-05-21 Marek Polacek <polacek@redhat.com>
4032 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4035 2015-05-20 Marek Polacek <polacek@redhat.com>
4037 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4038 * c-typeck.c: Likewise.
4040 2015-05-19 Marek Polacek <polacek@redhat.com>
4042 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4044 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4047 * c-parser.c (c_parser_omp_for_loop): Don't add
4048 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4049 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4050 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4053 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4055 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4058 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4061 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4064 2015-05-14 Marek Polacek <polacek@redhat.com>
4068 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4071 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4073 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4074 to add a call to warn_for_misleading_indentation.
4075 (c_parser_else_body): Likewise, adding param "else_loc".
4076 (c_parser_if_statement): Check for misleading indentation.
4077 (c_parser_while_statement): Likewise.
4078 (c_parser_for_statement): Likewise.
4080 2015-05-08 Marek Polacek <polacek@redhat.com>
4083 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4084 (output_init_element): Likewise.
4086 2015-05-07 Marek Polacek <polacek@redhat.com>
4089 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4092 2015-04-30 Marek Polacek <polacek@redhat.com>
4094 * c-typeck.c (set_init_label): Call error_at instead of error and
4097 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4100 * c-typeck.c (c_build_va_arg): Clarify the error message.
4102 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4104 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4105 OMP_STANDALONE_CLAUSES.
4107 2015-04-28 Marek Polacek <polacek@redhat.com>
4109 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4111 2015-04-28 Marek Polacek <polacek@redhat.com>
4114 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4116 2015-04-25 Marek Polacek <polacek@redhat.com>
4119 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4122 2015-04-23 Marek Polacek <polacek@redhat.com>
4125 * c-decl.c (set_labels_context_r): New function.
4126 (store_parm_decls): Call it via walk_tree_without_duplicates.
4127 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4128 instead of create_tmp_var. Build TARGET_EXPR instead of
4130 (build_atomic_assign): Use create_tmp_var_raw instead of
4131 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4133 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4135 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4136 (c_parser_omp_target_update): Add missed %> to error_at ().
4138 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4141 * c-decl.c (c_default_pointer_mode): Remove definition.
4142 * c-tree.h (c_default_pointer_mode): Remove declaration.
4144 2015-03-27 Tobias Burnus <burnus@net-b.de>
4147 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4149 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4150 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4151 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4153 2015-03-19 Jakub Jelinek <jakub@redhat.com>
4155 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4156 attribute for DECL_EXTERNAL VAR_DECLs.
4158 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4160 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4163 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4166 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4167 before preparing arguments to warn_logical_not_parentheses.
4169 2015-03-09 Jakub Jelinek <jakub@redhat.com>
4172 * c-typeck.c (parser_build_binary_op): Don't warn for
4173 !!x == y or !b == y where b is _Bool.
4175 2015-03-09 Marek Polacek <polacek@redhat.com>
4177 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4178 * c-decl.c (grokdeclarator): Likewise.
4179 * c-typeck.c (build_binary_op): Likewise.
4181 2015-02-27 Marek Polacek <polacek@redhat.com>
4184 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4186 2015-02-14 Marek Polacek <polacek@redhat.com>
4189 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4190 declared through a typedef name.
4192 2015-02-13 Marek Polacek <polacek@redhat.com>
4195 * c-decl.c (grokdeclarator): Print also the type when giving
4196 the error message about array's incomplete element type.
4198 2015-02-11 Jakub Jelinek <jakub@redhat.com>
4201 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4202 check in the POP macro.
4204 2015-02-09 Marek Polacek <polacek@redhat.com>
4207 * c-typeck.c (process_init_element): Don't always wrap
4208 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4209 initializing a range of elements.
4211 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4215 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4217 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
4219 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4220 processing enum declaration.
4222 2015-01-29 Marek Polacek <polacek@redhat.com>
4225 * c-typeck.c (pop_init_level): If constructor_elements has
4226 exactly one element with integer_zerop value, set constructor_zeroinit
4227 to 1. Remove braces around warning_init call.
4229 2015-01-27 Jakub Jelinek <jakub@redhat.com>
4232 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4233 of FUNCTION_DECLs with error_mark_node.
4235 2015-01-26 Jakub Jelinek <jakub@redhat.com>
4238 * c-typeck.c (convert_arguments): Return -1 if there are
4239 error_args, even if we've diagnosed too many arguments.
4241 2015-01-21 Richard Biener <rguenther@suse.de>
4244 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4245 for builtins the user declared correctly.
4247 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4248 Bernd Schmidt <bernds@codesourcery.com>
4249 Cesar Philippidis <cesar@codesourcery.com>
4250 James Norris <jnorris@codesourcery.com>
4251 Jakub Jelinek <jakub@redhat.com>
4252 Ilmir Usmanov <i.usmanov@samsung.com>
4254 * c-parser.c: Include "gomp-constants.h".
4255 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4256 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4257 Use OMP_CLAUSE_SET_MAP_KIND.
4258 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4259 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4260 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4261 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4262 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4263 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4264 "copyout", "create", "delete", "deviceptr", "gang", "host",
4265 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4266 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4267 "present_or_create", "pcreate", "seq", "self", "vector",
4268 "vector_length", "wait", "worker".
4269 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4270 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4271 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4272 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4273 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4274 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4275 (c_parser_oacc_data_clause_deviceptr)
4276 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4277 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4278 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4279 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4280 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4281 (c_parser_oacc_parallel, c_parser_oacc_update)
4282 (c_parser_oacc_wait): New functions.
4283 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4284 (c_finish_oacc_data): New prototypes.
4285 * c-typeck.c: Include "gomp-constants.h".
4286 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4287 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4288 OMP_CLAUSE_SET_MAP_KIND.
4289 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4290 (c_finish_oacc_data): New functions.
4291 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4292 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4293 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4294 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4295 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4296 GOMP_MAP_FORCE_DEVICEPTR.
4298 2015-01-09 Michael Collison <michael.collison@linaro.org>
4300 * c-array-notation.c: Include hash-set.h, machmode.h,
4301 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4302 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4303 * c-aux-info.c: Ditto.
4304 * c-convert.c: Ditto.
4306 * c-errors.c: Ditto.
4307 * c-lang.c: Dittoxs.
4308 * c-objc-common.c: Ditto.
4309 * c-parser.c: Ditto.
4310 * c-typeck.c: Include hash-set.h, machmode.h,
4311 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4312 fold-const.h, wide-int.h, inchash.h, real.h and
4313 fixed-value.h due to flattening of tree.h.
4315 2015-01-07 Marek Polacek <polacek@redhat.com>
4318 * c-typeck.c (process_init_element): Disallow initialization of
4319 a flexible array member with a string constant if the structure
4322 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4325 * c-typeck.c (convert_for_assignment, c_finish_return): For
4326 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4327 types also set in_late_binary_op around convert call.
4328 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4329 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4330 result on expr as last argument to ubsan_instrument_float_cast,
4331 if in_late_binary_op, don't use c_save_expr but save_expr.
4333 Update copyright years.
4335 2015-01-05 Marek Polacek <polacek@redhat.com>
4338 * c-typeck.c (build_array_ref): Pass loc down to
4339 warn_array_subscript_with_type_char.
4341 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4343 * c-typeck.c: New behavious for pointers to arrays with qualifiers
4344 (common-pointer-type): For pointers to arrays take qualifiers from
4346 (build_conditional_expr): Add warnings for lost qualifiers.
4347 (comp-target-types): Allow pointers to arrays with different qualifiers.
4348 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4349 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4350 to PEDWARN_FOR_QUALIFIERS.
4352 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4355 * c-convert.c: Include ubsan.h.
4356 (convert): For real -> integral casts and
4357 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4358 instead instrument the float cast directly.
4360 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4362 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4363 c_finish_stmt_expr): Remove NULL last argument from
4364 create_tmp_var_raw and create_tmp_var calls.
4365 * c-array-notation.c (fix_builtin_array_notation_fn,
4366 build_array_notation_expr, fix_conditional_array_notations_1,
4367 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4369 2014-11-28 Marek Polacek <polacek@redhat.com>
4372 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4373 convert the right operand to integer type.
4375 2014-11-25 Marek Polacek <polacek@redhat.com>
4378 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4379 for inline functions.
4381 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4384 * c-typeck.c (build_array_ref): Adjust
4385 convert_vector_to_pointer_for_subscript caller. If it returns true,
4386 call non_lvalue_loc on the result.
4388 2014-11-11 Richard Biener <rguenther@suse.de>
4390 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4393 2014-11-10 Andi Kleen <ak@linux.intel.com>
4396 * c-parser.c (c_parser_statement_after_labels): Call
4398 (c_parser_if_statement): Dito.
4399 (c_parser_switch_statement): Dito.
4400 (c_parser_while_statement): Dito.
4401 (c_parser_do_statement): Dito.
4402 (c_parser_for_statement): Dito.
4403 * c-typeck.c (c_finish_loop): Dito.
4405 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4407 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4408 OPT_Wshift_count_overflow in the warnings.
4410 2014-10-30 Marek Polacek <polacek@redhat.com>
4412 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4413 print the stripped version as well, if they're not the same.
4415 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4417 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4420 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4422 * c-decl.c: Adjust include files.
4423 * c-parser.c: Ditto.
4425 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4426 Tom Tromey <tromey@redhat.com>
4428 * c-tree.h (enum c_oracle_request): New.
4429 (c_binding_oracle_function): New typedef.
4430 (c_binding_oracle, c_pushtag, c_bind): Declare.
4431 * c-decl.c (c_binding_oracle): New global.
4432 (I_SYMBOL_CHECKED): New macro.
4433 (i_symbol_binding): New function.
4434 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4435 (I_TAG_CHECKED): New macro.
4436 (i_tag_binding): New function.
4437 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4438 (I_LABEL_CHECKED): New macro.
4439 (i_label_binding): New function.
4440 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4441 (c_print_identifier): Save and restore c_binding_oracle.
4442 (c_pushtag, c_bind): New functions.
4444 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4446 * c-typeck.c: Adjust include files.
4448 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4451 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4452 initialization here...
4453 (c_initialize_diagnostics): ... but here. Set defaults after
4454 building pretty-printer.
4456 2014-10-23 Marek Polacek <polacek@redhat.com>
4459 * c-decl.c (pop_scope): Don't print warning in external_scope.
4461 2014-10-19 Marek Polacek <polacek@redhat.com>
4464 * c-typeck.c (output_init_element): Allow initializing objects with
4465 static storage duration with compound literals even in C99 and add
4468 2014-10-17 Marek Polacek <polacek@redhat.com>
4471 * c-typeck.c (digest_init): Allow initializing objects with static
4472 storage duration with compound literals even in C99 and add pedwarn
4475 2014-10-17 Marek Polacek <polacek@redhat.com>
4478 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4479 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4480 error multiple times. Print the type.
4482 2014-10-17 Marek Polacek <polacek@redhat.com>
4485 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4488 2014-10-17 Marek Polacek <polacek@redhat.com>
4490 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4491 (start_function): Use OPT_Wimplicit_int instead of 0.
4492 (store_parm_decls_oldstyle): Likewise.
4494 2014-10-17 Alan Modra <amodra@gmail.com>
4497 * c-decl.c (merge_decls): Don't merge section name or tls model
4498 to newdecl symtab node, instead merge to olddecl. Override
4499 existing olddecl section name. Set tls_model for all thread-local
4500 vars, not just OMP thread-private ones. Remove incorrect comment.
4502 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4504 * c-decl.c: Adjust include files.
4506 2014-10-14 DJ Delorie <dj@redhat.com>
4508 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4509 (c_token_starts_typename): Check all __intN, not just __int128.
4510 (c_token_starts_declspecs): Likewise.
4511 (c_parser_declspecs): Likewise.
4512 (c_parser_attribute_any_word): Likewise.
4513 (c_parser_objc_selector): Likewise.
4514 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4515 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4517 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4519 (finish_declspecs): Likewise.
4521 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4523 * c-parser.c (c_parser_all_labels): New function to replace
4525 (c_parser_statement): Call the new function.
4527 2014-10-09 Marek Polacek <polacek@redhat.com>
4530 * c-typeck.c (pop_init_level): Don't warn about initializing
4533 2014-10-07 Marek Polacek <polacek@redhat.com>
4536 * c-decl.c (header_for_builtin_fn): New function.
4537 (implicitly_declare): Suggest which header to include.
4539 2014-10-07 Marek Polacek <polacek@redhat.com>
4541 * c-convert.c (convert): Use error_operand_p.
4542 * c-typeck.c (require_complete_type): Likewise.
4543 (really_atomic_lvalue): Likewise.
4544 (digest_init): Likewise.
4545 (handle_omp_array_sections_1): Likewise.
4547 2014-10-03 Marek Polacek <polacek@redhat.com>
4550 * c-decl.c (pop_scope): Don't warn about "inline function declared
4551 but never defined" for functions marked with gnu_inline attribute.
4553 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4556 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4557 on low_bound and length.
4559 2014-09-24 Marek Polacek <polacek@redhat.com>
4563 * c-parser.c: Don't define CPP_KEYWORD.
4564 (c_parser_switch_statement): Pass original type to c_finish_case.
4565 * c-tree.h (c_finish_case): Update declaration.
4566 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4567 conditionally to c_do_switch_warnings.
4569 2014-09-03 Marek Polacek <polacek@redhat.com>
4572 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4575 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4576 Balaji V. Iyer <balaji.v.iyer@intel.com>
4577 Igor Zamyatin <igor.zamyatin@intel.com>
4579 * c-parser.c (c_parser_cilk_for): New function.
4580 (c_parser_cilk_grainsize): Likewise.
4581 (c_get_temp_regvar): Likewise.
4582 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4583 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4584 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4585 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4588 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4590 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4591 with using HOST_WIDE_INT without truncation to 'int'
4593 2014-08-22 Marek Polacek <polacek@redhat.com>
4596 * c-typeck.c (parser_build_binary_op): Adjust call to
4597 warn_logical_not_parentheses.
4599 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4602 * c-parser.c (c_parser_array_notation): Check for correct
4603 type of an array added.
4605 2014-08-19 Marek Polacek <polacek@redhat.com>
4608 * c-typeck.c (build_binary_op): If either operand of a comparison
4609 is a boolean expression, call maybe_warn_bool_compare.
4611 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4614 * c-typeck.c (build_c_cast): Do a conversion even when the
4615 TYPE_MAIN_VARIANTs are the same.
4617 2014-08-19 Marek Polacek <polacek@redhat.com>
4619 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4620 pedwarn_c99 instead of pedwarn.
4621 (grokfield): Likewise.
4622 (warn_defaults_to): New function.
4623 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4624 Unconditionally call pedwarn_c99 instead of pedwarn.
4625 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4626 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4627 check flag_isoc11 before.
4628 * c-errors.c (pedwarn_c99): Change the return type to bool.
4629 Handle -Wc99-c11-compat.
4630 * c-parser.c (disable_extension_diagnostics): Handle
4631 warn_c99_c11_compat.
4632 (restore_extension_diagnostics): Likewise.
4633 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4634 instead of pedwarn, don't check flag_isoc11 before.
4635 (c_parser_declspecs): Likewise.
4636 (c_parser_alignas_specifier): Likewise.
4637 (c_parser_alignof_expression): Likewise.
4638 (c_parser_generic_selection): Likewise.
4639 * c-tree.h (pedwarn_c99): Update declaration.
4640 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4643 2014-08-19 Marek Polacek <polacek@redhat.com>
4645 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4647 * c-errors.c: Include "opts.h".
4648 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4649 * c-parser.c (disable_extension_diagnostics): Handle negative value
4650 of warn_c90_c99_compat, too.
4651 (restore_extension_diagnostics): Likewise.
4652 (c_parser_compound_statement_nostart): Pass
4653 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4655 2014-08-12 Marek Polacek <polacek@redhat.com>
4657 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4659 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4661 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4663 2014-08-10 Marek Polacek <polacek@redhat.com>
4666 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4667 Call pedwarn_c90 instead of pedwarn.
4668 (check_bitfield_type_and_width): Likewise.
4669 (declspecs_add_qual): Likewise.
4670 (declspecs_add_type): Likewise.
4671 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4672 Adjust to only call pedwarn_c90.
4673 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4674 pedwarn_c90 instead of pedwarn.
4675 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4676 * c-parser.c (disable_extension_diagnostics): Handle
4677 warn_c90_c99_compat.
4678 (restore_extension_diagnostics): Likewise.
4679 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4680 pedwarn_c90 instead of pedwarn.
4681 (c_parser_initelt): Likewise.
4682 (c_parser_postfix_expression): Likewise.
4683 (c_parser_postfix_expression_after_paren_type): Likewise.
4684 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4685 * c-tree.h: Fix formatting.
4686 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4687 pedwarn_c90 instead of pedwarn.
4689 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4691 * c-typeck.c: Remove include of pointer-set.h.
4693 2014-08-07 Marek Polacek <polacek@redhat.com>
4695 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4697 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4699 * c-typeck.c: Use hash_map instead of pointer_map.
4701 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4703 * c-decl.c: Use hash_set instead of pointer_set.
4705 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4708 * c-array-notation.c (expand_array_notations): Handling
4711 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4714 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4717 2014-07-30 Tom Tromey <tromey@redhat.com>
4719 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4721 (really_start_incremental_init, push_init_level): Initialize
4723 (pop_init_level): Set global designator_depth.
4724 (process_init_element): Check for designated_init attribute.
4726 2014-07-20 Marek Polacek <polacek@redhat.com>
4729 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4730 (implicitly_declare): Pass location to implicit_decl_warning.
4732 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4735 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4736 If non-NULL, call c_parser_check_literal_zero.
4737 (c_parser_check_literal_zero): New function.
4738 (c_parser_postfix_expression_after_primary): Adjust
4739 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4741 2014-07-06 Marek Polacek <polacek@redhat.com>
4744 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4745 * c-tree.h (C_ARRAY_PARAMETER): Define.
4746 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4749 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4750 Chen Gang <gang.chen.5i5j@gmail.com>
4752 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4755 2014-07-01 Marek Polacek <polacek@redhat.com>
4757 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4758 instead of 0 to WARN_FOR_ASSIGNMENT.
4760 2014-07-01 Marek Polacek <polacek@redhat.com>
4763 * c-typeck.c (convert_for_assignment): Pass
4764 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4766 2014-06-30 Marek Polacek <polacek@redhat.com>
4768 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4769 has no_sanitize_undefined attribute.
4771 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4774 * c-array-notation.c (fix_builtin_array_notation_fn):
4775 Check for 0 arguments in builtin call. Check that bultin argument is
4777 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4780 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4782 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4783 qualifiers in __auto_type for atomic types.
4784 (c_parser_typeof_specifier): Discard all type qualifiers in
4785 __typeof__ for atomic types.
4787 2014-06-25 Marek Polacek <polacek@redhat.com>
4790 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4791 the return expression to c_finish_return.
4793 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4795 * c-typeck.c (c_finish_omp_clauses): Make sure
4796 OMP_CLAUSE_LINEAR_STEP has correct type.
4798 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4802 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4804 * c-parser.c (c_parser_omp_for_loop): For
4805 #pragma omp parallel for simd move lastprivate clause from parallel
4806 to for rather than simd.
4808 2014-06-23 Marek Polacek <polacek@redhat.com>
4810 * c-typeck.c (parser_build_binary_op): Don't call
4811 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4813 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4815 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4816 * c-decl.c (merge_decls): Likewise.
4818 2014-06-09 Marek Polacek <polacek@redhat.com>
4821 * c-typeck.c (error_init): Call inform instead of error_at.
4822 (pedwarn_init): Call inform instead of pedwarn.
4823 (warning_init): Call inform instead of warning_at.
4825 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4827 * c-decl.c (merge_decls): Use set_decl_section_name.
4828 (duplicate_decls): Remove node if it exists.
4830 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4833 * c-typeck.c (push_init_level, process_init_element,
4834 pop_init_level): Correct check for zero initialization, move
4835 missing brace warning to respect zero initialization.
4837 2014-06-05 Marek Polacek <polacek@redhat.com>
4840 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4842 2014-06-05 Marek Polacek <polacek@redhat.com>
4845 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4846 on the left hand side operand of a comparison.
4848 2014-06-05 Marek Polacek <polacek@redhat.com>
4851 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4852 Print note only if the warning was printed.
4854 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4857 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4860 2014-06-03 Marek Polacek <polacek@redhat.com>
4863 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4865 * c-tree.h (c_start_case): Update.
4866 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4867 switch condition has boolean value.
4869 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4871 * c-decl.c: Include builtins.h.
4872 * c-parser.c: Likewise.
4874 2014-05-27 Marek Polacek <polacek@redhat.com>
4877 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4878 error and warning calls to error_at and warning_at. Pass location of
4879 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4880 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4881 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4883 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4886 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4887 function parameters.
4889 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4891 * c-decl.c (merge_decls): Preserve symtab node pointers.
4892 (duplicate_decls): Free new decl.
4894 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4896 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4899 * c-parser.c (c_parser_omp_target): Return bool values.
4901 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4903 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4904 num_teams_loc variable to num_thread_limit_loc.
4906 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4908 * c-array-notation.c (expand_array_notations): Use void_node
4909 instead of void_zero_node.
4911 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4913 * c-decl.c (finish_struct): Adjust.
4914 (finish_enum): Likewise.
4916 (record_inline_static): Likewise.
4917 (push_scope): Likewise.
4918 (make_label): Likewise.
4919 (lookup_label_for_goto): Likewise.
4920 (finish_struct): Likewise.
4921 (finish_enum): Likewise.
4922 (store_parm_decls): Likewise.
4923 (c_push_function_context): Likewise.
4924 * c-lang.h: Remove usage of variable_size gty attribute.
4925 * c-parser.c (c_parse_init): Adjust.
4926 (c_parse_file): Likewise.
4928 2014-05-13 Marek Polacek <polacek@redhat.com>
4931 * c-typeck.c (convert_for_assignment): Pass location to
4932 WARN_FOR_ASSIGNMENT instead of input_location.
4934 2014-05-10 Marek Polacek <polacek@redhat.com>
4936 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4937 maybe_warn_string_init.
4938 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4939 maybe_warn_string_init.
4940 * c-tree.h (maybe_warn_string_init): Update declaration.
4941 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4942 Call pedwarn_init with loc instead of with input_location.
4943 (digest_init): Pass init_loc to maybe_warn_string_init.
4944 (pop_init_level): Call pedwarn_init with loc instead of with
4946 (set_init_index): Likewise.
4947 (process_init_element): Likewise.
4949 2014-05-09 Marek Polacek <polacek@redhat.com>
4952 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4953 (c_parser_initelt): Pass location to set_init_label. Pass array index
4954 location to set_init_index.
4955 * c-tree.h (push_init_level): Update declaration.
4956 (pop_init_level): Likewise.
4957 (set_init_index): Likewise.
4958 (set_init_label): Likewise.
4959 * c-typeck.c (error_init): Add location parameter. Call error_at
4961 (digest_init): Pass init_loc to error_init.
4962 (really_start_incremental_init):
4963 (push_init_level): Add location parameter. Pass loc to pop_init_level
4965 (pop_init_level): Likewise.
4966 (set_designator): Add location parameter. Pass loc to pop_init_level,
4967 push_init_level, and error_init.
4968 (set_init_index): Add location parameter. Pass loc to error_init and
4970 (set_init_label): Likewise.
4971 (output_init_element): Pass loc to error_init.
4972 (process_init_element): Pass loc to error_init, pop_init_level,
4973 pedwarn_init, and push_init_level.
4975 2014-05-09 Marek Polacek <polacek@redhat.com>
4978 * c-parser.c (c_parser_attributes): Parse the arguments as an
4979 expression-list if the attribute takes identifier.
4981 2014-05-08 Marek Polacek <polacek@redhat.com>
4984 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4987 2014-05-08 Marek Polacek <polacek@redhat.com>
4990 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4993 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4994 Mike Stump <mikestump@comcast.net>
4995 Richard Sandiford <rdsandiford@googlemail.com>
4997 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4998 (finish_enum): Use wide-int interfaces.
4999 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5000 * c-typeck.c (build_c_cast): Likewise.
5001 (set_nonincremental_init_from_string): Likewise.
5002 (c_tree_equal): Likewise.
5004 2014-05-02 Marek Polacek <polacek@redhat.com>
5007 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5008 Return size_one_node when the type is not complete.
5009 (pointer_diff): Remove comment.
5010 (build_unary_op): Improve error messages.
5012 2014-05-02 Marek Polacek <polacek@redhat.com>
5014 * c-typeck.c (c_finish_return): Separate warning_at calls.
5016 2014-05-02 Marek Polacek <polacek@redhat.com>
5018 * c-tree.h (error_init): Remove declaration.
5019 (pedwarn_init): Likewise.
5020 * c-typeck.c (error_init): Make static and move above.
5021 (pedwarn_init): Likewise.
5022 (warning_init): Move above.
5023 (maybe_warn_string_init): Likewise.
5025 2014-05-01 Jeff Law <law@redhat.com>
5029 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5030 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5033 2014-05-02 Marek Polacek <polacek@redhat.com>
5036 * c-typeck.c (push_init_level): Set constructor_designated to
5037 p->designated for structures.
5039 2014-05-01 Marek Polacek <polacek@redhat.com>
5042 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5043 function-definition has an attribute after the declarator.
5045 2014-05-01 Marek Polacek <polacek@redhat.com>
5048 * c-typeck.c (warning_init): Add location_t parameter. Call
5049 warning_at instead of warning.
5050 (push_init_level): Pass input_location to warning_init.
5051 (add_pending_init): Add location_t parameter. Pass loc to
5053 (set_nonincremental_init): Pass input_location to add_pending_init.
5054 (set_nonincremental_init_from_string): Likewise.
5055 (output_init_element): Pass loc to warning_init and to
5058 2014-05-01 Marek Polacek <polacek@redhat.com>
5061 * c-typeck.c (c_finish_return): Distinguish between label and variable
5062 when warning about returning local address.
5064 2014-05-01 Marek Polacek <polacek@redhat.com>
5067 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5070 2014-05-01 Marek Polacek <polacek@redhat.com>
5073 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5074 instead of 0 to WARN_FOR_QUALIFIERS.
5076 2014-05-01 Marek Polacek <polacek@redhat.com>
5079 * c-typeck.c (default_conversion): Use better location for
5082 2014-04-30 Marek Polacek <polacek@redhat.com>
5084 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5085 also when SANITIZE_FLOAT_DIVIDE is on.
5087 2014-04-30 Marek Polacek <polacek@redhat.com>
5090 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5091 and pedwarn_init. Use loc insted of input_location.
5093 2014-04-30 Marek Polacek <polacek@redhat.com>
5096 * c-typeck.c (build_binary_op): Use location when warning about
5099 2014-04-25 Marek Polacek <polacek@redhat.com>
5102 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5103 always_inline/noinline and hot/cold attributes.
5105 2014-04-25 Marek Polacek <polacek@redhat.com>
5108 * c-parser.c (c_parser_initelt): Pass input_location to
5109 process_init_element.
5110 (c_parser_initval): Pass loc to process_init_element.
5111 * c-tree.h (process_init_element): Adjust declaration.
5112 * c-typeck.c (push_init_level): Pass input_location to
5113 process_init_element.
5114 (pop_init_level): Likewise.
5115 (set_designator): Likewise.
5116 (output_init_element): Add location_t parameter. Pass loc to
5118 (output_pending_init_elements): Pass input_location to
5119 output_init_element.
5120 (process_init_element): Add location_t parameter. Pass loc to
5121 output_init_element.
5123 2014-04-24 Jakub Jelinek <jakub@redhat.com>
5125 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5126 atomic-clause, allow comma in between atomic-clause and
5129 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5132 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5133 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5135 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5138 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5139 create_tmp_var instead build_decl for creating temps.
5140 (build_array_notation_expr): Likewise.
5141 (fix_conditional_array_notations_1): Likewise.
5142 (fix_array_notation_expr): Likewise.
5143 (fix_array_notation_call_expr): Likewise.
5145 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5148 * c-tree.h (c_build_function_call_vec): New prototype.
5149 * c-typeck.c (build_function_call_vec): Don't call
5150 resolve_overloaded_builtin here.
5151 (c_build_function_call_vec): New wrapper function around
5152 build_function_call_vec. Call resolve_overloaded_builtin here.
5153 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5154 Call c_build_function_call_vec instead of build_function_call_vec.
5155 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5156 * c-decl.c (finish_decl): Likewise.
5158 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5161 * c-typeck.c: Use correct format string in cast-qual warning
5163 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5165 * c-decl.c (c_decl_attributes): Use
5166 lang_hooks.types.omp_mappable_type.
5167 * c-typeck.c (c_finish_omp_clauses): Likewise.
5169 2014-03-06 Marek Polacek <polacek@redhat.com>
5172 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5173 of checking tree code.
5175 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5177 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5178 (c_parser_parameter_declaration): Likewise.
5180 2014-02-19 Marek Polacek <polacek@redhat.com>
5183 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5184 Call mark_exp_read on exp.value.
5185 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5186 TREE_ADDRESSABLE on old instead of val.
5187 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5189 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5191 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5192 C_EXPR_APPEND by vec_safe_push.
5193 * c-tree.h (C_EXPR_APPEND): Remove.
5195 2014-01-31 Marek Polacek <polacek@redhat.com>
5198 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5199 build_function_call_vec.
5200 (build_function_call): Likewise.
5201 (build_atomic_assign): Likewise.
5202 (build_function_call_vec): Add arg_loc parameter. Use it.
5203 (convert_arguments): Likewise.
5204 (convert_for_assignment): Rename rhs_loc to expr_loc.
5205 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5206 (c_parser_objc_keywordexpr): Likewise.
5207 (c_parser_postfix_expression_after_primary): Call
5208 build_function_call_vec with expr_loc rather than op_loc.
5209 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5210 build_function_call_vec.
5211 (c_parser_expr_list): Add locations parameter. Fill it with locations
5212 of function arguments.
5213 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5215 2014-01-30 Marek Polacek <polacek@redhat.com>
5218 * c-typeck.c (build_function_call_vec): Use loc parameter.
5219 (convert_arguments): Add location parameter. Use it.
5220 (ep_convert_and_check): Likewise.
5221 (build_atomic_assign): Adjust convert_for_assignment call.
5222 (build_modify_expr): Likewise.
5223 (digest_init): Likewise.
5224 (c_finish_return): Likewise.
5225 (build_conditional_expr): Adjust ep_convert_and_check calls.
5226 (convert_for_assignment): Add rhs_loc parameter. Use it.
5227 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5230 2014-01-30 Richard Biener <rguenther@suse.de>
5233 * c-typeck.c (build_function_call_vec): Do not replace calls
5234 to a function via an incompatible type with a runtime abort.
5236 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5238 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5239 flag_enable_cilkplus with flag_cilkplus.
5240 (c_parser_direct_declarator_inner): Likewise.
5241 (c_parser_attribute_any_word): Likewise.
5242 (c_parser_attributes): Likewise.
5243 (c_parser_compound_statement): Likewise.
5244 (c_parser_statement_after_labels): Likewise.
5245 (c_parser_if_statement): Likewise.
5246 (c_parser_switch_statement): Likewise.
5247 (c_parser_do_statement): Likewise.
5248 (c_parser_for_statement): Likewise.
5249 (c_parser_unary_expression): Likewise.
5250 (c_parser_postfix_expression): Likewise.
5251 (c_parser_postfix_expression_after_primary): Likewise.
5252 (c_parser_postfix_expression_after_primary): Likewise.
5253 (c_parser_omp_clause_name): Likewise.
5254 (c_finish_omp_declare_simd): Likewise.
5255 (c_parser_cilk_verify_simd): Likewise.
5256 * c-typeck.c (build_array_ref): Likewise.
5257 (build_function_call_vec): Likewise.
5258 (convert_arguments): Likewise.
5259 (build_compound_expr): Likewise.
5260 (c_finish_return): Likewise.
5261 (c_finish_if_stmt): Likewise.
5262 (c_finish_loop): Likewise.
5263 (build_binary_op): Likewise.
5265 2014-01-23 Marek Polacek <polacek@redhat.com>
5268 * c-typeck.c (parser_build_binary_op): Use location instead of
5270 (build_binary_op): Pass location to shorten_compare.
5272 2014-01-23 Marek Polacek <polacek@redhat.com>
5275 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5278 2014-01-23 Marek Polacek <polacek@redhat.com>
5281 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5282 of a comma expression.
5283 (emit_side_effect_warnings): Likewise.
5285 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5288 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5289 function to use walk_tree and moved a lot of its functionality to
5290 expand_array_notations.
5291 (expand_array_notations): New function.
5293 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5295 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5296 attribute an attribute without value.
5298 2014-01-23 Jakub Jelinek <jakub@redhat.com>
5301 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5302 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5304 2014-01-22 Marek Polacek <polacek@redhat.com>
5307 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5308 of remove_c_maybe_const_expr on op1 and op2.
5310 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5313 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5314 effects, preevaluate rhs using SAVE_EXPR first.
5316 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5319 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5320 statements with if-elseif statements.
5322 2014-01-06 Marek Polacek <polacek@redhat.com>
5325 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5326 defined bit-field types only in ISO C.
5328 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5330 Update copyright years
5332 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5334 * c-array-notation.c: Use the standard form for the copyright notice.
5336 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5338 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5339 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5340 field in parser is not empty. If not-empty, call the function
5341 c_parser_finish_omp_declare_simd.
5342 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5343 between SIMD-enabled functions and #pragma simd. Added new parameter.
5344 (c_parser_cilk_all_clauses): Modified the usage of the function
5345 c_parser_cilk_clause_vectorlength as mentioned above.
5346 (c_parser_cilk_simd_fn_vector_attrs): New function.
5347 (c_finish_cilk_simd_fn_tokens): Likewise.
5348 (is_cilkplus_vector_p): Likewise.
5349 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5350 "nomask," and "mask" strings in clause name.
5351 (c_parser_omp_all_clauses): Added 3 new case statements:
5352 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5353 PRAGMA_CILK_CLAUSE_NOMASK.
5354 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5355 check for vector attribute and if so call the function
5356 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5357 called the function c_finish_cilk_simd_fn_tokens.
5358 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5359 parser field is non-empty. If so, parse them as you would parse
5360 the omp declare simd pragma.
5361 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5362 Added a check when step is a parameter and flag it as error.
5363 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5364 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5367 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5369 * c-parser.c (c_parser_omp_parallel): Fix description.
5371 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5373 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5374 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5375 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5376 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5378 2013-12-04 Joseph Myers <joseph@codesourcery.com>
5381 * c-parser.c (c_parser_alignas_specifier): Use
5382 c_sizeof_or_alignof_type instead of c_alignof.
5383 (c_parser_alignof_expression): Likewise, with min_alignof
5384 parameter depending on alignof spelling used.
5386 2013-12-04 Marek Polacek <polacek@redhat.com>
5389 * c-decl.c (start_function): Don't warn for missing prototype for
5392 2013-12-03 Marek Polacek <polacek@redhat.com>
5395 * c-decl.c (build_compound_literal): Allow compound literals with
5396 empty initial value.
5398 2013-12-02 Joseph Myers <joseph@codesourcery.com>
5401 * c-typeck.c (build_modify_expr): Diagnose assignment to
5402 expression with array type.
5404 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5407 * c-typeck.c (process_init_element): Do not treat a string as
5408 initializing a whole array when used with a designator for an
5411 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5414 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5415 an inline function following a static declaration.
5417 2013-11-28 Jakub Jelinek <jakub@redhat.com>
5420 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5421 to p_name before calling c_parser_omp_teams instead of after.
5422 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5423 argument. Remove unused p_name variable.
5425 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5426 Jakub Jelinek <jakub@redhat.com>
5428 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5429 external_scope is NULL.
5431 2013-11-27 Tom de Vries <tom@codesourcery.com>
5432 Marc Glisse <marc.glisse@inria.fr>
5435 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5437 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5439 * c-typeck.c: Add required include files from gimple.h.
5441 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5443 * c-decl.c (define_label, shadow_tag_warned)
5444 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5445 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5446 (declspecs_add_type): Remove use of in_system_header macro.
5447 * c-parser.c (c_parser_unary_expression): Likewise.
5448 * c-typeck.c (store_init_value, process_init_element)
5449 (c_start_case): Likewise.
5451 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5454 * c-parser.c (c_parser_set_source_position_from_token): Remove
5455 reference to in_system_header from comment.
5457 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5459 * c-decl.c (grokdeclarator): Update comment to refer to
5460 tree_to_[su]hwi rather than tree_low_cst.
5462 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5464 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5465 tree_to_uhwi throughout.
5467 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5469 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5472 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5474 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5477 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5479 * c-parser.c (c_parser_cilk_simd): New.
5480 (c_parser_cilk_verify_simd): New.
5481 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5482 (c_parser_omp_for_loop): Add case for NE_EXPR.
5483 Set c_break_label for CILK_SIMD.
5484 (c_parser_cilk_clause_vectorlength): New.
5485 (c_parser_cilk_clause_linear): New.
5486 (c_parser_cilk_clause_name): New.
5487 (c_parser_cilk_all_clauses): New.
5488 * c-typeck.c (build_unary_op): Pass location argument to
5490 (build_modify_expr): Same.
5491 (build_asm_expr): Same.
5492 (c_finish_bc_stmt): Error on break/continue in loops.
5494 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5496 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5498 2013-11-14 Diego Novillo <dnovillo@google.com>
5500 * c-decl.c: Include print-tree.h.
5501 Include stor-layout.h.
5504 Include stringpool.h.
5505 * c-lang.c: Include fold-const.h.
5506 * c-parser.c: Include stringpool.h.
5508 Include stor-layout.h.
5510 Include trans-mem.h.
5511 * c-typeck.c: Include stor-layout.h.
5512 Include trans-mem.h.
5516 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5518 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5519 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5521 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5522 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5524 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5525 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5526 (c_parser_declarator, c_parser_direct_declarator_inner)
5527 (c_parser_parameter_declaration, c_parser_type_name): All callers
5529 (c_parser_declaration_or_fndef): Handle declarations with type
5530 determined from the initializer.
5532 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5534 * c-typeck.c: Include gimplify.h.
5536 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5538 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5539 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5541 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5542 or _Thread_local as appropriate in diagnostics.
5543 (build_null_declspecs): Initialize ret->thread_gnu_p.
5544 (declspecs_add_scspec): Handle either __thread or _Thread_local
5545 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5546 pedantic. Do not disallow _Thread_local extern and _Thread_local
5549 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5550 Andrew MacLeod <amacleod@redhat.com>
5552 * c-aux-info.c (gen_type): Handle atomic qualifier.
5553 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5554 qualifiers when compating types.
5555 (shadow_tag_warned): Handle atomic_p in declspecs.
5556 (quals_from_declspecs): Likewise.
5557 (start_decl): Use c_type_promotes_to when promoting argument
5559 (grokdeclarator): Handle _Atomic.
5560 (get_parm_info): Diagnose any qualifier on "void" as only
5562 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5563 comparing types. Use c_type_promotes_to when promoting argument
5565 (finish_function): Use c_type_promotes_to when promoting argument
5567 (build_null_declspecs): Handle atomic_p in declspecs.
5568 (declspecs_add_qual): Handle RID_ATOMIC.
5569 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5570 (c_token_starts_declspecs): Handle RID_ATOMIC.
5571 (c_parser_declspecs): Handle atomic type specifiers and
5573 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5574 from types of expressions with atomic type.
5575 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5576 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5577 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5578 (c_parser_statement_after_labels, c_parser_switch_statement)
5579 (c_parser_for_statement, c_parser_expr_no_commas)
5580 (c_parser_conditional_expression, c_parser_binary_expression)
5581 (c_parser_cast_expression, c_parser_unary_expression)
5582 (c_parser_postfix_expression)
5583 (c_parser_postfix_expression_after_primary, c_parser_expression):
5584 Use convert_lvalue_to_rvalue.
5585 (c_parser_expression_conv, c_parser_expr_list): Document
5586 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5587 (c_parser_objc_synchronized_statement): Use
5588 convert_lvalue_to_rvalue.
5589 (c_parser_objc_selector): Handle RID_ATOMIC.
5590 (c_parser_objc_receiver, c_parser_array_notation): Use
5591 convert_lvalue_to_rvalue.
5592 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5593 _Atomic (type-name).
5594 (struct c_declspecs): Add atomic_p field.
5595 (convert_lvalue_to_rvalue): Declare.
5596 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5597 corresponding atomic types.
5598 (qualify_type): Don't add _Atomic qualifiers from second argument.
5599 (comp_target_types): Do not allow _Atomic mismatches.
5600 (type_lists_compatible_p): Do not remove atomic qualifiers when
5602 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5603 (build_atomic_assign): New functions.
5604 (build_unary_op): Use build_atomic_assign for atomic increment and
5606 (build_conditional_expr): Do not treat _Atomic void as a qualified
5608 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5609 (find_anonymous_field_with_type, convert_to_anonymous_field)
5610 (convert_for_assignment): Do not remove atomic qualifiers when
5612 (digest_init): Do not accept initialization of arrays of atomic
5613 elements by string constants.
5614 (build_asm_expr): Use convert_lvalue_to_rvalue.
5615 (build_binary_op): Do not treat _Atomic void as a qualified
5618 2013-11-06 DJ Delorie <dj@redhat.com>
5620 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5621 both explicit and builtin, print the location of the explicit one.
5623 2013-11-05 Tobias Burnus <burnus@net-b.de>
5625 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5626 c_parser_omp_distribute, c_parser_omp_teams,
5627 c_parser_omp_target, c_parser_omp_declare): Handle
5630 2013-11-03 Marek Polacek <polacek@redhat.com>
5632 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5634 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5636 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5637 check_dup_generic at the end, unless remove is true.
5638 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5640 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5642 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5644 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5645 with decl that is not pointer nor array.
5647 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5649 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5650 a spawning function is found.
5651 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5652 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5653 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5654 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5656 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5657 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5659 (c_finish_return): Added a check to reject _Cilk_spawn in return
5661 (build_cilk_spawn): New function.
5662 (build_cilk_sync): Likewise.
5663 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5665 2013-10-27 Tobias Burnus <burnus@net-b.de>
5668 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5669 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5670 (c_parser_statement_after_labels): Update calls.
5672 2013-10-24 Tobias Burnus <burnus@net-b.de>
5675 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5676 Handle PRAGMA_IVDEP.
5677 (c_parser_statement_after_labels): Update call.
5679 2013-10-24 Marek Polacek <polacek@redhat.com>
5681 * c-parser.c (c_parser_struct_declaration): Add a comment.
5682 (c_parser_declarator): Don't allow _Alignas here.
5684 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5686 * c-parser.c: Include omp-low.h.
5687 * c-typeck.c: Likewise.
5689 2013-10-17 Marek Polacek <polacek@redhat.com>
5692 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5693 Document syntax of the array-declarator.
5694 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5696 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5697 (c_parser_struct_declaration): Likewise.
5698 (c_parser_declarator): Likewise.
5699 (c_parser_direct_declarator_inner): Likewise.
5700 (c_parser_parameter_declaration): Likewise.
5701 (c_parser_type_name): Likewise.
5703 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5705 * c-lang.h (current_omp_declare_target_attribute): New extern
5707 * c-parser.c: Include c-lang.h.
5708 (struct c_parser): Change tokens to c_token *.
5709 Add tokens_buf field. Change tokens_avail type to unsigned int.
5710 (c_parser_consume_token): If parser->tokens isn't
5711 &parser->tokens_buf[0], increment parser->tokens.
5712 (c_parser_consume_pragma): Likewise.
5713 (enum pragma_context): Add pragma_struct and pragma_param.
5714 (c_parser_external_declaration): Adjust
5715 c_parser_declaration_or_fndef caller.
5716 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5717 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5718 Adjust recursive call.
5719 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5721 (c_parser_parameter_declaration): Use pragma_param instead of
5723 (c_parser_compound_statement_nostart, c_parser_label,
5724 c_parser_for_statement): Adjust
5725 c_parser_declaration_or_fndef callers.
5726 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5727 it through to c_parser_conditional_expression.
5728 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5729 pass it through to c_parser_binary_expression. Adjust recursive
5731 (c_parser_binary_expression): Remove prec argument, add
5732 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5733 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5734 binop matches it, use build2 instead of parser_build_binary_op.
5735 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5736 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5737 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5738 Handle pragma_struct and pragma_param the same as pragma_external.
5739 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5740 (c_parser_omp_variable_list): Parse array sections for
5741 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5742 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5743 (c_parser_omp_clause_reduction): Handle user defined reductions.
5744 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5745 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5746 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5747 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5748 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5749 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5750 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5751 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5752 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5753 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5754 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5755 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5756 (c_parser_omp_for_loop): Add CODE argument, pass it through
5757 to c_finish_omp_for. Change last argument to cclauses,
5758 and adjust uses to grab parallel clauses from the array of all
5759 the split clauses. Adjust c_parser_binary_expression,
5760 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5761 (omp_split_clauses): New function.
5762 (c_parser_omp_simd): New function.
5763 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5764 Allow the function to be called also when parsing combined constructs,
5765 and call c_parser_omp_simd when parsing for simd.
5766 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5767 #pragma omp section, require exactly one structured-block instead of
5768 sequence of statements.
5769 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5770 Allow the function to be called also when parsing combined constructs.
5771 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5772 Allow the function to be called also when parsing combined
5774 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5775 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5776 c_parser_omp_teams, c_parser_omp_target_data,
5777 c_parser_omp_target_update, c_parser_omp_target,
5778 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5779 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5780 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5781 (c_parser_omp_construct): Add p_name and mask vars. Handle
5782 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5783 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5784 and c_parser_omp_sections callers.
5785 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5786 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5787 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5788 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5789 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5791 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5792 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5793 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5794 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5795 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5796 * c-typeck.c: Include tree-inline.h.
5797 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5798 handle_omp_array_sections_1, handle_omp_array_sections,
5799 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5800 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5801 user defined reductions.
5802 (c_tree_equal): New function.
5803 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5804 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5805 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5806 c_check_omp_declare_reduction_r): New prototypes.
5807 * c-decl.c (current_omp_declare_target_attribute): New variable.
5808 (c_decl_attributes): New function.
5809 (start_decl, start_function): Use it instead of decl_attributes.
5810 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5811 c_omp_reduction_decl, c_omp_reduction_lookup,
5812 c_check_omp_declare_reduction_r): New functions.
5814 2013-09-25 Tom Tromey <tromey@redhat.com>
5816 * Make-lang.in (c/gccspec.o): Remove.
5817 (CFLAGS-c/gccspec.o): New variable.
5818 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5819 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5820 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5822 2013-09-25 Tom Tromey <tromey@redhat.com>
5824 * Make-lang.in (c/gccspec.o): Don't use subshell.
5826 2013-09-18 Marek Polacek <polacek@redhat.com>
5829 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5830 Remove unnecessary check.
5832 2013-09-18 Marek Polacek <polacek@redhat.com>
5835 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5836 no_sanitize_undefined attribute.
5838 2013-09-13 Kai Tietz <ktietz@redhat.com>
5841 * c-decl.c (c_builtin_function_ext_scope): Remove
5842 wrong assumption that it is never called on prexisting
5845 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5847 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5849 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5851 * c-objc-common.c (c_tree_printer): Tidy.
5853 2013-08-30 Marek Polacek <polacek@redhat.com>
5855 * c-typeck.c (build_binary_op): Add division by zero and shift
5858 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5859 Joseph Myers <joseph@codesourcery.com>
5862 * c-typeck.c (c_common_type): Prefer double_type_node over
5863 other REAL_TYPE types with the same precision.
5864 (convert_arguments): Likewise.
5866 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5868 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5869 (c_initialize_diagnostics): Call a destructor for the early printer.
5871 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5873 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5874 printer initialization.
5876 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5879 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5880 check for truth values.
5881 (expand_array_notation_exprs): Added truth values case. Removed an
5882 unwanted else. Added for-loop to walk through subtrees in default
5885 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5887 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5889 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5891 * c-parser.c (struct c_generic_association): Fix typo.
5893 2013-07-23 Tom Tromey <tromey@redhat.com>
5894 Joseph Myers <joseph@codesourcery.com>
5896 * c-parser.c (struct c_generic_association): New.
5897 (c_generic_association_d): New typedef.
5898 (c_parser_generic_selection): New function.
5899 (c_parser_postfix_expression): Handle RID_GENERIC.
5901 2013-07-13 Jason Merrill <jason@redhat.com>
5904 * c-decl.c (finish_struct): Check for too-large class.
5906 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5909 * c-typeck.c (set_init_index): When folding, check for index overflow.
5911 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5913 * c-parser.c (c_parser_array_notation): Removed rejection of array
5914 notations in an array of function pointers.
5916 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5918 * c-array-notation.c (make_triplet_val_inv): New function.
5919 (create_cmp_incr): Likewise.
5920 (create_array_refs): Likewise.
5921 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5922 Also modularized common parts between functions and called the function.
5923 (build_array_notation_expr): Likewise.
5924 (fix_conditional_array_notations_1): Likewise.
5925 (fix_array_notation_expr): Likewise.
5926 (fix_array_notation_call_expr): Likewise.
5928 2013-06-18 Marek Polacek <polacek@redhat.com>
5931 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5933 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5935 * c-array-notation.c (build_array_notation_expr): Reject array notation
5936 mismatch between LHS and RHS even inside a call_expr. Also, removed
5937 a couple while statements that were dead code.
5939 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5941 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5942 excessive precision expressions in function parameters. Also removed
5943 couple unwanted while statements.
5945 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5947 * c-array-notation.c (expand_array_notation_exprs): Added
5948 ARRAY_NOTATION_REF case.
5950 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5952 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5953 function to c-family/array-notation-common.c.
5954 (is_cilkplus_reduce_builtin): Likewise.
5955 (find_rank): Likewise.
5956 (extract_array_notation_exprs): Likewise.
5957 (replace_array_notations): Likewise.
5958 (find_inv_trees): Likewise.
5959 (replace_inv_trees): Likewise.
5960 (contains_array_notation_expr): Likewise.
5961 (find_correct_array_notation_type): Likewise.
5962 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5963 (struct inv_list): Moved this to c-family/array-notation-common.c.
5964 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5966 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5968 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5969 reduction functions outside the for-loop. Added a check if the fundecl
5970 is non-NULL. Finally, removed an unwanted if-statement, and made the
5973 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5975 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5976 condition of the if-statement matches the rank of else-block and then-
5977 block when array notations are used.
5978 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5979 expression after the entire function body is parsed.
5980 (c_parser_expr_no_commas): Delayed creating array notation expressions
5981 to the end of function parsing.
5982 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5983 whole if-statement instead of just the condition.
5984 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5986 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5989 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5990 array to NULL_TREE if they are unused. Also added a check for the
5991 field to be NULL before its fields are used in future.
5993 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5996 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5997 (build_array_notation_expr): Likewise.
5999 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6001 * c-typeck.c (build_array_ref): Added a check to see if array's
6002 index is greater than one. If true, then emit an error.
6003 (build_function_call_vec): Exclude error reporting and checking
6004 for builtin array-notation functions.
6005 (convert_arguments): Likewise.
6006 (c_finish_return): Added a check for array notations as a return
6007 expression. If true, then emit an error.
6008 (c_finish_loop): Added a check for array notations in a loop
6009 condition. If true then emit an error.
6010 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6011 (build_binary_op): Added a check for array notation expr inside
6012 op1 and op0. If present, we call another function to find correct
6014 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6015 * c-parser.c (c_parser_compound_statement): Check if array
6016 notation code is used in tree, if so, then transform them into
6018 (c_parser_expr_no_commas): Check if array notation is used in LHS
6019 or RHS, if so, then build array notation expression instead of
6021 (c_parser_postfix_expression_after_primary): Added a check for
6022 colon(s) after square braces, if so then handle it like an array
6023 notation. Also, break up array notations in unary op if found.
6024 (c_parser_direct_declarator_inner): Added a check for array
6026 (c_parser_compound_statement): Added a check for array notation in
6027 a stmt. If one is present, then expand array notation expr.
6028 (c_parser_if_statement): Likewise.
6029 (c_parser_switch_statement): Added a check for array notations in
6030 a switch statement's condition. If true, then output an error.
6031 (c_parser_while_statement): Similarly, but for a while.
6032 (c_parser_do_statement): Similarly, but for a do-while.
6033 (c_parser_for_statement): Similarly, but for a for-loop.
6034 (c_parser_unary_expression): Check if array notation is used in a
6035 pre-increment or pre-decrement expression. If true, then expand
6037 (c_parser_array_notation): New function.
6038 * c-array-notation.c: New file.
6039 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6041 2013-05-23 Mike Stump <mikestump@comcast.net>
6043 * c-typeck.c (convert_for_assignment): Handle references to memory
6046 2013-05-16 Jason Merrill <jason@redhat.com>
6048 * Make-lang.in (cc1$(exeext)): Use link mutex.
6050 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6052 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6053 to simply use OPT_Wpointer_arith.
6054 (build_unary_op): Likewise.
6056 2013-04-03 Jakub Jelinek <jakub@redhat.com>
6059 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6060 argument. If set, or it temporarily for parsing of the first
6061 argument into force_folding_builtin_constant_p.
6062 (c_parser_postfix_expression): Adjust callers.
6064 2013-03-21 Richard Biener <rguenther@suse.de>
6066 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6067 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6069 2013-02-12 Marek Polacek <polacek@redhat.com>
6072 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6075 2013-01-24 Jakub Jelinek <jakub@redhat.com>
6078 * c-typeck.c (set_nonincremental_init_from_string): If
6079 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6081 (process_init_element): Likewise.
6083 2012-12-20 Jakub Jelinek <jakub@redhat.com>
6086 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6087 argument, don't call default_function_array_conversion
6088 nor c_fully_fold here.
6089 (c_parser_asm_statement): Adjust callers.
6090 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6091 and outputs here, and call default_function_array_conversion
6092 on inputs that don't need to be addressable.
6094 2012-12-18 Jakub Jelinek <jakub@redhat.com>
6097 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6098 warning require that both c_common_unsigned_type as well as
6099 c_common_signed_type is the same for both mvl and mvr types.
6101 2012-11-16 Diego Novillo <dnovillo@google.com>
6103 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6105 * c-common.c: Use new vec API in vec.h.
6106 * c-common.h: Likewise.
6107 * c-gimplify.c: Likewise.
6108 * c-pragma.c: Likewise.
6109 * c-pretty-print.c: Likewise.
6110 * c-pretty-print.h: Likewise.
6111 * c-semantics.c: Likewise.
6112 * c-decl.c: Likewise.
6113 * c-parser.c: Likewise.
6114 * c-tree.h: Likewise.
6115 * c-typeck.c: Likewise.
6117 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6120 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6122 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6125 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6126 shadows a function, unless the variable is a function or a
6127 pointer-to-function.
6129 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6132 * c-parser.c (struct c_tree_loc_pair): Removed.
6133 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6134 add location_t * and tree * arguments, fill in array of 3
6135 sizeof_arg trees and corresponding locs.
6136 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6137 c_parser_expr_list callers.
6138 (c_parser_postfix_expression_after_primary): Likewise. Pass
6139 array of 3 sizeof_arg trees and locs (corresponding to first
6140 3 arguments) to sizeof_pointer_memaccess_warning.
6142 2012-10-09 Lawrence Crowl <crowl@google.com>
6144 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6145 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6148 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6151 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6154 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
6157 * c-typeck.c: Include c-common.h.
6158 (enum stv_conv): Moved to c-common.h.
6159 (scalar_to_vector): Moved to c-common.c.
6160 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6161 * Make-lang.in: c-typeck.c depends on c-common.h.
6163 2012-10-04 Arnaud Charlet <charlet@adacore.com>
6165 * c-decl.c (c_write_global_declarations): Fix handling of
6168 2012-09-30 Sharad Singhai <singhai@google.com>
6170 * c-decl.c (c_write_global_declarations): Use a different method
6171 to determine if the dump has ben initialized.
6173 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6176 * c-typeck.c (c_cast_expr): When casting to a type requiring
6177 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6180 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6183 * c-typeck.c (build_unary_op): Pass original argument of
6184 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6185 any C_MAYBE_CONST_EXPR, if it has integer operands.
6186 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6187 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6188 to c_objc_common_truthvalue_conversion, then remove any
6189 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6190 c_objc_common_truthvalue_conversion not
6191 c_common_truthvalue_conversion.
6192 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6193 call note_integer_operands for arguments with integer operands
6194 that are not integer constants.
6196 2012-09-13 Jakub Jelinek <jakub@redhat.com>
6199 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6200 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6202 2012-08-31 Jakub Jelinek <jakub@redhat.com>
6205 * c-convert.c (convert): Don't call fold_convert_loc if
6206 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6207 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6208 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6210 2012-08-24 Jakub Jelinek <jakub@redhat.com>
6213 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6214 for nested and empty_ok arguments in the call to
6215 c_parser_declaration_or_fndef.
6217 2012-08-17 Jakub Jelinek <jakub@redhat.com>
6219 * c-tree.h (c_last_sizeof_arg): Declare.
6220 * c-parser.c (struct c_tree_loc_pair): New type.
6221 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6223 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6224 (c_parser_postfix_expression_after_primary): Likewise. Call
6225 sizeof_pointer_memaccess_warning if needed.
6226 (sizeof_ptr_memacc_comptypes): New function.
6227 * c-typeck.c (c_last_sizeof_arg): New global variable.
6228 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6230 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
6232 * c-lang.h (lang_decl): Add variable_size GTY option.
6234 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6236 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6237 * Make-lang.in: Fix dependencies.
6239 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6241 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6242 and add language Makefile hooks.
6243 * config-lang.in: New file.
6244 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6245 add the required "normal" config-lang.in rules.
6246 * c-lang.h: Moved from gcc/ to here.
6247 * c-tree.h: Likewise.
6248 * c-objc-common.c: Likewise.
6249 * c-objc-common.h: Likewise.
6250 * c-typeck.c: Likewise.
6251 * c-convert.c: Likewise.
6252 * c-lang.c: Likewise.
6253 * c-aux-info.c: Likewise.
6254 * c-errors.c: Likewise.
6255 * gccspec.c: Likewise.
6256 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6257 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6259 Copyright (C) 2012-2019 Free Software Foundation, Inc.
6261 Copying and distribution of this file, with or without modification,
6262 are permitted in any medium without royalty provided the copyright
6263 notice and this notice are preserved.