1 2019-10-02 Joseph Myers <joseph@codesourcery.com>
3 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
6 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
8 * c-objc-common.c (useful_aka_type_p): New function.
9 (print_type): Use it to decide whether an aka type is worth printing.
11 2019-09-27 Jakub Jelinek <jakub@redhat.com>
14 * c-parser.c (c_parser_predefined_identifier): New function.
15 (c_parser_postfix_expression): Use it.
16 (c_parser_omp_variable_list): Parse predefined identifiers.
17 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
18 in shared and firstprivate clauses, even when they are predetermined
21 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
23 * c-typeck.c (build_function_call_vec): Take the original function
24 decl as an optional final parameter. Pass all built-in calls to
25 check_builtin_function_arguments.
27 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
30 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
31 of identifiers in the external scope only for variables and functions.
33 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
36 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
38 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
41 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
42 after determining that the first token is not
43 PRAGMA_GCC_PCH_PREPROCESS.
45 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
47 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
48 FUNCTION_DECL to the right value in the presence of nested declarators.
50 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
53 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
55 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
58 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
59 of a built_in_function.
60 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
62 2019-08-10 Jakub Jelinek <jakub@redhat.com>
64 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
65 (c_parser_omp_clause_device_type): New function.
66 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
67 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
68 (c_parser_omp_declare_target): Handle device_type clauses. Remove
69 diagnostics for declare target with clauses nested in clause-less
70 declare target declaration-definition-seq.
71 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
73 2019-08-09 Jakub Jelinek <jakub@redhat.com>
75 * c-parser.c (check_no_duplicate_clause): Simplify using
77 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
78 directive name modifiers.
79 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
82 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
83 check_no_duplicate_clause call. Comment it out, instead emit a
84 warning for duplicate dist_schedule clauses.
86 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
88 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
90 2019-08-08 Jakub Jelinek <jakub@redhat.com>
92 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
93 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
94 instead of generic_head to track duplicates.
96 2019-08-07 Jakub Jelinek <jakub@redhat.com>
98 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
99 (c_parser_omp_clause_use_device_addr): New function.
100 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
101 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
102 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
103 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
104 map or use_device_* clauses.
105 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
106 in OpenMP, require pointer type rather than pointer or array type.
107 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
109 2019-07-31 Jakub Jelinek <jakub@redhat.com>
112 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
113 even if finish is UNKNOWN_LOCATION, just use start as finish in that
116 2019-07-25 Martin Liska <mliska@suse.cz>
117 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
120 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
122 2019-07-25 Martin Liska <mliska@suse.cz>
124 * c-decl.c (merge_decls): Use new macros
125 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
127 2019-07-23 Richard Biener <rguenther@suse.de>
129 PR tree-optimization/83518
130 * gimple-parser.c (c_parser_parse_gimple_body): When we have
131 a CFG also rebuild cgraph edges.
133 2019-07-20 Jakub Jelinek <jakub@redhat.com>
135 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
136 (c_parser_omp_clause_bind): New function.
137 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
138 (OMP_LOOP_CLAUSE_MASK): Define.
139 (c_parser_omp_loop): New function.
140 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
141 loop combined with parallel or teams.
142 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
143 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
145 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
148 * c-decl.c (finish_function): Check targetm.warn_func_return
149 before issuing a -Wreturn-type warning.
151 2019-07-12 Alexandre Oliva <oliva@adacore.com>
153 * gimple-parser.c (c_parser_gimple_try_stmt): New.
154 (c_parser_compound_statement): Call it.
156 2019-07-12 Jakub Jelinek <jakub@redhat.com>
158 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
159 (c_parser_omp_clause_order): New function.
160 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
161 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
162 PRAGMA_OMP_CLAUSE_ORDER.
163 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
165 2019-07-10 Richard Biener <rguenther@suse.de>
167 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
168 _Literal (int *) &x for address literals.
170 2019-07-09 Martin Sebor <msebor@redhat.com>
173 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
175 (field_decl_cmp): Same.
176 * c-parser.c (c_parser_struct_or_union_specifier): Same.
178 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
180 2019-07-09 Martin Sebor <msebor@redhat.com>
183 * c-decl.c: Change class-key from class to struct and vice versa
184 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
185 * gimple-parser.c: Same.
187 2019-07-01 Richard Biener <rguenther@suse.de>
189 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
190 _Literal (char *) &"foo" for address literals pointing to
193 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
195 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
196 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
197 C incompatibility if alternate "__intN__" form is used.
199 2019-06-24 Martin Sebor <msebor@redhat.com>
201 * c-typeck.c (build_binary_op): Hyphenate floating-point.
203 2019-06-10 Jakub Jelinek <jakub@redhat.com>
205 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
206 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
207 (c_parser_omp_scan_loop_body): New function.
208 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
209 inscan reduction clauses.
210 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
211 non-inscan reductions on the same construct, or inscan reductions with
212 ordered or schedule clauses, or inscan array reductions.
214 2019-06-05 Martin Sebor <msebor@redhat.com>
217 * c-typeck.c (c_finish_return): Only consider functions returning
218 pointers as candidates for -Wreturn-local-addr.
220 2019-06-05 Martin Sebor <msebor@redhat.com>
222 * c-decl.c (start_decl): Adjust quoting and hyphenation
226 (start_function): Same.
227 (declspecs_add_type): Same.
228 * c-parser.c (warn_for_abs): Same.
229 * c-typeck.c (build_binary_op): Same.
231 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
234 * c-parser.c (c_finish_oacc_routine): Rework checking if already
235 marked with an OpenACC 'routine' directive.
238 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
239 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
242 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
243 clauses from "omp declare target" attribute.
245 2019-05-16 Martin Sebor <msebor@redhat.com>
247 * c-decl.c (start_decl): Quote keywords, operators, and
248 types in diagnostics.
250 * c-parser.c (c_parser_asm_statement): Same.
251 (c_parser_conditional_expression): Same.
252 (c_parser_transaction_cancel): Same.
253 * c-typeck.c (c_common_type): Same.
254 (build_conditional_expr): Same.
256 (process_init_element): Same.
257 (build_binary_op): Same.
259 2019-05-17 Richard Biener <rguenther@suse.de>
261 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
262 (c_parser_gimple_unary_expression): Likewise.
263 (c_parser_gimple_parentized_ternary_expression): New function.
265 2019-05-16 Richard Biener <rguenther@suse.de>
267 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
268 (c_parser_gimple_unary_expression): Likewise.
270 2019-05-15 Richard Biener <rguenther@suse.de>
272 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
275 2019-05-14 Richard Biener <rguenther@suse.de>
277 * gimple-parser.c (c_parser_gimple_statement): Remove
278 questionable auto-promotion to VIEW_CONVERT_EXPR.
279 (c_parser_gimple_typespec): Split out from __MEM parsing.
280 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
281 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
282 as __VIEW_CONVERT with -gimple.
284 2019-05-09 Martin Liska <mliska@suse.cz>
286 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
288 (c_parser_gimple_unary_expression): Parse also binary expression
290 (c_parser_gimple_parentized_binary_expression): New function.
292 2019-05-09 Martin Liska <mliska@suse.cz>
294 * gimple-parser.c (struct gimple_parser): Add probability.
295 for gimple_parser_edge.
296 (gimple_parser::push_edge): Add new argument probability.
297 (c_parser_gimple_parse_bb_spec): Parse also probability
299 (c_parser_parse_gimple_body): Set edge probability.
300 (c_parser_gimple_compound_statement): Consume token
301 before calling c_parser_gimple_goto_stmt.
303 (c_parser_gimple_statement): Pass new argument.
304 (c_parser_gimple_goto_stmt): Likewise.
305 (c_parser_gimple_if_stmt): Likewise.
306 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
307 * c-parser.c (c_parser_declaration_or_fndef): Pass
308 hot_bb_threshold argument.
309 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
311 (c_parser_gimple_parse_bb_spec_edge_probability): New.
313 2019-04-26 Jakub Jelinek <jakub@redhat.com>
316 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
317 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
318 (c_parser_do_statement): Likewise.
319 (c_parser_for_statement): Likewise. Formatting fixes.
320 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
321 emit DEBUG_BEGIN_STMTs if needed.
323 2019-04-19 Jakub Jelinek <jakub@redhat.com>
326 * c-typeck.c (struct c_switch): Remove outside_range_p member.
327 (c_start_case): Don't clear it.
328 (do_case): Adjust c_add_case_label caller.
329 (c_finish_case): Adjust c_do_switch_warnings caller.
332 * c-decl.c (merge_decls): If remove is main variant and
333 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
334 variant that has newdecl as TYPE_NAME if any.
336 2019-04-12 Jakub Jelinek <jakub@redhat.com>
339 * c-decl.c (merge_decls): When newdecl's type is its main variant,
340 don't try to remove it from the variant list, but instead assert
343 2019-04-01 Richard Biener <rguenther@suse.de>
346 * c-tree.h (c_get_alias_set): Declare.
347 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
348 * c-objc-common.c (c_get_alias_set): Treat enumeral types
349 as the underlying integer type.
351 2019-03-19 Martin Sebor <msebor@redhat.com>
353 PR tree-optimization/89688
354 * c-decl.c (finish_decl): Call braced_lists_to_string for more
355 kinds of initializers.
357 2019-03-19 Jakub Jelinek <jakub@redhat.com>
360 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
361 return type even if quals_used is 0. Formatting fixes.
363 2019-03-14 Richard Biener <rguenther@suse.de>
365 * c-tree.h (enum c_declspec_il): New.
366 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
368 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
369 Pass start pass and declspec_il to c_parser_parse_gimple_body.
370 (c_parser_declspecs): Adjust.
371 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
372 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
374 (struct gimple_parser): New.
375 (gimple_parser::push_edge): New method.
376 (c_parser_gimple_parse_bb_spec): New helper.
377 (c_parser_parse_gimple_body): Get start pass and IL specification.
378 Initialize SSA and CFG.
379 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
380 Build a gimple_parser parsing state and pass it along.
381 (c_parser_gimple_statement): Change intermittend __PHI internal
382 function argument for the edge.
383 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
384 (c_parser_gimple_goto_stmt): Record edges to build.
385 (c_parser_gimple_if_stmt): Likewise.
386 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
387 (c_parser_gimple_or_rtl_pass_list): Likewise.
389 2019-03-11 Martin Liska <mliska@suse.cz>
391 * c-decl.c (check_for_loop_decls): Wrap an option name
392 in a string format message and fix GNU coding style.
393 * c-parser.c (c_parser_declspecs): Likewise.
395 2019-03-08 Jakub Jelinek <jakub@redhat.com>
397 PR tree-optimization/89550
398 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
400 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
401 or warning returned true.
403 2019-02-28 Jakub Jelinek <jakub@redhat.com>
406 * c-typeck.c (convert_arguments): Call inform_declaration only if
407 the previous warning_at call returned true.
409 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
411 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
412 parameter. Adjust all users.
413 (c_parser_oacc_simple_clause): Replace parser with loc formal
414 parameter. Adjust all users.
416 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
419 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
420 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
422 2019-02-15 Jakub Jelinek <jakub@redhat.com>
425 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
426 before c_decl_attributes rather than after it.
428 2019-02-06 Jakub Jelinek <jakub@redhat.com>
431 * c-parser.c (c_parser_declaration_or_fndef): Don't update
432 DECL_ARGUMENTS of d if it has been defined already. Use a single if
433 instead of 3 nested ifs.
435 2019-02-06 Joseph Myers <joseph@codesourcery.com>
438 * c-decl.c (finish_decl): Do not complete array types for arrays
439 with external linkage not at file scope.
441 2019-02-05 Richard Biener <rguenther@suse.de>
444 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
445 all type variants when not supported.
447 2019-01-30 Jakub Jelinek <jakub@redhat.com>
450 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
451 * c-decl.c (decl_jump_unsafe): Return false for
452 C_DECL_COMPOUND_LITERAL_P decls.
453 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
455 2019-01-29 Jakub Jelinek <jakub@redhat.com>
458 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
462 * c-decl.c (last_fileptr_type): Remove.
463 (last_structptr_types): New variable.
464 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
465 {old,new}rettype instead of the types themselves. Assert
466 last_structptr_types array has the same number of elements
467 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
468 argument oldtype and newtype. Instead of handling
469 just fileptr_type_node specially, handle all builtin_structptr_types
470 pointer nodes. Formatting fix.
472 2019-01-24 Martin Sebor <msebor@redhat.com>
477 * c-decl.c (match_builtin_function_types): Add arguments.
478 (diagnose_mismatched_decls): Diagnose mismatched declarations
479 of built-ins more strictly.
481 2019-01-24 Jakub Jelinek <jakub@redhat.com>
484 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
485 on #pragma omp cancel with different modifiers.
487 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
491 * c-typeck.c (convert_for_assignment): Upate the
492 warn_for_address_or_pointer_of_packed_member call.
494 2019-01-16 Tom Honermann <tom@honermann.net>
495 Jason Merrill <jason@redhat.com>
497 * c-typeck.c (digest_init): Revised the error message produced for
498 ill-formed cases of array initialization with a string literal.
499 (error_init): Make variadic.
501 2019-01-12 Jakub Jelinek <jakub@redhat.com>
503 * c-typeck.c (convert_for_assignment): Fix a comment typo.
505 2019-01-07 Jakub Jelinek <jakub@redhat.com>
508 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
509 if current_function_decl is non-NULL.
511 2019-01-07 Joseph Myers <joseph@codesourcery.com>
515 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
516 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
517 functions declared but never defined only for external scope, not
520 2019-01-07 Jakub Jelinek <jakub@redhat.com>
523 * c-parser.c (c_parser_postfix_expression): Parse
524 __builtin_convertvector.
526 2019-01-01 Jakub Jelinek <jakub@redhat.com>
528 Update copyright years.
530 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
533 * c-typeck.c (convert_for_assignment): Call
534 warn_for_address_or_pointer_of_packed_member.
536 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
538 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
539 a more specific error message (instead of just falling through).
541 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
543 * c-parser.c (c_parser_asm_statement): Keep track of the location each
544 asm qualifier is first seen; use that to give nicer "duplicate asm
545 qualifier" messages. Delete 'quals" variable, instead pass the
546 "is_volatile_ flag to build_asm_stmt directly.
547 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
548 * c-typeck.c (build_asm_stmt): Ditto; adjust.
550 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
552 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
553 "done" boolean variable.
555 2018-12-19 David Malcolm <dmalcolm@redhat.com>
558 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
559 Move from here to gcc-rich-location.h and gcc-rich-location.c.
560 (build_binary_op): Use struct op_location_t and
561 class binary_op_rich_location.
563 2018-12-11 Jakub Jelinek <jakub@redhat.com>
566 * c-convert.c (convert): Call c_fully_fold before calling
567 ubsan_instrument_float_cast.
569 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
571 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
574 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
576 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
577 after asm. Pass a flag for it to build_asm_expr.
578 * c-tree.h (build_asm_expr): Update declaration.
579 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
582 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
585 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
586 combination of volatile and goto, in any order, without repetitions.
588 2018-12-04 James Norris <jnorris@codesourcery.com>
589 Cesar Philippidis <cesar@codesourcery.com>
590 Julian Brown <julian@codesourcery.com>
592 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
595 2018-11-30 Richard Biener <rguenther@suse.de>
597 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
598 _Literal (type) { ... } as empty aggregate or vector constructor.
600 2018-11-29 Martin Sebor <msebor@redhat.com>
603 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
604 (convert_arguments): Add comments. Pass additional argument to
607 2018-11-29 Martin Sebor <msebor@redhat.com>
611 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
613 2018-11-23 Martin Sebor <msebor@redhat.com>
616 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
617 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
619 2018-11-20 Martin Sebor <msebor@redhat.com>
621 * c-parser.c (c_parser_has_attribute_expression): New function.
622 (c_parser_attribute): New function.
623 (c_parser_attributes): Move code into c_parser_attribute.
624 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
626 2018-11-15 Martin Sebor <msebor@redhat.com>
629 * c-decl.c (header_for_builtin_fn): Declare.
630 (diagnose_mismatched_decls): Diagnose declarations of built-in
631 functions without a prototype.
632 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
633 (convert_argument): Same.
634 (convert_arguments): Factor code out into convert_argument.
635 Detect mismatches between built-in formal arguments in calls
636 to built-in without prototype.
637 (build_conditional_expr): Same.
638 (type_or_builtin_type): New function.
639 (convert_for_assignment): Add argument. Conditionally issue
640 warnings instead of errors for mismatches.
642 2018-11-13 David Malcolm <dmalcolm@redhat.com>
644 * c-decl.c: Replace "source_location" with "location_t".
645 * c-tree.h: Likewise.
646 * c-typeck.c: Likewise.
647 * gimple-parser.c: Likewise.
649 2018-11-09 Jakub Jelinek <jakub@redhat.com>
651 * c-parser.c (c_parser_omp_clause_final): Use
652 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
653 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
654 parsing instead of c_parser_paren_condition.
655 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
656 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
657 c_fully_fold instead of c_parser_condition.
658 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
659 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
660 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
661 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
662 c_parser_expr_no_commas instead of c_parser_expression.
664 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
665 reduction clause with inscan modifier.
667 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
668 clauses other than atomic_default_mem_order.
670 2018-11-08 Jakub Jelinek <jakub@redhat.com>
672 * c-parser.c: Include memmode.h.
673 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
674 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
675 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
676 task_reduction clauses.
677 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
678 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
679 section, or lvalue assignment expression.
680 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
681 (c_parser_omp_clause_lastprivate): Parse optional
682 conditional: modifier.
683 (c_parser_omp_clause_hint): Require constant integer expression rather
684 than just integer expression.
685 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
687 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
688 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
689 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
691 (c_parser_omp_clause_depend): Parse iterator modifier and handle
692 iterators. Parse mutexinoutset and depobj kinds.
693 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
695 (c_parser_omp_all_clauses): Likewise. Handle
696 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
697 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
698 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
699 default memory order from requires directive if any. Adjust
700 c_finish_omp_atomic caller.
701 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
702 (c_parser_omp_flush): Parse flush with memory-order-clause.
703 (c_parser_omp_for_loop): Allow NE_EXPR even in
704 OpenMP loops, adjust c_finish_omp_for caller.
705 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
706 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
707 Allow to be called while parsing combined parallel master.
708 Parse combined master taskloop{, simd}.
709 (c_parser_omp_parallel): Parse combined
710 parallel master{, taskloop{, simd}} constructs.
711 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
712 (OMP_TASKGROUP_CLAUSE_MASK): Define.
713 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
714 (OMP_TASKWAIT_CLAUSE_MASK): Define.
715 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
716 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
717 around teams body. Use SET_EXPR_LOCATION.
718 (c_parser_omp_target_data): Allow target data
719 with only use_device_ptr clauses.
720 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
721 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
722 (c_parser_omp_requires): New function.
723 (c_finish_taskloop_clauses): New function.
724 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
725 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
726 declaration. Disallow in_reduction clause when combined with parallel
728 (c_parser_omp_construct): Adjust c_parser_omp_master and
729 c_parser_omp_taskgroup callers.
730 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
732 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
733 like OMP_CLAUSE_REDUCTION.
734 (handle_omp_array_sections): Likewise. Call save_expr on array
735 reductions before calling build_index_type. Handle depend clauses
737 (struct c_find_omp_var_s): New type.
738 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
739 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
740 with static, runtime or auto schedule kinds. Call save_expr for whole
741 array reduction sizes. Diagnose reductions with zero sized elements
742 or variable length structures. Diagnose nogroup clause used with
743 reduction clause(s). Handle depend clause with
744 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
745 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
746 some different type for other kinds. Use build_unary_op with
747 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
748 Handle depend clauses with iterators. Remove no longer needed special
749 case that predetermined const qualified vars may be specified in
750 firstprivate clause. Complain if const qualified vars are mentioned
751 in data-sharing clauses other than firstprivate or shared. Use
752 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
753 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
754 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
755 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
757 2018-10-29 David Malcolm <dmalcolm@redhat.com>
759 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
760 logic for change to name_hint::operator bool.
761 (undeclared_variable): Likewise.
762 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
763 (c_parser_parameter_declaration): Likewise.
765 2018-10-17 Joseph Myers <joseph@codesourcery.com>
767 * c-errors.c (pedwarn_c11): New function.
768 * c-parser.c (disable_extension_diagnostics): Save
769 warn_c11_c2x_compat and set it to 0.
770 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
771 (c_parser_static_assert_declaration_no_semi): Handle
772 _Static_assert without string constant.
773 * c-tree.h (pedwarn_c11): New prototype.
775 2018-10-17 David Malcolm <dmalcolm@redhat.com>
777 * Make-lang.in (selftest-c): New.
778 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
779 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
780 from gcc/Makefile.in.
782 2018-10-02 Richard Biener <rguenther@suse.de>
784 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
786 2018-09-26 Joseph Myers <joseph@codesourcery.com>
789 * c-typeck.c (build_binary_op): Use excess precision for
790 comparisons of integers and floating-point for C11 and later.
792 2018-09-26 Martin Jambor <mjambor@suse.cz>
795 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
798 2018-09-17 David Malcolm <dmalcolm@redhat.com>
800 * c-objc-common.c (range_label_for_type_mismatch::get_text):
801 Update for new param.
802 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
805 2018-09-17 Martin Jambor <mjambor@suse.cz>
808 * c-parser.c: (warn_for_abs): New function.
809 (c_parser_postfix_expression_after_primary): Call it.
811 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
813 * c-typeck.c (digest_init): Shorten overlength strings.
815 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
817 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
819 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
821 * c-decl.c (finish_decl): Call braced_list_to_string here ...
822 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
824 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
826 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
827 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
829 2018-08-27 David Malcolm <dmalcolm@redhat.com>
832 * c-decl.c (implicitly_declare): Update call to
833 maybe_add_include_fixit to suggest overriding the location, as it
835 * c-objc-common.c (c_tree_printer): Update for conversion of
836 show_caret_p to a tri-state.
838 2018-08-27 Martin Liska <mliska@suse.cz>
840 * c-decl.c (locate_old_decl): Use new function
841 fndecl_built_in_p and remove check for FUNCTION_DECL if
843 (diagnose_mismatched_decls): Likewise.
844 (merge_decls): Likewise.
845 (warn_if_shadowing): Likewise.
846 (pushdecl): Likewise.
847 (implicitly_declare): Likewise.
848 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
849 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
850 * c-typeck.c (build_function_call_vec): Likewise.
851 (convert_arguments): Likewise.
853 2018-08-20 David Malcolm <dmalcolm@redhat.com>
856 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
857 (diagnose_mismatched_decls): Likewise, in various places.
858 (warn_if_shadowing): Likewise.
859 (implicit_decl_warning): Likewise.
860 (implicitly_declare): Likewise.
861 (undeclared_variable): Likewise.
862 (declare_label): Likewise.
863 (grokdeclarator): Likewise.
864 (start_function): Likewise.
865 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
866 (c_parser_parameter_declaration): Likewise.
867 (c_parser_binary_expression): Likewise.
868 * c-typeck.c (c_expr_sizeof_expr): Likewise.
869 (parser_build_binary_op): Likewise.
870 (build_unary_op): Likewise.
871 (error_init): Likewise.
872 (pedwarn_init): Likewise.
873 (warning_init): Likewise.
874 (convert_for_assignment): Likewise.
876 2018-08-15 David Malcolm <dmalcolm@redhat.com>
878 * c-objc-common.c: Include "gcc-rich-location.h".
879 (c_tree_printer): Move implemenation of '%T' to...
880 (print_type): ...this new function.
881 (range_label_for_type_mismatch::get_text): New function.
882 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
883 range for the various ic_argpass cases.
884 (class maybe_range_label_for_tree_type_mismatch): New class.
885 (build_binary_op): Use it when calling binary_op_error.
887 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
889 * c-decl.c (start_decl): Do not warn if variables is named as main
890 and is a local variable.
892 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
895 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
896 objects of unknown size.
898 2018-08-13 Martin Sebor <msebor@redhat.com>
900 PR tree-optimization/71625
901 * c-parser.c (c_parser_declaration_or_fndef): Call
902 braced_list_to_string.
904 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
907 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
910 2018-08-01 Martin Sebor <msebor@redhat.com>
912 PR tree-optimization/86650
913 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
914 and TREE_BLOCK (t) from within percent_K_format to this callsite.
916 2018-08-01 Jakub Jelinek <jakub@redhat.com>
919 * c-typeck.c (init_field_decl_cmp): New function.
920 (output_pending_init_elements): Use it for field comparisons
921 instead of pure bit_position comparisons.
923 2018-07-12 Jakub Jelinek <jakub@redhat.com>
925 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
926 type here, instead add "omp declare target implicit" attribute.
927 (finish_decl): Diagnose vars without mappable type here.
929 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
930 Thomas Schwinge <thomas@codesourcery.com>
931 Cesar Philippidis <cesar@codesourcery.com>
933 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
934 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
935 to their non-present_or_* counterparts. Make 'self' an alias to
936 PRAGMA_OACC_CLAUSE_HOST.
937 (c_parser_oacc_data_clause): Update GOMP mappings for
938 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
939 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
940 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
941 Remove support for present_or_* clauses.
942 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
943 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
944 (OACC_DECLARE_CLAUSE_MASK): Likewise.
945 (OACC_DATA_CLAUSE_MASK): Likewise.
946 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
947 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
948 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
949 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
950 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
952 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
954 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
955 * gimple-parser.c (c_parser_gimple_statement): Likewise.
956 (c_parser_gimple_unary_expression): Likewise.
958 2018-06-15 Jakub Jelinek <jakub@redhat.com>
961 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
962 before doing POINTER_DIFF_EXPR.
964 2018-06-07 Marek Polacek <polacek@redhat.com>
967 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
968 for loop initial declarations.
970 2018-05-30 David Pagan <dave.pagan@oracle.com>
973 * c-decl.c (grokdeclarator): Update check for return type warnings.
974 (start_function): Likewise.
975 (finish_function): Likewise.
976 * c-typeck.c (c_finish_return): Update check for return type warnings.
977 Pass OPT_Wreturn_type to pedwarn when appropriate.
979 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
981 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
984 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
986 * gimple-parser.c: Include internal-fn.h.
987 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
988 (c_parser_gimple_call_internal): New function.
989 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
990 Fix typos in comment.
992 2018-05-10 Jakub Jelinek <jakub@redhat.com>
995 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
996 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
998 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
999 fold_offsetof_1, pass argtype as TYPE to it and drop the
1002 2018-05-02 David Pagan <dave.pagan@oracle.com>
1005 * c-decl.c (old_style_parameter_scope): New function.
1006 * c-parser.c (c_parser_postfix_expression): Check for statement
1007 expressions in old-style function parameter list declarations.
1008 * c-parser.h (old_style_parameter_scope): New extern declaration.
1010 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1013 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1014 it is not TREE_STATIC.
1015 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1016 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1017 its COMPOUND_LITERAL_EXPR_DECL.
1019 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1021 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1022 where all functions return the same _FloatN or _FloatNx type,
1023 treat integer types as _Float64 instead of double.
1025 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1028 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1029 building vector comparison, diagnose it and return error_mark_node.
1031 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1034 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1035 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1036 INTEGER_TYPE element type.
1038 2018-03-13 David Pagan <dave.pagan@oracle.com>
1041 * c-typeck.c (output_init_element): Ensure field initializer
1042 expression is always evaluated if there are side effects.
1044 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1047 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1048 !building_stmt_list_p ().
1050 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1053 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1054 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1055 and include the BIND_EXPR in the list of things that need to be
1058 2018-02-09 Nathan Sidwell <nathan@acm.org>
1061 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1062 to strict_aliasing_warning.
1064 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1066 * c-typeck.c (really_start_incremental_init, push_init_level,
1067 set_nonincremental_init, output_init_element, process_init_element):
1068 Use DECL_UNNAMED_BIT_FIELD.
1070 2018-01-31 Marek Polacek <polacek@redhat.com>
1073 * c-parser.c (c_parser_compound_statement_nostart): Call
1074 expansion_point_location_if_in_system_header.
1076 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1079 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1082 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1085 * c-tree.h (decl_constant_value_1): Add a bool argument.
1086 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1087 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1088 (decl_constant_value): Adjust caller.
1089 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1090 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1091 decl_constant_value returns initializer that has BLKmode or
1093 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1095 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1096 Alan Hayward <alan.hayward@arm.com>
1097 David Sherwood <david.sherwood@arm.com>
1099 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1100 TYPE_VECTOR_SUBPARTS.
1102 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1104 Update copyright years.
1106 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1109 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1110 c_parser_conditional_expression, c_parser_cast_expression,
1111 c_parser_sizeof_expression, c_parser_alignof_expression,
1112 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1113 c_parser_transaction_expression): Use set_error () method instead
1114 of setting value member to error_mark_node.
1116 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1118 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1119 and _Float<N>X built-in functions.
1121 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1124 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1125 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1126 incomplete vars rather than after it.
1129 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1130 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1131 and consider empty ones if there are no other stmts. For
1132 -Wunused-value walk all statements before the one only followed by
1135 2017-12-22 Mike Stump <mikestump@comcast.net>
1136 Eric Botcazou <ebotcazou@adacore.com>
1138 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1139 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1140 (c_parser_do_statement): Likewise.
1141 (c_parser_for_statement): Likewise.
1142 (c_parser_statement_after_labels): Adjust calls to above.
1143 (c_parse_pragma_ivdep): New static function.
1144 (c_parser_pragma_unroll): Likewise.
1145 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1146 <PRAGMA_UNROLL>: New case.
1148 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1150 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1151 perform_integral_promotions, digest_init): Replace Yoda conditions
1152 with typical order conditions.
1153 * c-decl.c (check_bitfield_type_and_width): Likewise.
1155 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1157 * c-typeck.c (c_safe_arg_type_equiv_p,
1158 c_safe_function_type_cast_p): New function.
1159 (build_c_cast): Implement -Wcast-function-type.
1161 2017-12-14 Richard Biener <rguenther@suse.de>
1164 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1165 like REALPART_EXPR for the behavior of whether its operand
1168 2017-12-12 Marek Polacek <polacek@redhat.com>
1171 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1173 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1175 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1176 * c-parser.c (add_debug_begin_stmt): New.
1177 (c_parser_declaration_or_fndef): Call it.
1178 (c_parser_compound_statement_nostart): Likewise.
1179 (c_parser_statement_after_labels): Likewise.
1180 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1182 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1184 * c-decl.c (build_compound_literal): Add parameter alignas_align
1185 and set alignment of decl if nonzero.
1186 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1187 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1189 (c_parser_struct_declaration): Update syntax comment.
1190 (c_parser_type_name): Add alignas_ok argument and pass it to
1192 (c_parser_cast_expression): Pass true to c_parser_type_name and
1193 give error if a cast used an _Alignas specifier.
1194 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1195 give error if sizeof (type-name) used an _Alignas specifier.
1196 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1197 give error if _Alignof (type-name) used an _Alignas specifier.
1198 (c_parser_postfix_expression_after_paren_type): Check specified
1199 alignment for a compound literal and pass it to
1200 build_compound_literal.
1201 * c-parser.h (c_parser_type_name): Update prototype.
1202 * c-tree.h (build_compound_literal): Update prototype.
1204 2017-12-07 Martin Sebor <msebor@redhat.com>
1207 * c-decl.c (c_decl_attributes): Look up existing declaration and
1208 pass it to decl_attributes.
1210 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1213 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1214 reserved for use by the implementation.
1216 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1218 * c-decl.c: Include "c-family/c-spellcheck.h".
1220 2017-12-05 Martin Liska <mliska@suse.cz>
1221 Jakub Jelinek <jakub@redhat.com>
1223 * c-typeck.c (pointer_diff): Add new argument and instrument
1224 pointer subtraction.
1225 (build_binary_op): Similar for pointer comparison.
1227 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1230 * c-parser.c: Include tree-iterator.h.
1231 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1232 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1236 * c-tree.h (decl_constant_value_1): Declare.
1237 * c-typeck.c (decl_constant_value_1): New function.
1238 (decl_constant_value): Use it.
1239 * c-fold.c (c_fully_fold_internal): If in_init, use
1240 decl_constant_value_1 instead of decl_constant_value.
1242 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1244 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1246 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1249 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1250 c_switch_covers_all_cases_p returns true.
1252 2017-11-28 Julia Koval <julia.koval@intel.com>
1253 Sebastian Peryt <sebastian.peryt@intel.com>
1255 * Make-lang.in (c/c-array-notation.o): Remove.
1256 * c-array-notation.c: Delete.
1257 * c-decl.c: Remove cilkplus condition.
1258 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1259 c_parser_cilk_verify_simd, c_parser_array_notation,
1260 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1261 c_parser_cilk_simd_fn_vector_attrs,
1262 c_finish_cilk_simd_fn_tokens): Delete.
1263 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1264 (c_parser_direct_declarator_inner): Ditto.
1265 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1266 (c_parser_attributes, c_parser_compound_statement,
1267 c_parser_statement_after_labels, c_parser_if_statement,
1268 c_parser_switch_statement, c_parser_while_statement,
1269 c_parser_do_statement, c_parser_for_statement,
1270 c_parser_unary_expression, c_parser_postfix_expression,
1271 c_parser_postfix_expression_after_primary,
1272 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1273 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1275 * c-typeck.c (build_array_ref, build_function_call_vec,
1277 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1278 c_finish_loop, build_binary_op): Remove cilkplus support.
1280 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1282 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1285 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1287 * Make-lang.in (c.install-plugin): Install backend import library.
1289 2017-11-23 Jakub Jelinek <jakub@redhat.com>
1291 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1292 pragma_stmt context.
1294 2017-11-23 Mike Stump <mikestump@comcast.net>
1295 Eric Botcazou <ebotcazou@adacore.com>
1297 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1299 (c_parser_do_statement): Likewise.
1300 (c_parser_for_statement): Likewise.
1302 2017-11-22 David Malcolm <dmalcolm@redhat.com>
1305 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1306 bool to bool *. Within '%T' handling, if showing an "aka", use
1307 "quoted" param to add appropriate quoting.
1309 2017-11-22 Marek Polacek <polacek@redhat.com>
1314 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1316 2017-11-21 David Malcolm <dmalcolm@redhat.com>
1319 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1320 earlier failed lookups.
1322 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1324 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1325 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1327 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1330 * c-decl.c: Include "c-family/known-headers.h".
1331 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1332 to known-headers.cc.
1333 (class suggest_missing_header): Move to known-header.h.
1334 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1335 than get_c_name_hint.
1337 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1339 * c-decl.c (get_c_name_hint): New function.
1340 (class suggest_missing_header): New class.
1341 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1342 suggest missing headers to the user.
1344 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1346 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1347 Include "c-family/name-hint.h"
1348 (implicit_decl_warning): Convert "hint" from
1349 const char * to name_hint. Pass location to
1350 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1351 warning was not printed.
1352 (undeclared_variable): Likewise for "guessed_id".
1353 (lookup_name_fuzzy): Convert return type from const char *
1354 to name_hint. Add location_t param.
1355 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1356 Include "c-family/name-hint.h"
1357 (c_parser_declaration_or_fndef): Convert "hint" from
1358 const char * to name_hint. Pass location to lookup_name_fuzzy.
1359 (c_parser_parameter_declaration): Likewise.
1361 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1365 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1367 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1368 handle_omp_array_sections): Likewise.
1369 (digest_init): Don't call decl_constant_value_for_optimization.
1370 * c-tree.h (decl_constant_value_for_optimization): Removed.
1371 * c-fold.c (c_fold_array_ref): New function.
1372 (c_fully_fold_internal): Add LVAL argument, propagate it through
1373 recursive calls. For VAR_P call decl_constant_value and
1374 unshare if not LVAL and either optimizing or IN_INIT. Remove
1375 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1376 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1377 (c_fully_fold): Add LVAL argument, pass it through to
1378 c_fully_fold_internal.
1379 (decl_constant_value_for_optimization): Removed.
1381 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1384 * c-parser.c (check_tgmath_function): New function.
1385 (enum tgmath_parm_kind): New enum.
1386 (c_parser_postfix_expression): Handle __builtin_tgmath.
1388 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1390 * c-decl.c (implicit_decl_warning): Update for renaming of
1391 pedwarn_at_rich_loc and warning_at_rich_loc.
1392 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1393 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1394 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1395 (c_parser_struct_or_union_specifier): Likewise for renaming of
1396 pedwarn_at_rich_loc.
1397 (c_parser_parameter_declaration): Likewise for renaming of
1399 * c-typeck.c (build_component_ref): Likewise.
1400 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1401 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1402 (set_init_label): Likewise for renaming of error_at_rich_loc.
1404 2017-10-30 Richard Biener <rguenther@suse.de>
1406 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1409 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1411 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1412 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1414 2017-10-25 David Malcolm <dmalcolm@redhat.com>
1417 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1420 2017-10-25 Jakub Jelinek <jakub@redhat.com>
1423 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1424 newdecl to corresponding __builtin_ if any.
1426 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1429 * c-decl.c (diagnose_mismatched_decls): Use
1430 OPT_Wbuiltin_declaration_mismatch.
1432 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1434 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1435 use it to guard calls to maybe_suggest_missing_token_insertion.
1436 (c_parser_parms_list_declarator): Override default value of new
1437 "type_is_unique" param to c_parser_require.
1438 (c_parser_asm_statement): Likewise.
1439 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1442 2017-10-11 Nathan Sidwell <nathan@acm.org>
1444 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1446 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1448 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1449 operating on trees as wide_ints.
1450 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1451 (c_tree_equal): Likewise.
1453 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1455 * c-decl.c (push_parm_decl): Store c_parm's location into the
1457 (build_c_parm): Add "loc" param and store it within the c_parm.
1458 * c-parser.c (struct c_parser): Add "last_token_location" field.
1459 (c_parser_consume_token): Store location of the token into the
1461 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1462 when handling a FUNCTION_DECL, if it doesn't already have them.
1463 (c_parser_parameter_declaration): Generate a location for the
1464 parameter, and pass it to the call to build_c_parm.
1465 * c-tree.h (struct c_parm): Add field "loc".
1466 (build_c_parm): Add location_t param.
1467 * c-typeck.c (get_fndecl_argument_location): New function.
1468 (inform_for_arg): New function.
1469 (convert_for_assignment): Use inform_for_arg when dealing with
1472 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1474 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1476 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1477 don't SET_DECL_C_BIT_FIELD here.
1480 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1481 instead of trying to set just TREE_READONLY manually.
1483 2017-09-16 Tom de Vries <tom@codesourcery.com>
1486 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1489 2017-09-15 Joseph Myers <joseph@codesourcery.com>
1492 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1494 (build_conditional_expr): For C11, generate result with excess
1495 precision when one argument is an integer and the other is of a
1496 type using excess precision.
1498 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1500 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1502 2017-09-13 Marek Polacek <polacek@redhat.com>
1505 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1506 than expr.original_type.
1508 2017-09-12 Nathan Sidwell <nathan@acm.org>
1510 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1511 resort_sorted_fields): Moved from c-family/c-common.c.
1512 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1514 2017-09-01 Joseph Myers <joseph@codesourcery.com>
1517 * c-typeck.c (build_atomic_assign): Handle argument with excess
1518 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1519 argument passed to build_binary_op and convert_for_assignment but
1520 not for call to c_fully_fold.
1521 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1522 Ensure build_binary_op is called with argument with original
1523 semantic type. Avoid calling c_fully_fold with an
1524 EXCESS_PRECISION_EXPR from build_binary_op.
1526 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1529 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1531 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1532 Alan Hayward <alan.hayward@arm.com>
1533 David Sherwood <david.sherwood@arm.com>
1535 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1536 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1537 m1 and m2 to the signed equivalent of a fixed-point
1540 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1542 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1543 than CAN_HAVE_LOCATION_P when determining whether to use the
1544 location_t value within "value".
1546 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1548 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1549 rather than peeking the location of the first token.
1550 * c-tree.h (c_expr::get_location): New method.
1552 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1554 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1555 to check_function_arguments.
1557 2017-08-18 Marek Polacek <polacek@redhat.com>
1559 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1562 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1565 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1566 (check_bitfield_type_and_width): Don't allow bit-field with
1567 warn_if_not_aligned type.
1569 2017-08-14 Martin Sebor <msebor@redhat.com>
1572 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1574 2017-08-11 Marek Polacek <polacek@redhat.com>
1577 * c-decl.c (pushtag): Only print inform if the warning was printed.
1578 (grokdeclarator): Likewise.
1580 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1582 * c-parser.c (c_parser_error): Rename to...
1583 (c_parser_error_richloc): ...this, making static, and adding
1584 "richloc" parameter, passing it to the c_parse_error call,
1585 rather than calling c_parser_set_source_position_from_token.
1586 (c_parser_error): Reintroduce, reimplementing in terms of the
1587 above, converting return type from void to bool.
1588 (class token_pair): New class.
1589 (struct matching_paren_traits): New struct.
1590 (matching_parens): New typedef.
1591 (struct matching_brace_traits): New struct.
1592 (matching_braces): New typedef.
1593 (get_matching_symbol): New function.
1594 (c_parser_require): Add param MATCHING_LOCATION, using it to
1595 highlight matching "opening" tokens for missing "closing" tokens.
1596 (c_parser_skip_until_found): Likewise.
1597 (c_parser_static_assert_declaration_no_semi): Convert explicit
1598 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1599 class matching_parens, so that the pertinent open parenthesis is
1600 highlighted when there are problems locating the close
1602 (c_parser_struct_or_union_specifier): Likewise.
1603 (c_parser_typeof_specifier): Likewise.
1604 (c_parser_alignas_specifier): Likewise.
1605 (c_parser_simple_asm_expr): Likewise.
1606 (c_parser_braced_init): Likewise, for matching_braces.
1607 (c_parser_paren_condition): Likewise, for matching_parens.
1608 (c_parser_switch_statement): Likewise.
1609 (c_parser_for_statement): Likewise.
1610 (c_parser_asm_statement): Likewise.
1611 (c_parser_asm_operands): Likewise.
1612 (c_parser_cast_expression): Likewise.
1613 (c_parser_sizeof_expression): Likewise.
1614 (c_parser_alignof_expression): Likewise.
1615 (c_parser_generic_selection): Likewise.
1616 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1617 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1618 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1619 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1620 c_parser_skip_until_found call.
1621 (c_parser_objc_class_definition): Use class matching_parens as
1623 (c_parser_objc_method_decl): Likewise.
1624 (c_parser_objc_try_catch_finally_statement): Likewise.
1625 (c_parser_objc_synchronized_statement): Likewise.
1626 (c_parser_objc_at_property_declaration): Likewise.
1627 (c_parser_oacc_wait_list): Likewise.
1628 (c_parser_omp_var_list_parens): Likewise.
1629 (c_parser_omp_clause_collapse): Likewise.
1630 (c_parser_omp_clause_default): Likewise.
1631 (c_parser_omp_clause_if): Likewise.
1632 (c_parser_omp_clause_num_threads): Likewise.
1633 (c_parser_omp_clause_num_tasks): Likewise.
1634 (c_parser_omp_clause_grainsize): Likewise.
1635 (c_parser_omp_clause_priority): Likewise.
1636 (c_parser_omp_clause_hint): Likewise.
1637 (c_parser_omp_clause_defaultmap): Likewise.
1638 (c_parser_oacc_single_int_clause): Likewise.
1639 (c_parser_omp_clause_ordered): Likewise.
1640 (c_parser_omp_clause_reduction): Likewise.
1641 (c_parser_omp_clause_schedule): Likewise.
1642 (c_parser_omp_clause_num_teams): Likewise.
1643 (c_parser_omp_clause_thread_limit): Likewise.
1644 (c_parser_omp_clause_aligned): Likewise.
1645 (c_parser_omp_clause_linear): Likewise.
1646 (c_parser_omp_clause_safelen): Likewise.
1647 (c_parser_omp_clause_simdlen): Likewise.
1648 (c_parser_omp_clause_depend): Likewise.
1649 (c_parser_omp_clause_map): Likewise.
1650 (c_parser_omp_clause_device): Likewise.
1651 (c_parser_omp_clause_dist_schedule): Likewise.
1652 (c_parser_omp_clause_proc_bind): Likewise.
1653 (c_parser_omp_clause_uniform): Likewise.
1654 (c_parser_omp_for_loop): Likewise.
1655 (c_parser_cilk_clause_vectorlength): Likewise.
1656 (c_parser_cilk_clause_linear): Likewise.
1657 (c_parser_transaction_expression): Likewise.
1658 * c-parser.h (c_parser_require): Add param matching_location with
1659 default UNKNOWN_LOCATION.
1660 (c_parser_error): Convert return type from void to bool.
1661 (c_parser_skip_until_found): Add param matching_location with
1662 default UNKNOWN_LOCATION.
1664 2017-08-09 Marek Polacek <polacek@redhat.com>
1666 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1667 * c-tree.h (build_external_ref): Update declaration.
1668 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1669 (build_external_ref): Change the type of a parameter to bool.
1670 (parser_build_binary_op): Use true/false instead of 1/0.
1671 (pointer_diff): Likewise.
1672 (build_modify_expr): Likewise.
1673 (set_designator): Change the type of a parameter to bool.
1674 (set_init_index): Use true/false instead of 1/0.
1675 (set_init_label): Likewise.
1676 (output_init_element): Change the type of a parameter to bool.
1677 (output_pending_init_elements): Use true/false instead of 1/0.
1678 (process_init_element): Likewise.
1679 (build_binary_op): Change the type of a parameter to bool.
1681 2017-08-09 Marek Polacek <polacek@redhat.com>
1684 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1685 Call emit_diagnostic_valist instead of pedwarn.
1686 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1687 Print the relevant types in diagnostics.
1689 2017-08-09 Marek Polacek <polacek@redhat.com>
1692 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1693 build_conditional_expr.
1694 * c-parser.c (c_parser_conditional_expression): Create locations for
1695 EXP1 and EXP2 from their source ranges. Pass the locations down to
1696 build_conditional_expr.
1697 * c-tree.h (build_conditional_expr): Update declaration.
1698 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1699 For -Wsign-compare, also print the types.
1701 2017-08-08 Martin Liska <mliska@suse.cz>
1703 * c-convert.c: Include header files.
1704 * c-typeck.c: Likewise.
1706 2017-08-07 Martin Liska <mliska@suse.cz>
1708 * c-parser.c (c_parser_attributes): Canonicalize name of an
1711 2017-08-02 Marek Polacek <polacek@redhat.com>
1714 * c-parser.c (c_parser_unary_expression): Use set_error.
1718 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1719 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1721 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1722 Martin Liska <mliska@suse.cz>
1724 * c-typeck.c (c_finish_goto_label): Build gimple predict
1727 2017-07-31 Martin Liska <mliska@suse.cz>
1730 * c-convert.c (convert): Guard condition with flag_sanitize_p
1731 also with current_function_decl non-null equality.
1732 * c-decl.c (grokdeclarator): Likewise.
1733 * c-typeck.c (build_binary_op): Likewise.
1735 2017-07-25 Marek Polacek <polacek@redhat.com>
1737 * c-decl.c (grokfield): Remove local variable.
1739 2017-07-25 Marek Polacek <polacek@redhat.com>
1742 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1743 macro expansion if the body is in { }.
1744 (c_parser_while_statement): Likewise.
1745 (c_parser_for_statement): Likewise.
1747 2017-07-18 Nathan Sidwell <nathan@acm.org>
1749 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1751 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1753 * c-decl.c (implicitly_declare): When suggesting a missing
1754 #include, provide a fix-it hint.
1756 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1758 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1759 and call that instead.
1760 * c-tree.h (selftest::run_c_tests): New decl.
1762 2017-06-26 Marek Polacek <polacek@redhat.com>
1765 * c-parser.c (c_parser_if_body): Set the location of the
1766 body of the conditional after parsing all the labels. Call
1767 warn_for_multistatement_macros.
1768 (c_parser_else_body): Likewise.
1769 (c_parser_switch_statement): Likewise.
1770 (c_parser_while_statement): Likewise.
1771 (c_parser_for_statement): Likewise.
1772 (c_parser_statement): Add a default argument. Save the location
1773 after labels have been parsed.
1774 (c_parser_c99_block_statement): Likewise.
1776 2017-06-19 Richard Biener <rguenther@suse.de>
1778 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1779 negated _Literals to parse _Literal (int) -1.
1781 2017-06-13 Martin Liska <mliska@suse.cz>
1784 * c-convert.c (convert): Use sanitize_flags_p.
1785 * c-decl.c (grokdeclarator): Likewise.
1786 * c-typeck.c (convert_for_assignment): Likewise.
1787 (c_finish_return): Likewise.
1788 (build_binary_op): Likewise.
1790 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1793 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1794 to sizetype before size_binop.
1796 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1798 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1801 2017-06-06 Marek Polacek <polacek@redhat.com>
1804 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1806 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1808 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1810 * c-parser.c (c_parser_binary_expression): Implement the
1811 -Wsizeof_pointer_div warning.
1812 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1813 from a parenthesized expression.
1814 (c_parser_expr_list): Use c_last_sizeof_loc.
1815 * c-tree.h (c_last_sizeof_loc): New external.
1816 * c-typeck.c (c_last_sizeof_loc): New variable.
1817 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1819 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1822 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1824 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1826 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1829 2017-05-24 Martin Sebor <msebor@redhat.com>
1832 * c-fold.c (c_fully_fold_internal): Adjust.
1833 * c-typeck.c (parser_build_unary_op): Adjust.
1835 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1837 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1838 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1841 2017-05-23 Marek Polacek <polacek@redhat.com>
1843 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1846 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1848 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1849 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1850 it returned invariant. Call tree_invariant_p unconditionally
1851 afterwards to decide whether to return expr or op0.
1853 2017-05-22 Nathan Sidwell <nathan@acm.org>
1855 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1857 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1859 * c-parser.c (c_parser_omp_clause_default): Handle
1860 "OMP_CLAUSE_DEFAULT_PRESENT".
1862 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1864 * config-lang.in (gtfiles): Add c-family/c-format.c.
1866 2017-05-18 Nathan Sidwell <nathan@acm.org>
1868 * c-decl.c (pushdecl_top_level): Delete unused function.
1870 2017-05-18 Marek Polacek <polacek@redhat.com>
1872 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1873 (check_earlier_gotos): Likewise.
1874 (define_label): Likewise.
1875 (pending_xref_error): Likewise.
1876 (smallest_type_quals_location): Likewise.
1877 (grokdeclarator): Likewise.
1878 (grokparms): Likewise.
1879 (identifier_global_value): Likewise.
1880 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1881 (find_init_member): Likewise.
1883 2017-05-18 Marek Polacek <polacek@redhat.com>
1885 * c-decl.c (start_decl): Use false/true instead of 0/1.
1886 (grokdeclarator): Likewise.
1887 (finish_struct): Likewise.
1888 (start_function): Change the return type to bool. Use false/true
1890 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1891 * c-tree.h (start_function): Update.
1892 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1893 (set_designator): Change the return type to bool. Use false/true
1896 2017-05-17 Marek Polacek <polacek@redhat.com>
1898 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1899 * c-typeck.c: Likewise.
1901 2017-05-17 Marek Polacek <polacek@redhat.com>
1904 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1905 DECL_IGNORED_P even for non-static compound literals.
1907 2017-05-17 Martin Liska <mliska@suse.cz>
1909 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1910 use it instead of int type.
1912 2017-05-17 Marek Polacek <polacek@redhat.com>
1914 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1916 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1917 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1918 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1919 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1921 (c_parser_conditional_expression): Likewise.
1922 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1923 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1924 (process_init_element): Likewise.
1925 (build_binary_op): Likewise.
1926 (handle_omp_array_sections_1): Likewise.
1928 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1930 * c-parser.c (c_parser_omp_clause_num_gangs)
1931 (c_parser_omp_clause_num_workers)
1932 (c_parser_omp_clause_vector_length): Merge functions into...
1933 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1936 2017-05-11 Nathan Sidwell <nathan@acm.org>
1938 * gimple-parser.c: Don't #include tree-dump.h.
1940 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1943 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1945 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1948 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1949 incorrect __MEM syntax.
1951 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1954 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1957 2017-05-09 Nathan Sidwell <nathan@acm.org>
1959 * c-tree.h (pushdecl): Declare.
1961 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1963 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1964 with diagnostic_report_diagnostic.
1965 * c-errors.c (pedwarn_c99): Likewise.
1966 (pedwarn_c90): Likewise.
1968 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1971 * c-gimplify.c (c_gimplify_expr): Remove calls to
1972 cilk_gimplifY_call_params_in_spawned_fn.
1974 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1976 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1977 hint for removing extra semicolon.
1979 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1982 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1983 enabled, set specs->type to integer_type_node.
1985 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1987 * c-array-notation.c: Fix typo in comment.
1989 2017-03-29 Marek Polacek <polacek@redhat.com>
1992 * c-decl.c (finish_decl): Check VAR_P.
1994 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1997 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1998 * c-typeck.c (c_mark_addressable): Likewise. Look through
1999 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2001 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2003 2017-03-23 Marek Polacek <polacek@redhat.com>
2005 * c-tree.h: Remove a C_RID_YYCODE reference.
2007 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2010 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2011 optional COMPOUND_EXPR with ubsan instrumentation.
2013 2017-03-17 Marek Polacek <polacek@redhat.com>
2015 * c-parser.c: Add C11 references.
2017 2017-03-15 Marek Polacek <polacek@redhat.com>
2019 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2021 2017-03-11 Marek Polacek <polacek@redhat.com>
2023 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2025 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2027 PR translation/79848
2028 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2030 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2032 2017-03-09 Marek Polacek <polacek@redhat.com>
2035 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2036 parameter declarations with initializers.
2038 2017-03-09 Jakub Jelinek <jakub@redhat.com>
2041 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2044 2017-03-07 Jakub Jelinek <jakub@redhat.com>
2047 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2048 for "may only be used in compound statements" diagnostics, change it
2049 such that the same translatable string is used for all pragmas. For
2050 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2052 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2053 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2054 "may only be used in compound statements" diagnostics, such that the
2055 same translatable string is used for all pragmas.
2057 2017-03-04 Marek Polacek <polacek@redhat.com>
2060 * c-decl.c (implicit_decl_warning): Add missing space.
2062 2017-03-03 Marek Polacek <polacek@redhat.com>
2065 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2066 current_function_prototype_arg_types is error_mark_node. Fix
2067 formatting. Use TREE_VALUE instead of TREE_TYPE.
2069 2017-03-03 Jakub Jelinek <jakub@redhat.com>
2072 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2073 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2074 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2078 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2079 instead of %<_Generic>.
2080 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2081 (c_parser_omp_target_exit_data): Use %<release%> instead of
2084 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2086 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2087 instead of just cond ? "..." : "...".
2088 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2089 for "enter"/"exit" keyword.
2090 (c_finish_oacc_routine): Don't use %s to supply portions of the
2093 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2096 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2097 handle -Wrestrict here.
2098 * c-typeck.c (build_function_call_vec): Adjust
2099 check_function_arguments caller.
2101 2017-02-23 Richard Biener <rguenther@suse.de>
2104 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2105 to initialize c_exprs to return.
2106 (c_parser_gimple_binary_expression): Likewise.
2107 (c_parser_gimple_unary_expression): Likewise.
2108 (c_parser_gimple_postfix_expression): Likewise.
2110 2017-02-22 Marek Polacek <polacek@redhat.com>
2113 * c-typeck.c (convert_arguments): Handle error_mark_node.
2115 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2117 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2118 value of c_parser_parse_ssa_name against error_mark_node and emit
2119 error if ssa name is anonymous and written as default definition.
2121 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2123 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2126 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2129 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2130 ignore #pragma omp target even when not followed by identifier.
2132 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2134 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2135 (c_parser_gimple_unary_expression): Likewise.
2137 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2139 * c-parser.c (c_parser_oacc_declare): Add missing space in
2142 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2145 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2146 set_c_expr_source_range when parsing ssa-name.
2148 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2149 Richard Biener <rguenther@suse.de>
2151 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2152 building IL when arguments are error_mark_node.
2153 (c_parser_gimple_unary_expression): Likewise.
2154 (c_parser_gimple_if_stmt): Likewise.
2155 (c_parser_gimple_switch_stmt): Likewise.
2156 (c_parser_gimple_return_stmt): Likewise.
2157 (c_parser_parse_ssa_name): When name lookup fails do not build
2158 an SSA name. Use undeclared rather than not declared in error
2161 2017-02-09 Marek Polacek <polacek@redhat.com>
2164 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2165 instead of c_parser_skip_until_found.
2167 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2170 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2171 symtab_node::get on automatic variables.
2173 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2174 Chung-Lin Tang <cltang@codesourcery.com>
2176 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2177 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2179 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2181 2017-02-07 Richard Biener <rguenther@suse.de>
2183 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2184 (c_parser_gimple_postfix_expression_after_primary):
2185 Do not use c_build_function_call_vec to avoid folding and promotion.
2188 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2191 * c-decl.c (pop_scope): Pass main_input_filename to
2192 build_translation_unit_decl.
2194 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2196 * c-parser.c: Include "read-rtl-function.h" and
2198 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2199 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2200 production. Update for renaming of field "gimple_pass" to
2201 "gimple_or_rtl_pass". If __RTL was seen, call
2202 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2203 to an auto_timevar, to cope with early exit.
2204 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2205 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2206 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2208 (c_parser_parse_rtl_body): New function.
2209 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2210 (struct c_declspecs): Rename field "gimple_pass" to
2211 "gimple_or_rtl_pass". Add field "rtl_p".
2212 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2213 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2214 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2215 (c_parser_gimple_or_rtl_pass_list): ...this.
2217 2017-01-20 Marek Polacek <polacek@redhat.com>
2220 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2222 2017-01-13 Richard Biener <rguenther@suse.de>
2224 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2227 2017-01-13 Richard Biener <rguenther@suse.de>
2229 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2230 _Literal ( type-name ) number.
2232 2017-01-12 Richard Biener <rguenther@suse.de>
2234 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2237 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2240 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2243 2017-01-11 Richard Biener <rguenther@suse.de>
2246 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2247 returns on parse errors.
2249 2017-01-04 Marek Polacek <polacek@redhat.com>
2252 * c-parser.c (c_parser_postfix_expression): Mark zero character
2253 constants by setting original_type in c_expr.
2254 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2255 with a zero character constant.
2256 (char_type_p): New function.
2258 2017-01-04 David Malcolm <dmalcolm@redhat.com>
2260 * c-parser.c (c_parser_declaration_or_fndef): Create a
2261 rich_location at init_loc and parse it to start_init.
2262 (last_init_list_comma): New global.
2263 (c_parser_braced_init): Update last_init_list_comma when parsing
2264 commas. Pass it to pop_init_level. Pass location of closing
2265 brace to pop_init_level.
2266 (c_parser_postfix_expression_after_paren_type): Create a
2267 rich_location at type_loc and parse it to start_init.
2268 (c_parser_omp_declare_reduction): Likewise for loc.
2269 * c-tree.h (start_init): Add rich_location * param.
2270 (pop_init_level): Add location_t param.
2271 * c-typeck.c (struct initializer_stack): Add field
2272 "missing_brace_richloc".
2273 (start_init): Add richloc param, use it to initialize
2274 the stack node's missing_brace_richloc.
2275 (last_init_list_comma): New decl.
2276 (finish_implicit_inits): Pass last_init_list_comma to
2278 (push_init_level): When finding missing open braces, add fix-it
2279 hints to the richloc.
2280 (pop_init_level): Add "insert_before" param and pass it
2281 when calling pop_init_level. Add fixits about missing
2282 close braces to any richloc. Use the richloc for the
2283 -Wmissing-braces warning.
2284 (set_designator): Pass last_init_list_comma to pop_init_level.
2285 (process_init_element): Likewise.
2287 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2289 Update copyright years.
2291 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2294 * c-typeck.c (build_function_call_vec): If check_function_arguments
2295 returns true, set TREE_NO_WARNING on CALL_EXPR.
2298 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2299 to *expr instead of overwriting it.
2301 2016-12-20 Richard Biener <rguenther@suse.de>
2303 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2305 (c_parser_gimple_statement): Only build assigns for non-error
2307 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2309 2016-12-14 Martin Jambor <mjambor@suse.cz>
2311 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2313 (c_finish_oacc_routine): Adjusted call to
2314 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2315 to use their new names.
2316 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2318 (c_parser_oacc_update): Likewise.
2319 (c_parser_omp_simd): Likewise.
2320 (c_parser_omp_target_update): Likewise.
2321 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2322 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2324 (c_finish_omp_cancellation_point): Likewise.
2325 * gimple-parser.c: Do not include omp-low.h
2327 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2328 James Norris <jnorris@codesourcery.com>
2330 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2331 EXIT_DATA,WAIT} are not used in compound statements.
2332 (c_parser_oacc_enter_exit_data): Update diagnostics.
2334 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2337 * c-decl.c (diagnose_mismatched_decls): Use
2338 OPT_Wbuiltin_declaration_mismatch here too.
2340 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
2341 Alan Hayward <alan.hayward@arm.com>
2342 David Sherwood <david.sherwood@arm.com>
2344 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2345 (make_label, finish_struct): Likewise.
2347 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2348 Richard Biener <rguenther@suse.de>
2350 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2351 * config-lang.in (gtfiles): Add c/c-parser.h.
2352 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2353 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2354 * c-parser.c (enum c_id_kind, struct c_token,
2355 c_parser_next_token_is, c_parser_next_token_is_not,
2356 c_parser_next_token_is_keyword,
2357 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2359 * c-parser.h: ... new header.
2360 * c-parser.c: Include c-parser.h and gimple-parser.h.
2361 (c_parser_peek_token, c_parser_peek_2nd_token,
2362 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2363 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2364 c_parser_error, c_parser_require, c_parser_skip_until_found,
2365 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2366 c_parser_type_name): Export.
2367 (c_parser_tokens_buf): New function.
2368 (c_parser_error): Likewise.
2369 (c_parser_set_error): Likewise.
2370 (c_parser_declspecs): Handle RID_GIMPLE.
2371 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2372 via c_parser_parse_gimple_body.
2373 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2374 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2375 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2376 c_parser_error, c_parser_require, c_parser_skip_until_found,
2377 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2378 c_parser_type_name): Declare.
2379 (struct c_parser): Declare forward.
2380 (c_parser_tokens_buf): Declare.
2381 (c_parser_error): Likewise.
2382 (c_parser_set_error): Likewise.
2383 * gimple-parser.c: New file.
2384 * gimple-parser.h: Likewise.
2386 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2389 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2392 2016-09-11 Le-Chun Wu <lcwu@google.com>
2393 Mark Wielaard <mjw@redhat.com>
2395 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2396 to the given -Wshadow= variant.
2398 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2400 * c-typeck.c: Include memmodel.h.
2402 2016-10-13 Jakub Jelinek <jakub@redhat.com>
2405 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2406 instead of lhd_return_null_tree_v.
2408 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2411 * c-decl.c (smallest_type_quals_location): New static function.
2412 (grokdeclarator): Try to find the correct location for an ignored
2415 2016-09-26 Marek Polacek <polacek@redhat.com>
2418 * c-decl.c (pop_scope): Add gcc_fallthrough.
2420 2016-09-26 Marek Polacek <polacek@redhat.com>
2423 * c-parser.c (struct c_token): Add flags field.
2424 (c_lex_one_token): Pass it to c_lex_with_flags.
2425 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2426 into IFN_FALLTHROUGH.
2427 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2428 attribute fallthrough after a case label or default label.
2429 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2431 2016-09-24 Marek Polacek <polacek@redhat.com>
2434 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2435 have boolean value. Warn about ++/-- on booleans.
2437 2016-09-23 Jakub Jelinek <jakub@redhat.com>
2439 * c-parser.c (incomplete_record_decls): Remove unnecessary
2440 = vNULL initialization of file scope vec.
2442 2016-09-16 Marek Polacek <polacek@redhat.com>
2444 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2446 2016-09-14 Marek Polacek <polacek@redhat.com>
2448 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2449 (fix_array_notation_expr): Likewise.
2450 * c-decl.c (finish_decl): Likewise.
2451 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2452 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2453 (function_to_pointer_conversion): Use false instead of 0.
2454 (convert_lvalue_to_rvalue): Likewise.
2455 (parser_build_unary_op): Likewise.
2456 (build_atomic_assign): Likewise.
2457 (build_unary_op): Change nonconvert parameter type to bool, use
2458 true/false instead of 1/0.
2459 (build_binary_op): Use true instead of 1.
2461 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2463 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2464 of add_fixit_insert to add_fixit_insert_before.
2466 2016-09-13 Marek Polacek <polacek@redhat.com>
2468 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2471 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2474 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2475 COMPOUND_EXPR to warn_for_omitted_condop.
2477 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2479 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2480 c_get_substring_location for this new langhook.
2482 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2485 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2487 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2488 instead of mark_exp_read on low_bound/length expression.
2489 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2490 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2491 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2492 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2493 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2494 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2495 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2496 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2497 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2498 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2499 instead of mark_expr_read.
2500 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2501 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2502 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2503 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2504 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2505 array section bases outside of depend clause, for depend clause
2506 use convert_lvalue_to_rvalue on the base.
2507 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2508 linear, aligned, map, to and from clauses.
2509 (c_omp_clause_copy_ctor): New function.
2511 2016-09-01 Marek Polacek <polacek@redhat.com>
2514 * c-typeck.c (composite_type): Add FALLTHRU comment.
2516 2016-08-31 David Malcolm <dmalcolm@redhat.com>
2518 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2519 to the insertion fixits for "struct", "union", and "enum".
2521 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2523 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2524 rather than add_fixit_misspelled_id.
2525 (undeclared_variable): Likewise.
2526 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2527 now-redundant "here" params from add_fixit_insert method calls.
2528 (c_parser_parameter_declaration): Likewise.
2529 * c-typeck.c (build_component_ref): Remove now-redundant range
2530 param from add_fixit_replace method calls.
2532 2016-08-25 Marek Polacek <polacek@redhat.com>
2534 * c-typeck.c (parser_build_binary_op): Pass LHS to
2535 warn_logical_not_parentheses.
2537 2016-08-25 Marek Polacek <polacek@redhat.com>
2540 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2541 or _FloatN or _FloatNx is not supported.
2542 (finish_declspecs): Set type to integer_type_node when _FloatN or
2543 _FloatNx is not supported.
2545 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2548 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2549 (struct c_declspecs): Add field floatn_nx_idx.
2550 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2551 and _FloatNx type specifiers.
2552 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2553 (c_parser_declspecs, c_parser_attribute_any_word)
2554 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2555 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2556 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2557 narrower than double.
2559 2016-08-12 Jakub Jelinek <jakub@redhat.com>
2560 Martin Liska <mliska@suse.cz>
2563 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2564 % to determine val element to change. Assert that
2565 wchar_bytes * charwidth fits into val array.
2567 2016-08-12 Marek Polacek <polacek@redhat.com>
2570 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2571 (c_parser_postfix_expression): Likewise.
2572 * c-typeck.c (build_unary_op): Adjust fall through comment.
2573 (c_mark_addressable): Likewise.
2575 2016-08-11 Jakub Jelinek <jakub@redhat.com>
2578 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2579 array member through typedef, for orig_qual_indirect == 0 clear
2582 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2585 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2586 this up to selftest::run_c_tests.
2587 (selftest::run_c_tests): New function.
2589 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2591 * c-parser.c (struct oacc_routine_data): Add error_seen and
2592 fndecl_seen members.
2593 (c_finish_oacc_routine): Use these.
2594 (c_parser_declaration_or_fndef): Adjust.
2595 (c_parser_oacc_routine): Likewise. Support more C language
2596 constructs, and improve diagnostics. Move pragma context
2598 (c_parser_pragma): ... here.
2600 * c-parser.c (struct oacc_routine_data): New.
2601 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2603 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2604 declare target" attribute.
2606 2016-08-01 Jan Beulich <jbeulich@suse.com>
2608 * c-fold.c (c_fully_fold_internal): Also emit shift count
2609 warnings for vector types.
2610 * c-typeck.c (build_binary_op): Likewise.
2612 2016-07-29 Marek Polacek <polacek@redhat.com>
2615 * c-decl.c (finish_struct): Rephrase an error message.
2618 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2619 to error node for invalid code.
2622 * c-decl.c (implicitly_declare): Return decl early not only for
2623 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2625 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2628 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2629 on GNU extern inline functions.
2631 2016-07-29 Marek Polacek <polacek@redhat.com>
2634 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2637 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2639 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2641 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2643 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2645 (best_macro_match): Likewise, converting from a typedef to a
2647 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2648 (lookup_name_fuzzy): Update for change of best_macro_match to a
2649 subclass with a ctor that calls cpp_forall_identifiers.
2651 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2653 * c-decl.c (implicit_decl_warning): Update for conversion of
2654 return type of lookup_name_fuzzy to const char *.
2655 (undeclared_variable): Likewise.
2656 (lookup_name_fuzzy): Convert return type from tree to
2658 * c-parser.c (c_parser_declaration_or_fndef): Update for
2659 conversion of return type of lookup_name_fuzzy to const char *.
2660 (c_parser_parameter_declaration): Likewise.
2662 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2664 * c-parser.c (c_parser_oacc_declare): Don't scan for
2666 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2667 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2668 zero-length subarrays.
2670 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2673 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2674 instead of FUZZY_LOOKUP_NAME.
2675 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2676 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2678 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2681 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2683 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2685 * c-parser.c (c_parser_generic_selection): Make type of variable
2687 (c_parser_omp_declare_simd): Likewise.
2689 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2691 * c-decl.c (struct c_struct_parse_info): Change member types
2692 from vec to auto_vec.
2693 (start_struct): Adjust.
2694 (finish_struct): Likewise.
2696 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2699 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2701 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2703 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2704 Move pragma context checking into...
2705 (c_parser_omp_cancellation_point): ... here, and improve
2706 diagnostic messages.
2707 * c-typeck.c (c_finish_omp_cancel)
2708 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2710 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2713 * c-typeck.c (c_build_qualified_type): Don't clear
2714 C_TYPE_INCOMPLETE_VARS for the main variant.
2716 2016-06-28 Martin Sebor <msebor@redhat.com>
2719 * c-typeck.c (output_init_element): Diagnose incompatible types
2720 before non-constant initializers.
2722 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2724 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2726 2016-06-23 Andi Kleen <ak@linux.intel.com>
2728 * Make-lang.in: Add support for autofdo.
2730 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2733 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2734 (implicit_decl_warning): When issuing warnings for implicit
2735 declarations, attempt to provide a suggestion via
2737 (undeclared_variable): Likewise when issuing errors.
2738 (lookup_name_in_scope): Likewise.
2739 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2740 (best_macro_match): New typedef.
2741 (find_closest_macro_cpp_cb): New function.
2742 (lookup_name_fuzzy): New function.
2743 * c-parser.c: Include gcc-rich-location.h.
2744 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2745 (c_keyword_starts_typename): ...this new function.
2746 (c_parser_declaration_or_fndef): When issuing errors about
2747 missing "struct" etc, add a fixit. For other kinds of errors,
2748 attempt to provide a suggestion via lookup_name_fuzzy.
2749 (c_parser_parms_declarator): When looking ahead to detect typos in
2750 type names, also reject CPP_KEYWORD.
2751 (c_parser_parameter_declaration): When issuing errors about
2752 unknown type names, attempt to provide a suggestion via
2754 * c-tree.h (c_keyword_starts_typename): New prototype.
2756 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2759 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2760 c_common_type returns error_mark_node.
2762 2016-06-19 Martin Sebor <msebor@redhat.com>
2765 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2766 __alignof__ (expression).
2768 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2770 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2772 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2774 * c-typeck.c (build_component_ref): Simplify fixit code by
2775 using gcc_rich_location::add_fixit_misspelled_id.
2776 (set_init_label): Likewise.
2778 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2780 * c-parser.c (c_parser_initelt): Provide location of name for new
2781 location_t param of set_init_label.
2782 * c-tree.h (set_init_label): Add location_t param.
2783 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2784 param and use it when issuing error messages about unrecognized
2785 field names. Attempt to provide a fixit hint if appropriate,
2786 otherwise update the error message to provide the type name.
2788 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2791 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2794 2016-06-08 Martin Sebor <msebor@redhat.com>
2795 Jakub Jelinek <jakub@redhat.com>
2799 * c-typeck.c (convert_arguments): Don't promote last argument
2800 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2802 2016-06-08 Marek Polacek <polacek@redhat.com>
2805 * c-decl.c (grokdeclarator): Check TYPE_P.
2808 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2811 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2813 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2814 and structure element reference, capture the location of the
2815 element name token and pass it to build_component_ref.
2816 (c_parser_postfix_expression_after_primary): Likewise for
2817 structure element dereference.
2818 (c_parser_omp_variable_list): Likewise for
2819 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2820 * c-tree.h (build_component_ref): Add location_t param.
2821 * c-typeck.c (build_component_ref): Add location_t param
2822 COMPONENT_LOC. Use it, if available, when issuing hints about
2823 mispelled member names to provide a fixit replacement hint.
2825 2016-06-06 Marek Polacek <polacek@redhat.com>
2828 * c-parser.c (c_parser_direct_declarator): Set location.
2830 2016-06-06 Marek Polacek <polacek@redhat.com>
2832 * c-typeck.c (comptypes_internal): Handle comparisons of
2833 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2834 TYPE_REF_CAN_ALIAS_ALL.
2836 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2838 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2839 arguments as addressable when async clause exists.
2841 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2844 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2845 when combined with target construct.
2847 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2849 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2850 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2852 2016-05-25 Marek Polacek <polacek@redhat.com>
2855 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2858 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2860 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2862 * c-parser.c (c_parser_oacc_declare): Add support for
2863 GOMP_MAP_FIRSTPRIVATE_POINTER.
2864 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2865 argument with enum c_omp_region_type ort.
2866 (handle_omp_array_sections): Likewise. Update call to
2867 handle_omp_array_sections_1.
2868 (c_finish_omp_clauses): Add specific errors and warning messages for
2869 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2870 call to handle_omp_array_sections.
2872 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2874 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2876 2016-05-24 Richard Biener <rguenther@suse.de>
2880 * c-typeck.c (build_array_ref): Do not complain about indexing
2881 non-lvalue vectors. Adjust for function name change.
2883 2016-05-20 Martin Sebor <msebor@redhat.com>
2886 * c-typeck.c (error_init): Use
2887 expansion_point_location_if_in_system_header.
2888 (warning_init): Same.
2890 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2893 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2895 (c_parser_postfix_expression): Likewise.
2896 * c-tree.h (c_expr::set_error): New method.
2897 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2898 that result's range is initialized.
2900 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2902 * c-typeck.c (parser_build_unary_op): Fix formatting.
2904 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2906 * c-decl.c (grokdeclarator): Remove errmsg and use of
2907 targetm.invalid_return_type.
2908 (grokparms): Remove errmsg and use of
2909 targetm.invalid_parameter_type.
2911 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2913 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2914 function return type.
2916 2016-05-12 Marek Polacek <polacek@redhat.com>
2919 * c-decl.c (build_compound_literal): Pass LOC down to
2920 c_incomplete_type_error.
2921 * c-tree.h (require_complete_type): Adjust declaration.
2922 (c_incomplete_type_error): Likewise.
2923 * c-typeck.c (require_complete_type): Add location parameter, pass it
2924 down to c_incomplete_type_error.
2925 (c_incomplete_type_error): Add location parameter, pass it down to
2927 (build_component_ref): Pass location down to c_incomplete_type_error.
2928 (default_conversion): Pass location down to require_complete_type.
2929 (build_array_ref): Likewise.
2930 (build_function_call_vec): Likewise.
2931 (convert_arguments): Likewise.
2932 (build_unary_op): Likewise.
2933 (build_c_cast): Likewise.
2934 (build_modify_expr): Likewise.
2935 (convert_for_assignment): Likewise.
2936 (c_finish_omp_clauses): Likewise.
2938 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2941 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2943 * c-errors.c (pedwarn_c90): Return true if warned.
2944 * c-tree.h (pedwarn_c90): Change return type to bool.
2945 (enum c_declspec_word): Add new enumerator cdw_atomic.
2947 2016-05-11 Marek Polacek <polacek@redhat.com>
2950 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2951 diagnose_mismatched_attributes and call it.
2953 2016-05-10 Marek Polacek <polacek@redhat.com>
2956 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2957 on a declaration following the definition.
2959 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2961 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2962 parse it through to c_parser_c99_block_statement.
2963 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2966 2016-05-04 Marek Polacek <polacek@redhat.com>
2968 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2971 2016-05-04 Marek Polacek <polacek@redhat.com>
2974 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2975 for macro expansions.
2977 2016-05-03 Marek Polacek <polacek@redhat.com>
2980 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2981 check_builtin_function_arguments.
2983 2016-05-03 Richard Biener <rguenther@suse.de>
2985 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2986 the checksum from the previous stage.
2988 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2990 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2991 c_finish_omp_clauses.
2992 (c_parser_omp_all_clauses): Likewise.
2993 (c_parser_oacc_cache): Likewise.
2994 (c_parser_oacc_loop): Likewise.
2995 (omp_split_clauses): Likewise.
2996 (c_parser_omp_declare_target): Likewise.
2997 (c_parser_cilk_all_clauses): Likewise.
2998 (c_parser_cilk_for): Likewise.
2999 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3000 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3002 2016-05-02 Marek Polacek <polacek@redhat.com>
3005 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3008 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3011 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3012 OACC_LOOP_CLAUSE_MASK.
3013 (c_parser_oacc_kernels_parallel): Update call to
3014 c_oacc_split_loop_clauses.
3016 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3018 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3019 argument to build_modify_expr in two cases.
3021 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3023 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3024 warn_for_memset instead of warning directly here.
3026 2016-04-26 Marek Polacek <polacek@redhat.com>
3029 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3031 (c_parser_for_statement): ... here.
3032 (c_parser_if_statement): Use it.
3033 (c_parser_switch_statement): Use it.
3034 (c_parser_while_statement): Use it.
3037 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3039 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3042 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3043 instead of c_finish_cilk_clauses.
3044 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3045 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3046 floating-point variables in the linear clause for Cilk Plus.
3048 2016-04-18 Michael Matz <matz@suse.de>
3050 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3051 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3053 2016-04-15 Marek Polacek <polacek@redhat.com>
3056 * c-typeck.c (build_unary_op): Pass location down to error and
3059 2016-04-15 Jakub Jelinek <jakub@redhat.com>
3062 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3064 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3065 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3066 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3067 Adjust c_parser_pragma callers.
3068 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3070 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3072 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3073 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3074 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3075 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3076 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3077 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3078 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3079 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3081 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3082 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3085 2016-04-13 Marek Polacek <polacek@redhat.com>
3088 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3090 (c_parser_statement): Likewise.
3091 (c_parser_c99_block_statement): Likewise.
3092 (c_parser_while_statement): Likewise.
3093 (c_parser_for_statement): Likewise.
3094 (c_parser_if_body): Don't set IF_P here.
3095 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3096 about dangling else here.
3097 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3098 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3099 warn about dangling else here.
3101 2016-04-04 Marek Polacek <polacek@redhat.com>
3104 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3106 2016-03-31 Marek Polacek <polacek@redhat.com>
3109 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3111 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3114 * c-parser.c (c_parser_postfix_expression): Set the source range
3115 for uses of "__builtin_types_compatible_p".
3117 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3120 * c-typeck.c (composite_type): Don't count void_list_node
3121 into len, if the list is terminated by void_list_node, start
3122 with void_list_node instead of NULL for newargs. Stop
3125 2016-03-16 Marek Polacek <polacek@redhat.com>
3128 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3129 nested functions returning VM types.
3131 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3133 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3134 when calling c_finish_omp_clauses.
3136 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3139 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3142 2016-03-04 Marek Polacek <polacek@redhat.com>
3145 * c-parser.c (c_parser_postfix_expression): Call
3146 c_parser_cast_expression rather than c_parser_postfix_expression.
3148 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3152 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3153 of incomplete decls to error_mark_node.
3155 2016-02-24 Marek Polacek <polacek@redhat.com>
3158 * c-decl.c (finish_decl): Don't update the copy of the type of a
3159 different decl type.
3161 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3164 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3165 in id_kind reclassification.
3167 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3170 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3172 2016-02-16 James Norris <jnorris@codesourcery.com>
3175 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3177 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3179 * c-decl.c (build_null_declspecs): Zero the entire struct.
3182 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3183 callers changed. If nested_p is true, use it to call
3184 finish_implicit_inits.
3185 * c-tree.h (finish_implicit_inits): Declare.
3186 * c-typeck.c (finish_implicit_inits): New function. Move code
3188 (push_init_level): ... here.
3189 (set_designator, process_init_element): Call finish_implicit_inits.
3191 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3194 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3195 arguments for -Waddress warning.
3197 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3200 * c-decl.c (finish_enum): When honoring mode attribute,
3201 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3203 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3206 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3207 all type variants, not just TYPE_MAIN_VARIANT.
3209 2016-01-27 Jakub Jelinek <jakub@redhat.com>
3212 * c-decl.c (c_write_global_declarations_1): Warn with
3213 warn_unused_function if static prototype without definition
3216 2016-01-27 Marek Polacek <polacek@redhat.com>
3219 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3220 to unsigned, if needed. Add -Wsign-compare warning.
3222 2016-01-26 Jakub Jelinek <jakub@redhat.com>
3224 PR tree-optimization/69483
3225 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3227 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3230 * c-tree.h (incomplete_record_decls): Declare.
3231 * c-parser.c (incomplete_record_decls): Define.
3232 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3233 report error if any decl has zero size.
3234 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3235 or enum type to incomplete_record_decls.
3237 2016-01-14 Tom de Vries <tom@codesourcery.com>
3239 PR tree-optimization/68773
3240 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3243 2016-01-14 Marek Polacek <polacek@redhat.com>
3246 * c-decl.c (grokdeclarator): Provide more information for invalid
3249 2016-01-06 David Malcolm <dmalcolm@redhat.com>
3251 * c-parser.c (c_parser_unary_expression): For dereferences, build
3252 a combined location before calling build_indirect_ref, so that
3253 error reports cover the full range, manually updating the c_expr
3256 2016-01-06 Marek Polacek <polacek@redhat.com>
3259 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3260 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3263 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3265 Update copyright years.
3267 2016-01-04 Marek Polacek <polacek@redhat.com>
3270 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3271 optimization to use __atomic_fetch_* built-in if possible.
3273 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3275 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3277 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3280 2015-12-22 Marek Polacek <polacek@redhat.com>
3283 * c-typeck.c (build_component_ref): Warn when acessing elements of
3284 atomic structures or unions.
3286 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3288 * c-typeck.c: Include "gcc-rich-location.h".
3289 (build_binary_op): In the two places that call binary_op_error,
3290 create a gcc_rich_location and populate it with the location of
3291 the binary op and its two operands.
3293 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3295 * c-parser.c (c_parser_statement_after_labels): When calling
3296 c_finish_return, Use the return expression's location if it has
3297 one, falling back to the location of the first token within it.
3298 * c-typeck.c (c_finish_return): When issuing warnings about
3299 the incorrect presence/absence of a return value, issue a note
3300 showing the declaration of the function.
3302 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3304 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3306 (c_parser_peek_nth_token): New function.
3307 (c_parser_peek_conflict_marker): New function.
3308 (c_parser_error): Detect conflict markers and report them as such.
3310 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3312 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3313 to preserve range information for the primary expression
3314 in the call to c_parser_postfix_expression_after_primary.
3316 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3318 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3319 expression location, falling back on the first token location,
3320 rather than always using the latter.
3322 2015-12-16 Marek Polacek <polacek@redhat.com>
3325 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3328 2015-12-15 Marek Polacek <polacek@redhat.com>
3331 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3334 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3336 * c-parser.c (c_parser_alignof_expression): Capture location of
3337 closing parenthesis (if any), or of end of unary expression, and
3338 use it to build a src_range for the expression.
3340 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3343 * c-parser.c (c_parser_get_builtin_args): Add
3344 "out_close_paren_loc" param, and write back to it.
3345 (c_parser_postfix_expression): Capture the closing
3346 parenthesis location for RID_CHOOSE_EXPR,
3347 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3348 RID_BUILTIN_SHUFFLE and use it to set the source range
3349 for such expressions; within RID_BUILTIN_COMPLEX set
3350 the underlying location.
3352 2015-12-07 Marek Polacek <polacek@redhat.com>
3355 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3356 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3358 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3360 * c-tree.h (c_build_va_arg): Adjust prototype.
3361 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3362 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3363 parameter, adjust throughout and issue an error if EXPR is a component
3364 with reverse storage order.
3366 2015-12-02 Jason Merrill <jason@redhat.com>
3368 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3369 (c_fully_fold_internal, decl_constant_value_for_optimization):
3370 Move from c-common.c.
3371 * c-tree.h: Declare decl_constant_value_for_optimization.
3372 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3374 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3377 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3378 following link from declarator to next declarator. Track original
3379 qualified type and pass it to c_build_qualified_type.
3380 * c-typeck.c (c_build_qualified_type): Add arguments
3381 orig_qual_type and orig_qual_indirect.
3383 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3385 * c-parser.c (c_parser_omp_clause_name)
3386 (c_parser_oacc_all_clauses): Alphabetical sorting.
3388 2015-12-02 Jakub Jelinek <jakub@redhat.com>
3391 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3394 2015-12-01 Julian Brown <julian@codesourcery.com>
3395 Cesar Philippidis <cesar@codesourcery.com>
3396 James Norris <James_Norris@mentor.com>
3398 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3399 (c_parser_oacc_clause_use_device): New function.
3400 (c_parser_oacc_all_clauses): Add use_device support.
3401 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3402 (c_parser_oacc_host_data): New function.
3403 (c_parser_omp_construct): Add host_data support.
3404 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3405 * c-typeck.c (c_finish_oacc_host_data): New function.
3406 (c_finish_omp_clauses): Add use_device support.
3408 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3411 * c-decl.c: Set TYPE_PACKED in variants.
3413 2015-11-27 Martin Liska <mliska@suse.cz>
3416 * c-array-notation.c (fix_builtin_array_notation_fn):
3417 Use release_vec_vec instead of vec::release.
3418 (build_array_notation_expr): Likewise.
3419 (fix_conditional_array_notations_1): Likewise.
3420 (fix_array_notation_expr): Likewise.
3421 (fix_array_notation_call_expr): Likewise.
3423 2015-11-27 Jakub Jelinek <jakub@redhat.com>
3426 * c-parser.c (c_parser_compound_statement_nostart): If
3427 last_label is true, use pragma_stmt instead of pragma_compound
3428 as second c_parser_pragma argument.
3429 (c_parser_omp_ordered, c_parser_omp_target_update,
3430 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3431 false as second argument to c_parser_skip_to_pragma_eol after
3432 diagnosing standalone directives used in pragma_stmt context.
3434 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3436 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3437 with "if (ENABLE_OFFLOADING)".
3439 2015-11-23 David Malcolm <dmalcolm@redhat.com>
3442 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3443 for various Objective-C constructs: Class.name syntax,
3444 @selector(), @protocol(), @encode(), and [] message syntax.
3446 2015-11-20 David Malcolm <dmalcolm@redhat.com>
3449 * c-typeck.c (should_suggest_deref_p): New function.
3450 (build_component_ref): Special-case POINTER_TYPE when
3451 generating a "not a structure of union" error message, and
3452 suggest a "->" rather than a ".", providing a fix-it hint.
3454 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3456 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3457 candidate into a new function, find_closest_identifier.
3459 2015-11-19 Marek Polacek <polacek@redhat.com>
3462 * c-typeck.c (parser_build_binary_op): Properly handle
3463 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3465 2015-11-17 David Malcolm <dmalcolm@redhat.com>
3467 * c-parser.c (set_c_expr_source_range): Bulletproof both
3468 overloaded implementations against NULL expr->value.
3469 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3471 (c_parser_unary_expression): Likewise when handling addresses of
3473 (c_parser_postfix_expression): Likewise for statement expressions,
3474 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3475 __builtin_va_arg, and for __builtin_offset_of.
3476 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3477 src_range using the range of the braced initializer.
3478 (c_parser_transaction_expression): Set src_range for "ret" to a
3479 sane pair of values.
3481 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3483 * c-parser.c (c_finish_omp_declare_simd): Look for
3484 "simd" attribute as well. Update error message.
3486 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3488 * c-parser.c (c_parser_omp_declare_target): Adjust.
3490 2015-11-14 Jakub Jelinek <jakub@redhat.com>
3492 * c-typeck.c (c_finish_omp_clauses): Don't mark
3493 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3495 2015-11-14 Marek Polacek <polacek@redhat.com>
3497 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3498 * c-typeck.c: Likewise.
3500 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3502 * c-decl.c (warn_defaults_to): Pass line_table to
3504 * c-errors.c (pedwarn_c99): Likewise.
3505 (pedwarn_c90): Likewise.
3506 * c-parser.c (set_c_expr_source_range): New functions.
3507 (c_token::get_range): New method.
3508 (c_token::get_finish): New method.
3509 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3510 based on the range from the start of the LHS to the end of the
3512 (c_parser_conditional_expression): Likewise, based on the range
3513 from the start of the cond.value to the end of exp2.value.
3514 (c_parser_binary_expression): Call set_c_expr_source_range on
3515 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3516 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3517 based on the cast_loc through to the end of the expr.
3518 (c_parser_unary_expression): Likewise, based on the
3519 op_loc through to the end of op.
3520 (c_parser_sizeof_expression) Likewise, based on the start of the
3521 sizeof token through to either the closing paren or the end of
3523 (c_parser_postfix_expression): Likewise, using the token range,
3524 or from the open paren through to the close paren for
3525 parenthesized expressions.
3526 (c_parser_postfix_expression_after_primary): Likewise, for
3527 various kinds of expression.
3528 * c-tree.h (struct c_expr): Add field "src_range".
3529 (c_expr::get_start): New method.
3530 (c_expr::get_finish): New method.
3531 (set_c_expr_source_range): New decls.
3532 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3533 on ret for prefix unary ops.
3534 (parser_build_binary_op): Likewise, running from the start of
3535 arg1.value through to the end of arg2.value.
3537 2015-11-13 Marek Polacek <polacek@redhat.com>
3540 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3542 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3544 * c-typeck.c: Include spellcheck.h.
3545 (lookup_field_fuzzy_find_candidates): New function.
3546 (lookup_field_fuzzy): New function.
3547 (build_component_ref): If the field was not found, try using
3548 lookup_field_fuzzy and potentially offer a suggestion.
3550 2015-11-12 James Norris <jnorris@codesourcery.com>
3551 Joseph Myers <joseph@codesourcery.com>
3553 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3554 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3555 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3556 and PRAGMA_OMP_CLAUSE_LINK.
3557 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3558 and PRAGMA_OACC_CLAUSE_LINK.
3559 (OACC_DECLARE_CLAUSE_MASK): New definition.
3560 (c_parser_oacc_declare): New function.
3562 2015-11-12 Marek Polacek <polacek@redhat.com>
3565 * c-parser.c (c_parser_for_statement): Reclassify the token in
3568 2015-11-11 Marek Polacek <polacek@redhat.com>
3572 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3573 checking the size of an array.
3575 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3577 * c-array-notation.c: Remove unused header files.
3578 * c-aux-info.c: Likewise.
3579 * c-convert.c: Likewise.
3580 * c-decl.c: Likewise.
3581 * c-errors.c: Likewise.
3582 * c-lang.c: Likewise.
3583 * c-objc-common.c: Likewise.
3584 * c-parser.c: Likewise.
3585 * c-typeck.c: Likewise.
3586 * gccspec.c: Likewise.
3588 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3589 Cesar Philippidis <cesar@codesourcery.com>
3590 James Norris <jnorris@codesourcery.com>
3591 Julian Brown <julian@codesourcery.com>
3592 Nathan Sidwell <nathan@codesourcery.com>
3594 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3596 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3597 (c_parser_pragma): Parse 'acc routine'.
3598 (OACC_ROUTINE_CLAUSE_MARK): Define.
3599 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3601 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3604 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3605 location of the backward-goto to the start of the loop body.
3607 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3610 * c-parser.c (c_parser_while_statement): Finish the loop before
3611 parsing ahead for misleading indentation.
3612 (c_parser_for_statement): Likewise.
3614 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3616 * c-decl.c (finish_struct): If the structure has reverse storage
3617 order, rewrite the type of array fields with scalar component. Call
3618 maybe_apply_pragma_scalar_storage_order on entry.
3619 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3620 errors on bit-fields and reverse SSO here and not...
3621 (c_mark_addressable): ...here.
3622 (output_init_element): Adjust call to initializer_constant_valid_p.
3623 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3625 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3627 * c-decl.c (warn_defaults_to): Update for change in signature
3628 of diagnostic_set_info.
3629 * c-errors.c (pedwarn_c99): Likewise.
3630 (pedwarn_c90): Likewise.
3631 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3632 for textinfo::set_location.
3634 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3635 Thomas Schwinge <thomas@codesourcery.com>
3636 James Norris <jnorris@codesourcery.com>
3638 * c-parser.c (c_parser_omp_clause_name): Add support for
3639 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3640 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3641 default(none) in OpenACC.
3642 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3644 (c_parser_oacc_clause_tile): New function.
3645 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3646 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3647 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3649 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3650 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3652 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3653 (c_parser_oacc_update): Update the error message for missing clauses.
3654 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3655 and OMP_CLAUSE_INDEPENDENT.
3657 2015-11-05 Marek Polacek <polacek@redhat.com>
3660 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3661 deal with pre-evaluation on invalid types.
3663 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3664 Ilya Verbin <ilya.verbin@intel.com>
3666 * c-parser.c: Include context.h and gimple-expr.h.
3667 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3668 monotonic together with nonmonotonic.
3669 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3670 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3671 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3672 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3673 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3674 expressions on combined target teams before the target.
3675 (c_parser_omp_declare_target): If decl has "omp declare target" or
3676 "omp declare target link" attribute, and cgraph or varpool node already
3677 exists, then set corresponding flags. Call c_finish_omp_clauses
3678 in the parenthesized extended-list syntax case.
3679 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3681 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3682 on OMP_CLAUSE_REDUCTION array sections.
3683 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3684 into the constant offset, or for variable low-bound using
3685 POINTER_PLUS_EXPR. For structure element based array sections use
3686 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3687 (c_finish_omp_clauses): Drop generic_field_head, structure
3688 elements are now always mapped even as array section bases,
3689 diagnose same var in data sharing and mapping clauses. Diagnose if
3690 linear step on declare simd is neither a constant nor a uniform
3691 parameter. Look through POINTER_PLUS_EXPR for array section
3692 reductions. Diagnose the same var or function appearing multiple
3693 times on the same directive. Fix up wording for the to clause if t
3694 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3695 modifier on kinds other than dynamic or guided or nonmonotonic
3696 modifier together with ordered clause.
3698 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3699 Chung-Lin Tang <cltang@codesourcery.com>
3701 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3703 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3705 * c-array-notation.c: Reorder #include's and remove duplicates.
3706 * c-aux-info.c: Likewise.
3707 * c-convert.c: Likewise.
3708 * c-decl.c: Likewise.
3709 * c-errors.c: Likewise.
3710 * c-lang.c: Likewise.
3711 * c-objc-common.c: Likewise.
3712 * c-parser.c: Likewise.
3713 * c-typeck.c: Likewise.
3715 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3718 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3719 after calling build_qualified_type.
3721 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3722 Thomas Schwinge <thomas@codesourcery.com>
3723 James Norris <jnorris@codesourcery.com>
3724 Joseph Myers <joseph@codesourcery.com>
3725 Julian Brown <julian@codesourcery.com>
3726 Bernd Schmidt <bschmidt@redhat.com>
3728 * c-parser.c (c_parser_oacc_shape_clause): New.
3729 (c_parser_oacc_simple_clause): New.
3730 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3731 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3733 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3734 James Norris <jnorris@codesourcery.com>
3735 Cesar Philippidis <cesar@codesourcery.com>
3739 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3740 parameters, and handle these. Adjust all users.
3741 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3743 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3745 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3747 (c_finish_omp_construct): Declare function.
3748 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3749 Merge functions into...
3750 (c_finish_omp_construct): ... this new function.
3752 2015-10-22 Richard Biener <rguenther@suse.de>
3754 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3755 before folding a MINUS_EXPR.
3757 2015-10-21 Marek Polacek <polacek@redhat.com>
3760 * c-decl.c (start_function): Warn about vararg functions without
3763 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3765 * c-typeck.c (build_conditional_expr): Use boolean vector
3766 type for vector comparison.
3767 (build_vec_cmp): New.
3768 (build_binary_op): Use build_vec_cmp for comparison.
3770 2015-10-20 Marek Polacek <polacek@redhat.com>
3772 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3774 2015-10-20 Marek Polacek <polacek@redhat.com>
3777 * c-parser.c (c_parser_attributes): Break out of the loop if the
3778 token after an attribute isn't a comma.
3780 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3781 Aldy Hernandez <aldyh@redhat.com>
3783 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3784 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3785 (c_parser_omp_variable_list): Handle structure elements for
3786 map, to and from clauses. Handle array sections in reduction
3787 clause. Formatting fixes.
3788 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3789 if clause modifiers.
3790 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3791 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3792 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3793 c_parser_omp_clause_is_device_ptr): New functions.
3794 (c_parser_omp_clause_ordered): Parse optional parameter.
3795 (c_parser_omp_clause_reduction): Handle array reductions.
3796 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3797 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3799 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3800 (c_parser_omp_clause_depend_sink): New function.
3801 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3802 (c_parser_omp_clause_map): Parse release/delete map kinds and
3803 optional always modifier.
3804 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3805 and c_finish_omp_clauses callers.
3806 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3807 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3808 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3809 (OMP_CRITICAL_CLAUSE_MASK): Define.
3810 (c_parser_omp_critical): Parse critical clauses.
3811 (c_parser_omp_for_loop): Handle doacross loops, adjust
3812 c_finish_omp_for and c_finish_omp_clauses callers.
3813 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3814 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3815 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3816 (c_parser_omp_for): Disallow ordered clause when combined with
3817 distribute. Disallow linear clause when combined with distribute
3818 and not combined with simd.
3819 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3820 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3821 parse clauses and if depend clause is found, don't parse a body.
3822 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3823 Allow target parallel without for after it.
3824 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3825 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3826 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3828 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3829 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3830 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3831 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3833 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3834 defaultmap and is_device_ptr clauses.
3835 (c_parser_omp_target): Parse target parallel and target simd. Set
3836 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3837 and target exit data. Diagnose invalid map kinds.
3838 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3839 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3841 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3843 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3844 (c_parser_omp_taskloop): New function.
3845 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3846 handle PRAGMA_OMP_TASKLOOP.
3847 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3848 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3849 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3850 Add IS_OMP argument, handle structure element bases, diagnose
3851 bitfields, pass IS_OMP recursively, diagnose known zero length
3852 array sections in depend clauses, handle array sections in reduction
3853 clause, diagnose negative length even for pointers.
3854 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3855 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3856 array sections in reduction clause, set
3857 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3858 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3859 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3860 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3862 2015-10-06 Marek Polacek <polacek@redhat.com>
3864 * c-parser.c (c_parser_statement_after_labels): Use
3865 protected_set_expr_location.
3866 (c_parser_omp_clause_num_gangs): Likewise.
3867 (c_parser_omp_clause_num_threads): Likewise.
3868 (c_parser_omp_clause_num_workers): Likewise.
3869 (c_parser_omp_clause_vector_length): Likewise.
3870 (c_parser_omp_clause_num_teams): Likewise.
3871 (c_parser_omp_clause_thread_limit): Likewise.
3872 * c-typeck.c (build_c_cast): Likewise.
3873 (c_cast_expr): Likewise.
3875 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3877 * c-typeck.c (c_tree_equal): Use real_equal instead of
3880 2015-10-04 Jason Merrill <jason@redhat.com>
3882 * c-parser.c (c_lex_one_token): Handle @synchronized.
3883 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3884 can change whether the function is transaction_safe.
3886 2015-10-02 Marek Polacek <polacek@redhat.com>
3889 * c-typeck.c (convert_for_assignment): Use the expansion point
3890 location throughout.
3892 2015-10-02 Marek Polacek <polacek@redhat.com>
3895 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3896 and pass it down to c_parser_if_statement.
3897 (c_parser_else_body): Add CHAIN parameter and pass it down to
3898 c_parser_statement_after_labels.
3899 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3900 duplicated if-else-if conditions.
3902 2015-10-01 Marek Polacek <polacek@redhat.com>
3904 * c-typeck.c (convert_for_assignment): Improve commentary.
3906 2015-09-30 Marek Polacek <polacek@redhat.com>
3909 * c-typeck.c (c_finish_return): Use the expansion point location for
3910 certain "return with value" warnings.
3912 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3914 * c-parser.c (pragma_lex): Add loc argument.
3916 2015-09-15 Marek Polacek <polacek@redhat.com>
3919 * c-decl.c (tag_exists_p): New function.
3920 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3921 struct/union/enum keywords are missing.
3922 * c-tree.h (tag_exists_p): Declare.
3924 2015-09-15 Marek Polacek <polacek@redhat.com>
3926 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3927 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3928 Return NULL_TREE instead of 0.
3929 (lookup_name): Return NULL_TREE instead of 0.
3930 (lookup_name_in_scope): Likewise.
3931 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3932 (parser_xref_tag): Use false instead of 0.
3933 (start_struct): Use true instead of 1.
3934 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3936 2015-09-14 Marek Polacek <polacek@redhat.com>
3938 * c-typeck.c (set_nonincremental_init_from_string): Use
3939 HOST_WIDE_INT_M1U when shifting a negative value.
3941 2015-09-09 Mark Wielaard <mjw@redhat.com>
3943 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3946 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3949 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3950 into OMP_FOR_PRE_BODY rather than before the loop.
3952 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3955 * c-parser.c (c_parser_oacc_all_clauses,
3956 c_parser_omp_all_clauses): Remove invalid clause from
3957 list of clauses even if parser->error is set.
3960 * c-parser.c (c_parser_omp_clause_aligned,
3961 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3963 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3967 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3968 instead of c_parser_unary_expression. If the result is !lvalue_p,
3969 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3971 2015-09-04 Marek Polacek <polacek@redhat.com>
3974 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3976 2015-09-03 Martin Sebor <msebor@redhat.com>
3979 * c-typeck.c (convert_arguments, parser_build_unary_op,
3980 build_conditional_expr, c_cast_expr, convert_for_assignment,
3981 build_binary_op, _objc_common_truthvalue_conversion): Call
3983 (c_decl_implicit): Define.
3985 2015-09-02 Marek Polacek <polacek@redhat.com>
3988 * c-parser.c (c_parser_enum_specifier): Give a better error for
3991 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3993 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3995 2015-08-12 Marek Polacek <polacek@redhat.com>
3997 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4000 2015-08-03 Marek Polacek <polacek@redhat.com>
4003 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4005 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4007 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4009 * c-parser.c (c_parser_if_body): Take token_indent_info
4010 argument. Call warn_for_misleading_indentation even when the
4011 body is a semicolon. Extract token_indent_infos corresponding
4012 to the guard, body and next tokens. Adjust call to
4013 warn_for_misleading_indentation accordingly.
4014 (c_parser_else_body): Likewise.
4015 (c_parser_if_statement): Likewise.
4016 (c_parser_while_statement): Likewise.
4017 (c_parser_for_statement): Likewise.
4019 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4020 Manuel López-Ibáñez <manu@gcc.gnu.org>
4022 * c-decl.c (get_parm_info): Remove static var. Update warning
4025 2015-07-27 Marek Polacek <polacek@redhat.com>
4029 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4031 2015-07-20 Marek Polacek <polacek@redhat.com>
4034 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4035 (build_binary_op): Warn about left shift overflows.
4037 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4039 * c-array-notation.c: Adjust includes for flags.h changes.
4040 * c-objc-common.c: Likewise.
4042 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4044 * c-array-notation.c: Adjust includes.
4045 * c-aux-info.c: Likewise.
4046 * c-convert.c: Likewise.
4047 * c-decl.c: Likewise.
4048 * c-errors.c: Likewise.
4049 * c-lang.c: Likewise.
4050 * c-objc-common.c: Likewise.
4051 * c-parser.c: Likewise.
4052 * c-typeck.c: Likewise.
4054 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4057 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4059 2015-06-29 Marek Polacek <polacek@redhat.com>
4062 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4063 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4064 about -Wswitch-bool here.
4065 (do_case): Update c_add_case_label call.
4066 (c_finish_case): Update c_do_switch_warnings call.
4068 2015-06-27 Marek Polacek <polacek@redhat.com>
4070 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4072 2015-06-26 Marek Polacek <polacek@redhat.com>
4074 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4076 * c-typeck.c (array_to_pointer_conversion): Likewise.
4077 (build_unary_op): Likewise.
4078 (c_finish_return): Likewise.
4080 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4082 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4083 * c-parser.c: Likewise.
4085 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4087 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4088 instead of pointer_hash.
4089 (detect_field_duplicates): Likewise.
4091 2015-06-25 Marek Polacek <polacek@redhat.com>
4093 * c-array-notation.c: Use VAR_P throughout.
4094 * c-decl.c: Likewise.
4095 * c-objc-common.c: Likewise.
4096 * c-parser.c: Likewise.
4097 * c-typeck.c: Likewise.
4099 2015-06-25 Marek Polacek <polacek@redhat.com>
4101 * c-decl.c: Use is_global_var throughout.
4102 * c-parser.c: Likewise.
4103 * c-typeck.c: Likewise.
4105 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4107 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4108 * c-aux-info.c: Likewise.
4109 * c-convert.c: Likewise.
4110 * c-decl.c: Likewise.
4111 * c-errors.c: Likewise.
4112 * c-lang.c: Likewise.
4113 * c-objc-common.c: Likewise.
4114 * c-parser.c: Likewise.
4115 * c-typeck.c: Likewise.
4117 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4120 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4123 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4125 * c-decl.c (pop_scope): Register the main translation unit
4126 through the new debug hook.
4128 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4130 * c-array-notation.c : Adjust include files.
4131 * c-aux-info.c : Likewise.
4132 * c-convert.c : Likewise.
4133 * c-decl.c : Likewise.
4134 * c-errors.c : Likewise.
4135 * c-lang.c : Likewise.
4136 * c-lang.h : Likewise.
4137 * c-objc-common.c : Likewise.
4138 * c-parser.c : Likewise.
4139 * c-typeck.c : Likewise.
4141 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4143 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4144 immediately clobber it.
4145 (c_write_global_declarations_1): Remove call to
4146 check_global_declaration_1.
4147 (c_write_global_declarations_2): Remove.
4148 (c_write_final_cleanups): Rename from c_write_global_declarations.
4149 Remove call to finalize_compilation_unit.
4150 Remove calls to debugging hooks.
4151 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4152 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4153 * c-tree.h: Remove c_write_global_declarations.
4155 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4157 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4158 * c-aux-info.c: Likewise.
4159 * c-convert.c: Likewise.
4160 * c-decl.c: Likewise.
4161 * c-errors.c: Likewise.
4162 * c-lang.c: Likewise.
4163 * c-objc-common.c: Likewise.
4164 * c-parser.c: Likewise.
4165 * c-typeck.c: Likewise.
4167 2015-06-04 Marek Polacek <polacek@redhat.com>
4170 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4173 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4175 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4176 Warn for empty struct.
4177 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4179 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4181 * c-decl.c (start_function): Call plugin before parsing.
4182 (finish_function): Call plugin after parsing.
4184 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4187 * c-decl.c (merge_decls): Merge DECL_COMMON.
4189 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4191 * Make-lang.in (check_gcc_pallelize): Define.
4193 2015-05-22 Marek Polacek <polacek@redhat.com>
4196 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4199 2015-05-21 Marek Polacek <polacek@redhat.com>
4201 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4204 2015-05-20 Marek Polacek <polacek@redhat.com>
4206 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4207 * c-typeck.c: Likewise.
4209 2015-05-19 Marek Polacek <polacek@redhat.com>
4211 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4213 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4216 * c-parser.c (c_parser_omp_for_loop): Don't add
4217 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4218 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4219 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4222 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4224 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4227 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4230 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4233 2015-05-14 Marek Polacek <polacek@redhat.com>
4237 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4240 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4242 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4243 to add a call to warn_for_misleading_indentation.
4244 (c_parser_else_body): Likewise, adding param "else_loc".
4245 (c_parser_if_statement): Check for misleading indentation.
4246 (c_parser_while_statement): Likewise.
4247 (c_parser_for_statement): Likewise.
4249 2015-05-08 Marek Polacek <polacek@redhat.com>
4252 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4253 (output_init_element): Likewise.
4255 2015-05-07 Marek Polacek <polacek@redhat.com>
4258 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4261 2015-04-30 Marek Polacek <polacek@redhat.com>
4263 * c-typeck.c (set_init_label): Call error_at instead of error and
4266 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4269 * c-typeck.c (c_build_va_arg): Clarify the error message.
4271 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4273 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4274 OMP_STANDALONE_CLAUSES.
4276 2015-04-28 Marek Polacek <polacek@redhat.com>
4278 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4280 2015-04-28 Marek Polacek <polacek@redhat.com>
4283 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4285 2015-04-25 Marek Polacek <polacek@redhat.com>
4288 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4291 2015-04-23 Marek Polacek <polacek@redhat.com>
4294 * c-decl.c (set_labels_context_r): New function.
4295 (store_parm_decls): Call it via walk_tree_without_duplicates.
4296 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4297 instead of create_tmp_var. Build TARGET_EXPR instead of
4299 (build_atomic_assign): Use create_tmp_var_raw instead of
4300 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4302 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4304 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4305 (c_parser_omp_target_update): Add missed %> to error_at ().
4307 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4310 * c-decl.c (c_default_pointer_mode): Remove definition.
4311 * c-tree.h (c_default_pointer_mode): Remove declaration.
4313 2015-03-27 Tobias Burnus <burnus@net-b.de>
4316 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4318 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4319 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4320 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4322 2015-03-19 Jakub Jelinek <jakub@redhat.com>
4324 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4325 attribute for DECL_EXTERNAL VAR_DECLs.
4327 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4329 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4332 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4335 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4336 before preparing arguments to warn_logical_not_parentheses.
4338 2015-03-09 Jakub Jelinek <jakub@redhat.com>
4341 * c-typeck.c (parser_build_binary_op): Don't warn for
4342 !!x == y or !b == y where b is _Bool.
4344 2015-03-09 Marek Polacek <polacek@redhat.com>
4346 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4347 * c-decl.c (grokdeclarator): Likewise.
4348 * c-typeck.c (build_binary_op): Likewise.
4350 2015-02-27 Marek Polacek <polacek@redhat.com>
4353 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4355 2015-02-14 Marek Polacek <polacek@redhat.com>
4358 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4359 declared through a typedef name.
4361 2015-02-13 Marek Polacek <polacek@redhat.com>
4364 * c-decl.c (grokdeclarator): Print also the type when giving
4365 the error message about array's incomplete element type.
4367 2015-02-11 Jakub Jelinek <jakub@redhat.com>
4370 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4371 check in the POP macro.
4373 2015-02-09 Marek Polacek <polacek@redhat.com>
4376 * c-typeck.c (process_init_element): Don't always wrap
4377 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4378 initializing a range of elements.
4380 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4384 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4386 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
4388 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4389 processing enum declaration.
4391 2015-01-29 Marek Polacek <polacek@redhat.com>
4394 * c-typeck.c (pop_init_level): If constructor_elements has
4395 exactly one element with integer_zerop value, set constructor_zeroinit
4396 to 1. Remove braces around warning_init call.
4398 2015-01-27 Jakub Jelinek <jakub@redhat.com>
4401 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4402 of FUNCTION_DECLs with error_mark_node.
4404 2015-01-26 Jakub Jelinek <jakub@redhat.com>
4407 * c-typeck.c (convert_arguments): Return -1 if there are
4408 error_args, even if we've diagnosed too many arguments.
4410 2015-01-21 Richard Biener <rguenther@suse.de>
4413 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4414 for builtins the user declared correctly.
4416 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4417 Bernd Schmidt <bernds@codesourcery.com>
4418 Cesar Philippidis <cesar@codesourcery.com>
4419 James Norris <jnorris@codesourcery.com>
4420 Jakub Jelinek <jakub@redhat.com>
4421 Ilmir Usmanov <i.usmanov@samsung.com>
4423 * c-parser.c: Include "gomp-constants.h".
4424 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4425 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4426 Use OMP_CLAUSE_SET_MAP_KIND.
4427 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4428 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4429 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4430 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4431 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4432 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4433 "copyout", "create", "delete", "deviceptr", "gang", "host",
4434 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4435 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4436 "present_or_create", "pcreate", "seq", "self", "vector",
4437 "vector_length", "wait", "worker".
4438 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4439 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4440 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4441 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4442 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4443 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4444 (c_parser_oacc_data_clause_deviceptr)
4445 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4446 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4447 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4448 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4449 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4450 (c_parser_oacc_parallel, c_parser_oacc_update)
4451 (c_parser_oacc_wait): New functions.
4452 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4453 (c_finish_oacc_data): New prototypes.
4454 * c-typeck.c: Include "gomp-constants.h".
4455 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4456 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4457 OMP_CLAUSE_SET_MAP_KIND.
4458 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4459 (c_finish_oacc_data): New functions.
4460 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4461 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4462 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4463 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4464 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4465 GOMP_MAP_FORCE_DEVICEPTR.
4467 2015-01-09 Michael Collison <michael.collison@linaro.org>
4469 * c-array-notation.c: Include hash-set.h, machmode.h,
4470 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4471 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4472 * c-aux-info.c: Ditto.
4473 * c-convert.c: Ditto.
4475 * c-errors.c: Ditto.
4476 * c-lang.c: Dittoxs.
4477 * c-objc-common.c: Ditto.
4478 * c-parser.c: Ditto.
4479 * c-typeck.c: Include hash-set.h, machmode.h,
4480 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4481 fold-const.h, wide-int.h, inchash.h, real.h and
4482 fixed-value.h due to flattening of tree.h.
4484 2015-01-07 Marek Polacek <polacek@redhat.com>
4487 * c-typeck.c (process_init_element): Disallow initialization of
4488 a flexible array member with a string constant if the structure
4491 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4494 * c-typeck.c (convert_for_assignment, c_finish_return): For
4495 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4496 types also set in_late_binary_op around convert call.
4497 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4498 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4499 result on expr as last argument to ubsan_instrument_float_cast,
4500 if in_late_binary_op, don't use c_save_expr but save_expr.
4502 Update copyright years.
4504 2015-01-05 Marek Polacek <polacek@redhat.com>
4507 * c-typeck.c (build_array_ref): Pass loc down to
4508 warn_array_subscript_with_type_char.
4510 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4512 * c-typeck.c: New behavious for pointers to arrays with qualifiers
4513 (common-pointer-type): For pointers to arrays take qualifiers from
4515 (build_conditional_expr): Add warnings for lost qualifiers.
4516 (comp-target-types): Allow pointers to arrays with different qualifiers.
4517 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4518 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4519 to PEDWARN_FOR_QUALIFIERS.
4521 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4524 * c-convert.c: Include ubsan.h.
4525 (convert): For real -> integral casts and
4526 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4527 instead instrument the float cast directly.
4529 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4531 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4532 c_finish_stmt_expr): Remove NULL last argument from
4533 create_tmp_var_raw and create_tmp_var calls.
4534 * c-array-notation.c (fix_builtin_array_notation_fn,
4535 build_array_notation_expr, fix_conditional_array_notations_1,
4536 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4538 2014-11-28 Marek Polacek <polacek@redhat.com>
4541 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4542 convert the right operand to integer type.
4544 2014-11-25 Marek Polacek <polacek@redhat.com>
4547 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4548 for inline functions.
4550 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4553 * c-typeck.c (build_array_ref): Adjust
4554 convert_vector_to_pointer_for_subscript caller. If it returns true,
4555 call non_lvalue_loc on the result.
4557 2014-11-11 Richard Biener <rguenther@suse.de>
4559 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4562 2014-11-10 Andi Kleen <ak@linux.intel.com>
4565 * c-parser.c (c_parser_statement_after_labels): Call
4567 (c_parser_if_statement): Dito.
4568 (c_parser_switch_statement): Dito.
4569 (c_parser_while_statement): Dito.
4570 (c_parser_do_statement): Dito.
4571 (c_parser_for_statement): Dito.
4572 * c-typeck.c (c_finish_loop): Dito.
4574 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4576 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4577 OPT_Wshift_count_overflow in the warnings.
4579 2014-10-30 Marek Polacek <polacek@redhat.com>
4581 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4582 print the stripped version as well, if they're not the same.
4584 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4586 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4589 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4591 * c-decl.c: Adjust include files.
4592 * c-parser.c: Ditto.
4594 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4595 Tom Tromey <tromey@redhat.com>
4597 * c-tree.h (enum c_oracle_request): New.
4598 (c_binding_oracle_function): New typedef.
4599 (c_binding_oracle, c_pushtag, c_bind): Declare.
4600 * c-decl.c (c_binding_oracle): New global.
4601 (I_SYMBOL_CHECKED): New macro.
4602 (i_symbol_binding): New function.
4603 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4604 (I_TAG_CHECKED): New macro.
4605 (i_tag_binding): New function.
4606 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4607 (I_LABEL_CHECKED): New macro.
4608 (i_label_binding): New function.
4609 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4610 (c_print_identifier): Save and restore c_binding_oracle.
4611 (c_pushtag, c_bind): New functions.
4613 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4615 * c-typeck.c: Adjust include files.
4617 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4620 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4621 initialization here...
4622 (c_initialize_diagnostics): ... but here. Set defaults after
4623 building pretty-printer.
4625 2014-10-23 Marek Polacek <polacek@redhat.com>
4628 * c-decl.c (pop_scope): Don't print warning in external_scope.
4630 2014-10-19 Marek Polacek <polacek@redhat.com>
4633 * c-typeck.c (output_init_element): Allow initializing objects with
4634 static storage duration with compound literals even in C99 and add
4637 2014-10-17 Marek Polacek <polacek@redhat.com>
4640 * c-typeck.c (digest_init): Allow initializing objects with static
4641 storage duration with compound literals even in C99 and add pedwarn
4644 2014-10-17 Marek Polacek <polacek@redhat.com>
4647 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4648 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4649 error multiple times. Print the type.
4651 2014-10-17 Marek Polacek <polacek@redhat.com>
4654 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4657 2014-10-17 Marek Polacek <polacek@redhat.com>
4659 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4660 (start_function): Use OPT_Wimplicit_int instead of 0.
4661 (store_parm_decls_oldstyle): Likewise.
4663 2014-10-17 Alan Modra <amodra@gmail.com>
4666 * c-decl.c (merge_decls): Don't merge section name or tls model
4667 to newdecl symtab node, instead merge to olddecl. Override
4668 existing olddecl section name. Set tls_model for all thread-local
4669 vars, not just OMP thread-private ones. Remove incorrect comment.
4671 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4673 * c-decl.c: Adjust include files.
4675 2014-10-14 DJ Delorie <dj@redhat.com>
4677 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4678 (c_token_starts_typename): Check all __intN, not just __int128.
4679 (c_token_starts_declspecs): Likewise.
4680 (c_parser_declspecs): Likewise.
4681 (c_parser_attribute_any_word): Likewise.
4682 (c_parser_objc_selector): Likewise.
4683 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4684 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4686 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4688 (finish_declspecs): Likewise.
4690 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4692 * c-parser.c (c_parser_all_labels): New function to replace
4694 (c_parser_statement): Call the new function.
4696 2014-10-09 Marek Polacek <polacek@redhat.com>
4699 * c-typeck.c (pop_init_level): Don't warn about initializing
4702 2014-10-07 Marek Polacek <polacek@redhat.com>
4705 * c-decl.c (header_for_builtin_fn): New function.
4706 (implicitly_declare): Suggest which header to include.
4708 2014-10-07 Marek Polacek <polacek@redhat.com>
4710 * c-convert.c (convert): Use error_operand_p.
4711 * c-typeck.c (require_complete_type): Likewise.
4712 (really_atomic_lvalue): Likewise.
4713 (digest_init): Likewise.
4714 (handle_omp_array_sections_1): Likewise.
4716 2014-10-03 Marek Polacek <polacek@redhat.com>
4719 * c-decl.c (pop_scope): Don't warn about "inline function declared
4720 but never defined" for functions marked with gnu_inline attribute.
4722 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4725 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4726 on low_bound and length.
4728 2014-09-24 Marek Polacek <polacek@redhat.com>
4732 * c-parser.c: Don't define CPP_KEYWORD.
4733 (c_parser_switch_statement): Pass original type to c_finish_case.
4734 * c-tree.h (c_finish_case): Update declaration.
4735 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4736 conditionally to c_do_switch_warnings.
4738 2014-09-03 Marek Polacek <polacek@redhat.com>
4741 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4744 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4745 Balaji V. Iyer <balaji.v.iyer@intel.com>
4746 Igor Zamyatin <igor.zamyatin@intel.com>
4748 * c-parser.c (c_parser_cilk_for): New function.
4749 (c_parser_cilk_grainsize): Likewise.
4750 (c_get_temp_regvar): Likewise.
4751 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4752 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4753 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4754 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4757 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4759 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4760 with using HOST_WIDE_INT without truncation to 'int'
4762 2014-08-22 Marek Polacek <polacek@redhat.com>
4765 * c-typeck.c (parser_build_binary_op): Adjust call to
4766 warn_logical_not_parentheses.
4768 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4771 * c-parser.c (c_parser_array_notation): Check for correct
4772 type of an array added.
4774 2014-08-19 Marek Polacek <polacek@redhat.com>
4777 * c-typeck.c (build_binary_op): If either operand of a comparison
4778 is a boolean expression, call maybe_warn_bool_compare.
4780 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4783 * c-typeck.c (build_c_cast): Do a conversion even when the
4784 TYPE_MAIN_VARIANTs are the same.
4786 2014-08-19 Marek Polacek <polacek@redhat.com>
4788 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4789 pedwarn_c99 instead of pedwarn.
4790 (grokfield): Likewise.
4791 (warn_defaults_to): New function.
4792 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4793 Unconditionally call pedwarn_c99 instead of pedwarn.
4794 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4795 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4796 check flag_isoc11 before.
4797 * c-errors.c (pedwarn_c99): Change the return type to bool.
4798 Handle -Wc99-c11-compat.
4799 * c-parser.c (disable_extension_diagnostics): Handle
4800 warn_c99_c11_compat.
4801 (restore_extension_diagnostics): Likewise.
4802 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4803 instead of pedwarn, don't check flag_isoc11 before.
4804 (c_parser_declspecs): Likewise.
4805 (c_parser_alignas_specifier): Likewise.
4806 (c_parser_alignof_expression): Likewise.
4807 (c_parser_generic_selection): Likewise.
4808 * c-tree.h (pedwarn_c99): Update declaration.
4809 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4812 2014-08-19 Marek Polacek <polacek@redhat.com>
4814 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4816 * c-errors.c: Include "opts.h".
4817 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4818 * c-parser.c (disable_extension_diagnostics): Handle negative value
4819 of warn_c90_c99_compat, too.
4820 (restore_extension_diagnostics): Likewise.
4821 (c_parser_compound_statement_nostart): Pass
4822 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4824 2014-08-12 Marek Polacek <polacek@redhat.com>
4826 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4828 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4830 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4832 2014-08-10 Marek Polacek <polacek@redhat.com>
4835 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4836 Call pedwarn_c90 instead of pedwarn.
4837 (check_bitfield_type_and_width): Likewise.
4838 (declspecs_add_qual): Likewise.
4839 (declspecs_add_type): Likewise.
4840 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4841 Adjust to only call pedwarn_c90.
4842 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4843 pedwarn_c90 instead of pedwarn.
4844 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4845 * c-parser.c (disable_extension_diagnostics): Handle
4846 warn_c90_c99_compat.
4847 (restore_extension_diagnostics): Likewise.
4848 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4849 pedwarn_c90 instead of pedwarn.
4850 (c_parser_initelt): Likewise.
4851 (c_parser_postfix_expression): Likewise.
4852 (c_parser_postfix_expression_after_paren_type): Likewise.
4853 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4854 * c-tree.h: Fix formatting.
4855 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4856 pedwarn_c90 instead of pedwarn.
4858 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4860 * c-typeck.c: Remove include of pointer-set.h.
4862 2014-08-07 Marek Polacek <polacek@redhat.com>
4864 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4866 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4868 * c-typeck.c: Use hash_map instead of pointer_map.
4870 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4872 * c-decl.c: Use hash_set instead of pointer_set.
4874 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4877 * c-array-notation.c (expand_array_notations): Handling
4880 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4883 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4886 2014-07-30 Tom Tromey <tromey@redhat.com>
4888 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4890 (really_start_incremental_init, push_init_level): Initialize
4892 (pop_init_level): Set global designator_depth.
4893 (process_init_element): Check for designated_init attribute.
4895 2014-07-20 Marek Polacek <polacek@redhat.com>
4898 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4899 (implicitly_declare): Pass location to implicit_decl_warning.
4901 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4904 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4905 If non-NULL, call c_parser_check_literal_zero.
4906 (c_parser_check_literal_zero): New function.
4907 (c_parser_postfix_expression_after_primary): Adjust
4908 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4910 2014-07-06 Marek Polacek <polacek@redhat.com>
4913 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4914 * c-tree.h (C_ARRAY_PARAMETER): Define.
4915 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4918 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4919 Chen Gang <gang.chen.5i5j@gmail.com>
4921 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4924 2014-07-01 Marek Polacek <polacek@redhat.com>
4926 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4927 instead of 0 to WARN_FOR_ASSIGNMENT.
4929 2014-07-01 Marek Polacek <polacek@redhat.com>
4932 * c-typeck.c (convert_for_assignment): Pass
4933 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4935 2014-06-30 Marek Polacek <polacek@redhat.com>
4937 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4938 has no_sanitize_undefined attribute.
4940 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4943 * c-array-notation.c (fix_builtin_array_notation_fn):
4944 Check for 0 arguments in builtin call. Check that bultin argument is
4946 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4949 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4951 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4952 qualifiers in __auto_type for atomic types.
4953 (c_parser_typeof_specifier): Discard all type qualifiers in
4954 __typeof__ for atomic types.
4956 2014-06-25 Marek Polacek <polacek@redhat.com>
4959 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4960 the return expression to c_finish_return.
4962 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4964 * c-typeck.c (c_finish_omp_clauses): Make sure
4965 OMP_CLAUSE_LINEAR_STEP has correct type.
4967 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4971 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4973 * c-parser.c (c_parser_omp_for_loop): For
4974 #pragma omp parallel for simd move lastprivate clause from parallel
4975 to for rather than simd.
4977 2014-06-23 Marek Polacek <polacek@redhat.com>
4979 * c-typeck.c (parser_build_binary_op): Don't call
4980 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4982 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4984 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4985 * c-decl.c (merge_decls): Likewise.
4987 2014-06-09 Marek Polacek <polacek@redhat.com>
4990 * c-typeck.c (error_init): Call inform instead of error_at.
4991 (pedwarn_init): Call inform instead of pedwarn.
4992 (warning_init): Call inform instead of warning_at.
4994 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4996 * c-decl.c (merge_decls): Use set_decl_section_name.
4997 (duplicate_decls): Remove node if it exists.
4999 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5002 * c-typeck.c (push_init_level, process_init_element,
5003 pop_init_level): Correct check for zero initialization, move
5004 missing brace warning to respect zero initialization.
5006 2014-06-05 Marek Polacek <polacek@redhat.com>
5009 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5011 2014-06-05 Marek Polacek <polacek@redhat.com>
5014 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5015 on the left hand side operand of a comparison.
5017 2014-06-05 Marek Polacek <polacek@redhat.com>
5020 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5021 Print note only if the warning was printed.
5023 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5026 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5029 2014-06-03 Marek Polacek <polacek@redhat.com>
5032 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5034 * c-tree.h (c_start_case): Update.
5035 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5036 switch condition has boolean value.
5038 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
5040 * c-decl.c: Include builtins.h.
5041 * c-parser.c: Likewise.
5043 2014-05-27 Marek Polacek <polacek@redhat.com>
5046 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5047 error and warning calls to error_at and warning_at. Pass location of
5048 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5049 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5050 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5052 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5055 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5056 function parameters.
5058 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
5060 * c-decl.c (merge_decls): Preserve symtab node pointers.
5061 (duplicate_decls): Free new decl.
5063 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5065 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5068 * c-parser.c (c_parser_omp_target): Return bool values.
5070 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5072 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5073 num_teams_loc variable to num_thread_limit_loc.
5075 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5077 * c-array-notation.c (expand_array_notations): Use void_node
5078 instead of void_zero_node.
5080 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5082 * c-decl.c (finish_struct): Adjust.
5083 (finish_enum): Likewise.
5085 (record_inline_static): Likewise.
5086 (push_scope): Likewise.
5087 (make_label): Likewise.
5088 (lookup_label_for_goto): Likewise.
5089 (finish_struct): Likewise.
5090 (finish_enum): Likewise.
5091 (store_parm_decls): Likewise.
5092 (c_push_function_context): Likewise.
5093 * c-lang.h: Remove usage of variable_size gty attribute.
5094 * c-parser.c (c_parse_init): Adjust.
5095 (c_parse_file): Likewise.
5097 2014-05-13 Marek Polacek <polacek@redhat.com>
5100 * c-typeck.c (convert_for_assignment): Pass location to
5101 WARN_FOR_ASSIGNMENT instead of input_location.
5103 2014-05-10 Marek Polacek <polacek@redhat.com>
5105 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5106 maybe_warn_string_init.
5107 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5108 maybe_warn_string_init.
5109 * c-tree.h (maybe_warn_string_init): Update declaration.
5110 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5111 Call pedwarn_init with loc instead of with input_location.
5112 (digest_init): Pass init_loc to maybe_warn_string_init.
5113 (pop_init_level): Call pedwarn_init with loc instead of with
5115 (set_init_index): Likewise.
5116 (process_init_element): Likewise.
5118 2014-05-09 Marek Polacek <polacek@redhat.com>
5121 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5122 (c_parser_initelt): Pass location to set_init_label. Pass array index
5123 location to set_init_index.
5124 * c-tree.h (push_init_level): Update declaration.
5125 (pop_init_level): Likewise.
5126 (set_init_index): Likewise.
5127 (set_init_label): Likewise.
5128 * c-typeck.c (error_init): Add location parameter. Call error_at
5130 (digest_init): Pass init_loc to error_init.
5131 (really_start_incremental_init):
5132 (push_init_level): Add location parameter. Pass loc to pop_init_level
5134 (pop_init_level): Likewise.
5135 (set_designator): Add location parameter. Pass loc to pop_init_level,
5136 push_init_level, and error_init.
5137 (set_init_index): Add location parameter. Pass loc to error_init and
5139 (set_init_label): Likewise.
5140 (output_init_element): Pass loc to error_init.
5141 (process_init_element): Pass loc to error_init, pop_init_level,
5142 pedwarn_init, and push_init_level.
5144 2014-05-09 Marek Polacek <polacek@redhat.com>
5147 * c-parser.c (c_parser_attributes): Parse the arguments as an
5148 expression-list if the attribute takes identifier.
5150 2014-05-08 Marek Polacek <polacek@redhat.com>
5153 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5156 2014-05-08 Marek Polacek <polacek@redhat.com>
5159 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5162 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5163 Mike Stump <mikestump@comcast.net>
5164 Richard Sandiford <rdsandiford@googlemail.com>
5166 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5167 (finish_enum): Use wide-int interfaces.
5168 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5169 * c-typeck.c (build_c_cast): Likewise.
5170 (set_nonincremental_init_from_string): Likewise.
5171 (c_tree_equal): Likewise.
5173 2014-05-02 Marek Polacek <polacek@redhat.com>
5176 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5177 Return size_one_node when the type is not complete.
5178 (pointer_diff): Remove comment.
5179 (build_unary_op): Improve error messages.
5181 2014-05-02 Marek Polacek <polacek@redhat.com>
5183 * c-typeck.c (c_finish_return): Separate warning_at calls.
5185 2014-05-02 Marek Polacek <polacek@redhat.com>
5187 * c-tree.h (error_init): Remove declaration.
5188 (pedwarn_init): Likewise.
5189 * c-typeck.c (error_init): Make static and move above.
5190 (pedwarn_init): Likewise.
5191 (warning_init): Move above.
5192 (maybe_warn_string_init): Likewise.
5194 2014-05-01 Jeff Law <law@redhat.com>
5198 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5199 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5202 2014-05-02 Marek Polacek <polacek@redhat.com>
5205 * c-typeck.c (push_init_level): Set constructor_designated to
5206 p->designated for structures.
5208 2014-05-01 Marek Polacek <polacek@redhat.com>
5211 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5212 function-definition has an attribute after the declarator.
5214 2014-05-01 Marek Polacek <polacek@redhat.com>
5217 * c-typeck.c (warning_init): Add location_t parameter. Call
5218 warning_at instead of warning.
5219 (push_init_level): Pass input_location to warning_init.
5220 (add_pending_init): Add location_t parameter. Pass loc to
5222 (set_nonincremental_init): Pass input_location to add_pending_init.
5223 (set_nonincremental_init_from_string): Likewise.
5224 (output_init_element): Pass loc to warning_init and to
5227 2014-05-01 Marek Polacek <polacek@redhat.com>
5230 * c-typeck.c (c_finish_return): Distinguish between label and variable
5231 when warning about returning local address.
5233 2014-05-01 Marek Polacek <polacek@redhat.com>
5236 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5239 2014-05-01 Marek Polacek <polacek@redhat.com>
5242 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5243 instead of 0 to WARN_FOR_QUALIFIERS.
5245 2014-05-01 Marek Polacek <polacek@redhat.com>
5248 * c-typeck.c (default_conversion): Use better location for
5251 2014-04-30 Marek Polacek <polacek@redhat.com>
5253 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5254 also when SANITIZE_FLOAT_DIVIDE is on.
5256 2014-04-30 Marek Polacek <polacek@redhat.com>
5259 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5260 and pedwarn_init. Use loc insted of input_location.
5262 2014-04-30 Marek Polacek <polacek@redhat.com>
5265 * c-typeck.c (build_binary_op): Use location when warning about
5268 2014-04-25 Marek Polacek <polacek@redhat.com>
5271 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5272 always_inline/noinline and hot/cold attributes.
5274 2014-04-25 Marek Polacek <polacek@redhat.com>
5277 * c-parser.c (c_parser_initelt): Pass input_location to
5278 process_init_element.
5279 (c_parser_initval): Pass loc to process_init_element.
5280 * c-tree.h (process_init_element): Adjust declaration.
5281 * c-typeck.c (push_init_level): Pass input_location to
5282 process_init_element.
5283 (pop_init_level): Likewise.
5284 (set_designator): Likewise.
5285 (output_init_element): Add location_t parameter. Pass loc to
5287 (output_pending_init_elements): Pass input_location to
5288 output_init_element.
5289 (process_init_element): Add location_t parameter. Pass loc to
5290 output_init_element.
5292 2014-04-24 Jakub Jelinek <jakub@redhat.com>
5294 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5295 atomic-clause, allow comma in between atomic-clause and
5298 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5301 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5302 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5304 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5307 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5308 create_tmp_var instead build_decl for creating temps.
5309 (build_array_notation_expr): Likewise.
5310 (fix_conditional_array_notations_1): Likewise.
5311 (fix_array_notation_expr): Likewise.
5312 (fix_array_notation_call_expr): Likewise.
5314 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5317 * c-tree.h (c_build_function_call_vec): New prototype.
5318 * c-typeck.c (build_function_call_vec): Don't call
5319 resolve_overloaded_builtin here.
5320 (c_build_function_call_vec): New wrapper function around
5321 build_function_call_vec. Call resolve_overloaded_builtin here.
5322 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5323 Call c_build_function_call_vec instead of build_function_call_vec.
5324 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5325 * c-decl.c (finish_decl): Likewise.
5327 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5330 * c-typeck.c: Use correct format string in cast-qual warning
5332 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5334 * c-decl.c (c_decl_attributes): Use
5335 lang_hooks.types.omp_mappable_type.
5336 * c-typeck.c (c_finish_omp_clauses): Likewise.
5338 2014-03-06 Marek Polacek <polacek@redhat.com>
5341 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5342 of checking tree code.
5344 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5346 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5347 (c_parser_parameter_declaration): Likewise.
5349 2014-02-19 Marek Polacek <polacek@redhat.com>
5352 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5353 Call mark_exp_read on exp.value.
5354 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5355 TREE_ADDRESSABLE on old instead of val.
5356 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5358 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5360 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5361 C_EXPR_APPEND by vec_safe_push.
5362 * c-tree.h (C_EXPR_APPEND): Remove.
5364 2014-01-31 Marek Polacek <polacek@redhat.com>
5367 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5368 build_function_call_vec.
5369 (build_function_call): Likewise.
5370 (build_atomic_assign): Likewise.
5371 (build_function_call_vec): Add arg_loc parameter. Use it.
5372 (convert_arguments): Likewise.
5373 (convert_for_assignment): Rename rhs_loc to expr_loc.
5374 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5375 (c_parser_objc_keywordexpr): Likewise.
5376 (c_parser_postfix_expression_after_primary): Call
5377 build_function_call_vec with expr_loc rather than op_loc.
5378 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5379 build_function_call_vec.
5380 (c_parser_expr_list): Add locations parameter. Fill it with locations
5381 of function arguments.
5382 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5384 2014-01-30 Marek Polacek <polacek@redhat.com>
5387 * c-typeck.c (build_function_call_vec): Use loc parameter.
5388 (convert_arguments): Add location parameter. Use it.
5389 (ep_convert_and_check): Likewise.
5390 (build_atomic_assign): Adjust convert_for_assignment call.
5391 (build_modify_expr): Likewise.
5392 (digest_init): Likewise.
5393 (c_finish_return): Likewise.
5394 (build_conditional_expr): Adjust ep_convert_and_check calls.
5395 (convert_for_assignment): Add rhs_loc parameter. Use it.
5396 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5399 2014-01-30 Richard Biener <rguenther@suse.de>
5402 * c-typeck.c (build_function_call_vec): Do not replace calls
5403 to a function via an incompatible type with a runtime abort.
5405 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5407 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5408 flag_enable_cilkplus with flag_cilkplus.
5409 (c_parser_direct_declarator_inner): Likewise.
5410 (c_parser_attribute_any_word): Likewise.
5411 (c_parser_attributes): Likewise.
5412 (c_parser_compound_statement): Likewise.
5413 (c_parser_statement_after_labels): Likewise.
5414 (c_parser_if_statement): Likewise.
5415 (c_parser_switch_statement): Likewise.
5416 (c_parser_do_statement): Likewise.
5417 (c_parser_for_statement): Likewise.
5418 (c_parser_unary_expression): Likewise.
5419 (c_parser_postfix_expression): Likewise.
5420 (c_parser_postfix_expression_after_primary): Likewise.
5421 (c_parser_postfix_expression_after_primary): Likewise.
5422 (c_parser_omp_clause_name): Likewise.
5423 (c_finish_omp_declare_simd): Likewise.
5424 (c_parser_cilk_verify_simd): Likewise.
5425 * c-typeck.c (build_array_ref): Likewise.
5426 (build_function_call_vec): Likewise.
5427 (convert_arguments): Likewise.
5428 (build_compound_expr): Likewise.
5429 (c_finish_return): Likewise.
5430 (c_finish_if_stmt): Likewise.
5431 (c_finish_loop): Likewise.
5432 (build_binary_op): Likewise.
5434 2014-01-23 Marek Polacek <polacek@redhat.com>
5437 * c-typeck.c (parser_build_binary_op): Use location instead of
5439 (build_binary_op): Pass location to shorten_compare.
5441 2014-01-23 Marek Polacek <polacek@redhat.com>
5444 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5447 2014-01-23 Marek Polacek <polacek@redhat.com>
5450 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5451 of a comma expression.
5452 (emit_side_effect_warnings): Likewise.
5454 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5457 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5458 function to use walk_tree and moved a lot of its functionality to
5459 expand_array_notations.
5460 (expand_array_notations): New function.
5462 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5464 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5465 attribute an attribute without value.
5467 2014-01-23 Jakub Jelinek <jakub@redhat.com>
5470 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5471 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5473 2014-01-22 Marek Polacek <polacek@redhat.com>
5476 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5477 of remove_c_maybe_const_expr on op1 and op2.
5479 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5482 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5483 effects, preevaluate rhs using SAVE_EXPR first.
5485 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5488 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5489 statements with if-elseif statements.
5491 2014-01-06 Marek Polacek <polacek@redhat.com>
5494 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5495 defined bit-field types only in ISO C.
5497 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5499 Update copyright years
5501 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5503 * c-array-notation.c: Use the standard form for the copyright notice.
5505 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5507 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5508 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5509 field in parser is not empty. If not-empty, call the function
5510 c_parser_finish_omp_declare_simd.
5511 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5512 between SIMD-enabled functions and #pragma simd. Added new parameter.
5513 (c_parser_cilk_all_clauses): Modified the usage of the function
5514 c_parser_cilk_clause_vectorlength as mentioned above.
5515 (c_parser_cilk_simd_fn_vector_attrs): New function.
5516 (c_finish_cilk_simd_fn_tokens): Likewise.
5517 (is_cilkplus_vector_p): Likewise.
5518 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5519 "nomask," and "mask" strings in clause name.
5520 (c_parser_omp_all_clauses): Added 3 new case statements:
5521 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5522 PRAGMA_CILK_CLAUSE_NOMASK.
5523 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5524 check for vector attribute and if so call the function
5525 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5526 called the function c_finish_cilk_simd_fn_tokens.
5527 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5528 parser field is non-empty. If so, parse them as you would parse
5529 the omp declare simd pragma.
5530 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5531 Added a check when step is a parameter and flag it as error.
5532 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5533 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5536 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5538 * c-parser.c (c_parser_omp_parallel): Fix description.
5540 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5542 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5543 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5544 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5545 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5547 2013-12-04 Joseph Myers <joseph@codesourcery.com>
5550 * c-parser.c (c_parser_alignas_specifier): Use
5551 c_sizeof_or_alignof_type instead of c_alignof.
5552 (c_parser_alignof_expression): Likewise, with min_alignof
5553 parameter depending on alignof spelling used.
5555 2013-12-04 Marek Polacek <polacek@redhat.com>
5558 * c-decl.c (start_function): Don't warn for missing prototype for
5561 2013-12-03 Marek Polacek <polacek@redhat.com>
5564 * c-decl.c (build_compound_literal): Allow compound literals with
5565 empty initial value.
5567 2013-12-02 Joseph Myers <joseph@codesourcery.com>
5570 * c-typeck.c (build_modify_expr): Diagnose assignment to
5571 expression with array type.
5573 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5576 * c-typeck.c (process_init_element): Do not treat a string as
5577 initializing a whole array when used with a designator for an
5580 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5583 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5584 an inline function following a static declaration.
5586 2013-11-28 Jakub Jelinek <jakub@redhat.com>
5589 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5590 to p_name before calling c_parser_omp_teams instead of after.
5591 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5592 argument. Remove unused p_name variable.
5594 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5595 Jakub Jelinek <jakub@redhat.com>
5597 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5598 external_scope is NULL.
5600 2013-11-27 Tom de Vries <tom@codesourcery.com>
5601 Marc Glisse <marc.glisse@inria.fr>
5604 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5606 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5608 * c-typeck.c: Add required include files from gimple.h.
5610 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5612 * c-decl.c (define_label, shadow_tag_warned)
5613 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5614 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5615 (declspecs_add_type): Remove use of in_system_header macro.
5616 * c-parser.c (c_parser_unary_expression): Likewise.
5617 * c-typeck.c (store_init_value, process_init_element)
5618 (c_start_case): Likewise.
5620 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5623 * c-parser.c (c_parser_set_source_position_from_token): Remove
5624 reference to in_system_header from comment.
5626 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5628 * c-decl.c (grokdeclarator): Update comment to refer to
5629 tree_to_[su]hwi rather than tree_low_cst.
5631 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5633 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5634 tree_to_uhwi throughout.
5636 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5638 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5641 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5643 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5646 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5648 * c-parser.c (c_parser_cilk_simd): New.
5649 (c_parser_cilk_verify_simd): New.
5650 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5651 (c_parser_omp_for_loop): Add case for NE_EXPR.
5652 Set c_break_label for CILK_SIMD.
5653 (c_parser_cilk_clause_vectorlength): New.
5654 (c_parser_cilk_clause_linear): New.
5655 (c_parser_cilk_clause_name): New.
5656 (c_parser_cilk_all_clauses): New.
5657 * c-typeck.c (build_unary_op): Pass location argument to
5659 (build_modify_expr): Same.
5660 (build_asm_expr): Same.
5661 (c_finish_bc_stmt): Error on break/continue in loops.
5663 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5665 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5667 2013-11-14 Diego Novillo <dnovillo@google.com>
5669 * c-decl.c: Include print-tree.h.
5670 Include stor-layout.h.
5673 Include stringpool.h.
5674 * c-lang.c: Include fold-const.h.
5675 * c-parser.c: Include stringpool.h.
5677 Include stor-layout.h.
5679 Include trans-mem.h.
5680 * c-typeck.c: Include stor-layout.h.
5681 Include trans-mem.h.
5685 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5687 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5688 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5690 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5691 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5693 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5694 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5695 (c_parser_declarator, c_parser_direct_declarator_inner)
5696 (c_parser_parameter_declaration, c_parser_type_name): All callers
5698 (c_parser_declaration_or_fndef): Handle declarations with type
5699 determined from the initializer.
5701 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5703 * c-typeck.c: Include gimplify.h.
5705 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5707 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5708 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5710 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5711 or _Thread_local as appropriate in diagnostics.
5712 (build_null_declspecs): Initialize ret->thread_gnu_p.
5713 (declspecs_add_scspec): Handle either __thread or _Thread_local
5714 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5715 pedantic. Do not disallow _Thread_local extern and _Thread_local
5718 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5719 Andrew MacLeod <amacleod@redhat.com>
5721 * c-aux-info.c (gen_type): Handle atomic qualifier.
5722 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5723 qualifiers when compating types.
5724 (shadow_tag_warned): Handle atomic_p in declspecs.
5725 (quals_from_declspecs): Likewise.
5726 (start_decl): Use c_type_promotes_to when promoting argument
5728 (grokdeclarator): Handle _Atomic.
5729 (get_parm_info): Diagnose any qualifier on "void" as only
5731 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5732 comparing types. Use c_type_promotes_to when promoting argument
5734 (finish_function): Use c_type_promotes_to when promoting argument
5736 (build_null_declspecs): Handle atomic_p in declspecs.
5737 (declspecs_add_qual): Handle RID_ATOMIC.
5738 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5739 (c_token_starts_declspecs): Handle RID_ATOMIC.
5740 (c_parser_declspecs): Handle atomic type specifiers and
5742 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5743 from types of expressions with atomic type.
5744 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5745 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5746 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5747 (c_parser_statement_after_labels, c_parser_switch_statement)
5748 (c_parser_for_statement, c_parser_expr_no_commas)
5749 (c_parser_conditional_expression, c_parser_binary_expression)
5750 (c_parser_cast_expression, c_parser_unary_expression)
5751 (c_parser_postfix_expression)
5752 (c_parser_postfix_expression_after_primary, c_parser_expression):
5753 Use convert_lvalue_to_rvalue.
5754 (c_parser_expression_conv, c_parser_expr_list): Document
5755 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5756 (c_parser_objc_synchronized_statement): Use
5757 convert_lvalue_to_rvalue.
5758 (c_parser_objc_selector): Handle RID_ATOMIC.
5759 (c_parser_objc_receiver, c_parser_array_notation): Use
5760 convert_lvalue_to_rvalue.
5761 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5762 _Atomic (type-name).
5763 (struct c_declspecs): Add atomic_p field.
5764 (convert_lvalue_to_rvalue): Declare.
5765 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5766 corresponding atomic types.
5767 (qualify_type): Don't add _Atomic qualifiers from second argument.
5768 (comp_target_types): Do not allow _Atomic mismatches.
5769 (type_lists_compatible_p): Do not remove atomic qualifiers when
5771 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5772 (build_atomic_assign): New functions.
5773 (build_unary_op): Use build_atomic_assign for atomic increment and
5775 (build_conditional_expr): Do not treat _Atomic void as a qualified
5777 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5778 (find_anonymous_field_with_type, convert_to_anonymous_field)
5779 (convert_for_assignment): Do not remove atomic qualifiers when
5781 (digest_init): Do not accept initialization of arrays of atomic
5782 elements by string constants.
5783 (build_asm_expr): Use convert_lvalue_to_rvalue.
5784 (build_binary_op): Do not treat _Atomic void as a qualified
5787 2013-11-06 DJ Delorie <dj@redhat.com>
5789 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5790 both explicit and builtin, print the location of the explicit one.
5792 2013-11-05 Tobias Burnus <burnus@net-b.de>
5794 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5795 c_parser_omp_distribute, c_parser_omp_teams,
5796 c_parser_omp_target, c_parser_omp_declare): Handle
5799 2013-11-03 Marek Polacek <polacek@redhat.com>
5801 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5803 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5805 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5806 check_dup_generic at the end, unless remove is true.
5807 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5809 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5811 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5813 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5814 with decl that is not pointer nor array.
5816 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5818 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5819 a spawning function is found.
5820 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5821 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5822 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5823 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5825 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5826 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5828 (c_finish_return): Added a check to reject _Cilk_spawn in return
5830 (build_cilk_spawn): New function.
5831 (build_cilk_sync): Likewise.
5832 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5834 2013-10-27 Tobias Burnus <burnus@net-b.de>
5837 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5838 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5839 (c_parser_statement_after_labels): Update calls.
5841 2013-10-24 Tobias Burnus <burnus@net-b.de>
5844 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5845 Handle PRAGMA_IVDEP.
5846 (c_parser_statement_after_labels): Update call.
5848 2013-10-24 Marek Polacek <polacek@redhat.com>
5850 * c-parser.c (c_parser_struct_declaration): Add a comment.
5851 (c_parser_declarator): Don't allow _Alignas here.
5853 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5855 * c-parser.c: Include omp-low.h.
5856 * c-typeck.c: Likewise.
5858 2013-10-17 Marek Polacek <polacek@redhat.com>
5861 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5862 Document syntax of the array-declarator.
5863 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5865 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5866 (c_parser_struct_declaration): Likewise.
5867 (c_parser_declarator): Likewise.
5868 (c_parser_direct_declarator_inner): Likewise.
5869 (c_parser_parameter_declaration): Likewise.
5870 (c_parser_type_name): Likewise.
5872 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5874 * c-lang.h (current_omp_declare_target_attribute): New extern
5876 * c-parser.c: Include c-lang.h.
5877 (struct c_parser): Change tokens to c_token *.
5878 Add tokens_buf field. Change tokens_avail type to unsigned int.
5879 (c_parser_consume_token): If parser->tokens isn't
5880 &parser->tokens_buf[0], increment parser->tokens.
5881 (c_parser_consume_pragma): Likewise.
5882 (enum pragma_context): Add pragma_struct and pragma_param.
5883 (c_parser_external_declaration): Adjust
5884 c_parser_declaration_or_fndef caller.
5885 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5886 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5887 Adjust recursive call.
5888 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5890 (c_parser_parameter_declaration): Use pragma_param instead of
5892 (c_parser_compound_statement_nostart, c_parser_label,
5893 c_parser_for_statement): Adjust
5894 c_parser_declaration_or_fndef callers.
5895 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5896 it through to c_parser_conditional_expression.
5897 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5898 pass it through to c_parser_binary_expression. Adjust recursive
5900 (c_parser_binary_expression): Remove prec argument, add
5901 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5902 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5903 binop matches it, use build2 instead of parser_build_binary_op.
5904 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5905 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5906 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5907 Handle pragma_struct and pragma_param the same as pragma_external.
5908 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5909 (c_parser_omp_variable_list): Parse array sections for
5910 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5911 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5912 (c_parser_omp_clause_reduction): Handle user defined reductions.
5913 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5914 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5915 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5916 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5917 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5918 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5919 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5920 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5921 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5922 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5923 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5924 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5925 (c_parser_omp_for_loop): Add CODE argument, pass it through
5926 to c_finish_omp_for. Change last argument to cclauses,
5927 and adjust uses to grab parallel clauses from the array of all
5928 the split clauses. Adjust c_parser_binary_expression,
5929 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5930 (omp_split_clauses): New function.
5931 (c_parser_omp_simd): New function.
5932 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5933 Allow the function to be called also when parsing combined constructs,
5934 and call c_parser_omp_simd when parsing for simd.
5935 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5936 #pragma omp section, require exactly one structured-block instead of
5937 sequence of statements.
5938 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5939 Allow the function to be called also when parsing combined constructs.
5940 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5941 Allow the function to be called also when parsing combined
5943 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5944 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5945 c_parser_omp_teams, c_parser_omp_target_data,
5946 c_parser_omp_target_update, c_parser_omp_target,
5947 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5948 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5949 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5950 (c_parser_omp_construct): Add p_name and mask vars. Handle
5951 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5952 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5953 and c_parser_omp_sections callers.
5954 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5955 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5956 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5957 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5958 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5960 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5961 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5962 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5963 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5964 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5965 * c-typeck.c: Include tree-inline.h.
5966 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5967 handle_omp_array_sections_1, handle_omp_array_sections,
5968 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5969 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5970 user defined reductions.
5971 (c_tree_equal): New function.
5972 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5973 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5974 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5975 c_check_omp_declare_reduction_r): New prototypes.
5976 * c-decl.c (current_omp_declare_target_attribute): New variable.
5977 (c_decl_attributes): New function.
5978 (start_decl, start_function): Use it instead of decl_attributes.
5979 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5980 c_omp_reduction_decl, c_omp_reduction_lookup,
5981 c_check_omp_declare_reduction_r): New functions.
5983 2013-09-25 Tom Tromey <tromey@redhat.com>
5985 * Make-lang.in (c/gccspec.o): Remove.
5986 (CFLAGS-c/gccspec.o): New variable.
5987 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5988 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5989 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5991 2013-09-25 Tom Tromey <tromey@redhat.com>
5993 * Make-lang.in (c/gccspec.o): Don't use subshell.
5995 2013-09-18 Marek Polacek <polacek@redhat.com>
5998 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5999 Remove unnecessary check.
6001 2013-09-18 Marek Polacek <polacek@redhat.com>
6004 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6005 no_sanitize_undefined attribute.
6007 2013-09-13 Kai Tietz <ktietz@redhat.com>
6010 * c-decl.c (c_builtin_function_ext_scope): Remove
6011 wrong assumption that it is never called on prexisting
6014 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6016 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6018 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6020 * c-objc-common.c (c_tree_printer): Tidy.
6022 2013-08-30 Marek Polacek <polacek@redhat.com>
6024 * c-typeck.c (build_binary_op): Add division by zero and shift
6027 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6028 Joseph Myers <joseph@codesourcery.com>
6031 * c-typeck.c (c_common_type): Prefer double_type_node over
6032 other REAL_TYPE types with the same precision.
6033 (convert_arguments): Likewise.
6035 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6037 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6038 (c_initialize_diagnostics): Call a destructor for the early printer.
6040 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6042 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6043 printer initialization.
6045 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
6048 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6049 check for truth values.
6050 (expand_array_notation_exprs): Added truth values case. Removed an
6051 unwanted else. Added for-loop to walk through subtrees in default
6054 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6056 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6058 2013-07-23 Joseph Myers <joseph@codesourcery.com>
6060 * c-parser.c (struct c_generic_association): Fix typo.
6062 2013-07-23 Tom Tromey <tromey@redhat.com>
6063 Joseph Myers <joseph@codesourcery.com>
6065 * c-parser.c (struct c_generic_association): New.
6066 (c_generic_association_d): New typedef.
6067 (c_parser_generic_selection): New function.
6068 (c_parser_postfix_expression): Handle RID_GENERIC.
6070 2013-07-13 Jason Merrill <jason@redhat.com>
6073 * c-decl.c (finish_struct): Check for too-large class.
6075 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6078 * c-typeck.c (set_init_index): When folding, check for index overflow.
6080 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6082 * c-parser.c (c_parser_array_notation): Removed rejection of array
6083 notations in an array of function pointers.
6085 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6087 * c-array-notation.c (make_triplet_val_inv): New function.
6088 (create_cmp_incr): Likewise.
6089 (create_array_refs): Likewise.
6090 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6091 Also modularized common parts between functions and called the function.
6092 (build_array_notation_expr): Likewise.
6093 (fix_conditional_array_notations_1): Likewise.
6094 (fix_array_notation_expr): Likewise.
6095 (fix_array_notation_call_expr): Likewise.
6097 2013-06-18 Marek Polacek <polacek@redhat.com>
6100 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6102 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6104 * c-array-notation.c (build_array_notation_expr): Reject array notation
6105 mismatch between LHS and RHS even inside a call_expr. Also, removed
6106 a couple while statements that were dead code.
6108 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6110 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6111 excessive precision expressions in function parameters. Also removed
6112 couple unwanted while statements.
6114 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6116 * c-array-notation.c (expand_array_notation_exprs): Added
6117 ARRAY_NOTATION_REF case.
6119 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6121 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6122 function to c-family/array-notation-common.c.
6123 (is_cilkplus_reduce_builtin): Likewise.
6124 (find_rank): Likewise.
6125 (extract_array_notation_exprs): Likewise.
6126 (replace_array_notations): Likewise.
6127 (find_inv_trees): Likewise.
6128 (replace_inv_trees): Likewise.
6129 (contains_array_notation_expr): Likewise.
6130 (find_correct_array_notation_type): Likewise.
6131 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6132 (struct inv_list): Moved this to c-family/array-notation-common.c.
6133 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6135 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6137 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6138 reduction functions outside the for-loop. Added a check if the fundecl
6139 is non-NULL. Finally, removed an unwanted if-statement, and made the
6142 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6144 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6145 condition of the if-statement matches the rank of else-block and then-
6146 block when array notations are used.
6147 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6148 expression after the entire function body is parsed.
6149 (c_parser_expr_no_commas): Delayed creating array notation expressions
6150 to the end of function parsing.
6151 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6152 whole if-statement instead of just the condition.
6153 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6155 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6158 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6159 array to NULL_TREE if they are unused. Also added a check for the
6160 field to be NULL before its fields are used in future.
6162 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6165 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6166 (build_array_notation_expr): Likewise.
6168 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6170 * c-typeck.c (build_array_ref): Added a check to see if array's
6171 index is greater than one. If true, then emit an error.
6172 (build_function_call_vec): Exclude error reporting and checking
6173 for builtin array-notation functions.
6174 (convert_arguments): Likewise.
6175 (c_finish_return): Added a check for array notations as a return
6176 expression. If true, then emit an error.
6177 (c_finish_loop): Added a check for array notations in a loop
6178 condition. If true then emit an error.
6179 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6180 (build_binary_op): Added a check for array notation expr inside
6181 op1 and op0. If present, we call another function to find correct
6183 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6184 * c-parser.c (c_parser_compound_statement): Check if array
6185 notation code is used in tree, if so, then transform them into
6187 (c_parser_expr_no_commas): Check if array notation is used in LHS
6188 or RHS, if so, then build array notation expression instead of
6190 (c_parser_postfix_expression_after_primary): Added a check for
6191 colon(s) after square braces, if so then handle it like an array
6192 notation. Also, break up array notations in unary op if found.
6193 (c_parser_direct_declarator_inner): Added a check for array
6195 (c_parser_compound_statement): Added a check for array notation in
6196 a stmt. If one is present, then expand array notation expr.
6197 (c_parser_if_statement): Likewise.
6198 (c_parser_switch_statement): Added a check for array notations in
6199 a switch statement's condition. If true, then output an error.
6200 (c_parser_while_statement): Similarly, but for a while.
6201 (c_parser_do_statement): Similarly, but for a do-while.
6202 (c_parser_for_statement): Similarly, but for a for-loop.
6203 (c_parser_unary_expression): Check if array notation is used in a
6204 pre-increment or pre-decrement expression. If true, then expand
6206 (c_parser_array_notation): New function.
6207 * c-array-notation.c: New file.
6208 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6210 2013-05-23 Mike Stump <mikestump@comcast.net>
6212 * c-typeck.c (convert_for_assignment): Handle references to memory
6215 2013-05-16 Jason Merrill <jason@redhat.com>
6217 * Make-lang.in (cc1$(exeext)): Use link mutex.
6219 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6221 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6222 to simply use OPT_Wpointer_arith.
6223 (build_unary_op): Likewise.
6225 2013-04-03 Jakub Jelinek <jakub@redhat.com>
6228 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6229 argument. If set, or it temporarily for parsing of the first
6230 argument into force_folding_builtin_constant_p.
6231 (c_parser_postfix_expression): Adjust callers.
6233 2013-03-21 Richard Biener <rguenther@suse.de>
6235 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6236 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6238 2013-02-12 Marek Polacek <polacek@redhat.com>
6241 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6244 2013-01-24 Jakub Jelinek <jakub@redhat.com>
6247 * c-typeck.c (set_nonincremental_init_from_string): If
6248 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6250 (process_init_element): Likewise.
6252 2012-12-20 Jakub Jelinek <jakub@redhat.com>
6255 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6256 argument, don't call default_function_array_conversion
6257 nor c_fully_fold here.
6258 (c_parser_asm_statement): Adjust callers.
6259 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6260 and outputs here, and call default_function_array_conversion
6261 on inputs that don't need to be addressable.
6263 2012-12-18 Jakub Jelinek <jakub@redhat.com>
6266 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6267 warning require that both c_common_unsigned_type as well as
6268 c_common_signed_type is the same for both mvl and mvr types.
6270 2012-11-16 Diego Novillo <dnovillo@google.com>
6272 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6274 * c-common.c: Use new vec API in vec.h.
6275 * c-common.h: Likewise.
6276 * c-gimplify.c: Likewise.
6277 * c-pragma.c: Likewise.
6278 * c-pretty-print.c: Likewise.
6279 * c-pretty-print.h: Likewise.
6280 * c-semantics.c: Likewise.
6281 * c-decl.c: Likewise.
6282 * c-parser.c: Likewise.
6283 * c-tree.h: Likewise.
6284 * c-typeck.c: Likewise.
6286 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6289 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6291 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6294 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6295 shadows a function, unless the variable is a function or a
6296 pointer-to-function.
6298 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6301 * c-parser.c (struct c_tree_loc_pair): Removed.
6302 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6303 add location_t * and tree * arguments, fill in array of 3
6304 sizeof_arg trees and corresponding locs.
6305 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6306 c_parser_expr_list callers.
6307 (c_parser_postfix_expression_after_primary): Likewise. Pass
6308 array of 3 sizeof_arg trees and locs (corresponding to first
6309 3 arguments) to sizeof_pointer_memaccess_warning.
6311 2012-10-09 Lawrence Crowl <crowl@google.com>
6313 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6314 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6317 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6320 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6323 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
6326 * c-typeck.c: Include c-common.h.
6327 (enum stv_conv): Moved to c-common.h.
6328 (scalar_to_vector): Moved to c-common.c.
6329 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6330 * Make-lang.in: c-typeck.c depends on c-common.h.
6332 2012-10-04 Arnaud Charlet <charlet@adacore.com>
6334 * c-decl.c (c_write_global_declarations): Fix handling of
6337 2012-09-30 Sharad Singhai <singhai@google.com>
6339 * c-decl.c (c_write_global_declarations): Use a different method
6340 to determine if the dump has ben initialized.
6342 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6345 * c-typeck.c (c_cast_expr): When casting to a type requiring
6346 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6349 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6352 * c-typeck.c (build_unary_op): Pass original argument of
6353 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6354 any C_MAYBE_CONST_EXPR, if it has integer operands.
6355 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6356 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6357 to c_objc_common_truthvalue_conversion, then remove any
6358 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6359 c_objc_common_truthvalue_conversion not
6360 c_common_truthvalue_conversion.
6361 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6362 call note_integer_operands for arguments with integer operands
6363 that are not integer constants.
6365 2012-09-13 Jakub Jelinek <jakub@redhat.com>
6368 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6369 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6371 2012-08-31 Jakub Jelinek <jakub@redhat.com>
6374 * c-convert.c (convert): Don't call fold_convert_loc if
6375 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6376 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6377 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6379 2012-08-24 Jakub Jelinek <jakub@redhat.com>
6382 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6383 for nested and empty_ok arguments in the call to
6384 c_parser_declaration_or_fndef.
6386 2012-08-17 Jakub Jelinek <jakub@redhat.com>
6388 * c-tree.h (c_last_sizeof_arg): Declare.
6389 * c-parser.c (struct c_tree_loc_pair): New type.
6390 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6392 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6393 (c_parser_postfix_expression_after_primary): Likewise. Call
6394 sizeof_pointer_memaccess_warning if needed.
6395 (sizeof_ptr_memacc_comptypes): New function.
6396 * c-typeck.c (c_last_sizeof_arg): New global variable.
6397 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6399 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
6401 * c-lang.h (lang_decl): Add variable_size GTY option.
6403 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6405 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6406 * Make-lang.in: Fix dependencies.
6408 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6410 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6411 and add language Makefile hooks.
6412 * config-lang.in: New file.
6413 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6414 add the required "normal" config-lang.in rules.
6415 * c-lang.h: Moved from gcc/ to here.
6416 * c-tree.h: Likewise.
6417 * c-objc-common.c: Likewise.
6418 * c-objc-common.h: Likewise.
6419 * c-typeck.c: Likewise.
6420 * c-convert.c: Likewise.
6421 * c-lang.c: Likewise.
6422 * c-aux-info.c: Likewise.
6423 * c-errors.c: Likewise.
6424 * gccspec.c: Likewise.
6425 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6426 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6428 Copyright (C) 2012-2019 Free Software Foundation, Inc.
6430 Copying and distribution of this file, with or without modification,
6431 are permitted in any medium without royalty provided the copyright
6432 notice and this notice are preserved.