1 2018-01-25 Release Manager
5 2017-12-22 Jakub Jelinek <jakub@redhat.com>
8 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
9 TYPE_STUB_DECL and call rest_of_type_compilation before processing
10 incomplete vars rather than after it.
12 2017-12-10 Tom de Vries <tom@codesourcery.com>
16 2017-09-16 Tom de Vries <tom@codesourcery.com>
18 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
21 2017-09-30 Jakub Jelinek <jakub@redhat.com>
23 Backported from mainline
24 2017-09-29 Jakub Jelinek <jakub@redhat.com>
27 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
28 instead of trying to set just TREE_READONLY manually.
30 2017-08-14 Release Manager
34 2017-06-08 Jakub Jelinek <jakub@redhat.com>
37 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
38 to sizetype before size_binop.
40 2017-05-26 Marek Polacek <polacek@redhat.com>
42 Backported from mainline
43 2017-05-17 Marek Polacek <polacek@redhat.com>
46 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
47 DECL_IGNORED_P even for non-static compound literals.
49 2017-05-03 Jakub Jelinek <jakub@redhat.com>
51 Backported from mainline
52 2017-04-21 Jakub Jelinek <jakub@redhat.com>
55 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
56 enabled, set specs->type to integer_type_node.
58 2017-05-02 Release Manager
62 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
64 * c-array-notation.c: Fix typo in comment.
66 2017-03-29 Marek Polacek <polacek@redhat.com>
69 * c-decl.c (finish_decl): Check VAR_P.
71 2017-03-27 Jakub Jelinek <jakub@redhat.com>
74 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
75 * c-typeck.c (c_mark_addressable): Likewise. Look through
76 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
78 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
80 2017-03-23 Marek Polacek <polacek@redhat.com>
82 * c-tree.h: Remove a C_RID_YYCODE reference.
84 2017-03-21 Jakub Jelinek <jakub@redhat.com>
87 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
88 optional COMPOUND_EXPR with ubsan instrumentation.
90 2017-03-17 Marek Polacek <polacek@redhat.com>
92 * c-parser.c: Add C11 references.
94 2017-03-15 Marek Polacek <polacek@redhat.com>
96 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
98 2017-03-11 Marek Polacek <polacek@redhat.com>
100 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
102 2017-03-10 David Malcolm <dmalcolm@redhat.com>
105 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
107 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
109 2017-03-09 Marek Polacek <polacek@redhat.com>
112 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
113 parameter declarations with initializers.
115 2017-03-09 Jakub Jelinek <jakub@redhat.com>
118 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
121 2017-03-07 Jakub Jelinek <jakub@redhat.com>
124 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
125 for "may only be used in compound statements" diagnostics, change it
126 such that the same translatable string is used for all pragmas. For
127 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
129 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
130 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
131 "may only be used in compound statements" diagnostics, such that the
132 same translatable string is used for all pragmas.
134 2017-03-04 Marek Polacek <polacek@redhat.com>
137 * c-decl.c (implicit_decl_warning): Add missing space.
139 2017-03-03 Marek Polacek <polacek@redhat.com>
142 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
143 current_function_prototype_arg_types is error_mark_node. Fix
144 formatting. Use TREE_VALUE instead of TREE_TYPE.
146 2017-03-03 Jakub Jelinek <jakub@redhat.com>
149 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
150 %<min%> or %<max%> in the diagnostics, instead mention identifier.
151 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
155 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
156 instead of %<_Generic>.
157 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
158 (c_parser_omp_target_exit_data): Use %<release%> instead of
161 2017-02-28 Jakub Jelinek <jakub@redhat.com>
163 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
164 instead of just cond ? "..." : "...".
165 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
166 for "enter"/"exit" keyword.
167 (c_finish_oacc_routine): Don't use %s to supply portions of the
170 2017-02-24 Jakub Jelinek <jakub@redhat.com>
173 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
174 handle -Wrestrict here.
175 * c-typeck.c (build_function_call_vec): Adjust
176 check_function_arguments caller.
178 2017-02-23 Richard Biener <rguenther@suse.de>
181 * gimple-parser.c (c_parser_gimple_statement): Use set_error
182 to initialize c_exprs to return.
183 (c_parser_gimple_binary_expression): Likewise.
184 (c_parser_gimple_unary_expression): Likewise.
185 (c_parser_gimple_postfix_expression): Likewise.
187 2017-02-22 Marek Polacek <polacek@redhat.com>
190 * c-typeck.c (convert_arguments): Handle error_mark_node.
192 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
194 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
195 value of c_parser_parse_ssa_name against error_mark_node and emit
196 error if ssa name is anonymous and written as default definition.
198 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
200 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
203 2017-02-16 Jakub Jelinek <jakub@redhat.com>
206 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
207 ignore #pragma omp target even when not followed by identifier.
209 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
211 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
212 (c_parser_gimple_unary_expression): Likewise.
214 2017-02-13 Jakub Jelinek <jakub@redhat.com>
216 * c-parser.c (c_parser_oacc_declare): Add missing space in
219 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
222 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
223 set_c_expr_source_range when parsing ssa-name.
225 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
226 Richard Biener <rguenther@suse.de>
228 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
229 building IL when arguments are error_mark_node.
230 (c_parser_gimple_unary_expression): Likewise.
231 (c_parser_gimple_if_stmt): Likewise.
232 (c_parser_gimple_switch_stmt): Likewise.
233 (c_parser_gimple_return_stmt): Likewise.
234 (c_parser_parse_ssa_name): When name lookup fails do not build
235 an SSA name. Use undeclared rather than not declared in error
238 2017-02-09 Marek Polacek <polacek@redhat.com>
241 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
242 instead of c_parser_skip_until_found.
244 2017-02-09 Jakub Jelinek <jakub@redhat.com>
247 * c-parser.c (c_parser_omp_declare_target): Don't invoke
248 symtab_node::get on automatic variables.
250 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
251 Chung-Lin Tang <cltang@codesourcery.com>
253 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
254 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
256 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
258 2017-02-07 Richard Biener <rguenther@suse.de>
260 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
261 (c_parser_gimple_postfix_expression_after_primary):
262 Do not use c_build_function_call_vec to avoid folding and promotion.
265 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
268 * c-decl.c (pop_scope): Pass main_input_filename to
269 build_translation_unit_decl.
271 2017-01-24 David Malcolm <dmalcolm@redhat.com>
273 * c-parser.c: Include "read-rtl-function.h" and
275 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
276 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
277 production. Update for renaming of field "gimple_pass" to
278 "gimple_or_rtl_pass". If __RTL was seen, call
279 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
280 to an auto_timevar, to cope with early exit.
281 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
282 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
283 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
285 (c_parser_parse_rtl_body): New function.
286 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
287 (struct c_declspecs): Rename field "gimple_pass" to
288 "gimple_or_rtl_pass". Add field "rtl_p".
289 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
290 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
291 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
292 (c_parser_gimple_or_rtl_pass_list): ...this.
294 2017-01-20 Marek Polacek <polacek@redhat.com>
297 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
299 2017-01-13 Richard Biener <rguenther@suse.de>
301 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
304 2017-01-13 Richard Biener <rguenther@suse.de>
306 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
307 _Literal ( type-name ) number.
309 2017-01-12 Richard Biener <rguenther@suse.de>
311 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
314 2017-01-11 Jakub Jelinek <jakub@redhat.com>
317 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
320 2017-01-11 Richard Biener <rguenther@suse.de>
323 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
324 returns on parse errors.
326 2017-01-04 Marek Polacek <polacek@redhat.com>
329 * c-parser.c (c_parser_postfix_expression): Mark zero character
330 constants by setting original_type in c_expr.
331 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
332 with a zero character constant.
333 (char_type_p): New function.
335 2017-01-04 David Malcolm <dmalcolm@redhat.com>
337 * c-parser.c (c_parser_declaration_or_fndef): Create a
338 rich_location at init_loc and parse it to start_init.
339 (last_init_list_comma): New global.
340 (c_parser_braced_init): Update last_init_list_comma when parsing
341 commas. Pass it to pop_init_level. Pass location of closing
342 brace to pop_init_level.
343 (c_parser_postfix_expression_after_paren_type): Create a
344 rich_location at type_loc and parse it to start_init.
345 (c_parser_omp_declare_reduction): Likewise for loc.
346 * c-tree.h (start_init): Add rich_location * param.
347 (pop_init_level): Add location_t param.
348 * c-typeck.c (struct initializer_stack): Add field
349 "missing_brace_richloc".
350 (start_init): Add richloc param, use it to initialize
351 the stack node's missing_brace_richloc.
352 (last_init_list_comma): New decl.
353 (finish_implicit_inits): Pass last_init_list_comma to
355 (push_init_level): When finding missing open braces, add fix-it
356 hints to the richloc.
357 (pop_init_level): Add "insert_before" param and pass it
358 when calling pop_init_level. Add fixits about missing
359 close braces to any richloc. Use the richloc for the
360 -Wmissing-braces warning.
361 (set_designator): Pass last_init_list_comma to pop_init_level.
362 (process_init_element): Likewise.
364 2017-01-01 Jakub Jelinek <jakub@redhat.com>
366 Update copyright years.
368 2016-12-21 Jakub Jelinek <jakub@redhat.com>
371 * c-typeck.c (build_function_call_vec): If check_function_arguments
372 returns true, set TREE_NO_WARNING on CALL_EXPR.
375 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
376 to *expr instead of overwriting it.
378 2016-12-20 Richard Biener <rguenther@suse.de>
380 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
382 (c_parser_gimple_statement): Only build assigns for non-error
384 (c_parser_gimple_postfix_expression_after): Improve error recovery.
386 2016-12-14 Martin Jambor <mjambor@suse.cz>
388 * c-parser.c: Include omp-general.h and omp-offload.h instead of
390 (c_finish_oacc_routine): Adjusted call to
391 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
392 to use their new names.
393 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
395 (c_parser_oacc_update): Likewise.
396 (c_parser_omp_simd): Likewise.
397 (c_parser_omp_target_update): Likewise.
398 * c-typeck.c: Include omp-general.h instead of omp-low.h.
399 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
401 (c_finish_omp_cancellation_point): Likewise.
402 * gimple-parser.c: Do not include omp-low.h
404 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
405 James Norris <jnorris@codesourcery.com>
407 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
408 EXIT_DATA,WAIT} are not used in compound statements.
409 (c_parser_oacc_enter_exit_data): Update diagnostics.
411 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
414 * c-decl.c (diagnose_mismatched_decls): Use
415 OPT_Wbuiltin_declaration_mismatch here too.
417 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
418 Alan Hayward <alan.hayward@arm.com>
419 David Sherwood <david.sherwood@arm.com>
421 * c-decl.c (merge_decls): Use SET_DECL_MODE.
422 (make_label, finish_struct): Likewise.
424 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
425 Richard Biener <rguenther@suse.de>
427 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
428 * config-lang.in (gtfiles): Add c/c-parser.h.
429 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
430 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
431 * c-parser.c (enum c_id_kind, struct c_token,
432 c_parser_next_token_is, c_parser_next_token_is_not,
433 c_parser_next_token_is_keyword,
434 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
436 * c-parser.h: ... new header.
437 * c-parser.c: Include c-parser.h and gimple-parser.h.
438 (c_parser_peek_token, c_parser_peek_2nd_token,
439 c_token_starts_typename, c_parser_next_token_starts_declspecs,
440 c_parser_next_tokens_start_declaration, c_parser_consume_token,
441 c_parser_error, c_parser_require, c_parser_skip_until_found,
442 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
443 c_parser_type_name): Export.
444 (c_parser_tokens_buf): New function.
445 (c_parser_error): Likewise.
446 (c_parser_set_error): Likewise.
447 (c_parser_declspecs): Handle RID_GIMPLE.
448 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
449 via c_parser_parse_gimple_body.
450 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
451 c_token_starts_typename, c_parser_next_token_starts_declspecs,
452 c_parser_next_tokens_start_declaration, c_parser_consume_token,
453 c_parser_error, c_parser_require, c_parser_skip_until_found,
454 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
455 c_parser_type_name): Declare.
456 (struct c_parser): Declare forward.
457 (c_parser_tokens_buf): Declare.
458 (c_parser_error): Likewise.
459 (c_parser_set_error): Likewise.
460 * gimple-parser.c: New file.
461 * gimple-parser.h: Likewise.
463 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
466 * c-parser.c (c_parser_postfix_expression_after_primary): Call
469 2016-09-11 Le-Chun Wu <lcwu@google.com>
470 Mark Wielaard <mjw@redhat.com>
472 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
473 to the given -Wshadow= variant.
475 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
477 * c-typeck.c: Include memmodel.h.
479 2016-10-13 Jakub Jelinek <jakub@redhat.com>
482 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
483 instead of lhd_return_null_tree_v.
485 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
488 * c-decl.c (smallest_type_quals_location): New static function.
489 (grokdeclarator): Try to find the correct location for an ignored
492 2016-09-26 Marek Polacek <polacek@redhat.com>
495 * c-decl.c (pop_scope): Add gcc_fallthrough.
497 2016-09-26 Marek Polacek <polacek@redhat.com>
500 * c-parser.c (struct c_token): Add flags field.
501 (c_lex_one_token): Pass it to c_lex_with_flags.
502 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
503 into IFN_FALLTHROUGH.
504 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
505 attribute fallthrough after a case label or default label.
506 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
508 2016-09-24 Marek Polacek <polacek@redhat.com>
511 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
512 have boolean value. Warn about ++/-- on booleans.
514 2016-09-23 Jakub Jelinek <jakub@redhat.com>
516 * c-parser.c (incomplete_record_decls): Remove unnecessary
517 = vNULL initialization of file scope vec.
519 2016-09-16 Marek Polacek <polacek@redhat.com>
521 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
523 2016-09-14 Marek Polacek <polacek@redhat.com>
525 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
526 (fix_array_notation_expr): Likewise.
527 * c-decl.c (finish_decl): Likewise.
528 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
529 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
530 (function_to_pointer_conversion): Use false instead of 0.
531 (convert_lvalue_to_rvalue): Likewise.
532 (parser_build_unary_op): Likewise.
533 (build_atomic_assign): Likewise.
534 (build_unary_op): Change nonconvert parameter type to bool, use
535 true/false instead of 1/0.
536 (build_binary_op): Use true instead of 1.
538 2016-09-13 David Malcolm <dmalcolm@redhat.com>
540 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
541 of add_fixit_insert to add_fixit_insert_before.
543 2016-09-13 Marek Polacek <polacek@redhat.com>
545 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
548 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
551 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
552 COMPOUND_EXPR to warn_for_omitted_condop.
554 2016-09-07 David Malcolm <dmalcolm@redhat.com>
556 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
557 c_get_substring_location for this new langhook.
559 2016-09-02 Jakub Jelinek <jakub@redhat.com>
562 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
564 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
565 instead of mark_exp_read on low_bound/length expression.
566 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
567 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
568 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
569 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
570 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
571 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
572 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
573 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
574 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
575 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
576 instead of mark_expr_read.
577 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
578 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
579 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
580 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
581 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
582 array section bases outside of depend clause, for depend clause
583 use convert_lvalue_to_rvalue on the base.
584 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
585 linear, aligned, map, to and from clauses.
586 (c_omp_clause_copy_ctor): New function.
588 2016-09-01 Marek Polacek <polacek@redhat.com>
591 * c-typeck.c (composite_type): Add FALLTHRU comment.
593 2016-08-31 David Malcolm <dmalcolm@redhat.com>
595 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
596 to the insertion fixits for "struct", "union", and "enum".
598 2016-08-30 David Malcolm <dmalcolm@redhat.com>
600 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
601 rather than add_fixit_misspelled_id.
602 (undeclared_variable): Likewise.
603 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
604 now-redundant "here" params from add_fixit_insert method calls.
605 (c_parser_parameter_declaration): Likewise.
606 * c-typeck.c (build_component_ref): Remove now-redundant range
607 param from add_fixit_replace method calls.
609 2016-08-25 Marek Polacek <polacek@redhat.com>
611 * c-typeck.c (parser_build_binary_op): Pass LHS to
612 warn_logical_not_parentheses.
614 2016-08-25 Marek Polacek <polacek@redhat.com>
617 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
618 or _FloatN or _FloatNx is not supported.
619 (finish_declspecs): Set type to integer_type_node when _FloatN or
620 _FloatNx is not supported.
622 2016-08-19 Joseph Myers <joseph@codesourcery.com>
625 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
626 (struct c_declspecs): Add field floatn_nx_idx.
627 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
628 and _FloatNx type specifiers.
629 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
630 (c_parser_declspecs, c_parser_attribute_any_word)
631 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
632 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
633 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
634 narrower than double.
636 2016-08-12 Jakub Jelinek <jakub@redhat.com>
637 Martin Liska <mliska@suse.cz>
640 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
641 % to determine val element to change. Assert that
642 wchar_bytes * charwidth fits into val array.
644 2016-08-12 Marek Polacek <polacek@redhat.com>
647 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
648 (c_parser_postfix_expression): Likewise.
649 * c-typeck.c (build_unary_op): Adjust fall through comment.
650 (c_mark_addressable): Likewise.
652 2016-08-11 Jakub Jelinek <jakub@redhat.com>
655 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
656 array member through typedef, for orig_qual_indirect == 0 clear
659 2016-08-08 David Malcolm <dmalcolm@redhat.com>
662 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
663 this up to selftest::run_c_tests.
664 (selftest::run_c_tests): New function.
666 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
668 * c-parser.c (struct oacc_routine_data): Add error_seen and
670 (c_finish_oacc_routine): Use these.
671 (c_parser_declaration_or_fndef): Adjust.
672 (c_parser_oacc_routine): Likewise. Support more C language
673 constructs, and improve diagnostics. Move pragma context
675 (c_parser_pragma): ... here.
677 * c-parser.c (struct oacc_routine_data): New.
678 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
680 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
681 declare target" attribute.
683 2016-08-01 Jan Beulich <jbeulich@suse.com>
685 * c-fold.c (c_fully_fold_internal): Also emit shift count
686 warnings for vector types.
687 * c-typeck.c (build_binary_op): Likewise.
689 2016-07-29 Marek Polacek <polacek@redhat.com>
692 * c-decl.c (finish_struct): Rephrase an error message.
695 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
696 to error node for invalid code.
699 * c-decl.c (implicitly_declare): Return decl early not only for
700 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
702 2016-07-29 Jakub Jelinek <jakub@redhat.com>
705 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
706 on GNU extern inline functions.
708 2016-07-29 Marek Polacek <polacek@redhat.com>
711 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
714 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
716 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
718 2016-07-20 David Malcolm <dmalcolm@redhat.com>
720 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
722 (best_macro_match): Likewise, converting from a typedef to a
724 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
725 (lookup_name_fuzzy): Update for change of best_macro_match to a
726 subclass with a ctor that calls cpp_forall_identifiers.
728 2016-07-20 David Malcolm <dmalcolm@redhat.com>
730 * c-decl.c (implicit_decl_warning): Update for conversion of
731 return type of lookup_name_fuzzy to const char *.
732 (undeclared_variable): Likewise.
733 (lookup_name_fuzzy): Convert return type from tree to
735 * c-parser.c (c_parser_declaration_or_fndef): Update for
736 conversion of return type of lookup_name_fuzzy to const char *.
737 (c_parser_parameter_declaration): Likewise.
739 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
741 * c-parser.c (c_parser_oacc_declare): Don't scan for
743 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
744 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
745 zero-length subarrays.
747 2016-07-15 Jakub Jelinek <jakub@redhat.com>
750 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
751 instead of FUZZY_LOOKUP_NAME.
752 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
753 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
755 2016-07-14 Jakub Jelinek <jakub@redhat.com>
758 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
760 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
762 * c-parser.c (c_parser_generic_selection): Make type of variable
764 (c_parser_omp_declare_simd): Likewise.
766 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
768 * c-decl.c (struct c_struct_parse_info): Change member types
769 from vec to auto_vec.
770 (start_struct): Adjust.
771 (finish_struct): Likewise.
773 2016-07-02 Jakub Jelinek <jakub@redhat.com>
776 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
778 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
780 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
781 Move pragma context checking into...
782 (c_parser_omp_cancellation_point): ... here, and improve
784 * c-typeck.c (c_finish_omp_cancel)
785 (c_finish_omp_cancellation_point): Improve diagnostic messages.
787 2016-06-29 Jakub Jelinek <jakub@redhat.com>
790 * c-typeck.c (c_build_qualified_type): Don't clear
791 C_TYPE_INCOMPLETE_VARS for the main variant.
793 2016-06-28 Martin Sebor <msebor@redhat.com>
796 * c-typeck.c (output_init_element): Diagnose incompatible types
797 before non-constant initializers.
799 2016-06-28 Jakub Jelinek <jakub@redhat.com>
801 * Make-lang.in: Don't cat ../stage_current if it does not exist.
803 2016-06-23 Andi Kleen <ak@linux.intel.com>
805 * Make-lang.in: Add support for autofdo.
807 2016-06-22 David Malcolm <dmalcolm@redhat.com>
810 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
811 (implicit_decl_warning): When issuing warnings for implicit
812 declarations, attempt to provide a suggestion via
814 (undeclared_variable): Likewise when issuing errors.
815 (lookup_name_in_scope): Likewise.
816 (struct edit_distance_traits<cpp_hashnode *>): New struct.
817 (best_macro_match): New typedef.
818 (find_closest_macro_cpp_cb): New function.
819 (lookup_name_fuzzy): New function.
820 * c-parser.c: Include gcc-rich-location.h.
821 (c_token_starts_typename): Split out case CPP_KEYWORD into...
822 (c_keyword_starts_typename): ...this new function.
823 (c_parser_declaration_or_fndef): When issuing errors about
824 missing "struct" etc, add a fixit. For other kinds of errors,
825 attempt to provide a suggestion via lookup_name_fuzzy.
826 (c_parser_parms_declarator): When looking ahead to detect typos in
827 type names, also reject CPP_KEYWORD.
828 (c_parser_parameter_declaration): When issuing errors about
829 unknown type names, attempt to provide a suggestion via
831 * c-tree.h (c_keyword_starts_typename): New prototype.
833 2016-06-20 Joseph Myers <joseph@codesourcery.com>
836 * c-typeck.c (build_conditional_expr): Return error_mark_node if
837 c_common_type returns error_mark_node.
839 2016-06-19 Martin Sebor <msebor@redhat.com>
842 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
843 __alignof__ (expression).
845 2016-06-14 David Malcolm <dmalcolm@redhat.com>
847 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
849 2016-06-14 David Malcolm <dmalcolm@redhat.com>
851 * c-typeck.c (build_component_ref): Simplify fixit code by
852 using gcc_rich_location::add_fixit_misspelled_id.
853 (set_init_label): Likewise.
855 2016-06-13 David Malcolm <dmalcolm@redhat.com>
857 * c-parser.c (c_parser_initelt): Provide location of name for new
858 location_t param of set_init_label.
859 * c-tree.h (set_init_label): Add location_t param.
860 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
861 param and use it when issuing error messages about unrecognized
862 field names. Attempt to provide a fixit hint if appropriate,
863 otherwise update the error message to provide the type name.
865 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
868 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
871 2016-06-08 Martin Sebor <msebor@redhat.com>
872 Jakub Jelinek <jakub@redhat.com>
876 * c-typeck.c (convert_arguments): Don't promote last argument
877 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
879 2016-06-08 Marek Polacek <polacek@redhat.com>
882 * c-decl.c (grokdeclarator): Check TYPE_P.
885 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
888 2016-06-07 David Malcolm <dmalcolm@redhat.com>
890 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
891 and structure element reference, capture the location of the
892 element name token and pass it to build_component_ref.
893 (c_parser_postfix_expression_after_primary): Likewise for
894 structure element dereference.
895 (c_parser_omp_variable_list): Likewise for
896 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
897 * c-tree.h (build_component_ref): Add location_t param.
898 * c-typeck.c (build_component_ref): Add location_t param
899 COMPONENT_LOC. Use it, if available, when issuing hints about
900 mispelled member names to provide a fixit replacement hint.
902 2016-06-06 Marek Polacek <polacek@redhat.com>
905 * c-parser.c (c_parser_direct_declarator): Set location.
907 2016-06-06 Marek Polacek <polacek@redhat.com>
909 * c-typeck.c (comptypes_internal): Handle comparisons of
910 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
911 TYPE_REF_CAN_ALIAS_ALL.
913 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
915 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
916 arguments as addressable when async clause exists.
918 2016-05-30 Jakub Jelinek <jakub@redhat.com>
921 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
922 when combined with target construct.
924 2016-05-26 Jakub Jelinek <jakub@redhat.com>
926 * c-parser.c (c_parser_omp_clause_schedule): Warn if
927 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
929 2016-05-25 Marek Polacek <polacek@redhat.com>
932 * c-decl.c (c_make_fname_decl): Don't check seen_error.
935 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
937 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
939 * c-parser.c (c_parser_oacc_declare): Add support for
940 GOMP_MAP_FIRSTPRIVATE_POINTER.
941 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
942 argument with enum c_omp_region_type ort.
943 (handle_omp_array_sections): Likewise. Update call to
944 handle_omp_array_sections_1.
945 (c_finish_omp_clauses): Add specific errors and warning messages for
946 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
947 call to handle_omp_array_sections.
949 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
951 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
953 2016-05-24 Richard Biener <rguenther@suse.de>
957 * c-typeck.c (build_array_ref): Do not complain about indexing
958 non-lvalue vectors. Adjust for function name change.
960 2016-05-20 Martin Sebor <msebor@redhat.com>
963 * c-typeck.c (error_init): Use
964 expansion_point_location_if_in_system_header.
965 (warning_init): Same.
967 2016-05-19 David Malcolm <dmalcolm@redhat.com>
970 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
972 (c_parser_postfix_expression): Likewise.
973 * c-tree.h (c_expr::set_error): New method.
974 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
975 that result's range is initialized.
977 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
979 * c-typeck.c (parser_build_unary_op): Fix formatting.
981 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
983 * c-decl.c (grokdeclarator): Remove errmsg and use of
984 targetm.invalid_return_type.
985 (grokparms): Remove errmsg and use of
986 targetm.invalid_parameter_type.
988 2016-05-13 Joseph Myers <joseph@codesourcery.com>
990 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
991 function return type.
993 2016-05-12 Marek Polacek <polacek@redhat.com>
996 * c-decl.c (build_compound_literal): Pass LOC down to
997 c_incomplete_type_error.
998 * c-tree.h (require_complete_type): Adjust declaration.
999 (c_incomplete_type_error): Likewise.
1000 * c-typeck.c (require_complete_type): Add location parameter, pass it
1001 down to c_incomplete_type_error.
1002 (c_incomplete_type_error): Add location parameter, pass it down to
1004 (build_component_ref): Pass location down to c_incomplete_type_error.
1005 (default_conversion): Pass location down to require_complete_type.
1006 (build_array_ref): Likewise.
1007 (build_function_call_vec): Likewise.
1008 (convert_arguments): Likewise.
1009 (build_unary_op): Likewise.
1010 (build_c_cast): Likewise.
1011 (build_modify_expr): Likewise.
1012 (convert_for_assignment): Likewise.
1013 (c_finish_omp_clauses): Likewise.
1015 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1018 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1020 * c-errors.c (pedwarn_c90): Return true if warned.
1021 * c-tree.h (pedwarn_c90): Change return type to bool.
1022 (enum c_declspec_word): Add new enumerator cdw_atomic.
1024 2016-05-11 Marek Polacek <polacek@redhat.com>
1027 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1028 diagnose_mismatched_attributes and call it.
1030 2016-05-10 Marek Polacek <polacek@redhat.com>
1033 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1034 on a declaration following the definition.
1036 2016-05-05 Jakub Jelinek <jakub@redhat.com>
1038 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1039 parse it through to c_parser_c99_block_statement.
1040 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1043 2016-05-04 Marek Polacek <polacek@redhat.com>
1045 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1048 2016-05-04 Marek Polacek <polacek@redhat.com>
1051 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1052 for macro expansions.
1054 2016-05-03 Marek Polacek <polacek@redhat.com>
1057 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1058 check_builtin_function_arguments.
1060 2016-05-03 Richard Biener <rguenther@suse.de>
1062 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1063 the checksum from the previous stage.
1065 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1067 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1068 c_finish_omp_clauses.
1069 (c_parser_omp_all_clauses): Likewise.
1070 (c_parser_oacc_cache): Likewise.
1071 (c_parser_oacc_loop): Likewise.
1072 (omp_split_clauses): Likewise.
1073 (c_parser_omp_declare_target): Likewise.
1074 (c_parser_cilk_all_clauses): Likewise.
1075 (c_parser_cilk_for): Likewise.
1076 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1077 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1079 2016-05-02 Marek Polacek <polacek@redhat.com>
1082 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1085 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1088 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1089 OACC_LOOP_CLAUSE_MASK.
1090 (c_parser_oacc_kernels_parallel): Update call to
1091 c_oacc_split_loop_clauses.
1093 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
1095 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1096 argument to build_modify_expr in two cases.
1098 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1100 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1101 warn_for_memset instead of warning directly here.
1103 2016-04-26 Marek Polacek <polacek@redhat.com>
1106 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1108 (c_parser_for_statement): ... here.
1109 (c_parser_if_statement): Use it.
1110 (c_parser_switch_statement): Use it.
1111 (c_parser_while_statement): Use it.
1114 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1116 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1119 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1120 instead of c_finish_cilk_clauses.
1121 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1122 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1123 floating-point variables in the linear clause for Cilk Plus.
1125 2016-04-18 Michael Matz <matz@suse.de>
1127 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1128 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1130 2016-04-15 Marek Polacek <polacek@redhat.com>
1133 * c-typeck.c (build_unary_op): Pass location down to error and
1136 2016-04-15 Jakub Jelinek <jakub@redhat.com>
1139 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1141 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1142 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1143 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1144 Adjust c_parser_pragma callers.
1145 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1147 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1149 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1150 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1151 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1152 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1153 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1154 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1155 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1156 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1158 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1159 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1162 2016-04-13 Marek Polacek <polacek@redhat.com>
1165 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1167 (c_parser_statement): Likewise.
1168 (c_parser_c99_block_statement): Likewise.
1169 (c_parser_while_statement): Likewise.
1170 (c_parser_for_statement): Likewise.
1171 (c_parser_if_body): Don't set IF_P here.
1172 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1173 about dangling else here.
1174 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1175 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1176 warn about dangling else here.
1178 2016-04-04 Marek Polacek <polacek@redhat.com>
1181 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1183 2016-03-31 Marek Polacek <polacek@redhat.com>
1186 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1188 2016-03-18 David Malcolm <dmalcolm@redhat.com>
1191 * c-parser.c (c_parser_postfix_expression): Set the source range
1192 for uses of "__builtin_types_compatible_p".
1194 2016-03-17 Jakub Jelinek <jakub@redhat.com>
1197 * c-typeck.c (composite_type): Don't count void_list_node
1198 into len, if the list is terminated by void_list_node, start
1199 with void_list_node instead of NULL for newargs. Stop
1202 2016-03-16 Marek Polacek <polacek@redhat.com>
1205 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1206 nested functions returning VM types.
1208 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1210 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1211 when calling c_finish_omp_clauses.
1213 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1216 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1219 2016-03-04 Marek Polacek <polacek@redhat.com>
1222 * c-parser.c (c_parser_postfix_expression): Call
1223 c_parser_cast_expression rather than c_parser_postfix_expression.
1225 2016-03-01 Jakub Jelinek <jakub@redhat.com>
1229 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1230 of incomplete decls to error_mark_node.
1232 2016-02-24 Marek Polacek <polacek@redhat.com>
1235 * c-decl.c (finish_decl): Don't update the copy of the type of a
1236 different decl type.
1238 2016-02-23 Jakub Jelinek <jakub@redhat.com>
1241 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1242 in id_kind reclassification.
1244 2016-02-16 Jakub Jelinek <jakub@redhat.com>
1247 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1249 2016-02-16 James Norris <jnorris@codesourcery.com>
1252 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1254 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1256 * c-decl.c (build_null_declspecs): Zero the entire struct.
1259 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1260 callers changed. If nested_p is true, use it to call
1261 finish_implicit_inits.
1262 * c-tree.h (finish_implicit_inits): Declare.
1263 * c-typeck.c (finish_implicit_inits): New function. Move code
1265 (push_init_level): ... here.
1266 (set_designator, process_init_element): Call finish_implicit_inits.
1268 2016-02-11 Jakub Jelinek <jakub@redhat.com>
1271 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1272 arguments for -Waddress warning.
1274 2016-02-04 Jakub Jelinek <jakub@redhat.com>
1277 * c-decl.c (finish_enum): When honoring mode attribute,
1278 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1280 2016-01-29 Jakub Jelinek <jakub@redhat.com>
1283 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1284 all type variants, not just TYPE_MAIN_VARIANT.
1286 2016-01-27 Jakub Jelinek <jakub@redhat.com>
1289 * c-decl.c (c_write_global_declarations_1): Warn with
1290 warn_unused_function if static prototype without definition
1293 2016-01-27 Marek Polacek <polacek@redhat.com>
1296 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1297 to unsigned, if needed. Add -Wsign-compare warning.
1299 2016-01-26 Jakub Jelinek <jakub@redhat.com>
1301 PR tree-optimization/69483
1302 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1304 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1307 * c-tree.h (incomplete_record_decls): Declare.
1308 * c-parser.c (incomplete_record_decls): Define.
1309 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1310 report error if any decl has zero size.
1311 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1312 or enum type to incomplete_record_decls.
1314 2016-01-14 Tom de Vries <tom@codesourcery.com>
1316 PR tree-optimization/68773
1317 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1320 2016-01-14 Marek Polacek <polacek@redhat.com>
1323 * c-decl.c (grokdeclarator): Provide more information for invalid
1326 2016-01-06 David Malcolm <dmalcolm@redhat.com>
1328 * c-parser.c (c_parser_unary_expression): For dereferences, build
1329 a combined location before calling build_indirect_ref, so that
1330 error reports cover the full range, manually updating the c_expr
1333 2016-01-06 Marek Polacek <polacek@redhat.com>
1336 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1337 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1340 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1342 Update copyright years.
1344 2016-01-04 Marek Polacek <polacek@redhat.com>
1347 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1348 optimization to use __atomic_fetch_* built-in if possible.
1350 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1352 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1354 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1357 2015-12-22 Marek Polacek <polacek@redhat.com>
1360 * c-typeck.c (build_component_ref): Warn when acessing elements of
1361 atomic structures or unions.
1363 2015-12-21 David Malcolm <dmalcolm@redhat.com>
1365 * c-typeck.c: Include "gcc-rich-location.h".
1366 (build_binary_op): In the two places that call binary_op_error,
1367 create a gcc_rich_location and populate it with the location of
1368 the binary op and its two operands.
1370 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1372 * c-parser.c (c_parser_statement_after_labels): When calling
1373 c_finish_return, Use the return expression's location if it has
1374 one, falling back to the location of the first token within it.
1375 * c-typeck.c (c_finish_return): When issuing warnings about
1376 the incorrect presence/absence of a return value, issue a note
1377 showing the declaration of the function.
1379 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1381 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1383 (c_parser_peek_nth_token): New function.
1384 (c_parser_peek_conflict_marker): New function.
1385 (c_parser_error): Detect conflict markers and report them as such.
1387 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1389 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1390 to preserve range information for the primary expression
1391 in the call to c_parser_postfix_expression_after_primary.
1393 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1395 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1396 expression location, falling back on the first token location,
1397 rather than always using the latter.
1399 2015-12-16 Marek Polacek <polacek@redhat.com>
1402 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1405 2015-12-15 Marek Polacek <polacek@redhat.com>
1408 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1411 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1413 * c-parser.c (c_parser_alignof_expression): Capture location of
1414 closing parenthesis (if any), or of end of unary expression, and
1415 use it to build a src_range for the expression.
1417 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1420 * c-parser.c (c_parser_get_builtin_args): Add
1421 "out_close_paren_loc" param, and write back to it.
1422 (c_parser_postfix_expression): Capture the closing
1423 parenthesis location for RID_CHOOSE_EXPR,
1424 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1425 RID_BUILTIN_SHUFFLE and use it to set the source range
1426 for such expressions; within RID_BUILTIN_COMPLEX set
1427 the underlying location.
1429 2015-12-07 Marek Polacek <polacek@redhat.com>
1432 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1433 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1435 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1437 * c-tree.h (c_build_va_arg): Adjust prototype.
1438 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1439 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1440 parameter, adjust throughout and issue an error if EXPR is a component
1441 with reverse storage order.
1443 2015-12-02 Jason Merrill <jason@redhat.com>
1445 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1446 (c_fully_fold_internal, decl_constant_value_for_optimization):
1447 Move from c-common.c.
1448 * c-tree.h: Declare decl_constant_value_for_optimization.
1449 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1451 2015-12-02 Joseph Myers <joseph@codesourcery.com>
1454 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1455 following link from declarator to next declarator. Track original
1456 qualified type and pass it to c_build_qualified_type.
1457 * c-typeck.c (c_build_qualified_type): Add arguments
1458 orig_qual_type and orig_qual_indirect.
1460 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1462 * c-parser.c (c_parser_omp_clause_name)
1463 (c_parser_oacc_all_clauses): Alphabetical sorting.
1465 2015-12-02 Jakub Jelinek <jakub@redhat.com>
1468 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1471 2015-12-01 Julian Brown <julian@codesourcery.com>
1472 Cesar Philippidis <cesar@codesourcery.com>
1473 James Norris <James_Norris@mentor.com>
1475 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1476 (c_parser_oacc_clause_use_device): New function.
1477 (c_parser_oacc_all_clauses): Add use_device support.
1478 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1479 (c_parser_oacc_host_data): New function.
1480 (c_parser_omp_construct): Add host_data support.
1481 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1482 * c-typeck.c (c_finish_oacc_host_data): New function.
1483 (c_finish_omp_clauses): Add use_device support.
1485 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
1488 * c-decl.c: Set TYPE_PACKED in variants.
1490 2015-11-27 Martin Liska <mliska@suse.cz>
1493 * c-array-notation.c (fix_builtin_array_notation_fn):
1494 Use release_vec_vec instead of vec::release.
1495 (build_array_notation_expr): Likewise.
1496 (fix_conditional_array_notations_1): Likewise.
1497 (fix_array_notation_expr): Likewise.
1498 (fix_array_notation_call_expr): Likewise.
1500 2015-11-27 Jakub Jelinek <jakub@redhat.com>
1503 * c-parser.c (c_parser_compound_statement_nostart): If
1504 last_label is true, use pragma_stmt instead of pragma_compound
1505 as second c_parser_pragma argument.
1506 (c_parser_omp_ordered, c_parser_omp_target_update,
1507 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1508 false as second argument to c_parser_skip_to_pragma_eol after
1509 diagnosing standalone directives used in pragma_stmt context.
1511 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1513 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1514 with "if (ENABLE_OFFLOADING)".
1516 2015-11-23 David Malcolm <dmalcolm@redhat.com>
1519 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1520 for various Objective-C constructs: Class.name syntax,
1521 @selector(), @protocol(), @encode(), and [] message syntax.
1523 2015-11-20 David Malcolm <dmalcolm@redhat.com>
1526 * c-typeck.c (should_suggest_deref_p): New function.
1527 (build_component_ref): Special-case POINTER_TYPE when
1528 generating a "not a structure of union" error message, and
1529 suggest a "->" rather than a ".", providing a fix-it hint.
1531 2015-11-19 David Malcolm <dmalcolm@redhat.com>
1533 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1534 candidate into a new function, find_closest_identifier.
1536 2015-11-19 Marek Polacek <polacek@redhat.com>
1539 * c-typeck.c (parser_build_binary_op): Properly handle
1540 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1542 2015-11-17 David Malcolm <dmalcolm@redhat.com>
1544 * c-parser.c (set_c_expr_source_range): Bulletproof both
1545 overloaded implementations against NULL expr->value.
1546 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1548 (c_parser_unary_expression): Likewise when handling addresses of
1550 (c_parser_postfix_expression): Likewise for statement expressions,
1551 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1552 __builtin_va_arg, and for __builtin_offset_of.
1553 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1554 src_range using the range of the braced initializer.
1555 (c_parser_transaction_expression): Set src_range for "ret" to a
1556 sane pair of values.
1558 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1560 * c-parser.c (c_finish_omp_declare_simd): Look for
1561 "simd" attribute as well. Update error message.
1563 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1565 * c-parser.c (c_parser_omp_declare_target): Adjust.
1567 2015-11-14 Jakub Jelinek <jakub@redhat.com>
1569 * c-typeck.c (c_finish_omp_clauses): Don't mark
1570 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1572 2015-11-14 Marek Polacek <polacek@redhat.com>
1574 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1575 * c-typeck.c: Likewise.
1577 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1579 * c-decl.c (warn_defaults_to): Pass line_table to
1581 * c-errors.c (pedwarn_c99): Likewise.
1582 (pedwarn_c90): Likewise.
1583 * c-parser.c (set_c_expr_source_range): New functions.
1584 (c_token::get_range): New method.
1585 (c_token::get_finish): New method.
1586 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1587 based on the range from the start of the LHS to the end of the
1589 (c_parser_conditional_expression): Likewise, based on the range
1590 from the start of the cond.value to the end of exp2.value.
1591 (c_parser_binary_expression): Call set_c_expr_source_range on
1592 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1593 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1594 based on the cast_loc through to the end of the expr.
1595 (c_parser_unary_expression): Likewise, based on the
1596 op_loc through to the end of op.
1597 (c_parser_sizeof_expression) Likewise, based on the start of the
1598 sizeof token through to either the closing paren or the end of
1600 (c_parser_postfix_expression): Likewise, using the token range,
1601 or from the open paren through to the close paren for
1602 parenthesized expressions.
1603 (c_parser_postfix_expression_after_primary): Likewise, for
1604 various kinds of expression.
1605 * c-tree.h (struct c_expr): Add field "src_range".
1606 (c_expr::get_start): New method.
1607 (c_expr::get_finish): New method.
1608 (set_c_expr_source_range): New decls.
1609 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1610 on ret for prefix unary ops.
1611 (parser_build_binary_op): Likewise, running from the start of
1612 arg1.value through to the end of arg2.value.
1614 2015-11-13 Marek Polacek <polacek@redhat.com>
1617 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1619 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1621 * c-typeck.c: Include spellcheck.h.
1622 (lookup_field_fuzzy_find_candidates): New function.
1623 (lookup_field_fuzzy): New function.
1624 (build_component_ref): If the field was not found, try using
1625 lookup_field_fuzzy and potentially offer a suggestion.
1627 2015-11-12 James Norris <jnorris@codesourcery.com>
1628 Joseph Myers <joseph@codesourcery.com>
1630 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1631 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1632 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1633 and PRAGMA_OMP_CLAUSE_LINK.
1634 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1635 and PRAGMA_OACC_CLAUSE_LINK.
1636 (OACC_DECLARE_CLAUSE_MASK): New definition.
1637 (c_parser_oacc_declare): New function.
1639 2015-11-12 Marek Polacek <polacek@redhat.com>
1642 * c-parser.c (c_parser_for_statement): Reclassify the token in
1645 2015-11-11 Marek Polacek <polacek@redhat.com>
1649 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1650 checking the size of an array.
1652 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1654 * c-array-notation.c: Remove unused header files.
1655 * c-aux-info.c: Likewise.
1656 * c-convert.c: Likewise.
1657 * c-decl.c: Likewise.
1658 * c-errors.c: Likewise.
1659 * c-lang.c: Likewise.
1660 * c-objc-common.c: Likewise.
1661 * c-parser.c: Likewise.
1662 * c-typeck.c: Likewise.
1663 * gccspec.c: Likewise.
1665 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1666 Cesar Philippidis <cesar@codesourcery.com>
1667 James Norris <jnorris@codesourcery.com>
1668 Julian Brown <julian@codesourcery.com>
1669 Nathan Sidwell <nathan@codesourcery.com>
1672 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1674 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1675 (c_parser_pragma): Parse 'acc routine'.
1676 (OACC_ROUTINE_CLAUSE_MARK): Define.
1677 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1679 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1682 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1683 location of the backward-goto to the start of the loop body.
1685 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1688 * c-parser.c (c_parser_while_statement): Finish the loop before
1689 parsing ahead for misleading indentation.
1690 (c_parser_for_statement): Likewise.
1692 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1694 * c-decl.c (finish_struct): If the structure has reverse storage
1695 order, rewrite the type of array fields with scalar component. Call
1696 maybe_apply_pragma_scalar_storage_order on entry.
1697 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1698 errors on bit-fields and reverse SSO here and not...
1699 (c_mark_addressable): ...here.
1700 (output_init_element): Adjust call to initializer_constant_valid_p.
1701 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1703 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1705 * c-decl.c (warn_defaults_to): Update for change in signature
1706 of diagnostic_set_info.
1707 * c-errors.c (pedwarn_c99): Likewise.
1708 (pedwarn_c90): Likewise.
1709 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1710 for textinfo::set_location.
1712 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1713 Thomas Schwinge <thomas@codesourcery.com>
1714 James Norris <jnorris@codesourcery.com>
1716 * c-parser.c (c_parser_omp_clause_name): Add support for
1717 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1718 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1719 default(none) in OpenACC.
1720 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1722 (c_parser_oacc_clause_tile): New function.
1723 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1724 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1725 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1727 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1728 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1730 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1731 (c_parser_oacc_update): Update the error message for missing clauses.
1732 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1733 and OMP_CLAUSE_INDEPENDENT.
1735 2015-11-05 Marek Polacek <polacek@redhat.com>
1738 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1739 deal with pre-evaluation on invalid types.
1741 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1742 Ilya Verbin <ilya.verbin@intel.com>
1744 * c-parser.c: Include context.h and gimple-expr.h.
1745 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1746 monotonic together with nonmonotonic.
1747 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1748 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1749 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1750 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1751 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1752 expressions on combined target teams before the target.
1753 (c_parser_omp_declare_target): If decl has "omp declare target" or
1754 "omp declare target link" attribute, and cgraph or varpool node already
1755 exists, then set corresponding flags. Call c_finish_omp_clauses
1756 in the parenthesized extended-list syntax case.
1757 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1759 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1760 on OMP_CLAUSE_REDUCTION array sections.
1761 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1762 into the constant offset, or for variable low-bound using
1763 POINTER_PLUS_EXPR. For structure element based array sections use
1764 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1765 (c_finish_omp_clauses): Drop generic_field_head, structure
1766 elements are now always mapped even as array section bases,
1767 diagnose same var in data sharing and mapping clauses. Diagnose if
1768 linear step on declare simd is neither a constant nor a uniform
1769 parameter. Look through POINTER_PLUS_EXPR for array section
1770 reductions. Diagnose the same var or function appearing multiple
1771 times on the same directive. Fix up wording for the to clause if t
1772 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1773 modifier on kinds other than dynamic or guided or nonmonotonic
1774 modifier together with ordered clause.
1776 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1777 Chung-Lin Tang <cltang@codesourcery.com>
1779 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1781 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1783 * c-array-notation.c: Reorder #include's and remove duplicates.
1784 * c-aux-info.c: Likewise.
1785 * c-convert.c: Likewise.
1786 * c-decl.c: Likewise.
1787 * c-errors.c: Likewise.
1788 * c-lang.c: Likewise.
1789 * c-objc-common.c: Likewise.
1790 * c-parser.c: Likewise.
1791 * c-typeck.c: Likewise.
1793 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1796 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1797 after calling build_qualified_type.
1799 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1800 Thomas Schwinge <thomas@codesourcery.com>
1801 James Norris <jnorris@codesourcery.com>
1802 Joseph Myers <joseph@codesourcery.com>
1803 Julian Brown <julian@codesourcery.com>
1804 Bernd Schmidt <bschmidt@redhat.com>
1806 * c-parser.c (c_parser_oacc_shape_clause): New.
1807 (c_parser_oacc_simple_clause): New.
1808 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1809 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1811 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1812 James Norris <jnorris@codesourcery.com>
1813 Cesar Philippidis <cesar@codesourcery.com>
1817 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1818 parameters, and handle these. Adjust all users.
1819 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1821 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1823 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1825 (c_finish_omp_construct): Declare function.
1826 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1827 Merge functions into...
1828 (c_finish_omp_construct): ... this new function.
1830 2015-10-22 Richard Biener <rguenther@suse.de>
1832 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1833 before folding a MINUS_EXPR.
1835 2015-10-21 Marek Polacek <polacek@redhat.com>
1838 * c-decl.c (start_function): Warn about vararg functions without
1841 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1843 * c-typeck.c (build_conditional_expr): Use boolean vector
1844 type for vector comparison.
1845 (build_vec_cmp): New.
1846 (build_binary_op): Use build_vec_cmp for comparison.
1848 2015-10-20 Marek Polacek <polacek@redhat.com>
1850 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1852 2015-10-20 Marek Polacek <polacek@redhat.com>
1855 * c-parser.c (c_parser_attributes): Break out of the loop if the
1856 token after an attribute isn't a comma.
1858 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1859 Aldy Hernandez <aldyh@redhat.com>
1861 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1862 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1863 (c_parser_omp_variable_list): Handle structure elements for
1864 map, to and from clauses. Handle array sections in reduction
1865 clause. Formatting fixes.
1866 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1867 if clause modifiers.
1868 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1869 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1870 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1871 c_parser_omp_clause_is_device_ptr): New functions.
1872 (c_parser_omp_clause_ordered): Parse optional parameter.
1873 (c_parser_omp_clause_reduction): Handle array reductions.
1874 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1875 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1877 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1878 (c_parser_omp_clause_depend_sink): New function.
1879 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1880 (c_parser_omp_clause_map): Parse release/delete map kinds and
1881 optional always modifier.
1882 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1883 and c_finish_omp_clauses callers.
1884 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1885 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1886 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1887 (OMP_CRITICAL_CLAUSE_MASK): Define.
1888 (c_parser_omp_critical): Parse critical clauses.
1889 (c_parser_omp_for_loop): Handle doacross loops, adjust
1890 c_finish_omp_for and c_finish_omp_clauses callers.
1891 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1892 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1893 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1894 (c_parser_omp_for): Disallow ordered clause when combined with
1895 distribute. Disallow linear clause when combined with distribute
1896 and not combined with simd.
1897 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1898 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1899 parse clauses and if depend clause is found, don't parse a body.
1900 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1901 Allow target parallel without for after it.
1902 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1903 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1904 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1906 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1907 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1908 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1909 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1911 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1912 defaultmap and is_device_ptr clauses.
1913 (c_parser_omp_target): Parse target parallel and target simd. Set
1914 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1915 and target exit data. Diagnose invalid map kinds.
1916 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1917 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1919 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1921 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1922 (c_parser_omp_taskloop): New function.
1923 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1924 handle PRAGMA_OMP_TASKLOOP.
1925 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1926 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1927 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1928 Add IS_OMP argument, handle structure element bases, diagnose
1929 bitfields, pass IS_OMP recursively, diagnose known zero length
1930 array sections in depend clauses, handle array sections in reduction
1931 clause, diagnose negative length even for pointers.
1932 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1933 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1934 array sections in reduction clause, set
1935 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1936 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1937 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1938 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1940 2015-10-06 Marek Polacek <polacek@redhat.com>
1942 * c-parser.c (c_parser_statement_after_labels): Use
1943 protected_set_expr_location.
1944 (c_parser_omp_clause_num_gangs): Likewise.
1945 (c_parser_omp_clause_num_threads): Likewise.
1946 (c_parser_omp_clause_num_workers): Likewise.
1947 (c_parser_omp_clause_vector_length): Likewise.
1948 (c_parser_omp_clause_num_teams): Likewise.
1949 (c_parser_omp_clause_thread_limit): Likewise.
1950 * c-typeck.c (build_c_cast): Likewise.
1951 (c_cast_expr): Likewise.
1953 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1955 * c-typeck.c (c_tree_equal): Use real_equal instead of
1958 2015-10-04 Jason Merrill <jason@redhat.com>
1960 * c-parser.c (c_lex_one_token): Handle @synchronized.
1961 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1962 can change whether the function is transaction_safe.
1964 2015-10-02 Marek Polacek <polacek@redhat.com>
1967 * c-typeck.c (convert_for_assignment): Use the expansion point
1968 location throughout.
1970 2015-10-02 Marek Polacek <polacek@redhat.com>
1973 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1974 and pass it down to c_parser_if_statement.
1975 (c_parser_else_body): Add CHAIN parameter and pass it down to
1976 c_parser_statement_after_labels.
1977 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1978 duplicated if-else-if conditions.
1980 2015-10-01 Marek Polacek <polacek@redhat.com>
1982 * c-typeck.c (convert_for_assignment): Improve commentary.
1984 2015-09-30 Marek Polacek <polacek@redhat.com>
1987 * c-typeck.c (c_finish_return): Use the expansion point location for
1988 certain "return with value" warnings.
1990 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1992 * c-parser.c (pragma_lex): Add loc argument.
1994 2015-09-15 Marek Polacek <polacek@redhat.com>
1997 * c-decl.c (tag_exists_p): New function.
1998 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1999 struct/union/enum keywords are missing.
2000 * c-tree.h (tag_exists_p): Declare.
2002 2015-09-15 Marek Polacek <polacek@redhat.com>
2004 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2005 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2006 Return NULL_TREE instead of 0.
2007 (lookup_name): Return NULL_TREE instead of 0.
2008 (lookup_name_in_scope): Likewise.
2009 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2010 (parser_xref_tag): Use false instead of 0.
2011 (start_struct): Use true instead of 1.
2012 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2014 2015-09-14 Marek Polacek <polacek@redhat.com>
2016 * c-typeck.c (set_nonincremental_init_from_string): Use
2017 HOST_WIDE_INT_M1U when shifting a negative value.
2019 2015-09-09 Mark Wielaard <mjw@redhat.com>
2021 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2024 2015-09-10 Jakub Jelinek <jakub@redhat.com>
2027 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2028 into OMP_FOR_PRE_BODY rather than before the loop.
2030 2015-09-09 Jakub Jelinek <jakub@redhat.com>
2033 * c-parser.c (c_parser_oacc_all_clauses,
2034 c_parser_omp_all_clauses): Remove invalid clause from
2035 list of clauses even if parser->error is set.
2038 * c-parser.c (c_parser_omp_clause_aligned,
2039 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2041 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2045 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2046 instead of c_parser_unary_expression. If the result is !lvalue_p,
2047 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2049 2015-09-04 Marek Polacek <polacek@redhat.com>
2052 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2054 2015-09-03 Martin Sebor <msebor@redhat.com>
2057 * c-typeck.c (convert_arguments, parser_build_unary_op,
2058 build_conditional_expr, c_cast_expr, convert_for_assignment,
2059 build_binary_op, _objc_common_truthvalue_conversion): Call
2061 (c_decl_implicit): Define.
2063 2015-09-02 Marek Polacek <polacek@redhat.com>
2066 * c-parser.c (c_parser_enum_specifier): Give a better error for
2069 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2071 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2073 2015-08-12 Marek Polacek <polacek@redhat.com>
2075 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2078 2015-08-03 Marek Polacek <polacek@redhat.com>
2081 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2083 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2085 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2087 * c-parser.c (c_parser_if_body): Take token_indent_info
2088 argument. Call warn_for_misleading_indentation even when the
2089 body is a semicolon. Extract token_indent_infos corresponding
2090 to the guard, body and next tokens. Adjust call to
2091 warn_for_misleading_indentation accordingly.
2092 (c_parser_else_body): Likewise.
2093 (c_parser_if_statement): Likewise.
2094 (c_parser_while_statement): Likewise.
2095 (c_parser_for_statement): Likewise.
2097 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2098 Manuel López-Ibáñez <manu@gcc.gnu.org>
2100 * c-decl.c (get_parm_info): Remove static var. Update warning
2103 2015-07-27 Marek Polacek <polacek@redhat.com>
2107 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2109 2015-07-20 Marek Polacek <polacek@redhat.com>
2112 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2113 (build_binary_op): Warn about left shift overflows.
2115 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
2117 * c-array-notation.c: Adjust includes for flags.h changes.
2118 * c-objc-common.c: Likewise.
2120 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2122 * c-array-notation.c: Adjust includes.
2123 * c-aux-info.c: Likewise.
2124 * c-convert.c: Likewise.
2125 * c-decl.c: Likewise.
2126 * c-errors.c: Likewise.
2127 * c-lang.c: Likewise.
2128 * c-objc-common.c: Likewise.
2129 * c-parser.c: Likewise.
2130 * c-typeck.c: Likewise.
2132 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2135 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2137 2015-06-29 Marek Polacek <polacek@redhat.com>
2140 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2141 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2142 about -Wswitch-bool here.
2143 (do_case): Update c_add_case_label call.
2144 (c_finish_case): Update c_do_switch_warnings call.
2146 2015-06-27 Marek Polacek <polacek@redhat.com>
2148 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2150 2015-06-26 Marek Polacek <polacek@redhat.com>
2152 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2154 * c-typeck.c (array_to_pointer_conversion): Likewise.
2155 (build_unary_op): Likewise.
2156 (c_finish_return): Likewise.
2158 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2160 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2161 * c-parser.c: Likewise.
2163 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2165 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2166 instead of pointer_hash.
2167 (detect_field_duplicates): Likewise.
2169 2015-06-25 Marek Polacek <polacek@redhat.com>
2171 * c-array-notation.c: Use VAR_P throughout.
2172 * c-decl.c: Likewise.
2173 * c-objc-common.c: Likewise.
2174 * c-parser.c: Likewise.
2175 * c-typeck.c: Likewise.
2177 2015-06-25 Marek Polacek <polacek@redhat.com>
2179 * c-decl.c: Use is_global_var throughout.
2180 * c-parser.c: Likewise.
2181 * c-typeck.c: Likewise.
2183 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2185 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2186 * c-aux-info.c: Likewise.
2187 * c-convert.c: Likewise.
2188 * c-decl.c: Likewise.
2189 * c-errors.c: Likewise.
2190 * c-lang.c: Likewise.
2191 * c-objc-common.c: Likewise.
2192 * c-parser.c: Likewise.
2193 * c-typeck.c: Likewise.
2195 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
2198 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2201 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2203 * c-decl.c (pop_scope): Register the main translation unit
2204 through the new debug hook.
2206 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2208 * c-array-notation.c : Adjust include files.
2209 * c-aux-info.c : Likewise.
2210 * c-convert.c : Likewise.
2211 * c-decl.c : Likewise.
2212 * c-errors.c : Likewise.
2213 * c-lang.c : Likewise.
2214 * c-lang.h : Likewise.
2215 * c-objc-common.c : Likewise.
2216 * c-parser.c : Likewise.
2217 * c-typeck.c : Likewise.
2219 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2221 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2222 immediately clobber it.
2223 (c_write_global_declarations_1): Remove call to
2224 check_global_declaration_1.
2225 (c_write_global_declarations_2): Remove.
2226 (c_write_final_cleanups): Rename from c_write_global_declarations.
2227 Remove call to finalize_compilation_unit.
2228 Remove calls to debugging hooks.
2229 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2230 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2231 * c-tree.h: Remove c_write_global_declarations.
2233 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2235 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2236 * c-aux-info.c: Likewise.
2237 * c-convert.c: Likewise.
2238 * c-decl.c: Likewise.
2239 * c-errors.c: Likewise.
2240 * c-lang.c: Likewise.
2241 * c-objc-common.c: Likewise.
2242 * c-parser.c: Likewise.
2243 * c-typeck.c: Likewise.
2245 2015-06-04 Marek Polacek <polacek@redhat.com>
2248 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2251 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2253 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2254 Warn for empty struct.
2255 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2257 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2259 * c-decl.c (start_function): Call plugin before parsing.
2260 (finish_function): Call plugin after parsing.
2262 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2265 * c-decl.c (merge_decls): Merge DECL_COMMON.
2267 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2269 * Make-lang.in (check_gcc_pallelize): Define.
2271 2015-05-22 Marek Polacek <polacek@redhat.com>
2274 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2277 2015-05-21 Marek Polacek <polacek@redhat.com>
2279 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2282 2015-05-20 Marek Polacek <polacek@redhat.com>
2284 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2285 * c-typeck.c: Likewise.
2287 2015-05-19 Marek Polacek <polacek@redhat.com>
2289 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2291 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2294 * c-parser.c (c_parser_omp_for_loop): Don't add
2295 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2296 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2297 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2300 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2302 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
2305 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2308 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2311 2015-05-14 Marek Polacek <polacek@redhat.com>
2315 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2318 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2320 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2321 to add a call to warn_for_misleading_indentation.
2322 (c_parser_else_body): Likewise, adding param "else_loc".
2323 (c_parser_if_statement): Check for misleading indentation.
2324 (c_parser_while_statement): Likewise.
2325 (c_parser_for_statement): Likewise.
2327 2015-05-08 Marek Polacek <polacek@redhat.com>
2330 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2331 (output_init_element): Likewise.
2333 2015-05-07 Marek Polacek <polacek@redhat.com>
2336 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2339 2015-04-30 Marek Polacek <polacek@redhat.com>
2341 * c-typeck.c (set_init_label): Call error_at instead of error and
2344 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2347 * c-typeck.c (c_build_va_arg): Clarify the error message.
2349 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2351 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2352 OMP_STANDALONE_CLAUSES.
2354 2015-04-28 Marek Polacek <polacek@redhat.com>
2356 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2358 2015-04-28 Marek Polacek <polacek@redhat.com>
2361 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2363 2015-04-25 Marek Polacek <polacek@redhat.com>
2366 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2369 2015-04-23 Marek Polacek <polacek@redhat.com>
2372 * c-decl.c (set_labels_context_r): New function.
2373 (store_parm_decls): Call it via walk_tree_without_duplicates.
2374 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2375 instead of create_tmp_var. Build TARGET_EXPR instead of
2377 (build_atomic_assign): Use create_tmp_var_raw instead of
2378 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2380 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2382 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2383 (c_parser_omp_target_update): Add missed %> to error_at ().
2385 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2388 * c-decl.c (c_default_pointer_mode): Remove definition.
2389 * c-tree.h (c_default_pointer_mode): Remove declaration.
2391 2015-03-27 Tobias Burnus <burnus@net-b.de>
2394 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2396 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2397 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2398 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2400 2015-03-19 Jakub Jelinek <jakub@redhat.com>
2402 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2403 attribute for DECL_EXTERNAL VAR_DECLs.
2405 2015-03-11 Jakub Jelinek <jakub@redhat.com>
2407 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2410 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2413 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2414 before preparing arguments to warn_logical_not_parentheses.
2416 2015-03-09 Jakub Jelinek <jakub@redhat.com>
2419 * c-typeck.c (parser_build_binary_op): Don't warn for
2420 !!x == y or !b == y where b is _Bool.
2422 2015-03-09 Marek Polacek <polacek@redhat.com>
2424 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2425 * c-decl.c (grokdeclarator): Likewise.
2426 * c-typeck.c (build_binary_op): Likewise.
2428 2015-02-27 Marek Polacek <polacek@redhat.com>
2431 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2433 2015-02-14 Marek Polacek <polacek@redhat.com>
2436 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2437 declared through a typedef name.
2439 2015-02-13 Marek Polacek <polacek@redhat.com>
2442 * c-decl.c (grokdeclarator): Print also the type when giving
2443 the error message about array's incomplete element type.
2445 2015-02-11 Jakub Jelinek <jakub@redhat.com>
2448 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2449 check in the POP macro.
2451 2015-02-09 Marek Polacek <polacek@redhat.com>
2454 * c-typeck.c (process_init_element): Don't always wrap
2455 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2456 initializing a range of elements.
2458 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2462 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2464 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
2466 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2467 processing enum declaration.
2469 2015-01-29 Marek Polacek <polacek@redhat.com>
2472 * c-typeck.c (pop_init_level): If constructor_elements has
2473 exactly one element with integer_zerop value, set constructor_zeroinit
2474 to 1. Remove braces around warning_init call.
2476 2015-01-27 Jakub Jelinek <jakub@redhat.com>
2479 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2480 of FUNCTION_DECLs with error_mark_node.
2482 2015-01-26 Jakub Jelinek <jakub@redhat.com>
2485 * c-typeck.c (convert_arguments): Return -1 if there are
2486 error_args, even if we've diagnosed too many arguments.
2488 2015-01-21 Richard Biener <rguenther@suse.de>
2491 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2492 for builtins the user declared correctly.
2494 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2495 Bernd Schmidt <bernds@codesourcery.com>
2496 Cesar Philippidis <cesar@codesourcery.com>
2497 James Norris <jnorris@codesourcery.com>
2498 Jakub Jelinek <jakub@redhat.com>
2499 Ilmir Usmanov <i.usmanov@samsung.com>
2501 * c-parser.c: Include "gomp-constants.h".
2502 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2503 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2504 Use OMP_CLAUSE_SET_MAP_KIND.
2505 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2506 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2507 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2508 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2509 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2510 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2511 "copyout", "create", "delete", "deviceptr", "gang", "host",
2512 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2513 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2514 "present_or_create", "pcreate", "seq", "self", "vector",
2515 "vector_length", "wait", "worker".
2516 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2517 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2518 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2519 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2520 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2521 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2522 (c_parser_oacc_data_clause_deviceptr)
2523 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2524 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2525 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2526 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2527 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2528 (c_parser_oacc_parallel, c_parser_oacc_update)
2529 (c_parser_oacc_wait): New functions.
2530 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2531 (c_finish_oacc_data): New prototypes.
2532 * c-typeck.c: Include "gomp-constants.h".
2533 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2534 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2535 OMP_CLAUSE_SET_MAP_KIND.
2536 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2537 (c_finish_oacc_data): New functions.
2538 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2539 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2540 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2541 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2542 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2543 GOMP_MAP_FORCE_DEVICEPTR.
2545 2015-01-09 Michael Collison <michael.collison@linaro.org>
2547 * c-array-notation.c: Include hash-set.h, machmode.h,
2548 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2549 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2550 * c-aux-info.c: Ditto.
2551 * c-convert.c: Ditto.
2553 * c-errors.c: Ditto.
2554 * c-lang.c: Dittoxs.
2555 * c-objc-common.c: Ditto.
2556 * c-parser.c: Ditto.
2557 * c-typeck.c: Include hash-set.h, machmode.h,
2558 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2559 fold-const.h, wide-int.h, inchash.h, real.h and
2560 fixed-value.h due to flattening of tree.h.
2562 2015-01-07 Marek Polacek <polacek@redhat.com>
2565 * c-typeck.c (process_init_element): Disallow initialization of
2566 a flexible array member with a string constant if the structure
2569 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2572 * c-typeck.c (convert_for_assignment, c_finish_return): For
2573 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2574 types also set in_late_binary_op around convert call.
2575 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2576 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2577 result on expr as last argument to ubsan_instrument_float_cast,
2578 if in_late_binary_op, don't use c_save_expr but save_expr.
2580 Update copyright years.
2582 2015-01-05 Marek Polacek <polacek@redhat.com>
2585 * c-typeck.c (build_array_ref): Pass loc down to
2586 warn_array_subscript_with_type_char.
2588 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
2590 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2591 (common-pointer-type): For pointers to arrays take qualifiers from
2593 (build_conditional_expr): Add warnings for lost qualifiers.
2594 (comp-target-types): Allow pointers to arrays with different qualifiers.
2595 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2596 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2597 to PEDWARN_FOR_QUALIFIERS.
2599 2014-12-17 Jakub Jelinek <jakub@redhat.com>
2602 * c-convert.c: Include ubsan.h.
2603 (convert): For real -> integral casts and
2604 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2605 instead instrument the float cast directly.
2607 2014-11-29 Jakub Jelinek <jakub@redhat.com>
2609 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2610 c_finish_stmt_expr): Remove NULL last argument from
2611 create_tmp_var_raw and create_tmp_var calls.
2612 * c-array-notation.c (fix_builtin_array_notation_fn,
2613 build_array_notation_expr, fix_conditional_array_notations_1,
2614 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2616 2014-11-28 Marek Polacek <polacek@redhat.com>
2619 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2620 convert the right operand to integer type.
2622 2014-11-25 Marek Polacek <polacek@redhat.com>
2625 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2626 for inline functions.
2628 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2631 * c-typeck.c (build_array_ref): Adjust
2632 convert_vector_to_pointer_for_subscript caller. If it returns true,
2633 call non_lvalue_loc on the result.
2635 2014-11-11 Richard Biener <rguenther@suse.de>
2637 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2640 2014-11-10 Andi Kleen <ak@linux.intel.com>
2643 * c-parser.c (c_parser_statement_after_labels): Call
2645 (c_parser_if_statement): Dito.
2646 (c_parser_switch_statement): Dito.
2647 (c_parser_while_statement): Dito.
2648 (c_parser_do_statement): Dito.
2649 (c_parser_for_statement): Dito.
2650 * c-typeck.c (c_finish_loop): Dito.
2652 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2654 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2655 OPT_Wshift_count_overflow in the warnings.
2657 2014-10-30 Marek Polacek <polacek@redhat.com>
2659 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2660 print the stripped version as well, if they're not the same.
2662 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2664 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2667 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2669 * c-decl.c: Adjust include files.
2670 * c-parser.c: Ditto.
2672 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2673 Tom Tromey <tromey@redhat.com>
2675 * c-tree.h (enum c_oracle_request): New.
2676 (c_binding_oracle_function): New typedef.
2677 (c_binding_oracle, c_pushtag, c_bind): Declare.
2678 * c-decl.c (c_binding_oracle): New global.
2679 (I_SYMBOL_CHECKED): New macro.
2680 (i_symbol_binding): New function.
2681 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2682 (I_TAG_CHECKED): New macro.
2683 (i_tag_binding): New function.
2684 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2685 (I_LABEL_CHECKED): New macro.
2686 (i_label_binding): New function.
2687 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2688 (c_print_identifier): Save and restore c_binding_oracle.
2689 (c_pushtag, c_bind): New functions.
2691 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2693 * c-typeck.c: Adjust include files.
2695 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2698 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2699 initialization here...
2700 (c_initialize_diagnostics): ... but here. Set defaults after
2701 building pretty-printer.
2703 2014-10-23 Marek Polacek <polacek@redhat.com>
2706 * c-decl.c (pop_scope): Don't print warning in external_scope.
2708 2014-10-19 Marek Polacek <polacek@redhat.com>
2711 * c-typeck.c (output_init_element): Allow initializing objects with
2712 static storage duration with compound literals even in C99 and add
2715 2014-10-17 Marek Polacek <polacek@redhat.com>
2718 * c-typeck.c (digest_init): Allow initializing objects with static
2719 storage duration with compound literals even in C99 and add pedwarn
2722 2014-10-17 Marek Polacek <polacek@redhat.com>
2725 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2726 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2727 error multiple times. Print the type.
2729 2014-10-17 Marek Polacek <polacek@redhat.com>
2732 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2735 2014-10-17 Marek Polacek <polacek@redhat.com>
2737 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2738 (start_function): Use OPT_Wimplicit_int instead of 0.
2739 (store_parm_decls_oldstyle): Likewise.
2741 2014-10-17 Alan Modra <amodra@gmail.com>
2744 * c-decl.c (merge_decls): Don't merge section name or tls model
2745 to newdecl symtab node, instead merge to olddecl. Override
2746 existing olddecl section name. Set tls_model for all thread-local
2747 vars, not just OMP thread-private ones. Remove incorrect comment.
2749 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2751 * c-decl.c: Adjust include files.
2753 2014-10-14 DJ Delorie <dj@redhat.com>
2755 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2756 (c_token_starts_typename): Check all __intN, not just __int128.
2757 (c_token_starts_declspecs): Likewise.
2758 (c_parser_declspecs): Likewise.
2759 (c_parser_attribute_any_word): Likewise.
2760 (c_parser_objc_selector): Likewise.
2761 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2762 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2764 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2766 (finish_declspecs): Likewise.
2768 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2770 * c-parser.c (c_parser_all_labels): New function to replace
2772 (c_parser_statement): Call the new function.
2774 2014-10-09 Marek Polacek <polacek@redhat.com>
2777 * c-typeck.c (pop_init_level): Don't warn about initializing
2780 2014-10-07 Marek Polacek <polacek@redhat.com>
2783 * c-decl.c (header_for_builtin_fn): New function.
2784 (implicitly_declare): Suggest which header to include.
2786 2014-10-07 Marek Polacek <polacek@redhat.com>
2788 * c-convert.c (convert): Use error_operand_p.
2789 * c-typeck.c (require_complete_type): Likewise.
2790 (really_atomic_lvalue): Likewise.
2791 (digest_init): Likewise.
2792 (handle_omp_array_sections_1): Likewise.
2794 2014-10-03 Marek Polacek <polacek@redhat.com>
2797 * c-decl.c (pop_scope): Don't warn about "inline function declared
2798 but never defined" for functions marked with gnu_inline attribute.
2800 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2803 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2804 on low_bound and length.
2806 2014-09-24 Marek Polacek <polacek@redhat.com>
2810 * c-parser.c: Don't define CPP_KEYWORD.
2811 (c_parser_switch_statement): Pass original type to c_finish_case.
2812 * c-tree.h (c_finish_case): Update declaration.
2813 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2814 conditionally to c_do_switch_warnings.
2816 2014-09-03 Marek Polacek <polacek@redhat.com>
2819 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2822 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2823 Balaji V. Iyer <balaji.v.iyer@intel.com>
2824 Igor Zamyatin <igor.zamyatin@intel.com>
2826 * c-parser.c (c_parser_cilk_for): New function.
2827 (c_parser_cilk_grainsize): Likewise.
2828 (c_get_temp_regvar): Likewise.
2829 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2830 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2831 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2832 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2835 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2837 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2838 with using HOST_WIDE_INT without truncation to 'int'
2840 2014-08-22 Marek Polacek <polacek@redhat.com>
2843 * c-typeck.c (parser_build_binary_op): Adjust call to
2844 warn_logical_not_parentheses.
2846 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2849 * c-parser.c (c_parser_array_notation): Check for correct
2850 type of an array added.
2852 2014-08-19 Marek Polacek <polacek@redhat.com>
2855 * c-typeck.c (build_binary_op): If either operand of a comparison
2856 is a boolean expression, call maybe_warn_bool_compare.
2858 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2861 * c-typeck.c (build_c_cast): Do a conversion even when the
2862 TYPE_MAIN_VARIANTs are the same.
2864 2014-08-19 Marek Polacek <polacek@redhat.com>
2866 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2867 pedwarn_c99 instead of pedwarn.
2868 (grokfield): Likewise.
2869 (warn_defaults_to): New function.
2870 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2871 Unconditionally call pedwarn_c99 instead of pedwarn.
2872 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2873 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2874 check flag_isoc11 before.
2875 * c-errors.c (pedwarn_c99): Change the return type to bool.
2876 Handle -Wc99-c11-compat.
2877 * c-parser.c (disable_extension_diagnostics): Handle
2878 warn_c99_c11_compat.
2879 (restore_extension_diagnostics): Likewise.
2880 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2881 instead of pedwarn, don't check flag_isoc11 before.
2882 (c_parser_declspecs): Likewise.
2883 (c_parser_alignas_specifier): Likewise.
2884 (c_parser_alignof_expression): Likewise.
2885 (c_parser_generic_selection): Likewise.
2886 * c-tree.h (pedwarn_c99): Update declaration.
2887 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2890 2014-08-19 Marek Polacek <polacek@redhat.com>
2892 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2894 * c-errors.c: Include "opts.h".
2895 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2896 * c-parser.c (disable_extension_diagnostics): Handle negative value
2897 of warn_c90_c99_compat, too.
2898 (restore_extension_diagnostics): Likewise.
2899 (c_parser_compound_statement_nostart): Pass
2900 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2902 2014-08-12 Marek Polacek <polacek@redhat.com>
2904 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2906 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2908 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2910 2014-08-10 Marek Polacek <polacek@redhat.com>
2913 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2914 Call pedwarn_c90 instead of pedwarn.
2915 (check_bitfield_type_and_width): Likewise.
2916 (declspecs_add_qual): Likewise.
2917 (declspecs_add_type): Likewise.
2918 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2919 Adjust to only call pedwarn_c90.
2920 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2921 pedwarn_c90 instead of pedwarn.
2922 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2923 * c-parser.c (disable_extension_diagnostics): Handle
2924 warn_c90_c99_compat.
2925 (restore_extension_diagnostics): Likewise.
2926 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2927 pedwarn_c90 instead of pedwarn.
2928 (c_parser_initelt): Likewise.
2929 (c_parser_postfix_expression): Likewise.
2930 (c_parser_postfix_expression_after_paren_type): Likewise.
2931 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2932 * c-tree.h: Fix formatting.
2933 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2934 pedwarn_c90 instead of pedwarn.
2936 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2938 * c-typeck.c: Remove include of pointer-set.h.
2940 2014-08-07 Marek Polacek <polacek@redhat.com>
2942 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2944 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2946 * c-typeck.c: Use hash_map instead of pointer_map.
2948 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2950 * c-decl.c: Use hash_set instead of pointer_set.
2952 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2955 * c-array-notation.c (expand_array_notations): Handling
2958 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2961 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2964 2014-07-30 Tom Tromey <tromey@redhat.com>
2966 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2968 (really_start_incremental_init, push_init_level): Initialize
2970 (pop_init_level): Set global designator_depth.
2971 (process_init_element): Check for designated_init attribute.
2973 2014-07-20 Marek Polacek <polacek@redhat.com>
2976 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2977 (implicitly_declare): Pass location to implicit_decl_warning.
2979 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2982 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2983 If non-NULL, call c_parser_check_literal_zero.
2984 (c_parser_check_literal_zero): New function.
2985 (c_parser_postfix_expression_after_primary): Adjust
2986 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2988 2014-07-06 Marek Polacek <polacek@redhat.com>
2991 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2992 * c-tree.h (C_ARRAY_PARAMETER): Define.
2993 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2996 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2997 Chen Gang <gang.chen.5i5j@gmail.com>
2999 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3002 2014-07-01 Marek Polacek <polacek@redhat.com>
3004 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3005 instead of 0 to WARN_FOR_ASSIGNMENT.
3007 2014-07-01 Marek Polacek <polacek@redhat.com>
3010 * c-typeck.c (convert_for_assignment): Pass
3011 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3013 2014-06-30 Marek Polacek <polacek@redhat.com>
3015 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3016 has no_sanitize_undefined attribute.
3018 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3021 * c-array-notation.c (fix_builtin_array_notation_fn):
3022 Check for 0 arguments in builtin call. Check that bultin argument is
3024 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3027 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3029 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3030 qualifiers in __auto_type for atomic types.
3031 (c_parser_typeof_specifier): Discard all type qualifiers in
3032 __typeof__ for atomic types.
3034 2014-06-25 Marek Polacek <polacek@redhat.com>
3037 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3038 the return expression to c_finish_return.
3040 2014-06-25 Jakub Jelinek <jakub@redhat.com>
3042 * c-typeck.c (c_finish_omp_clauses): Make sure
3043 OMP_CLAUSE_LINEAR_STEP has correct type.
3045 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3049 2014-06-24 Jakub Jelinek <jakub@redhat.com>
3051 * c-parser.c (c_parser_omp_for_loop): For
3052 #pragma omp parallel for simd move lastprivate clause from parallel
3053 to for rather than simd.
3055 2014-06-23 Marek Polacek <polacek@redhat.com>
3057 * c-typeck.c (parser_build_binary_op): Don't call
3058 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3060 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
3062 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3063 * c-decl.c (merge_decls): Likewise.
3065 2014-06-09 Marek Polacek <polacek@redhat.com>
3068 * c-typeck.c (error_init): Call inform instead of error_at.
3069 (pedwarn_init): Call inform instead of pedwarn.
3070 (warning_init): Call inform instead of warning_at.
3072 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
3074 * c-decl.c (merge_decls): Use set_decl_section_name.
3075 (duplicate_decls): Remove node if it exists.
3077 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3080 * c-typeck.c (push_init_level, process_init_element,
3081 pop_init_level): Correct check for zero initialization, move
3082 missing brace warning to respect zero initialization.
3084 2014-06-05 Marek Polacek <polacek@redhat.com>
3087 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3089 2014-06-05 Marek Polacek <polacek@redhat.com>
3092 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3093 on the left hand side operand of a comparison.
3095 2014-06-05 Marek Polacek <polacek@redhat.com>
3098 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3099 Print note only if the warning was printed.
3101 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3104 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3107 2014-06-03 Marek Polacek <polacek@redhat.com>
3110 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3112 * c-tree.h (c_start_case): Update.
3113 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3114 switch condition has boolean value.
3116 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
3118 * c-decl.c: Include builtins.h.
3119 * c-parser.c: Likewise.
3121 2014-05-27 Marek Polacek <polacek@redhat.com>
3124 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3125 error and warning calls to error_at and warning_at. Pass location of
3126 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3127 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3128 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3130 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3133 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3134 function parameters.
3136 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
3138 * c-decl.c (merge_decls): Preserve symtab node pointers.
3139 (duplicate_decls): Free new decl.
3141 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3143 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3146 * c-parser.c (c_parser_omp_target): Return bool values.
3148 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3150 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3151 num_teams_loc variable to num_thread_limit_loc.
3153 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3155 * c-array-notation.c (expand_array_notations): Use void_node
3156 instead of void_zero_node.
3158 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3160 * c-decl.c (finish_struct): Adjust.
3161 (finish_enum): Likewise.
3163 (record_inline_static): Likewise.
3164 (push_scope): Likewise.
3165 (make_label): Likewise.
3166 (lookup_label_for_goto): Likewise.
3167 (finish_struct): Likewise.
3168 (finish_enum): Likewise.
3169 (store_parm_decls): Likewise.
3170 (c_push_function_context): Likewise.
3171 * c-lang.h: Remove usage of variable_size gty attribute.
3172 * c-parser.c (c_parse_init): Adjust.
3173 (c_parse_file): Likewise.
3175 2014-05-13 Marek Polacek <polacek@redhat.com>
3178 * c-typeck.c (convert_for_assignment): Pass location to
3179 WARN_FOR_ASSIGNMENT instead of input_location.
3181 2014-05-10 Marek Polacek <polacek@redhat.com>
3183 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3184 maybe_warn_string_init.
3185 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3186 maybe_warn_string_init.
3187 * c-tree.h (maybe_warn_string_init): Update declaration.
3188 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3189 Call pedwarn_init with loc instead of with input_location.
3190 (digest_init): Pass init_loc to maybe_warn_string_init.
3191 (pop_init_level): Call pedwarn_init with loc instead of with
3193 (set_init_index): Likewise.
3194 (process_init_element): Likewise.
3196 2014-05-09 Marek Polacek <polacek@redhat.com>
3199 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3200 (c_parser_initelt): Pass location to set_init_label. Pass array index
3201 location to set_init_index.
3202 * c-tree.h (push_init_level): Update declaration.
3203 (pop_init_level): Likewise.
3204 (set_init_index): Likewise.
3205 (set_init_label): Likewise.
3206 * c-typeck.c (error_init): Add location parameter. Call error_at
3208 (digest_init): Pass init_loc to error_init.
3209 (really_start_incremental_init):
3210 (push_init_level): Add location parameter. Pass loc to pop_init_level
3212 (pop_init_level): Likewise.
3213 (set_designator): Add location parameter. Pass loc to pop_init_level,
3214 push_init_level, and error_init.
3215 (set_init_index): Add location parameter. Pass loc to error_init and
3217 (set_init_label): Likewise.
3218 (output_init_element): Pass loc to error_init.
3219 (process_init_element): Pass loc to error_init, pop_init_level,
3220 pedwarn_init, and push_init_level.
3222 2014-05-09 Marek Polacek <polacek@redhat.com>
3225 * c-parser.c (c_parser_attributes): Parse the arguments as an
3226 expression-list if the attribute takes identifier.
3228 2014-05-08 Marek Polacek <polacek@redhat.com>
3231 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3234 2014-05-08 Marek Polacek <polacek@redhat.com>
3237 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3240 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3241 Mike Stump <mikestump@comcast.net>
3242 Richard Sandiford <rdsandiford@googlemail.com>
3244 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3245 (finish_enum): Use wide-int interfaces.
3246 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3247 * c-typeck.c (build_c_cast): Likewise.
3248 (set_nonincremental_init_from_string): Likewise.
3249 (c_tree_equal): Likewise.
3251 2014-05-02 Marek Polacek <polacek@redhat.com>
3254 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3255 Return size_one_node when the type is not complete.
3256 (pointer_diff): Remove comment.
3257 (build_unary_op): Improve error messages.
3259 2014-05-02 Marek Polacek <polacek@redhat.com>
3261 * c-typeck.c (c_finish_return): Separate warning_at calls.
3263 2014-05-02 Marek Polacek <polacek@redhat.com>
3265 * c-tree.h (error_init): Remove declaration.
3266 (pedwarn_init): Likewise.
3267 * c-typeck.c (error_init): Make static and move above.
3268 (pedwarn_init): Likewise.
3269 (warning_init): Move above.
3270 (maybe_warn_string_init): Likewise.
3272 2014-05-01 Jeff Law <law@redhat.com>
3276 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3277 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3280 2014-05-02 Marek Polacek <polacek@redhat.com>
3283 * c-typeck.c (push_init_level): Set constructor_designated to
3284 p->designated for structures.
3286 2014-05-01 Marek Polacek <polacek@redhat.com>
3289 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3290 function-definition has an attribute after the declarator.
3292 2014-05-01 Marek Polacek <polacek@redhat.com>
3295 * c-typeck.c (warning_init): Add location_t parameter. Call
3296 warning_at instead of warning.
3297 (push_init_level): Pass input_location to warning_init.
3298 (add_pending_init): Add location_t parameter. Pass loc to
3300 (set_nonincremental_init): Pass input_location to add_pending_init.
3301 (set_nonincremental_init_from_string): Likewise.
3302 (output_init_element): Pass loc to warning_init and to
3305 2014-05-01 Marek Polacek <polacek@redhat.com>
3308 * c-typeck.c (c_finish_return): Distinguish between label and variable
3309 when warning about returning local address.
3311 2014-05-01 Marek Polacek <polacek@redhat.com>
3314 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3317 2014-05-01 Marek Polacek <polacek@redhat.com>
3320 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3321 instead of 0 to WARN_FOR_QUALIFIERS.
3323 2014-05-01 Marek Polacek <polacek@redhat.com>
3326 * c-typeck.c (default_conversion): Use better location for
3329 2014-04-30 Marek Polacek <polacek@redhat.com>
3331 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3332 also when SANITIZE_FLOAT_DIVIDE is on.
3334 2014-04-30 Marek Polacek <polacek@redhat.com>
3337 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3338 and pedwarn_init. Use loc insted of input_location.
3340 2014-04-30 Marek Polacek <polacek@redhat.com>
3343 * c-typeck.c (build_binary_op): Use location when warning about
3346 2014-04-25 Marek Polacek <polacek@redhat.com>
3349 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3350 always_inline/noinline and hot/cold attributes.
3352 2014-04-25 Marek Polacek <polacek@redhat.com>
3355 * c-parser.c (c_parser_initelt): Pass input_location to
3356 process_init_element.
3357 (c_parser_initval): Pass loc to process_init_element.
3358 * c-tree.h (process_init_element): Adjust declaration.
3359 * c-typeck.c (push_init_level): Pass input_location to
3360 process_init_element.
3361 (pop_init_level): Likewise.
3362 (set_designator): Likewise.
3363 (output_init_element): Add location_t parameter. Pass loc to
3365 (output_pending_init_elements): Pass input_location to
3366 output_init_element.
3367 (process_init_element): Add location_t parameter. Pass loc to
3368 output_init_element.
3370 2014-04-24 Jakub Jelinek <jakub@redhat.com>
3372 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3373 atomic-clause, allow comma in between atomic-clause and
3376 2014-04-22 Jakub Jelinek <jakub@redhat.com>
3379 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3380 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3382 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3385 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3386 create_tmp_var instead build_decl for creating temps.
3387 (build_array_notation_expr): Likewise.
3388 (fix_conditional_array_notations_1): Likewise.
3389 (fix_array_notation_expr): Likewise.
3390 (fix_array_notation_call_expr): Likewise.
3392 2014-03-28 Jakub Jelinek <jakub@redhat.com>
3395 * c-tree.h (c_build_function_call_vec): New prototype.
3396 * c-typeck.c (build_function_call_vec): Don't call
3397 resolve_overloaded_builtin here.
3398 (c_build_function_call_vec): New wrapper function around
3399 build_function_call_vec. Call resolve_overloaded_builtin here.
3400 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3401 Call c_build_function_call_vec instead of build_function_call_vec.
3402 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3403 * c-decl.c (finish_decl): Likewise.
3405 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3408 * c-typeck.c: Use correct format string in cast-qual warning
3410 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3412 * c-decl.c (c_decl_attributes): Use
3413 lang_hooks.types.omp_mappable_type.
3414 * c-typeck.c (c_finish_omp_clauses): Likewise.
3416 2014-03-06 Marek Polacek <polacek@redhat.com>
3419 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3420 of checking tree code.
3422 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3424 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3425 (c_parser_parameter_declaration): Likewise.
3427 2014-02-19 Marek Polacek <polacek@redhat.com>
3430 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3431 Call mark_exp_read on exp.value.
3432 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3433 TREE_ADDRESSABLE on old instead of val.
3434 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3436 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3438 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3439 C_EXPR_APPEND by vec_safe_push.
3440 * c-tree.h (C_EXPR_APPEND): Remove.
3442 2014-01-31 Marek Polacek <polacek@redhat.com>
3445 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3446 build_function_call_vec.
3447 (build_function_call): Likewise.
3448 (build_atomic_assign): Likewise.
3449 (build_function_call_vec): Add arg_loc parameter. Use it.
3450 (convert_arguments): Likewise.
3451 (convert_for_assignment): Rename rhs_loc to expr_loc.
3452 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3453 (c_parser_objc_keywordexpr): Likewise.
3454 (c_parser_postfix_expression_after_primary): Call
3455 build_function_call_vec with expr_loc rather than op_loc.
3456 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3457 build_function_call_vec.
3458 (c_parser_expr_list): Add locations parameter. Fill it with locations
3459 of function arguments.
3460 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3462 2014-01-30 Marek Polacek <polacek@redhat.com>
3465 * c-typeck.c (build_function_call_vec): Use loc parameter.
3466 (convert_arguments): Add location parameter. Use it.
3467 (ep_convert_and_check): Likewise.
3468 (build_atomic_assign): Adjust convert_for_assignment call.
3469 (build_modify_expr): Likewise.
3470 (digest_init): Likewise.
3471 (c_finish_return): Likewise.
3472 (build_conditional_expr): Adjust ep_convert_and_check calls.
3473 (convert_for_assignment): Add rhs_loc parameter. Use it.
3474 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3477 2014-01-30 Richard Biener <rguenther@suse.de>
3480 * c-typeck.c (build_function_call_vec): Do not replace calls
3481 to a function via an incompatible type with a runtime abort.
3483 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3485 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3486 flag_enable_cilkplus with flag_cilkplus.
3487 (c_parser_direct_declarator_inner): Likewise.
3488 (c_parser_attribute_any_word): Likewise.
3489 (c_parser_attributes): Likewise.
3490 (c_parser_compound_statement): Likewise.
3491 (c_parser_statement_after_labels): Likewise.
3492 (c_parser_if_statement): Likewise.
3493 (c_parser_switch_statement): Likewise.
3494 (c_parser_do_statement): Likewise.
3495 (c_parser_for_statement): Likewise.
3496 (c_parser_unary_expression): Likewise.
3497 (c_parser_postfix_expression): Likewise.
3498 (c_parser_postfix_expression_after_primary): Likewise.
3499 (c_parser_postfix_expression_after_primary): Likewise.
3500 (c_parser_omp_clause_name): Likewise.
3501 (c_finish_omp_declare_simd): Likewise.
3502 (c_parser_cilk_verify_simd): Likewise.
3503 * c-typeck.c (build_array_ref): Likewise.
3504 (build_function_call_vec): Likewise.
3505 (convert_arguments): Likewise.
3506 (build_compound_expr): Likewise.
3507 (c_finish_return): Likewise.
3508 (c_finish_if_stmt): Likewise.
3509 (c_finish_loop): Likewise.
3510 (build_binary_op): Likewise.
3512 2014-01-23 Marek Polacek <polacek@redhat.com>
3515 * c-typeck.c (parser_build_binary_op): Use location instead of
3517 (build_binary_op): Pass location to shorten_compare.
3519 2014-01-23 Marek Polacek <polacek@redhat.com>
3522 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3525 2014-01-23 Marek Polacek <polacek@redhat.com>
3528 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3529 of a comma expression.
3530 (emit_side_effect_warnings): Likewise.
3532 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3535 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3536 function to use walk_tree and moved a lot of its functionality to
3537 expand_array_notations.
3538 (expand_array_notations): New function.
3540 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3542 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3543 attribute an attribute without value.
3545 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3548 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3549 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3551 2014-01-22 Marek Polacek <polacek@redhat.com>
3554 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3555 of remove_c_maybe_const_expr on op1 and op2.
3557 2014-01-15 Jakub Jelinek <jakub@redhat.com>
3560 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3561 effects, preevaluate rhs using SAVE_EXPR first.
3563 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3566 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3567 statements with if-elseif statements.
3569 2014-01-06 Marek Polacek <polacek@redhat.com>
3572 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3573 defined bit-field types only in ISO C.
3575 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3577 Update copyright years
3579 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3581 * c-array-notation.c: Use the standard form for the copyright notice.
3583 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3585 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3586 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3587 field in parser is not empty. If not-empty, call the function
3588 c_parser_finish_omp_declare_simd.
3589 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3590 between SIMD-enabled functions and #pragma simd. Added new parameter.
3591 (c_parser_cilk_all_clauses): Modified the usage of the function
3592 c_parser_cilk_clause_vectorlength as mentioned above.
3593 (c_parser_cilk_simd_fn_vector_attrs): New function.
3594 (c_finish_cilk_simd_fn_tokens): Likewise.
3595 (is_cilkplus_vector_p): Likewise.
3596 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3597 "nomask," and "mask" strings in clause name.
3598 (c_parser_omp_all_clauses): Added 3 new case statements:
3599 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3600 PRAGMA_CILK_CLAUSE_NOMASK.
3601 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3602 check for vector attribute and if so call the function
3603 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3604 called the function c_finish_cilk_simd_fn_tokens.
3605 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3606 parser field is non-empty. If so, parse them as you would parse
3607 the omp declare simd pragma.
3608 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3609 Added a check when step is a parameter and flag it as error.
3610 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3611 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3614 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3616 * c-parser.c (c_parser_omp_parallel): Fix description.
3618 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3620 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3621 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3622 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3623 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3625 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3628 * c-parser.c (c_parser_alignas_specifier): Use
3629 c_sizeof_or_alignof_type instead of c_alignof.
3630 (c_parser_alignof_expression): Likewise, with min_alignof
3631 parameter depending on alignof spelling used.
3633 2013-12-04 Marek Polacek <polacek@redhat.com>
3636 * c-decl.c (start_function): Don't warn for missing prototype for
3639 2013-12-03 Marek Polacek <polacek@redhat.com>
3642 * c-decl.c (build_compound_literal): Allow compound literals with
3643 empty initial value.
3645 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3648 * c-typeck.c (build_modify_expr): Diagnose assignment to
3649 expression with array type.
3651 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3654 * c-typeck.c (process_init_element): Do not treat a string as
3655 initializing a whole array when used with a designator for an
3658 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3661 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3662 an inline function following a static declaration.
3664 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3667 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3668 to p_name before calling c_parser_omp_teams instead of after.
3669 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3670 argument. Remove unused p_name variable.
3672 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3673 Jakub Jelinek <jakub@redhat.com>
3675 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3676 external_scope is NULL.
3678 2013-11-27 Tom de Vries <tom@codesourcery.com>
3679 Marc Glisse <marc.glisse@inria.fr>
3682 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3684 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3686 * c-typeck.c: Add required include files from gimple.h.
3688 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3690 * c-decl.c (define_label, shadow_tag_warned)
3691 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3692 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3693 (declspecs_add_type): Remove use of in_system_header macro.
3694 * c-parser.c (c_parser_unary_expression): Likewise.
3695 * c-typeck.c (store_init_value, process_init_element)
3696 (c_start_case): Likewise.
3698 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3701 * c-parser.c (c_parser_set_source_position_from_token): Remove
3702 reference to in_system_header from comment.
3704 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3706 * c-decl.c (grokdeclarator): Update comment to refer to
3707 tree_to_[su]hwi rather than tree_low_cst.
3709 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3711 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3712 tree_to_uhwi throughout.
3714 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3716 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3719 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3721 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3724 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3726 * c-parser.c (c_parser_cilk_simd): New.
3727 (c_parser_cilk_verify_simd): New.
3728 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3729 (c_parser_omp_for_loop): Add case for NE_EXPR.
3730 Set c_break_label for CILK_SIMD.
3731 (c_parser_cilk_clause_vectorlength): New.
3732 (c_parser_cilk_clause_linear): New.
3733 (c_parser_cilk_clause_name): New.
3734 (c_parser_cilk_all_clauses): New.
3735 * c-typeck.c (build_unary_op): Pass location argument to
3737 (build_modify_expr): Same.
3738 (build_asm_expr): Same.
3739 (c_finish_bc_stmt): Error on break/continue in loops.
3741 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3743 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3745 2013-11-14 Diego Novillo <dnovillo@google.com>
3747 * c-decl.c: Include print-tree.h.
3748 Include stor-layout.h.
3751 Include stringpool.h.
3752 * c-lang.c: Include fold-const.h.
3753 * c-parser.c: Include stringpool.h.
3755 Include stor-layout.h.
3757 Include trans-mem.h.
3758 * c-typeck.c: Include stor-layout.h.
3759 Include trans-mem.h.
3763 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3765 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3766 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3768 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3769 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3771 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3772 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3773 (c_parser_declarator, c_parser_direct_declarator_inner)
3774 (c_parser_parameter_declaration, c_parser_type_name): All callers
3776 (c_parser_declaration_or_fndef): Handle declarations with type
3777 determined from the initializer.
3779 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3781 * c-typeck.c: Include gimplify.h.
3783 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3785 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3786 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3788 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3789 or _Thread_local as appropriate in diagnostics.
3790 (build_null_declspecs): Initialize ret->thread_gnu_p.
3791 (declspecs_add_scspec): Handle either __thread or _Thread_local
3792 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3793 pedantic. Do not disallow _Thread_local extern and _Thread_local
3796 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3797 Andrew MacLeod <amacleod@redhat.com>
3799 * c-aux-info.c (gen_type): Handle atomic qualifier.
3800 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3801 qualifiers when compating types.
3802 (shadow_tag_warned): Handle atomic_p in declspecs.
3803 (quals_from_declspecs): Likewise.
3804 (start_decl): Use c_type_promotes_to when promoting argument
3806 (grokdeclarator): Handle _Atomic.
3807 (get_parm_info): Diagnose any qualifier on "void" as only
3809 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3810 comparing types. Use c_type_promotes_to when promoting argument
3812 (finish_function): Use c_type_promotes_to when promoting argument
3814 (build_null_declspecs): Handle atomic_p in declspecs.
3815 (declspecs_add_qual): Handle RID_ATOMIC.
3816 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3817 (c_token_starts_declspecs): Handle RID_ATOMIC.
3818 (c_parser_declspecs): Handle atomic type specifiers and
3820 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3821 from types of expressions with atomic type.
3822 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3823 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3824 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3825 (c_parser_statement_after_labels, c_parser_switch_statement)
3826 (c_parser_for_statement, c_parser_expr_no_commas)
3827 (c_parser_conditional_expression, c_parser_binary_expression)
3828 (c_parser_cast_expression, c_parser_unary_expression)
3829 (c_parser_postfix_expression)
3830 (c_parser_postfix_expression_after_primary, c_parser_expression):
3831 Use convert_lvalue_to_rvalue.
3832 (c_parser_expression_conv, c_parser_expr_list): Document
3833 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3834 (c_parser_objc_synchronized_statement): Use
3835 convert_lvalue_to_rvalue.
3836 (c_parser_objc_selector): Handle RID_ATOMIC.
3837 (c_parser_objc_receiver, c_parser_array_notation): Use
3838 convert_lvalue_to_rvalue.
3839 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3840 _Atomic (type-name).
3841 (struct c_declspecs): Add atomic_p field.
3842 (convert_lvalue_to_rvalue): Declare.
3843 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3844 corresponding atomic types.
3845 (qualify_type): Don't add _Atomic qualifiers from second argument.
3846 (comp_target_types): Do not allow _Atomic mismatches.
3847 (type_lists_compatible_p): Do not remove atomic qualifiers when
3849 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3850 (build_atomic_assign): New functions.
3851 (build_unary_op): Use build_atomic_assign for atomic increment and
3853 (build_conditional_expr): Do not treat _Atomic void as a qualified
3855 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3856 (find_anonymous_field_with_type, convert_to_anonymous_field)
3857 (convert_for_assignment): Do not remove atomic qualifiers when
3859 (digest_init): Do not accept initialization of arrays of atomic
3860 elements by string constants.
3861 (build_asm_expr): Use convert_lvalue_to_rvalue.
3862 (build_binary_op): Do not treat _Atomic void as a qualified
3865 2013-11-06 DJ Delorie <dj@redhat.com>
3867 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3868 both explicit and builtin, print the location of the explicit one.
3870 2013-11-05 Tobias Burnus <burnus@net-b.de>
3872 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3873 c_parser_omp_distribute, c_parser_omp_teams,
3874 c_parser_omp_target, c_parser_omp_declare): Handle
3877 2013-11-03 Marek Polacek <polacek@redhat.com>
3879 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3881 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3883 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3884 check_dup_generic at the end, unless remove is true.
3885 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3887 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3889 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3891 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3892 with decl that is not pointer nor array.
3894 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3896 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3897 a spawning function is found.
3898 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3899 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3900 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3901 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3903 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3904 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3906 (c_finish_return): Added a check to reject _Cilk_spawn in return
3908 (build_cilk_spawn): New function.
3909 (build_cilk_sync): Likewise.
3910 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3912 2013-10-27 Tobias Burnus <burnus@net-b.de>
3915 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3916 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3917 (c_parser_statement_after_labels): Update calls.
3919 2013-10-24 Tobias Burnus <burnus@net-b.de>
3922 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3923 Handle PRAGMA_IVDEP.
3924 (c_parser_statement_after_labels): Update call.
3926 2013-10-24 Marek Polacek <polacek@redhat.com>
3928 * c-parser.c (c_parser_struct_declaration): Add a comment.
3929 (c_parser_declarator): Don't allow _Alignas here.
3931 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3933 * c-parser.c: Include omp-low.h.
3934 * c-typeck.c: Likewise.
3936 2013-10-17 Marek Polacek <polacek@redhat.com>
3939 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3940 Document syntax of the array-declarator.
3941 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3943 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3944 (c_parser_struct_declaration): Likewise.
3945 (c_parser_declarator): Likewise.
3946 (c_parser_direct_declarator_inner): Likewise.
3947 (c_parser_parameter_declaration): Likewise.
3948 (c_parser_type_name): Likewise.
3950 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3952 * c-lang.h (current_omp_declare_target_attribute): New extern
3954 * c-parser.c: Include c-lang.h.
3955 (struct c_parser): Change tokens to c_token *.
3956 Add tokens_buf field. Change tokens_avail type to unsigned int.
3957 (c_parser_consume_token): If parser->tokens isn't
3958 &parser->tokens_buf[0], increment parser->tokens.
3959 (c_parser_consume_pragma): Likewise.
3960 (enum pragma_context): Add pragma_struct and pragma_param.
3961 (c_parser_external_declaration): Adjust
3962 c_parser_declaration_or_fndef caller.
3963 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3964 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3965 Adjust recursive call.
3966 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3968 (c_parser_parameter_declaration): Use pragma_param instead of
3970 (c_parser_compound_statement_nostart, c_parser_label,
3971 c_parser_for_statement): Adjust
3972 c_parser_declaration_or_fndef callers.
3973 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3974 it through to c_parser_conditional_expression.
3975 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3976 pass it through to c_parser_binary_expression. Adjust recursive
3978 (c_parser_binary_expression): Remove prec argument, add
3979 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3980 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3981 binop matches it, use build2 instead of parser_build_binary_op.
3982 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3983 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3984 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3985 Handle pragma_struct and pragma_param the same as pragma_external.
3986 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3987 (c_parser_omp_variable_list): Parse array sections for
3988 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3989 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3990 (c_parser_omp_clause_reduction): Handle user defined reductions.
3991 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3992 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3993 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3994 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3995 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3996 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3997 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3998 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3999 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4000 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4001 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4002 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4003 (c_parser_omp_for_loop): Add CODE argument, pass it through
4004 to c_finish_omp_for. Change last argument to cclauses,
4005 and adjust uses to grab parallel clauses from the array of all
4006 the split clauses. Adjust c_parser_binary_expression,
4007 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4008 (omp_split_clauses): New function.
4009 (c_parser_omp_simd): New function.
4010 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4011 Allow the function to be called also when parsing combined constructs,
4012 and call c_parser_omp_simd when parsing for simd.
4013 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4014 #pragma omp section, require exactly one structured-block instead of
4015 sequence of statements.
4016 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4017 Allow the function to be called also when parsing combined constructs.
4018 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4019 Allow the function to be called also when parsing combined
4021 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4022 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4023 c_parser_omp_teams, c_parser_omp_target_data,
4024 c_parser_omp_target_update, c_parser_omp_target,
4025 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4026 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4027 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4028 (c_parser_omp_construct): Add p_name and mask vars. Handle
4029 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4030 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4031 and c_parser_omp_sections callers.
4032 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4033 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4034 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4035 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4036 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4038 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4039 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4040 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4041 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4042 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4043 * c-typeck.c: Include tree-inline.h.
4044 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4045 handle_omp_array_sections_1, handle_omp_array_sections,
4046 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4047 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4048 user defined reductions.
4049 (c_tree_equal): New function.
4050 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4051 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4052 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4053 c_check_omp_declare_reduction_r): New prototypes.
4054 * c-decl.c (current_omp_declare_target_attribute): New variable.
4055 (c_decl_attributes): New function.
4056 (start_decl, start_function): Use it instead of decl_attributes.
4057 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4058 c_omp_reduction_decl, c_omp_reduction_lookup,
4059 c_check_omp_declare_reduction_r): New functions.
4061 2013-09-25 Tom Tromey <tromey@redhat.com>
4063 * Make-lang.in (c/gccspec.o): Remove.
4064 (CFLAGS-c/gccspec.o): New variable.
4065 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4066 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4067 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4069 2013-09-25 Tom Tromey <tromey@redhat.com>
4071 * Make-lang.in (c/gccspec.o): Don't use subshell.
4073 2013-09-18 Marek Polacek <polacek@redhat.com>
4076 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4077 Remove unnecessary check.
4079 2013-09-18 Marek Polacek <polacek@redhat.com>
4082 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4083 no_sanitize_undefined attribute.
4085 2013-09-13 Kai Tietz <ktietz@redhat.com>
4088 * c-decl.c (c_builtin_function_ext_scope): Remove
4089 wrong assumption that it is never called on prexisting
4092 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4094 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4096 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4098 * c-objc-common.c (c_tree_printer): Tidy.
4100 2013-08-30 Marek Polacek <polacek@redhat.com>
4102 * c-typeck.c (build_binary_op): Add division by zero and shift
4105 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
4106 Joseph Myers <joseph@codesourcery.com>
4109 * c-typeck.c (c_common_type): Prefer double_type_node over
4110 other REAL_TYPE types with the same precision.
4111 (convert_arguments): Likewise.
4113 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4115 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4116 (c_initialize_diagnostics): Call a destructor for the early printer.
4118 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4120 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4121 printer initialization.
4123 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
4126 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4127 check for truth values.
4128 (expand_array_notation_exprs): Added truth values case. Removed an
4129 unwanted else. Added for-loop to walk through subtrees in default
4132 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4134 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4136 2013-07-23 Joseph Myers <joseph@codesourcery.com>
4138 * c-parser.c (struct c_generic_association): Fix typo.
4140 2013-07-23 Tom Tromey <tromey@redhat.com>
4141 Joseph Myers <joseph@codesourcery.com>
4143 * c-parser.c (struct c_generic_association): New.
4144 (c_generic_association_d): New typedef.
4145 (c_parser_generic_selection): New function.
4146 (c_parser_postfix_expression): Handle RID_GENERIC.
4148 2013-07-13 Jason Merrill <jason@redhat.com>
4151 * c-decl.c (finish_struct): Check for too-large class.
4153 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
4156 * c-typeck.c (set_init_index): When folding, check for index overflow.
4158 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4160 * c-parser.c (c_parser_array_notation): Removed rejection of array
4161 notations in an array of function pointers.
4163 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4165 * c-array-notation.c (make_triplet_val_inv): New function.
4166 (create_cmp_incr): Likewise.
4167 (create_array_refs): Likewise.
4168 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4169 Also modularized common parts between functions and called the function.
4170 (build_array_notation_expr): Likewise.
4171 (fix_conditional_array_notations_1): Likewise.
4172 (fix_array_notation_expr): Likewise.
4173 (fix_array_notation_call_expr): Likewise.
4175 2013-06-18 Marek Polacek <polacek@redhat.com>
4178 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4180 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4182 * c-array-notation.c (build_array_notation_expr): Reject array notation
4183 mismatch between LHS and RHS even inside a call_expr. Also, removed
4184 a couple while statements that were dead code.
4186 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4188 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4189 excessive precision expressions in function parameters. Also removed
4190 couple unwanted while statements.
4192 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4194 * c-array-notation.c (expand_array_notation_exprs): Added
4195 ARRAY_NOTATION_REF case.
4197 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4199 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4200 function to c-family/array-notation-common.c.
4201 (is_cilkplus_reduce_builtin): Likewise.
4202 (find_rank): Likewise.
4203 (extract_array_notation_exprs): Likewise.
4204 (replace_array_notations): Likewise.
4205 (find_inv_trees): Likewise.
4206 (replace_inv_trees): Likewise.
4207 (contains_array_notation_expr): Likewise.
4208 (find_correct_array_notation_type): Likewise.
4209 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4210 (struct inv_list): Moved this to c-family/array-notation-common.c.
4211 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4213 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4215 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4216 reduction functions outside the for-loop. Added a check if the fundecl
4217 is non-NULL. Finally, removed an unwanted if-statement, and made the
4220 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4222 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4223 condition of the if-statement matches the rank of else-block and then-
4224 block when array notations are used.
4225 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4226 expression after the entire function body is parsed.
4227 (c_parser_expr_no_commas): Delayed creating array notation expressions
4228 to the end of function parsing.
4229 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4230 whole if-statement instead of just the condition.
4231 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4233 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4236 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4237 array to NULL_TREE if they are unused. Also added a check for the
4238 field to be NULL before its fields are used in future.
4240 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4243 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4244 (build_array_notation_expr): Likewise.
4246 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4248 * c-typeck.c (build_array_ref): Added a check to see if array's
4249 index is greater than one. If true, then emit an error.
4250 (build_function_call_vec): Exclude error reporting and checking
4251 for builtin array-notation functions.
4252 (convert_arguments): Likewise.
4253 (c_finish_return): Added a check for array notations as a return
4254 expression. If true, then emit an error.
4255 (c_finish_loop): Added a check for array notations in a loop
4256 condition. If true then emit an error.
4257 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4258 (build_binary_op): Added a check for array notation expr inside
4259 op1 and op0. If present, we call another function to find correct
4261 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4262 * c-parser.c (c_parser_compound_statement): Check if array
4263 notation code is used in tree, if so, then transform them into
4265 (c_parser_expr_no_commas): Check if array notation is used in LHS
4266 or RHS, if so, then build array notation expression instead of
4268 (c_parser_postfix_expression_after_primary): Added a check for
4269 colon(s) after square braces, if so then handle it like an array
4270 notation. Also, break up array notations in unary op if found.
4271 (c_parser_direct_declarator_inner): Added a check for array
4273 (c_parser_compound_statement): Added a check for array notation in
4274 a stmt. If one is present, then expand array notation expr.
4275 (c_parser_if_statement): Likewise.
4276 (c_parser_switch_statement): Added a check for array notations in
4277 a switch statement's condition. If true, then output an error.
4278 (c_parser_while_statement): Similarly, but for a while.
4279 (c_parser_do_statement): Similarly, but for a do-while.
4280 (c_parser_for_statement): Similarly, but for a for-loop.
4281 (c_parser_unary_expression): Check if array notation is used in a
4282 pre-increment or pre-decrement expression. If true, then expand
4284 (c_parser_array_notation): New function.
4285 * c-array-notation.c: New file.
4286 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4288 2013-05-23 Mike Stump <mikestump@comcast.net>
4290 * c-typeck.c (convert_for_assignment): Handle references to memory
4293 2013-05-16 Jason Merrill <jason@redhat.com>
4295 * Make-lang.in (cc1$(exeext)): Use link mutex.
4297 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4299 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4300 to simply use OPT_Wpointer_arith.
4301 (build_unary_op): Likewise.
4303 2013-04-03 Jakub Jelinek <jakub@redhat.com>
4306 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4307 argument. If set, or it temporarily for parsing of the first
4308 argument into force_folding_builtin_constant_p.
4309 (c_parser_postfix_expression): Adjust callers.
4311 2013-03-21 Richard Biener <rguenther@suse.de>
4313 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4314 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4316 2013-02-12 Marek Polacek <polacek@redhat.com>
4319 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4322 2013-01-24 Jakub Jelinek <jakub@redhat.com>
4325 * c-typeck.c (set_nonincremental_init_from_string): If
4326 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4328 (process_init_element): Likewise.
4330 2012-12-20 Jakub Jelinek <jakub@redhat.com>
4333 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4334 argument, don't call default_function_array_conversion
4335 nor c_fully_fold here.
4336 (c_parser_asm_statement): Adjust callers.
4337 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4338 and outputs here, and call default_function_array_conversion
4339 on inputs that don't need to be addressable.
4341 2012-12-18 Jakub Jelinek <jakub@redhat.com>
4344 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4345 warning require that both c_common_unsigned_type as well as
4346 c_common_signed_type is the same for both mvl and mvr types.
4348 2012-11-16 Diego Novillo <dnovillo@google.com>
4350 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4352 * c-common.c: Use new vec API in vec.h.
4353 * c-common.h: Likewise.
4354 * c-gimplify.c: Likewise.
4355 * c-pragma.c: Likewise.
4356 * c-pretty-print.c: Likewise.
4357 * c-pretty-print.h: Likewise.
4358 * c-semantics.c: Likewise.
4359 * c-decl.c: Likewise.
4360 * c-parser.c: Likewise.
4361 * c-tree.h: Likewise.
4362 * c-typeck.c: Likewise.
4364 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4367 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4369 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4372 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4373 shadows a function, unless the variable is a function or a
4374 pointer-to-function.
4376 2012-10-12 Jakub Jelinek <jakub@redhat.com>
4379 * c-parser.c (struct c_tree_loc_pair): Removed.
4380 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4381 add location_t * and tree * arguments, fill in array of 3
4382 sizeof_arg trees and corresponding locs.
4383 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4384 c_parser_expr_list callers.
4385 (c_parser_postfix_expression_after_primary): Likewise. Pass
4386 array of 3 sizeof_arg trees and locs (corresponding to first
4387 3 arguments) to sizeof_pointer_memaccess_warning.
4389 2012-10-09 Lawrence Crowl <crowl@google.com>
4391 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4392 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4395 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4398 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4401 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
4404 * c-typeck.c: Include c-common.h.
4405 (enum stv_conv): Moved to c-common.h.
4406 (scalar_to_vector): Moved to c-common.c.
4407 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4408 * Make-lang.in: c-typeck.c depends on c-common.h.
4410 2012-10-04 Arnaud Charlet <charlet@adacore.com>
4412 * c-decl.c (c_write_global_declarations): Fix handling of
4415 2012-09-30 Sharad Singhai <singhai@google.com>
4417 * c-decl.c (c_write_global_declarations): Use a different method
4418 to determine if the dump has ben initialized.
4420 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4423 * c-typeck.c (c_cast_expr): When casting to a type requiring
4424 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4427 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4430 * c-typeck.c (build_unary_op): Pass original argument of
4431 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4432 any C_MAYBE_CONST_EXPR, if it has integer operands.
4433 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4434 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4435 to c_objc_common_truthvalue_conversion, then remove any
4436 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4437 c_objc_common_truthvalue_conversion not
4438 c_common_truthvalue_conversion.
4439 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4440 call note_integer_operands for arguments with integer operands
4441 that are not integer constants.
4443 2012-09-13 Jakub Jelinek <jakub@redhat.com>
4446 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4447 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4449 2012-08-31 Jakub Jelinek <jakub@redhat.com>
4452 * c-convert.c (convert): Don't call fold_convert_loc if
4453 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4454 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4455 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4457 2012-08-24 Jakub Jelinek <jakub@redhat.com>
4460 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4461 for nested and empty_ok arguments in the call to
4462 c_parser_declaration_or_fndef.
4464 2012-08-17 Jakub Jelinek <jakub@redhat.com>
4466 * c-tree.h (c_last_sizeof_arg): Declare.
4467 * c-parser.c (struct c_tree_loc_pair): New type.
4468 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4470 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4471 (c_parser_postfix_expression_after_primary): Likewise. Call
4472 sizeof_pointer_memaccess_warning if needed.
4473 (sizeof_ptr_memacc_comptypes): New function.
4474 * c-typeck.c (c_last_sizeof_arg): New global variable.
4475 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4477 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
4479 * c-lang.h (lang_decl): Add variable_size GTY option.
4481 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4483 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4484 * Make-lang.in: Fix dependencies.
4486 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4488 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4489 and add language Makefile hooks.
4490 * config-lang.in: New file.
4491 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4492 add the required "normal" config-lang.in rules.
4493 * c-lang.h: Moved from gcc/ to here.
4494 * c-tree.h: Likewise.
4495 * c-objc-common.c: Likewise.
4496 * c-objc-common.h: Likewise.
4497 * c-typeck.c: Likewise.
4498 * c-convert.c: Likewise.
4499 * c-lang.c: Likewise.
4500 * c-aux-info.c: Likewise.
4501 * c-errors.c: Likewise.
4502 * gccspec.c: Likewise.
4503 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4504 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4506 Copyright (C) 2012-2017 Free Software Foundation, Inc.
4508 Copying and distribution of this file, with or without modification,
4509 are permitted in any medium without royalty provided the copyright
4510 notice and this notice are preserved.