1 2019-09-27 Jakub Jelinek <jakub@redhat.com>
4 * c-parser.c (c_parser_predefined_identifier): New function.
5 (c_parser_postfix_expression): Use it.
6 (c_parser_omp_variable_list): Parse predefined identifiers.
7 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
8 in shared and firstprivate clauses, even when they are predetermined
11 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
13 * c-typeck.c (build_function_call_vec): Take the original function
14 decl as an optional final parameter. Pass all built-in calls to
15 check_builtin_function_arguments.
17 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
20 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
21 of identifiers in the external scope only for variables and functions.
23 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
26 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
28 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
31 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
32 after determining that the first token is not
33 PRAGMA_GCC_PCH_PREPROCESS.
35 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
37 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
38 FUNCTION_DECL to the right value in the presence of nested declarators.
40 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
43 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
45 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
48 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
49 of a built_in_function.
50 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
52 2019-08-10 Jakub Jelinek <jakub@redhat.com>
54 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
55 (c_parser_omp_clause_device_type): New function.
56 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
57 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
58 (c_parser_omp_declare_target): Handle device_type clauses. Remove
59 diagnostics for declare target with clauses nested in clause-less
60 declare target declaration-definition-seq.
61 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
63 2019-08-09 Jakub Jelinek <jakub@redhat.com>
65 * c-parser.c (check_no_duplicate_clause): Simplify using
67 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
68 directive name modifiers.
69 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
72 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
73 check_no_duplicate_clause call. Comment it out, instead emit a
74 warning for duplicate dist_schedule clauses.
76 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
78 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
80 2019-08-08 Jakub Jelinek <jakub@redhat.com>
82 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
83 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
84 instead of generic_head to track duplicates.
86 2019-08-07 Jakub Jelinek <jakub@redhat.com>
88 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
89 (c_parser_omp_clause_use_device_addr): New function.
90 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
91 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
92 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
93 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
94 map or use_device_* clauses.
95 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
96 in OpenMP, require pointer type rather than pointer or array type.
97 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
99 2019-07-31 Jakub Jelinek <jakub@redhat.com>
102 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
103 even if finish is UNKNOWN_LOCATION, just use start as finish in that
106 2019-07-25 Martin Liska <mliska@suse.cz>
107 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
110 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
112 2019-07-25 Martin Liska <mliska@suse.cz>
114 * c-decl.c (merge_decls): Use new macros
115 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
117 2019-07-23 Richard Biener <rguenther@suse.de>
119 PR tree-optimization/83518
120 * gimple-parser.c (c_parser_parse_gimple_body): When we have
121 a CFG also rebuild cgraph edges.
123 2019-07-20 Jakub Jelinek <jakub@redhat.com>
125 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
126 (c_parser_omp_clause_bind): New function.
127 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
128 (OMP_LOOP_CLAUSE_MASK): Define.
129 (c_parser_omp_loop): New function.
130 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
131 loop combined with parallel or teams.
132 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
133 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
135 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
138 * c-decl.c (finish_function): Check targetm.warn_func_return
139 before issuing a -Wreturn-type warning.
141 2019-07-12 Alexandre Oliva <oliva@adacore.com>
143 * gimple-parser.c (c_parser_gimple_try_stmt): New.
144 (c_parser_compound_statement): Call it.
146 2019-07-12 Jakub Jelinek <jakub@redhat.com>
148 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
149 (c_parser_omp_clause_order): New function.
150 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
151 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
152 PRAGMA_OMP_CLAUSE_ORDER.
153 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
155 2019-07-10 Richard Biener <rguenther@suse.de>
157 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
158 _Literal (int *) &x for address literals.
160 2019-07-09 Martin Sebor <msebor@redhat.com>
163 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
165 (field_decl_cmp): Same.
166 * c-parser.c (c_parser_struct_or_union_specifier): Same.
168 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
170 2019-07-09 Martin Sebor <msebor@redhat.com>
173 * c-decl.c: Change class-key from class to struct and vice versa
174 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
175 * gimple-parser.c: Same.
177 2019-07-01 Richard Biener <rguenther@suse.de>
179 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
180 _Literal (char *) &"foo" for address literals pointing to
183 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
185 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
186 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
187 C incompatibility if alternate "__intN__" form is used.
189 2019-06-24 Martin Sebor <msebor@redhat.com>
191 * c-typeck.c (build_binary_op): Hyphenate floating-point.
193 2019-06-10 Jakub Jelinek <jakub@redhat.com>
195 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
196 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
197 (c_parser_omp_scan_loop_body): New function.
198 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
199 inscan reduction clauses.
200 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
201 non-inscan reductions on the same construct, or inscan reductions with
202 ordered or schedule clauses, or inscan array reductions.
204 2019-06-05 Martin Sebor <msebor@redhat.com>
207 * c-typeck.c (c_finish_return): Only consider functions returning
208 pointers as candidates for -Wreturn-local-addr.
210 2019-06-05 Martin Sebor <msebor@redhat.com>
212 * c-decl.c (start_decl): Adjust quoting and hyphenation
216 (start_function): Same.
217 (declspecs_add_type): Same.
218 * c-parser.c (warn_for_abs): Same.
219 * c-typeck.c (build_binary_op): Same.
221 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
224 * c-parser.c (c_finish_oacc_routine): Rework checking if already
225 marked with an OpenACC 'routine' directive.
228 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
229 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
232 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
233 clauses from "omp declare target" attribute.
235 2019-05-16 Martin Sebor <msebor@redhat.com>
237 * c-decl.c (start_decl): Quote keywords, operators, and
238 types in diagnostics.
240 * c-parser.c (c_parser_asm_statement): Same.
241 (c_parser_conditional_expression): Same.
242 (c_parser_transaction_cancel): Same.
243 * c-typeck.c (c_common_type): Same.
244 (build_conditional_expr): Same.
246 (process_init_element): Same.
247 (build_binary_op): Same.
249 2019-05-17 Richard Biener <rguenther@suse.de>
251 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
252 (c_parser_gimple_unary_expression): Likewise.
253 (c_parser_gimple_parentized_ternary_expression): New function.
255 2019-05-16 Richard Biener <rguenther@suse.de>
257 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
258 (c_parser_gimple_unary_expression): Likewise.
260 2019-05-15 Richard Biener <rguenther@suse.de>
262 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
265 2019-05-14 Richard Biener <rguenther@suse.de>
267 * gimple-parser.c (c_parser_gimple_statement): Remove
268 questionable auto-promotion to VIEW_CONVERT_EXPR.
269 (c_parser_gimple_typespec): Split out from __MEM parsing.
270 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
271 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
272 as __VIEW_CONVERT with -gimple.
274 2019-05-09 Martin Liska <mliska@suse.cz>
276 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
278 (c_parser_gimple_unary_expression): Parse also binary expression
280 (c_parser_gimple_parentized_binary_expression): New function.
282 2019-05-09 Martin Liska <mliska@suse.cz>
284 * gimple-parser.c (struct gimple_parser): Add probability.
285 for gimple_parser_edge.
286 (gimple_parser::push_edge): Add new argument probability.
287 (c_parser_gimple_parse_bb_spec): Parse also probability
289 (c_parser_parse_gimple_body): Set edge probability.
290 (c_parser_gimple_compound_statement): Consume token
291 before calling c_parser_gimple_goto_stmt.
293 (c_parser_gimple_statement): Pass new argument.
294 (c_parser_gimple_goto_stmt): Likewise.
295 (c_parser_gimple_if_stmt): Likewise.
296 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
297 * c-parser.c (c_parser_declaration_or_fndef): Pass
298 hot_bb_threshold argument.
299 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
301 (c_parser_gimple_parse_bb_spec_edge_probability): New.
303 2019-04-26 Jakub Jelinek <jakub@redhat.com>
306 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
307 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
308 (c_parser_do_statement): Likewise.
309 (c_parser_for_statement): Likewise. Formatting fixes.
310 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
311 emit DEBUG_BEGIN_STMTs if needed.
313 2019-04-19 Jakub Jelinek <jakub@redhat.com>
316 * c-typeck.c (struct c_switch): Remove outside_range_p member.
317 (c_start_case): Don't clear it.
318 (do_case): Adjust c_add_case_label caller.
319 (c_finish_case): Adjust c_do_switch_warnings caller.
322 * c-decl.c (merge_decls): If remove is main variant and
323 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
324 variant that has newdecl as TYPE_NAME if any.
326 2019-04-12 Jakub Jelinek <jakub@redhat.com>
329 * c-decl.c (merge_decls): When newdecl's type is its main variant,
330 don't try to remove it from the variant list, but instead assert
333 2019-04-01 Richard Biener <rguenther@suse.de>
336 * c-tree.h (c_get_alias_set): Declare.
337 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
338 * c-objc-common.c (c_get_alias_set): Treat enumeral types
339 as the underlying integer type.
341 2019-03-19 Martin Sebor <msebor@redhat.com>
343 PR tree-optimization/89688
344 * c-decl.c (finish_decl): Call braced_lists_to_string for more
345 kinds of initializers.
347 2019-03-19 Jakub Jelinek <jakub@redhat.com>
350 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
351 return type even if quals_used is 0. Formatting fixes.
353 2019-03-14 Richard Biener <rguenther@suse.de>
355 * c-tree.h (enum c_declspec_il): New.
356 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
358 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
359 Pass start pass and declspec_il to c_parser_parse_gimple_body.
360 (c_parser_declspecs): Adjust.
361 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
362 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
364 (struct gimple_parser): New.
365 (gimple_parser::push_edge): New method.
366 (c_parser_gimple_parse_bb_spec): New helper.
367 (c_parser_parse_gimple_body): Get start pass and IL specification.
368 Initialize SSA and CFG.
369 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
370 Build a gimple_parser parsing state and pass it along.
371 (c_parser_gimple_statement): Change intermittend __PHI internal
372 function argument for the edge.
373 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
374 (c_parser_gimple_goto_stmt): Record edges to build.
375 (c_parser_gimple_if_stmt): Likewise.
376 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
377 (c_parser_gimple_or_rtl_pass_list): Likewise.
379 2019-03-11 Martin Liska <mliska@suse.cz>
381 * c-decl.c (check_for_loop_decls): Wrap an option name
382 in a string format message and fix GNU coding style.
383 * c-parser.c (c_parser_declspecs): Likewise.
385 2019-03-08 Jakub Jelinek <jakub@redhat.com>
387 PR tree-optimization/89550
388 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
390 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
391 or warning returned true.
393 2019-02-28 Jakub Jelinek <jakub@redhat.com>
396 * c-typeck.c (convert_arguments): Call inform_declaration only if
397 the previous warning_at call returned true.
399 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
401 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
402 parameter. Adjust all users.
403 (c_parser_oacc_simple_clause): Replace parser with loc formal
404 parameter. Adjust all users.
406 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
409 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
410 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
412 2019-02-15 Jakub Jelinek <jakub@redhat.com>
415 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
416 before c_decl_attributes rather than after it.
418 2019-02-06 Jakub Jelinek <jakub@redhat.com>
421 * c-parser.c (c_parser_declaration_or_fndef): Don't update
422 DECL_ARGUMENTS of d if it has been defined already. Use a single if
423 instead of 3 nested ifs.
425 2019-02-06 Joseph Myers <joseph@codesourcery.com>
428 * c-decl.c (finish_decl): Do not complete array types for arrays
429 with external linkage not at file scope.
431 2019-02-05 Richard Biener <rguenther@suse.de>
434 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
435 all type variants when not supported.
437 2019-01-30 Jakub Jelinek <jakub@redhat.com>
440 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
441 * c-decl.c (decl_jump_unsafe): Return false for
442 C_DECL_COMPOUND_LITERAL_P decls.
443 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
445 2019-01-29 Jakub Jelinek <jakub@redhat.com>
448 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
452 * c-decl.c (last_fileptr_type): Remove.
453 (last_structptr_types): New variable.
454 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
455 {old,new}rettype instead of the types themselves. Assert
456 last_structptr_types array has the same number of elements
457 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
458 argument oldtype and newtype. Instead of handling
459 just fileptr_type_node specially, handle all builtin_structptr_types
460 pointer nodes. Formatting fix.
462 2019-01-24 Martin Sebor <msebor@redhat.com>
467 * c-decl.c (match_builtin_function_types): Add arguments.
468 (diagnose_mismatched_decls): Diagnose mismatched declarations
469 of built-ins more strictly.
471 2019-01-24 Jakub Jelinek <jakub@redhat.com>
474 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
475 on #pragma omp cancel with different modifiers.
477 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
481 * c-typeck.c (convert_for_assignment): Upate the
482 warn_for_address_or_pointer_of_packed_member call.
484 2019-01-16 Tom Honermann <tom@honermann.net>
485 Jason Merrill <jason@redhat.com>
487 * c-typeck.c (digest_init): Revised the error message produced for
488 ill-formed cases of array initialization with a string literal.
489 (error_init): Make variadic.
491 2019-01-12 Jakub Jelinek <jakub@redhat.com>
493 * c-typeck.c (convert_for_assignment): Fix a comment typo.
495 2019-01-07 Jakub Jelinek <jakub@redhat.com>
498 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
499 if current_function_decl is non-NULL.
501 2019-01-07 Joseph Myers <joseph@codesourcery.com>
505 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
506 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
507 functions declared but never defined only for external scope, not
510 2019-01-07 Jakub Jelinek <jakub@redhat.com>
513 * c-parser.c (c_parser_postfix_expression): Parse
514 __builtin_convertvector.
516 2019-01-01 Jakub Jelinek <jakub@redhat.com>
518 Update copyright years.
520 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
523 * c-typeck.c (convert_for_assignment): Call
524 warn_for_address_or_pointer_of_packed_member.
526 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
528 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
529 a more specific error message (instead of just falling through).
531 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
533 * c-parser.c (c_parser_asm_statement): Keep track of the location each
534 asm qualifier is first seen; use that to give nicer "duplicate asm
535 qualifier" messages. Delete 'quals" variable, instead pass the
536 "is_volatile_ flag to build_asm_stmt directly.
537 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
538 * c-typeck.c (build_asm_stmt): Ditto; adjust.
540 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
542 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
543 "done" boolean variable.
545 2018-12-19 David Malcolm <dmalcolm@redhat.com>
548 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
549 Move from here to gcc-rich-location.h and gcc-rich-location.c.
550 (build_binary_op): Use struct op_location_t and
551 class binary_op_rich_location.
553 2018-12-11 Jakub Jelinek <jakub@redhat.com>
556 * c-convert.c (convert): Call c_fully_fold before calling
557 ubsan_instrument_float_cast.
559 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
561 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
564 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
566 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
567 after asm. Pass a flag for it to build_asm_expr.
568 * c-tree.h (build_asm_expr): Update declaration.
569 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
572 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
575 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
576 combination of volatile and goto, in any order, without repetitions.
578 2018-12-04 James Norris <jnorris@codesourcery.com>
579 Cesar Philippidis <cesar@codesourcery.com>
580 Julian Brown <julian@codesourcery.com>
582 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
585 2018-11-30 Richard Biener <rguenther@suse.de>
587 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
588 _Literal (type) { ... } as empty aggregate or vector constructor.
590 2018-11-29 Martin Sebor <msebor@redhat.com>
593 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
594 (convert_arguments): Add comments. Pass additional argument to
597 2018-11-29 Martin Sebor <msebor@redhat.com>
601 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
603 2018-11-23 Martin Sebor <msebor@redhat.com>
606 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
607 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
609 2018-11-20 Martin Sebor <msebor@redhat.com>
611 * c-parser.c (c_parser_has_attribute_expression): New function.
612 (c_parser_attribute): New function.
613 (c_parser_attributes): Move code into c_parser_attribute.
614 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
616 2018-11-15 Martin Sebor <msebor@redhat.com>
619 * c-decl.c (header_for_builtin_fn): Declare.
620 (diagnose_mismatched_decls): Diagnose declarations of built-in
621 functions without a prototype.
622 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
623 (convert_argument): Same.
624 (convert_arguments): Factor code out into convert_argument.
625 Detect mismatches between built-in formal arguments in calls
626 to built-in without prototype.
627 (build_conditional_expr): Same.
628 (type_or_builtin_type): New function.
629 (convert_for_assignment): Add argument. Conditionally issue
630 warnings instead of errors for mismatches.
632 2018-11-13 David Malcolm <dmalcolm@redhat.com>
634 * c-decl.c: Replace "source_location" with "location_t".
635 * c-tree.h: Likewise.
636 * c-typeck.c: Likewise.
637 * gimple-parser.c: Likewise.
639 2018-11-09 Jakub Jelinek <jakub@redhat.com>
641 * c-parser.c (c_parser_omp_clause_final): Use
642 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
643 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
644 parsing instead of c_parser_paren_condition.
645 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
646 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
647 c_fully_fold instead of c_parser_condition.
648 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
649 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
650 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
651 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
652 c_parser_expr_no_commas instead of c_parser_expression.
654 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
655 reduction clause with inscan modifier.
657 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
658 clauses other than atomic_default_mem_order.
660 2018-11-08 Jakub Jelinek <jakub@redhat.com>
662 * c-parser.c: Include memmode.h.
663 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
664 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
665 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
666 task_reduction clauses.
667 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
668 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
669 section, or lvalue assignment expression.
670 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
671 (c_parser_omp_clause_lastprivate): Parse optional
672 conditional: modifier.
673 (c_parser_omp_clause_hint): Require constant integer expression rather
674 than just integer expression.
675 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
677 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
678 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
679 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
681 (c_parser_omp_clause_depend): Parse iterator modifier and handle
682 iterators. Parse mutexinoutset and depobj kinds.
683 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
685 (c_parser_omp_all_clauses): Likewise. Handle
686 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
687 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
688 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
689 default memory order from requires directive if any. Adjust
690 c_finish_omp_atomic caller.
691 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
692 (c_parser_omp_flush): Parse flush with memory-order-clause.
693 (c_parser_omp_for_loop): Allow NE_EXPR even in
694 OpenMP loops, adjust c_finish_omp_for caller.
695 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
696 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
697 Allow to be called while parsing combined parallel master.
698 Parse combined master taskloop{, simd}.
699 (c_parser_omp_parallel): Parse combined
700 parallel master{, taskloop{, simd}} constructs.
701 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
702 (OMP_TASKGROUP_CLAUSE_MASK): Define.
703 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
704 (OMP_TASKWAIT_CLAUSE_MASK): Define.
705 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
706 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
707 around teams body. Use SET_EXPR_LOCATION.
708 (c_parser_omp_target_data): Allow target data
709 with only use_device_ptr clauses.
710 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
711 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
712 (c_parser_omp_requires): New function.
713 (c_finish_taskloop_clauses): New function.
714 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
715 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
716 declaration. Disallow in_reduction clause when combined with parallel
718 (c_parser_omp_construct): Adjust c_parser_omp_master and
719 c_parser_omp_taskgroup callers.
720 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
722 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
723 like OMP_CLAUSE_REDUCTION.
724 (handle_omp_array_sections): Likewise. Call save_expr on array
725 reductions before calling build_index_type. Handle depend clauses
727 (struct c_find_omp_var_s): New type.
728 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
729 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
730 with static, runtime or auto schedule kinds. Call save_expr for whole
731 array reduction sizes. Diagnose reductions with zero sized elements
732 or variable length structures. Diagnose nogroup clause used with
733 reduction clause(s). Handle depend clause with
734 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
735 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
736 some different type for other kinds. Use build_unary_op with
737 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
738 Handle depend clauses with iterators. Remove no longer needed special
739 case that predetermined const qualified vars may be specified in
740 firstprivate clause. Complain if const qualified vars are mentioned
741 in data-sharing clauses other than firstprivate or shared. Use
742 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
743 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
744 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
745 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
747 2018-10-29 David Malcolm <dmalcolm@redhat.com>
749 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
750 logic for change to name_hint::operator bool.
751 (undeclared_variable): Likewise.
752 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
753 (c_parser_parameter_declaration): Likewise.
755 2018-10-17 Joseph Myers <joseph@codesourcery.com>
757 * c-errors.c (pedwarn_c11): New function.
758 * c-parser.c (disable_extension_diagnostics): Save
759 warn_c11_c2x_compat and set it to 0.
760 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
761 (c_parser_static_assert_declaration_no_semi): Handle
762 _Static_assert without string constant.
763 * c-tree.h (pedwarn_c11): New prototype.
765 2018-10-17 David Malcolm <dmalcolm@redhat.com>
767 * Make-lang.in (selftest-c): New.
768 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
769 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
770 from gcc/Makefile.in.
772 2018-10-02 Richard Biener <rguenther@suse.de>
774 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
776 2018-09-26 Joseph Myers <joseph@codesourcery.com>
779 * c-typeck.c (build_binary_op): Use excess precision for
780 comparisons of integers and floating-point for C11 and later.
782 2018-09-26 Martin Jambor <mjambor@suse.cz>
785 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
788 2018-09-17 David Malcolm <dmalcolm@redhat.com>
790 * c-objc-common.c (range_label_for_type_mismatch::get_text):
791 Update for new param.
792 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
795 2018-09-17 Martin Jambor <mjambor@suse.cz>
798 * c-parser.c: (warn_for_abs): New function.
799 (c_parser_postfix_expression_after_primary): Call it.
801 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
803 * c-typeck.c (digest_init): Shorten overlength strings.
805 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
807 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
809 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
811 * c-decl.c (finish_decl): Call braced_list_to_string here ...
812 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
814 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
816 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
817 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
819 2018-08-27 David Malcolm <dmalcolm@redhat.com>
822 * c-decl.c (implicitly_declare): Update call to
823 maybe_add_include_fixit to suggest overriding the location, as it
825 * c-objc-common.c (c_tree_printer): Update for conversion of
826 show_caret_p to a tri-state.
828 2018-08-27 Martin Liska <mliska@suse.cz>
830 * c-decl.c (locate_old_decl): Use new function
831 fndecl_built_in_p and remove check for FUNCTION_DECL if
833 (diagnose_mismatched_decls): Likewise.
834 (merge_decls): Likewise.
835 (warn_if_shadowing): Likewise.
836 (pushdecl): Likewise.
837 (implicitly_declare): Likewise.
838 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
839 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
840 * c-typeck.c (build_function_call_vec): Likewise.
841 (convert_arguments): Likewise.
843 2018-08-20 David Malcolm <dmalcolm@redhat.com>
846 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
847 (diagnose_mismatched_decls): Likewise, in various places.
848 (warn_if_shadowing): Likewise.
849 (implicit_decl_warning): Likewise.
850 (implicitly_declare): Likewise.
851 (undeclared_variable): Likewise.
852 (declare_label): Likewise.
853 (grokdeclarator): Likewise.
854 (start_function): Likewise.
855 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
856 (c_parser_parameter_declaration): Likewise.
857 (c_parser_binary_expression): Likewise.
858 * c-typeck.c (c_expr_sizeof_expr): Likewise.
859 (parser_build_binary_op): Likewise.
860 (build_unary_op): Likewise.
861 (error_init): Likewise.
862 (pedwarn_init): Likewise.
863 (warning_init): Likewise.
864 (convert_for_assignment): Likewise.
866 2018-08-15 David Malcolm <dmalcolm@redhat.com>
868 * c-objc-common.c: Include "gcc-rich-location.h".
869 (c_tree_printer): Move implemenation of '%T' to...
870 (print_type): ...this new function.
871 (range_label_for_type_mismatch::get_text): New function.
872 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
873 range for the various ic_argpass cases.
874 (class maybe_range_label_for_tree_type_mismatch): New class.
875 (build_binary_op): Use it when calling binary_op_error.
877 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
879 * c-decl.c (start_decl): Do not warn if variables is named as main
880 and is a local variable.
882 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
885 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
886 objects of unknown size.
888 2018-08-13 Martin Sebor <msebor@redhat.com>
890 PR tree-optimization/71625
891 * c-parser.c (c_parser_declaration_or_fndef): Call
892 braced_list_to_string.
894 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
897 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
900 2018-08-01 Martin Sebor <msebor@redhat.com>
902 PR tree-optimization/86650
903 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
904 and TREE_BLOCK (t) from within percent_K_format to this callsite.
906 2018-08-01 Jakub Jelinek <jakub@redhat.com>
909 * c-typeck.c (init_field_decl_cmp): New function.
910 (output_pending_init_elements): Use it for field comparisons
911 instead of pure bit_position comparisons.
913 2018-07-12 Jakub Jelinek <jakub@redhat.com>
915 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
916 type here, instead add "omp declare target implicit" attribute.
917 (finish_decl): Diagnose vars without mappable type here.
919 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
920 Thomas Schwinge <thomas@codesourcery.com>
921 Cesar Philippidis <cesar@codesourcery.com>
923 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
924 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
925 to their non-present_or_* counterparts. Make 'self' an alias to
926 PRAGMA_OACC_CLAUSE_HOST.
927 (c_parser_oacc_data_clause): Update GOMP mappings for
928 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
929 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
930 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
931 Remove support for present_or_* clauses.
932 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
933 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
934 (OACC_DECLARE_CLAUSE_MASK): Likewise.
935 (OACC_DATA_CLAUSE_MASK): Likewise.
936 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
937 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
938 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
939 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
940 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
942 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
944 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
945 * gimple-parser.c (c_parser_gimple_statement): Likewise.
946 (c_parser_gimple_unary_expression): Likewise.
948 2018-06-15 Jakub Jelinek <jakub@redhat.com>
951 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
952 before doing POINTER_DIFF_EXPR.
954 2018-06-07 Marek Polacek <polacek@redhat.com>
957 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
958 for loop initial declarations.
960 2018-05-30 David Pagan <dave.pagan@oracle.com>
963 * c-decl.c (grokdeclarator): Update check for return type warnings.
964 (start_function): Likewise.
965 (finish_function): Likewise.
966 * c-typeck.c (c_finish_return): Update check for return type warnings.
967 Pass OPT_Wreturn_type to pedwarn when appropriate.
969 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
971 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
974 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
976 * gimple-parser.c: Include internal-fn.h.
977 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
978 (c_parser_gimple_call_internal): New function.
979 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
980 Fix typos in comment.
982 2018-05-10 Jakub Jelinek <jakub@redhat.com>
985 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
986 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
988 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
989 fold_offsetof_1, pass argtype as TYPE to it and drop the
992 2018-05-02 David Pagan <dave.pagan@oracle.com>
995 * c-decl.c (old_style_parameter_scope): New function.
996 * c-parser.c (c_parser_postfix_expression): Check for statement
997 expressions in old-style function parameter list declarations.
998 * c-parser.h (old_style_parameter_scope): New extern declaration.
1000 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1003 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1004 it is not TREE_STATIC.
1005 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1006 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1007 its COMPOUND_LITERAL_EXPR_DECL.
1009 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1011 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1012 where all functions return the same _FloatN or _FloatNx type,
1013 treat integer types as _Float64 instead of double.
1015 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1018 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1019 building vector comparison, diagnose it and return error_mark_node.
1021 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1024 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1025 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1026 INTEGER_TYPE element type.
1028 2018-03-13 David Pagan <dave.pagan@oracle.com>
1031 * c-typeck.c (output_init_element): Ensure field initializer
1032 expression is always evaluated if there are side effects.
1034 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1037 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1038 !building_stmt_list_p ().
1040 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1043 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1044 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1045 and include the BIND_EXPR in the list of things that need to be
1048 2018-02-09 Nathan Sidwell <nathan@acm.org>
1051 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1052 to strict_aliasing_warning.
1054 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1056 * c-typeck.c (really_start_incremental_init, push_init_level,
1057 set_nonincremental_init, output_init_element, process_init_element):
1058 Use DECL_UNNAMED_BIT_FIELD.
1060 2018-01-31 Marek Polacek <polacek@redhat.com>
1063 * c-parser.c (c_parser_compound_statement_nostart): Call
1064 expansion_point_location_if_in_system_header.
1066 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1069 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1072 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1075 * c-tree.h (decl_constant_value_1): Add a bool argument.
1076 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1077 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1078 (decl_constant_value): Adjust caller.
1079 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1080 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1081 decl_constant_value returns initializer that has BLKmode or
1083 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1085 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1086 Alan Hayward <alan.hayward@arm.com>
1087 David Sherwood <david.sherwood@arm.com>
1089 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1090 TYPE_VECTOR_SUBPARTS.
1092 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1094 Update copyright years.
1096 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1099 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1100 c_parser_conditional_expression, c_parser_cast_expression,
1101 c_parser_sizeof_expression, c_parser_alignof_expression,
1102 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1103 c_parser_transaction_expression): Use set_error () method instead
1104 of setting value member to error_mark_node.
1106 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1108 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1109 and _Float<N>X built-in functions.
1111 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1114 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1115 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1116 incomplete vars rather than after it.
1119 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1120 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1121 and consider empty ones if there are no other stmts. For
1122 -Wunused-value walk all statements before the one only followed by
1125 2017-12-22 Mike Stump <mikestump@comcast.net>
1126 Eric Botcazou <ebotcazou@adacore.com>
1128 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1129 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1130 (c_parser_do_statement): Likewise.
1131 (c_parser_for_statement): Likewise.
1132 (c_parser_statement_after_labels): Adjust calls to above.
1133 (c_parse_pragma_ivdep): New static function.
1134 (c_parser_pragma_unroll): Likewise.
1135 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1136 <PRAGMA_UNROLL>: New case.
1138 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1140 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1141 perform_integral_promotions, digest_init): Replace Yoda conditions
1142 with typical order conditions.
1143 * c-decl.c (check_bitfield_type_and_width): Likewise.
1145 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1147 * c-typeck.c (c_safe_arg_type_equiv_p,
1148 c_safe_function_type_cast_p): New function.
1149 (build_c_cast): Implement -Wcast-function-type.
1151 2017-12-14 Richard Biener <rguenther@suse.de>
1154 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1155 like REALPART_EXPR for the behavior of whether its operand
1158 2017-12-12 Marek Polacek <polacek@redhat.com>
1161 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1163 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1165 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1166 * c-parser.c (add_debug_begin_stmt): New.
1167 (c_parser_declaration_or_fndef): Call it.
1168 (c_parser_compound_statement_nostart): Likewise.
1169 (c_parser_statement_after_labels): Likewise.
1170 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1172 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1174 * c-decl.c (build_compound_literal): Add parameter alignas_align
1175 and set alignment of decl if nonzero.
1176 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1177 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1179 (c_parser_struct_declaration): Update syntax comment.
1180 (c_parser_type_name): Add alignas_ok argument and pass it to
1182 (c_parser_cast_expression): Pass true to c_parser_type_name and
1183 give error if a cast used an _Alignas specifier.
1184 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1185 give error if sizeof (type-name) used an _Alignas specifier.
1186 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1187 give error if _Alignof (type-name) used an _Alignas specifier.
1188 (c_parser_postfix_expression_after_paren_type): Check specified
1189 alignment for a compound literal and pass it to
1190 build_compound_literal.
1191 * c-parser.h (c_parser_type_name): Update prototype.
1192 * c-tree.h (build_compound_literal): Update prototype.
1194 2017-12-07 Martin Sebor <msebor@redhat.com>
1197 * c-decl.c (c_decl_attributes): Look up existing declaration and
1198 pass it to decl_attributes.
1200 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1203 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1204 reserved for use by the implementation.
1206 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1208 * c-decl.c: Include "c-family/c-spellcheck.h".
1210 2017-12-05 Martin Liska <mliska@suse.cz>
1211 Jakub Jelinek <jakub@redhat.com>
1213 * c-typeck.c (pointer_diff): Add new argument and instrument
1214 pointer subtraction.
1215 (build_binary_op): Similar for pointer comparison.
1217 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1220 * c-parser.c: Include tree-iterator.h.
1221 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1222 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1226 * c-tree.h (decl_constant_value_1): Declare.
1227 * c-typeck.c (decl_constant_value_1): New function.
1228 (decl_constant_value): Use it.
1229 * c-fold.c (c_fully_fold_internal): If in_init, use
1230 decl_constant_value_1 instead of decl_constant_value.
1232 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1234 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1236 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1239 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1240 c_switch_covers_all_cases_p returns true.
1242 2017-11-28 Julia Koval <julia.koval@intel.com>
1243 Sebastian Peryt <sebastian.peryt@intel.com>
1245 * Make-lang.in (c/c-array-notation.o): Remove.
1246 * c-array-notation.c: Delete.
1247 * c-decl.c: Remove cilkplus condition.
1248 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1249 c_parser_cilk_verify_simd, c_parser_array_notation,
1250 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1251 c_parser_cilk_simd_fn_vector_attrs,
1252 c_finish_cilk_simd_fn_tokens): Delete.
1253 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1254 (c_parser_direct_declarator_inner): Ditto.
1255 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1256 (c_parser_attributes, c_parser_compound_statement,
1257 c_parser_statement_after_labels, c_parser_if_statement,
1258 c_parser_switch_statement, c_parser_while_statement,
1259 c_parser_do_statement, c_parser_for_statement,
1260 c_parser_unary_expression, c_parser_postfix_expression,
1261 c_parser_postfix_expression_after_primary,
1262 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1263 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1265 * c-typeck.c (build_array_ref, build_function_call_vec,
1267 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1268 c_finish_loop, build_binary_op): Remove cilkplus support.
1270 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1272 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1275 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1277 * Make-lang.in (c.install-plugin): Install backend import library.
1279 2017-11-23 Jakub Jelinek <jakub@redhat.com>
1281 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1282 pragma_stmt context.
1284 2017-11-23 Mike Stump <mikestump@comcast.net>
1285 Eric Botcazou <ebotcazou@adacore.com>
1287 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1289 (c_parser_do_statement): Likewise.
1290 (c_parser_for_statement): Likewise.
1292 2017-11-22 David Malcolm <dmalcolm@redhat.com>
1295 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1296 bool to bool *. Within '%T' handling, if showing an "aka", use
1297 "quoted" param to add appropriate quoting.
1299 2017-11-22 Marek Polacek <polacek@redhat.com>
1304 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1306 2017-11-21 David Malcolm <dmalcolm@redhat.com>
1309 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1310 earlier failed lookups.
1312 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1314 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1315 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1317 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1320 * c-decl.c: Include "c-family/known-headers.h".
1321 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1322 to known-headers.cc.
1323 (class suggest_missing_header): Move to known-header.h.
1324 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1325 than get_c_name_hint.
1327 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1329 * c-decl.c (get_c_name_hint): New function.
1330 (class suggest_missing_header): New class.
1331 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1332 suggest missing headers to the user.
1334 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1336 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1337 Include "c-family/name-hint.h"
1338 (implicit_decl_warning): Convert "hint" from
1339 const char * to name_hint. Pass location to
1340 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1341 warning was not printed.
1342 (undeclared_variable): Likewise for "guessed_id".
1343 (lookup_name_fuzzy): Convert return type from const char *
1344 to name_hint. Add location_t param.
1345 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1346 Include "c-family/name-hint.h"
1347 (c_parser_declaration_or_fndef): Convert "hint" from
1348 const char * to name_hint. Pass location to lookup_name_fuzzy.
1349 (c_parser_parameter_declaration): Likewise.
1351 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1355 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1357 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1358 handle_omp_array_sections): Likewise.
1359 (digest_init): Don't call decl_constant_value_for_optimization.
1360 * c-tree.h (decl_constant_value_for_optimization): Removed.
1361 * c-fold.c (c_fold_array_ref): New function.
1362 (c_fully_fold_internal): Add LVAL argument, propagate it through
1363 recursive calls. For VAR_P call decl_constant_value and
1364 unshare if not LVAL and either optimizing or IN_INIT. Remove
1365 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1366 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1367 (c_fully_fold): Add LVAL argument, pass it through to
1368 c_fully_fold_internal.
1369 (decl_constant_value_for_optimization): Removed.
1371 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1374 * c-parser.c (check_tgmath_function): New function.
1375 (enum tgmath_parm_kind): New enum.
1376 (c_parser_postfix_expression): Handle __builtin_tgmath.
1378 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1380 * c-decl.c (implicit_decl_warning): Update for renaming of
1381 pedwarn_at_rich_loc and warning_at_rich_loc.
1382 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1383 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1384 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1385 (c_parser_struct_or_union_specifier): Likewise for renaming of
1386 pedwarn_at_rich_loc.
1387 (c_parser_parameter_declaration): Likewise for renaming of
1389 * c-typeck.c (build_component_ref): Likewise.
1390 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1391 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1392 (set_init_label): Likewise for renaming of error_at_rich_loc.
1394 2017-10-30 Richard Biener <rguenther@suse.de>
1396 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1399 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1401 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1402 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1404 2017-10-25 David Malcolm <dmalcolm@redhat.com>
1407 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1410 2017-10-25 Jakub Jelinek <jakub@redhat.com>
1413 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1414 newdecl to corresponding __builtin_ if any.
1416 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1419 * c-decl.c (diagnose_mismatched_decls): Use
1420 OPT_Wbuiltin_declaration_mismatch.
1422 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1424 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1425 use it to guard calls to maybe_suggest_missing_token_insertion.
1426 (c_parser_parms_list_declarator): Override default value of new
1427 "type_is_unique" param to c_parser_require.
1428 (c_parser_asm_statement): Likewise.
1429 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1432 2017-10-11 Nathan Sidwell <nathan@acm.org>
1434 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1436 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1438 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1439 operating on trees as wide_ints.
1440 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1441 (c_tree_equal): Likewise.
1443 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1445 * c-decl.c (push_parm_decl): Store c_parm's location into the
1447 (build_c_parm): Add "loc" param and store it within the c_parm.
1448 * c-parser.c (struct c_parser): Add "last_token_location" field.
1449 (c_parser_consume_token): Store location of the token into the
1451 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1452 when handling a FUNCTION_DECL, if it doesn't already have them.
1453 (c_parser_parameter_declaration): Generate a location for the
1454 parameter, and pass it to the call to build_c_parm.
1455 * c-tree.h (struct c_parm): Add field "loc".
1456 (build_c_parm): Add location_t param.
1457 * c-typeck.c (get_fndecl_argument_location): New function.
1458 (inform_for_arg): New function.
1459 (convert_for_assignment): Use inform_for_arg when dealing with
1462 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1464 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1466 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1467 don't SET_DECL_C_BIT_FIELD here.
1470 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1471 instead of trying to set just TREE_READONLY manually.
1473 2017-09-16 Tom de Vries <tom@codesourcery.com>
1476 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1479 2017-09-15 Joseph Myers <joseph@codesourcery.com>
1482 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1484 (build_conditional_expr): For C11, generate result with excess
1485 precision when one argument is an integer and the other is of a
1486 type using excess precision.
1488 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1490 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1492 2017-09-13 Marek Polacek <polacek@redhat.com>
1495 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1496 than expr.original_type.
1498 2017-09-12 Nathan Sidwell <nathan@acm.org>
1500 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1501 resort_sorted_fields): Moved from c-family/c-common.c.
1502 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1504 2017-09-01 Joseph Myers <joseph@codesourcery.com>
1507 * c-typeck.c (build_atomic_assign): Handle argument with excess
1508 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1509 argument passed to build_binary_op and convert_for_assignment but
1510 not for call to c_fully_fold.
1511 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1512 Ensure build_binary_op is called with argument with original
1513 semantic type. Avoid calling c_fully_fold with an
1514 EXCESS_PRECISION_EXPR from build_binary_op.
1516 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1519 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1521 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1522 Alan Hayward <alan.hayward@arm.com>
1523 David Sherwood <david.sherwood@arm.com>
1525 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1526 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1527 m1 and m2 to the signed equivalent of a fixed-point
1530 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1532 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1533 than CAN_HAVE_LOCATION_P when determining whether to use the
1534 location_t value within "value".
1536 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1538 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1539 rather than peeking the location of the first token.
1540 * c-tree.h (c_expr::get_location): New method.
1542 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1544 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1545 to check_function_arguments.
1547 2017-08-18 Marek Polacek <polacek@redhat.com>
1549 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1552 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1555 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1556 (check_bitfield_type_and_width): Don't allow bit-field with
1557 warn_if_not_aligned type.
1559 2017-08-14 Martin Sebor <msebor@redhat.com>
1562 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1564 2017-08-11 Marek Polacek <polacek@redhat.com>
1567 * c-decl.c (pushtag): Only print inform if the warning was printed.
1568 (grokdeclarator): Likewise.
1570 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1572 * c-parser.c (c_parser_error): Rename to...
1573 (c_parser_error_richloc): ...this, making static, and adding
1574 "richloc" parameter, passing it to the c_parse_error call,
1575 rather than calling c_parser_set_source_position_from_token.
1576 (c_parser_error): Reintroduce, reimplementing in terms of the
1577 above, converting return type from void to bool.
1578 (class token_pair): New class.
1579 (struct matching_paren_traits): New struct.
1580 (matching_parens): New typedef.
1581 (struct matching_brace_traits): New struct.
1582 (matching_braces): New typedef.
1583 (get_matching_symbol): New function.
1584 (c_parser_require): Add param MATCHING_LOCATION, using it to
1585 highlight matching "opening" tokens for missing "closing" tokens.
1586 (c_parser_skip_until_found): Likewise.
1587 (c_parser_static_assert_declaration_no_semi): Convert explicit
1588 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1589 class matching_parens, so that the pertinent open parenthesis is
1590 highlighted when there are problems locating the close
1592 (c_parser_struct_or_union_specifier): Likewise.
1593 (c_parser_typeof_specifier): Likewise.
1594 (c_parser_alignas_specifier): Likewise.
1595 (c_parser_simple_asm_expr): Likewise.
1596 (c_parser_braced_init): Likewise, for matching_braces.
1597 (c_parser_paren_condition): Likewise, for matching_parens.
1598 (c_parser_switch_statement): Likewise.
1599 (c_parser_for_statement): Likewise.
1600 (c_parser_asm_statement): Likewise.
1601 (c_parser_asm_operands): Likewise.
1602 (c_parser_cast_expression): Likewise.
1603 (c_parser_sizeof_expression): Likewise.
1604 (c_parser_alignof_expression): Likewise.
1605 (c_parser_generic_selection): Likewise.
1606 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1607 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1608 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1609 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1610 c_parser_skip_until_found call.
1611 (c_parser_objc_class_definition): Use class matching_parens as
1613 (c_parser_objc_method_decl): Likewise.
1614 (c_parser_objc_try_catch_finally_statement): Likewise.
1615 (c_parser_objc_synchronized_statement): Likewise.
1616 (c_parser_objc_at_property_declaration): Likewise.
1617 (c_parser_oacc_wait_list): Likewise.
1618 (c_parser_omp_var_list_parens): Likewise.
1619 (c_parser_omp_clause_collapse): Likewise.
1620 (c_parser_omp_clause_default): Likewise.
1621 (c_parser_omp_clause_if): Likewise.
1622 (c_parser_omp_clause_num_threads): Likewise.
1623 (c_parser_omp_clause_num_tasks): Likewise.
1624 (c_parser_omp_clause_grainsize): Likewise.
1625 (c_parser_omp_clause_priority): Likewise.
1626 (c_parser_omp_clause_hint): Likewise.
1627 (c_parser_omp_clause_defaultmap): Likewise.
1628 (c_parser_oacc_single_int_clause): Likewise.
1629 (c_parser_omp_clause_ordered): Likewise.
1630 (c_parser_omp_clause_reduction): Likewise.
1631 (c_parser_omp_clause_schedule): Likewise.
1632 (c_parser_omp_clause_num_teams): Likewise.
1633 (c_parser_omp_clause_thread_limit): Likewise.
1634 (c_parser_omp_clause_aligned): Likewise.
1635 (c_parser_omp_clause_linear): Likewise.
1636 (c_parser_omp_clause_safelen): Likewise.
1637 (c_parser_omp_clause_simdlen): Likewise.
1638 (c_parser_omp_clause_depend): Likewise.
1639 (c_parser_omp_clause_map): Likewise.
1640 (c_parser_omp_clause_device): Likewise.
1641 (c_parser_omp_clause_dist_schedule): Likewise.
1642 (c_parser_omp_clause_proc_bind): Likewise.
1643 (c_parser_omp_clause_uniform): Likewise.
1644 (c_parser_omp_for_loop): Likewise.
1645 (c_parser_cilk_clause_vectorlength): Likewise.
1646 (c_parser_cilk_clause_linear): Likewise.
1647 (c_parser_transaction_expression): Likewise.
1648 * c-parser.h (c_parser_require): Add param matching_location with
1649 default UNKNOWN_LOCATION.
1650 (c_parser_error): Convert return type from void to bool.
1651 (c_parser_skip_until_found): Add param matching_location with
1652 default UNKNOWN_LOCATION.
1654 2017-08-09 Marek Polacek <polacek@redhat.com>
1656 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1657 * c-tree.h (build_external_ref): Update declaration.
1658 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1659 (build_external_ref): Change the type of a parameter to bool.
1660 (parser_build_binary_op): Use true/false instead of 1/0.
1661 (pointer_diff): Likewise.
1662 (build_modify_expr): Likewise.
1663 (set_designator): Change the type of a parameter to bool.
1664 (set_init_index): Use true/false instead of 1/0.
1665 (set_init_label): Likewise.
1666 (output_init_element): Change the type of a parameter to bool.
1667 (output_pending_init_elements): Use true/false instead of 1/0.
1668 (process_init_element): Likewise.
1669 (build_binary_op): Change the type of a parameter to bool.
1671 2017-08-09 Marek Polacek <polacek@redhat.com>
1674 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1675 Call emit_diagnostic_valist instead of pedwarn.
1676 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1677 Print the relevant types in diagnostics.
1679 2017-08-09 Marek Polacek <polacek@redhat.com>
1682 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1683 build_conditional_expr.
1684 * c-parser.c (c_parser_conditional_expression): Create locations for
1685 EXP1 and EXP2 from their source ranges. Pass the locations down to
1686 build_conditional_expr.
1687 * c-tree.h (build_conditional_expr): Update declaration.
1688 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1689 For -Wsign-compare, also print the types.
1691 2017-08-08 Martin Liska <mliska@suse.cz>
1693 * c-convert.c: Include header files.
1694 * c-typeck.c: Likewise.
1696 2017-08-07 Martin Liska <mliska@suse.cz>
1698 * c-parser.c (c_parser_attributes): Canonicalize name of an
1701 2017-08-02 Marek Polacek <polacek@redhat.com>
1704 * c-parser.c (c_parser_unary_expression): Use set_error.
1708 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1709 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1711 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1712 Martin Liska <mliska@suse.cz>
1714 * c-typeck.c (c_finish_goto_label): Build gimple predict
1717 2017-07-31 Martin Liska <mliska@suse.cz>
1720 * c-convert.c (convert): Guard condition with flag_sanitize_p
1721 also with current_function_decl non-null equality.
1722 * c-decl.c (grokdeclarator): Likewise.
1723 * c-typeck.c (build_binary_op): Likewise.
1725 2017-07-25 Marek Polacek <polacek@redhat.com>
1727 * c-decl.c (grokfield): Remove local variable.
1729 2017-07-25 Marek Polacek <polacek@redhat.com>
1732 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1733 macro expansion if the body is in { }.
1734 (c_parser_while_statement): Likewise.
1735 (c_parser_for_statement): Likewise.
1737 2017-07-18 Nathan Sidwell <nathan@acm.org>
1739 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1741 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1743 * c-decl.c (implicitly_declare): When suggesting a missing
1744 #include, provide a fix-it hint.
1746 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1748 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1749 and call that instead.
1750 * c-tree.h (selftest::run_c_tests): New decl.
1752 2017-06-26 Marek Polacek <polacek@redhat.com>
1755 * c-parser.c (c_parser_if_body): Set the location of the
1756 body of the conditional after parsing all the labels. Call
1757 warn_for_multistatement_macros.
1758 (c_parser_else_body): Likewise.
1759 (c_parser_switch_statement): Likewise.
1760 (c_parser_while_statement): Likewise.
1761 (c_parser_for_statement): Likewise.
1762 (c_parser_statement): Add a default argument. Save the location
1763 after labels have been parsed.
1764 (c_parser_c99_block_statement): Likewise.
1766 2017-06-19 Richard Biener <rguenther@suse.de>
1768 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1769 negated _Literals to parse _Literal (int) -1.
1771 2017-06-13 Martin Liska <mliska@suse.cz>
1774 * c-convert.c (convert): Use sanitize_flags_p.
1775 * c-decl.c (grokdeclarator): Likewise.
1776 * c-typeck.c (convert_for_assignment): Likewise.
1777 (c_finish_return): Likewise.
1778 (build_binary_op): Likewise.
1780 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1783 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1784 to sizetype before size_binop.
1786 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1788 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1791 2017-06-06 Marek Polacek <polacek@redhat.com>
1794 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1796 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1798 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1800 * c-parser.c (c_parser_binary_expression): Implement the
1801 -Wsizeof_pointer_div warning.
1802 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1803 from a parenthesized expression.
1804 (c_parser_expr_list): Use c_last_sizeof_loc.
1805 * c-tree.h (c_last_sizeof_loc): New external.
1806 * c-typeck.c (c_last_sizeof_loc): New variable.
1807 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1809 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1812 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1814 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1816 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1819 2017-05-24 Martin Sebor <msebor@redhat.com>
1822 * c-fold.c (c_fully_fold_internal): Adjust.
1823 * c-typeck.c (parser_build_unary_op): Adjust.
1825 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1827 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1828 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1831 2017-05-23 Marek Polacek <polacek@redhat.com>
1833 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1836 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1838 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1839 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1840 it returned invariant. Call tree_invariant_p unconditionally
1841 afterwards to decide whether to return expr or op0.
1843 2017-05-22 Nathan Sidwell <nathan@acm.org>
1845 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1847 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1849 * c-parser.c (c_parser_omp_clause_default): Handle
1850 "OMP_CLAUSE_DEFAULT_PRESENT".
1852 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1854 * config-lang.in (gtfiles): Add c-family/c-format.c.
1856 2017-05-18 Nathan Sidwell <nathan@acm.org>
1858 * c-decl.c (pushdecl_top_level): Delete unused function.
1860 2017-05-18 Marek Polacek <polacek@redhat.com>
1862 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1863 (check_earlier_gotos): Likewise.
1864 (define_label): Likewise.
1865 (pending_xref_error): Likewise.
1866 (smallest_type_quals_location): Likewise.
1867 (grokdeclarator): Likewise.
1868 (grokparms): Likewise.
1869 (identifier_global_value): Likewise.
1870 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1871 (find_init_member): Likewise.
1873 2017-05-18 Marek Polacek <polacek@redhat.com>
1875 * c-decl.c (start_decl): Use false/true instead of 0/1.
1876 (grokdeclarator): Likewise.
1877 (finish_struct): Likewise.
1878 (start_function): Change the return type to bool. Use false/true
1880 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1881 * c-tree.h (start_function): Update.
1882 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1883 (set_designator): Change the return type to bool. Use false/true
1886 2017-05-17 Marek Polacek <polacek@redhat.com>
1888 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1889 * c-typeck.c: Likewise.
1891 2017-05-17 Marek Polacek <polacek@redhat.com>
1894 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1895 DECL_IGNORED_P even for non-static compound literals.
1897 2017-05-17 Martin Liska <mliska@suse.cz>
1899 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1900 use it instead of int type.
1902 2017-05-17 Marek Polacek <polacek@redhat.com>
1904 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1906 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1907 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1908 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1909 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1911 (c_parser_conditional_expression): Likewise.
1912 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1913 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1914 (process_init_element): Likewise.
1915 (build_binary_op): Likewise.
1916 (handle_omp_array_sections_1): Likewise.
1918 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1920 * c-parser.c (c_parser_omp_clause_num_gangs)
1921 (c_parser_omp_clause_num_workers)
1922 (c_parser_omp_clause_vector_length): Merge functions into...
1923 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1926 2017-05-11 Nathan Sidwell <nathan@acm.org>
1928 * gimple-parser.c: Don't #include tree-dump.h.
1930 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1933 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1935 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1938 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1939 incorrect __MEM syntax.
1941 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1944 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1947 2017-05-09 Nathan Sidwell <nathan@acm.org>
1949 * c-tree.h (pushdecl): Declare.
1951 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1953 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1954 with diagnostic_report_diagnostic.
1955 * c-errors.c (pedwarn_c99): Likewise.
1956 (pedwarn_c90): Likewise.
1958 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1961 * c-gimplify.c (c_gimplify_expr): Remove calls to
1962 cilk_gimplifY_call_params_in_spawned_fn.
1964 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1966 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1967 hint for removing extra semicolon.
1969 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1972 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1973 enabled, set specs->type to integer_type_node.
1975 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1977 * c-array-notation.c: Fix typo in comment.
1979 2017-03-29 Marek Polacek <polacek@redhat.com>
1982 * c-decl.c (finish_decl): Check VAR_P.
1984 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1987 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1988 * c-typeck.c (c_mark_addressable): Likewise. Look through
1989 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1991 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1993 2017-03-23 Marek Polacek <polacek@redhat.com>
1995 * c-tree.h: Remove a C_RID_YYCODE reference.
1997 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2000 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2001 optional COMPOUND_EXPR with ubsan instrumentation.
2003 2017-03-17 Marek Polacek <polacek@redhat.com>
2005 * c-parser.c: Add C11 references.
2007 2017-03-15 Marek Polacek <polacek@redhat.com>
2009 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2011 2017-03-11 Marek Polacek <polacek@redhat.com>
2013 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2015 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2017 PR translation/79848
2018 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2020 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2022 2017-03-09 Marek Polacek <polacek@redhat.com>
2025 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2026 parameter declarations with initializers.
2028 2017-03-09 Jakub Jelinek <jakub@redhat.com>
2031 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2034 2017-03-07 Jakub Jelinek <jakub@redhat.com>
2037 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2038 for "may only be used in compound statements" diagnostics, change it
2039 such that the same translatable string is used for all pragmas. For
2040 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2042 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2043 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2044 "may only be used in compound statements" diagnostics, such that the
2045 same translatable string is used for all pragmas.
2047 2017-03-04 Marek Polacek <polacek@redhat.com>
2050 * c-decl.c (implicit_decl_warning): Add missing space.
2052 2017-03-03 Marek Polacek <polacek@redhat.com>
2055 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2056 current_function_prototype_arg_types is error_mark_node. Fix
2057 formatting. Use TREE_VALUE instead of TREE_TYPE.
2059 2017-03-03 Jakub Jelinek <jakub@redhat.com>
2062 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2063 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2064 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2068 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2069 instead of %<_Generic>.
2070 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2071 (c_parser_omp_target_exit_data): Use %<release%> instead of
2074 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2076 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2077 instead of just cond ? "..." : "...".
2078 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2079 for "enter"/"exit" keyword.
2080 (c_finish_oacc_routine): Don't use %s to supply portions of the
2083 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2086 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2087 handle -Wrestrict here.
2088 * c-typeck.c (build_function_call_vec): Adjust
2089 check_function_arguments caller.
2091 2017-02-23 Richard Biener <rguenther@suse.de>
2094 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2095 to initialize c_exprs to return.
2096 (c_parser_gimple_binary_expression): Likewise.
2097 (c_parser_gimple_unary_expression): Likewise.
2098 (c_parser_gimple_postfix_expression): Likewise.
2100 2017-02-22 Marek Polacek <polacek@redhat.com>
2103 * c-typeck.c (convert_arguments): Handle error_mark_node.
2105 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2107 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2108 value of c_parser_parse_ssa_name against error_mark_node and emit
2109 error if ssa name is anonymous and written as default definition.
2111 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2113 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2116 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2119 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2120 ignore #pragma omp target even when not followed by identifier.
2122 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2124 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2125 (c_parser_gimple_unary_expression): Likewise.
2127 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2129 * c-parser.c (c_parser_oacc_declare): Add missing space in
2132 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2135 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2136 set_c_expr_source_range when parsing ssa-name.
2138 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2139 Richard Biener <rguenther@suse.de>
2141 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2142 building IL when arguments are error_mark_node.
2143 (c_parser_gimple_unary_expression): Likewise.
2144 (c_parser_gimple_if_stmt): Likewise.
2145 (c_parser_gimple_switch_stmt): Likewise.
2146 (c_parser_gimple_return_stmt): Likewise.
2147 (c_parser_parse_ssa_name): When name lookup fails do not build
2148 an SSA name. Use undeclared rather than not declared in error
2151 2017-02-09 Marek Polacek <polacek@redhat.com>
2154 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2155 instead of c_parser_skip_until_found.
2157 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2160 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2161 symtab_node::get on automatic variables.
2163 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2164 Chung-Lin Tang <cltang@codesourcery.com>
2166 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2167 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2169 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2171 2017-02-07 Richard Biener <rguenther@suse.de>
2173 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2174 (c_parser_gimple_postfix_expression_after_primary):
2175 Do not use c_build_function_call_vec to avoid folding and promotion.
2178 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2181 * c-decl.c (pop_scope): Pass main_input_filename to
2182 build_translation_unit_decl.
2184 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2186 * c-parser.c: Include "read-rtl-function.h" and
2188 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2189 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2190 production. Update for renaming of field "gimple_pass" to
2191 "gimple_or_rtl_pass". If __RTL was seen, call
2192 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2193 to an auto_timevar, to cope with early exit.
2194 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2195 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2196 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2198 (c_parser_parse_rtl_body): New function.
2199 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2200 (struct c_declspecs): Rename field "gimple_pass" to
2201 "gimple_or_rtl_pass". Add field "rtl_p".
2202 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2203 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2204 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2205 (c_parser_gimple_or_rtl_pass_list): ...this.
2207 2017-01-20 Marek Polacek <polacek@redhat.com>
2210 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2212 2017-01-13 Richard Biener <rguenther@suse.de>
2214 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2217 2017-01-13 Richard Biener <rguenther@suse.de>
2219 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2220 _Literal ( type-name ) number.
2222 2017-01-12 Richard Biener <rguenther@suse.de>
2224 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2227 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2230 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2233 2017-01-11 Richard Biener <rguenther@suse.de>
2236 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2237 returns on parse errors.
2239 2017-01-04 Marek Polacek <polacek@redhat.com>
2242 * c-parser.c (c_parser_postfix_expression): Mark zero character
2243 constants by setting original_type in c_expr.
2244 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2245 with a zero character constant.
2246 (char_type_p): New function.
2248 2017-01-04 David Malcolm <dmalcolm@redhat.com>
2250 * c-parser.c (c_parser_declaration_or_fndef): Create a
2251 rich_location at init_loc and parse it to start_init.
2252 (last_init_list_comma): New global.
2253 (c_parser_braced_init): Update last_init_list_comma when parsing
2254 commas. Pass it to pop_init_level. Pass location of closing
2255 brace to pop_init_level.
2256 (c_parser_postfix_expression_after_paren_type): Create a
2257 rich_location at type_loc and parse it to start_init.
2258 (c_parser_omp_declare_reduction): Likewise for loc.
2259 * c-tree.h (start_init): Add rich_location * param.
2260 (pop_init_level): Add location_t param.
2261 * c-typeck.c (struct initializer_stack): Add field
2262 "missing_brace_richloc".
2263 (start_init): Add richloc param, use it to initialize
2264 the stack node's missing_brace_richloc.
2265 (last_init_list_comma): New decl.
2266 (finish_implicit_inits): Pass last_init_list_comma to
2268 (push_init_level): When finding missing open braces, add fix-it
2269 hints to the richloc.
2270 (pop_init_level): Add "insert_before" param and pass it
2271 when calling pop_init_level. Add fixits about missing
2272 close braces to any richloc. Use the richloc for the
2273 -Wmissing-braces warning.
2274 (set_designator): Pass last_init_list_comma to pop_init_level.
2275 (process_init_element): Likewise.
2277 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2279 Update copyright years.
2281 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2284 * c-typeck.c (build_function_call_vec): If check_function_arguments
2285 returns true, set TREE_NO_WARNING on CALL_EXPR.
2288 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2289 to *expr instead of overwriting it.
2291 2016-12-20 Richard Biener <rguenther@suse.de>
2293 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2295 (c_parser_gimple_statement): Only build assigns for non-error
2297 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2299 2016-12-14 Martin Jambor <mjambor@suse.cz>
2301 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2303 (c_finish_oacc_routine): Adjusted call to
2304 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2305 to use their new names.
2306 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2308 (c_parser_oacc_update): Likewise.
2309 (c_parser_omp_simd): Likewise.
2310 (c_parser_omp_target_update): Likewise.
2311 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2312 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2314 (c_finish_omp_cancellation_point): Likewise.
2315 * gimple-parser.c: Do not include omp-low.h
2317 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2318 James Norris <jnorris@codesourcery.com>
2320 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2321 EXIT_DATA,WAIT} are not used in compound statements.
2322 (c_parser_oacc_enter_exit_data): Update diagnostics.
2324 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2327 * c-decl.c (diagnose_mismatched_decls): Use
2328 OPT_Wbuiltin_declaration_mismatch here too.
2330 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
2331 Alan Hayward <alan.hayward@arm.com>
2332 David Sherwood <david.sherwood@arm.com>
2334 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2335 (make_label, finish_struct): Likewise.
2337 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2338 Richard Biener <rguenther@suse.de>
2340 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2341 * config-lang.in (gtfiles): Add c/c-parser.h.
2342 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2343 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2344 * c-parser.c (enum c_id_kind, struct c_token,
2345 c_parser_next_token_is, c_parser_next_token_is_not,
2346 c_parser_next_token_is_keyword,
2347 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2349 * c-parser.h: ... new header.
2350 * c-parser.c: Include c-parser.h and gimple-parser.h.
2351 (c_parser_peek_token, c_parser_peek_2nd_token,
2352 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2353 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2354 c_parser_error, c_parser_require, c_parser_skip_until_found,
2355 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2356 c_parser_type_name): Export.
2357 (c_parser_tokens_buf): New function.
2358 (c_parser_error): Likewise.
2359 (c_parser_set_error): Likewise.
2360 (c_parser_declspecs): Handle RID_GIMPLE.
2361 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2362 via c_parser_parse_gimple_body.
2363 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2364 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2365 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2366 c_parser_error, c_parser_require, c_parser_skip_until_found,
2367 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2368 c_parser_type_name): Declare.
2369 (struct c_parser): Declare forward.
2370 (c_parser_tokens_buf): Declare.
2371 (c_parser_error): Likewise.
2372 (c_parser_set_error): Likewise.
2373 * gimple-parser.c: New file.
2374 * gimple-parser.h: Likewise.
2376 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2379 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2382 2016-09-11 Le-Chun Wu <lcwu@google.com>
2383 Mark Wielaard <mjw@redhat.com>
2385 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2386 to the given -Wshadow= variant.
2388 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2390 * c-typeck.c: Include memmodel.h.
2392 2016-10-13 Jakub Jelinek <jakub@redhat.com>
2395 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2396 instead of lhd_return_null_tree_v.
2398 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2401 * c-decl.c (smallest_type_quals_location): New static function.
2402 (grokdeclarator): Try to find the correct location for an ignored
2405 2016-09-26 Marek Polacek <polacek@redhat.com>
2408 * c-decl.c (pop_scope): Add gcc_fallthrough.
2410 2016-09-26 Marek Polacek <polacek@redhat.com>
2413 * c-parser.c (struct c_token): Add flags field.
2414 (c_lex_one_token): Pass it to c_lex_with_flags.
2415 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2416 into IFN_FALLTHROUGH.
2417 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2418 attribute fallthrough after a case label or default label.
2419 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2421 2016-09-24 Marek Polacek <polacek@redhat.com>
2424 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2425 have boolean value. Warn about ++/-- on booleans.
2427 2016-09-23 Jakub Jelinek <jakub@redhat.com>
2429 * c-parser.c (incomplete_record_decls): Remove unnecessary
2430 = vNULL initialization of file scope vec.
2432 2016-09-16 Marek Polacek <polacek@redhat.com>
2434 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2436 2016-09-14 Marek Polacek <polacek@redhat.com>
2438 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2439 (fix_array_notation_expr): Likewise.
2440 * c-decl.c (finish_decl): Likewise.
2441 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2442 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2443 (function_to_pointer_conversion): Use false instead of 0.
2444 (convert_lvalue_to_rvalue): Likewise.
2445 (parser_build_unary_op): Likewise.
2446 (build_atomic_assign): Likewise.
2447 (build_unary_op): Change nonconvert parameter type to bool, use
2448 true/false instead of 1/0.
2449 (build_binary_op): Use true instead of 1.
2451 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2453 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2454 of add_fixit_insert to add_fixit_insert_before.
2456 2016-09-13 Marek Polacek <polacek@redhat.com>
2458 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2461 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2464 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2465 COMPOUND_EXPR to warn_for_omitted_condop.
2467 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2469 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2470 c_get_substring_location for this new langhook.
2472 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2475 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2477 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2478 instead of mark_exp_read on low_bound/length expression.
2479 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2480 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2481 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2482 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2483 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2484 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2485 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2486 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2487 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2488 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2489 instead of mark_expr_read.
2490 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2491 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2492 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2493 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2494 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2495 array section bases outside of depend clause, for depend clause
2496 use convert_lvalue_to_rvalue on the base.
2497 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2498 linear, aligned, map, to and from clauses.
2499 (c_omp_clause_copy_ctor): New function.
2501 2016-09-01 Marek Polacek <polacek@redhat.com>
2504 * c-typeck.c (composite_type): Add FALLTHRU comment.
2506 2016-08-31 David Malcolm <dmalcolm@redhat.com>
2508 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2509 to the insertion fixits for "struct", "union", and "enum".
2511 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2513 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2514 rather than add_fixit_misspelled_id.
2515 (undeclared_variable): Likewise.
2516 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2517 now-redundant "here" params from add_fixit_insert method calls.
2518 (c_parser_parameter_declaration): Likewise.
2519 * c-typeck.c (build_component_ref): Remove now-redundant range
2520 param from add_fixit_replace method calls.
2522 2016-08-25 Marek Polacek <polacek@redhat.com>
2524 * c-typeck.c (parser_build_binary_op): Pass LHS to
2525 warn_logical_not_parentheses.
2527 2016-08-25 Marek Polacek <polacek@redhat.com>
2530 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2531 or _FloatN or _FloatNx is not supported.
2532 (finish_declspecs): Set type to integer_type_node when _FloatN or
2533 _FloatNx is not supported.
2535 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2538 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2539 (struct c_declspecs): Add field floatn_nx_idx.
2540 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2541 and _FloatNx type specifiers.
2542 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2543 (c_parser_declspecs, c_parser_attribute_any_word)
2544 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2545 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2546 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2547 narrower than double.
2549 2016-08-12 Jakub Jelinek <jakub@redhat.com>
2550 Martin Liska <mliska@suse.cz>
2553 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2554 % to determine val element to change. Assert that
2555 wchar_bytes * charwidth fits into val array.
2557 2016-08-12 Marek Polacek <polacek@redhat.com>
2560 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2561 (c_parser_postfix_expression): Likewise.
2562 * c-typeck.c (build_unary_op): Adjust fall through comment.
2563 (c_mark_addressable): Likewise.
2565 2016-08-11 Jakub Jelinek <jakub@redhat.com>
2568 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2569 array member through typedef, for orig_qual_indirect == 0 clear
2572 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2575 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2576 this up to selftest::run_c_tests.
2577 (selftest::run_c_tests): New function.
2579 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2581 * c-parser.c (struct oacc_routine_data): Add error_seen and
2582 fndecl_seen members.
2583 (c_finish_oacc_routine): Use these.
2584 (c_parser_declaration_or_fndef): Adjust.
2585 (c_parser_oacc_routine): Likewise. Support more C language
2586 constructs, and improve diagnostics. Move pragma context
2588 (c_parser_pragma): ... here.
2590 * c-parser.c (struct oacc_routine_data): New.
2591 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2593 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2594 declare target" attribute.
2596 2016-08-01 Jan Beulich <jbeulich@suse.com>
2598 * c-fold.c (c_fully_fold_internal): Also emit shift count
2599 warnings for vector types.
2600 * c-typeck.c (build_binary_op): Likewise.
2602 2016-07-29 Marek Polacek <polacek@redhat.com>
2605 * c-decl.c (finish_struct): Rephrase an error message.
2608 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2609 to error node for invalid code.
2612 * c-decl.c (implicitly_declare): Return decl early not only for
2613 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2615 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2618 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2619 on GNU extern inline functions.
2621 2016-07-29 Marek Polacek <polacek@redhat.com>
2624 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2627 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2629 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2631 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2633 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2635 (best_macro_match): Likewise, converting from a typedef to a
2637 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2638 (lookup_name_fuzzy): Update for change of best_macro_match to a
2639 subclass with a ctor that calls cpp_forall_identifiers.
2641 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2643 * c-decl.c (implicit_decl_warning): Update for conversion of
2644 return type of lookup_name_fuzzy to const char *.
2645 (undeclared_variable): Likewise.
2646 (lookup_name_fuzzy): Convert return type from tree to
2648 * c-parser.c (c_parser_declaration_or_fndef): Update for
2649 conversion of return type of lookup_name_fuzzy to const char *.
2650 (c_parser_parameter_declaration): Likewise.
2652 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2654 * c-parser.c (c_parser_oacc_declare): Don't scan for
2656 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2657 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2658 zero-length subarrays.
2660 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2663 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2664 instead of FUZZY_LOOKUP_NAME.
2665 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2666 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2668 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2671 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2673 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2675 * c-parser.c (c_parser_generic_selection): Make type of variable
2677 (c_parser_omp_declare_simd): Likewise.
2679 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2681 * c-decl.c (struct c_struct_parse_info): Change member types
2682 from vec to auto_vec.
2683 (start_struct): Adjust.
2684 (finish_struct): Likewise.
2686 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2689 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2691 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2693 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2694 Move pragma context checking into...
2695 (c_parser_omp_cancellation_point): ... here, and improve
2696 diagnostic messages.
2697 * c-typeck.c (c_finish_omp_cancel)
2698 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2700 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2703 * c-typeck.c (c_build_qualified_type): Don't clear
2704 C_TYPE_INCOMPLETE_VARS for the main variant.
2706 2016-06-28 Martin Sebor <msebor@redhat.com>
2709 * c-typeck.c (output_init_element): Diagnose incompatible types
2710 before non-constant initializers.
2712 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2714 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2716 2016-06-23 Andi Kleen <ak@linux.intel.com>
2718 * Make-lang.in: Add support for autofdo.
2720 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2723 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2724 (implicit_decl_warning): When issuing warnings for implicit
2725 declarations, attempt to provide a suggestion via
2727 (undeclared_variable): Likewise when issuing errors.
2728 (lookup_name_in_scope): Likewise.
2729 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2730 (best_macro_match): New typedef.
2731 (find_closest_macro_cpp_cb): New function.
2732 (lookup_name_fuzzy): New function.
2733 * c-parser.c: Include gcc-rich-location.h.
2734 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2735 (c_keyword_starts_typename): ...this new function.
2736 (c_parser_declaration_or_fndef): When issuing errors about
2737 missing "struct" etc, add a fixit. For other kinds of errors,
2738 attempt to provide a suggestion via lookup_name_fuzzy.
2739 (c_parser_parms_declarator): When looking ahead to detect typos in
2740 type names, also reject CPP_KEYWORD.
2741 (c_parser_parameter_declaration): When issuing errors about
2742 unknown type names, attempt to provide a suggestion via
2744 * c-tree.h (c_keyword_starts_typename): New prototype.
2746 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2749 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2750 c_common_type returns error_mark_node.
2752 2016-06-19 Martin Sebor <msebor@redhat.com>
2755 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2756 __alignof__ (expression).
2758 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2760 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2762 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2764 * c-typeck.c (build_component_ref): Simplify fixit code by
2765 using gcc_rich_location::add_fixit_misspelled_id.
2766 (set_init_label): Likewise.
2768 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2770 * c-parser.c (c_parser_initelt): Provide location of name for new
2771 location_t param of set_init_label.
2772 * c-tree.h (set_init_label): Add location_t param.
2773 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2774 param and use it when issuing error messages about unrecognized
2775 field names. Attempt to provide a fixit hint if appropriate,
2776 otherwise update the error message to provide the type name.
2778 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2781 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2784 2016-06-08 Martin Sebor <msebor@redhat.com>
2785 Jakub Jelinek <jakub@redhat.com>
2789 * c-typeck.c (convert_arguments): Don't promote last argument
2790 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2792 2016-06-08 Marek Polacek <polacek@redhat.com>
2795 * c-decl.c (grokdeclarator): Check TYPE_P.
2798 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2801 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2803 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2804 and structure element reference, capture the location of the
2805 element name token and pass it to build_component_ref.
2806 (c_parser_postfix_expression_after_primary): Likewise for
2807 structure element dereference.
2808 (c_parser_omp_variable_list): Likewise for
2809 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2810 * c-tree.h (build_component_ref): Add location_t param.
2811 * c-typeck.c (build_component_ref): Add location_t param
2812 COMPONENT_LOC. Use it, if available, when issuing hints about
2813 mispelled member names to provide a fixit replacement hint.
2815 2016-06-06 Marek Polacek <polacek@redhat.com>
2818 * c-parser.c (c_parser_direct_declarator): Set location.
2820 2016-06-06 Marek Polacek <polacek@redhat.com>
2822 * c-typeck.c (comptypes_internal): Handle comparisons of
2823 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2824 TYPE_REF_CAN_ALIAS_ALL.
2826 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2828 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2829 arguments as addressable when async clause exists.
2831 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2834 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2835 when combined with target construct.
2837 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2839 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2840 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2842 2016-05-25 Marek Polacek <polacek@redhat.com>
2845 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2848 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2850 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2852 * c-parser.c (c_parser_oacc_declare): Add support for
2853 GOMP_MAP_FIRSTPRIVATE_POINTER.
2854 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2855 argument with enum c_omp_region_type ort.
2856 (handle_omp_array_sections): Likewise. Update call to
2857 handle_omp_array_sections_1.
2858 (c_finish_omp_clauses): Add specific errors and warning messages for
2859 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2860 call to handle_omp_array_sections.
2862 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2864 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2866 2016-05-24 Richard Biener <rguenther@suse.de>
2870 * c-typeck.c (build_array_ref): Do not complain about indexing
2871 non-lvalue vectors. Adjust for function name change.
2873 2016-05-20 Martin Sebor <msebor@redhat.com>
2876 * c-typeck.c (error_init): Use
2877 expansion_point_location_if_in_system_header.
2878 (warning_init): Same.
2880 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2883 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2885 (c_parser_postfix_expression): Likewise.
2886 * c-tree.h (c_expr::set_error): New method.
2887 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2888 that result's range is initialized.
2890 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2892 * c-typeck.c (parser_build_unary_op): Fix formatting.
2894 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2896 * c-decl.c (grokdeclarator): Remove errmsg and use of
2897 targetm.invalid_return_type.
2898 (grokparms): Remove errmsg and use of
2899 targetm.invalid_parameter_type.
2901 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2903 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2904 function return type.
2906 2016-05-12 Marek Polacek <polacek@redhat.com>
2909 * c-decl.c (build_compound_literal): Pass LOC down to
2910 c_incomplete_type_error.
2911 * c-tree.h (require_complete_type): Adjust declaration.
2912 (c_incomplete_type_error): Likewise.
2913 * c-typeck.c (require_complete_type): Add location parameter, pass it
2914 down to c_incomplete_type_error.
2915 (c_incomplete_type_error): Add location parameter, pass it down to
2917 (build_component_ref): Pass location down to c_incomplete_type_error.
2918 (default_conversion): Pass location down to require_complete_type.
2919 (build_array_ref): Likewise.
2920 (build_function_call_vec): Likewise.
2921 (convert_arguments): Likewise.
2922 (build_unary_op): Likewise.
2923 (build_c_cast): Likewise.
2924 (build_modify_expr): Likewise.
2925 (convert_for_assignment): Likewise.
2926 (c_finish_omp_clauses): Likewise.
2928 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2931 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2933 * c-errors.c (pedwarn_c90): Return true if warned.
2934 * c-tree.h (pedwarn_c90): Change return type to bool.
2935 (enum c_declspec_word): Add new enumerator cdw_atomic.
2937 2016-05-11 Marek Polacek <polacek@redhat.com>
2940 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2941 diagnose_mismatched_attributes and call it.
2943 2016-05-10 Marek Polacek <polacek@redhat.com>
2946 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2947 on a declaration following the definition.
2949 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2951 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2952 parse it through to c_parser_c99_block_statement.
2953 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2956 2016-05-04 Marek Polacek <polacek@redhat.com>
2958 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2961 2016-05-04 Marek Polacek <polacek@redhat.com>
2964 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2965 for macro expansions.
2967 2016-05-03 Marek Polacek <polacek@redhat.com>
2970 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2971 check_builtin_function_arguments.
2973 2016-05-03 Richard Biener <rguenther@suse.de>
2975 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2976 the checksum from the previous stage.
2978 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2980 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2981 c_finish_omp_clauses.
2982 (c_parser_omp_all_clauses): Likewise.
2983 (c_parser_oacc_cache): Likewise.
2984 (c_parser_oacc_loop): Likewise.
2985 (omp_split_clauses): Likewise.
2986 (c_parser_omp_declare_target): Likewise.
2987 (c_parser_cilk_all_clauses): Likewise.
2988 (c_parser_cilk_for): Likewise.
2989 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2990 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2992 2016-05-02 Marek Polacek <polacek@redhat.com>
2995 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2998 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3001 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3002 OACC_LOOP_CLAUSE_MASK.
3003 (c_parser_oacc_kernels_parallel): Update call to
3004 c_oacc_split_loop_clauses.
3006 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3008 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3009 argument to build_modify_expr in two cases.
3011 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3013 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3014 warn_for_memset instead of warning directly here.
3016 2016-04-26 Marek Polacek <polacek@redhat.com>
3019 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3021 (c_parser_for_statement): ... here.
3022 (c_parser_if_statement): Use it.
3023 (c_parser_switch_statement): Use it.
3024 (c_parser_while_statement): Use it.
3027 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3029 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3032 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3033 instead of c_finish_cilk_clauses.
3034 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3035 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3036 floating-point variables in the linear clause for Cilk Plus.
3038 2016-04-18 Michael Matz <matz@suse.de>
3040 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3041 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3043 2016-04-15 Marek Polacek <polacek@redhat.com>
3046 * c-typeck.c (build_unary_op): Pass location down to error and
3049 2016-04-15 Jakub Jelinek <jakub@redhat.com>
3052 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3054 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3055 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3056 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3057 Adjust c_parser_pragma callers.
3058 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3060 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3062 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3063 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3064 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3065 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3066 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3067 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3068 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3069 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3071 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3072 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3075 2016-04-13 Marek Polacek <polacek@redhat.com>
3078 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3080 (c_parser_statement): Likewise.
3081 (c_parser_c99_block_statement): Likewise.
3082 (c_parser_while_statement): Likewise.
3083 (c_parser_for_statement): Likewise.
3084 (c_parser_if_body): Don't set IF_P here.
3085 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3086 about dangling else here.
3087 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3088 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3089 warn about dangling else here.
3091 2016-04-04 Marek Polacek <polacek@redhat.com>
3094 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3096 2016-03-31 Marek Polacek <polacek@redhat.com>
3099 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3101 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3104 * c-parser.c (c_parser_postfix_expression): Set the source range
3105 for uses of "__builtin_types_compatible_p".
3107 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3110 * c-typeck.c (composite_type): Don't count void_list_node
3111 into len, if the list is terminated by void_list_node, start
3112 with void_list_node instead of NULL for newargs. Stop
3115 2016-03-16 Marek Polacek <polacek@redhat.com>
3118 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3119 nested functions returning VM types.
3121 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3123 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3124 when calling c_finish_omp_clauses.
3126 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3129 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3132 2016-03-04 Marek Polacek <polacek@redhat.com>
3135 * c-parser.c (c_parser_postfix_expression): Call
3136 c_parser_cast_expression rather than c_parser_postfix_expression.
3138 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3142 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3143 of incomplete decls to error_mark_node.
3145 2016-02-24 Marek Polacek <polacek@redhat.com>
3148 * c-decl.c (finish_decl): Don't update the copy of the type of a
3149 different decl type.
3151 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3154 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3155 in id_kind reclassification.
3157 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3160 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3162 2016-02-16 James Norris <jnorris@codesourcery.com>
3165 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3167 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3169 * c-decl.c (build_null_declspecs): Zero the entire struct.
3172 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3173 callers changed. If nested_p is true, use it to call
3174 finish_implicit_inits.
3175 * c-tree.h (finish_implicit_inits): Declare.
3176 * c-typeck.c (finish_implicit_inits): New function. Move code
3178 (push_init_level): ... here.
3179 (set_designator, process_init_element): Call finish_implicit_inits.
3181 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3184 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3185 arguments for -Waddress warning.
3187 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3190 * c-decl.c (finish_enum): When honoring mode attribute,
3191 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3193 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3196 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3197 all type variants, not just TYPE_MAIN_VARIANT.
3199 2016-01-27 Jakub Jelinek <jakub@redhat.com>
3202 * c-decl.c (c_write_global_declarations_1): Warn with
3203 warn_unused_function if static prototype without definition
3206 2016-01-27 Marek Polacek <polacek@redhat.com>
3209 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3210 to unsigned, if needed. Add -Wsign-compare warning.
3212 2016-01-26 Jakub Jelinek <jakub@redhat.com>
3214 PR tree-optimization/69483
3215 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3217 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3220 * c-tree.h (incomplete_record_decls): Declare.
3221 * c-parser.c (incomplete_record_decls): Define.
3222 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3223 report error if any decl has zero size.
3224 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3225 or enum type to incomplete_record_decls.
3227 2016-01-14 Tom de Vries <tom@codesourcery.com>
3229 PR tree-optimization/68773
3230 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3233 2016-01-14 Marek Polacek <polacek@redhat.com>
3236 * c-decl.c (grokdeclarator): Provide more information for invalid
3239 2016-01-06 David Malcolm <dmalcolm@redhat.com>
3241 * c-parser.c (c_parser_unary_expression): For dereferences, build
3242 a combined location before calling build_indirect_ref, so that
3243 error reports cover the full range, manually updating the c_expr
3246 2016-01-06 Marek Polacek <polacek@redhat.com>
3249 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3250 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3253 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3255 Update copyright years.
3257 2016-01-04 Marek Polacek <polacek@redhat.com>
3260 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3261 optimization to use __atomic_fetch_* built-in if possible.
3263 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3265 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3267 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3270 2015-12-22 Marek Polacek <polacek@redhat.com>
3273 * c-typeck.c (build_component_ref): Warn when acessing elements of
3274 atomic structures or unions.
3276 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3278 * c-typeck.c: Include "gcc-rich-location.h".
3279 (build_binary_op): In the two places that call binary_op_error,
3280 create a gcc_rich_location and populate it with the location of
3281 the binary op and its two operands.
3283 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3285 * c-parser.c (c_parser_statement_after_labels): When calling
3286 c_finish_return, Use the return expression's location if it has
3287 one, falling back to the location of the first token within it.
3288 * c-typeck.c (c_finish_return): When issuing warnings about
3289 the incorrect presence/absence of a return value, issue a note
3290 showing the declaration of the function.
3292 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3294 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3296 (c_parser_peek_nth_token): New function.
3297 (c_parser_peek_conflict_marker): New function.
3298 (c_parser_error): Detect conflict markers and report them as such.
3300 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3302 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3303 to preserve range information for the primary expression
3304 in the call to c_parser_postfix_expression_after_primary.
3306 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3308 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3309 expression location, falling back on the first token location,
3310 rather than always using the latter.
3312 2015-12-16 Marek Polacek <polacek@redhat.com>
3315 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3318 2015-12-15 Marek Polacek <polacek@redhat.com>
3321 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3324 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3326 * c-parser.c (c_parser_alignof_expression): Capture location of
3327 closing parenthesis (if any), or of end of unary expression, and
3328 use it to build a src_range for the expression.
3330 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3333 * c-parser.c (c_parser_get_builtin_args): Add
3334 "out_close_paren_loc" param, and write back to it.
3335 (c_parser_postfix_expression): Capture the closing
3336 parenthesis location for RID_CHOOSE_EXPR,
3337 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3338 RID_BUILTIN_SHUFFLE and use it to set the source range
3339 for such expressions; within RID_BUILTIN_COMPLEX set
3340 the underlying location.
3342 2015-12-07 Marek Polacek <polacek@redhat.com>
3345 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3346 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3348 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3350 * c-tree.h (c_build_va_arg): Adjust prototype.
3351 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3352 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3353 parameter, adjust throughout and issue an error if EXPR is a component
3354 with reverse storage order.
3356 2015-12-02 Jason Merrill <jason@redhat.com>
3358 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3359 (c_fully_fold_internal, decl_constant_value_for_optimization):
3360 Move from c-common.c.
3361 * c-tree.h: Declare decl_constant_value_for_optimization.
3362 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3364 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3367 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3368 following link from declarator to next declarator. Track original
3369 qualified type and pass it to c_build_qualified_type.
3370 * c-typeck.c (c_build_qualified_type): Add arguments
3371 orig_qual_type and orig_qual_indirect.
3373 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3375 * c-parser.c (c_parser_omp_clause_name)
3376 (c_parser_oacc_all_clauses): Alphabetical sorting.
3378 2015-12-02 Jakub Jelinek <jakub@redhat.com>
3381 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3384 2015-12-01 Julian Brown <julian@codesourcery.com>
3385 Cesar Philippidis <cesar@codesourcery.com>
3386 James Norris <James_Norris@mentor.com>
3388 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3389 (c_parser_oacc_clause_use_device): New function.
3390 (c_parser_oacc_all_clauses): Add use_device support.
3391 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3392 (c_parser_oacc_host_data): New function.
3393 (c_parser_omp_construct): Add host_data support.
3394 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3395 * c-typeck.c (c_finish_oacc_host_data): New function.
3396 (c_finish_omp_clauses): Add use_device support.
3398 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3401 * c-decl.c: Set TYPE_PACKED in variants.
3403 2015-11-27 Martin Liska <mliska@suse.cz>
3406 * c-array-notation.c (fix_builtin_array_notation_fn):
3407 Use release_vec_vec instead of vec::release.
3408 (build_array_notation_expr): Likewise.
3409 (fix_conditional_array_notations_1): Likewise.
3410 (fix_array_notation_expr): Likewise.
3411 (fix_array_notation_call_expr): Likewise.
3413 2015-11-27 Jakub Jelinek <jakub@redhat.com>
3416 * c-parser.c (c_parser_compound_statement_nostart): If
3417 last_label is true, use pragma_stmt instead of pragma_compound
3418 as second c_parser_pragma argument.
3419 (c_parser_omp_ordered, c_parser_omp_target_update,
3420 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3421 false as second argument to c_parser_skip_to_pragma_eol after
3422 diagnosing standalone directives used in pragma_stmt context.
3424 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3426 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3427 with "if (ENABLE_OFFLOADING)".
3429 2015-11-23 David Malcolm <dmalcolm@redhat.com>
3432 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3433 for various Objective-C constructs: Class.name syntax,
3434 @selector(), @protocol(), @encode(), and [] message syntax.
3436 2015-11-20 David Malcolm <dmalcolm@redhat.com>
3439 * c-typeck.c (should_suggest_deref_p): New function.
3440 (build_component_ref): Special-case POINTER_TYPE when
3441 generating a "not a structure of union" error message, and
3442 suggest a "->" rather than a ".", providing a fix-it hint.
3444 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3446 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3447 candidate into a new function, find_closest_identifier.
3449 2015-11-19 Marek Polacek <polacek@redhat.com>
3452 * c-typeck.c (parser_build_binary_op): Properly handle
3453 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3455 2015-11-17 David Malcolm <dmalcolm@redhat.com>
3457 * c-parser.c (set_c_expr_source_range): Bulletproof both
3458 overloaded implementations against NULL expr->value.
3459 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3461 (c_parser_unary_expression): Likewise when handling addresses of
3463 (c_parser_postfix_expression): Likewise for statement expressions,
3464 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3465 __builtin_va_arg, and for __builtin_offset_of.
3466 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3467 src_range using the range of the braced initializer.
3468 (c_parser_transaction_expression): Set src_range for "ret" to a
3469 sane pair of values.
3471 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3473 * c-parser.c (c_finish_omp_declare_simd): Look for
3474 "simd" attribute as well. Update error message.
3476 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3478 * c-parser.c (c_parser_omp_declare_target): Adjust.
3480 2015-11-14 Jakub Jelinek <jakub@redhat.com>
3482 * c-typeck.c (c_finish_omp_clauses): Don't mark
3483 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3485 2015-11-14 Marek Polacek <polacek@redhat.com>
3487 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3488 * c-typeck.c: Likewise.
3490 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3492 * c-decl.c (warn_defaults_to): Pass line_table to
3494 * c-errors.c (pedwarn_c99): Likewise.
3495 (pedwarn_c90): Likewise.
3496 * c-parser.c (set_c_expr_source_range): New functions.
3497 (c_token::get_range): New method.
3498 (c_token::get_finish): New method.
3499 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3500 based on the range from the start of the LHS to the end of the
3502 (c_parser_conditional_expression): Likewise, based on the range
3503 from the start of the cond.value to the end of exp2.value.
3504 (c_parser_binary_expression): Call set_c_expr_source_range on
3505 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3506 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3507 based on the cast_loc through to the end of the expr.
3508 (c_parser_unary_expression): Likewise, based on the
3509 op_loc through to the end of op.
3510 (c_parser_sizeof_expression) Likewise, based on the start of the
3511 sizeof token through to either the closing paren or the end of
3513 (c_parser_postfix_expression): Likewise, using the token range,
3514 or from the open paren through to the close paren for
3515 parenthesized expressions.
3516 (c_parser_postfix_expression_after_primary): Likewise, for
3517 various kinds of expression.
3518 * c-tree.h (struct c_expr): Add field "src_range".
3519 (c_expr::get_start): New method.
3520 (c_expr::get_finish): New method.
3521 (set_c_expr_source_range): New decls.
3522 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3523 on ret for prefix unary ops.
3524 (parser_build_binary_op): Likewise, running from the start of
3525 arg1.value through to the end of arg2.value.
3527 2015-11-13 Marek Polacek <polacek@redhat.com>
3530 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3532 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3534 * c-typeck.c: Include spellcheck.h.
3535 (lookup_field_fuzzy_find_candidates): New function.
3536 (lookup_field_fuzzy): New function.
3537 (build_component_ref): If the field was not found, try using
3538 lookup_field_fuzzy and potentially offer a suggestion.
3540 2015-11-12 James Norris <jnorris@codesourcery.com>
3541 Joseph Myers <joseph@codesourcery.com>
3543 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3544 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3545 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3546 and PRAGMA_OMP_CLAUSE_LINK.
3547 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3548 and PRAGMA_OACC_CLAUSE_LINK.
3549 (OACC_DECLARE_CLAUSE_MASK): New definition.
3550 (c_parser_oacc_declare): New function.
3552 2015-11-12 Marek Polacek <polacek@redhat.com>
3555 * c-parser.c (c_parser_for_statement): Reclassify the token in
3558 2015-11-11 Marek Polacek <polacek@redhat.com>
3562 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3563 checking the size of an array.
3565 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3567 * c-array-notation.c: Remove unused header files.
3568 * c-aux-info.c: Likewise.
3569 * c-convert.c: Likewise.
3570 * c-decl.c: Likewise.
3571 * c-errors.c: Likewise.
3572 * c-lang.c: Likewise.
3573 * c-objc-common.c: Likewise.
3574 * c-parser.c: Likewise.
3575 * c-typeck.c: Likewise.
3576 * gccspec.c: Likewise.
3578 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3579 Cesar Philippidis <cesar@codesourcery.com>
3580 James Norris <jnorris@codesourcery.com>
3581 Julian Brown <julian@codesourcery.com>
3582 Nathan Sidwell <nathan@codesourcery.com>
3584 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3586 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3587 (c_parser_pragma): Parse 'acc routine'.
3588 (OACC_ROUTINE_CLAUSE_MARK): Define.
3589 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3591 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3594 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3595 location of the backward-goto to the start of the loop body.
3597 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3600 * c-parser.c (c_parser_while_statement): Finish the loop before
3601 parsing ahead for misleading indentation.
3602 (c_parser_for_statement): Likewise.
3604 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3606 * c-decl.c (finish_struct): If the structure has reverse storage
3607 order, rewrite the type of array fields with scalar component. Call
3608 maybe_apply_pragma_scalar_storage_order on entry.
3609 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3610 errors on bit-fields and reverse SSO here and not...
3611 (c_mark_addressable): ...here.
3612 (output_init_element): Adjust call to initializer_constant_valid_p.
3613 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3615 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3617 * c-decl.c (warn_defaults_to): Update for change in signature
3618 of diagnostic_set_info.
3619 * c-errors.c (pedwarn_c99): Likewise.
3620 (pedwarn_c90): Likewise.
3621 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3622 for textinfo::set_location.
3624 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3625 Thomas Schwinge <thomas@codesourcery.com>
3626 James Norris <jnorris@codesourcery.com>
3628 * c-parser.c (c_parser_omp_clause_name): Add support for
3629 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3630 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3631 default(none) in OpenACC.
3632 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3634 (c_parser_oacc_clause_tile): New function.
3635 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3636 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3637 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3639 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3640 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3642 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3643 (c_parser_oacc_update): Update the error message for missing clauses.
3644 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3645 and OMP_CLAUSE_INDEPENDENT.
3647 2015-11-05 Marek Polacek <polacek@redhat.com>
3650 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3651 deal with pre-evaluation on invalid types.
3653 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3654 Ilya Verbin <ilya.verbin@intel.com>
3656 * c-parser.c: Include context.h and gimple-expr.h.
3657 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3658 monotonic together with nonmonotonic.
3659 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3660 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3661 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3662 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3663 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3664 expressions on combined target teams before the target.
3665 (c_parser_omp_declare_target): If decl has "omp declare target" or
3666 "omp declare target link" attribute, and cgraph or varpool node already
3667 exists, then set corresponding flags. Call c_finish_omp_clauses
3668 in the parenthesized extended-list syntax case.
3669 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3671 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3672 on OMP_CLAUSE_REDUCTION array sections.
3673 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3674 into the constant offset, or for variable low-bound using
3675 POINTER_PLUS_EXPR. For structure element based array sections use
3676 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3677 (c_finish_omp_clauses): Drop generic_field_head, structure
3678 elements are now always mapped even as array section bases,
3679 diagnose same var in data sharing and mapping clauses. Diagnose if
3680 linear step on declare simd is neither a constant nor a uniform
3681 parameter. Look through POINTER_PLUS_EXPR for array section
3682 reductions. Diagnose the same var or function appearing multiple
3683 times on the same directive. Fix up wording for the to clause if t
3684 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3685 modifier on kinds other than dynamic or guided or nonmonotonic
3686 modifier together with ordered clause.
3688 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3689 Chung-Lin Tang <cltang@codesourcery.com>
3691 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3693 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3695 * c-array-notation.c: Reorder #include's and remove duplicates.
3696 * c-aux-info.c: Likewise.
3697 * c-convert.c: Likewise.
3698 * c-decl.c: Likewise.
3699 * c-errors.c: Likewise.
3700 * c-lang.c: Likewise.
3701 * c-objc-common.c: Likewise.
3702 * c-parser.c: Likewise.
3703 * c-typeck.c: Likewise.
3705 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3708 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3709 after calling build_qualified_type.
3711 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3712 Thomas Schwinge <thomas@codesourcery.com>
3713 James Norris <jnorris@codesourcery.com>
3714 Joseph Myers <joseph@codesourcery.com>
3715 Julian Brown <julian@codesourcery.com>
3716 Bernd Schmidt <bschmidt@redhat.com>
3718 * c-parser.c (c_parser_oacc_shape_clause): New.
3719 (c_parser_oacc_simple_clause): New.
3720 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3721 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3723 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3724 James Norris <jnorris@codesourcery.com>
3725 Cesar Philippidis <cesar@codesourcery.com>
3729 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3730 parameters, and handle these. Adjust all users.
3731 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3733 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3735 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3737 (c_finish_omp_construct): Declare function.
3738 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3739 Merge functions into...
3740 (c_finish_omp_construct): ... this new function.
3742 2015-10-22 Richard Biener <rguenther@suse.de>
3744 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3745 before folding a MINUS_EXPR.
3747 2015-10-21 Marek Polacek <polacek@redhat.com>
3750 * c-decl.c (start_function): Warn about vararg functions without
3753 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3755 * c-typeck.c (build_conditional_expr): Use boolean vector
3756 type for vector comparison.
3757 (build_vec_cmp): New.
3758 (build_binary_op): Use build_vec_cmp for comparison.
3760 2015-10-20 Marek Polacek <polacek@redhat.com>
3762 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3764 2015-10-20 Marek Polacek <polacek@redhat.com>
3767 * c-parser.c (c_parser_attributes): Break out of the loop if the
3768 token after an attribute isn't a comma.
3770 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3771 Aldy Hernandez <aldyh@redhat.com>
3773 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3774 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3775 (c_parser_omp_variable_list): Handle structure elements for
3776 map, to and from clauses. Handle array sections in reduction
3777 clause. Formatting fixes.
3778 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3779 if clause modifiers.
3780 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3781 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3782 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3783 c_parser_omp_clause_is_device_ptr): New functions.
3784 (c_parser_omp_clause_ordered): Parse optional parameter.
3785 (c_parser_omp_clause_reduction): Handle array reductions.
3786 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3787 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3789 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3790 (c_parser_omp_clause_depend_sink): New function.
3791 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3792 (c_parser_omp_clause_map): Parse release/delete map kinds and
3793 optional always modifier.
3794 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3795 and c_finish_omp_clauses callers.
3796 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3797 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3798 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3799 (OMP_CRITICAL_CLAUSE_MASK): Define.
3800 (c_parser_omp_critical): Parse critical clauses.
3801 (c_parser_omp_for_loop): Handle doacross loops, adjust
3802 c_finish_omp_for and c_finish_omp_clauses callers.
3803 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3804 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3805 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3806 (c_parser_omp_for): Disallow ordered clause when combined with
3807 distribute. Disallow linear clause when combined with distribute
3808 and not combined with simd.
3809 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3810 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3811 parse clauses and if depend clause is found, don't parse a body.
3812 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3813 Allow target parallel without for after it.
3814 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3815 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3816 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3818 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3819 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3820 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3821 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3823 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3824 defaultmap and is_device_ptr clauses.
3825 (c_parser_omp_target): Parse target parallel and target simd. Set
3826 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3827 and target exit data. Diagnose invalid map kinds.
3828 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3829 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3831 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3833 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3834 (c_parser_omp_taskloop): New function.
3835 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3836 handle PRAGMA_OMP_TASKLOOP.
3837 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3838 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3839 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3840 Add IS_OMP argument, handle structure element bases, diagnose
3841 bitfields, pass IS_OMP recursively, diagnose known zero length
3842 array sections in depend clauses, handle array sections in reduction
3843 clause, diagnose negative length even for pointers.
3844 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3845 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3846 array sections in reduction clause, set
3847 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3848 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3849 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3850 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3852 2015-10-06 Marek Polacek <polacek@redhat.com>
3854 * c-parser.c (c_parser_statement_after_labels): Use
3855 protected_set_expr_location.
3856 (c_parser_omp_clause_num_gangs): Likewise.
3857 (c_parser_omp_clause_num_threads): Likewise.
3858 (c_parser_omp_clause_num_workers): Likewise.
3859 (c_parser_omp_clause_vector_length): Likewise.
3860 (c_parser_omp_clause_num_teams): Likewise.
3861 (c_parser_omp_clause_thread_limit): Likewise.
3862 * c-typeck.c (build_c_cast): Likewise.
3863 (c_cast_expr): Likewise.
3865 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3867 * c-typeck.c (c_tree_equal): Use real_equal instead of
3870 2015-10-04 Jason Merrill <jason@redhat.com>
3872 * c-parser.c (c_lex_one_token): Handle @synchronized.
3873 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3874 can change whether the function is transaction_safe.
3876 2015-10-02 Marek Polacek <polacek@redhat.com>
3879 * c-typeck.c (convert_for_assignment): Use the expansion point
3880 location throughout.
3882 2015-10-02 Marek Polacek <polacek@redhat.com>
3885 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3886 and pass it down to c_parser_if_statement.
3887 (c_parser_else_body): Add CHAIN parameter and pass it down to
3888 c_parser_statement_after_labels.
3889 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3890 duplicated if-else-if conditions.
3892 2015-10-01 Marek Polacek <polacek@redhat.com>
3894 * c-typeck.c (convert_for_assignment): Improve commentary.
3896 2015-09-30 Marek Polacek <polacek@redhat.com>
3899 * c-typeck.c (c_finish_return): Use the expansion point location for
3900 certain "return with value" warnings.
3902 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3904 * c-parser.c (pragma_lex): Add loc argument.
3906 2015-09-15 Marek Polacek <polacek@redhat.com>
3909 * c-decl.c (tag_exists_p): New function.
3910 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3911 struct/union/enum keywords are missing.
3912 * c-tree.h (tag_exists_p): Declare.
3914 2015-09-15 Marek Polacek <polacek@redhat.com>
3916 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3917 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3918 Return NULL_TREE instead of 0.
3919 (lookup_name): Return NULL_TREE instead of 0.
3920 (lookup_name_in_scope): Likewise.
3921 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3922 (parser_xref_tag): Use false instead of 0.
3923 (start_struct): Use true instead of 1.
3924 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3926 2015-09-14 Marek Polacek <polacek@redhat.com>
3928 * c-typeck.c (set_nonincremental_init_from_string): Use
3929 HOST_WIDE_INT_M1U when shifting a negative value.
3931 2015-09-09 Mark Wielaard <mjw@redhat.com>
3933 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3936 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3939 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3940 into OMP_FOR_PRE_BODY rather than before the loop.
3942 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3945 * c-parser.c (c_parser_oacc_all_clauses,
3946 c_parser_omp_all_clauses): Remove invalid clause from
3947 list of clauses even if parser->error is set.
3950 * c-parser.c (c_parser_omp_clause_aligned,
3951 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3953 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3957 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3958 instead of c_parser_unary_expression. If the result is !lvalue_p,
3959 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3961 2015-09-04 Marek Polacek <polacek@redhat.com>
3964 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3966 2015-09-03 Martin Sebor <msebor@redhat.com>
3969 * c-typeck.c (convert_arguments, parser_build_unary_op,
3970 build_conditional_expr, c_cast_expr, convert_for_assignment,
3971 build_binary_op, _objc_common_truthvalue_conversion): Call
3973 (c_decl_implicit): Define.
3975 2015-09-02 Marek Polacek <polacek@redhat.com>
3978 * c-parser.c (c_parser_enum_specifier): Give a better error for
3981 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3983 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3985 2015-08-12 Marek Polacek <polacek@redhat.com>
3987 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3990 2015-08-03 Marek Polacek <polacek@redhat.com>
3993 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3995 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3997 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3999 * c-parser.c (c_parser_if_body): Take token_indent_info
4000 argument. Call warn_for_misleading_indentation even when the
4001 body is a semicolon. Extract token_indent_infos corresponding
4002 to the guard, body and next tokens. Adjust call to
4003 warn_for_misleading_indentation accordingly.
4004 (c_parser_else_body): Likewise.
4005 (c_parser_if_statement): Likewise.
4006 (c_parser_while_statement): Likewise.
4007 (c_parser_for_statement): Likewise.
4009 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4010 Manuel López-Ibáñez <manu@gcc.gnu.org>
4012 * c-decl.c (get_parm_info): Remove static var. Update warning
4015 2015-07-27 Marek Polacek <polacek@redhat.com>
4019 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4021 2015-07-20 Marek Polacek <polacek@redhat.com>
4024 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4025 (build_binary_op): Warn about left shift overflows.
4027 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4029 * c-array-notation.c: Adjust includes for flags.h changes.
4030 * c-objc-common.c: Likewise.
4032 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4034 * c-array-notation.c: Adjust includes.
4035 * c-aux-info.c: Likewise.
4036 * c-convert.c: Likewise.
4037 * c-decl.c: Likewise.
4038 * c-errors.c: Likewise.
4039 * c-lang.c: Likewise.
4040 * c-objc-common.c: Likewise.
4041 * c-parser.c: Likewise.
4042 * c-typeck.c: Likewise.
4044 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4047 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4049 2015-06-29 Marek Polacek <polacek@redhat.com>
4052 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4053 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4054 about -Wswitch-bool here.
4055 (do_case): Update c_add_case_label call.
4056 (c_finish_case): Update c_do_switch_warnings call.
4058 2015-06-27 Marek Polacek <polacek@redhat.com>
4060 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4062 2015-06-26 Marek Polacek <polacek@redhat.com>
4064 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4066 * c-typeck.c (array_to_pointer_conversion): Likewise.
4067 (build_unary_op): Likewise.
4068 (c_finish_return): Likewise.
4070 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4072 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4073 * c-parser.c: Likewise.
4075 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4077 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4078 instead of pointer_hash.
4079 (detect_field_duplicates): Likewise.
4081 2015-06-25 Marek Polacek <polacek@redhat.com>
4083 * c-array-notation.c: Use VAR_P throughout.
4084 * c-decl.c: Likewise.
4085 * c-objc-common.c: Likewise.
4086 * c-parser.c: Likewise.
4087 * c-typeck.c: Likewise.
4089 2015-06-25 Marek Polacek <polacek@redhat.com>
4091 * c-decl.c: Use is_global_var throughout.
4092 * c-parser.c: Likewise.
4093 * c-typeck.c: Likewise.
4095 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4097 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4098 * c-aux-info.c: Likewise.
4099 * c-convert.c: Likewise.
4100 * c-decl.c: Likewise.
4101 * c-errors.c: Likewise.
4102 * c-lang.c: Likewise.
4103 * c-objc-common.c: Likewise.
4104 * c-parser.c: Likewise.
4105 * c-typeck.c: Likewise.
4107 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4110 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4113 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4115 * c-decl.c (pop_scope): Register the main translation unit
4116 through the new debug hook.
4118 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4120 * c-array-notation.c : Adjust include files.
4121 * c-aux-info.c : Likewise.
4122 * c-convert.c : Likewise.
4123 * c-decl.c : Likewise.
4124 * c-errors.c : Likewise.
4125 * c-lang.c : Likewise.
4126 * c-lang.h : Likewise.
4127 * c-objc-common.c : Likewise.
4128 * c-parser.c : Likewise.
4129 * c-typeck.c : Likewise.
4131 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4133 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4134 immediately clobber it.
4135 (c_write_global_declarations_1): Remove call to
4136 check_global_declaration_1.
4137 (c_write_global_declarations_2): Remove.
4138 (c_write_final_cleanups): Rename from c_write_global_declarations.
4139 Remove call to finalize_compilation_unit.
4140 Remove calls to debugging hooks.
4141 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4142 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4143 * c-tree.h: Remove c_write_global_declarations.
4145 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4147 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4148 * c-aux-info.c: Likewise.
4149 * c-convert.c: Likewise.
4150 * c-decl.c: Likewise.
4151 * c-errors.c: Likewise.
4152 * c-lang.c: Likewise.
4153 * c-objc-common.c: Likewise.
4154 * c-parser.c: Likewise.
4155 * c-typeck.c: Likewise.
4157 2015-06-04 Marek Polacek <polacek@redhat.com>
4160 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4163 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4165 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4166 Warn for empty struct.
4167 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4169 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4171 * c-decl.c (start_function): Call plugin before parsing.
4172 (finish_function): Call plugin after parsing.
4174 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4177 * c-decl.c (merge_decls): Merge DECL_COMMON.
4179 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4181 * Make-lang.in (check_gcc_pallelize): Define.
4183 2015-05-22 Marek Polacek <polacek@redhat.com>
4186 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4189 2015-05-21 Marek Polacek <polacek@redhat.com>
4191 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4194 2015-05-20 Marek Polacek <polacek@redhat.com>
4196 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4197 * c-typeck.c: Likewise.
4199 2015-05-19 Marek Polacek <polacek@redhat.com>
4201 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4203 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4206 * c-parser.c (c_parser_omp_for_loop): Don't add
4207 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4208 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4209 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4212 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4214 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4217 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4220 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4223 2015-05-14 Marek Polacek <polacek@redhat.com>
4227 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4230 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4232 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4233 to add a call to warn_for_misleading_indentation.
4234 (c_parser_else_body): Likewise, adding param "else_loc".
4235 (c_parser_if_statement): Check for misleading indentation.
4236 (c_parser_while_statement): Likewise.
4237 (c_parser_for_statement): Likewise.
4239 2015-05-08 Marek Polacek <polacek@redhat.com>
4242 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4243 (output_init_element): Likewise.
4245 2015-05-07 Marek Polacek <polacek@redhat.com>
4248 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4251 2015-04-30 Marek Polacek <polacek@redhat.com>
4253 * c-typeck.c (set_init_label): Call error_at instead of error and
4256 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4259 * c-typeck.c (c_build_va_arg): Clarify the error message.
4261 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4263 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4264 OMP_STANDALONE_CLAUSES.
4266 2015-04-28 Marek Polacek <polacek@redhat.com>
4268 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4270 2015-04-28 Marek Polacek <polacek@redhat.com>
4273 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4275 2015-04-25 Marek Polacek <polacek@redhat.com>
4278 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4281 2015-04-23 Marek Polacek <polacek@redhat.com>
4284 * c-decl.c (set_labels_context_r): New function.
4285 (store_parm_decls): Call it via walk_tree_without_duplicates.
4286 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4287 instead of create_tmp_var. Build TARGET_EXPR instead of
4289 (build_atomic_assign): Use create_tmp_var_raw instead of
4290 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4292 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4294 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4295 (c_parser_omp_target_update): Add missed %> to error_at ().
4297 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4300 * c-decl.c (c_default_pointer_mode): Remove definition.
4301 * c-tree.h (c_default_pointer_mode): Remove declaration.
4303 2015-03-27 Tobias Burnus <burnus@net-b.de>
4306 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4308 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4309 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4310 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4312 2015-03-19 Jakub Jelinek <jakub@redhat.com>
4314 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4315 attribute for DECL_EXTERNAL VAR_DECLs.
4317 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4319 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4322 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4325 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4326 before preparing arguments to warn_logical_not_parentheses.
4328 2015-03-09 Jakub Jelinek <jakub@redhat.com>
4331 * c-typeck.c (parser_build_binary_op): Don't warn for
4332 !!x == y or !b == y where b is _Bool.
4334 2015-03-09 Marek Polacek <polacek@redhat.com>
4336 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4337 * c-decl.c (grokdeclarator): Likewise.
4338 * c-typeck.c (build_binary_op): Likewise.
4340 2015-02-27 Marek Polacek <polacek@redhat.com>
4343 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4345 2015-02-14 Marek Polacek <polacek@redhat.com>
4348 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4349 declared through a typedef name.
4351 2015-02-13 Marek Polacek <polacek@redhat.com>
4354 * c-decl.c (grokdeclarator): Print also the type when giving
4355 the error message about array's incomplete element type.
4357 2015-02-11 Jakub Jelinek <jakub@redhat.com>
4360 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4361 check in the POP macro.
4363 2015-02-09 Marek Polacek <polacek@redhat.com>
4366 * c-typeck.c (process_init_element): Don't always wrap
4367 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4368 initializing a range of elements.
4370 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4374 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4376 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
4378 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4379 processing enum declaration.
4381 2015-01-29 Marek Polacek <polacek@redhat.com>
4384 * c-typeck.c (pop_init_level): If constructor_elements has
4385 exactly one element with integer_zerop value, set constructor_zeroinit
4386 to 1. Remove braces around warning_init call.
4388 2015-01-27 Jakub Jelinek <jakub@redhat.com>
4391 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4392 of FUNCTION_DECLs with error_mark_node.
4394 2015-01-26 Jakub Jelinek <jakub@redhat.com>
4397 * c-typeck.c (convert_arguments): Return -1 if there are
4398 error_args, even if we've diagnosed too many arguments.
4400 2015-01-21 Richard Biener <rguenther@suse.de>
4403 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4404 for builtins the user declared correctly.
4406 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4407 Bernd Schmidt <bernds@codesourcery.com>
4408 Cesar Philippidis <cesar@codesourcery.com>
4409 James Norris <jnorris@codesourcery.com>
4410 Jakub Jelinek <jakub@redhat.com>
4411 Ilmir Usmanov <i.usmanov@samsung.com>
4413 * c-parser.c: Include "gomp-constants.h".
4414 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4415 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4416 Use OMP_CLAUSE_SET_MAP_KIND.
4417 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4418 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4419 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4420 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4421 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4422 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4423 "copyout", "create", "delete", "deviceptr", "gang", "host",
4424 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4425 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4426 "present_or_create", "pcreate", "seq", "self", "vector",
4427 "vector_length", "wait", "worker".
4428 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4429 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4430 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4431 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4432 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4433 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4434 (c_parser_oacc_data_clause_deviceptr)
4435 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4436 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4437 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4438 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4439 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4440 (c_parser_oacc_parallel, c_parser_oacc_update)
4441 (c_parser_oacc_wait): New functions.
4442 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4443 (c_finish_oacc_data): New prototypes.
4444 * c-typeck.c: Include "gomp-constants.h".
4445 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4446 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4447 OMP_CLAUSE_SET_MAP_KIND.
4448 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4449 (c_finish_oacc_data): New functions.
4450 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4451 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4452 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4453 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4454 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4455 GOMP_MAP_FORCE_DEVICEPTR.
4457 2015-01-09 Michael Collison <michael.collison@linaro.org>
4459 * c-array-notation.c: Include hash-set.h, machmode.h,
4460 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4461 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4462 * c-aux-info.c: Ditto.
4463 * c-convert.c: Ditto.
4465 * c-errors.c: Ditto.
4466 * c-lang.c: Dittoxs.
4467 * c-objc-common.c: Ditto.
4468 * c-parser.c: Ditto.
4469 * c-typeck.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, inchash.h, real.h and
4472 fixed-value.h due to flattening of tree.h.
4474 2015-01-07 Marek Polacek <polacek@redhat.com>
4477 * c-typeck.c (process_init_element): Disallow initialization of
4478 a flexible array member with a string constant if the structure
4481 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4484 * c-typeck.c (convert_for_assignment, c_finish_return): For
4485 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4486 types also set in_late_binary_op around convert call.
4487 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4488 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4489 result on expr as last argument to ubsan_instrument_float_cast,
4490 if in_late_binary_op, don't use c_save_expr but save_expr.
4492 Update copyright years.
4494 2015-01-05 Marek Polacek <polacek@redhat.com>
4497 * c-typeck.c (build_array_ref): Pass loc down to
4498 warn_array_subscript_with_type_char.
4500 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4502 * c-typeck.c: New behavious for pointers to arrays with qualifiers
4503 (common-pointer-type): For pointers to arrays take qualifiers from
4505 (build_conditional_expr): Add warnings for lost qualifiers.
4506 (comp-target-types): Allow pointers to arrays with different qualifiers.
4507 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4508 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4509 to PEDWARN_FOR_QUALIFIERS.
4511 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4514 * c-convert.c: Include ubsan.h.
4515 (convert): For real -> integral casts and
4516 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4517 instead instrument the float cast directly.
4519 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4521 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4522 c_finish_stmt_expr): Remove NULL last argument from
4523 create_tmp_var_raw and create_tmp_var calls.
4524 * c-array-notation.c (fix_builtin_array_notation_fn,
4525 build_array_notation_expr, fix_conditional_array_notations_1,
4526 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4528 2014-11-28 Marek Polacek <polacek@redhat.com>
4531 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4532 convert the right operand to integer type.
4534 2014-11-25 Marek Polacek <polacek@redhat.com>
4537 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4538 for inline functions.
4540 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4543 * c-typeck.c (build_array_ref): Adjust
4544 convert_vector_to_pointer_for_subscript caller. If it returns true,
4545 call non_lvalue_loc on the result.
4547 2014-11-11 Richard Biener <rguenther@suse.de>
4549 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4552 2014-11-10 Andi Kleen <ak@linux.intel.com>
4555 * c-parser.c (c_parser_statement_after_labels): Call
4557 (c_parser_if_statement): Dito.
4558 (c_parser_switch_statement): Dito.
4559 (c_parser_while_statement): Dito.
4560 (c_parser_do_statement): Dito.
4561 (c_parser_for_statement): Dito.
4562 * c-typeck.c (c_finish_loop): Dito.
4564 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4566 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4567 OPT_Wshift_count_overflow in the warnings.
4569 2014-10-30 Marek Polacek <polacek@redhat.com>
4571 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4572 print the stripped version as well, if they're not the same.
4574 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4576 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4579 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4581 * c-decl.c: Adjust include files.
4582 * c-parser.c: Ditto.
4584 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4585 Tom Tromey <tromey@redhat.com>
4587 * c-tree.h (enum c_oracle_request): New.
4588 (c_binding_oracle_function): New typedef.
4589 (c_binding_oracle, c_pushtag, c_bind): Declare.
4590 * c-decl.c (c_binding_oracle): New global.
4591 (I_SYMBOL_CHECKED): New macro.
4592 (i_symbol_binding): New function.
4593 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4594 (I_TAG_CHECKED): New macro.
4595 (i_tag_binding): New function.
4596 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4597 (I_LABEL_CHECKED): New macro.
4598 (i_label_binding): New function.
4599 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4600 (c_print_identifier): Save and restore c_binding_oracle.
4601 (c_pushtag, c_bind): New functions.
4603 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4605 * c-typeck.c: Adjust include files.
4607 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4610 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4611 initialization here...
4612 (c_initialize_diagnostics): ... but here. Set defaults after
4613 building pretty-printer.
4615 2014-10-23 Marek Polacek <polacek@redhat.com>
4618 * c-decl.c (pop_scope): Don't print warning in external_scope.
4620 2014-10-19 Marek Polacek <polacek@redhat.com>
4623 * c-typeck.c (output_init_element): Allow initializing objects with
4624 static storage duration with compound literals even in C99 and add
4627 2014-10-17 Marek Polacek <polacek@redhat.com>
4630 * c-typeck.c (digest_init): Allow initializing objects with static
4631 storage duration with compound literals even in C99 and add pedwarn
4634 2014-10-17 Marek Polacek <polacek@redhat.com>
4637 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4638 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4639 error multiple times. Print the type.
4641 2014-10-17 Marek Polacek <polacek@redhat.com>
4644 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4647 2014-10-17 Marek Polacek <polacek@redhat.com>
4649 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4650 (start_function): Use OPT_Wimplicit_int instead of 0.
4651 (store_parm_decls_oldstyle): Likewise.
4653 2014-10-17 Alan Modra <amodra@gmail.com>
4656 * c-decl.c (merge_decls): Don't merge section name or tls model
4657 to newdecl symtab node, instead merge to olddecl. Override
4658 existing olddecl section name. Set tls_model for all thread-local
4659 vars, not just OMP thread-private ones. Remove incorrect comment.
4661 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4663 * c-decl.c: Adjust include files.
4665 2014-10-14 DJ Delorie <dj@redhat.com>
4667 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4668 (c_token_starts_typename): Check all __intN, not just __int128.
4669 (c_token_starts_declspecs): Likewise.
4670 (c_parser_declspecs): Likewise.
4671 (c_parser_attribute_any_word): Likewise.
4672 (c_parser_objc_selector): Likewise.
4673 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4674 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4676 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4678 (finish_declspecs): Likewise.
4680 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4682 * c-parser.c (c_parser_all_labels): New function to replace
4684 (c_parser_statement): Call the new function.
4686 2014-10-09 Marek Polacek <polacek@redhat.com>
4689 * c-typeck.c (pop_init_level): Don't warn about initializing
4692 2014-10-07 Marek Polacek <polacek@redhat.com>
4695 * c-decl.c (header_for_builtin_fn): New function.
4696 (implicitly_declare): Suggest which header to include.
4698 2014-10-07 Marek Polacek <polacek@redhat.com>
4700 * c-convert.c (convert): Use error_operand_p.
4701 * c-typeck.c (require_complete_type): Likewise.
4702 (really_atomic_lvalue): Likewise.
4703 (digest_init): Likewise.
4704 (handle_omp_array_sections_1): Likewise.
4706 2014-10-03 Marek Polacek <polacek@redhat.com>
4709 * c-decl.c (pop_scope): Don't warn about "inline function declared
4710 but never defined" for functions marked with gnu_inline attribute.
4712 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4715 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4716 on low_bound and length.
4718 2014-09-24 Marek Polacek <polacek@redhat.com>
4722 * c-parser.c: Don't define CPP_KEYWORD.
4723 (c_parser_switch_statement): Pass original type to c_finish_case.
4724 * c-tree.h (c_finish_case): Update declaration.
4725 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4726 conditionally to c_do_switch_warnings.
4728 2014-09-03 Marek Polacek <polacek@redhat.com>
4731 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4734 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4735 Balaji V. Iyer <balaji.v.iyer@intel.com>
4736 Igor Zamyatin <igor.zamyatin@intel.com>
4738 * c-parser.c (c_parser_cilk_for): New function.
4739 (c_parser_cilk_grainsize): Likewise.
4740 (c_get_temp_regvar): Likewise.
4741 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4742 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4743 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4744 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4747 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4749 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4750 with using HOST_WIDE_INT without truncation to 'int'
4752 2014-08-22 Marek Polacek <polacek@redhat.com>
4755 * c-typeck.c (parser_build_binary_op): Adjust call to
4756 warn_logical_not_parentheses.
4758 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4761 * c-parser.c (c_parser_array_notation): Check for correct
4762 type of an array added.
4764 2014-08-19 Marek Polacek <polacek@redhat.com>
4767 * c-typeck.c (build_binary_op): If either operand of a comparison
4768 is a boolean expression, call maybe_warn_bool_compare.
4770 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4773 * c-typeck.c (build_c_cast): Do a conversion even when the
4774 TYPE_MAIN_VARIANTs are the same.
4776 2014-08-19 Marek Polacek <polacek@redhat.com>
4778 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4779 pedwarn_c99 instead of pedwarn.
4780 (grokfield): Likewise.
4781 (warn_defaults_to): New function.
4782 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4783 Unconditionally call pedwarn_c99 instead of pedwarn.
4784 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4785 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4786 check flag_isoc11 before.
4787 * c-errors.c (pedwarn_c99): Change the return type to bool.
4788 Handle -Wc99-c11-compat.
4789 * c-parser.c (disable_extension_diagnostics): Handle
4790 warn_c99_c11_compat.
4791 (restore_extension_diagnostics): Likewise.
4792 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4793 instead of pedwarn, don't check flag_isoc11 before.
4794 (c_parser_declspecs): Likewise.
4795 (c_parser_alignas_specifier): Likewise.
4796 (c_parser_alignof_expression): Likewise.
4797 (c_parser_generic_selection): Likewise.
4798 * c-tree.h (pedwarn_c99): Update declaration.
4799 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4802 2014-08-19 Marek Polacek <polacek@redhat.com>
4804 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4806 * c-errors.c: Include "opts.h".
4807 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4808 * c-parser.c (disable_extension_diagnostics): Handle negative value
4809 of warn_c90_c99_compat, too.
4810 (restore_extension_diagnostics): Likewise.
4811 (c_parser_compound_statement_nostart): Pass
4812 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4814 2014-08-12 Marek Polacek <polacek@redhat.com>
4816 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4818 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4820 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4822 2014-08-10 Marek Polacek <polacek@redhat.com>
4825 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4826 Call pedwarn_c90 instead of pedwarn.
4827 (check_bitfield_type_and_width): Likewise.
4828 (declspecs_add_qual): Likewise.
4829 (declspecs_add_type): Likewise.
4830 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4831 Adjust to only call pedwarn_c90.
4832 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4833 pedwarn_c90 instead of pedwarn.
4834 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4835 * c-parser.c (disable_extension_diagnostics): Handle
4836 warn_c90_c99_compat.
4837 (restore_extension_diagnostics): Likewise.
4838 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4839 pedwarn_c90 instead of pedwarn.
4840 (c_parser_initelt): Likewise.
4841 (c_parser_postfix_expression): Likewise.
4842 (c_parser_postfix_expression_after_paren_type): Likewise.
4843 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4844 * c-tree.h: Fix formatting.
4845 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4846 pedwarn_c90 instead of pedwarn.
4848 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4850 * c-typeck.c: Remove include of pointer-set.h.
4852 2014-08-07 Marek Polacek <polacek@redhat.com>
4854 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4856 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4858 * c-typeck.c: Use hash_map instead of pointer_map.
4860 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4862 * c-decl.c: Use hash_set instead of pointer_set.
4864 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4867 * c-array-notation.c (expand_array_notations): Handling
4870 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4873 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4876 2014-07-30 Tom Tromey <tromey@redhat.com>
4878 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4880 (really_start_incremental_init, push_init_level): Initialize
4882 (pop_init_level): Set global designator_depth.
4883 (process_init_element): Check for designated_init attribute.
4885 2014-07-20 Marek Polacek <polacek@redhat.com>
4888 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4889 (implicitly_declare): Pass location to implicit_decl_warning.
4891 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4894 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4895 If non-NULL, call c_parser_check_literal_zero.
4896 (c_parser_check_literal_zero): New function.
4897 (c_parser_postfix_expression_after_primary): Adjust
4898 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4900 2014-07-06 Marek Polacek <polacek@redhat.com>
4903 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4904 * c-tree.h (C_ARRAY_PARAMETER): Define.
4905 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4908 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4909 Chen Gang <gang.chen.5i5j@gmail.com>
4911 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4914 2014-07-01 Marek Polacek <polacek@redhat.com>
4916 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4917 instead of 0 to WARN_FOR_ASSIGNMENT.
4919 2014-07-01 Marek Polacek <polacek@redhat.com>
4922 * c-typeck.c (convert_for_assignment): Pass
4923 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4925 2014-06-30 Marek Polacek <polacek@redhat.com>
4927 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4928 has no_sanitize_undefined attribute.
4930 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4933 * c-array-notation.c (fix_builtin_array_notation_fn):
4934 Check for 0 arguments in builtin call. Check that bultin argument is
4936 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4939 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4941 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4942 qualifiers in __auto_type for atomic types.
4943 (c_parser_typeof_specifier): Discard all type qualifiers in
4944 __typeof__ for atomic types.
4946 2014-06-25 Marek Polacek <polacek@redhat.com>
4949 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4950 the return expression to c_finish_return.
4952 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4954 * c-typeck.c (c_finish_omp_clauses): Make sure
4955 OMP_CLAUSE_LINEAR_STEP has correct type.
4957 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4961 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4963 * c-parser.c (c_parser_omp_for_loop): For
4964 #pragma omp parallel for simd move lastprivate clause from parallel
4965 to for rather than simd.
4967 2014-06-23 Marek Polacek <polacek@redhat.com>
4969 * c-typeck.c (parser_build_binary_op): Don't call
4970 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4972 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4974 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4975 * c-decl.c (merge_decls): Likewise.
4977 2014-06-09 Marek Polacek <polacek@redhat.com>
4980 * c-typeck.c (error_init): Call inform instead of error_at.
4981 (pedwarn_init): Call inform instead of pedwarn.
4982 (warning_init): Call inform instead of warning_at.
4984 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4986 * c-decl.c (merge_decls): Use set_decl_section_name.
4987 (duplicate_decls): Remove node if it exists.
4989 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4992 * c-typeck.c (push_init_level, process_init_element,
4993 pop_init_level): Correct check for zero initialization, move
4994 missing brace warning to respect zero initialization.
4996 2014-06-05 Marek Polacek <polacek@redhat.com>
4999 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5001 2014-06-05 Marek Polacek <polacek@redhat.com>
5004 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5005 on the left hand side operand of a comparison.
5007 2014-06-05 Marek Polacek <polacek@redhat.com>
5010 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5011 Print note only if the warning was printed.
5013 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5016 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5019 2014-06-03 Marek Polacek <polacek@redhat.com>
5022 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5024 * c-tree.h (c_start_case): Update.
5025 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5026 switch condition has boolean value.
5028 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
5030 * c-decl.c: Include builtins.h.
5031 * c-parser.c: Likewise.
5033 2014-05-27 Marek Polacek <polacek@redhat.com>
5036 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5037 error and warning calls to error_at and warning_at. Pass location of
5038 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5039 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5040 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5042 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5045 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5046 function parameters.
5048 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
5050 * c-decl.c (merge_decls): Preserve symtab node pointers.
5051 (duplicate_decls): Free new decl.
5053 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5055 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5058 * c-parser.c (c_parser_omp_target): Return bool values.
5060 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5062 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5063 num_teams_loc variable to num_thread_limit_loc.
5065 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5067 * c-array-notation.c (expand_array_notations): Use void_node
5068 instead of void_zero_node.
5070 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5072 * c-decl.c (finish_struct): Adjust.
5073 (finish_enum): Likewise.
5075 (record_inline_static): Likewise.
5076 (push_scope): Likewise.
5077 (make_label): Likewise.
5078 (lookup_label_for_goto): Likewise.
5079 (finish_struct): Likewise.
5080 (finish_enum): Likewise.
5081 (store_parm_decls): Likewise.
5082 (c_push_function_context): Likewise.
5083 * c-lang.h: Remove usage of variable_size gty attribute.
5084 * c-parser.c (c_parse_init): Adjust.
5085 (c_parse_file): Likewise.
5087 2014-05-13 Marek Polacek <polacek@redhat.com>
5090 * c-typeck.c (convert_for_assignment): Pass location to
5091 WARN_FOR_ASSIGNMENT instead of input_location.
5093 2014-05-10 Marek Polacek <polacek@redhat.com>
5095 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5096 maybe_warn_string_init.
5097 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5098 maybe_warn_string_init.
5099 * c-tree.h (maybe_warn_string_init): Update declaration.
5100 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5101 Call pedwarn_init with loc instead of with input_location.
5102 (digest_init): Pass init_loc to maybe_warn_string_init.
5103 (pop_init_level): Call pedwarn_init with loc instead of with
5105 (set_init_index): Likewise.
5106 (process_init_element): Likewise.
5108 2014-05-09 Marek Polacek <polacek@redhat.com>
5111 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5112 (c_parser_initelt): Pass location to set_init_label. Pass array index
5113 location to set_init_index.
5114 * c-tree.h (push_init_level): Update declaration.
5115 (pop_init_level): Likewise.
5116 (set_init_index): Likewise.
5117 (set_init_label): Likewise.
5118 * c-typeck.c (error_init): Add location parameter. Call error_at
5120 (digest_init): Pass init_loc to error_init.
5121 (really_start_incremental_init):
5122 (push_init_level): Add location parameter. Pass loc to pop_init_level
5124 (pop_init_level): Likewise.
5125 (set_designator): Add location parameter. Pass loc to pop_init_level,
5126 push_init_level, and error_init.
5127 (set_init_index): Add location parameter. Pass loc to error_init and
5129 (set_init_label): Likewise.
5130 (output_init_element): Pass loc to error_init.
5131 (process_init_element): Pass loc to error_init, pop_init_level,
5132 pedwarn_init, and push_init_level.
5134 2014-05-09 Marek Polacek <polacek@redhat.com>
5137 * c-parser.c (c_parser_attributes): Parse the arguments as an
5138 expression-list if the attribute takes identifier.
5140 2014-05-08 Marek Polacek <polacek@redhat.com>
5143 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5146 2014-05-08 Marek Polacek <polacek@redhat.com>
5149 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5152 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5153 Mike Stump <mikestump@comcast.net>
5154 Richard Sandiford <rdsandiford@googlemail.com>
5156 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5157 (finish_enum): Use wide-int interfaces.
5158 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5159 * c-typeck.c (build_c_cast): Likewise.
5160 (set_nonincremental_init_from_string): Likewise.
5161 (c_tree_equal): Likewise.
5163 2014-05-02 Marek Polacek <polacek@redhat.com>
5166 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5167 Return size_one_node when the type is not complete.
5168 (pointer_diff): Remove comment.
5169 (build_unary_op): Improve error messages.
5171 2014-05-02 Marek Polacek <polacek@redhat.com>
5173 * c-typeck.c (c_finish_return): Separate warning_at calls.
5175 2014-05-02 Marek Polacek <polacek@redhat.com>
5177 * c-tree.h (error_init): Remove declaration.
5178 (pedwarn_init): Likewise.
5179 * c-typeck.c (error_init): Make static and move above.
5180 (pedwarn_init): Likewise.
5181 (warning_init): Move above.
5182 (maybe_warn_string_init): Likewise.
5184 2014-05-01 Jeff Law <law@redhat.com>
5188 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5189 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5192 2014-05-02 Marek Polacek <polacek@redhat.com>
5195 * c-typeck.c (push_init_level): Set constructor_designated to
5196 p->designated for structures.
5198 2014-05-01 Marek Polacek <polacek@redhat.com>
5201 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5202 function-definition has an attribute after the declarator.
5204 2014-05-01 Marek Polacek <polacek@redhat.com>
5207 * c-typeck.c (warning_init): Add location_t parameter. Call
5208 warning_at instead of warning.
5209 (push_init_level): Pass input_location to warning_init.
5210 (add_pending_init): Add location_t parameter. Pass loc to
5212 (set_nonincremental_init): Pass input_location to add_pending_init.
5213 (set_nonincremental_init_from_string): Likewise.
5214 (output_init_element): Pass loc to warning_init and to
5217 2014-05-01 Marek Polacek <polacek@redhat.com>
5220 * c-typeck.c (c_finish_return): Distinguish between label and variable
5221 when warning about returning local address.
5223 2014-05-01 Marek Polacek <polacek@redhat.com>
5226 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5229 2014-05-01 Marek Polacek <polacek@redhat.com>
5232 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5233 instead of 0 to WARN_FOR_QUALIFIERS.
5235 2014-05-01 Marek Polacek <polacek@redhat.com>
5238 * c-typeck.c (default_conversion): Use better location for
5241 2014-04-30 Marek Polacek <polacek@redhat.com>
5243 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5244 also when SANITIZE_FLOAT_DIVIDE is on.
5246 2014-04-30 Marek Polacek <polacek@redhat.com>
5249 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5250 and pedwarn_init. Use loc insted of input_location.
5252 2014-04-30 Marek Polacek <polacek@redhat.com>
5255 * c-typeck.c (build_binary_op): Use location when warning about
5258 2014-04-25 Marek Polacek <polacek@redhat.com>
5261 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5262 always_inline/noinline and hot/cold attributes.
5264 2014-04-25 Marek Polacek <polacek@redhat.com>
5267 * c-parser.c (c_parser_initelt): Pass input_location to
5268 process_init_element.
5269 (c_parser_initval): Pass loc to process_init_element.
5270 * c-tree.h (process_init_element): Adjust declaration.
5271 * c-typeck.c (push_init_level): Pass input_location to
5272 process_init_element.
5273 (pop_init_level): Likewise.
5274 (set_designator): Likewise.
5275 (output_init_element): Add location_t parameter. Pass loc to
5277 (output_pending_init_elements): Pass input_location to
5278 output_init_element.
5279 (process_init_element): Add location_t parameter. Pass loc to
5280 output_init_element.
5282 2014-04-24 Jakub Jelinek <jakub@redhat.com>
5284 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5285 atomic-clause, allow comma in between atomic-clause and
5288 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5291 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5292 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5294 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5297 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5298 create_tmp_var instead build_decl for creating temps.
5299 (build_array_notation_expr): Likewise.
5300 (fix_conditional_array_notations_1): Likewise.
5301 (fix_array_notation_expr): Likewise.
5302 (fix_array_notation_call_expr): Likewise.
5304 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5307 * c-tree.h (c_build_function_call_vec): New prototype.
5308 * c-typeck.c (build_function_call_vec): Don't call
5309 resolve_overloaded_builtin here.
5310 (c_build_function_call_vec): New wrapper function around
5311 build_function_call_vec. Call resolve_overloaded_builtin here.
5312 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5313 Call c_build_function_call_vec instead of build_function_call_vec.
5314 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5315 * c-decl.c (finish_decl): Likewise.
5317 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5320 * c-typeck.c: Use correct format string in cast-qual warning
5322 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5324 * c-decl.c (c_decl_attributes): Use
5325 lang_hooks.types.omp_mappable_type.
5326 * c-typeck.c (c_finish_omp_clauses): Likewise.
5328 2014-03-06 Marek Polacek <polacek@redhat.com>
5331 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5332 of checking tree code.
5334 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5336 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5337 (c_parser_parameter_declaration): Likewise.
5339 2014-02-19 Marek Polacek <polacek@redhat.com>
5342 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5343 Call mark_exp_read on exp.value.
5344 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5345 TREE_ADDRESSABLE on old instead of val.
5346 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5348 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5350 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5351 C_EXPR_APPEND by vec_safe_push.
5352 * c-tree.h (C_EXPR_APPEND): Remove.
5354 2014-01-31 Marek Polacek <polacek@redhat.com>
5357 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5358 build_function_call_vec.
5359 (build_function_call): Likewise.
5360 (build_atomic_assign): Likewise.
5361 (build_function_call_vec): Add arg_loc parameter. Use it.
5362 (convert_arguments): Likewise.
5363 (convert_for_assignment): Rename rhs_loc to expr_loc.
5364 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5365 (c_parser_objc_keywordexpr): Likewise.
5366 (c_parser_postfix_expression_after_primary): Call
5367 build_function_call_vec with expr_loc rather than op_loc.
5368 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5369 build_function_call_vec.
5370 (c_parser_expr_list): Add locations parameter. Fill it with locations
5371 of function arguments.
5372 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5374 2014-01-30 Marek Polacek <polacek@redhat.com>
5377 * c-typeck.c (build_function_call_vec): Use loc parameter.
5378 (convert_arguments): Add location parameter. Use it.
5379 (ep_convert_and_check): Likewise.
5380 (build_atomic_assign): Adjust convert_for_assignment call.
5381 (build_modify_expr): Likewise.
5382 (digest_init): Likewise.
5383 (c_finish_return): Likewise.
5384 (build_conditional_expr): Adjust ep_convert_and_check calls.
5385 (convert_for_assignment): Add rhs_loc parameter. Use it.
5386 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5389 2014-01-30 Richard Biener <rguenther@suse.de>
5392 * c-typeck.c (build_function_call_vec): Do not replace calls
5393 to a function via an incompatible type with a runtime abort.
5395 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5397 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5398 flag_enable_cilkplus with flag_cilkplus.
5399 (c_parser_direct_declarator_inner): Likewise.
5400 (c_parser_attribute_any_word): Likewise.
5401 (c_parser_attributes): Likewise.
5402 (c_parser_compound_statement): Likewise.
5403 (c_parser_statement_after_labels): Likewise.
5404 (c_parser_if_statement): Likewise.
5405 (c_parser_switch_statement): Likewise.
5406 (c_parser_do_statement): Likewise.
5407 (c_parser_for_statement): Likewise.
5408 (c_parser_unary_expression): Likewise.
5409 (c_parser_postfix_expression): Likewise.
5410 (c_parser_postfix_expression_after_primary): Likewise.
5411 (c_parser_postfix_expression_after_primary): Likewise.
5412 (c_parser_omp_clause_name): Likewise.
5413 (c_finish_omp_declare_simd): Likewise.
5414 (c_parser_cilk_verify_simd): Likewise.
5415 * c-typeck.c (build_array_ref): Likewise.
5416 (build_function_call_vec): Likewise.
5417 (convert_arguments): Likewise.
5418 (build_compound_expr): Likewise.
5419 (c_finish_return): Likewise.
5420 (c_finish_if_stmt): Likewise.
5421 (c_finish_loop): Likewise.
5422 (build_binary_op): Likewise.
5424 2014-01-23 Marek Polacek <polacek@redhat.com>
5427 * c-typeck.c (parser_build_binary_op): Use location instead of
5429 (build_binary_op): Pass location to shorten_compare.
5431 2014-01-23 Marek Polacek <polacek@redhat.com>
5434 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5437 2014-01-23 Marek Polacek <polacek@redhat.com>
5440 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5441 of a comma expression.
5442 (emit_side_effect_warnings): Likewise.
5444 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5447 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5448 function to use walk_tree and moved a lot of its functionality to
5449 expand_array_notations.
5450 (expand_array_notations): New function.
5452 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5454 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5455 attribute an attribute without value.
5457 2014-01-23 Jakub Jelinek <jakub@redhat.com>
5460 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5461 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5463 2014-01-22 Marek Polacek <polacek@redhat.com>
5466 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5467 of remove_c_maybe_const_expr on op1 and op2.
5469 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5472 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5473 effects, preevaluate rhs using SAVE_EXPR first.
5475 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5478 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5479 statements with if-elseif statements.
5481 2014-01-06 Marek Polacek <polacek@redhat.com>
5484 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5485 defined bit-field types only in ISO C.
5487 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5489 Update copyright years
5491 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5493 * c-array-notation.c: Use the standard form for the copyright notice.
5495 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5497 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5498 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5499 field in parser is not empty. If not-empty, call the function
5500 c_parser_finish_omp_declare_simd.
5501 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5502 between SIMD-enabled functions and #pragma simd. Added new parameter.
5503 (c_parser_cilk_all_clauses): Modified the usage of the function
5504 c_parser_cilk_clause_vectorlength as mentioned above.
5505 (c_parser_cilk_simd_fn_vector_attrs): New function.
5506 (c_finish_cilk_simd_fn_tokens): Likewise.
5507 (is_cilkplus_vector_p): Likewise.
5508 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5509 "nomask," and "mask" strings in clause name.
5510 (c_parser_omp_all_clauses): Added 3 new case statements:
5511 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5512 PRAGMA_CILK_CLAUSE_NOMASK.
5513 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5514 check for vector attribute and if so call the function
5515 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5516 called the function c_finish_cilk_simd_fn_tokens.
5517 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5518 parser field is non-empty. If so, parse them as you would parse
5519 the omp declare simd pragma.
5520 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5521 Added a check when step is a parameter and flag it as error.
5522 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5523 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5526 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5528 * c-parser.c (c_parser_omp_parallel): Fix description.
5530 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5532 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5533 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5534 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5535 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5537 2013-12-04 Joseph Myers <joseph@codesourcery.com>
5540 * c-parser.c (c_parser_alignas_specifier): Use
5541 c_sizeof_or_alignof_type instead of c_alignof.
5542 (c_parser_alignof_expression): Likewise, with min_alignof
5543 parameter depending on alignof spelling used.
5545 2013-12-04 Marek Polacek <polacek@redhat.com>
5548 * c-decl.c (start_function): Don't warn for missing prototype for
5551 2013-12-03 Marek Polacek <polacek@redhat.com>
5554 * c-decl.c (build_compound_literal): Allow compound literals with
5555 empty initial value.
5557 2013-12-02 Joseph Myers <joseph@codesourcery.com>
5560 * c-typeck.c (build_modify_expr): Diagnose assignment to
5561 expression with array type.
5563 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5566 * c-typeck.c (process_init_element): Do not treat a string as
5567 initializing a whole array when used with a designator for an
5570 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5573 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5574 an inline function following a static declaration.
5576 2013-11-28 Jakub Jelinek <jakub@redhat.com>
5579 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5580 to p_name before calling c_parser_omp_teams instead of after.
5581 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5582 argument. Remove unused p_name variable.
5584 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5585 Jakub Jelinek <jakub@redhat.com>
5587 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5588 external_scope is NULL.
5590 2013-11-27 Tom de Vries <tom@codesourcery.com>
5591 Marc Glisse <marc.glisse@inria.fr>
5594 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5596 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5598 * c-typeck.c: Add required include files from gimple.h.
5600 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5602 * c-decl.c (define_label, shadow_tag_warned)
5603 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5604 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5605 (declspecs_add_type): Remove use of in_system_header macro.
5606 * c-parser.c (c_parser_unary_expression): Likewise.
5607 * c-typeck.c (store_init_value, process_init_element)
5608 (c_start_case): Likewise.
5610 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5613 * c-parser.c (c_parser_set_source_position_from_token): Remove
5614 reference to in_system_header from comment.
5616 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5618 * c-decl.c (grokdeclarator): Update comment to refer to
5619 tree_to_[su]hwi rather than tree_low_cst.
5621 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5623 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5624 tree_to_uhwi throughout.
5626 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5628 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5631 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5633 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5636 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5638 * c-parser.c (c_parser_cilk_simd): New.
5639 (c_parser_cilk_verify_simd): New.
5640 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5641 (c_parser_omp_for_loop): Add case for NE_EXPR.
5642 Set c_break_label for CILK_SIMD.
5643 (c_parser_cilk_clause_vectorlength): New.
5644 (c_parser_cilk_clause_linear): New.
5645 (c_parser_cilk_clause_name): New.
5646 (c_parser_cilk_all_clauses): New.
5647 * c-typeck.c (build_unary_op): Pass location argument to
5649 (build_modify_expr): Same.
5650 (build_asm_expr): Same.
5651 (c_finish_bc_stmt): Error on break/continue in loops.
5653 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5655 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5657 2013-11-14 Diego Novillo <dnovillo@google.com>
5659 * c-decl.c: Include print-tree.h.
5660 Include stor-layout.h.
5663 Include stringpool.h.
5664 * c-lang.c: Include fold-const.h.
5665 * c-parser.c: Include stringpool.h.
5667 Include stor-layout.h.
5669 Include trans-mem.h.
5670 * c-typeck.c: Include stor-layout.h.
5671 Include trans-mem.h.
5675 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5677 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5678 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5680 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5681 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5683 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5684 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5685 (c_parser_declarator, c_parser_direct_declarator_inner)
5686 (c_parser_parameter_declaration, c_parser_type_name): All callers
5688 (c_parser_declaration_or_fndef): Handle declarations with type
5689 determined from the initializer.
5691 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5693 * c-typeck.c: Include gimplify.h.
5695 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5697 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5698 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5700 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5701 or _Thread_local as appropriate in diagnostics.
5702 (build_null_declspecs): Initialize ret->thread_gnu_p.
5703 (declspecs_add_scspec): Handle either __thread or _Thread_local
5704 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5705 pedantic. Do not disallow _Thread_local extern and _Thread_local
5708 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5709 Andrew MacLeod <amacleod@redhat.com>
5711 * c-aux-info.c (gen_type): Handle atomic qualifier.
5712 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5713 qualifiers when compating types.
5714 (shadow_tag_warned): Handle atomic_p in declspecs.
5715 (quals_from_declspecs): Likewise.
5716 (start_decl): Use c_type_promotes_to when promoting argument
5718 (grokdeclarator): Handle _Atomic.
5719 (get_parm_info): Diagnose any qualifier on "void" as only
5721 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5722 comparing types. Use c_type_promotes_to when promoting argument
5724 (finish_function): Use c_type_promotes_to when promoting argument
5726 (build_null_declspecs): Handle atomic_p in declspecs.
5727 (declspecs_add_qual): Handle RID_ATOMIC.
5728 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5729 (c_token_starts_declspecs): Handle RID_ATOMIC.
5730 (c_parser_declspecs): Handle atomic type specifiers and
5732 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5733 from types of expressions with atomic type.
5734 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5735 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5736 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5737 (c_parser_statement_after_labels, c_parser_switch_statement)
5738 (c_parser_for_statement, c_parser_expr_no_commas)
5739 (c_parser_conditional_expression, c_parser_binary_expression)
5740 (c_parser_cast_expression, c_parser_unary_expression)
5741 (c_parser_postfix_expression)
5742 (c_parser_postfix_expression_after_primary, c_parser_expression):
5743 Use convert_lvalue_to_rvalue.
5744 (c_parser_expression_conv, c_parser_expr_list): Document
5745 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5746 (c_parser_objc_synchronized_statement): Use
5747 convert_lvalue_to_rvalue.
5748 (c_parser_objc_selector): Handle RID_ATOMIC.
5749 (c_parser_objc_receiver, c_parser_array_notation): Use
5750 convert_lvalue_to_rvalue.
5751 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5752 _Atomic (type-name).
5753 (struct c_declspecs): Add atomic_p field.
5754 (convert_lvalue_to_rvalue): Declare.
5755 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5756 corresponding atomic types.
5757 (qualify_type): Don't add _Atomic qualifiers from second argument.
5758 (comp_target_types): Do not allow _Atomic mismatches.
5759 (type_lists_compatible_p): Do not remove atomic qualifiers when
5761 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5762 (build_atomic_assign): New functions.
5763 (build_unary_op): Use build_atomic_assign for atomic increment and
5765 (build_conditional_expr): Do not treat _Atomic void as a qualified
5767 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5768 (find_anonymous_field_with_type, convert_to_anonymous_field)
5769 (convert_for_assignment): Do not remove atomic qualifiers when
5771 (digest_init): Do not accept initialization of arrays of atomic
5772 elements by string constants.
5773 (build_asm_expr): Use convert_lvalue_to_rvalue.
5774 (build_binary_op): Do not treat _Atomic void as a qualified
5777 2013-11-06 DJ Delorie <dj@redhat.com>
5779 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5780 both explicit and builtin, print the location of the explicit one.
5782 2013-11-05 Tobias Burnus <burnus@net-b.de>
5784 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5785 c_parser_omp_distribute, c_parser_omp_teams,
5786 c_parser_omp_target, c_parser_omp_declare): Handle
5789 2013-11-03 Marek Polacek <polacek@redhat.com>
5791 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5793 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5795 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5796 check_dup_generic at the end, unless remove is true.
5797 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5799 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5801 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5803 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5804 with decl that is not pointer nor array.
5806 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5808 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5809 a spawning function is found.
5810 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5811 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5812 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5813 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5815 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5816 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5818 (c_finish_return): Added a check to reject _Cilk_spawn in return
5820 (build_cilk_spawn): New function.
5821 (build_cilk_sync): Likewise.
5822 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5824 2013-10-27 Tobias Burnus <burnus@net-b.de>
5827 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5828 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5829 (c_parser_statement_after_labels): Update calls.
5831 2013-10-24 Tobias Burnus <burnus@net-b.de>
5834 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5835 Handle PRAGMA_IVDEP.
5836 (c_parser_statement_after_labels): Update call.
5838 2013-10-24 Marek Polacek <polacek@redhat.com>
5840 * c-parser.c (c_parser_struct_declaration): Add a comment.
5841 (c_parser_declarator): Don't allow _Alignas here.
5843 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5845 * c-parser.c: Include omp-low.h.
5846 * c-typeck.c: Likewise.
5848 2013-10-17 Marek Polacek <polacek@redhat.com>
5851 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5852 Document syntax of the array-declarator.
5853 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5855 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5856 (c_parser_struct_declaration): Likewise.
5857 (c_parser_declarator): Likewise.
5858 (c_parser_direct_declarator_inner): Likewise.
5859 (c_parser_parameter_declaration): Likewise.
5860 (c_parser_type_name): Likewise.
5862 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5864 * c-lang.h (current_omp_declare_target_attribute): New extern
5866 * c-parser.c: Include c-lang.h.
5867 (struct c_parser): Change tokens to c_token *.
5868 Add tokens_buf field. Change tokens_avail type to unsigned int.
5869 (c_parser_consume_token): If parser->tokens isn't
5870 &parser->tokens_buf[0], increment parser->tokens.
5871 (c_parser_consume_pragma): Likewise.
5872 (enum pragma_context): Add pragma_struct and pragma_param.
5873 (c_parser_external_declaration): Adjust
5874 c_parser_declaration_or_fndef caller.
5875 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5876 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5877 Adjust recursive call.
5878 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5880 (c_parser_parameter_declaration): Use pragma_param instead of
5882 (c_parser_compound_statement_nostart, c_parser_label,
5883 c_parser_for_statement): Adjust
5884 c_parser_declaration_or_fndef callers.
5885 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5886 it through to c_parser_conditional_expression.
5887 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5888 pass it through to c_parser_binary_expression. Adjust recursive
5890 (c_parser_binary_expression): Remove prec argument, add
5891 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5892 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5893 binop matches it, use build2 instead of parser_build_binary_op.
5894 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5895 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5896 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5897 Handle pragma_struct and pragma_param the same as pragma_external.
5898 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5899 (c_parser_omp_variable_list): Parse array sections for
5900 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5901 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5902 (c_parser_omp_clause_reduction): Handle user defined reductions.
5903 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5904 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5905 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5906 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5907 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5908 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5909 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5910 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5911 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5912 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5913 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5914 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5915 (c_parser_omp_for_loop): Add CODE argument, pass it through
5916 to c_finish_omp_for. Change last argument to cclauses,
5917 and adjust uses to grab parallel clauses from the array of all
5918 the split clauses. Adjust c_parser_binary_expression,
5919 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5920 (omp_split_clauses): New function.
5921 (c_parser_omp_simd): New function.
5922 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5923 Allow the function to be called also when parsing combined constructs,
5924 and call c_parser_omp_simd when parsing for simd.
5925 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5926 #pragma omp section, require exactly one structured-block instead of
5927 sequence of statements.
5928 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5929 Allow the function to be called also when parsing combined constructs.
5930 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5931 Allow the function to be called also when parsing combined
5933 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5934 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5935 c_parser_omp_teams, c_parser_omp_target_data,
5936 c_parser_omp_target_update, c_parser_omp_target,
5937 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5938 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5939 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5940 (c_parser_omp_construct): Add p_name and mask vars. Handle
5941 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5942 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5943 and c_parser_omp_sections callers.
5944 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5945 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5946 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5947 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5948 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5950 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5951 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5952 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5953 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5954 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5955 * c-typeck.c: Include tree-inline.h.
5956 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5957 handle_omp_array_sections_1, handle_omp_array_sections,
5958 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5959 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5960 user defined reductions.
5961 (c_tree_equal): New function.
5962 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5963 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5964 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5965 c_check_omp_declare_reduction_r): New prototypes.
5966 * c-decl.c (current_omp_declare_target_attribute): New variable.
5967 (c_decl_attributes): New function.
5968 (start_decl, start_function): Use it instead of decl_attributes.
5969 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5970 c_omp_reduction_decl, c_omp_reduction_lookup,
5971 c_check_omp_declare_reduction_r): New functions.
5973 2013-09-25 Tom Tromey <tromey@redhat.com>
5975 * Make-lang.in (c/gccspec.o): Remove.
5976 (CFLAGS-c/gccspec.o): New variable.
5977 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5978 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5979 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5981 2013-09-25 Tom Tromey <tromey@redhat.com>
5983 * Make-lang.in (c/gccspec.o): Don't use subshell.
5985 2013-09-18 Marek Polacek <polacek@redhat.com>
5988 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5989 Remove unnecessary check.
5991 2013-09-18 Marek Polacek <polacek@redhat.com>
5994 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5995 no_sanitize_undefined attribute.
5997 2013-09-13 Kai Tietz <ktietz@redhat.com>
6000 * c-decl.c (c_builtin_function_ext_scope): Remove
6001 wrong assumption that it is never called on prexisting
6004 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6006 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6008 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6010 * c-objc-common.c (c_tree_printer): Tidy.
6012 2013-08-30 Marek Polacek <polacek@redhat.com>
6014 * c-typeck.c (build_binary_op): Add division by zero and shift
6017 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6018 Joseph Myers <joseph@codesourcery.com>
6021 * c-typeck.c (c_common_type): Prefer double_type_node over
6022 other REAL_TYPE types with the same precision.
6023 (convert_arguments): Likewise.
6025 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6027 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6028 (c_initialize_diagnostics): Call a destructor for the early printer.
6030 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6032 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6033 printer initialization.
6035 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
6038 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6039 check for truth values.
6040 (expand_array_notation_exprs): Added truth values case. Removed an
6041 unwanted else. Added for-loop to walk through subtrees in default
6044 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6046 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6048 2013-07-23 Joseph Myers <joseph@codesourcery.com>
6050 * c-parser.c (struct c_generic_association): Fix typo.
6052 2013-07-23 Tom Tromey <tromey@redhat.com>
6053 Joseph Myers <joseph@codesourcery.com>
6055 * c-parser.c (struct c_generic_association): New.
6056 (c_generic_association_d): New typedef.
6057 (c_parser_generic_selection): New function.
6058 (c_parser_postfix_expression): Handle RID_GENERIC.
6060 2013-07-13 Jason Merrill <jason@redhat.com>
6063 * c-decl.c (finish_struct): Check for too-large class.
6065 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6068 * c-typeck.c (set_init_index): When folding, check for index overflow.
6070 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6072 * c-parser.c (c_parser_array_notation): Removed rejection of array
6073 notations in an array of function pointers.
6075 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6077 * c-array-notation.c (make_triplet_val_inv): New function.
6078 (create_cmp_incr): Likewise.
6079 (create_array_refs): Likewise.
6080 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6081 Also modularized common parts between functions and called the function.
6082 (build_array_notation_expr): Likewise.
6083 (fix_conditional_array_notations_1): Likewise.
6084 (fix_array_notation_expr): Likewise.
6085 (fix_array_notation_call_expr): Likewise.
6087 2013-06-18 Marek Polacek <polacek@redhat.com>
6090 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6092 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6094 * c-array-notation.c (build_array_notation_expr): Reject array notation
6095 mismatch between LHS and RHS even inside a call_expr. Also, removed
6096 a couple while statements that were dead code.
6098 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6100 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6101 excessive precision expressions in function parameters. Also removed
6102 couple unwanted while statements.
6104 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6106 * c-array-notation.c (expand_array_notation_exprs): Added
6107 ARRAY_NOTATION_REF case.
6109 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6111 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6112 function to c-family/array-notation-common.c.
6113 (is_cilkplus_reduce_builtin): Likewise.
6114 (find_rank): Likewise.
6115 (extract_array_notation_exprs): Likewise.
6116 (replace_array_notations): Likewise.
6117 (find_inv_trees): Likewise.
6118 (replace_inv_trees): Likewise.
6119 (contains_array_notation_expr): Likewise.
6120 (find_correct_array_notation_type): Likewise.
6121 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6122 (struct inv_list): Moved this to c-family/array-notation-common.c.
6123 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6125 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6127 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6128 reduction functions outside the for-loop. Added a check if the fundecl
6129 is non-NULL. Finally, removed an unwanted if-statement, and made the
6132 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6134 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6135 condition of the if-statement matches the rank of else-block and then-
6136 block when array notations are used.
6137 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6138 expression after the entire function body is parsed.
6139 (c_parser_expr_no_commas): Delayed creating array notation expressions
6140 to the end of function parsing.
6141 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6142 whole if-statement instead of just the condition.
6143 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6145 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6148 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6149 array to NULL_TREE if they are unused. Also added a check for the
6150 field to be NULL before its fields are used in future.
6152 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6155 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6156 (build_array_notation_expr): Likewise.
6158 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6160 * c-typeck.c (build_array_ref): Added a check to see if array's
6161 index is greater than one. If true, then emit an error.
6162 (build_function_call_vec): Exclude error reporting and checking
6163 for builtin array-notation functions.
6164 (convert_arguments): Likewise.
6165 (c_finish_return): Added a check for array notations as a return
6166 expression. If true, then emit an error.
6167 (c_finish_loop): Added a check for array notations in a loop
6168 condition. If true then emit an error.
6169 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6170 (build_binary_op): Added a check for array notation expr inside
6171 op1 and op0. If present, we call another function to find correct
6173 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6174 * c-parser.c (c_parser_compound_statement): Check if array
6175 notation code is used in tree, if so, then transform them into
6177 (c_parser_expr_no_commas): Check if array notation is used in LHS
6178 or RHS, if so, then build array notation expression instead of
6180 (c_parser_postfix_expression_after_primary): Added a check for
6181 colon(s) after square braces, if so then handle it like an array
6182 notation. Also, break up array notations in unary op if found.
6183 (c_parser_direct_declarator_inner): Added a check for array
6185 (c_parser_compound_statement): Added a check for array notation in
6186 a stmt. If one is present, then expand array notation expr.
6187 (c_parser_if_statement): Likewise.
6188 (c_parser_switch_statement): Added a check for array notations in
6189 a switch statement's condition. If true, then output an error.
6190 (c_parser_while_statement): Similarly, but for a while.
6191 (c_parser_do_statement): Similarly, but for a do-while.
6192 (c_parser_for_statement): Similarly, but for a for-loop.
6193 (c_parser_unary_expression): Check if array notation is used in a
6194 pre-increment or pre-decrement expression. If true, then expand
6196 (c_parser_array_notation): New function.
6197 * c-array-notation.c: New file.
6198 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6200 2013-05-23 Mike Stump <mikestump@comcast.net>
6202 * c-typeck.c (convert_for_assignment): Handle references to memory
6205 2013-05-16 Jason Merrill <jason@redhat.com>
6207 * Make-lang.in (cc1$(exeext)): Use link mutex.
6209 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6211 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6212 to simply use OPT_Wpointer_arith.
6213 (build_unary_op): Likewise.
6215 2013-04-03 Jakub Jelinek <jakub@redhat.com>
6218 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6219 argument. If set, or it temporarily for parsing of the first
6220 argument into force_folding_builtin_constant_p.
6221 (c_parser_postfix_expression): Adjust callers.
6223 2013-03-21 Richard Biener <rguenther@suse.de>
6225 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6226 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6228 2013-02-12 Marek Polacek <polacek@redhat.com>
6231 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6234 2013-01-24 Jakub Jelinek <jakub@redhat.com>
6237 * c-typeck.c (set_nonincremental_init_from_string): If
6238 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6240 (process_init_element): Likewise.
6242 2012-12-20 Jakub Jelinek <jakub@redhat.com>
6245 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6246 argument, don't call default_function_array_conversion
6247 nor c_fully_fold here.
6248 (c_parser_asm_statement): Adjust callers.
6249 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6250 and outputs here, and call default_function_array_conversion
6251 on inputs that don't need to be addressable.
6253 2012-12-18 Jakub Jelinek <jakub@redhat.com>
6256 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6257 warning require that both c_common_unsigned_type as well as
6258 c_common_signed_type is the same for both mvl and mvr types.
6260 2012-11-16 Diego Novillo <dnovillo@google.com>
6262 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6264 * c-common.c: Use new vec API in vec.h.
6265 * c-common.h: Likewise.
6266 * c-gimplify.c: Likewise.
6267 * c-pragma.c: Likewise.
6268 * c-pretty-print.c: Likewise.
6269 * c-pretty-print.h: Likewise.
6270 * c-semantics.c: Likewise.
6271 * c-decl.c: Likewise.
6272 * c-parser.c: Likewise.
6273 * c-tree.h: Likewise.
6274 * c-typeck.c: Likewise.
6276 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6279 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6281 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6284 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6285 shadows a function, unless the variable is a function or a
6286 pointer-to-function.
6288 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6291 * c-parser.c (struct c_tree_loc_pair): Removed.
6292 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6293 add location_t * and tree * arguments, fill in array of 3
6294 sizeof_arg trees and corresponding locs.
6295 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6296 c_parser_expr_list callers.
6297 (c_parser_postfix_expression_after_primary): Likewise. Pass
6298 array of 3 sizeof_arg trees and locs (corresponding to first
6299 3 arguments) to sizeof_pointer_memaccess_warning.
6301 2012-10-09 Lawrence Crowl <crowl@google.com>
6303 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6304 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6307 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6310 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6313 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
6316 * c-typeck.c: Include c-common.h.
6317 (enum stv_conv): Moved to c-common.h.
6318 (scalar_to_vector): Moved to c-common.c.
6319 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6320 * Make-lang.in: c-typeck.c depends on c-common.h.
6322 2012-10-04 Arnaud Charlet <charlet@adacore.com>
6324 * c-decl.c (c_write_global_declarations): Fix handling of
6327 2012-09-30 Sharad Singhai <singhai@google.com>
6329 * c-decl.c (c_write_global_declarations): Use a different method
6330 to determine if the dump has ben initialized.
6332 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6335 * c-typeck.c (c_cast_expr): When casting to a type requiring
6336 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6339 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6342 * c-typeck.c (build_unary_op): Pass original argument of
6343 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6344 any C_MAYBE_CONST_EXPR, if it has integer operands.
6345 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6346 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6347 to c_objc_common_truthvalue_conversion, then remove any
6348 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6349 c_objc_common_truthvalue_conversion not
6350 c_common_truthvalue_conversion.
6351 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6352 call note_integer_operands for arguments with integer operands
6353 that are not integer constants.
6355 2012-09-13 Jakub Jelinek <jakub@redhat.com>
6358 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6359 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6361 2012-08-31 Jakub Jelinek <jakub@redhat.com>
6364 * c-convert.c (convert): Don't call fold_convert_loc if
6365 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6366 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6367 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6369 2012-08-24 Jakub Jelinek <jakub@redhat.com>
6372 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6373 for nested and empty_ok arguments in the call to
6374 c_parser_declaration_or_fndef.
6376 2012-08-17 Jakub Jelinek <jakub@redhat.com>
6378 * c-tree.h (c_last_sizeof_arg): Declare.
6379 * c-parser.c (struct c_tree_loc_pair): New type.
6380 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6382 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6383 (c_parser_postfix_expression_after_primary): Likewise. Call
6384 sizeof_pointer_memaccess_warning if needed.
6385 (sizeof_ptr_memacc_comptypes): New function.
6386 * c-typeck.c (c_last_sizeof_arg): New global variable.
6387 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6389 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
6391 * c-lang.h (lang_decl): Add variable_size GTY option.
6393 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6395 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6396 * Make-lang.in: Fix dependencies.
6398 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6400 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6401 and add language Makefile hooks.
6402 * config-lang.in: New file.
6403 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6404 add the required "normal" config-lang.in rules.
6405 * c-lang.h: Moved from gcc/ to here.
6406 * c-tree.h: Likewise.
6407 * c-objc-common.c: Likewise.
6408 * c-objc-common.h: Likewise.
6409 * c-typeck.c: Likewise.
6410 * c-convert.c: Likewise.
6411 * c-lang.c: Likewise.
6412 * c-aux-info.c: Likewise.
6413 * c-errors.c: Likewise.
6414 * gccspec.c: Likewise.
6415 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6416 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6418 Copyright (C) 2012-2019 Free Software Foundation, Inc.
6420 Copying and distribution of this file, with or without modification,
6421 are permitted in any medium without royalty provided the copyright
6422 notice and this notice are preserved.