1 2019-08-09 Jakub Jelinek <jakub@redhat.com>
3 * c-parser.c (check_no_duplicate_clause): Simplify using
5 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
6 directive name modifiers.
7 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
10 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
11 check_no_duplicate_clause call. Comment it out, instead emit a
12 warning for duplicate dist_schedule clauses.
14 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
16 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
18 2019-08-08 Jakub Jelinek <jakub@redhat.com>
20 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
21 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
22 instead of generic_head to track duplicates.
24 2019-08-07 Jakub Jelinek <jakub@redhat.com>
26 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
27 (c_parser_omp_clause_use_device_addr): New function.
28 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
29 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
30 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
31 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
32 map or use_device_* clauses.
33 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
34 in OpenMP, require pointer type rather than pointer or array type.
35 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
37 2019-07-31 Jakub Jelinek <jakub@redhat.com>
40 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
41 even if finish is UNKNOWN_LOCATION, just use start as finish in that
44 2019-07-25 Martin Liska <mliska@suse.cz>
45 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
48 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
50 2019-07-25 Martin Liska <mliska@suse.cz>
52 * c-decl.c (merge_decls): Use new macros
53 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
55 2019-07-23 Richard Biener <rguenther@suse.de>
57 PR tree-optimization/83518
58 * gimple-parser.c (c_parser_parse_gimple_body): When we have
59 a CFG also rebuild cgraph edges.
61 2019-07-20 Jakub Jelinek <jakub@redhat.com>
63 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
64 (c_parser_omp_clause_bind): New function.
65 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
66 (OMP_LOOP_CLAUSE_MASK): Define.
67 (c_parser_omp_loop): New function.
68 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
69 loop combined with parallel or teams.
70 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
71 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
73 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
76 * c-decl.c (finish_function): Check targetm.warn_func_return
77 before issuing a -Wreturn-type warning.
79 2019-07-12 Alexandre Oliva <oliva@adacore.com>
81 * gimple-parser.c (c_parser_gimple_try_stmt): New.
82 (c_parser_compound_statement): Call it.
84 2019-07-12 Jakub Jelinek <jakub@redhat.com>
86 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
87 (c_parser_omp_clause_order): New function.
88 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
89 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
90 PRAGMA_OMP_CLAUSE_ORDER.
91 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
93 2019-07-10 Richard Biener <rguenther@suse.de>
95 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
96 _Literal (int *) &x for address literals.
98 2019-07-09 Martin Sebor <msebor@redhat.com>
101 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
103 (field_decl_cmp): Same.
104 * c-parser.c (c_parser_struct_or_union_specifier): Same.
106 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
108 2019-07-09 Martin Sebor <msebor@redhat.com>
111 * c-decl.c: Change class-key from class to struct and vice versa
112 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
113 * gimple-parser.c: Same.
115 2019-07-01 Richard Biener <rguenther@suse.de>
117 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
118 _Literal (char *) &"foo" for address literals pointing to
121 2019-06-24 Martin Sebor <msebor@redhat.com>
123 * c-typeck.c (build_binary_op): Hyphenate floating-point.
125 2019-06-10 Jakub Jelinek <jakub@redhat.com>
127 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
128 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
129 (c_parser_omp_scan_loop_body): New function.
130 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
131 inscan reduction clauses.
132 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
133 non-inscan reductions on the same construct, or inscan reductions with
134 ordered or schedule clauses, or inscan array reductions.
136 2019-06-05 Martin Sebor <msebor@redhat.com>
139 * c-typeck.c (c_finish_return): Only consider functions returning
140 pointers as candidates for -Wreturn-local-addr.
142 2019-06-05 Martin Sebor <msebor@redhat.com>
144 * c-decl.c (start_decl): Adjust quoting and hyphenation
148 (start_function): Same.
149 (declspecs_add_type): Same.
150 * c-parser.c (warn_for_abs): Same.
151 * c-typeck.c (build_binary_op): Same.
153 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
156 * c-parser.c (c_finish_oacc_routine): Rework checking if already
157 marked with an OpenACC 'routine' directive.
160 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
161 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
164 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
165 clauses from "omp declare target" attribute.
167 2019-05-16 Martin Sebor <msebor@redhat.com>
169 * c-decl.c (start_decl): Quote keywords, operators, and
170 types in diagnostics.
172 * c-parser.c (c_parser_asm_statement): Same.
173 (c_parser_conditional_expression): Same.
174 (c_parser_transaction_cancel): Same.
175 * c-typeck.c (c_common_type): Same.
176 (build_conditional_expr): Same.
178 (process_init_element): Same.
179 (build_binary_op): Same.
181 2019-05-17 Richard Biener <rguenther@suse.de>
183 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
184 (c_parser_gimple_unary_expression): Likewise.
185 (c_parser_gimple_parentized_ternary_expression): New function.
187 2019-05-16 Richard Biener <rguenther@suse.de>
189 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
190 (c_parser_gimple_unary_expression): Likewise.
192 2019-05-15 Richard Biener <rguenther@suse.de>
194 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
197 2019-05-14 Richard Biener <rguenther@suse.de>
199 * gimple-parser.c (c_parser_gimple_statement): Remove
200 questionable auto-promotion to VIEW_CONVERT_EXPR.
201 (c_parser_gimple_typespec): Split out from __MEM parsing.
202 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
203 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
204 as __VIEW_CONVERT with -gimple.
206 2019-05-09 Martin Liska <mliska@suse.cz>
208 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
210 (c_parser_gimple_unary_expression): Parse also binary expression
212 (c_parser_gimple_parentized_binary_expression): New function.
214 2019-05-09 Martin Liska <mliska@suse.cz>
216 * gimple-parser.c (struct gimple_parser): Add probability.
217 for gimple_parser_edge.
218 (gimple_parser::push_edge): Add new argument probability.
219 (c_parser_gimple_parse_bb_spec): Parse also probability
221 (c_parser_parse_gimple_body): Set edge probability.
222 (c_parser_gimple_compound_statement): Consume token
223 before calling c_parser_gimple_goto_stmt.
225 (c_parser_gimple_statement): Pass new argument.
226 (c_parser_gimple_goto_stmt): Likewise.
227 (c_parser_gimple_if_stmt): Likewise.
228 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
229 * c-parser.c (c_parser_declaration_or_fndef): Pass
230 hot_bb_threshold argument.
231 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
233 (c_parser_gimple_parse_bb_spec_edge_probability): New.
235 2019-04-26 Jakub Jelinek <jakub@redhat.com>
238 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
239 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
240 (c_parser_do_statement): Likewise.
241 (c_parser_for_statement): Likewise. Formatting fixes.
242 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
243 emit DEBUG_BEGIN_STMTs if needed.
245 2019-04-19 Jakub Jelinek <jakub@redhat.com>
248 * c-typeck.c (struct c_switch): Remove outside_range_p member.
249 (c_start_case): Don't clear it.
250 (do_case): Adjust c_add_case_label caller.
251 (c_finish_case): Adjust c_do_switch_warnings caller.
254 * c-decl.c (merge_decls): If remove is main variant and
255 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
256 variant that has newdecl as TYPE_NAME if any.
258 2019-04-12 Jakub Jelinek <jakub@redhat.com>
261 * c-decl.c (merge_decls): When newdecl's type is its main variant,
262 don't try to remove it from the variant list, but instead assert
265 2019-04-01 Richard Biener <rguenther@suse.de>
268 * c-tree.h (c_get_alias_set): Declare.
269 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
270 * c-objc-common.c (c_get_alias_set): Treat enumeral types
271 as the underlying integer type.
273 2019-03-19 Martin Sebor <msebor@redhat.com>
275 PR tree-optimization/89688
276 * c-decl.c (finish_decl): Call braced_lists_to_string for more
277 kinds of initializers.
279 2019-03-19 Jakub Jelinek <jakub@redhat.com>
282 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
283 return type even if quals_used is 0. Formatting fixes.
285 2019-03-14 Richard Biener <rguenther@suse.de>
287 * c-tree.h (enum c_declspec_il): New.
288 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
290 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
291 Pass start pass and declspec_il to c_parser_parse_gimple_body.
292 (c_parser_declspecs): Adjust.
293 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
294 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
296 (struct gimple_parser): New.
297 (gimple_parser::push_edge): New method.
298 (c_parser_gimple_parse_bb_spec): New helper.
299 (c_parser_parse_gimple_body): Get start pass and IL specification.
300 Initialize SSA and CFG.
301 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
302 Build a gimple_parser parsing state and pass it along.
303 (c_parser_gimple_statement): Change intermittend __PHI internal
304 function argument for the edge.
305 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
306 (c_parser_gimple_goto_stmt): Record edges to build.
307 (c_parser_gimple_if_stmt): Likewise.
308 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
309 (c_parser_gimple_or_rtl_pass_list): Likewise.
311 2019-03-11 Martin Liska <mliska@suse.cz>
313 * c-decl.c (check_for_loop_decls): Wrap an option name
314 in a string format message and fix GNU coding style.
315 * c-parser.c (c_parser_declspecs): Likewise.
317 2019-03-08 Jakub Jelinek <jakub@redhat.com>
319 PR tree-optimization/89550
320 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
322 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
323 or warning returned true.
325 2019-02-28 Jakub Jelinek <jakub@redhat.com>
328 * c-typeck.c (convert_arguments): Call inform_declaration only if
329 the previous warning_at call returned true.
331 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
333 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
334 parameter. Adjust all users.
335 (c_parser_oacc_simple_clause): Replace parser with loc formal
336 parameter. Adjust all users.
338 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
341 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
342 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
344 2019-02-15 Jakub Jelinek <jakub@redhat.com>
347 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
348 before c_decl_attributes rather than after it.
350 2019-02-06 Jakub Jelinek <jakub@redhat.com>
353 * c-parser.c (c_parser_declaration_or_fndef): Don't update
354 DECL_ARGUMENTS of d if it has been defined already. Use a single if
355 instead of 3 nested ifs.
357 2019-02-06 Joseph Myers <joseph@codesourcery.com>
360 * c-decl.c (finish_decl): Do not complete array types for arrays
361 with external linkage not at file scope.
363 2019-02-05 Richard Biener <rguenther@suse.de>
366 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
367 all type variants when not supported.
369 2019-01-30 Jakub Jelinek <jakub@redhat.com>
372 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
373 * c-decl.c (decl_jump_unsafe): Return false for
374 C_DECL_COMPOUND_LITERAL_P decls.
375 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
377 2019-01-29 Jakub Jelinek <jakub@redhat.com>
380 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
384 * c-decl.c (last_fileptr_type): Remove.
385 (last_structptr_types): New variable.
386 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
387 {old,new}rettype instead of the types themselves. Assert
388 last_structptr_types array has the same number of elements
389 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
390 argument oldtype and newtype. Instead of handling
391 just fileptr_type_node specially, handle all builtin_structptr_types
392 pointer nodes. Formatting fix.
394 2019-01-24 Martin Sebor <msebor@redhat.com>
399 * c-decl.c (match_builtin_function_types): Add arguments.
400 (diagnose_mismatched_decls): Diagnose mismatched declarations
401 of built-ins more strictly.
403 2019-01-24 Jakub Jelinek <jakub@redhat.com>
406 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
407 on #pragma omp cancel with different modifiers.
409 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
413 * c-typeck.c (convert_for_assignment): Upate the
414 warn_for_address_or_pointer_of_packed_member call.
416 2019-01-16 Tom Honermann <tom@honermann.net>
417 Jason Merrill <jason@redhat.com>
419 * c-typeck.c (digest_init): Revised the error message produced for
420 ill-formed cases of array initialization with a string literal.
421 (error_init): Make variadic.
423 2019-01-12 Jakub Jelinek <jakub@redhat.com>
425 * c-typeck.c (convert_for_assignment): Fix a comment typo.
427 2019-01-07 Jakub Jelinek <jakub@redhat.com>
430 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
431 if current_function_decl is non-NULL.
433 2019-01-07 Joseph Myers <joseph@codesourcery.com>
437 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
438 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
439 functions declared but never defined only for external scope, not
442 2019-01-07 Jakub Jelinek <jakub@redhat.com>
445 * c-parser.c (c_parser_postfix_expression): Parse
446 __builtin_convertvector.
448 2019-01-01 Jakub Jelinek <jakub@redhat.com>
450 Update copyright years.
452 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
455 * c-typeck.c (convert_for_assignment): Call
456 warn_for_address_or_pointer_of_packed_member.
458 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
460 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
461 a more specific error message (instead of just falling through).
463 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
465 * c-parser.c (c_parser_asm_statement): Keep track of the location each
466 asm qualifier is first seen; use that to give nicer "duplicate asm
467 qualifier" messages. Delete 'quals" variable, instead pass the
468 "is_volatile_ flag to build_asm_stmt directly.
469 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
470 * c-typeck.c (build_asm_stmt): Ditto; adjust.
472 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
474 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
475 "done" boolean variable.
477 2018-12-19 David Malcolm <dmalcolm@redhat.com>
480 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
481 Move from here to gcc-rich-location.h and gcc-rich-location.c.
482 (build_binary_op): Use struct op_location_t and
483 class binary_op_rich_location.
485 2018-12-11 Jakub Jelinek <jakub@redhat.com>
488 * c-convert.c (convert): Call c_fully_fold before calling
489 ubsan_instrument_float_cast.
491 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
493 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
496 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
498 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
499 after asm. Pass a flag for it to build_asm_expr.
500 * c-tree.h (build_asm_expr): Update declaration.
501 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
504 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
507 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
508 combination of volatile and goto, in any order, without repetitions.
510 2018-12-04 James Norris <jnorris@codesourcery.com>
511 Cesar Philippidis <cesar@codesourcery.com>
512 Julian Brown <julian@codesourcery.com>
514 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
517 2018-11-30 Richard Biener <rguenther@suse.de>
519 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
520 _Literal (type) { ... } as empty aggregate or vector constructor.
522 2018-11-29 Martin Sebor <msebor@redhat.com>
525 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
526 (convert_arguments): Add comments. Pass additional argument to
529 2018-11-29 Martin Sebor <msebor@redhat.com>
533 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
535 2018-11-23 Martin Sebor <msebor@redhat.com>
538 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
539 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
541 2018-11-20 Martin Sebor <msebor@redhat.com>
543 * c-parser.c (c_parser_has_attribute_expression): New function.
544 (c_parser_attribute): New function.
545 (c_parser_attributes): Move code into c_parser_attribute.
546 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
548 2018-11-15 Martin Sebor <msebor@redhat.com>
551 * c-decl.c (header_for_builtin_fn): Declare.
552 (diagnose_mismatched_decls): Diagnose declarations of built-in
553 functions without a prototype.
554 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
555 (convert_argument): Same.
556 (convert_arguments): Factor code out into convert_argument.
557 Detect mismatches between built-in formal arguments in calls
558 to built-in without prototype.
559 (build_conditional_expr): Same.
560 (type_or_builtin_type): New function.
561 (convert_for_assignment): Add argument. Conditionally issue
562 warnings instead of errors for mismatches.
564 2018-11-13 David Malcolm <dmalcolm@redhat.com>
566 * c-decl.c: Replace "source_location" with "location_t".
567 * c-tree.h: Likewise.
568 * c-typeck.c: Likewise.
569 * gimple-parser.c: Likewise.
571 2018-11-09 Jakub Jelinek <jakub@redhat.com>
573 * c-parser.c (c_parser_omp_clause_final): Use
574 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
575 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
576 parsing instead of c_parser_paren_condition.
577 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
578 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
579 c_fully_fold instead of c_parser_condition.
580 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
581 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
582 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
583 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
584 c_parser_expr_no_commas instead of c_parser_expression.
586 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
587 reduction clause with inscan modifier.
589 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
590 clauses other than atomic_default_mem_order.
592 2018-11-08 Jakub Jelinek <jakub@redhat.com>
594 * c-parser.c: Include memmode.h.
595 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
596 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
597 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
598 task_reduction clauses.
599 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
600 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
601 section, or lvalue assignment expression.
602 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
603 (c_parser_omp_clause_lastprivate): Parse optional
604 conditional: modifier.
605 (c_parser_omp_clause_hint): Require constant integer expression rather
606 than just integer expression.
607 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
609 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
610 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
611 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
613 (c_parser_omp_clause_depend): Parse iterator modifier and handle
614 iterators. Parse mutexinoutset and depobj kinds.
615 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
617 (c_parser_omp_all_clauses): Likewise. Handle
618 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
619 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
620 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
621 default memory order from requires directive if any. Adjust
622 c_finish_omp_atomic caller.
623 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
624 (c_parser_omp_flush): Parse flush with memory-order-clause.
625 (c_parser_omp_for_loop): Allow NE_EXPR even in
626 OpenMP loops, adjust c_finish_omp_for caller.
627 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
628 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
629 Allow to be called while parsing combined parallel master.
630 Parse combined master taskloop{, simd}.
631 (c_parser_omp_parallel): Parse combined
632 parallel master{, taskloop{, simd}} constructs.
633 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
634 (OMP_TASKGROUP_CLAUSE_MASK): Define.
635 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
636 (OMP_TASKWAIT_CLAUSE_MASK): Define.
637 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
638 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
639 around teams body. Use SET_EXPR_LOCATION.
640 (c_parser_omp_target_data): Allow target data
641 with only use_device_ptr clauses.
642 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
643 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
644 (c_parser_omp_requires): New function.
645 (c_finish_taskloop_clauses): New function.
646 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
647 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
648 declaration. Disallow in_reduction clause when combined with parallel
650 (c_parser_omp_construct): Adjust c_parser_omp_master and
651 c_parser_omp_taskgroup callers.
652 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
654 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
655 like OMP_CLAUSE_REDUCTION.
656 (handle_omp_array_sections): Likewise. Call save_expr on array
657 reductions before calling build_index_type. Handle depend clauses
659 (struct c_find_omp_var_s): New type.
660 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
661 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
662 with static, runtime or auto schedule kinds. Call save_expr for whole
663 array reduction sizes. Diagnose reductions with zero sized elements
664 or variable length structures. Diagnose nogroup clause used with
665 reduction clause(s). Handle depend clause with
666 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
667 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
668 some different type for other kinds. Use build_unary_op with
669 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
670 Handle depend clauses with iterators. Remove no longer needed special
671 case that predetermined const qualified vars may be specified in
672 firstprivate clause. Complain if const qualified vars are mentioned
673 in data-sharing clauses other than firstprivate or shared. Use
674 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
675 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
676 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
677 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
679 2018-10-29 David Malcolm <dmalcolm@redhat.com>
681 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
682 logic for change to name_hint::operator bool.
683 (undeclared_variable): Likewise.
684 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
685 (c_parser_parameter_declaration): Likewise.
687 2018-10-17 Joseph Myers <joseph@codesourcery.com>
689 * c-errors.c (pedwarn_c11): New function.
690 * c-parser.c (disable_extension_diagnostics): Save
691 warn_c11_c2x_compat and set it to 0.
692 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
693 (c_parser_static_assert_declaration_no_semi): Handle
694 _Static_assert without string constant.
695 * c-tree.h (pedwarn_c11): New prototype.
697 2018-10-17 David Malcolm <dmalcolm@redhat.com>
699 * Make-lang.in (selftest-c): New.
700 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
701 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
702 from gcc/Makefile.in.
704 2018-10-02 Richard Biener <rguenther@suse.de>
706 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
708 2018-09-26 Joseph Myers <joseph@codesourcery.com>
711 * c-typeck.c (build_binary_op): Use excess precision for
712 comparisons of integers and floating-point for C11 and later.
714 2018-09-26 Martin Jambor <mjambor@suse.cz>
717 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
720 2018-09-17 David Malcolm <dmalcolm@redhat.com>
722 * c-objc-common.c (range_label_for_type_mismatch::get_text):
723 Update for new param.
724 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
727 2018-09-17 Martin Jambor <mjambor@suse.cz>
730 * c-parser.c: (warn_for_abs): New function.
731 (c_parser_postfix_expression_after_primary): Call it.
733 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
735 * c-typeck.c (digest_init): Shorten overlength strings.
737 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
739 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
741 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
743 * c-decl.c (finish_decl): Call braced_list_to_string here ...
744 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
746 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
748 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
749 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
751 2018-08-27 David Malcolm <dmalcolm@redhat.com>
754 * c-decl.c (implicitly_declare): Update call to
755 maybe_add_include_fixit to suggest overriding the location, as it
757 * c-objc-common.c (c_tree_printer): Update for conversion of
758 show_caret_p to a tri-state.
760 2018-08-27 Martin Liska <mliska@suse.cz>
762 * c-decl.c (locate_old_decl): Use new function
763 fndecl_built_in_p and remove check for FUNCTION_DECL if
765 (diagnose_mismatched_decls): Likewise.
766 (merge_decls): Likewise.
767 (warn_if_shadowing): Likewise.
768 (pushdecl): Likewise.
769 (implicitly_declare): Likewise.
770 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
771 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
772 * c-typeck.c (build_function_call_vec): Likewise.
773 (convert_arguments): Likewise.
775 2018-08-20 David Malcolm <dmalcolm@redhat.com>
778 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
779 (diagnose_mismatched_decls): Likewise, in various places.
780 (warn_if_shadowing): Likewise.
781 (implicit_decl_warning): Likewise.
782 (implicitly_declare): Likewise.
783 (undeclared_variable): Likewise.
784 (declare_label): Likewise.
785 (grokdeclarator): Likewise.
786 (start_function): Likewise.
787 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
788 (c_parser_parameter_declaration): Likewise.
789 (c_parser_binary_expression): Likewise.
790 * c-typeck.c (c_expr_sizeof_expr): Likewise.
791 (parser_build_binary_op): Likewise.
792 (build_unary_op): Likewise.
793 (error_init): Likewise.
794 (pedwarn_init): Likewise.
795 (warning_init): Likewise.
796 (convert_for_assignment): Likewise.
798 2018-08-15 David Malcolm <dmalcolm@redhat.com>
800 * c-objc-common.c: Include "gcc-rich-location.h".
801 (c_tree_printer): Move implemenation of '%T' to...
802 (print_type): ...this new function.
803 (range_label_for_type_mismatch::get_text): New function.
804 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
805 range for the various ic_argpass cases.
806 (class maybe_range_label_for_tree_type_mismatch): New class.
807 (build_binary_op): Use it when calling binary_op_error.
809 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
811 * c-decl.c (start_decl): Do not warn if variables is named as main
812 and is a local variable.
814 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
817 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
818 objects of unknown size.
820 2018-08-13 Martin Sebor <msebor@redhat.com>
822 PR tree-optimization/71625
823 * c-parser.c (c_parser_declaration_or_fndef): Call
824 braced_list_to_string.
826 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
829 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
832 2018-08-01 Martin Sebor <msebor@redhat.com>
834 PR tree-optimization/86650
835 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
836 and TREE_BLOCK (t) from within percent_K_format to this callsite.
838 2018-08-01 Jakub Jelinek <jakub@redhat.com>
841 * c-typeck.c (init_field_decl_cmp): New function.
842 (output_pending_init_elements): Use it for field comparisons
843 instead of pure bit_position comparisons.
845 2018-07-12 Jakub Jelinek <jakub@redhat.com>
847 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
848 type here, instead add "omp declare target implicit" attribute.
849 (finish_decl): Diagnose vars without mappable type here.
851 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
852 Thomas Schwinge <thomas@codesourcery.com>
853 Cesar Philippidis <cesar@codesourcery.com>
855 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
856 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
857 to their non-present_or_* counterparts. Make 'self' an alias to
858 PRAGMA_OACC_CLAUSE_HOST.
859 (c_parser_oacc_data_clause): Update GOMP mappings for
860 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
861 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
862 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
863 Remove support for present_or_* clauses.
864 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
865 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
866 (OACC_DECLARE_CLAUSE_MASK): Likewise.
867 (OACC_DATA_CLAUSE_MASK): Likewise.
868 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
869 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
870 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
871 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
872 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
874 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
876 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
877 * gimple-parser.c (c_parser_gimple_statement): Likewise.
878 (c_parser_gimple_unary_expression): Likewise.
880 2018-06-15 Jakub Jelinek <jakub@redhat.com>
883 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
884 before doing POINTER_DIFF_EXPR.
886 2018-06-07 Marek Polacek <polacek@redhat.com>
889 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
890 for loop initial declarations.
892 2018-05-30 David Pagan <dave.pagan@oracle.com>
895 * c-decl.c (grokdeclarator): Update check for return type warnings.
896 (start_function): Likewise.
897 (finish_function): Likewise.
898 * c-typeck.c (c_finish_return): Update check for return type warnings.
899 Pass OPT_Wreturn_type to pedwarn when appropriate.
901 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
903 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
906 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
908 * gimple-parser.c: Include internal-fn.h.
909 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
910 (c_parser_gimple_call_internal): New function.
911 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
912 Fix typos in comment.
914 2018-05-10 Jakub Jelinek <jakub@redhat.com>
917 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
918 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
920 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
921 fold_offsetof_1, pass argtype as TYPE to it and drop the
924 2018-05-02 David Pagan <dave.pagan@oracle.com>
927 * c-decl.c (old_style_parameter_scope): New function.
928 * c-parser.c (c_parser_postfix_expression): Check for statement
929 expressions in old-style function parameter list declarations.
930 * c-parser.h (old_style_parameter_scope): New extern declaration.
932 2018-04-25 Jakub Jelinek <jakub@redhat.com>
935 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
936 it is not TREE_STATIC.
937 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
938 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
939 its COMPOUND_LITERAL_EXPR_DECL.
941 2018-03-21 Joseph Myers <joseph@codesourcery.com>
943 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
944 where all functions return the same _FloatN or _FloatNx type,
945 treat integer types as _Float64 instead of double.
947 2018-03-21 Jakub Jelinek <jakub@redhat.com>
950 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
951 building vector comparison, diagnose it and return error_mark_node.
953 2018-03-15 Jakub Jelinek <jakub@redhat.com>
956 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
957 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
958 INTEGER_TYPE element type.
960 2018-03-13 David Pagan <dave.pagan@oracle.com>
963 * c-typeck.c (output_init_element): Ensure field initializer
964 expression is always evaluated if there are side effects.
966 2018-03-06 Jakub Jelinek <jakub@redhat.com>
969 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
970 !building_stmt_list_p ().
972 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
975 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
976 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
977 and include the BIND_EXPR in the list of things that need to be
980 2018-02-09 Nathan Sidwell <nathan@acm.org>
983 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
984 to strict_aliasing_warning.
986 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
988 * c-typeck.c (really_start_incremental_init, push_init_level,
989 set_nonincremental_init, output_init_element, process_init_element):
990 Use DECL_UNNAMED_BIT_FIELD.
992 2018-01-31 Marek Polacek <polacek@redhat.com>
995 * c-parser.c (c_parser_compound_statement_nostart): Call
996 expansion_point_location_if_in_system_header.
998 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1001 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1004 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1007 * c-tree.h (decl_constant_value_1): Add a bool argument.
1008 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1009 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1010 (decl_constant_value): Adjust caller.
1011 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1012 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1013 decl_constant_value returns initializer that has BLKmode or
1015 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1017 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1018 Alan Hayward <alan.hayward@arm.com>
1019 David Sherwood <david.sherwood@arm.com>
1021 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1022 TYPE_VECTOR_SUBPARTS.
1024 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1026 Update copyright years.
1028 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1031 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1032 c_parser_conditional_expression, c_parser_cast_expression,
1033 c_parser_sizeof_expression, c_parser_alignof_expression,
1034 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1035 c_parser_transaction_expression): Use set_error () method instead
1036 of setting value member to error_mark_node.
1038 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1040 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1041 and _Float<N>X built-in functions.
1043 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1046 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1047 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1048 incomplete vars rather than after it.
1051 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1052 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1053 and consider empty ones if there are no other stmts. For
1054 -Wunused-value walk all statements before the one only followed by
1057 2017-12-22 Mike Stump <mikestump@comcast.net>
1058 Eric Botcazou <ebotcazou@adacore.com>
1060 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1061 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1062 (c_parser_do_statement): Likewise.
1063 (c_parser_for_statement): Likewise.
1064 (c_parser_statement_after_labels): Adjust calls to above.
1065 (c_parse_pragma_ivdep): New static function.
1066 (c_parser_pragma_unroll): Likewise.
1067 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1068 <PRAGMA_UNROLL>: New case.
1070 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1072 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1073 perform_integral_promotions, digest_init): Replace Yoda conditions
1074 with typical order conditions.
1075 * c-decl.c (check_bitfield_type_and_width): Likewise.
1077 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1079 * c-typeck.c (c_safe_arg_type_equiv_p,
1080 c_safe_function_type_cast_p): New function.
1081 (build_c_cast): Implement -Wcast-function-type.
1083 2017-12-14 Richard Biener <rguenther@suse.de>
1086 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1087 like REALPART_EXPR for the behavior of whether its operand
1090 2017-12-12 Marek Polacek <polacek@redhat.com>
1093 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1095 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1097 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1098 * c-parser.c (add_debug_begin_stmt): New.
1099 (c_parser_declaration_or_fndef): Call it.
1100 (c_parser_compound_statement_nostart): Likewise.
1101 (c_parser_statement_after_labels): Likewise.
1102 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1104 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1106 * c-decl.c (build_compound_literal): Add parameter alignas_align
1107 and set alignment of decl if nonzero.
1108 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1109 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1111 (c_parser_struct_declaration): Update syntax comment.
1112 (c_parser_type_name): Add alignas_ok argument and pass it to
1114 (c_parser_cast_expression): Pass true to c_parser_type_name and
1115 give error if a cast used an _Alignas specifier.
1116 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1117 give error if sizeof (type-name) used an _Alignas specifier.
1118 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1119 give error if _Alignof (type-name) used an _Alignas specifier.
1120 (c_parser_postfix_expression_after_paren_type): Check specified
1121 alignment for a compound literal and pass it to
1122 build_compound_literal.
1123 * c-parser.h (c_parser_type_name): Update prototype.
1124 * c-tree.h (build_compound_literal): Update prototype.
1126 2017-12-07 Martin Sebor <msebor@redhat.com>
1129 * c-decl.c (c_decl_attributes): Look up existing declaration and
1130 pass it to decl_attributes.
1132 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1135 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1136 reserved for use by the implementation.
1138 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1140 * c-decl.c: Include "c-family/c-spellcheck.h".
1142 2017-12-05 Martin Liska <mliska@suse.cz>
1143 Jakub Jelinek <jakub@redhat.com>
1145 * c-typeck.c (pointer_diff): Add new argument and instrument
1146 pointer subtraction.
1147 (build_binary_op): Similar for pointer comparison.
1149 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1152 * c-parser.c: Include tree-iterator.h.
1153 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1154 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1158 * c-tree.h (decl_constant_value_1): Declare.
1159 * c-typeck.c (decl_constant_value_1): New function.
1160 (decl_constant_value): Use it.
1161 * c-fold.c (c_fully_fold_internal): If in_init, use
1162 decl_constant_value_1 instead of decl_constant_value.
1164 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1166 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1168 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1171 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1172 c_switch_covers_all_cases_p returns true.
1174 2017-11-28 Julia Koval <julia.koval@intel.com>
1175 Sebastian Peryt <sebastian.peryt@intel.com>
1177 * Make-lang.in (c/c-array-notation.o): Remove.
1178 * c-array-notation.c: Delete.
1179 * c-decl.c: Remove cilkplus condition.
1180 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1181 c_parser_cilk_verify_simd, c_parser_array_notation,
1182 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1183 c_parser_cilk_simd_fn_vector_attrs,
1184 c_finish_cilk_simd_fn_tokens): Delete.
1185 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1186 (c_parser_direct_declarator_inner): Ditto.
1187 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1188 (c_parser_attributes, c_parser_compound_statement,
1189 c_parser_statement_after_labels, c_parser_if_statement,
1190 c_parser_switch_statement, c_parser_while_statement,
1191 c_parser_do_statement, c_parser_for_statement,
1192 c_parser_unary_expression, c_parser_postfix_expression,
1193 c_parser_postfix_expression_after_primary,
1194 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1195 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1197 * c-typeck.c (build_array_ref, build_function_call_vec,
1199 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1200 c_finish_loop, build_binary_op): Remove cilkplus support.
1202 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1204 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1207 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1209 * Make-lang.in (c.install-plugin): Install backend import library.
1211 2017-11-23 Jakub Jelinek <jakub@redhat.com>
1213 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1214 pragma_stmt context.
1216 2017-11-23 Mike Stump <mikestump@comcast.net>
1217 Eric Botcazou <ebotcazou@adacore.com>
1219 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1221 (c_parser_do_statement): Likewise.
1222 (c_parser_for_statement): Likewise.
1224 2017-11-22 David Malcolm <dmalcolm@redhat.com>
1227 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1228 bool to bool *. Within '%T' handling, if showing an "aka", use
1229 "quoted" param to add appropriate quoting.
1231 2017-11-22 Marek Polacek <polacek@redhat.com>
1236 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1238 2017-11-21 David Malcolm <dmalcolm@redhat.com>
1241 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1242 earlier failed lookups.
1244 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1246 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1247 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1249 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1252 * c-decl.c: Include "c-family/known-headers.h".
1253 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1254 to known-headers.cc.
1255 (class suggest_missing_header): Move to known-header.h.
1256 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1257 than get_c_name_hint.
1259 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1261 * c-decl.c (get_c_name_hint): New function.
1262 (class suggest_missing_header): New class.
1263 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1264 suggest missing headers to the user.
1266 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1268 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1269 Include "c-family/name-hint.h"
1270 (implicit_decl_warning): Convert "hint" from
1271 const char * to name_hint. Pass location to
1272 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1273 warning was not printed.
1274 (undeclared_variable): Likewise for "guessed_id".
1275 (lookup_name_fuzzy): Convert return type from const char *
1276 to name_hint. Add location_t param.
1277 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1278 Include "c-family/name-hint.h"
1279 (c_parser_declaration_or_fndef): Convert "hint" from
1280 const char * to name_hint. Pass location to lookup_name_fuzzy.
1281 (c_parser_parameter_declaration): Likewise.
1283 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1287 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1289 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1290 handle_omp_array_sections): Likewise.
1291 (digest_init): Don't call decl_constant_value_for_optimization.
1292 * c-tree.h (decl_constant_value_for_optimization): Removed.
1293 * c-fold.c (c_fold_array_ref): New function.
1294 (c_fully_fold_internal): Add LVAL argument, propagate it through
1295 recursive calls. For VAR_P call decl_constant_value and
1296 unshare if not LVAL and either optimizing or IN_INIT. Remove
1297 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1298 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1299 (c_fully_fold): Add LVAL argument, pass it through to
1300 c_fully_fold_internal.
1301 (decl_constant_value_for_optimization): Removed.
1303 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1306 * c-parser.c (check_tgmath_function): New function.
1307 (enum tgmath_parm_kind): New enum.
1308 (c_parser_postfix_expression): Handle __builtin_tgmath.
1310 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1312 * c-decl.c (implicit_decl_warning): Update for renaming of
1313 pedwarn_at_rich_loc and warning_at_rich_loc.
1314 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1315 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1316 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1317 (c_parser_struct_or_union_specifier): Likewise for renaming of
1318 pedwarn_at_rich_loc.
1319 (c_parser_parameter_declaration): Likewise for renaming of
1321 * c-typeck.c (build_component_ref): Likewise.
1322 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1323 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1324 (set_init_label): Likewise for renaming of error_at_rich_loc.
1326 2017-10-30 Richard Biener <rguenther@suse.de>
1328 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1331 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1333 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1334 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1336 2017-10-25 David Malcolm <dmalcolm@redhat.com>
1339 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1342 2017-10-25 Jakub Jelinek <jakub@redhat.com>
1345 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1346 newdecl to corresponding __builtin_ if any.
1348 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1351 * c-decl.c (diagnose_mismatched_decls): Use
1352 OPT_Wbuiltin_declaration_mismatch.
1354 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1356 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1357 use it to guard calls to maybe_suggest_missing_token_insertion.
1358 (c_parser_parms_list_declarator): Override default value of new
1359 "type_is_unique" param to c_parser_require.
1360 (c_parser_asm_statement): Likewise.
1361 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1364 2017-10-11 Nathan Sidwell <nathan@acm.org>
1366 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1368 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1370 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1371 operating on trees as wide_ints.
1372 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1373 (c_tree_equal): Likewise.
1375 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1377 * c-decl.c (push_parm_decl): Store c_parm's location into the
1379 (build_c_parm): Add "loc" param and store it within the c_parm.
1380 * c-parser.c (struct c_parser): Add "last_token_location" field.
1381 (c_parser_consume_token): Store location of the token into the
1383 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1384 when handling a FUNCTION_DECL, if it doesn't already have them.
1385 (c_parser_parameter_declaration): Generate a location for the
1386 parameter, and pass it to the call to build_c_parm.
1387 * c-tree.h (struct c_parm): Add field "loc".
1388 (build_c_parm): Add location_t param.
1389 * c-typeck.c (get_fndecl_argument_location): New function.
1390 (inform_for_arg): New function.
1391 (convert_for_assignment): Use inform_for_arg when dealing with
1394 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1396 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1398 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1399 don't SET_DECL_C_BIT_FIELD here.
1402 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1403 instead of trying to set just TREE_READONLY manually.
1405 2017-09-16 Tom de Vries <tom@codesourcery.com>
1408 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1411 2017-09-15 Joseph Myers <joseph@codesourcery.com>
1414 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1416 (build_conditional_expr): For C11, generate result with excess
1417 precision when one argument is an integer and the other is of a
1418 type using excess precision.
1420 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1422 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1424 2017-09-13 Marek Polacek <polacek@redhat.com>
1427 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1428 than expr.original_type.
1430 2017-09-12 Nathan Sidwell <nathan@acm.org>
1432 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1433 resort_sorted_fields): Moved from c-family/c-common.c.
1434 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1436 2017-09-01 Joseph Myers <joseph@codesourcery.com>
1439 * c-typeck.c (build_atomic_assign): Handle argument with excess
1440 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1441 argument passed to build_binary_op and convert_for_assignment but
1442 not for call to c_fully_fold.
1443 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1444 Ensure build_binary_op is called with argument with original
1445 semantic type. Avoid calling c_fully_fold with an
1446 EXCESS_PRECISION_EXPR from build_binary_op.
1448 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1451 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1453 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1454 Alan Hayward <alan.hayward@arm.com>
1455 David Sherwood <david.sherwood@arm.com>
1457 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1458 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1459 m1 and m2 to the signed equivalent of a fixed-point
1462 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1464 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1465 than CAN_HAVE_LOCATION_P when determining whether to use the
1466 location_t value within "value".
1468 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1470 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1471 rather than peeking the location of the first token.
1472 * c-tree.h (c_expr::get_location): New method.
1474 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1476 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1477 to check_function_arguments.
1479 2017-08-18 Marek Polacek <polacek@redhat.com>
1481 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1484 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1487 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1488 (check_bitfield_type_and_width): Don't allow bit-field with
1489 warn_if_not_aligned type.
1491 2017-08-14 Martin Sebor <msebor@redhat.com>
1494 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1496 2017-08-11 Marek Polacek <polacek@redhat.com>
1499 * c-decl.c (pushtag): Only print inform if the warning was printed.
1500 (grokdeclarator): Likewise.
1502 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1504 * c-parser.c (c_parser_error): Rename to...
1505 (c_parser_error_richloc): ...this, making static, and adding
1506 "richloc" parameter, passing it to the c_parse_error call,
1507 rather than calling c_parser_set_source_position_from_token.
1508 (c_parser_error): Reintroduce, reimplementing in terms of the
1509 above, converting return type from void to bool.
1510 (class token_pair): New class.
1511 (struct matching_paren_traits): New struct.
1512 (matching_parens): New typedef.
1513 (struct matching_brace_traits): New struct.
1514 (matching_braces): New typedef.
1515 (get_matching_symbol): New function.
1516 (c_parser_require): Add param MATCHING_LOCATION, using it to
1517 highlight matching "opening" tokens for missing "closing" tokens.
1518 (c_parser_skip_until_found): Likewise.
1519 (c_parser_static_assert_declaration_no_semi): Convert explicit
1520 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1521 class matching_parens, so that the pertinent open parenthesis is
1522 highlighted when there are problems locating the close
1524 (c_parser_struct_or_union_specifier): Likewise.
1525 (c_parser_typeof_specifier): Likewise.
1526 (c_parser_alignas_specifier): Likewise.
1527 (c_parser_simple_asm_expr): Likewise.
1528 (c_parser_braced_init): Likewise, for matching_braces.
1529 (c_parser_paren_condition): Likewise, for matching_parens.
1530 (c_parser_switch_statement): Likewise.
1531 (c_parser_for_statement): Likewise.
1532 (c_parser_asm_statement): Likewise.
1533 (c_parser_asm_operands): Likewise.
1534 (c_parser_cast_expression): Likewise.
1535 (c_parser_sizeof_expression): Likewise.
1536 (c_parser_alignof_expression): Likewise.
1537 (c_parser_generic_selection): Likewise.
1538 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1539 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1540 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1541 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1542 c_parser_skip_until_found call.
1543 (c_parser_objc_class_definition): Use class matching_parens as
1545 (c_parser_objc_method_decl): Likewise.
1546 (c_parser_objc_try_catch_finally_statement): Likewise.
1547 (c_parser_objc_synchronized_statement): Likewise.
1548 (c_parser_objc_at_property_declaration): Likewise.
1549 (c_parser_oacc_wait_list): Likewise.
1550 (c_parser_omp_var_list_parens): Likewise.
1551 (c_parser_omp_clause_collapse): Likewise.
1552 (c_parser_omp_clause_default): Likewise.
1553 (c_parser_omp_clause_if): Likewise.
1554 (c_parser_omp_clause_num_threads): Likewise.
1555 (c_parser_omp_clause_num_tasks): Likewise.
1556 (c_parser_omp_clause_grainsize): Likewise.
1557 (c_parser_omp_clause_priority): Likewise.
1558 (c_parser_omp_clause_hint): Likewise.
1559 (c_parser_omp_clause_defaultmap): Likewise.
1560 (c_parser_oacc_single_int_clause): Likewise.
1561 (c_parser_omp_clause_ordered): Likewise.
1562 (c_parser_omp_clause_reduction): Likewise.
1563 (c_parser_omp_clause_schedule): Likewise.
1564 (c_parser_omp_clause_num_teams): Likewise.
1565 (c_parser_omp_clause_thread_limit): Likewise.
1566 (c_parser_omp_clause_aligned): Likewise.
1567 (c_parser_omp_clause_linear): Likewise.
1568 (c_parser_omp_clause_safelen): Likewise.
1569 (c_parser_omp_clause_simdlen): Likewise.
1570 (c_parser_omp_clause_depend): Likewise.
1571 (c_parser_omp_clause_map): Likewise.
1572 (c_parser_omp_clause_device): Likewise.
1573 (c_parser_omp_clause_dist_schedule): Likewise.
1574 (c_parser_omp_clause_proc_bind): Likewise.
1575 (c_parser_omp_clause_uniform): Likewise.
1576 (c_parser_omp_for_loop): Likewise.
1577 (c_parser_cilk_clause_vectorlength): Likewise.
1578 (c_parser_cilk_clause_linear): Likewise.
1579 (c_parser_transaction_expression): Likewise.
1580 * c-parser.h (c_parser_require): Add param matching_location with
1581 default UNKNOWN_LOCATION.
1582 (c_parser_error): Convert return type from void to bool.
1583 (c_parser_skip_until_found): Add param matching_location with
1584 default UNKNOWN_LOCATION.
1586 2017-08-09 Marek Polacek <polacek@redhat.com>
1588 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1589 * c-tree.h (build_external_ref): Update declaration.
1590 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1591 (build_external_ref): Change the type of a parameter to bool.
1592 (parser_build_binary_op): Use true/false instead of 1/0.
1593 (pointer_diff): Likewise.
1594 (build_modify_expr): Likewise.
1595 (set_designator): Change the type of a parameter to bool.
1596 (set_init_index): Use true/false instead of 1/0.
1597 (set_init_label): Likewise.
1598 (output_init_element): Change the type of a parameter to bool.
1599 (output_pending_init_elements): Use true/false instead of 1/0.
1600 (process_init_element): Likewise.
1601 (build_binary_op): Change the type of a parameter to bool.
1603 2017-08-09 Marek Polacek <polacek@redhat.com>
1606 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1607 Call emit_diagnostic_valist instead of pedwarn.
1608 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1609 Print the relevant types in diagnostics.
1611 2017-08-09 Marek Polacek <polacek@redhat.com>
1614 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1615 build_conditional_expr.
1616 * c-parser.c (c_parser_conditional_expression): Create locations for
1617 EXP1 and EXP2 from their source ranges. Pass the locations down to
1618 build_conditional_expr.
1619 * c-tree.h (build_conditional_expr): Update declaration.
1620 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1621 For -Wsign-compare, also print the types.
1623 2017-08-08 Martin Liska <mliska@suse.cz>
1625 * c-convert.c: Include header files.
1626 * c-typeck.c: Likewise.
1628 2017-08-07 Martin Liska <mliska@suse.cz>
1630 * c-parser.c (c_parser_attributes): Canonicalize name of an
1633 2017-08-02 Marek Polacek <polacek@redhat.com>
1636 * c-parser.c (c_parser_unary_expression): Use set_error.
1640 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1641 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1643 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1644 Martin Liska <mliska@suse.cz>
1646 * c-typeck.c (c_finish_goto_label): Build gimple predict
1649 2017-07-31 Martin Liska <mliska@suse.cz>
1652 * c-convert.c (convert): Guard condition with flag_sanitize_p
1653 also with current_function_decl non-null equality.
1654 * c-decl.c (grokdeclarator): Likewise.
1655 * c-typeck.c (build_binary_op): Likewise.
1657 2017-07-25 Marek Polacek <polacek@redhat.com>
1659 * c-decl.c (grokfield): Remove local variable.
1661 2017-07-25 Marek Polacek <polacek@redhat.com>
1664 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1665 macro expansion if the body is in { }.
1666 (c_parser_while_statement): Likewise.
1667 (c_parser_for_statement): Likewise.
1669 2017-07-18 Nathan Sidwell <nathan@acm.org>
1671 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1673 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1675 * c-decl.c (implicitly_declare): When suggesting a missing
1676 #include, provide a fix-it hint.
1678 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1680 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1681 and call that instead.
1682 * c-tree.h (selftest::run_c_tests): New decl.
1684 2017-06-26 Marek Polacek <polacek@redhat.com>
1687 * c-parser.c (c_parser_if_body): Set the location of the
1688 body of the conditional after parsing all the labels. Call
1689 warn_for_multistatement_macros.
1690 (c_parser_else_body): Likewise.
1691 (c_parser_switch_statement): Likewise.
1692 (c_parser_while_statement): Likewise.
1693 (c_parser_for_statement): Likewise.
1694 (c_parser_statement): Add a default argument. Save the location
1695 after labels have been parsed.
1696 (c_parser_c99_block_statement): Likewise.
1698 2017-06-19 Richard Biener <rguenther@suse.de>
1700 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1701 negated _Literals to parse _Literal (int) -1.
1703 2017-06-13 Martin Liska <mliska@suse.cz>
1706 * c-convert.c (convert): Use sanitize_flags_p.
1707 * c-decl.c (grokdeclarator): Likewise.
1708 * c-typeck.c (convert_for_assignment): Likewise.
1709 (c_finish_return): Likewise.
1710 (build_binary_op): Likewise.
1712 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1715 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1716 to sizetype before size_binop.
1718 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1720 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1723 2017-06-06 Marek Polacek <polacek@redhat.com>
1726 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1728 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1730 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1732 * c-parser.c (c_parser_binary_expression): Implement the
1733 -Wsizeof_pointer_div warning.
1734 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1735 from a parenthesized expression.
1736 (c_parser_expr_list): Use c_last_sizeof_loc.
1737 * c-tree.h (c_last_sizeof_loc): New external.
1738 * c-typeck.c (c_last_sizeof_loc): New variable.
1739 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1741 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1744 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1746 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1748 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1751 2017-05-24 Martin Sebor <msebor@redhat.com>
1754 * c-fold.c (c_fully_fold_internal): Adjust.
1755 * c-typeck.c (parser_build_unary_op): Adjust.
1757 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1759 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1760 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1763 2017-05-23 Marek Polacek <polacek@redhat.com>
1765 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1768 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1770 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1771 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1772 it returned invariant. Call tree_invariant_p unconditionally
1773 afterwards to decide whether to return expr or op0.
1775 2017-05-22 Nathan Sidwell <nathan@acm.org>
1777 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1779 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1781 * c-parser.c (c_parser_omp_clause_default): Handle
1782 "OMP_CLAUSE_DEFAULT_PRESENT".
1784 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1786 * config-lang.in (gtfiles): Add c-family/c-format.c.
1788 2017-05-18 Nathan Sidwell <nathan@acm.org>
1790 * c-decl.c (pushdecl_top_level): Delete unused function.
1792 2017-05-18 Marek Polacek <polacek@redhat.com>
1794 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1795 (check_earlier_gotos): Likewise.
1796 (define_label): Likewise.
1797 (pending_xref_error): Likewise.
1798 (smallest_type_quals_location): Likewise.
1799 (grokdeclarator): Likewise.
1800 (grokparms): Likewise.
1801 (identifier_global_value): Likewise.
1802 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1803 (find_init_member): Likewise.
1805 2017-05-18 Marek Polacek <polacek@redhat.com>
1807 * c-decl.c (start_decl): Use false/true instead of 0/1.
1808 (grokdeclarator): Likewise.
1809 (finish_struct): Likewise.
1810 (start_function): Change the return type to bool. Use false/true
1812 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1813 * c-tree.h (start_function): Update.
1814 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1815 (set_designator): Change the return type to bool. Use false/true
1818 2017-05-17 Marek Polacek <polacek@redhat.com>
1820 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1821 * c-typeck.c: Likewise.
1823 2017-05-17 Marek Polacek <polacek@redhat.com>
1826 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1827 DECL_IGNORED_P even for non-static compound literals.
1829 2017-05-17 Martin Liska <mliska@suse.cz>
1831 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1832 use it instead of int type.
1834 2017-05-17 Marek Polacek <polacek@redhat.com>
1836 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1838 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1839 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1840 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1841 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1843 (c_parser_conditional_expression): Likewise.
1844 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1845 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1846 (process_init_element): Likewise.
1847 (build_binary_op): Likewise.
1848 (handle_omp_array_sections_1): Likewise.
1850 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1852 * c-parser.c (c_parser_omp_clause_num_gangs)
1853 (c_parser_omp_clause_num_workers)
1854 (c_parser_omp_clause_vector_length): Merge functions into...
1855 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1858 2017-05-11 Nathan Sidwell <nathan@acm.org>
1860 * gimple-parser.c: Don't #include tree-dump.h.
1862 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1865 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1867 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1870 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1871 incorrect __MEM syntax.
1873 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1876 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1879 2017-05-09 Nathan Sidwell <nathan@acm.org>
1881 * c-tree.h (pushdecl): Declare.
1883 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1885 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1886 with diagnostic_report_diagnostic.
1887 * c-errors.c (pedwarn_c99): Likewise.
1888 (pedwarn_c90): Likewise.
1890 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1893 * c-gimplify.c (c_gimplify_expr): Remove calls to
1894 cilk_gimplifY_call_params_in_spawned_fn.
1896 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1898 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1899 hint for removing extra semicolon.
1901 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1904 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1905 enabled, set specs->type to integer_type_node.
1907 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1909 * c-array-notation.c: Fix typo in comment.
1911 2017-03-29 Marek Polacek <polacek@redhat.com>
1914 * c-decl.c (finish_decl): Check VAR_P.
1916 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1919 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1920 * c-typeck.c (c_mark_addressable): Likewise. Look through
1921 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1923 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1925 2017-03-23 Marek Polacek <polacek@redhat.com>
1927 * c-tree.h: Remove a C_RID_YYCODE reference.
1929 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1932 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1933 optional COMPOUND_EXPR with ubsan instrumentation.
1935 2017-03-17 Marek Polacek <polacek@redhat.com>
1937 * c-parser.c: Add C11 references.
1939 2017-03-15 Marek Polacek <polacek@redhat.com>
1941 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1943 2017-03-11 Marek Polacek <polacek@redhat.com>
1945 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1947 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1949 PR translation/79848
1950 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1952 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1954 2017-03-09 Marek Polacek <polacek@redhat.com>
1957 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1958 parameter declarations with initializers.
1960 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1963 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1966 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1969 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1970 for "may only be used in compound statements" diagnostics, change it
1971 such that the same translatable string is used for all pragmas. For
1972 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1974 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1975 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1976 "may only be used in compound statements" diagnostics, such that the
1977 same translatable string is used for all pragmas.
1979 2017-03-04 Marek Polacek <polacek@redhat.com>
1982 * c-decl.c (implicit_decl_warning): Add missing space.
1984 2017-03-03 Marek Polacek <polacek@redhat.com>
1987 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1988 current_function_prototype_arg_types is error_mark_node. Fix
1989 formatting. Use TREE_VALUE instead of TREE_TYPE.
1991 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1994 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1995 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1996 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2000 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2001 instead of %<_Generic>.
2002 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2003 (c_parser_omp_target_exit_data): Use %<release%> instead of
2006 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2008 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2009 instead of just cond ? "..." : "...".
2010 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2011 for "enter"/"exit" keyword.
2012 (c_finish_oacc_routine): Don't use %s to supply portions of the
2015 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2018 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2019 handle -Wrestrict here.
2020 * c-typeck.c (build_function_call_vec): Adjust
2021 check_function_arguments caller.
2023 2017-02-23 Richard Biener <rguenther@suse.de>
2026 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2027 to initialize c_exprs to return.
2028 (c_parser_gimple_binary_expression): Likewise.
2029 (c_parser_gimple_unary_expression): Likewise.
2030 (c_parser_gimple_postfix_expression): Likewise.
2032 2017-02-22 Marek Polacek <polacek@redhat.com>
2035 * c-typeck.c (convert_arguments): Handle error_mark_node.
2037 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2039 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2040 value of c_parser_parse_ssa_name against error_mark_node and emit
2041 error if ssa name is anonymous and written as default definition.
2043 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2045 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2048 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2051 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2052 ignore #pragma omp target even when not followed by identifier.
2054 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2056 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2057 (c_parser_gimple_unary_expression): Likewise.
2059 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2061 * c-parser.c (c_parser_oacc_declare): Add missing space in
2064 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2067 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2068 set_c_expr_source_range when parsing ssa-name.
2070 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2071 Richard Biener <rguenther@suse.de>
2073 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2074 building IL when arguments are error_mark_node.
2075 (c_parser_gimple_unary_expression): Likewise.
2076 (c_parser_gimple_if_stmt): Likewise.
2077 (c_parser_gimple_switch_stmt): Likewise.
2078 (c_parser_gimple_return_stmt): Likewise.
2079 (c_parser_parse_ssa_name): When name lookup fails do not build
2080 an SSA name. Use undeclared rather than not declared in error
2083 2017-02-09 Marek Polacek <polacek@redhat.com>
2086 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2087 instead of c_parser_skip_until_found.
2089 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2092 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2093 symtab_node::get on automatic variables.
2095 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2096 Chung-Lin Tang <cltang@codesourcery.com>
2098 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2099 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2101 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2103 2017-02-07 Richard Biener <rguenther@suse.de>
2105 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2106 (c_parser_gimple_postfix_expression_after_primary):
2107 Do not use c_build_function_call_vec to avoid folding and promotion.
2110 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2113 * c-decl.c (pop_scope): Pass main_input_filename to
2114 build_translation_unit_decl.
2116 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2118 * c-parser.c: Include "read-rtl-function.h" and
2120 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2121 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2122 production. Update for renaming of field "gimple_pass" to
2123 "gimple_or_rtl_pass". If __RTL was seen, call
2124 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2125 to an auto_timevar, to cope with early exit.
2126 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2127 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2128 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2130 (c_parser_parse_rtl_body): New function.
2131 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2132 (struct c_declspecs): Rename field "gimple_pass" to
2133 "gimple_or_rtl_pass". Add field "rtl_p".
2134 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2135 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2136 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2137 (c_parser_gimple_or_rtl_pass_list): ...this.
2139 2017-01-20 Marek Polacek <polacek@redhat.com>
2142 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2144 2017-01-13 Richard Biener <rguenther@suse.de>
2146 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2149 2017-01-13 Richard Biener <rguenther@suse.de>
2151 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2152 _Literal ( type-name ) number.
2154 2017-01-12 Richard Biener <rguenther@suse.de>
2156 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2159 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2162 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2165 2017-01-11 Richard Biener <rguenther@suse.de>
2168 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2169 returns on parse errors.
2171 2017-01-04 Marek Polacek <polacek@redhat.com>
2174 * c-parser.c (c_parser_postfix_expression): Mark zero character
2175 constants by setting original_type in c_expr.
2176 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2177 with a zero character constant.
2178 (char_type_p): New function.
2180 2017-01-04 David Malcolm <dmalcolm@redhat.com>
2182 * c-parser.c (c_parser_declaration_or_fndef): Create a
2183 rich_location at init_loc and parse it to start_init.
2184 (last_init_list_comma): New global.
2185 (c_parser_braced_init): Update last_init_list_comma when parsing
2186 commas. Pass it to pop_init_level. Pass location of closing
2187 brace to pop_init_level.
2188 (c_parser_postfix_expression_after_paren_type): Create a
2189 rich_location at type_loc and parse it to start_init.
2190 (c_parser_omp_declare_reduction): Likewise for loc.
2191 * c-tree.h (start_init): Add rich_location * param.
2192 (pop_init_level): Add location_t param.
2193 * c-typeck.c (struct initializer_stack): Add field
2194 "missing_brace_richloc".
2195 (start_init): Add richloc param, use it to initialize
2196 the stack node's missing_brace_richloc.
2197 (last_init_list_comma): New decl.
2198 (finish_implicit_inits): Pass last_init_list_comma to
2200 (push_init_level): When finding missing open braces, add fix-it
2201 hints to the richloc.
2202 (pop_init_level): Add "insert_before" param and pass it
2203 when calling pop_init_level. Add fixits about missing
2204 close braces to any richloc. Use the richloc for the
2205 -Wmissing-braces warning.
2206 (set_designator): Pass last_init_list_comma to pop_init_level.
2207 (process_init_element): Likewise.
2209 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2211 Update copyright years.
2213 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2216 * c-typeck.c (build_function_call_vec): If check_function_arguments
2217 returns true, set TREE_NO_WARNING on CALL_EXPR.
2220 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2221 to *expr instead of overwriting it.
2223 2016-12-20 Richard Biener <rguenther@suse.de>
2225 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2227 (c_parser_gimple_statement): Only build assigns for non-error
2229 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2231 2016-12-14 Martin Jambor <mjambor@suse.cz>
2233 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2235 (c_finish_oacc_routine): Adjusted call to
2236 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2237 to use their new names.
2238 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2240 (c_parser_oacc_update): Likewise.
2241 (c_parser_omp_simd): Likewise.
2242 (c_parser_omp_target_update): Likewise.
2243 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2244 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2246 (c_finish_omp_cancellation_point): Likewise.
2247 * gimple-parser.c: Do not include omp-low.h
2249 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2250 James Norris <jnorris@codesourcery.com>
2252 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2253 EXIT_DATA,WAIT} are not used in compound statements.
2254 (c_parser_oacc_enter_exit_data): Update diagnostics.
2256 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2259 * c-decl.c (diagnose_mismatched_decls): Use
2260 OPT_Wbuiltin_declaration_mismatch here too.
2262 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
2263 Alan Hayward <alan.hayward@arm.com>
2264 David Sherwood <david.sherwood@arm.com>
2266 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2267 (make_label, finish_struct): Likewise.
2269 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2270 Richard Biener <rguenther@suse.de>
2272 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2273 * config-lang.in (gtfiles): Add c/c-parser.h.
2274 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2275 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2276 * c-parser.c (enum c_id_kind, struct c_token,
2277 c_parser_next_token_is, c_parser_next_token_is_not,
2278 c_parser_next_token_is_keyword,
2279 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2281 * c-parser.h: ... new header.
2282 * c-parser.c: Include c-parser.h and gimple-parser.h.
2283 (c_parser_peek_token, c_parser_peek_2nd_token,
2284 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2285 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2286 c_parser_error, c_parser_require, c_parser_skip_until_found,
2287 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2288 c_parser_type_name): Export.
2289 (c_parser_tokens_buf): New function.
2290 (c_parser_error): Likewise.
2291 (c_parser_set_error): Likewise.
2292 (c_parser_declspecs): Handle RID_GIMPLE.
2293 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2294 via c_parser_parse_gimple_body.
2295 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2296 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2297 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2298 c_parser_error, c_parser_require, c_parser_skip_until_found,
2299 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2300 c_parser_type_name): Declare.
2301 (struct c_parser): Declare forward.
2302 (c_parser_tokens_buf): Declare.
2303 (c_parser_error): Likewise.
2304 (c_parser_set_error): Likewise.
2305 * gimple-parser.c: New file.
2306 * gimple-parser.h: Likewise.
2308 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2311 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2314 2016-09-11 Le-Chun Wu <lcwu@google.com>
2315 Mark Wielaard <mjw@redhat.com>
2317 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2318 to the given -Wshadow= variant.
2320 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2322 * c-typeck.c: Include memmodel.h.
2324 2016-10-13 Jakub Jelinek <jakub@redhat.com>
2327 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2328 instead of lhd_return_null_tree_v.
2330 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2333 * c-decl.c (smallest_type_quals_location): New static function.
2334 (grokdeclarator): Try to find the correct location for an ignored
2337 2016-09-26 Marek Polacek <polacek@redhat.com>
2340 * c-decl.c (pop_scope): Add gcc_fallthrough.
2342 2016-09-26 Marek Polacek <polacek@redhat.com>
2345 * c-parser.c (struct c_token): Add flags field.
2346 (c_lex_one_token): Pass it to c_lex_with_flags.
2347 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2348 into IFN_FALLTHROUGH.
2349 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2350 attribute fallthrough after a case label or default label.
2351 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2353 2016-09-24 Marek Polacek <polacek@redhat.com>
2356 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2357 have boolean value. Warn about ++/-- on booleans.
2359 2016-09-23 Jakub Jelinek <jakub@redhat.com>
2361 * c-parser.c (incomplete_record_decls): Remove unnecessary
2362 = vNULL initialization of file scope vec.
2364 2016-09-16 Marek Polacek <polacek@redhat.com>
2366 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2368 2016-09-14 Marek Polacek <polacek@redhat.com>
2370 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2371 (fix_array_notation_expr): Likewise.
2372 * c-decl.c (finish_decl): Likewise.
2373 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2374 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2375 (function_to_pointer_conversion): Use false instead of 0.
2376 (convert_lvalue_to_rvalue): Likewise.
2377 (parser_build_unary_op): Likewise.
2378 (build_atomic_assign): Likewise.
2379 (build_unary_op): Change nonconvert parameter type to bool, use
2380 true/false instead of 1/0.
2381 (build_binary_op): Use true instead of 1.
2383 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2385 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2386 of add_fixit_insert to add_fixit_insert_before.
2388 2016-09-13 Marek Polacek <polacek@redhat.com>
2390 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2393 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2396 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2397 COMPOUND_EXPR to warn_for_omitted_condop.
2399 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2401 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2402 c_get_substring_location for this new langhook.
2404 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2407 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2409 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2410 instead of mark_exp_read on low_bound/length expression.
2411 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2412 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2413 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2414 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2415 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2416 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2417 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2418 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2419 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2420 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2421 instead of mark_expr_read.
2422 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2423 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2424 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2425 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2426 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2427 array section bases outside of depend clause, for depend clause
2428 use convert_lvalue_to_rvalue on the base.
2429 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2430 linear, aligned, map, to and from clauses.
2431 (c_omp_clause_copy_ctor): New function.
2433 2016-09-01 Marek Polacek <polacek@redhat.com>
2436 * c-typeck.c (composite_type): Add FALLTHRU comment.
2438 2016-08-31 David Malcolm <dmalcolm@redhat.com>
2440 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2441 to the insertion fixits for "struct", "union", and "enum".
2443 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2445 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2446 rather than add_fixit_misspelled_id.
2447 (undeclared_variable): Likewise.
2448 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2449 now-redundant "here" params from add_fixit_insert method calls.
2450 (c_parser_parameter_declaration): Likewise.
2451 * c-typeck.c (build_component_ref): Remove now-redundant range
2452 param from add_fixit_replace method calls.
2454 2016-08-25 Marek Polacek <polacek@redhat.com>
2456 * c-typeck.c (parser_build_binary_op): Pass LHS to
2457 warn_logical_not_parentheses.
2459 2016-08-25 Marek Polacek <polacek@redhat.com>
2462 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2463 or _FloatN or _FloatNx is not supported.
2464 (finish_declspecs): Set type to integer_type_node when _FloatN or
2465 _FloatNx is not supported.
2467 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2470 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2471 (struct c_declspecs): Add field floatn_nx_idx.
2472 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2473 and _FloatNx type specifiers.
2474 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2475 (c_parser_declspecs, c_parser_attribute_any_word)
2476 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2477 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2478 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2479 narrower than double.
2481 2016-08-12 Jakub Jelinek <jakub@redhat.com>
2482 Martin Liska <mliska@suse.cz>
2485 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2486 % to determine val element to change. Assert that
2487 wchar_bytes * charwidth fits into val array.
2489 2016-08-12 Marek Polacek <polacek@redhat.com>
2492 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2493 (c_parser_postfix_expression): Likewise.
2494 * c-typeck.c (build_unary_op): Adjust fall through comment.
2495 (c_mark_addressable): Likewise.
2497 2016-08-11 Jakub Jelinek <jakub@redhat.com>
2500 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2501 array member through typedef, for orig_qual_indirect == 0 clear
2504 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2507 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2508 this up to selftest::run_c_tests.
2509 (selftest::run_c_tests): New function.
2511 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2513 * c-parser.c (struct oacc_routine_data): Add error_seen and
2514 fndecl_seen members.
2515 (c_finish_oacc_routine): Use these.
2516 (c_parser_declaration_or_fndef): Adjust.
2517 (c_parser_oacc_routine): Likewise. Support more C language
2518 constructs, and improve diagnostics. Move pragma context
2520 (c_parser_pragma): ... here.
2522 * c-parser.c (struct oacc_routine_data): New.
2523 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2525 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2526 declare target" attribute.
2528 2016-08-01 Jan Beulich <jbeulich@suse.com>
2530 * c-fold.c (c_fully_fold_internal): Also emit shift count
2531 warnings for vector types.
2532 * c-typeck.c (build_binary_op): Likewise.
2534 2016-07-29 Marek Polacek <polacek@redhat.com>
2537 * c-decl.c (finish_struct): Rephrase an error message.
2540 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2541 to error node for invalid code.
2544 * c-decl.c (implicitly_declare): Return decl early not only for
2545 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2547 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2550 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2551 on GNU extern inline functions.
2553 2016-07-29 Marek Polacek <polacek@redhat.com>
2556 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2559 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2561 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2563 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2565 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2567 (best_macro_match): Likewise, converting from a typedef to a
2569 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2570 (lookup_name_fuzzy): Update for change of best_macro_match to a
2571 subclass with a ctor that calls cpp_forall_identifiers.
2573 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2575 * c-decl.c (implicit_decl_warning): Update for conversion of
2576 return type of lookup_name_fuzzy to const char *.
2577 (undeclared_variable): Likewise.
2578 (lookup_name_fuzzy): Convert return type from tree to
2580 * c-parser.c (c_parser_declaration_or_fndef): Update for
2581 conversion of return type of lookup_name_fuzzy to const char *.
2582 (c_parser_parameter_declaration): Likewise.
2584 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2586 * c-parser.c (c_parser_oacc_declare): Don't scan for
2588 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2589 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2590 zero-length subarrays.
2592 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2595 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2596 instead of FUZZY_LOOKUP_NAME.
2597 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2598 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2600 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2603 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2605 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2607 * c-parser.c (c_parser_generic_selection): Make type of variable
2609 (c_parser_omp_declare_simd): Likewise.
2611 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2613 * c-decl.c (struct c_struct_parse_info): Change member types
2614 from vec to auto_vec.
2615 (start_struct): Adjust.
2616 (finish_struct): Likewise.
2618 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2621 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2623 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2625 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2626 Move pragma context checking into...
2627 (c_parser_omp_cancellation_point): ... here, and improve
2628 diagnostic messages.
2629 * c-typeck.c (c_finish_omp_cancel)
2630 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2632 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2635 * c-typeck.c (c_build_qualified_type): Don't clear
2636 C_TYPE_INCOMPLETE_VARS for the main variant.
2638 2016-06-28 Martin Sebor <msebor@redhat.com>
2641 * c-typeck.c (output_init_element): Diagnose incompatible types
2642 before non-constant initializers.
2644 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2646 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2648 2016-06-23 Andi Kleen <ak@linux.intel.com>
2650 * Make-lang.in: Add support for autofdo.
2652 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2655 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2656 (implicit_decl_warning): When issuing warnings for implicit
2657 declarations, attempt to provide a suggestion via
2659 (undeclared_variable): Likewise when issuing errors.
2660 (lookup_name_in_scope): Likewise.
2661 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2662 (best_macro_match): New typedef.
2663 (find_closest_macro_cpp_cb): New function.
2664 (lookup_name_fuzzy): New function.
2665 * c-parser.c: Include gcc-rich-location.h.
2666 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2667 (c_keyword_starts_typename): ...this new function.
2668 (c_parser_declaration_or_fndef): When issuing errors about
2669 missing "struct" etc, add a fixit. For other kinds of errors,
2670 attempt to provide a suggestion via lookup_name_fuzzy.
2671 (c_parser_parms_declarator): When looking ahead to detect typos in
2672 type names, also reject CPP_KEYWORD.
2673 (c_parser_parameter_declaration): When issuing errors about
2674 unknown type names, attempt to provide a suggestion via
2676 * c-tree.h (c_keyword_starts_typename): New prototype.
2678 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2681 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2682 c_common_type returns error_mark_node.
2684 2016-06-19 Martin Sebor <msebor@redhat.com>
2687 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2688 __alignof__ (expression).
2690 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2692 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2694 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2696 * c-typeck.c (build_component_ref): Simplify fixit code by
2697 using gcc_rich_location::add_fixit_misspelled_id.
2698 (set_init_label): Likewise.
2700 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2702 * c-parser.c (c_parser_initelt): Provide location of name for new
2703 location_t param of set_init_label.
2704 * c-tree.h (set_init_label): Add location_t param.
2705 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2706 param and use it when issuing error messages about unrecognized
2707 field names. Attempt to provide a fixit hint if appropriate,
2708 otherwise update the error message to provide the type name.
2710 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2713 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2716 2016-06-08 Martin Sebor <msebor@redhat.com>
2717 Jakub Jelinek <jakub@redhat.com>
2721 * c-typeck.c (convert_arguments): Don't promote last argument
2722 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2724 2016-06-08 Marek Polacek <polacek@redhat.com>
2727 * c-decl.c (grokdeclarator): Check TYPE_P.
2730 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2733 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2735 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2736 and structure element reference, capture the location of the
2737 element name token and pass it to build_component_ref.
2738 (c_parser_postfix_expression_after_primary): Likewise for
2739 structure element dereference.
2740 (c_parser_omp_variable_list): Likewise for
2741 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2742 * c-tree.h (build_component_ref): Add location_t param.
2743 * c-typeck.c (build_component_ref): Add location_t param
2744 COMPONENT_LOC. Use it, if available, when issuing hints about
2745 mispelled member names to provide a fixit replacement hint.
2747 2016-06-06 Marek Polacek <polacek@redhat.com>
2750 * c-parser.c (c_parser_direct_declarator): Set location.
2752 2016-06-06 Marek Polacek <polacek@redhat.com>
2754 * c-typeck.c (comptypes_internal): Handle comparisons of
2755 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2756 TYPE_REF_CAN_ALIAS_ALL.
2758 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2760 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2761 arguments as addressable when async clause exists.
2763 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2766 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2767 when combined with target construct.
2769 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2771 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2772 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2774 2016-05-25 Marek Polacek <polacek@redhat.com>
2777 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2780 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2782 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2784 * c-parser.c (c_parser_oacc_declare): Add support for
2785 GOMP_MAP_FIRSTPRIVATE_POINTER.
2786 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2787 argument with enum c_omp_region_type ort.
2788 (handle_omp_array_sections): Likewise. Update call to
2789 handle_omp_array_sections_1.
2790 (c_finish_omp_clauses): Add specific errors and warning messages for
2791 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2792 call to handle_omp_array_sections.
2794 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2796 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2798 2016-05-24 Richard Biener <rguenther@suse.de>
2802 * c-typeck.c (build_array_ref): Do not complain about indexing
2803 non-lvalue vectors. Adjust for function name change.
2805 2016-05-20 Martin Sebor <msebor@redhat.com>
2808 * c-typeck.c (error_init): Use
2809 expansion_point_location_if_in_system_header.
2810 (warning_init): Same.
2812 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2815 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2817 (c_parser_postfix_expression): Likewise.
2818 * c-tree.h (c_expr::set_error): New method.
2819 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2820 that result's range is initialized.
2822 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2824 * c-typeck.c (parser_build_unary_op): Fix formatting.
2826 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2828 * c-decl.c (grokdeclarator): Remove errmsg and use of
2829 targetm.invalid_return_type.
2830 (grokparms): Remove errmsg and use of
2831 targetm.invalid_parameter_type.
2833 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2835 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2836 function return type.
2838 2016-05-12 Marek Polacek <polacek@redhat.com>
2841 * c-decl.c (build_compound_literal): Pass LOC down to
2842 c_incomplete_type_error.
2843 * c-tree.h (require_complete_type): Adjust declaration.
2844 (c_incomplete_type_error): Likewise.
2845 * c-typeck.c (require_complete_type): Add location parameter, pass it
2846 down to c_incomplete_type_error.
2847 (c_incomplete_type_error): Add location parameter, pass it down to
2849 (build_component_ref): Pass location down to c_incomplete_type_error.
2850 (default_conversion): Pass location down to require_complete_type.
2851 (build_array_ref): Likewise.
2852 (build_function_call_vec): Likewise.
2853 (convert_arguments): Likewise.
2854 (build_unary_op): Likewise.
2855 (build_c_cast): Likewise.
2856 (build_modify_expr): Likewise.
2857 (convert_for_assignment): Likewise.
2858 (c_finish_omp_clauses): Likewise.
2860 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2863 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2865 * c-errors.c (pedwarn_c90): Return true if warned.
2866 * c-tree.h (pedwarn_c90): Change return type to bool.
2867 (enum c_declspec_word): Add new enumerator cdw_atomic.
2869 2016-05-11 Marek Polacek <polacek@redhat.com>
2872 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2873 diagnose_mismatched_attributes and call it.
2875 2016-05-10 Marek Polacek <polacek@redhat.com>
2878 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2879 on a declaration following the definition.
2881 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2883 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2884 parse it through to c_parser_c99_block_statement.
2885 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2888 2016-05-04 Marek Polacek <polacek@redhat.com>
2890 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2893 2016-05-04 Marek Polacek <polacek@redhat.com>
2896 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2897 for macro expansions.
2899 2016-05-03 Marek Polacek <polacek@redhat.com>
2902 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2903 check_builtin_function_arguments.
2905 2016-05-03 Richard Biener <rguenther@suse.de>
2907 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2908 the checksum from the previous stage.
2910 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2912 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2913 c_finish_omp_clauses.
2914 (c_parser_omp_all_clauses): Likewise.
2915 (c_parser_oacc_cache): Likewise.
2916 (c_parser_oacc_loop): Likewise.
2917 (omp_split_clauses): Likewise.
2918 (c_parser_omp_declare_target): Likewise.
2919 (c_parser_cilk_all_clauses): Likewise.
2920 (c_parser_cilk_for): Likewise.
2921 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2922 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2924 2016-05-02 Marek Polacek <polacek@redhat.com>
2927 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2930 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2933 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2934 OACC_LOOP_CLAUSE_MASK.
2935 (c_parser_oacc_kernels_parallel): Update call to
2936 c_oacc_split_loop_clauses.
2938 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2940 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2941 argument to build_modify_expr in two cases.
2943 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2945 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2946 warn_for_memset instead of warning directly here.
2948 2016-04-26 Marek Polacek <polacek@redhat.com>
2951 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2953 (c_parser_for_statement): ... here.
2954 (c_parser_if_statement): Use it.
2955 (c_parser_switch_statement): Use it.
2956 (c_parser_while_statement): Use it.
2959 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2961 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2964 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2965 instead of c_finish_cilk_clauses.
2966 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2967 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2968 floating-point variables in the linear clause for Cilk Plus.
2970 2016-04-18 Michael Matz <matz@suse.de>
2972 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2973 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2975 2016-04-15 Marek Polacek <polacek@redhat.com>
2978 * c-typeck.c (build_unary_op): Pass location down to error and
2981 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2984 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2986 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2987 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2988 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2989 Adjust c_parser_pragma callers.
2990 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2992 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2994 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2995 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2996 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2997 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2998 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2999 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3000 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3001 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3003 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3004 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3007 2016-04-13 Marek Polacek <polacek@redhat.com>
3010 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3012 (c_parser_statement): Likewise.
3013 (c_parser_c99_block_statement): Likewise.
3014 (c_parser_while_statement): Likewise.
3015 (c_parser_for_statement): Likewise.
3016 (c_parser_if_body): Don't set IF_P here.
3017 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3018 about dangling else here.
3019 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3020 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3021 warn about dangling else here.
3023 2016-04-04 Marek Polacek <polacek@redhat.com>
3026 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3028 2016-03-31 Marek Polacek <polacek@redhat.com>
3031 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3033 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3036 * c-parser.c (c_parser_postfix_expression): Set the source range
3037 for uses of "__builtin_types_compatible_p".
3039 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3042 * c-typeck.c (composite_type): Don't count void_list_node
3043 into len, if the list is terminated by void_list_node, start
3044 with void_list_node instead of NULL for newargs. Stop
3047 2016-03-16 Marek Polacek <polacek@redhat.com>
3050 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3051 nested functions returning VM types.
3053 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3055 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3056 when calling c_finish_omp_clauses.
3058 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3061 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3064 2016-03-04 Marek Polacek <polacek@redhat.com>
3067 * c-parser.c (c_parser_postfix_expression): Call
3068 c_parser_cast_expression rather than c_parser_postfix_expression.
3070 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3074 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3075 of incomplete decls to error_mark_node.
3077 2016-02-24 Marek Polacek <polacek@redhat.com>
3080 * c-decl.c (finish_decl): Don't update the copy of the type of a
3081 different decl type.
3083 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3086 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3087 in id_kind reclassification.
3089 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3092 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3094 2016-02-16 James Norris <jnorris@codesourcery.com>
3097 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3099 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3101 * c-decl.c (build_null_declspecs): Zero the entire struct.
3104 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3105 callers changed. If nested_p is true, use it to call
3106 finish_implicit_inits.
3107 * c-tree.h (finish_implicit_inits): Declare.
3108 * c-typeck.c (finish_implicit_inits): New function. Move code
3110 (push_init_level): ... here.
3111 (set_designator, process_init_element): Call finish_implicit_inits.
3113 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3116 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3117 arguments for -Waddress warning.
3119 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3122 * c-decl.c (finish_enum): When honoring mode attribute,
3123 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3125 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3128 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3129 all type variants, not just TYPE_MAIN_VARIANT.
3131 2016-01-27 Jakub Jelinek <jakub@redhat.com>
3134 * c-decl.c (c_write_global_declarations_1): Warn with
3135 warn_unused_function if static prototype without definition
3138 2016-01-27 Marek Polacek <polacek@redhat.com>
3141 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3142 to unsigned, if needed. Add -Wsign-compare warning.
3144 2016-01-26 Jakub Jelinek <jakub@redhat.com>
3146 PR tree-optimization/69483
3147 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3149 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3152 * c-tree.h (incomplete_record_decls): Declare.
3153 * c-parser.c (incomplete_record_decls): Define.
3154 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3155 report error if any decl has zero size.
3156 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3157 or enum type to incomplete_record_decls.
3159 2016-01-14 Tom de Vries <tom@codesourcery.com>
3161 PR tree-optimization/68773
3162 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3165 2016-01-14 Marek Polacek <polacek@redhat.com>
3168 * c-decl.c (grokdeclarator): Provide more information for invalid
3171 2016-01-06 David Malcolm <dmalcolm@redhat.com>
3173 * c-parser.c (c_parser_unary_expression): For dereferences, build
3174 a combined location before calling build_indirect_ref, so that
3175 error reports cover the full range, manually updating the c_expr
3178 2016-01-06 Marek Polacek <polacek@redhat.com>
3181 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3182 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3185 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3187 Update copyright years.
3189 2016-01-04 Marek Polacek <polacek@redhat.com>
3192 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3193 optimization to use __atomic_fetch_* built-in if possible.
3195 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3197 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3199 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3202 2015-12-22 Marek Polacek <polacek@redhat.com>
3205 * c-typeck.c (build_component_ref): Warn when acessing elements of
3206 atomic structures or unions.
3208 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3210 * c-typeck.c: Include "gcc-rich-location.h".
3211 (build_binary_op): In the two places that call binary_op_error,
3212 create a gcc_rich_location and populate it with the location of
3213 the binary op and its two operands.
3215 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3217 * c-parser.c (c_parser_statement_after_labels): When calling
3218 c_finish_return, Use the return expression's location if it has
3219 one, falling back to the location of the first token within it.
3220 * c-typeck.c (c_finish_return): When issuing warnings about
3221 the incorrect presence/absence of a return value, issue a note
3222 showing the declaration of the function.
3224 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3226 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3228 (c_parser_peek_nth_token): New function.
3229 (c_parser_peek_conflict_marker): New function.
3230 (c_parser_error): Detect conflict markers and report them as such.
3232 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3234 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3235 to preserve range information for the primary expression
3236 in the call to c_parser_postfix_expression_after_primary.
3238 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3240 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3241 expression location, falling back on the first token location,
3242 rather than always using the latter.
3244 2015-12-16 Marek Polacek <polacek@redhat.com>
3247 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3250 2015-12-15 Marek Polacek <polacek@redhat.com>
3253 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3256 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3258 * c-parser.c (c_parser_alignof_expression): Capture location of
3259 closing parenthesis (if any), or of end of unary expression, and
3260 use it to build a src_range for the expression.
3262 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3265 * c-parser.c (c_parser_get_builtin_args): Add
3266 "out_close_paren_loc" param, and write back to it.
3267 (c_parser_postfix_expression): Capture the closing
3268 parenthesis location for RID_CHOOSE_EXPR,
3269 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3270 RID_BUILTIN_SHUFFLE and use it to set the source range
3271 for such expressions; within RID_BUILTIN_COMPLEX set
3272 the underlying location.
3274 2015-12-07 Marek Polacek <polacek@redhat.com>
3277 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3278 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3280 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3282 * c-tree.h (c_build_va_arg): Adjust prototype.
3283 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3284 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3285 parameter, adjust throughout and issue an error if EXPR is a component
3286 with reverse storage order.
3288 2015-12-02 Jason Merrill <jason@redhat.com>
3290 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3291 (c_fully_fold_internal, decl_constant_value_for_optimization):
3292 Move from c-common.c.
3293 * c-tree.h: Declare decl_constant_value_for_optimization.
3294 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3296 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3299 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3300 following link from declarator to next declarator. Track original
3301 qualified type and pass it to c_build_qualified_type.
3302 * c-typeck.c (c_build_qualified_type): Add arguments
3303 orig_qual_type and orig_qual_indirect.
3305 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3307 * c-parser.c (c_parser_omp_clause_name)
3308 (c_parser_oacc_all_clauses): Alphabetical sorting.
3310 2015-12-02 Jakub Jelinek <jakub@redhat.com>
3313 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3316 2015-12-01 Julian Brown <julian@codesourcery.com>
3317 Cesar Philippidis <cesar@codesourcery.com>
3318 James Norris <James_Norris@mentor.com>
3320 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3321 (c_parser_oacc_clause_use_device): New function.
3322 (c_parser_oacc_all_clauses): Add use_device support.
3323 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3324 (c_parser_oacc_host_data): New function.
3325 (c_parser_omp_construct): Add host_data support.
3326 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3327 * c-typeck.c (c_finish_oacc_host_data): New function.
3328 (c_finish_omp_clauses): Add use_device support.
3330 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3333 * c-decl.c: Set TYPE_PACKED in variants.
3335 2015-11-27 Martin Liska <mliska@suse.cz>
3338 * c-array-notation.c (fix_builtin_array_notation_fn):
3339 Use release_vec_vec instead of vec::release.
3340 (build_array_notation_expr): Likewise.
3341 (fix_conditional_array_notations_1): Likewise.
3342 (fix_array_notation_expr): Likewise.
3343 (fix_array_notation_call_expr): Likewise.
3345 2015-11-27 Jakub Jelinek <jakub@redhat.com>
3348 * c-parser.c (c_parser_compound_statement_nostart): If
3349 last_label is true, use pragma_stmt instead of pragma_compound
3350 as second c_parser_pragma argument.
3351 (c_parser_omp_ordered, c_parser_omp_target_update,
3352 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3353 false as second argument to c_parser_skip_to_pragma_eol after
3354 diagnosing standalone directives used in pragma_stmt context.
3356 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3358 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3359 with "if (ENABLE_OFFLOADING)".
3361 2015-11-23 David Malcolm <dmalcolm@redhat.com>
3364 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3365 for various Objective-C constructs: Class.name syntax,
3366 @selector(), @protocol(), @encode(), and [] message syntax.
3368 2015-11-20 David Malcolm <dmalcolm@redhat.com>
3371 * c-typeck.c (should_suggest_deref_p): New function.
3372 (build_component_ref): Special-case POINTER_TYPE when
3373 generating a "not a structure of union" error message, and
3374 suggest a "->" rather than a ".", providing a fix-it hint.
3376 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3378 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3379 candidate into a new function, find_closest_identifier.
3381 2015-11-19 Marek Polacek <polacek@redhat.com>
3384 * c-typeck.c (parser_build_binary_op): Properly handle
3385 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3387 2015-11-17 David Malcolm <dmalcolm@redhat.com>
3389 * c-parser.c (set_c_expr_source_range): Bulletproof both
3390 overloaded implementations against NULL expr->value.
3391 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3393 (c_parser_unary_expression): Likewise when handling addresses of
3395 (c_parser_postfix_expression): Likewise for statement expressions,
3396 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3397 __builtin_va_arg, and for __builtin_offset_of.
3398 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3399 src_range using the range of the braced initializer.
3400 (c_parser_transaction_expression): Set src_range for "ret" to a
3401 sane pair of values.
3403 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3405 * c-parser.c (c_finish_omp_declare_simd): Look for
3406 "simd" attribute as well. Update error message.
3408 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3410 * c-parser.c (c_parser_omp_declare_target): Adjust.
3412 2015-11-14 Jakub Jelinek <jakub@redhat.com>
3414 * c-typeck.c (c_finish_omp_clauses): Don't mark
3415 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3417 2015-11-14 Marek Polacek <polacek@redhat.com>
3419 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3420 * c-typeck.c: Likewise.
3422 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3424 * c-decl.c (warn_defaults_to): Pass line_table to
3426 * c-errors.c (pedwarn_c99): Likewise.
3427 (pedwarn_c90): Likewise.
3428 * c-parser.c (set_c_expr_source_range): New functions.
3429 (c_token::get_range): New method.
3430 (c_token::get_finish): New method.
3431 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3432 based on the range from the start of the LHS to the end of the
3434 (c_parser_conditional_expression): Likewise, based on the range
3435 from the start of the cond.value to the end of exp2.value.
3436 (c_parser_binary_expression): Call set_c_expr_source_range on
3437 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3438 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3439 based on the cast_loc through to the end of the expr.
3440 (c_parser_unary_expression): Likewise, based on the
3441 op_loc through to the end of op.
3442 (c_parser_sizeof_expression) Likewise, based on the start of the
3443 sizeof token through to either the closing paren or the end of
3445 (c_parser_postfix_expression): Likewise, using the token range,
3446 or from the open paren through to the close paren for
3447 parenthesized expressions.
3448 (c_parser_postfix_expression_after_primary): Likewise, for
3449 various kinds of expression.
3450 * c-tree.h (struct c_expr): Add field "src_range".
3451 (c_expr::get_start): New method.
3452 (c_expr::get_finish): New method.
3453 (set_c_expr_source_range): New decls.
3454 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3455 on ret for prefix unary ops.
3456 (parser_build_binary_op): Likewise, running from the start of
3457 arg1.value through to the end of arg2.value.
3459 2015-11-13 Marek Polacek <polacek@redhat.com>
3462 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3464 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3466 * c-typeck.c: Include spellcheck.h.
3467 (lookup_field_fuzzy_find_candidates): New function.
3468 (lookup_field_fuzzy): New function.
3469 (build_component_ref): If the field was not found, try using
3470 lookup_field_fuzzy and potentially offer a suggestion.
3472 2015-11-12 James Norris <jnorris@codesourcery.com>
3473 Joseph Myers <joseph@codesourcery.com>
3475 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3476 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3477 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3478 and PRAGMA_OMP_CLAUSE_LINK.
3479 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3480 and PRAGMA_OACC_CLAUSE_LINK.
3481 (OACC_DECLARE_CLAUSE_MASK): New definition.
3482 (c_parser_oacc_declare): New function.
3484 2015-11-12 Marek Polacek <polacek@redhat.com>
3487 * c-parser.c (c_parser_for_statement): Reclassify the token in
3490 2015-11-11 Marek Polacek <polacek@redhat.com>
3494 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3495 checking the size of an array.
3497 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3499 * c-array-notation.c: Remove unused header files.
3500 * c-aux-info.c: Likewise.
3501 * c-convert.c: Likewise.
3502 * c-decl.c: Likewise.
3503 * c-errors.c: Likewise.
3504 * c-lang.c: Likewise.
3505 * c-objc-common.c: Likewise.
3506 * c-parser.c: Likewise.
3507 * c-typeck.c: Likewise.
3508 * gccspec.c: Likewise.
3510 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3511 Cesar Philippidis <cesar@codesourcery.com>
3512 James Norris <jnorris@codesourcery.com>
3513 Julian Brown <julian@codesourcery.com>
3514 Nathan Sidwell <nathan@codesourcery.com>
3517 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3519 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3520 (c_parser_pragma): Parse 'acc routine'.
3521 (OACC_ROUTINE_CLAUSE_MARK): Define.
3522 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3524 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3527 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3528 location of the backward-goto to the start of the loop body.
3530 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3533 * c-parser.c (c_parser_while_statement): Finish the loop before
3534 parsing ahead for misleading indentation.
3535 (c_parser_for_statement): Likewise.
3537 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3539 * c-decl.c (finish_struct): If the structure has reverse storage
3540 order, rewrite the type of array fields with scalar component. Call
3541 maybe_apply_pragma_scalar_storage_order on entry.
3542 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3543 errors on bit-fields and reverse SSO here and not...
3544 (c_mark_addressable): ...here.
3545 (output_init_element): Adjust call to initializer_constant_valid_p.
3546 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3548 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3550 * c-decl.c (warn_defaults_to): Update for change in signature
3551 of diagnostic_set_info.
3552 * c-errors.c (pedwarn_c99): Likewise.
3553 (pedwarn_c90): Likewise.
3554 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3555 for textinfo::set_location.
3557 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3558 Thomas Schwinge <thomas@codesourcery.com>
3559 James Norris <jnorris@codesourcery.com>
3561 * c-parser.c (c_parser_omp_clause_name): Add support for
3562 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3563 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3564 default(none) in OpenACC.
3565 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3567 (c_parser_oacc_clause_tile): New function.
3568 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3569 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3570 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3572 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3573 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3575 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3576 (c_parser_oacc_update): Update the error message for missing clauses.
3577 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3578 and OMP_CLAUSE_INDEPENDENT.
3580 2015-11-05 Marek Polacek <polacek@redhat.com>
3583 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3584 deal with pre-evaluation on invalid types.
3586 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3587 Ilya Verbin <ilya.verbin@intel.com>
3589 * c-parser.c: Include context.h and gimple-expr.h.
3590 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3591 monotonic together with nonmonotonic.
3592 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3593 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3594 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3595 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3596 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3597 expressions on combined target teams before the target.
3598 (c_parser_omp_declare_target): If decl has "omp declare target" or
3599 "omp declare target link" attribute, and cgraph or varpool node already
3600 exists, then set corresponding flags. Call c_finish_omp_clauses
3601 in the parenthesized extended-list syntax case.
3602 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3604 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3605 on OMP_CLAUSE_REDUCTION array sections.
3606 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3607 into the constant offset, or for variable low-bound using
3608 POINTER_PLUS_EXPR. For structure element based array sections use
3609 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3610 (c_finish_omp_clauses): Drop generic_field_head, structure
3611 elements are now always mapped even as array section bases,
3612 diagnose same var in data sharing and mapping clauses. Diagnose if
3613 linear step on declare simd is neither a constant nor a uniform
3614 parameter. Look through POINTER_PLUS_EXPR for array section
3615 reductions. Diagnose the same var or function appearing multiple
3616 times on the same directive. Fix up wording for the to clause if t
3617 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3618 modifier on kinds other than dynamic or guided or nonmonotonic
3619 modifier together with ordered clause.
3621 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3622 Chung-Lin Tang <cltang@codesourcery.com>
3624 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3626 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3628 * c-array-notation.c: Reorder #include's and remove duplicates.
3629 * c-aux-info.c: Likewise.
3630 * c-convert.c: Likewise.
3631 * c-decl.c: Likewise.
3632 * c-errors.c: Likewise.
3633 * c-lang.c: Likewise.
3634 * c-objc-common.c: Likewise.
3635 * c-parser.c: Likewise.
3636 * c-typeck.c: Likewise.
3638 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3641 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3642 after calling build_qualified_type.
3644 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3645 Thomas Schwinge <thomas@codesourcery.com>
3646 James Norris <jnorris@codesourcery.com>
3647 Joseph Myers <joseph@codesourcery.com>
3648 Julian Brown <julian@codesourcery.com>
3649 Bernd Schmidt <bschmidt@redhat.com>
3651 * c-parser.c (c_parser_oacc_shape_clause): New.
3652 (c_parser_oacc_simple_clause): New.
3653 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3654 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3656 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3657 James Norris <jnorris@codesourcery.com>
3658 Cesar Philippidis <cesar@codesourcery.com>
3662 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3663 parameters, and handle these. Adjust all users.
3664 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3666 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3668 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3670 (c_finish_omp_construct): Declare function.
3671 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3672 Merge functions into...
3673 (c_finish_omp_construct): ... this new function.
3675 2015-10-22 Richard Biener <rguenther@suse.de>
3677 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3678 before folding a MINUS_EXPR.
3680 2015-10-21 Marek Polacek <polacek@redhat.com>
3683 * c-decl.c (start_function): Warn about vararg functions without
3686 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3688 * c-typeck.c (build_conditional_expr): Use boolean vector
3689 type for vector comparison.
3690 (build_vec_cmp): New.
3691 (build_binary_op): Use build_vec_cmp for comparison.
3693 2015-10-20 Marek Polacek <polacek@redhat.com>
3695 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3697 2015-10-20 Marek Polacek <polacek@redhat.com>
3700 * c-parser.c (c_parser_attributes): Break out of the loop if the
3701 token after an attribute isn't a comma.
3703 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3704 Aldy Hernandez <aldyh@redhat.com>
3706 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3707 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3708 (c_parser_omp_variable_list): Handle structure elements for
3709 map, to and from clauses. Handle array sections in reduction
3710 clause. Formatting fixes.
3711 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3712 if clause modifiers.
3713 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3714 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3715 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3716 c_parser_omp_clause_is_device_ptr): New functions.
3717 (c_parser_omp_clause_ordered): Parse optional parameter.
3718 (c_parser_omp_clause_reduction): Handle array reductions.
3719 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3720 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3722 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3723 (c_parser_omp_clause_depend_sink): New function.
3724 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3725 (c_parser_omp_clause_map): Parse release/delete map kinds and
3726 optional always modifier.
3727 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3728 and c_finish_omp_clauses callers.
3729 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3730 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3731 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3732 (OMP_CRITICAL_CLAUSE_MASK): Define.
3733 (c_parser_omp_critical): Parse critical clauses.
3734 (c_parser_omp_for_loop): Handle doacross loops, adjust
3735 c_finish_omp_for and c_finish_omp_clauses callers.
3736 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3737 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3738 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3739 (c_parser_omp_for): Disallow ordered clause when combined with
3740 distribute. Disallow linear clause when combined with distribute
3741 and not combined with simd.
3742 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3743 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3744 parse clauses and if depend clause is found, don't parse a body.
3745 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3746 Allow target parallel without for after it.
3747 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3748 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3749 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3751 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3752 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3753 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3754 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3756 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3757 defaultmap and is_device_ptr clauses.
3758 (c_parser_omp_target): Parse target parallel and target simd. Set
3759 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3760 and target exit data. Diagnose invalid map kinds.
3761 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3762 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3764 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3766 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3767 (c_parser_omp_taskloop): New function.
3768 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3769 handle PRAGMA_OMP_TASKLOOP.
3770 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3771 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3772 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3773 Add IS_OMP argument, handle structure element bases, diagnose
3774 bitfields, pass IS_OMP recursively, diagnose known zero length
3775 array sections in depend clauses, handle array sections in reduction
3776 clause, diagnose negative length even for pointers.
3777 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3778 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3779 array sections in reduction clause, set
3780 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3781 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3782 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3783 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3785 2015-10-06 Marek Polacek <polacek@redhat.com>
3787 * c-parser.c (c_parser_statement_after_labels): Use
3788 protected_set_expr_location.
3789 (c_parser_omp_clause_num_gangs): Likewise.
3790 (c_parser_omp_clause_num_threads): Likewise.
3791 (c_parser_omp_clause_num_workers): Likewise.
3792 (c_parser_omp_clause_vector_length): Likewise.
3793 (c_parser_omp_clause_num_teams): Likewise.
3794 (c_parser_omp_clause_thread_limit): Likewise.
3795 * c-typeck.c (build_c_cast): Likewise.
3796 (c_cast_expr): Likewise.
3798 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3800 * c-typeck.c (c_tree_equal): Use real_equal instead of
3803 2015-10-04 Jason Merrill <jason@redhat.com>
3805 * c-parser.c (c_lex_one_token): Handle @synchronized.
3806 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3807 can change whether the function is transaction_safe.
3809 2015-10-02 Marek Polacek <polacek@redhat.com>
3812 * c-typeck.c (convert_for_assignment): Use the expansion point
3813 location throughout.
3815 2015-10-02 Marek Polacek <polacek@redhat.com>
3818 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3819 and pass it down to c_parser_if_statement.
3820 (c_parser_else_body): Add CHAIN parameter and pass it down to
3821 c_parser_statement_after_labels.
3822 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3823 duplicated if-else-if conditions.
3825 2015-10-01 Marek Polacek <polacek@redhat.com>
3827 * c-typeck.c (convert_for_assignment): Improve commentary.
3829 2015-09-30 Marek Polacek <polacek@redhat.com>
3832 * c-typeck.c (c_finish_return): Use the expansion point location for
3833 certain "return with value" warnings.
3835 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3837 * c-parser.c (pragma_lex): Add loc argument.
3839 2015-09-15 Marek Polacek <polacek@redhat.com>
3842 * c-decl.c (tag_exists_p): New function.
3843 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3844 struct/union/enum keywords are missing.
3845 * c-tree.h (tag_exists_p): Declare.
3847 2015-09-15 Marek Polacek <polacek@redhat.com>
3849 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3850 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3851 Return NULL_TREE instead of 0.
3852 (lookup_name): Return NULL_TREE instead of 0.
3853 (lookup_name_in_scope): Likewise.
3854 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3855 (parser_xref_tag): Use false instead of 0.
3856 (start_struct): Use true instead of 1.
3857 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3859 2015-09-14 Marek Polacek <polacek@redhat.com>
3861 * c-typeck.c (set_nonincremental_init_from_string): Use
3862 HOST_WIDE_INT_M1U when shifting a negative value.
3864 2015-09-09 Mark Wielaard <mjw@redhat.com>
3866 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3869 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3872 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3873 into OMP_FOR_PRE_BODY rather than before the loop.
3875 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3878 * c-parser.c (c_parser_oacc_all_clauses,
3879 c_parser_omp_all_clauses): Remove invalid clause from
3880 list of clauses even if parser->error is set.
3883 * c-parser.c (c_parser_omp_clause_aligned,
3884 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3886 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3890 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3891 instead of c_parser_unary_expression. If the result is !lvalue_p,
3892 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3894 2015-09-04 Marek Polacek <polacek@redhat.com>
3897 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3899 2015-09-03 Martin Sebor <msebor@redhat.com>
3902 * c-typeck.c (convert_arguments, parser_build_unary_op,
3903 build_conditional_expr, c_cast_expr, convert_for_assignment,
3904 build_binary_op, _objc_common_truthvalue_conversion): Call
3906 (c_decl_implicit): Define.
3908 2015-09-02 Marek Polacek <polacek@redhat.com>
3911 * c-parser.c (c_parser_enum_specifier): Give a better error for
3914 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3916 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3918 2015-08-12 Marek Polacek <polacek@redhat.com>
3920 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3923 2015-08-03 Marek Polacek <polacek@redhat.com>
3926 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3928 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3930 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3932 * c-parser.c (c_parser_if_body): Take token_indent_info
3933 argument. Call warn_for_misleading_indentation even when the
3934 body is a semicolon. Extract token_indent_infos corresponding
3935 to the guard, body and next tokens. Adjust call to
3936 warn_for_misleading_indentation accordingly.
3937 (c_parser_else_body): Likewise.
3938 (c_parser_if_statement): Likewise.
3939 (c_parser_while_statement): Likewise.
3940 (c_parser_for_statement): Likewise.
3942 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3943 Manuel López-Ibáñez <manu@gcc.gnu.org>
3945 * c-decl.c (get_parm_info): Remove static var. Update warning
3948 2015-07-27 Marek Polacek <polacek@redhat.com>
3952 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3954 2015-07-20 Marek Polacek <polacek@redhat.com>
3957 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3958 (build_binary_op): Warn about left shift overflows.
3960 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3962 * c-array-notation.c: Adjust includes for flags.h changes.
3963 * c-objc-common.c: Likewise.
3965 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3967 * c-array-notation.c: Adjust includes.
3968 * c-aux-info.c: Likewise.
3969 * c-convert.c: Likewise.
3970 * c-decl.c: Likewise.
3971 * c-errors.c: Likewise.
3972 * c-lang.c: Likewise.
3973 * c-objc-common.c: Likewise.
3974 * c-parser.c: Likewise.
3975 * c-typeck.c: Likewise.
3977 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3980 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3982 2015-06-29 Marek Polacek <polacek@redhat.com>
3985 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3986 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3987 about -Wswitch-bool here.
3988 (do_case): Update c_add_case_label call.
3989 (c_finish_case): Update c_do_switch_warnings call.
3991 2015-06-27 Marek Polacek <polacek@redhat.com>
3993 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3995 2015-06-26 Marek Polacek <polacek@redhat.com>
3997 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3999 * c-typeck.c (array_to_pointer_conversion): Likewise.
4000 (build_unary_op): Likewise.
4001 (c_finish_return): Likewise.
4003 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4005 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4006 * c-parser.c: Likewise.
4008 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4010 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4011 instead of pointer_hash.
4012 (detect_field_duplicates): Likewise.
4014 2015-06-25 Marek Polacek <polacek@redhat.com>
4016 * c-array-notation.c: Use VAR_P throughout.
4017 * c-decl.c: Likewise.
4018 * c-objc-common.c: Likewise.
4019 * c-parser.c: Likewise.
4020 * c-typeck.c: Likewise.
4022 2015-06-25 Marek Polacek <polacek@redhat.com>
4024 * c-decl.c: Use is_global_var throughout.
4025 * c-parser.c: Likewise.
4026 * c-typeck.c: Likewise.
4028 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4030 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4031 * c-aux-info.c: Likewise.
4032 * c-convert.c: Likewise.
4033 * c-decl.c: Likewise.
4034 * c-errors.c: Likewise.
4035 * c-lang.c: Likewise.
4036 * c-objc-common.c: Likewise.
4037 * c-parser.c: Likewise.
4038 * c-typeck.c: Likewise.
4040 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4043 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4046 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4048 * c-decl.c (pop_scope): Register the main translation unit
4049 through the new debug hook.
4051 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4053 * c-array-notation.c : Adjust include files.
4054 * c-aux-info.c : Likewise.
4055 * c-convert.c : Likewise.
4056 * c-decl.c : Likewise.
4057 * c-errors.c : Likewise.
4058 * c-lang.c : Likewise.
4059 * c-lang.h : Likewise.
4060 * c-objc-common.c : Likewise.
4061 * c-parser.c : Likewise.
4062 * c-typeck.c : Likewise.
4064 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4066 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4067 immediately clobber it.
4068 (c_write_global_declarations_1): Remove call to
4069 check_global_declaration_1.
4070 (c_write_global_declarations_2): Remove.
4071 (c_write_final_cleanups): Rename from c_write_global_declarations.
4072 Remove call to finalize_compilation_unit.
4073 Remove calls to debugging hooks.
4074 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4075 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4076 * c-tree.h: Remove c_write_global_declarations.
4078 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4080 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4081 * c-aux-info.c: Likewise.
4082 * c-convert.c: Likewise.
4083 * c-decl.c: Likewise.
4084 * c-errors.c: Likewise.
4085 * c-lang.c: Likewise.
4086 * c-objc-common.c: Likewise.
4087 * c-parser.c: Likewise.
4088 * c-typeck.c: Likewise.
4090 2015-06-04 Marek Polacek <polacek@redhat.com>
4093 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4096 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4098 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4099 Warn for empty struct.
4100 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4102 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4104 * c-decl.c (start_function): Call plugin before parsing.
4105 (finish_function): Call plugin after parsing.
4107 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4110 * c-decl.c (merge_decls): Merge DECL_COMMON.
4112 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4114 * Make-lang.in (check_gcc_pallelize): Define.
4116 2015-05-22 Marek Polacek <polacek@redhat.com>
4119 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4122 2015-05-21 Marek Polacek <polacek@redhat.com>
4124 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4127 2015-05-20 Marek Polacek <polacek@redhat.com>
4129 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4130 * c-typeck.c: Likewise.
4132 2015-05-19 Marek Polacek <polacek@redhat.com>
4134 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4136 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4139 * c-parser.c (c_parser_omp_for_loop): Don't add
4140 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4141 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4142 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4145 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4147 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4150 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4153 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4156 2015-05-14 Marek Polacek <polacek@redhat.com>
4160 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4163 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4165 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4166 to add a call to warn_for_misleading_indentation.
4167 (c_parser_else_body): Likewise, adding param "else_loc".
4168 (c_parser_if_statement): Check for misleading indentation.
4169 (c_parser_while_statement): Likewise.
4170 (c_parser_for_statement): Likewise.
4172 2015-05-08 Marek Polacek <polacek@redhat.com>
4175 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4176 (output_init_element): Likewise.
4178 2015-05-07 Marek Polacek <polacek@redhat.com>
4181 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4184 2015-04-30 Marek Polacek <polacek@redhat.com>
4186 * c-typeck.c (set_init_label): Call error_at instead of error and
4189 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4192 * c-typeck.c (c_build_va_arg): Clarify the error message.
4194 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4196 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4197 OMP_STANDALONE_CLAUSES.
4199 2015-04-28 Marek Polacek <polacek@redhat.com>
4201 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4203 2015-04-28 Marek Polacek <polacek@redhat.com>
4206 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4208 2015-04-25 Marek Polacek <polacek@redhat.com>
4211 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4214 2015-04-23 Marek Polacek <polacek@redhat.com>
4217 * c-decl.c (set_labels_context_r): New function.
4218 (store_parm_decls): Call it via walk_tree_without_duplicates.
4219 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4220 instead of create_tmp_var. Build TARGET_EXPR instead of
4222 (build_atomic_assign): Use create_tmp_var_raw instead of
4223 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4225 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4227 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4228 (c_parser_omp_target_update): Add missed %> to error_at ().
4230 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4233 * c-decl.c (c_default_pointer_mode): Remove definition.
4234 * c-tree.h (c_default_pointer_mode): Remove declaration.
4236 2015-03-27 Tobias Burnus <burnus@net-b.de>
4239 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4241 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4242 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4243 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4245 2015-03-19 Jakub Jelinek <jakub@redhat.com>
4247 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4248 attribute for DECL_EXTERNAL VAR_DECLs.
4250 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4252 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4255 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4258 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4259 before preparing arguments to warn_logical_not_parentheses.
4261 2015-03-09 Jakub Jelinek <jakub@redhat.com>
4264 * c-typeck.c (parser_build_binary_op): Don't warn for
4265 !!x == y or !b == y where b is _Bool.
4267 2015-03-09 Marek Polacek <polacek@redhat.com>
4269 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4270 * c-decl.c (grokdeclarator): Likewise.
4271 * c-typeck.c (build_binary_op): Likewise.
4273 2015-02-27 Marek Polacek <polacek@redhat.com>
4276 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4278 2015-02-14 Marek Polacek <polacek@redhat.com>
4281 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4282 declared through a typedef name.
4284 2015-02-13 Marek Polacek <polacek@redhat.com>
4287 * c-decl.c (grokdeclarator): Print also the type when giving
4288 the error message about array's incomplete element type.
4290 2015-02-11 Jakub Jelinek <jakub@redhat.com>
4293 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4294 check in the POP macro.
4296 2015-02-09 Marek Polacek <polacek@redhat.com>
4299 * c-typeck.c (process_init_element): Don't always wrap
4300 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4301 initializing a range of elements.
4303 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4307 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4309 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
4311 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4312 processing enum declaration.
4314 2015-01-29 Marek Polacek <polacek@redhat.com>
4317 * c-typeck.c (pop_init_level): If constructor_elements has
4318 exactly one element with integer_zerop value, set constructor_zeroinit
4319 to 1. Remove braces around warning_init call.
4321 2015-01-27 Jakub Jelinek <jakub@redhat.com>
4324 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4325 of FUNCTION_DECLs with error_mark_node.
4327 2015-01-26 Jakub Jelinek <jakub@redhat.com>
4330 * c-typeck.c (convert_arguments): Return -1 if there are
4331 error_args, even if we've diagnosed too many arguments.
4333 2015-01-21 Richard Biener <rguenther@suse.de>
4336 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4337 for builtins the user declared correctly.
4339 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4340 Bernd Schmidt <bernds@codesourcery.com>
4341 Cesar Philippidis <cesar@codesourcery.com>
4342 James Norris <jnorris@codesourcery.com>
4343 Jakub Jelinek <jakub@redhat.com>
4344 Ilmir Usmanov <i.usmanov@samsung.com>
4346 * c-parser.c: Include "gomp-constants.h".
4347 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4348 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4349 Use OMP_CLAUSE_SET_MAP_KIND.
4350 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4351 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4352 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4353 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4354 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4355 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4356 "copyout", "create", "delete", "deviceptr", "gang", "host",
4357 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4358 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4359 "present_or_create", "pcreate", "seq", "self", "vector",
4360 "vector_length", "wait", "worker".
4361 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4362 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4363 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4364 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4365 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4366 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4367 (c_parser_oacc_data_clause_deviceptr)
4368 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4369 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4370 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4371 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4372 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4373 (c_parser_oacc_parallel, c_parser_oacc_update)
4374 (c_parser_oacc_wait): New functions.
4375 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4376 (c_finish_oacc_data): New prototypes.
4377 * c-typeck.c: Include "gomp-constants.h".
4378 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4379 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4380 OMP_CLAUSE_SET_MAP_KIND.
4381 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4382 (c_finish_oacc_data): New functions.
4383 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4384 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4385 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4386 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4387 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4388 GOMP_MAP_FORCE_DEVICEPTR.
4390 2015-01-09 Michael Collison <michael.collison@linaro.org>
4392 * c-array-notation.c: Include hash-set.h, machmode.h,
4393 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4394 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4395 * c-aux-info.c: Ditto.
4396 * c-convert.c: Ditto.
4398 * c-errors.c: Ditto.
4399 * c-lang.c: Dittoxs.
4400 * c-objc-common.c: Ditto.
4401 * c-parser.c: Ditto.
4402 * c-typeck.c: Include hash-set.h, machmode.h,
4403 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4404 fold-const.h, wide-int.h, inchash.h, real.h and
4405 fixed-value.h due to flattening of tree.h.
4407 2015-01-07 Marek Polacek <polacek@redhat.com>
4410 * c-typeck.c (process_init_element): Disallow initialization of
4411 a flexible array member with a string constant if the structure
4414 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4417 * c-typeck.c (convert_for_assignment, c_finish_return): For
4418 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4419 types also set in_late_binary_op around convert call.
4420 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4421 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4422 result on expr as last argument to ubsan_instrument_float_cast,
4423 if in_late_binary_op, don't use c_save_expr but save_expr.
4425 Update copyright years.
4427 2015-01-05 Marek Polacek <polacek@redhat.com>
4430 * c-typeck.c (build_array_ref): Pass loc down to
4431 warn_array_subscript_with_type_char.
4433 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4435 * c-typeck.c: New behavious for pointers to arrays with qualifiers
4436 (common-pointer-type): For pointers to arrays take qualifiers from
4438 (build_conditional_expr): Add warnings for lost qualifiers.
4439 (comp-target-types): Allow pointers to arrays with different qualifiers.
4440 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4441 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4442 to PEDWARN_FOR_QUALIFIERS.
4444 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4447 * c-convert.c: Include ubsan.h.
4448 (convert): For real -> integral casts and
4449 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4450 instead instrument the float cast directly.
4452 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4454 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4455 c_finish_stmt_expr): Remove NULL last argument from
4456 create_tmp_var_raw and create_tmp_var calls.
4457 * c-array-notation.c (fix_builtin_array_notation_fn,
4458 build_array_notation_expr, fix_conditional_array_notations_1,
4459 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4461 2014-11-28 Marek Polacek <polacek@redhat.com>
4464 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4465 convert the right operand to integer type.
4467 2014-11-25 Marek Polacek <polacek@redhat.com>
4470 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4471 for inline functions.
4473 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4476 * c-typeck.c (build_array_ref): Adjust
4477 convert_vector_to_pointer_for_subscript caller. If it returns true,
4478 call non_lvalue_loc on the result.
4480 2014-11-11 Richard Biener <rguenther@suse.de>
4482 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4485 2014-11-10 Andi Kleen <ak@linux.intel.com>
4488 * c-parser.c (c_parser_statement_after_labels): Call
4490 (c_parser_if_statement): Dito.
4491 (c_parser_switch_statement): Dito.
4492 (c_parser_while_statement): Dito.
4493 (c_parser_do_statement): Dito.
4494 (c_parser_for_statement): Dito.
4495 * c-typeck.c (c_finish_loop): Dito.
4497 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4499 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4500 OPT_Wshift_count_overflow in the warnings.
4502 2014-10-30 Marek Polacek <polacek@redhat.com>
4504 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4505 print the stripped version as well, if they're not the same.
4507 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4509 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4512 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4514 * c-decl.c: Adjust include files.
4515 * c-parser.c: Ditto.
4517 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4518 Tom Tromey <tromey@redhat.com>
4520 * c-tree.h (enum c_oracle_request): New.
4521 (c_binding_oracle_function): New typedef.
4522 (c_binding_oracle, c_pushtag, c_bind): Declare.
4523 * c-decl.c (c_binding_oracle): New global.
4524 (I_SYMBOL_CHECKED): New macro.
4525 (i_symbol_binding): New function.
4526 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4527 (I_TAG_CHECKED): New macro.
4528 (i_tag_binding): New function.
4529 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4530 (I_LABEL_CHECKED): New macro.
4531 (i_label_binding): New function.
4532 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4533 (c_print_identifier): Save and restore c_binding_oracle.
4534 (c_pushtag, c_bind): New functions.
4536 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4538 * c-typeck.c: Adjust include files.
4540 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4543 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4544 initialization here...
4545 (c_initialize_diagnostics): ... but here. Set defaults after
4546 building pretty-printer.
4548 2014-10-23 Marek Polacek <polacek@redhat.com>
4551 * c-decl.c (pop_scope): Don't print warning in external_scope.
4553 2014-10-19 Marek Polacek <polacek@redhat.com>
4556 * c-typeck.c (output_init_element): Allow initializing objects with
4557 static storage duration with compound literals even in C99 and add
4560 2014-10-17 Marek Polacek <polacek@redhat.com>
4563 * c-typeck.c (digest_init): Allow initializing objects with static
4564 storage duration with compound literals even in C99 and add pedwarn
4567 2014-10-17 Marek Polacek <polacek@redhat.com>
4570 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4571 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4572 error multiple times. Print the type.
4574 2014-10-17 Marek Polacek <polacek@redhat.com>
4577 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4580 2014-10-17 Marek Polacek <polacek@redhat.com>
4582 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4583 (start_function): Use OPT_Wimplicit_int instead of 0.
4584 (store_parm_decls_oldstyle): Likewise.
4586 2014-10-17 Alan Modra <amodra@gmail.com>
4589 * c-decl.c (merge_decls): Don't merge section name or tls model
4590 to newdecl symtab node, instead merge to olddecl. Override
4591 existing olddecl section name. Set tls_model for all thread-local
4592 vars, not just OMP thread-private ones. Remove incorrect comment.
4594 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4596 * c-decl.c: Adjust include files.
4598 2014-10-14 DJ Delorie <dj@redhat.com>
4600 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4601 (c_token_starts_typename): Check all __intN, not just __int128.
4602 (c_token_starts_declspecs): Likewise.
4603 (c_parser_declspecs): Likewise.
4604 (c_parser_attribute_any_word): Likewise.
4605 (c_parser_objc_selector): Likewise.
4606 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4607 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4609 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4611 (finish_declspecs): Likewise.
4613 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4615 * c-parser.c (c_parser_all_labels): New function to replace
4617 (c_parser_statement): Call the new function.
4619 2014-10-09 Marek Polacek <polacek@redhat.com>
4622 * c-typeck.c (pop_init_level): Don't warn about initializing
4625 2014-10-07 Marek Polacek <polacek@redhat.com>
4628 * c-decl.c (header_for_builtin_fn): New function.
4629 (implicitly_declare): Suggest which header to include.
4631 2014-10-07 Marek Polacek <polacek@redhat.com>
4633 * c-convert.c (convert): Use error_operand_p.
4634 * c-typeck.c (require_complete_type): Likewise.
4635 (really_atomic_lvalue): Likewise.
4636 (digest_init): Likewise.
4637 (handle_omp_array_sections_1): Likewise.
4639 2014-10-03 Marek Polacek <polacek@redhat.com>
4642 * c-decl.c (pop_scope): Don't warn about "inline function declared
4643 but never defined" for functions marked with gnu_inline attribute.
4645 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4648 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4649 on low_bound and length.
4651 2014-09-24 Marek Polacek <polacek@redhat.com>
4655 * c-parser.c: Don't define CPP_KEYWORD.
4656 (c_parser_switch_statement): Pass original type to c_finish_case.
4657 * c-tree.h (c_finish_case): Update declaration.
4658 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4659 conditionally to c_do_switch_warnings.
4661 2014-09-03 Marek Polacek <polacek@redhat.com>
4664 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4667 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4668 Balaji V. Iyer <balaji.v.iyer@intel.com>
4669 Igor Zamyatin <igor.zamyatin@intel.com>
4671 * c-parser.c (c_parser_cilk_for): New function.
4672 (c_parser_cilk_grainsize): Likewise.
4673 (c_get_temp_regvar): Likewise.
4674 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4675 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4676 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4677 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4680 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4682 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4683 with using HOST_WIDE_INT without truncation to 'int'
4685 2014-08-22 Marek Polacek <polacek@redhat.com>
4688 * c-typeck.c (parser_build_binary_op): Adjust call to
4689 warn_logical_not_parentheses.
4691 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4694 * c-parser.c (c_parser_array_notation): Check for correct
4695 type of an array added.
4697 2014-08-19 Marek Polacek <polacek@redhat.com>
4700 * c-typeck.c (build_binary_op): If either operand of a comparison
4701 is a boolean expression, call maybe_warn_bool_compare.
4703 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4706 * c-typeck.c (build_c_cast): Do a conversion even when the
4707 TYPE_MAIN_VARIANTs are the same.
4709 2014-08-19 Marek Polacek <polacek@redhat.com>
4711 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4712 pedwarn_c99 instead of pedwarn.
4713 (grokfield): Likewise.
4714 (warn_defaults_to): New function.
4715 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4716 Unconditionally call pedwarn_c99 instead of pedwarn.
4717 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4718 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4719 check flag_isoc11 before.
4720 * c-errors.c (pedwarn_c99): Change the return type to bool.
4721 Handle -Wc99-c11-compat.
4722 * c-parser.c (disable_extension_diagnostics): Handle
4723 warn_c99_c11_compat.
4724 (restore_extension_diagnostics): Likewise.
4725 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4726 instead of pedwarn, don't check flag_isoc11 before.
4727 (c_parser_declspecs): Likewise.
4728 (c_parser_alignas_specifier): Likewise.
4729 (c_parser_alignof_expression): Likewise.
4730 (c_parser_generic_selection): Likewise.
4731 * c-tree.h (pedwarn_c99): Update declaration.
4732 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4735 2014-08-19 Marek Polacek <polacek@redhat.com>
4737 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4739 * c-errors.c: Include "opts.h".
4740 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4741 * c-parser.c (disable_extension_diagnostics): Handle negative value
4742 of warn_c90_c99_compat, too.
4743 (restore_extension_diagnostics): Likewise.
4744 (c_parser_compound_statement_nostart): Pass
4745 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4747 2014-08-12 Marek Polacek <polacek@redhat.com>
4749 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4751 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4753 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4755 2014-08-10 Marek Polacek <polacek@redhat.com>
4758 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4759 Call pedwarn_c90 instead of pedwarn.
4760 (check_bitfield_type_and_width): Likewise.
4761 (declspecs_add_qual): Likewise.
4762 (declspecs_add_type): Likewise.
4763 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4764 Adjust to only call pedwarn_c90.
4765 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4766 pedwarn_c90 instead of pedwarn.
4767 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4768 * c-parser.c (disable_extension_diagnostics): Handle
4769 warn_c90_c99_compat.
4770 (restore_extension_diagnostics): Likewise.
4771 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4772 pedwarn_c90 instead of pedwarn.
4773 (c_parser_initelt): Likewise.
4774 (c_parser_postfix_expression): Likewise.
4775 (c_parser_postfix_expression_after_paren_type): Likewise.
4776 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4777 * c-tree.h: Fix formatting.
4778 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4779 pedwarn_c90 instead of pedwarn.
4781 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4783 * c-typeck.c: Remove include of pointer-set.h.
4785 2014-08-07 Marek Polacek <polacek@redhat.com>
4787 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4789 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4791 * c-typeck.c: Use hash_map instead of pointer_map.
4793 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4795 * c-decl.c: Use hash_set instead of pointer_set.
4797 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4800 * c-array-notation.c (expand_array_notations): Handling
4803 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4806 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4809 2014-07-30 Tom Tromey <tromey@redhat.com>
4811 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4813 (really_start_incremental_init, push_init_level): Initialize
4815 (pop_init_level): Set global designator_depth.
4816 (process_init_element): Check for designated_init attribute.
4818 2014-07-20 Marek Polacek <polacek@redhat.com>
4821 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4822 (implicitly_declare): Pass location to implicit_decl_warning.
4824 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4827 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4828 If non-NULL, call c_parser_check_literal_zero.
4829 (c_parser_check_literal_zero): New function.
4830 (c_parser_postfix_expression_after_primary): Adjust
4831 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4833 2014-07-06 Marek Polacek <polacek@redhat.com>
4836 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4837 * c-tree.h (C_ARRAY_PARAMETER): Define.
4838 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4841 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4842 Chen Gang <gang.chen.5i5j@gmail.com>
4844 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4847 2014-07-01 Marek Polacek <polacek@redhat.com>
4849 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4850 instead of 0 to WARN_FOR_ASSIGNMENT.
4852 2014-07-01 Marek Polacek <polacek@redhat.com>
4855 * c-typeck.c (convert_for_assignment): Pass
4856 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4858 2014-06-30 Marek Polacek <polacek@redhat.com>
4860 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4861 has no_sanitize_undefined attribute.
4863 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4866 * c-array-notation.c (fix_builtin_array_notation_fn):
4867 Check for 0 arguments in builtin call. Check that bultin argument is
4869 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4872 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4874 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4875 qualifiers in __auto_type for atomic types.
4876 (c_parser_typeof_specifier): Discard all type qualifiers in
4877 __typeof__ for atomic types.
4879 2014-06-25 Marek Polacek <polacek@redhat.com>
4882 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4883 the return expression to c_finish_return.
4885 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4887 * c-typeck.c (c_finish_omp_clauses): Make sure
4888 OMP_CLAUSE_LINEAR_STEP has correct type.
4890 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4894 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4896 * c-parser.c (c_parser_omp_for_loop): For
4897 #pragma omp parallel for simd move lastprivate clause from parallel
4898 to for rather than simd.
4900 2014-06-23 Marek Polacek <polacek@redhat.com>
4902 * c-typeck.c (parser_build_binary_op): Don't call
4903 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4905 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4907 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4908 * c-decl.c (merge_decls): Likewise.
4910 2014-06-09 Marek Polacek <polacek@redhat.com>
4913 * c-typeck.c (error_init): Call inform instead of error_at.
4914 (pedwarn_init): Call inform instead of pedwarn.
4915 (warning_init): Call inform instead of warning_at.
4917 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4919 * c-decl.c (merge_decls): Use set_decl_section_name.
4920 (duplicate_decls): Remove node if it exists.
4922 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4925 * c-typeck.c (push_init_level, process_init_element,
4926 pop_init_level): Correct check for zero initialization, move
4927 missing brace warning to respect zero initialization.
4929 2014-06-05 Marek Polacek <polacek@redhat.com>
4932 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4934 2014-06-05 Marek Polacek <polacek@redhat.com>
4937 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4938 on the left hand side operand of a comparison.
4940 2014-06-05 Marek Polacek <polacek@redhat.com>
4943 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4944 Print note only if the warning was printed.
4946 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4949 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4952 2014-06-03 Marek Polacek <polacek@redhat.com>
4955 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4957 * c-tree.h (c_start_case): Update.
4958 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4959 switch condition has boolean value.
4961 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4963 * c-decl.c: Include builtins.h.
4964 * c-parser.c: Likewise.
4966 2014-05-27 Marek Polacek <polacek@redhat.com>
4969 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4970 error and warning calls to error_at and warning_at. Pass location of
4971 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4972 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4973 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4975 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4978 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4979 function parameters.
4981 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4983 * c-decl.c (merge_decls): Preserve symtab node pointers.
4984 (duplicate_decls): Free new decl.
4986 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4988 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4991 * c-parser.c (c_parser_omp_target): Return bool values.
4993 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4995 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4996 num_teams_loc variable to num_thread_limit_loc.
4998 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5000 * c-array-notation.c (expand_array_notations): Use void_node
5001 instead of void_zero_node.
5003 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5005 * c-decl.c (finish_struct): Adjust.
5006 (finish_enum): Likewise.
5008 (record_inline_static): Likewise.
5009 (push_scope): Likewise.
5010 (make_label): Likewise.
5011 (lookup_label_for_goto): Likewise.
5012 (finish_struct): Likewise.
5013 (finish_enum): Likewise.
5014 (store_parm_decls): Likewise.
5015 (c_push_function_context): Likewise.
5016 * c-lang.h: Remove usage of variable_size gty attribute.
5017 * c-parser.c (c_parse_init): Adjust.
5018 (c_parse_file): Likewise.
5020 2014-05-13 Marek Polacek <polacek@redhat.com>
5023 * c-typeck.c (convert_for_assignment): Pass location to
5024 WARN_FOR_ASSIGNMENT instead of input_location.
5026 2014-05-10 Marek Polacek <polacek@redhat.com>
5028 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5029 maybe_warn_string_init.
5030 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5031 maybe_warn_string_init.
5032 * c-tree.h (maybe_warn_string_init): Update declaration.
5033 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5034 Call pedwarn_init with loc instead of with input_location.
5035 (digest_init): Pass init_loc to maybe_warn_string_init.
5036 (pop_init_level): Call pedwarn_init with loc instead of with
5038 (set_init_index): Likewise.
5039 (process_init_element): Likewise.
5041 2014-05-09 Marek Polacek <polacek@redhat.com>
5044 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5045 (c_parser_initelt): Pass location to set_init_label. Pass array index
5046 location to set_init_index.
5047 * c-tree.h (push_init_level): Update declaration.
5048 (pop_init_level): Likewise.
5049 (set_init_index): Likewise.
5050 (set_init_label): Likewise.
5051 * c-typeck.c (error_init): Add location parameter. Call error_at
5053 (digest_init): Pass init_loc to error_init.
5054 (really_start_incremental_init):
5055 (push_init_level): Add location parameter. Pass loc to pop_init_level
5057 (pop_init_level): Likewise.
5058 (set_designator): Add location parameter. Pass loc to pop_init_level,
5059 push_init_level, and error_init.
5060 (set_init_index): Add location parameter. Pass loc to error_init and
5062 (set_init_label): Likewise.
5063 (output_init_element): Pass loc to error_init.
5064 (process_init_element): Pass loc to error_init, pop_init_level,
5065 pedwarn_init, and push_init_level.
5067 2014-05-09 Marek Polacek <polacek@redhat.com>
5070 * c-parser.c (c_parser_attributes): Parse the arguments as an
5071 expression-list if the attribute takes identifier.
5073 2014-05-08 Marek Polacek <polacek@redhat.com>
5076 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5079 2014-05-08 Marek Polacek <polacek@redhat.com>
5082 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5085 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5086 Mike Stump <mikestump@comcast.net>
5087 Richard Sandiford <rdsandiford@googlemail.com>
5089 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5090 (finish_enum): Use wide-int interfaces.
5091 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5092 * c-typeck.c (build_c_cast): Likewise.
5093 (set_nonincremental_init_from_string): Likewise.
5094 (c_tree_equal): Likewise.
5096 2014-05-02 Marek Polacek <polacek@redhat.com>
5099 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5100 Return size_one_node when the type is not complete.
5101 (pointer_diff): Remove comment.
5102 (build_unary_op): Improve error messages.
5104 2014-05-02 Marek Polacek <polacek@redhat.com>
5106 * c-typeck.c (c_finish_return): Separate warning_at calls.
5108 2014-05-02 Marek Polacek <polacek@redhat.com>
5110 * c-tree.h (error_init): Remove declaration.
5111 (pedwarn_init): Likewise.
5112 * c-typeck.c (error_init): Make static and move above.
5113 (pedwarn_init): Likewise.
5114 (warning_init): Move above.
5115 (maybe_warn_string_init): Likewise.
5117 2014-05-01 Jeff Law <law@redhat.com>
5121 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5122 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5125 2014-05-02 Marek Polacek <polacek@redhat.com>
5128 * c-typeck.c (push_init_level): Set constructor_designated to
5129 p->designated for structures.
5131 2014-05-01 Marek Polacek <polacek@redhat.com>
5134 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5135 function-definition has an attribute after the declarator.
5137 2014-05-01 Marek Polacek <polacek@redhat.com>
5140 * c-typeck.c (warning_init): Add location_t parameter. Call
5141 warning_at instead of warning.
5142 (push_init_level): Pass input_location to warning_init.
5143 (add_pending_init): Add location_t parameter. Pass loc to
5145 (set_nonincremental_init): Pass input_location to add_pending_init.
5146 (set_nonincremental_init_from_string): Likewise.
5147 (output_init_element): Pass loc to warning_init and to
5150 2014-05-01 Marek Polacek <polacek@redhat.com>
5153 * c-typeck.c (c_finish_return): Distinguish between label and variable
5154 when warning about returning local address.
5156 2014-05-01 Marek Polacek <polacek@redhat.com>
5159 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5162 2014-05-01 Marek Polacek <polacek@redhat.com>
5165 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5166 instead of 0 to WARN_FOR_QUALIFIERS.
5168 2014-05-01 Marek Polacek <polacek@redhat.com>
5171 * c-typeck.c (default_conversion): Use better location for
5174 2014-04-30 Marek Polacek <polacek@redhat.com>
5176 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5177 also when SANITIZE_FLOAT_DIVIDE is on.
5179 2014-04-30 Marek Polacek <polacek@redhat.com>
5182 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5183 and pedwarn_init. Use loc insted of input_location.
5185 2014-04-30 Marek Polacek <polacek@redhat.com>
5188 * c-typeck.c (build_binary_op): Use location when warning about
5191 2014-04-25 Marek Polacek <polacek@redhat.com>
5194 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5195 always_inline/noinline and hot/cold attributes.
5197 2014-04-25 Marek Polacek <polacek@redhat.com>
5200 * c-parser.c (c_parser_initelt): Pass input_location to
5201 process_init_element.
5202 (c_parser_initval): Pass loc to process_init_element.
5203 * c-tree.h (process_init_element): Adjust declaration.
5204 * c-typeck.c (push_init_level): Pass input_location to
5205 process_init_element.
5206 (pop_init_level): Likewise.
5207 (set_designator): Likewise.
5208 (output_init_element): Add location_t parameter. Pass loc to
5210 (output_pending_init_elements): Pass input_location to
5211 output_init_element.
5212 (process_init_element): Add location_t parameter. Pass loc to
5213 output_init_element.
5215 2014-04-24 Jakub Jelinek <jakub@redhat.com>
5217 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5218 atomic-clause, allow comma in between atomic-clause and
5221 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5224 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5225 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5227 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5230 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5231 create_tmp_var instead build_decl for creating temps.
5232 (build_array_notation_expr): Likewise.
5233 (fix_conditional_array_notations_1): Likewise.
5234 (fix_array_notation_expr): Likewise.
5235 (fix_array_notation_call_expr): Likewise.
5237 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5240 * c-tree.h (c_build_function_call_vec): New prototype.
5241 * c-typeck.c (build_function_call_vec): Don't call
5242 resolve_overloaded_builtin here.
5243 (c_build_function_call_vec): New wrapper function around
5244 build_function_call_vec. Call resolve_overloaded_builtin here.
5245 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5246 Call c_build_function_call_vec instead of build_function_call_vec.
5247 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5248 * c-decl.c (finish_decl): Likewise.
5250 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5253 * c-typeck.c: Use correct format string in cast-qual warning
5255 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5257 * c-decl.c (c_decl_attributes): Use
5258 lang_hooks.types.omp_mappable_type.
5259 * c-typeck.c (c_finish_omp_clauses): Likewise.
5261 2014-03-06 Marek Polacek <polacek@redhat.com>
5264 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5265 of checking tree code.
5267 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5269 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5270 (c_parser_parameter_declaration): Likewise.
5272 2014-02-19 Marek Polacek <polacek@redhat.com>
5275 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5276 Call mark_exp_read on exp.value.
5277 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5278 TREE_ADDRESSABLE on old instead of val.
5279 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5281 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5283 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5284 C_EXPR_APPEND by vec_safe_push.
5285 * c-tree.h (C_EXPR_APPEND): Remove.
5287 2014-01-31 Marek Polacek <polacek@redhat.com>
5290 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5291 build_function_call_vec.
5292 (build_function_call): Likewise.
5293 (build_atomic_assign): Likewise.
5294 (build_function_call_vec): Add arg_loc parameter. Use it.
5295 (convert_arguments): Likewise.
5296 (convert_for_assignment): Rename rhs_loc to expr_loc.
5297 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5298 (c_parser_objc_keywordexpr): Likewise.
5299 (c_parser_postfix_expression_after_primary): Call
5300 build_function_call_vec with expr_loc rather than op_loc.
5301 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5302 build_function_call_vec.
5303 (c_parser_expr_list): Add locations parameter. Fill it with locations
5304 of function arguments.
5305 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5307 2014-01-30 Marek Polacek <polacek@redhat.com>
5310 * c-typeck.c (build_function_call_vec): Use loc parameter.
5311 (convert_arguments): Add location parameter. Use it.
5312 (ep_convert_and_check): Likewise.
5313 (build_atomic_assign): Adjust convert_for_assignment call.
5314 (build_modify_expr): Likewise.
5315 (digest_init): Likewise.
5316 (c_finish_return): Likewise.
5317 (build_conditional_expr): Adjust ep_convert_and_check calls.
5318 (convert_for_assignment): Add rhs_loc parameter. Use it.
5319 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5322 2014-01-30 Richard Biener <rguenther@suse.de>
5325 * c-typeck.c (build_function_call_vec): Do not replace calls
5326 to a function via an incompatible type with a runtime abort.
5328 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5330 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5331 flag_enable_cilkplus with flag_cilkplus.
5332 (c_parser_direct_declarator_inner): Likewise.
5333 (c_parser_attribute_any_word): Likewise.
5334 (c_parser_attributes): Likewise.
5335 (c_parser_compound_statement): Likewise.
5336 (c_parser_statement_after_labels): Likewise.
5337 (c_parser_if_statement): Likewise.
5338 (c_parser_switch_statement): Likewise.
5339 (c_parser_do_statement): Likewise.
5340 (c_parser_for_statement): Likewise.
5341 (c_parser_unary_expression): Likewise.
5342 (c_parser_postfix_expression): Likewise.
5343 (c_parser_postfix_expression_after_primary): Likewise.
5344 (c_parser_postfix_expression_after_primary): Likewise.
5345 (c_parser_omp_clause_name): Likewise.
5346 (c_finish_omp_declare_simd): Likewise.
5347 (c_parser_cilk_verify_simd): Likewise.
5348 * c-typeck.c (build_array_ref): Likewise.
5349 (build_function_call_vec): Likewise.
5350 (convert_arguments): Likewise.
5351 (build_compound_expr): Likewise.
5352 (c_finish_return): Likewise.
5353 (c_finish_if_stmt): Likewise.
5354 (c_finish_loop): Likewise.
5355 (build_binary_op): Likewise.
5357 2014-01-23 Marek Polacek <polacek@redhat.com>
5360 * c-typeck.c (parser_build_binary_op): Use location instead of
5362 (build_binary_op): Pass location to shorten_compare.
5364 2014-01-23 Marek Polacek <polacek@redhat.com>
5367 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5370 2014-01-23 Marek Polacek <polacek@redhat.com>
5373 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5374 of a comma expression.
5375 (emit_side_effect_warnings): Likewise.
5377 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5380 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5381 function to use walk_tree and moved a lot of its functionality to
5382 expand_array_notations.
5383 (expand_array_notations): New function.
5385 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5387 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5388 attribute an attribute without value.
5390 2014-01-23 Jakub Jelinek <jakub@redhat.com>
5393 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5394 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5396 2014-01-22 Marek Polacek <polacek@redhat.com>
5399 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5400 of remove_c_maybe_const_expr on op1 and op2.
5402 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5405 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5406 effects, preevaluate rhs using SAVE_EXPR first.
5408 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5411 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5412 statements with if-elseif statements.
5414 2014-01-06 Marek Polacek <polacek@redhat.com>
5417 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5418 defined bit-field types only in ISO C.
5420 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5422 Update copyright years
5424 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5426 * c-array-notation.c: Use the standard form for the copyright notice.
5428 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5430 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5431 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5432 field in parser is not empty. If not-empty, call the function
5433 c_parser_finish_omp_declare_simd.
5434 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5435 between SIMD-enabled functions and #pragma simd. Added new parameter.
5436 (c_parser_cilk_all_clauses): Modified the usage of the function
5437 c_parser_cilk_clause_vectorlength as mentioned above.
5438 (c_parser_cilk_simd_fn_vector_attrs): New function.
5439 (c_finish_cilk_simd_fn_tokens): Likewise.
5440 (is_cilkplus_vector_p): Likewise.
5441 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5442 "nomask," and "mask" strings in clause name.
5443 (c_parser_omp_all_clauses): Added 3 new case statements:
5444 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5445 PRAGMA_CILK_CLAUSE_NOMASK.
5446 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5447 check for vector attribute and if so call the function
5448 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5449 called the function c_finish_cilk_simd_fn_tokens.
5450 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5451 parser field is non-empty. If so, parse them as you would parse
5452 the omp declare simd pragma.
5453 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5454 Added a check when step is a parameter and flag it as error.
5455 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5456 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5459 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5461 * c-parser.c (c_parser_omp_parallel): Fix description.
5463 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5465 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5466 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5467 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5468 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5470 2013-12-04 Joseph Myers <joseph@codesourcery.com>
5473 * c-parser.c (c_parser_alignas_specifier): Use
5474 c_sizeof_or_alignof_type instead of c_alignof.
5475 (c_parser_alignof_expression): Likewise, with min_alignof
5476 parameter depending on alignof spelling used.
5478 2013-12-04 Marek Polacek <polacek@redhat.com>
5481 * c-decl.c (start_function): Don't warn for missing prototype for
5484 2013-12-03 Marek Polacek <polacek@redhat.com>
5487 * c-decl.c (build_compound_literal): Allow compound literals with
5488 empty initial value.
5490 2013-12-02 Joseph Myers <joseph@codesourcery.com>
5493 * c-typeck.c (build_modify_expr): Diagnose assignment to
5494 expression with array type.
5496 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5499 * c-typeck.c (process_init_element): Do not treat a string as
5500 initializing a whole array when used with a designator for an
5503 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5506 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5507 an inline function following a static declaration.
5509 2013-11-28 Jakub Jelinek <jakub@redhat.com>
5512 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5513 to p_name before calling c_parser_omp_teams instead of after.
5514 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5515 argument. Remove unused p_name variable.
5517 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5518 Jakub Jelinek <jakub@redhat.com>
5520 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5521 external_scope is NULL.
5523 2013-11-27 Tom de Vries <tom@codesourcery.com>
5524 Marc Glisse <marc.glisse@inria.fr>
5527 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5529 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5531 * c-typeck.c: Add required include files from gimple.h.
5533 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5535 * c-decl.c (define_label, shadow_tag_warned)
5536 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5537 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5538 (declspecs_add_type): Remove use of in_system_header macro.
5539 * c-parser.c (c_parser_unary_expression): Likewise.
5540 * c-typeck.c (store_init_value, process_init_element)
5541 (c_start_case): Likewise.
5543 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5546 * c-parser.c (c_parser_set_source_position_from_token): Remove
5547 reference to in_system_header from comment.
5549 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5551 * c-decl.c (grokdeclarator): Update comment to refer to
5552 tree_to_[su]hwi rather than tree_low_cst.
5554 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5556 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5557 tree_to_uhwi throughout.
5559 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5561 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5564 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5566 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5569 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5571 * c-parser.c (c_parser_cilk_simd): New.
5572 (c_parser_cilk_verify_simd): New.
5573 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5574 (c_parser_omp_for_loop): Add case for NE_EXPR.
5575 Set c_break_label for CILK_SIMD.
5576 (c_parser_cilk_clause_vectorlength): New.
5577 (c_parser_cilk_clause_linear): New.
5578 (c_parser_cilk_clause_name): New.
5579 (c_parser_cilk_all_clauses): New.
5580 * c-typeck.c (build_unary_op): Pass location argument to
5582 (build_modify_expr): Same.
5583 (build_asm_expr): Same.
5584 (c_finish_bc_stmt): Error on break/continue in loops.
5586 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5588 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5590 2013-11-14 Diego Novillo <dnovillo@google.com>
5592 * c-decl.c: Include print-tree.h.
5593 Include stor-layout.h.
5596 Include stringpool.h.
5597 * c-lang.c: Include fold-const.h.
5598 * c-parser.c: Include stringpool.h.
5600 Include stor-layout.h.
5602 Include trans-mem.h.
5603 * c-typeck.c: Include stor-layout.h.
5604 Include trans-mem.h.
5608 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5610 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5611 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5613 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5614 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5616 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5617 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5618 (c_parser_declarator, c_parser_direct_declarator_inner)
5619 (c_parser_parameter_declaration, c_parser_type_name): All callers
5621 (c_parser_declaration_or_fndef): Handle declarations with type
5622 determined from the initializer.
5624 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5626 * c-typeck.c: Include gimplify.h.
5628 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5630 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5631 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5633 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5634 or _Thread_local as appropriate in diagnostics.
5635 (build_null_declspecs): Initialize ret->thread_gnu_p.
5636 (declspecs_add_scspec): Handle either __thread or _Thread_local
5637 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5638 pedantic. Do not disallow _Thread_local extern and _Thread_local
5641 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5642 Andrew MacLeod <amacleod@redhat.com>
5644 * c-aux-info.c (gen_type): Handle atomic qualifier.
5645 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5646 qualifiers when compating types.
5647 (shadow_tag_warned): Handle atomic_p in declspecs.
5648 (quals_from_declspecs): Likewise.
5649 (start_decl): Use c_type_promotes_to when promoting argument
5651 (grokdeclarator): Handle _Atomic.
5652 (get_parm_info): Diagnose any qualifier on "void" as only
5654 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5655 comparing types. Use c_type_promotes_to when promoting argument
5657 (finish_function): Use c_type_promotes_to when promoting argument
5659 (build_null_declspecs): Handle atomic_p in declspecs.
5660 (declspecs_add_qual): Handle RID_ATOMIC.
5661 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5662 (c_token_starts_declspecs): Handle RID_ATOMIC.
5663 (c_parser_declspecs): Handle atomic type specifiers and
5665 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5666 from types of expressions with atomic type.
5667 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5668 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5669 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5670 (c_parser_statement_after_labels, c_parser_switch_statement)
5671 (c_parser_for_statement, c_parser_expr_no_commas)
5672 (c_parser_conditional_expression, c_parser_binary_expression)
5673 (c_parser_cast_expression, c_parser_unary_expression)
5674 (c_parser_postfix_expression)
5675 (c_parser_postfix_expression_after_primary, c_parser_expression):
5676 Use convert_lvalue_to_rvalue.
5677 (c_parser_expression_conv, c_parser_expr_list): Document
5678 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5679 (c_parser_objc_synchronized_statement): Use
5680 convert_lvalue_to_rvalue.
5681 (c_parser_objc_selector): Handle RID_ATOMIC.
5682 (c_parser_objc_receiver, c_parser_array_notation): Use
5683 convert_lvalue_to_rvalue.
5684 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5685 _Atomic (type-name).
5686 (struct c_declspecs): Add atomic_p field.
5687 (convert_lvalue_to_rvalue): Declare.
5688 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5689 corresponding atomic types.
5690 (qualify_type): Don't add _Atomic qualifiers from second argument.
5691 (comp_target_types): Do not allow _Atomic mismatches.
5692 (type_lists_compatible_p): Do not remove atomic qualifiers when
5694 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5695 (build_atomic_assign): New functions.
5696 (build_unary_op): Use build_atomic_assign for atomic increment and
5698 (build_conditional_expr): Do not treat _Atomic void as a qualified
5700 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5701 (find_anonymous_field_with_type, convert_to_anonymous_field)
5702 (convert_for_assignment): Do not remove atomic qualifiers when
5704 (digest_init): Do not accept initialization of arrays of atomic
5705 elements by string constants.
5706 (build_asm_expr): Use convert_lvalue_to_rvalue.
5707 (build_binary_op): Do not treat _Atomic void as a qualified
5710 2013-11-06 DJ Delorie <dj@redhat.com>
5712 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5713 both explicit and builtin, print the location of the explicit one.
5715 2013-11-05 Tobias Burnus <burnus@net-b.de>
5717 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5718 c_parser_omp_distribute, c_parser_omp_teams,
5719 c_parser_omp_target, c_parser_omp_declare): Handle
5722 2013-11-03 Marek Polacek <polacek@redhat.com>
5724 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5726 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5728 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5729 check_dup_generic at the end, unless remove is true.
5730 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5732 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5734 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5736 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5737 with decl that is not pointer nor array.
5739 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5741 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5742 a spawning function is found.
5743 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5744 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5745 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5746 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5748 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5749 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5751 (c_finish_return): Added a check to reject _Cilk_spawn in return
5753 (build_cilk_spawn): New function.
5754 (build_cilk_sync): Likewise.
5755 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5757 2013-10-27 Tobias Burnus <burnus@net-b.de>
5760 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5761 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5762 (c_parser_statement_after_labels): Update calls.
5764 2013-10-24 Tobias Burnus <burnus@net-b.de>
5767 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5768 Handle PRAGMA_IVDEP.
5769 (c_parser_statement_after_labels): Update call.
5771 2013-10-24 Marek Polacek <polacek@redhat.com>
5773 * c-parser.c (c_parser_struct_declaration): Add a comment.
5774 (c_parser_declarator): Don't allow _Alignas here.
5776 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5778 * c-parser.c: Include omp-low.h.
5779 * c-typeck.c: Likewise.
5781 2013-10-17 Marek Polacek <polacek@redhat.com>
5784 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5785 Document syntax of the array-declarator.
5786 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5788 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5789 (c_parser_struct_declaration): Likewise.
5790 (c_parser_declarator): Likewise.
5791 (c_parser_direct_declarator_inner): Likewise.
5792 (c_parser_parameter_declaration): Likewise.
5793 (c_parser_type_name): Likewise.
5795 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5797 * c-lang.h (current_omp_declare_target_attribute): New extern
5799 * c-parser.c: Include c-lang.h.
5800 (struct c_parser): Change tokens to c_token *.
5801 Add tokens_buf field. Change tokens_avail type to unsigned int.
5802 (c_parser_consume_token): If parser->tokens isn't
5803 &parser->tokens_buf[0], increment parser->tokens.
5804 (c_parser_consume_pragma): Likewise.
5805 (enum pragma_context): Add pragma_struct and pragma_param.
5806 (c_parser_external_declaration): Adjust
5807 c_parser_declaration_or_fndef caller.
5808 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5809 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5810 Adjust recursive call.
5811 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5813 (c_parser_parameter_declaration): Use pragma_param instead of
5815 (c_parser_compound_statement_nostart, c_parser_label,
5816 c_parser_for_statement): Adjust
5817 c_parser_declaration_or_fndef callers.
5818 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5819 it through to c_parser_conditional_expression.
5820 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5821 pass it through to c_parser_binary_expression. Adjust recursive
5823 (c_parser_binary_expression): Remove prec argument, add
5824 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5825 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5826 binop matches it, use build2 instead of parser_build_binary_op.
5827 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5828 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5829 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5830 Handle pragma_struct and pragma_param the same as pragma_external.
5831 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5832 (c_parser_omp_variable_list): Parse array sections for
5833 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5834 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5835 (c_parser_omp_clause_reduction): Handle user defined reductions.
5836 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5837 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5838 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5839 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5840 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5841 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5842 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5843 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5844 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5845 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5846 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5847 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5848 (c_parser_omp_for_loop): Add CODE argument, pass it through
5849 to c_finish_omp_for. Change last argument to cclauses,
5850 and adjust uses to grab parallel clauses from the array of all
5851 the split clauses. Adjust c_parser_binary_expression,
5852 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5853 (omp_split_clauses): New function.
5854 (c_parser_omp_simd): New function.
5855 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5856 Allow the function to be called also when parsing combined constructs,
5857 and call c_parser_omp_simd when parsing for simd.
5858 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5859 #pragma omp section, require exactly one structured-block instead of
5860 sequence of statements.
5861 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5862 Allow the function to be called also when parsing combined constructs.
5863 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5864 Allow the function to be called also when parsing combined
5866 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5867 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5868 c_parser_omp_teams, c_parser_omp_target_data,
5869 c_parser_omp_target_update, c_parser_omp_target,
5870 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5871 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5872 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5873 (c_parser_omp_construct): Add p_name and mask vars. Handle
5874 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5875 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5876 and c_parser_omp_sections callers.
5877 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5878 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5879 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5880 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5881 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5883 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5884 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5885 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5886 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5887 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5888 * c-typeck.c: Include tree-inline.h.
5889 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5890 handle_omp_array_sections_1, handle_omp_array_sections,
5891 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5892 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5893 user defined reductions.
5894 (c_tree_equal): New function.
5895 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5896 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5897 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5898 c_check_omp_declare_reduction_r): New prototypes.
5899 * c-decl.c (current_omp_declare_target_attribute): New variable.
5900 (c_decl_attributes): New function.
5901 (start_decl, start_function): Use it instead of decl_attributes.
5902 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5903 c_omp_reduction_decl, c_omp_reduction_lookup,
5904 c_check_omp_declare_reduction_r): New functions.
5906 2013-09-25 Tom Tromey <tromey@redhat.com>
5908 * Make-lang.in (c/gccspec.o): Remove.
5909 (CFLAGS-c/gccspec.o): New variable.
5910 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5911 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5912 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5914 2013-09-25 Tom Tromey <tromey@redhat.com>
5916 * Make-lang.in (c/gccspec.o): Don't use subshell.
5918 2013-09-18 Marek Polacek <polacek@redhat.com>
5921 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5922 Remove unnecessary check.
5924 2013-09-18 Marek Polacek <polacek@redhat.com>
5927 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5928 no_sanitize_undefined attribute.
5930 2013-09-13 Kai Tietz <ktietz@redhat.com>
5933 * c-decl.c (c_builtin_function_ext_scope): Remove
5934 wrong assumption that it is never called on prexisting
5937 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5939 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5941 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5943 * c-objc-common.c (c_tree_printer): Tidy.
5945 2013-08-30 Marek Polacek <polacek@redhat.com>
5947 * c-typeck.c (build_binary_op): Add division by zero and shift
5950 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5951 Joseph Myers <joseph@codesourcery.com>
5954 * c-typeck.c (c_common_type): Prefer double_type_node over
5955 other REAL_TYPE types with the same precision.
5956 (convert_arguments): Likewise.
5958 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5960 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5961 (c_initialize_diagnostics): Call a destructor for the early printer.
5963 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5965 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5966 printer initialization.
5968 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5971 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5972 check for truth values.
5973 (expand_array_notation_exprs): Added truth values case. Removed an
5974 unwanted else. Added for-loop to walk through subtrees in default
5977 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5979 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5981 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5983 * c-parser.c (struct c_generic_association): Fix typo.
5985 2013-07-23 Tom Tromey <tromey@redhat.com>
5986 Joseph Myers <joseph@codesourcery.com>
5988 * c-parser.c (struct c_generic_association): New.
5989 (c_generic_association_d): New typedef.
5990 (c_parser_generic_selection): New function.
5991 (c_parser_postfix_expression): Handle RID_GENERIC.
5993 2013-07-13 Jason Merrill <jason@redhat.com>
5996 * c-decl.c (finish_struct): Check for too-large class.
5998 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6001 * c-typeck.c (set_init_index): When folding, check for index overflow.
6003 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6005 * c-parser.c (c_parser_array_notation): Removed rejection of array
6006 notations in an array of function pointers.
6008 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6010 * c-array-notation.c (make_triplet_val_inv): New function.
6011 (create_cmp_incr): Likewise.
6012 (create_array_refs): Likewise.
6013 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6014 Also modularized common parts between functions and called the function.
6015 (build_array_notation_expr): Likewise.
6016 (fix_conditional_array_notations_1): Likewise.
6017 (fix_array_notation_expr): Likewise.
6018 (fix_array_notation_call_expr): Likewise.
6020 2013-06-18 Marek Polacek <polacek@redhat.com>
6023 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6025 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6027 * c-array-notation.c (build_array_notation_expr): Reject array notation
6028 mismatch between LHS and RHS even inside a call_expr. Also, removed
6029 a couple while statements that were dead code.
6031 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6033 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6034 excessive precision expressions in function parameters. Also removed
6035 couple unwanted while statements.
6037 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6039 * c-array-notation.c (expand_array_notation_exprs): Added
6040 ARRAY_NOTATION_REF case.
6042 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6044 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6045 function to c-family/array-notation-common.c.
6046 (is_cilkplus_reduce_builtin): Likewise.
6047 (find_rank): Likewise.
6048 (extract_array_notation_exprs): Likewise.
6049 (replace_array_notations): Likewise.
6050 (find_inv_trees): Likewise.
6051 (replace_inv_trees): Likewise.
6052 (contains_array_notation_expr): Likewise.
6053 (find_correct_array_notation_type): Likewise.
6054 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6055 (struct inv_list): Moved this to c-family/array-notation-common.c.
6056 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6058 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6060 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6061 reduction functions outside the for-loop. Added a check if the fundecl
6062 is non-NULL. Finally, removed an unwanted if-statement, and made the
6065 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6067 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6068 condition of the if-statement matches the rank of else-block and then-
6069 block when array notations are used.
6070 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6071 expression after the entire function body is parsed.
6072 (c_parser_expr_no_commas): Delayed creating array notation expressions
6073 to the end of function parsing.
6074 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6075 whole if-statement instead of just the condition.
6076 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6078 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6081 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6082 array to NULL_TREE if they are unused. Also added a check for the
6083 field to be NULL before its fields are used in future.
6085 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6088 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6089 (build_array_notation_expr): Likewise.
6091 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6093 * c-typeck.c (build_array_ref): Added a check to see if array's
6094 index is greater than one. If true, then emit an error.
6095 (build_function_call_vec): Exclude error reporting and checking
6096 for builtin array-notation functions.
6097 (convert_arguments): Likewise.
6098 (c_finish_return): Added a check for array notations as a return
6099 expression. If true, then emit an error.
6100 (c_finish_loop): Added a check for array notations in a loop
6101 condition. If true then emit an error.
6102 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6103 (build_binary_op): Added a check for array notation expr inside
6104 op1 and op0. If present, we call another function to find correct
6106 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6107 * c-parser.c (c_parser_compound_statement): Check if array
6108 notation code is used in tree, if so, then transform them into
6110 (c_parser_expr_no_commas): Check if array notation is used in LHS
6111 or RHS, if so, then build array notation expression instead of
6113 (c_parser_postfix_expression_after_primary): Added a check for
6114 colon(s) after square braces, if so then handle it like an array
6115 notation. Also, break up array notations in unary op if found.
6116 (c_parser_direct_declarator_inner): Added a check for array
6118 (c_parser_compound_statement): Added a check for array notation in
6119 a stmt. If one is present, then expand array notation expr.
6120 (c_parser_if_statement): Likewise.
6121 (c_parser_switch_statement): Added a check for array notations in
6122 a switch statement's condition. If true, then output an error.
6123 (c_parser_while_statement): Similarly, but for a while.
6124 (c_parser_do_statement): Similarly, but for a do-while.
6125 (c_parser_for_statement): Similarly, but for a for-loop.
6126 (c_parser_unary_expression): Check if array notation is used in a
6127 pre-increment or pre-decrement expression. If true, then expand
6129 (c_parser_array_notation): New function.
6130 * c-array-notation.c: New file.
6131 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6133 2013-05-23 Mike Stump <mikestump@comcast.net>
6135 * c-typeck.c (convert_for_assignment): Handle references to memory
6138 2013-05-16 Jason Merrill <jason@redhat.com>
6140 * Make-lang.in (cc1$(exeext)): Use link mutex.
6142 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6144 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6145 to simply use OPT_Wpointer_arith.
6146 (build_unary_op): Likewise.
6148 2013-04-03 Jakub Jelinek <jakub@redhat.com>
6151 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6152 argument. If set, or it temporarily for parsing of the first
6153 argument into force_folding_builtin_constant_p.
6154 (c_parser_postfix_expression): Adjust callers.
6156 2013-03-21 Richard Biener <rguenther@suse.de>
6158 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6159 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6161 2013-02-12 Marek Polacek <polacek@redhat.com>
6164 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6167 2013-01-24 Jakub Jelinek <jakub@redhat.com>
6170 * c-typeck.c (set_nonincremental_init_from_string): If
6171 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6173 (process_init_element): Likewise.
6175 2012-12-20 Jakub Jelinek <jakub@redhat.com>
6178 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6179 argument, don't call default_function_array_conversion
6180 nor c_fully_fold here.
6181 (c_parser_asm_statement): Adjust callers.
6182 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6183 and outputs here, and call default_function_array_conversion
6184 on inputs that don't need to be addressable.
6186 2012-12-18 Jakub Jelinek <jakub@redhat.com>
6189 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6190 warning require that both c_common_unsigned_type as well as
6191 c_common_signed_type is the same for both mvl and mvr types.
6193 2012-11-16 Diego Novillo <dnovillo@google.com>
6195 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6197 * c-common.c: Use new vec API in vec.h.
6198 * c-common.h: Likewise.
6199 * c-gimplify.c: Likewise.
6200 * c-pragma.c: Likewise.
6201 * c-pretty-print.c: Likewise.
6202 * c-pretty-print.h: Likewise.
6203 * c-semantics.c: Likewise.
6204 * c-decl.c: Likewise.
6205 * c-parser.c: Likewise.
6206 * c-tree.h: Likewise.
6207 * c-typeck.c: Likewise.
6209 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6212 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6214 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6217 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6218 shadows a function, unless the variable is a function or a
6219 pointer-to-function.
6221 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6224 * c-parser.c (struct c_tree_loc_pair): Removed.
6225 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6226 add location_t * and tree * arguments, fill in array of 3
6227 sizeof_arg trees and corresponding locs.
6228 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6229 c_parser_expr_list callers.
6230 (c_parser_postfix_expression_after_primary): Likewise. Pass
6231 array of 3 sizeof_arg trees and locs (corresponding to first
6232 3 arguments) to sizeof_pointer_memaccess_warning.
6234 2012-10-09 Lawrence Crowl <crowl@google.com>
6236 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6237 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6240 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6243 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6246 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
6249 * c-typeck.c: Include c-common.h.
6250 (enum stv_conv): Moved to c-common.h.
6251 (scalar_to_vector): Moved to c-common.c.
6252 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6253 * Make-lang.in: c-typeck.c depends on c-common.h.
6255 2012-10-04 Arnaud Charlet <charlet@adacore.com>
6257 * c-decl.c (c_write_global_declarations): Fix handling of
6260 2012-09-30 Sharad Singhai <singhai@google.com>
6262 * c-decl.c (c_write_global_declarations): Use a different method
6263 to determine if the dump has ben initialized.
6265 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6268 * c-typeck.c (c_cast_expr): When casting to a type requiring
6269 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6272 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6275 * c-typeck.c (build_unary_op): Pass original argument of
6276 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6277 any C_MAYBE_CONST_EXPR, if it has integer operands.
6278 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6279 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6280 to c_objc_common_truthvalue_conversion, then remove any
6281 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6282 c_objc_common_truthvalue_conversion not
6283 c_common_truthvalue_conversion.
6284 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6285 call note_integer_operands for arguments with integer operands
6286 that are not integer constants.
6288 2012-09-13 Jakub Jelinek <jakub@redhat.com>
6291 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6292 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6294 2012-08-31 Jakub Jelinek <jakub@redhat.com>
6297 * c-convert.c (convert): Don't call fold_convert_loc if
6298 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6299 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6300 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6302 2012-08-24 Jakub Jelinek <jakub@redhat.com>
6305 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6306 for nested and empty_ok arguments in the call to
6307 c_parser_declaration_or_fndef.
6309 2012-08-17 Jakub Jelinek <jakub@redhat.com>
6311 * c-tree.h (c_last_sizeof_arg): Declare.
6312 * c-parser.c (struct c_tree_loc_pair): New type.
6313 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6315 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6316 (c_parser_postfix_expression_after_primary): Likewise. Call
6317 sizeof_pointer_memaccess_warning if needed.
6318 (sizeof_ptr_memacc_comptypes): New function.
6319 * c-typeck.c (c_last_sizeof_arg): New global variable.
6320 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6322 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
6324 * c-lang.h (lang_decl): Add variable_size GTY option.
6326 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6328 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6329 * Make-lang.in: Fix dependencies.
6331 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6333 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6334 and add language Makefile hooks.
6335 * config-lang.in: New file.
6336 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6337 add the required "normal" config-lang.in rules.
6338 * c-lang.h: Moved from gcc/ to here.
6339 * c-tree.h: Likewise.
6340 * c-objc-common.c: Likewise.
6341 * c-objc-common.h: Likewise.
6342 * c-typeck.c: Likewise.
6343 * c-convert.c: Likewise.
6344 * c-lang.c: Likewise.
6345 * c-aux-info.c: Likewise.
6346 * c-errors.c: Likewise.
6347 * gccspec.c: Likewise.
6348 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6349 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6351 Copyright (C) 2012-2019 Free Software Foundation, Inc.
6353 Copying and distribution of this file, with or without modification,
6354 are permitted in any medium without royalty provided the copyright
6355 notice and this notice are preserved.