1 2017-08-14 Release Manager
5 2017-06-08 Jakub Jelinek <jakub@redhat.com>
8 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
9 to sizetype before size_binop.
11 2017-05-26 Marek Polacek <polacek@redhat.com>
13 Backported from mainline
14 2017-05-17 Marek Polacek <polacek@redhat.com>
17 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
18 DECL_IGNORED_P even for non-static compound literals.
20 2017-05-03 Jakub Jelinek <jakub@redhat.com>
22 Backported from mainline
23 2017-04-21 Jakub Jelinek <jakub@redhat.com>
26 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
27 enabled, set specs->type to integer_type_node.
29 2017-05-02 Release Manager
33 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
35 * c-array-notation.c: Fix typo in comment.
37 2017-03-29 Marek Polacek <polacek@redhat.com>
40 * c-decl.c (finish_decl): Check VAR_P.
42 2017-03-27 Jakub Jelinek <jakub@redhat.com>
45 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
46 * c-typeck.c (c_mark_addressable): Likewise. Look through
47 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
49 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
51 2017-03-23 Marek Polacek <polacek@redhat.com>
53 * c-tree.h: Remove a C_RID_YYCODE reference.
55 2017-03-21 Jakub Jelinek <jakub@redhat.com>
58 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
59 optional COMPOUND_EXPR with ubsan instrumentation.
61 2017-03-17 Marek Polacek <polacek@redhat.com>
63 * c-parser.c: Add C11 references.
65 2017-03-15 Marek Polacek <polacek@redhat.com>
67 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
69 2017-03-11 Marek Polacek <polacek@redhat.com>
71 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
73 2017-03-10 David Malcolm <dmalcolm@redhat.com>
76 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
78 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
80 2017-03-09 Marek Polacek <polacek@redhat.com>
83 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
84 parameter declarations with initializers.
86 2017-03-09 Jakub Jelinek <jakub@redhat.com>
89 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
92 2017-03-07 Jakub Jelinek <jakub@redhat.com>
95 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
96 for "may only be used in compound statements" diagnostics, change it
97 such that the same translatable string is used for all pragmas. For
98 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
100 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
101 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
102 "may only be used in compound statements" diagnostics, such that the
103 same translatable string is used for all pragmas.
105 2017-03-04 Marek Polacek <polacek@redhat.com>
108 * c-decl.c (implicit_decl_warning): Add missing space.
110 2017-03-03 Marek Polacek <polacek@redhat.com>
113 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
114 current_function_prototype_arg_types is error_mark_node. Fix
115 formatting. Use TREE_VALUE instead of TREE_TYPE.
117 2017-03-03 Jakub Jelinek <jakub@redhat.com>
120 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
121 %<min%> or %<max%> in the diagnostics, instead mention identifier.
122 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
126 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
127 instead of %<_Generic>.
128 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
129 (c_parser_omp_target_exit_data): Use %<release%> instead of
132 2017-02-28 Jakub Jelinek <jakub@redhat.com>
134 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
135 instead of just cond ? "..." : "...".
136 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
137 for "enter"/"exit" keyword.
138 (c_finish_oacc_routine): Don't use %s to supply portions of the
141 2017-02-24 Jakub Jelinek <jakub@redhat.com>
144 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
145 handle -Wrestrict here.
146 * c-typeck.c (build_function_call_vec): Adjust
147 check_function_arguments caller.
149 2017-02-23 Richard Biener <rguenther@suse.de>
152 * gimple-parser.c (c_parser_gimple_statement): Use set_error
153 to initialize c_exprs to return.
154 (c_parser_gimple_binary_expression): Likewise.
155 (c_parser_gimple_unary_expression): Likewise.
156 (c_parser_gimple_postfix_expression): Likewise.
158 2017-02-22 Marek Polacek <polacek@redhat.com>
161 * c-typeck.c (convert_arguments): Handle error_mark_node.
163 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
165 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
166 value of c_parser_parse_ssa_name against error_mark_node and emit
167 error if ssa name is anonymous and written as default definition.
169 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
171 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
174 2017-02-16 Jakub Jelinek <jakub@redhat.com>
177 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
178 ignore #pragma omp target even when not followed by identifier.
180 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
182 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
183 (c_parser_gimple_unary_expression): Likewise.
185 2017-02-13 Jakub Jelinek <jakub@redhat.com>
187 * c-parser.c (c_parser_oacc_declare): Add missing space in
190 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
193 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
194 set_c_expr_source_range when parsing ssa-name.
196 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
197 Richard Biener <rguenther@suse.de>
199 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
200 building IL when arguments are error_mark_node.
201 (c_parser_gimple_unary_expression): Likewise.
202 (c_parser_gimple_if_stmt): Likewise.
203 (c_parser_gimple_switch_stmt): Likewise.
204 (c_parser_gimple_return_stmt): Likewise.
205 (c_parser_parse_ssa_name): When name lookup fails do not build
206 an SSA name. Use undeclared rather than not declared in error
209 2017-02-09 Marek Polacek <polacek@redhat.com>
212 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
213 instead of c_parser_skip_until_found.
215 2017-02-09 Jakub Jelinek <jakub@redhat.com>
218 * c-parser.c (c_parser_omp_declare_target): Don't invoke
219 symtab_node::get on automatic variables.
221 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
222 Chung-Lin Tang <cltang@codesourcery.com>
224 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
225 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
227 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
229 2017-02-07 Richard Biener <rguenther@suse.de>
231 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
232 (c_parser_gimple_postfix_expression_after_primary):
233 Do not use c_build_function_call_vec to avoid folding and promotion.
236 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
239 * c-decl.c (pop_scope): Pass main_input_filename to
240 build_translation_unit_decl.
242 2017-01-24 David Malcolm <dmalcolm@redhat.com>
244 * c-parser.c: Include "read-rtl-function.h" and
246 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
247 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
248 production. Update for renaming of field "gimple_pass" to
249 "gimple_or_rtl_pass". If __RTL was seen, call
250 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
251 to an auto_timevar, to cope with early exit.
252 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
253 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
254 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
256 (c_parser_parse_rtl_body): New function.
257 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
258 (struct c_declspecs): Rename field "gimple_pass" to
259 "gimple_or_rtl_pass". Add field "rtl_p".
260 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
261 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
262 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
263 (c_parser_gimple_or_rtl_pass_list): ...this.
265 2017-01-20 Marek Polacek <polacek@redhat.com>
268 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
270 2017-01-13 Richard Biener <rguenther@suse.de>
272 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
275 2017-01-13 Richard Biener <rguenther@suse.de>
277 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
278 _Literal ( type-name ) number.
280 2017-01-12 Richard Biener <rguenther@suse.de>
282 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
285 2017-01-11 Jakub Jelinek <jakub@redhat.com>
288 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
291 2017-01-11 Richard Biener <rguenther@suse.de>
294 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
295 returns on parse errors.
297 2017-01-04 Marek Polacek <polacek@redhat.com>
300 * c-parser.c (c_parser_postfix_expression): Mark zero character
301 constants by setting original_type in c_expr.
302 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
303 with a zero character constant.
304 (char_type_p): New function.
306 2017-01-04 David Malcolm <dmalcolm@redhat.com>
308 * c-parser.c (c_parser_declaration_or_fndef): Create a
309 rich_location at init_loc and parse it to start_init.
310 (last_init_list_comma): New global.
311 (c_parser_braced_init): Update last_init_list_comma when parsing
312 commas. Pass it to pop_init_level. Pass location of closing
313 brace to pop_init_level.
314 (c_parser_postfix_expression_after_paren_type): Create a
315 rich_location at type_loc and parse it to start_init.
316 (c_parser_omp_declare_reduction): Likewise for loc.
317 * c-tree.h (start_init): Add rich_location * param.
318 (pop_init_level): Add location_t param.
319 * c-typeck.c (struct initializer_stack): Add field
320 "missing_brace_richloc".
321 (start_init): Add richloc param, use it to initialize
322 the stack node's missing_brace_richloc.
323 (last_init_list_comma): New decl.
324 (finish_implicit_inits): Pass last_init_list_comma to
326 (push_init_level): When finding missing open braces, add fix-it
327 hints to the richloc.
328 (pop_init_level): Add "insert_before" param and pass it
329 when calling pop_init_level. Add fixits about missing
330 close braces to any richloc. Use the richloc for the
331 -Wmissing-braces warning.
332 (set_designator): Pass last_init_list_comma to pop_init_level.
333 (process_init_element): Likewise.
335 2017-01-01 Jakub Jelinek <jakub@redhat.com>
337 Update copyright years.
339 2016-12-21 Jakub Jelinek <jakub@redhat.com>
342 * c-typeck.c (build_function_call_vec): If check_function_arguments
343 returns true, set TREE_NO_WARNING on CALL_EXPR.
346 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
347 to *expr instead of overwriting it.
349 2016-12-20 Richard Biener <rguenther@suse.de>
351 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
353 (c_parser_gimple_statement): Only build assigns for non-error
355 (c_parser_gimple_postfix_expression_after): Improve error recovery.
357 2016-12-14 Martin Jambor <mjambor@suse.cz>
359 * c-parser.c: Include omp-general.h and omp-offload.h instead of
361 (c_finish_oacc_routine): Adjusted call to
362 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
363 to use their new names.
364 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
366 (c_parser_oacc_update): Likewise.
367 (c_parser_omp_simd): Likewise.
368 (c_parser_omp_target_update): Likewise.
369 * c-typeck.c: Include omp-general.h instead of omp-low.h.
370 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
372 (c_finish_omp_cancellation_point): Likewise.
373 * gimple-parser.c: Do not include omp-low.h
375 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
376 James Norris <jnorris@codesourcery.com>
378 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
379 EXIT_DATA,WAIT} are not used in compound statements.
380 (c_parser_oacc_enter_exit_data): Update diagnostics.
382 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
385 * c-decl.c (diagnose_mismatched_decls): Use
386 OPT_Wbuiltin_declaration_mismatch here too.
388 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
389 Alan Hayward <alan.hayward@arm.com>
390 David Sherwood <david.sherwood@arm.com>
392 * c-decl.c (merge_decls): Use SET_DECL_MODE.
393 (make_label, finish_struct): Likewise.
395 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
396 Richard Biener <rguenther@suse.de>
398 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
399 * config-lang.in (gtfiles): Add c/c-parser.h.
400 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
401 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
402 * c-parser.c (enum c_id_kind, struct c_token,
403 c_parser_next_token_is, c_parser_next_token_is_not,
404 c_parser_next_token_is_keyword,
405 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
407 * c-parser.h: ... new header.
408 * c-parser.c: Include c-parser.h and gimple-parser.h.
409 (c_parser_peek_token, c_parser_peek_2nd_token,
410 c_token_starts_typename, c_parser_next_token_starts_declspecs,
411 c_parser_next_tokens_start_declaration, c_parser_consume_token,
412 c_parser_error, c_parser_require, c_parser_skip_until_found,
413 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
414 c_parser_type_name): Export.
415 (c_parser_tokens_buf): New function.
416 (c_parser_error): Likewise.
417 (c_parser_set_error): Likewise.
418 (c_parser_declspecs): Handle RID_GIMPLE.
419 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
420 via c_parser_parse_gimple_body.
421 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
422 c_token_starts_typename, c_parser_next_token_starts_declspecs,
423 c_parser_next_tokens_start_declaration, c_parser_consume_token,
424 c_parser_error, c_parser_require, c_parser_skip_until_found,
425 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
426 c_parser_type_name): Declare.
427 (struct c_parser): Declare forward.
428 (c_parser_tokens_buf): Declare.
429 (c_parser_error): Likewise.
430 (c_parser_set_error): Likewise.
431 * gimple-parser.c: New file.
432 * gimple-parser.h: Likewise.
434 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
437 * c-parser.c (c_parser_postfix_expression_after_primary): Call
440 2016-09-11 Le-Chun Wu <lcwu@google.com>
441 Mark Wielaard <mjw@redhat.com>
443 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
444 to the given -Wshadow= variant.
446 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
448 * c-typeck.c: Include memmodel.h.
450 2016-10-13 Jakub Jelinek <jakub@redhat.com>
453 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
454 instead of lhd_return_null_tree_v.
456 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
459 * c-decl.c (smallest_type_quals_location): New static function.
460 (grokdeclarator): Try to find the correct location for an ignored
463 2016-09-26 Marek Polacek <polacek@redhat.com>
466 * c-decl.c (pop_scope): Add gcc_fallthrough.
468 2016-09-26 Marek Polacek <polacek@redhat.com>
471 * c-parser.c (struct c_token): Add flags field.
472 (c_lex_one_token): Pass it to c_lex_with_flags.
473 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
474 into IFN_FALLTHROUGH.
475 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
476 attribute fallthrough after a case label or default label.
477 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
479 2016-09-24 Marek Polacek <polacek@redhat.com>
482 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
483 have boolean value. Warn about ++/-- on booleans.
485 2016-09-23 Jakub Jelinek <jakub@redhat.com>
487 * c-parser.c (incomplete_record_decls): Remove unnecessary
488 = vNULL initialization of file scope vec.
490 2016-09-16 Marek Polacek <polacek@redhat.com>
492 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
494 2016-09-14 Marek Polacek <polacek@redhat.com>
496 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
497 (fix_array_notation_expr): Likewise.
498 * c-decl.c (finish_decl): Likewise.
499 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
500 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
501 (function_to_pointer_conversion): Use false instead of 0.
502 (convert_lvalue_to_rvalue): Likewise.
503 (parser_build_unary_op): Likewise.
504 (build_atomic_assign): Likewise.
505 (build_unary_op): Change nonconvert parameter type to bool, use
506 true/false instead of 1/0.
507 (build_binary_op): Use true instead of 1.
509 2016-09-13 David Malcolm <dmalcolm@redhat.com>
511 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
512 of add_fixit_insert to add_fixit_insert_before.
514 2016-09-13 Marek Polacek <polacek@redhat.com>
516 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
519 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
522 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
523 COMPOUND_EXPR to warn_for_omitted_condop.
525 2016-09-07 David Malcolm <dmalcolm@redhat.com>
527 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
528 c_get_substring_location for this new langhook.
530 2016-09-02 Jakub Jelinek <jakub@redhat.com>
533 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
535 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
536 instead of mark_exp_read on low_bound/length expression.
537 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
538 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
539 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
540 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
541 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
542 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
543 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
544 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
545 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
546 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
547 instead of mark_expr_read.
548 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
549 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
550 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
551 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
552 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
553 array section bases outside of depend clause, for depend clause
554 use convert_lvalue_to_rvalue on the base.
555 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
556 linear, aligned, map, to and from clauses.
557 (c_omp_clause_copy_ctor): New function.
559 2016-09-01 Marek Polacek <polacek@redhat.com>
562 * c-typeck.c (composite_type): Add FALLTHRU comment.
564 2016-08-31 David Malcolm <dmalcolm@redhat.com>
566 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
567 to the insertion fixits for "struct", "union", and "enum".
569 2016-08-30 David Malcolm <dmalcolm@redhat.com>
571 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
572 rather than add_fixit_misspelled_id.
573 (undeclared_variable): Likewise.
574 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
575 now-redundant "here" params from add_fixit_insert method calls.
576 (c_parser_parameter_declaration): Likewise.
577 * c-typeck.c (build_component_ref): Remove now-redundant range
578 param from add_fixit_replace method calls.
580 2016-08-25 Marek Polacek <polacek@redhat.com>
582 * c-typeck.c (parser_build_binary_op): Pass LHS to
583 warn_logical_not_parentheses.
585 2016-08-25 Marek Polacek <polacek@redhat.com>
588 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
589 or _FloatN or _FloatNx is not supported.
590 (finish_declspecs): Set type to integer_type_node when _FloatN or
591 _FloatNx is not supported.
593 2016-08-19 Joseph Myers <joseph@codesourcery.com>
596 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
597 (struct c_declspecs): Add field floatn_nx_idx.
598 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
599 and _FloatNx type specifiers.
600 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
601 (c_parser_declspecs, c_parser_attribute_any_word)
602 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
603 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
604 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
605 narrower than double.
607 2016-08-12 Jakub Jelinek <jakub@redhat.com>
608 Martin Liska <mliska@suse.cz>
611 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
612 % to determine val element to change. Assert that
613 wchar_bytes * charwidth fits into val array.
615 2016-08-12 Marek Polacek <polacek@redhat.com>
618 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
619 (c_parser_postfix_expression): Likewise.
620 * c-typeck.c (build_unary_op): Adjust fall through comment.
621 (c_mark_addressable): Likewise.
623 2016-08-11 Jakub Jelinek <jakub@redhat.com>
626 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
627 array member through typedef, for orig_qual_indirect == 0 clear
630 2016-08-08 David Malcolm <dmalcolm@redhat.com>
633 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
634 this up to selftest::run_c_tests.
635 (selftest::run_c_tests): New function.
637 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
639 * c-parser.c (struct oacc_routine_data): Add error_seen and
641 (c_finish_oacc_routine): Use these.
642 (c_parser_declaration_or_fndef): Adjust.
643 (c_parser_oacc_routine): Likewise. Support more C language
644 constructs, and improve diagnostics. Move pragma context
646 (c_parser_pragma): ... here.
648 * c-parser.c (struct oacc_routine_data): New.
649 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
651 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
652 declare target" attribute.
654 2016-08-01 Jan Beulich <jbeulich@suse.com>
656 * c-fold.c (c_fully_fold_internal): Also emit shift count
657 warnings for vector types.
658 * c-typeck.c (build_binary_op): Likewise.
660 2016-07-29 Marek Polacek <polacek@redhat.com>
663 * c-decl.c (finish_struct): Rephrase an error message.
666 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
667 to error node for invalid code.
670 * c-decl.c (implicitly_declare): Return decl early not only for
671 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
673 2016-07-29 Jakub Jelinek <jakub@redhat.com>
676 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
677 on GNU extern inline functions.
679 2016-07-29 Marek Polacek <polacek@redhat.com>
682 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
685 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
687 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
689 2016-07-20 David Malcolm <dmalcolm@redhat.com>
691 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
693 (best_macro_match): Likewise, converting from a typedef to a
695 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
696 (lookup_name_fuzzy): Update for change of best_macro_match to a
697 subclass with a ctor that calls cpp_forall_identifiers.
699 2016-07-20 David Malcolm <dmalcolm@redhat.com>
701 * c-decl.c (implicit_decl_warning): Update for conversion of
702 return type of lookup_name_fuzzy to const char *.
703 (undeclared_variable): Likewise.
704 (lookup_name_fuzzy): Convert return type from tree to
706 * c-parser.c (c_parser_declaration_or_fndef): Update for
707 conversion of return type of lookup_name_fuzzy to const char *.
708 (c_parser_parameter_declaration): Likewise.
710 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
712 * c-parser.c (c_parser_oacc_declare): Don't scan for
714 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
715 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
716 zero-length subarrays.
718 2016-07-15 Jakub Jelinek <jakub@redhat.com>
721 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
722 instead of FUZZY_LOOKUP_NAME.
723 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
724 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
726 2016-07-14 Jakub Jelinek <jakub@redhat.com>
729 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
731 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
733 * c-parser.c (c_parser_generic_selection): Make type of variable
735 (c_parser_omp_declare_simd): Likewise.
737 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
739 * c-decl.c (struct c_struct_parse_info): Change member types
740 from vec to auto_vec.
741 (start_struct): Adjust.
742 (finish_struct): Likewise.
744 2016-07-02 Jakub Jelinek <jakub@redhat.com>
747 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
749 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
751 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
752 Move pragma context checking into...
753 (c_parser_omp_cancellation_point): ... here, and improve
755 * c-typeck.c (c_finish_omp_cancel)
756 (c_finish_omp_cancellation_point): Improve diagnostic messages.
758 2016-06-29 Jakub Jelinek <jakub@redhat.com>
761 * c-typeck.c (c_build_qualified_type): Don't clear
762 C_TYPE_INCOMPLETE_VARS for the main variant.
764 2016-06-28 Martin Sebor <msebor@redhat.com>
767 * c-typeck.c (output_init_element): Diagnose incompatible types
768 before non-constant initializers.
770 2016-06-28 Jakub Jelinek <jakub@redhat.com>
772 * Make-lang.in: Don't cat ../stage_current if it does not exist.
774 2016-06-23 Andi Kleen <ak@linux.intel.com>
776 * Make-lang.in: Add support for autofdo.
778 2016-06-22 David Malcolm <dmalcolm@redhat.com>
781 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
782 (implicit_decl_warning): When issuing warnings for implicit
783 declarations, attempt to provide a suggestion via
785 (undeclared_variable): Likewise when issuing errors.
786 (lookup_name_in_scope): Likewise.
787 (struct edit_distance_traits<cpp_hashnode *>): New struct.
788 (best_macro_match): New typedef.
789 (find_closest_macro_cpp_cb): New function.
790 (lookup_name_fuzzy): New function.
791 * c-parser.c: Include gcc-rich-location.h.
792 (c_token_starts_typename): Split out case CPP_KEYWORD into...
793 (c_keyword_starts_typename): ...this new function.
794 (c_parser_declaration_or_fndef): When issuing errors about
795 missing "struct" etc, add a fixit. For other kinds of errors,
796 attempt to provide a suggestion via lookup_name_fuzzy.
797 (c_parser_parms_declarator): When looking ahead to detect typos in
798 type names, also reject CPP_KEYWORD.
799 (c_parser_parameter_declaration): When issuing errors about
800 unknown type names, attempt to provide a suggestion via
802 * c-tree.h (c_keyword_starts_typename): New prototype.
804 2016-06-20 Joseph Myers <joseph@codesourcery.com>
807 * c-typeck.c (build_conditional_expr): Return error_mark_node if
808 c_common_type returns error_mark_node.
810 2016-06-19 Martin Sebor <msebor@redhat.com>
813 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
814 __alignof__ (expression).
816 2016-06-14 David Malcolm <dmalcolm@redhat.com>
818 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
820 2016-06-14 David Malcolm <dmalcolm@redhat.com>
822 * c-typeck.c (build_component_ref): Simplify fixit code by
823 using gcc_rich_location::add_fixit_misspelled_id.
824 (set_init_label): Likewise.
826 2016-06-13 David Malcolm <dmalcolm@redhat.com>
828 * c-parser.c (c_parser_initelt): Provide location of name for new
829 location_t param of set_init_label.
830 * c-tree.h (set_init_label): Add location_t param.
831 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
832 param and use it when issuing error messages about unrecognized
833 field names. Attempt to provide a fixit hint if appropriate,
834 otherwise update the error message to provide the type name.
836 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
839 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
842 2016-06-08 Martin Sebor <msebor@redhat.com>
843 Jakub Jelinek <jakub@redhat.com>
847 * c-typeck.c (convert_arguments): Don't promote last argument
848 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
850 2016-06-08 Marek Polacek <polacek@redhat.com>
853 * c-decl.c (grokdeclarator): Check TYPE_P.
856 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
859 2016-06-07 David Malcolm <dmalcolm@redhat.com>
861 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
862 and structure element reference, capture the location of the
863 element name token and pass it to build_component_ref.
864 (c_parser_postfix_expression_after_primary): Likewise for
865 structure element dereference.
866 (c_parser_omp_variable_list): Likewise for
867 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
868 * c-tree.h (build_component_ref): Add location_t param.
869 * c-typeck.c (build_component_ref): Add location_t param
870 COMPONENT_LOC. Use it, if available, when issuing hints about
871 mispelled member names to provide a fixit replacement hint.
873 2016-06-06 Marek Polacek <polacek@redhat.com>
876 * c-parser.c (c_parser_direct_declarator): Set location.
878 2016-06-06 Marek Polacek <polacek@redhat.com>
880 * c-typeck.c (comptypes_internal): Handle comparisons of
881 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
882 TYPE_REF_CAN_ALIAS_ALL.
884 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
886 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
887 arguments as addressable when async clause exists.
889 2016-05-30 Jakub Jelinek <jakub@redhat.com>
892 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
893 when combined with target construct.
895 2016-05-26 Jakub Jelinek <jakub@redhat.com>
897 * c-parser.c (c_parser_omp_clause_schedule): Warn if
898 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
900 2016-05-25 Marek Polacek <polacek@redhat.com>
903 * c-decl.c (c_make_fname_decl): Don't check seen_error.
906 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
908 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
910 * c-parser.c (c_parser_oacc_declare): Add support for
911 GOMP_MAP_FIRSTPRIVATE_POINTER.
912 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
913 argument with enum c_omp_region_type ort.
914 (handle_omp_array_sections): Likewise. Update call to
915 handle_omp_array_sections_1.
916 (c_finish_omp_clauses): Add specific errors and warning messages for
917 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
918 call to handle_omp_array_sections.
920 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
922 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
924 2016-05-24 Richard Biener <rguenther@suse.de>
928 * c-typeck.c (build_array_ref): Do not complain about indexing
929 non-lvalue vectors. Adjust for function name change.
931 2016-05-20 Martin Sebor <msebor@redhat.com>
934 * c-typeck.c (error_init): Use
935 expansion_point_location_if_in_system_header.
936 (warning_init): Same.
938 2016-05-19 David Malcolm <dmalcolm@redhat.com>
941 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
943 (c_parser_postfix_expression): Likewise.
944 * c-tree.h (c_expr::set_error): New method.
945 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
946 that result's range is initialized.
948 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
950 * c-typeck.c (parser_build_unary_op): Fix formatting.
952 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
954 * c-decl.c (grokdeclarator): Remove errmsg and use of
955 targetm.invalid_return_type.
956 (grokparms): Remove errmsg and use of
957 targetm.invalid_parameter_type.
959 2016-05-13 Joseph Myers <joseph@codesourcery.com>
961 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
962 function return type.
964 2016-05-12 Marek Polacek <polacek@redhat.com>
967 * c-decl.c (build_compound_literal): Pass LOC down to
968 c_incomplete_type_error.
969 * c-tree.h (require_complete_type): Adjust declaration.
970 (c_incomplete_type_error): Likewise.
971 * c-typeck.c (require_complete_type): Add location parameter, pass it
972 down to c_incomplete_type_error.
973 (c_incomplete_type_error): Add location parameter, pass it down to
975 (build_component_ref): Pass location down to c_incomplete_type_error.
976 (default_conversion): Pass location down to require_complete_type.
977 (build_array_ref): Likewise.
978 (build_function_call_vec): Likewise.
979 (convert_arguments): Likewise.
980 (build_unary_op): Likewise.
981 (build_c_cast): Likewise.
982 (build_modify_expr): Likewise.
983 (convert_for_assignment): Likewise.
984 (c_finish_omp_clauses): Likewise.
986 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
989 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
991 * c-errors.c (pedwarn_c90): Return true if warned.
992 * c-tree.h (pedwarn_c90): Change return type to bool.
993 (enum c_declspec_word): Add new enumerator cdw_atomic.
995 2016-05-11 Marek Polacek <polacek@redhat.com>
998 * c-decl.c (diagnose_mismatched_decls): Factor out code to
999 diagnose_mismatched_attributes and call it.
1001 2016-05-10 Marek Polacek <polacek@redhat.com>
1004 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1005 on a declaration following the definition.
1007 2016-05-05 Jakub Jelinek <jakub@redhat.com>
1009 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1010 parse it through to c_parser_c99_block_statement.
1011 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1014 2016-05-04 Marek Polacek <polacek@redhat.com>
1016 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1019 2016-05-04 Marek Polacek <polacek@redhat.com>
1022 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1023 for macro expansions.
1025 2016-05-03 Marek Polacek <polacek@redhat.com>
1028 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1029 check_builtin_function_arguments.
1031 2016-05-03 Richard Biener <rguenther@suse.de>
1033 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1034 the checksum from the previous stage.
1036 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1038 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1039 c_finish_omp_clauses.
1040 (c_parser_omp_all_clauses): Likewise.
1041 (c_parser_oacc_cache): Likewise.
1042 (c_parser_oacc_loop): Likewise.
1043 (omp_split_clauses): Likewise.
1044 (c_parser_omp_declare_target): Likewise.
1045 (c_parser_cilk_all_clauses): Likewise.
1046 (c_parser_cilk_for): Likewise.
1047 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1048 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1050 2016-05-02 Marek Polacek <polacek@redhat.com>
1053 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1056 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1059 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1060 OACC_LOOP_CLAUSE_MASK.
1061 (c_parser_oacc_kernels_parallel): Update call to
1062 c_oacc_split_loop_clauses.
1064 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
1066 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1067 argument to build_modify_expr in two cases.
1069 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1071 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1072 warn_for_memset instead of warning directly here.
1074 2016-04-26 Marek Polacek <polacek@redhat.com>
1077 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1079 (c_parser_for_statement): ... here.
1080 (c_parser_if_statement): Use it.
1081 (c_parser_switch_statement): Use it.
1082 (c_parser_while_statement): Use it.
1085 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1087 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1090 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1091 instead of c_finish_cilk_clauses.
1092 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1093 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1094 floating-point variables in the linear clause for Cilk Plus.
1096 2016-04-18 Michael Matz <matz@suse.de>
1098 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1099 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1101 2016-04-15 Marek Polacek <polacek@redhat.com>
1104 * c-typeck.c (build_unary_op): Pass location down to error and
1107 2016-04-15 Jakub Jelinek <jakub@redhat.com>
1110 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1112 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1113 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1114 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1115 Adjust c_parser_pragma callers.
1116 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1118 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1120 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1121 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1122 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1123 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1124 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1125 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1126 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1127 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1129 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1130 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1133 2016-04-13 Marek Polacek <polacek@redhat.com>
1136 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1138 (c_parser_statement): Likewise.
1139 (c_parser_c99_block_statement): Likewise.
1140 (c_parser_while_statement): Likewise.
1141 (c_parser_for_statement): Likewise.
1142 (c_parser_if_body): Don't set IF_P here.
1143 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1144 about dangling else here.
1145 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1146 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1147 warn about dangling else here.
1149 2016-04-04 Marek Polacek <polacek@redhat.com>
1152 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1154 2016-03-31 Marek Polacek <polacek@redhat.com>
1157 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1159 2016-03-18 David Malcolm <dmalcolm@redhat.com>
1162 * c-parser.c (c_parser_postfix_expression): Set the source range
1163 for uses of "__builtin_types_compatible_p".
1165 2016-03-17 Jakub Jelinek <jakub@redhat.com>
1168 * c-typeck.c (composite_type): Don't count void_list_node
1169 into len, if the list is terminated by void_list_node, start
1170 with void_list_node instead of NULL for newargs. Stop
1173 2016-03-16 Marek Polacek <polacek@redhat.com>
1176 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1177 nested functions returning VM types.
1179 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1181 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1182 when calling c_finish_omp_clauses.
1184 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1187 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1190 2016-03-04 Marek Polacek <polacek@redhat.com>
1193 * c-parser.c (c_parser_postfix_expression): Call
1194 c_parser_cast_expression rather than c_parser_postfix_expression.
1196 2016-03-01 Jakub Jelinek <jakub@redhat.com>
1200 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1201 of incomplete decls to error_mark_node.
1203 2016-02-24 Marek Polacek <polacek@redhat.com>
1206 * c-decl.c (finish_decl): Don't update the copy of the type of a
1207 different decl type.
1209 2016-02-23 Jakub Jelinek <jakub@redhat.com>
1212 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1213 in id_kind reclassification.
1215 2016-02-16 Jakub Jelinek <jakub@redhat.com>
1218 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1220 2016-02-16 James Norris <jnorris@codesourcery.com>
1223 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1225 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1227 * c-decl.c (build_null_declspecs): Zero the entire struct.
1230 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1231 callers changed. If nested_p is true, use it to call
1232 finish_implicit_inits.
1233 * c-tree.h (finish_implicit_inits): Declare.
1234 * c-typeck.c (finish_implicit_inits): New function. Move code
1236 (push_init_level): ... here.
1237 (set_designator, process_init_element): Call finish_implicit_inits.
1239 2016-02-11 Jakub Jelinek <jakub@redhat.com>
1242 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1243 arguments for -Waddress warning.
1245 2016-02-04 Jakub Jelinek <jakub@redhat.com>
1248 * c-decl.c (finish_enum): When honoring mode attribute,
1249 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1251 2016-01-29 Jakub Jelinek <jakub@redhat.com>
1254 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1255 all type variants, not just TYPE_MAIN_VARIANT.
1257 2016-01-27 Jakub Jelinek <jakub@redhat.com>
1260 * c-decl.c (c_write_global_declarations_1): Warn with
1261 warn_unused_function if static prototype without definition
1264 2016-01-27 Marek Polacek <polacek@redhat.com>
1267 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1268 to unsigned, if needed. Add -Wsign-compare warning.
1270 2016-01-26 Jakub Jelinek <jakub@redhat.com>
1272 PR tree-optimization/69483
1273 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1275 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1278 * c-tree.h (incomplete_record_decls): Declare.
1279 * c-parser.c (incomplete_record_decls): Define.
1280 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1281 report error if any decl has zero size.
1282 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1283 or enum type to incomplete_record_decls.
1285 2016-01-14 Tom de Vries <tom@codesourcery.com>
1287 PR tree-optimization/68773
1288 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1291 2016-01-14 Marek Polacek <polacek@redhat.com>
1294 * c-decl.c (grokdeclarator): Provide more information for invalid
1297 2016-01-06 David Malcolm <dmalcolm@redhat.com>
1299 * c-parser.c (c_parser_unary_expression): For dereferences, build
1300 a combined location before calling build_indirect_ref, so that
1301 error reports cover the full range, manually updating the c_expr
1304 2016-01-06 Marek Polacek <polacek@redhat.com>
1307 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1308 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1311 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1313 Update copyright years.
1315 2016-01-04 Marek Polacek <polacek@redhat.com>
1318 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1319 optimization to use __atomic_fetch_* built-in if possible.
1321 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1323 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1325 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1328 2015-12-22 Marek Polacek <polacek@redhat.com>
1331 * c-typeck.c (build_component_ref): Warn when acessing elements of
1332 atomic structures or unions.
1334 2015-12-21 David Malcolm <dmalcolm@redhat.com>
1336 * c-typeck.c: Include "gcc-rich-location.h".
1337 (build_binary_op): In the two places that call binary_op_error,
1338 create a gcc_rich_location and populate it with the location of
1339 the binary op and its two operands.
1341 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1343 * c-parser.c (c_parser_statement_after_labels): When calling
1344 c_finish_return, Use the return expression's location if it has
1345 one, falling back to the location of the first token within it.
1346 * c-typeck.c (c_finish_return): When issuing warnings about
1347 the incorrect presence/absence of a return value, issue a note
1348 showing the declaration of the function.
1350 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1352 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1354 (c_parser_peek_nth_token): New function.
1355 (c_parser_peek_conflict_marker): New function.
1356 (c_parser_error): Detect conflict markers and report them as such.
1358 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1360 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1361 to preserve range information for the primary expression
1362 in the call to c_parser_postfix_expression_after_primary.
1364 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1366 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1367 expression location, falling back on the first token location,
1368 rather than always using the latter.
1370 2015-12-16 Marek Polacek <polacek@redhat.com>
1373 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1376 2015-12-15 Marek Polacek <polacek@redhat.com>
1379 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1382 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1384 * c-parser.c (c_parser_alignof_expression): Capture location of
1385 closing parenthesis (if any), or of end of unary expression, and
1386 use it to build a src_range for the expression.
1388 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1391 * c-parser.c (c_parser_get_builtin_args): Add
1392 "out_close_paren_loc" param, and write back to it.
1393 (c_parser_postfix_expression): Capture the closing
1394 parenthesis location for RID_CHOOSE_EXPR,
1395 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1396 RID_BUILTIN_SHUFFLE and use it to set the source range
1397 for such expressions; within RID_BUILTIN_COMPLEX set
1398 the underlying location.
1400 2015-12-07 Marek Polacek <polacek@redhat.com>
1403 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1404 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1406 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1408 * c-tree.h (c_build_va_arg): Adjust prototype.
1409 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1410 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1411 parameter, adjust throughout and issue an error if EXPR is a component
1412 with reverse storage order.
1414 2015-12-02 Jason Merrill <jason@redhat.com>
1416 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1417 (c_fully_fold_internal, decl_constant_value_for_optimization):
1418 Move from c-common.c.
1419 * c-tree.h: Declare decl_constant_value_for_optimization.
1420 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1422 2015-12-02 Joseph Myers <joseph@codesourcery.com>
1425 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1426 following link from declarator to next declarator. Track original
1427 qualified type and pass it to c_build_qualified_type.
1428 * c-typeck.c (c_build_qualified_type): Add arguments
1429 orig_qual_type and orig_qual_indirect.
1431 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1433 * c-parser.c (c_parser_omp_clause_name)
1434 (c_parser_oacc_all_clauses): Alphabetical sorting.
1436 2015-12-02 Jakub Jelinek <jakub@redhat.com>
1439 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1442 2015-12-01 Julian Brown <julian@codesourcery.com>
1443 Cesar Philippidis <cesar@codesourcery.com>
1444 James Norris <James_Norris@mentor.com>
1446 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1447 (c_parser_oacc_clause_use_device): New function.
1448 (c_parser_oacc_all_clauses): Add use_device support.
1449 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1450 (c_parser_oacc_host_data): New function.
1451 (c_parser_omp_construct): Add host_data support.
1452 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1453 * c-typeck.c (c_finish_oacc_host_data): New function.
1454 (c_finish_omp_clauses): Add use_device support.
1456 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
1459 * c-decl.c: Set TYPE_PACKED in variants.
1461 2015-11-27 Martin Liska <mliska@suse.cz>
1464 * c-array-notation.c (fix_builtin_array_notation_fn):
1465 Use release_vec_vec instead of vec::release.
1466 (build_array_notation_expr): Likewise.
1467 (fix_conditional_array_notations_1): Likewise.
1468 (fix_array_notation_expr): Likewise.
1469 (fix_array_notation_call_expr): Likewise.
1471 2015-11-27 Jakub Jelinek <jakub@redhat.com>
1474 * c-parser.c (c_parser_compound_statement_nostart): If
1475 last_label is true, use pragma_stmt instead of pragma_compound
1476 as second c_parser_pragma argument.
1477 (c_parser_omp_ordered, c_parser_omp_target_update,
1478 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1479 false as second argument to c_parser_skip_to_pragma_eol after
1480 diagnosing standalone directives used in pragma_stmt context.
1482 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1484 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1485 with "if (ENABLE_OFFLOADING)".
1487 2015-11-23 David Malcolm <dmalcolm@redhat.com>
1490 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1491 for various Objective-C constructs: Class.name syntax,
1492 @selector(), @protocol(), @encode(), and [] message syntax.
1494 2015-11-20 David Malcolm <dmalcolm@redhat.com>
1497 * c-typeck.c (should_suggest_deref_p): New function.
1498 (build_component_ref): Special-case POINTER_TYPE when
1499 generating a "not a structure of union" error message, and
1500 suggest a "->" rather than a ".", providing a fix-it hint.
1502 2015-11-19 David Malcolm <dmalcolm@redhat.com>
1504 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1505 candidate into a new function, find_closest_identifier.
1507 2015-11-19 Marek Polacek <polacek@redhat.com>
1510 * c-typeck.c (parser_build_binary_op): Properly handle
1511 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1513 2015-11-17 David Malcolm <dmalcolm@redhat.com>
1515 * c-parser.c (set_c_expr_source_range): Bulletproof both
1516 overloaded implementations against NULL expr->value.
1517 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1519 (c_parser_unary_expression): Likewise when handling addresses of
1521 (c_parser_postfix_expression): Likewise for statement expressions,
1522 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1523 __builtin_va_arg, and for __builtin_offset_of.
1524 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1525 src_range using the range of the braced initializer.
1526 (c_parser_transaction_expression): Set src_range for "ret" to a
1527 sane pair of values.
1529 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1531 * c-parser.c (c_finish_omp_declare_simd): Look for
1532 "simd" attribute as well. Update error message.
1534 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1536 * c-parser.c (c_parser_omp_declare_target): Adjust.
1538 2015-11-14 Jakub Jelinek <jakub@redhat.com>
1540 * c-typeck.c (c_finish_omp_clauses): Don't mark
1541 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1543 2015-11-14 Marek Polacek <polacek@redhat.com>
1545 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1546 * c-typeck.c: Likewise.
1548 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1550 * c-decl.c (warn_defaults_to): Pass line_table to
1552 * c-errors.c (pedwarn_c99): Likewise.
1553 (pedwarn_c90): Likewise.
1554 * c-parser.c (set_c_expr_source_range): New functions.
1555 (c_token::get_range): New method.
1556 (c_token::get_finish): New method.
1557 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1558 based on the range from the start of the LHS to the end of the
1560 (c_parser_conditional_expression): Likewise, based on the range
1561 from the start of the cond.value to the end of exp2.value.
1562 (c_parser_binary_expression): Call set_c_expr_source_range on
1563 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1564 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1565 based on the cast_loc through to the end of the expr.
1566 (c_parser_unary_expression): Likewise, based on the
1567 op_loc through to the end of op.
1568 (c_parser_sizeof_expression) Likewise, based on the start of the
1569 sizeof token through to either the closing paren or the end of
1571 (c_parser_postfix_expression): Likewise, using the token range,
1572 or from the open paren through to the close paren for
1573 parenthesized expressions.
1574 (c_parser_postfix_expression_after_primary): Likewise, for
1575 various kinds of expression.
1576 * c-tree.h (struct c_expr): Add field "src_range".
1577 (c_expr::get_start): New method.
1578 (c_expr::get_finish): New method.
1579 (set_c_expr_source_range): New decls.
1580 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1581 on ret for prefix unary ops.
1582 (parser_build_binary_op): Likewise, running from the start of
1583 arg1.value through to the end of arg2.value.
1585 2015-11-13 Marek Polacek <polacek@redhat.com>
1588 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1590 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1592 * c-typeck.c: Include spellcheck.h.
1593 (lookup_field_fuzzy_find_candidates): New function.
1594 (lookup_field_fuzzy): New function.
1595 (build_component_ref): If the field was not found, try using
1596 lookup_field_fuzzy and potentially offer a suggestion.
1598 2015-11-12 James Norris <jnorris@codesourcery.com>
1599 Joseph Myers <joseph@codesourcery.com>
1601 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1602 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1603 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1604 and PRAGMA_OMP_CLAUSE_LINK.
1605 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1606 and PRAGMA_OACC_CLAUSE_LINK.
1607 (OACC_DECLARE_CLAUSE_MASK): New definition.
1608 (c_parser_oacc_declare): New function.
1610 2015-11-12 Marek Polacek <polacek@redhat.com>
1613 * c-parser.c (c_parser_for_statement): Reclassify the token in
1616 2015-11-11 Marek Polacek <polacek@redhat.com>
1620 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1621 checking the size of an array.
1623 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1625 * c-array-notation.c: Remove unused header files.
1626 * c-aux-info.c: Likewise.
1627 * c-convert.c: Likewise.
1628 * c-decl.c: Likewise.
1629 * c-errors.c: Likewise.
1630 * c-lang.c: Likewise.
1631 * c-objc-common.c: Likewise.
1632 * c-parser.c: Likewise.
1633 * c-typeck.c: Likewise.
1634 * gccspec.c: Likewise.
1636 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1637 Cesar Philippidis <cesar@codesourcery.com>
1638 James Norris <jnorris@codesourcery.com>
1639 Julian Brown <julian@codesourcery.com>
1640 Nathan Sidwell <nathan@codesourcery.com>
1643 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1645 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1646 (c_parser_pragma): Parse 'acc routine'.
1647 (OACC_ROUTINE_CLAUSE_MARK): Define.
1648 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1650 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1653 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1654 location of the backward-goto to the start of the loop body.
1656 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1659 * c-parser.c (c_parser_while_statement): Finish the loop before
1660 parsing ahead for misleading indentation.
1661 (c_parser_for_statement): Likewise.
1663 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1665 * c-decl.c (finish_struct): If the structure has reverse storage
1666 order, rewrite the type of array fields with scalar component. Call
1667 maybe_apply_pragma_scalar_storage_order on entry.
1668 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1669 errors on bit-fields and reverse SSO here and not...
1670 (c_mark_addressable): ...here.
1671 (output_init_element): Adjust call to initializer_constant_valid_p.
1672 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1674 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1676 * c-decl.c (warn_defaults_to): Update for change in signature
1677 of diagnostic_set_info.
1678 * c-errors.c (pedwarn_c99): Likewise.
1679 (pedwarn_c90): Likewise.
1680 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1681 for textinfo::set_location.
1683 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1684 Thomas Schwinge <thomas@codesourcery.com>
1685 James Norris <jnorris@codesourcery.com>
1687 * c-parser.c (c_parser_omp_clause_name): Add support for
1688 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1689 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1690 default(none) in OpenACC.
1691 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1693 (c_parser_oacc_clause_tile): New function.
1694 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1695 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1696 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1698 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1699 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1701 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1702 (c_parser_oacc_update): Update the error message for missing clauses.
1703 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1704 and OMP_CLAUSE_INDEPENDENT.
1706 2015-11-05 Marek Polacek <polacek@redhat.com>
1709 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1710 deal with pre-evaluation on invalid types.
1712 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1713 Ilya Verbin <ilya.verbin@intel.com>
1715 * c-parser.c: Include context.h and gimple-expr.h.
1716 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1717 monotonic together with nonmonotonic.
1718 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1719 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1720 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1721 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1722 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1723 expressions on combined target teams before the target.
1724 (c_parser_omp_declare_target): If decl has "omp declare target" or
1725 "omp declare target link" attribute, and cgraph or varpool node already
1726 exists, then set corresponding flags. Call c_finish_omp_clauses
1727 in the parenthesized extended-list syntax case.
1728 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1730 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1731 on OMP_CLAUSE_REDUCTION array sections.
1732 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1733 into the constant offset, or for variable low-bound using
1734 POINTER_PLUS_EXPR. For structure element based array sections use
1735 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1736 (c_finish_omp_clauses): Drop generic_field_head, structure
1737 elements are now always mapped even as array section bases,
1738 diagnose same var in data sharing and mapping clauses. Diagnose if
1739 linear step on declare simd is neither a constant nor a uniform
1740 parameter. Look through POINTER_PLUS_EXPR for array section
1741 reductions. Diagnose the same var or function appearing multiple
1742 times on the same directive. Fix up wording for the to clause if t
1743 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1744 modifier on kinds other than dynamic or guided or nonmonotonic
1745 modifier together with ordered clause.
1747 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1748 Chung-Lin Tang <cltang@codesourcery.com>
1750 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1752 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1754 * c-array-notation.c: Reorder #include's and remove duplicates.
1755 * c-aux-info.c: Likewise.
1756 * c-convert.c: Likewise.
1757 * c-decl.c: Likewise.
1758 * c-errors.c: Likewise.
1759 * c-lang.c: Likewise.
1760 * c-objc-common.c: Likewise.
1761 * c-parser.c: Likewise.
1762 * c-typeck.c: Likewise.
1764 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1767 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1768 after calling build_qualified_type.
1770 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1771 Thomas Schwinge <thomas@codesourcery.com>
1772 James Norris <jnorris@codesourcery.com>
1773 Joseph Myers <joseph@codesourcery.com>
1774 Julian Brown <julian@codesourcery.com>
1775 Bernd Schmidt <bschmidt@redhat.com>
1777 * c-parser.c (c_parser_oacc_shape_clause): New.
1778 (c_parser_oacc_simple_clause): New.
1779 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1780 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1782 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1783 James Norris <jnorris@codesourcery.com>
1784 Cesar Philippidis <cesar@codesourcery.com>
1788 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1789 parameters, and handle these. Adjust all users.
1790 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1792 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1794 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1796 (c_finish_omp_construct): Declare function.
1797 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1798 Merge functions into...
1799 (c_finish_omp_construct): ... this new function.
1801 2015-10-22 Richard Biener <rguenther@suse.de>
1803 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1804 before folding a MINUS_EXPR.
1806 2015-10-21 Marek Polacek <polacek@redhat.com>
1809 * c-decl.c (start_function): Warn about vararg functions without
1812 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1814 * c-typeck.c (build_conditional_expr): Use boolean vector
1815 type for vector comparison.
1816 (build_vec_cmp): New.
1817 (build_binary_op): Use build_vec_cmp for comparison.
1819 2015-10-20 Marek Polacek <polacek@redhat.com>
1821 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1823 2015-10-20 Marek Polacek <polacek@redhat.com>
1826 * c-parser.c (c_parser_attributes): Break out of the loop if the
1827 token after an attribute isn't a comma.
1829 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1830 Aldy Hernandez <aldyh@redhat.com>
1832 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1833 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1834 (c_parser_omp_variable_list): Handle structure elements for
1835 map, to and from clauses. Handle array sections in reduction
1836 clause. Formatting fixes.
1837 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1838 if clause modifiers.
1839 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1840 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1841 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1842 c_parser_omp_clause_is_device_ptr): New functions.
1843 (c_parser_omp_clause_ordered): Parse optional parameter.
1844 (c_parser_omp_clause_reduction): Handle array reductions.
1845 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1846 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1848 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1849 (c_parser_omp_clause_depend_sink): New function.
1850 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1851 (c_parser_omp_clause_map): Parse release/delete map kinds and
1852 optional always modifier.
1853 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1854 and c_finish_omp_clauses callers.
1855 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1856 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1857 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1858 (OMP_CRITICAL_CLAUSE_MASK): Define.
1859 (c_parser_omp_critical): Parse critical clauses.
1860 (c_parser_omp_for_loop): Handle doacross loops, adjust
1861 c_finish_omp_for and c_finish_omp_clauses callers.
1862 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1863 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1864 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1865 (c_parser_omp_for): Disallow ordered clause when combined with
1866 distribute. Disallow linear clause when combined with distribute
1867 and not combined with simd.
1868 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1869 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1870 parse clauses and if depend clause is found, don't parse a body.
1871 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1872 Allow target parallel without for after it.
1873 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1874 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1875 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1877 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1878 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1879 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1880 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1882 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1883 defaultmap and is_device_ptr clauses.
1884 (c_parser_omp_target): Parse target parallel and target simd. Set
1885 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1886 and target exit data. Diagnose invalid map kinds.
1887 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1888 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1890 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1892 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1893 (c_parser_omp_taskloop): New function.
1894 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1895 handle PRAGMA_OMP_TASKLOOP.
1896 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1897 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1898 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1899 Add IS_OMP argument, handle structure element bases, diagnose
1900 bitfields, pass IS_OMP recursively, diagnose known zero length
1901 array sections in depend clauses, handle array sections in reduction
1902 clause, diagnose negative length even for pointers.
1903 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1904 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1905 array sections in reduction clause, set
1906 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1907 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1908 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1909 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1911 2015-10-06 Marek Polacek <polacek@redhat.com>
1913 * c-parser.c (c_parser_statement_after_labels): Use
1914 protected_set_expr_location.
1915 (c_parser_omp_clause_num_gangs): Likewise.
1916 (c_parser_omp_clause_num_threads): Likewise.
1917 (c_parser_omp_clause_num_workers): Likewise.
1918 (c_parser_omp_clause_vector_length): Likewise.
1919 (c_parser_omp_clause_num_teams): Likewise.
1920 (c_parser_omp_clause_thread_limit): Likewise.
1921 * c-typeck.c (build_c_cast): Likewise.
1922 (c_cast_expr): Likewise.
1924 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1926 * c-typeck.c (c_tree_equal): Use real_equal instead of
1929 2015-10-04 Jason Merrill <jason@redhat.com>
1931 * c-parser.c (c_lex_one_token): Handle @synchronized.
1932 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1933 can change whether the function is transaction_safe.
1935 2015-10-02 Marek Polacek <polacek@redhat.com>
1938 * c-typeck.c (convert_for_assignment): Use the expansion point
1939 location throughout.
1941 2015-10-02 Marek Polacek <polacek@redhat.com>
1944 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1945 and pass it down to c_parser_if_statement.
1946 (c_parser_else_body): Add CHAIN parameter and pass it down to
1947 c_parser_statement_after_labels.
1948 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1949 duplicated if-else-if conditions.
1951 2015-10-01 Marek Polacek <polacek@redhat.com>
1953 * c-typeck.c (convert_for_assignment): Improve commentary.
1955 2015-09-30 Marek Polacek <polacek@redhat.com>
1958 * c-typeck.c (c_finish_return): Use the expansion point location for
1959 certain "return with value" warnings.
1961 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1963 * c-parser.c (pragma_lex): Add loc argument.
1965 2015-09-15 Marek Polacek <polacek@redhat.com>
1968 * c-decl.c (tag_exists_p): New function.
1969 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1970 struct/union/enum keywords are missing.
1971 * c-tree.h (tag_exists_p): Declare.
1973 2015-09-15 Marek Polacek <polacek@redhat.com>
1975 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1976 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1977 Return NULL_TREE instead of 0.
1978 (lookup_name): Return NULL_TREE instead of 0.
1979 (lookup_name_in_scope): Likewise.
1980 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1981 (parser_xref_tag): Use false instead of 0.
1982 (start_struct): Use true instead of 1.
1983 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1985 2015-09-14 Marek Polacek <polacek@redhat.com>
1987 * c-typeck.c (set_nonincremental_init_from_string): Use
1988 HOST_WIDE_INT_M1U when shifting a negative value.
1990 2015-09-09 Mark Wielaard <mjw@redhat.com>
1992 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1995 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1998 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1999 into OMP_FOR_PRE_BODY rather than before the loop.
2001 2015-09-09 Jakub Jelinek <jakub@redhat.com>
2004 * c-parser.c (c_parser_oacc_all_clauses,
2005 c_parser_omp_all_clauses): Remove invalid clause from
2006 list of clauses even if parser->error is set.
2009 * c-parser.c (c_parser_omp_clause_aligned,
2010 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2012 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2016 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2017 instead of c_parser_unary_expression. If the result is !lvalue_p,
2018 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2020 2015-09-04 Marek Polacek <polacek@redhat.com>
2023 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2025 2015-09-03 Martin Sebor <msebor@redhat.com>
2028 * c-typeck.c (convert_arguments, parser_build_unary_op,
2029 build_conditional_expr, c_cast_expr, convert_for_assignment,
2030 build_binary_op, _objc_common_truthvalue_conversion): Call
2032 (c_decl_implicit): Define.
2034 2015-09-02 Marek Polacek <polacek@redhat.com>
2037 * c-parser.c (c_parser_enum_specifier): Give a better error for
2040 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2042 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2044 2015-08-12 Marek Polacek <polacek@redhat.com>
2046 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2049 2015-08-03 Marek Polacek <polacek@redhat.com>
2052 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2054 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2056 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2058 * c-parser.c (c_parser_if_body): Take token_indent_info
2059 argument. Call warn_for_misleading_indentation even when the
2060 body is a semicolon. Extract token_indent_infos corresponding
2061 to the guard, body and next tokens. Adjust call to
2062 warn_for_misleading_indentation accordingly.
2063 (c_parser_else_body): Likewise.
2064 (c_parser_if_statement): Likewise.
2065 (c_parser_while_statement): Likewise.
2066 (c_parser_for_statement): Likewise.
2068 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2069 Manuel López-Ibáñez <manu@gcc.gnu.org>
2071 * c-decl.c (get_parm_info): Remove static var. Update warning
2074 2015-07-27 Marek Polacek <polacek@redhat.com>
2078 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2080 2015-07-20 Marek Polacek <polacek@redhat.com>
2083 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2084 (build_binary_op): Warn about left shift overflows.
2086 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
2088 * c-array-notation.c: Adjust includes for flags.h changes.
2089 * c-objc-common.c: Likewise.
2091 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2093 * c-array-notation.c: Adjust includes.
2094 * c-aux-info.c: Likewise.
2095 * c-convert.c: Likewise.
2096 * c-decl.c: Likewise.
2097 * c-errors.c: Likewise.
2098 * c-lang.c: Likewise.
2099 * c-objc-common.c: Likewise.
2100 * c-parser.c: Likewise.
2101 * c-typeck.c: Likewise.
2103 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2106 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2108 2015-06-29 Marek Polacek <polacek@redhat.com>
2111 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2112 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2113 about -Wswitch-bool here.
2114 (do_case): Update c_add_case_label call.
2115 (c_finish_case): Update c_do_switch_warnings call.
2117 2015-06-27 Marek Polacek <polacek@redhat.com>
2119 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2121 2015-06-26 Marek Polacek <polacek@redhat.com>
2123 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2125 * c-typeck.c (array_to_pointer_conversion): Likewise.
2126 (build_unary_op): Likewise.
2127 (c_finish_return): Likewise.
2129 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2131 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2132 * c-parser.c: Likewise.
2134 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2136 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2137 instead of pointer_hash.
2138 (detect_field_duplicates): Likewise.
2140 2015-06-25 Marek Polacek <polacek@redhat.com>
2142 * c-array-notation.c: Use VAR_P throughout.
2143 * c-decl.c: Likewise.
2144 * c-objc-common.c: Likewise.
2145 * c-parser.c: Likewise.
2146 * c-typeck.c: Likewise.
2148 2015-06-25 Marek Polacek <polacek@redhat.com>
2150 * c-decl.c: Use is_global_var throughout.
2151 * c-parser.c: Likewise.
2152 * c-typeck.c: Likewise.
2154 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2156 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2157 * c-aux-info.c: Likewise.
2158 * c-convert.c: Likewise.
2159 * c-decl.c: Likewise.
2160 * c-errors.c: Likewise.
2161 * c-lang.c: Likewise.
2162 * c-objc-common.c: Likewise.
2163 * c-parser.c: Likewise.
2164 * c-typeck.c: Likewise.
2166 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
2169 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2172 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2174 * c-decl.c (pop_scope): Register the main translation unit
2175 through the new debug hook.
2177 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2179 * c-array-notation.c : Adjust include files.
2180 * c-aux-info.c : Likewise.
2181 * c-convert.c : Likewise.
2182 * c-decl.c : Likewise.
2183 * c-errors.c : Likewise.
2184 * c-lang.c : Likewise.
2185 * c-lang.h : Likewise.
2186 * c-objc-common.c : Likewise.
2187 * c-parser.c : Likewise.
2188 * c-typeck.c : Likewise.
2190 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2192 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2193 immediately clobber it.
2194 (c_write_global_declarations_1): Remove call to
2195 check_global_declaration_1.
2196 (c_write_global_declarations_2): Remove.
2197 (c_write_final_cleanups): Rename from c_write_global_declarations.
2198 Remove call to finalize_compilation_unit.
2199 Remove calls to debugging hooks.
2200 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2201 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2202 * c-tree.h: Remove c_write_global_declarations.
2204 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2206 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2207 * c-aux-info.c: Likewise.
2208 * c-convert.c: Likewise.
2209 * c-decl.c: Likewise.
2210 * c-errors.c: Likewise.
2211 * c-lang.c: Likewise.
2212 * c-objc-common.c: Likewise.
2213 * c-parser.c: Likewise.
2214 * c-typeck.c: Likewise.
2216 2015-06-04 Marek Polacek <polacek@redhat.com>
2219 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2222 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2224 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2225 Warn for empty struct.
2226 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2228 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2230 * c-decl.c (start_function): Call plugin before parsing.
2231 (finish_function): Call plugin after parsing.
2233 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2236 * c-decl.c (merge_decls): Merge DECL_COMMON.
2238 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2240 * Make-lang.in (check_gcc_pallelize): Define.
2242 2015-05-22 Marek Polacek <polacek@redhat.com>
2245 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2248 2015-05-21 Marek Polacek <polacek@redhat.com>
2250 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2253 2015-05-20 Marek Polacek <polacek@redhat.com>
2255 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2256 * c-typeck.c: Likewise.
2258 2015-05-19 Marek Polacek <polacek@redhat.com>
2260 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2262 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2265 * c-parser.c (c_parser_omp_for_loop): Don't add
2266 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2267 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2268 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2271 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2273 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
2276 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2279 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2282 2015-05-14 Marek Polacek <polacek@redhat.com>
2286 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2289 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2291 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2292 to add a call to warn_for_misleading_indentation.
2293 (c_parser_else_body): Likewise, adding param "else_loc".
2294 (c_parser_if_statement): Check for misleading indentation.
2295 (c_parser_while_statement): Likewise.
2296 (c_parser_for_statement): Likewise.
2298 2015-05-08 Marek Polacek <polacek@redhat.com>
2301 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2302 (output_init_element): Likewise.
2304 2015-05-07 Marek Polacek <polacek@redhat.com>
2307 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2310 2015-04-30 Marek Polacek <polacek@redhat.com>
2312 * c-typeck.c (set_init_label): Call error_at instead of error and
2315 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2318 * c-typeck.c (c_build_va_arg): Clarify the error message.
2320 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2322 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2323 OMP_STANDALONE_CLAUSES.
2325 2015-04-28 Marek Polacek <polacek@redhat.com>
2327 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2329 2015-04-28 Marek Polacek <polacek@redhat.com>
2332 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2334 2015-04-25 Marek Polacek <polacek@redhat.com>
2337 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2340 2015-04-23 Marek Polacek <polacek@redhat.com>
2343 * c-decl.c (set_labels_context_r): New function.
2344 (store_parm_decls): Call it via walk_tree_without_duplicates.
2345 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2346 instead of create_tmp_var. Build TARGET_EXPR instead of
2348 (build_atomic_assign): Use create_tmp_var_raw instead of
2349 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2351 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2353 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2354 (c_parser_omp_target_update): Add missed %> to error_at ().
2356 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2359 * c-decl.c (c_default_pointer_mode): Remove definition.
2360 * c-tree.h (c_default_pointer_mode): Remove declaration.
2362 2015-03-27 Tobias Burnus <burnus@net-b.de>
2365 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2367 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2368 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2369 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2371 2015-03-19 Jakub Jelinek <jakub@redhat.com>
2373 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2374 attribute for DECL_EXTERNAL VAR_DECLs.
2376 2015-03-11 Jakub Jelinek <jakub@redhat.com>
2378 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2381 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2384 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2385 before preparing arguments to warn_logical_not_parentheses.
2387 2015-03-09 Jakub Jelinek <jakub@redhat.com>
2390 * c-typeck.c (parser_build_binary_op): Don't warn for
2391 !!x == y or !b == y where b is _Bool.
2393 2015-03-09 Marek Polacek <polacek@redhat.com>
2395 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2396 * c-decl.c (grokdeclarator): Likewise.
2397 * c-typeck.c (build_binary_op): Likewise.
2399 2015-02-27 Marek Polacek <polacek@redhat.com>
2402 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2404 2015-02-14 Marek Polacek <polacek@redhat.com>
2407 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2408 declared through a typedef name.
2410 2015-02-13 Marek Polacek <polacek@redhat.com>
2413 * c-decl.c (grokdeclarator): Print also the type when giving
2414 the error message about array's incomplete element type.
2416 2015-02-11 Jakub Jelinek <jakub@redhat.com>
2419 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2420 check in the POP macro.
2422 2015-02-09 Marek Polacek <polacek@redhat.com>
2425 * c-typeck.c (process_init_element): Don't always wrap
2426 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2427 initializing a range of elements.
2429 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2433 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2435 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
2437 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2438 processing enum declaration.
2440 2015-01-29 Marek Polacek <polacek@redhat.com>
2443 * c-typeck.c (pop_init_level): If constructor_elements has
2444 exactly one element with integer_zerop value, set constructor_zeroinit
2445 to 1. Remove braces around warning_init call.
2447 2015-01-27 Jakub Jelinek <jakub@redhat.com>
2450 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2451 of FUNCTION_DECLs with error_mark_node.
2453 2015-01-26 Jakub Jelinek <jakub@redhat.com>
2456 * c-typeck.c (convert_arguments): Return -1 if there are
2457 error_args, even if we've diagnosed too many arguments.
2459 2015-01-21 Richard Biener <rguenther@suse.de>
2462 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2463 for builtins the user declared correctly.
2465 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2466 Bernd Schmidt <bernds@codesourcery.com>
2467 Cesar Philippidis <cesar@codesourcery.com>
2468 James Norris <jnorris@codesourcery.com>
2469 Jakub Jelinek <jakub@redhat.com>
2470 Ilmir Usmanov <i.usmanov@samsung.com>
2472 * c-parser.c: Include "gomp-constants.h".
2473 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2474 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2475 Use OMP_CLAUSE_SET_MAP_KIND.
2476 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2477 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2478 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2479 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2480 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2481 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2482 "copyout", "create", "delete", "deviceptr", "gang", "host",
2483 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2484 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2485 "present_or_create", "pcreate", "seq", "self", "vector",
2486 "vector_length", "wait", "worker".
2487 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2488 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2489 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2490 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2491 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2492 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2493 (c_parser_oacc_data_clause_deviceptr)
2494 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2495 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2496 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2497 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2498 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2499 (c_parser_oacc_parallel, c_parser_oacc_update)
2500 (c_parser_oacc_wait): New functions.
2501 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2502 (c_finish_oacc_data): New prototypes.
2503 * c-typeck.c: Include "gomp-constants.h".
2504 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2505 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2506 OMP_CLAUSE_SET_MAP_KIND.
2507 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2508 (c_finish_oacc_data): New functions.
2509 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2510 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2511 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2512 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2513 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2514 GOMP_MAP_FORCE_DEVICEPTR.
2516 2015-01-09 Michael Collison <michael.collison@linaro.org>
2518 * c-array-notation.c: Include hash-set.h, machmode.h,
2519 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2520 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2521 * c-aux-info.c: Ditto.
2522 * c-convert.c: Ditto.
2524 * c-errors.c: Ditto.
2525 * c-lang.c: Dittoxs.
2526 * c-objc-common.c: Ditto.
2527 * c-parser.c: Ditto.
2528 * c-typeck.c: Include hash-set.h, machmode.h,
2529 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2530 fold-const.h, wide-int.h, inchash.h, real.h and
2531 fixed-value.h due to flattening of tree.h.
2533 2015-01-07 Marek Polacek <polacek@redhat.com>
2536 * c-typeck.c (process_init_element): Disallow initialization of
2537 a flexible array member with a string constant if the structure
2540 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2543 * c-typeck.c (convert_for_assignment, c_finish_return): For
2544 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2545 types also set in_late_binary_op around convert call.
2546 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2547 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2548 result on expr as last argument to ubsan_instrument_float_cast,
2549 if in_late_binary_op, don't use c_save_expr but save_expr.
2551 Update copyright years.
2553 2015-01-05 Marek Polacek <polacek@redhat.com>
2556 * c-typeck.c (build_array_ref): Pass loc down to
2557 warn_array_subscript_with_type_char.
2559 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
2561 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2562 (common-pointer-type): For pointers to arrays take qualifiers from
2564 (build_conditional_expr): Add warnings for lost qualifiers.
2565 (comp-target-types): Allow pointers to arrays with different qualifiers.
2566 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2567 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2568 to PEDWARN_FOR_QUALIFIERS.
2570 2014-12-17 Jakub Jelinek <jakub@redhat.com>
2573 * c-convert.c: Include ubsan.h.
2574 (convert): For real -> integral casts and
2575 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2576 instead instrument the float cast directly.
2578 2014-11-29 Jakub Jelinek <jakub@redhat.com>
2580 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2581 c_finish_stmt_expr): Remove NULL last argument from
2582 create_tmp_var_raw and create_tmp_var calls.
2583 * c-array-notation.c (fix_builtin_array_notation_fn,
2584 build_array_notation_expr, fix_conditional_array_notations_1,
2585 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2587 2014-11-28 Marek Polacek <polacek@redhat.com>
2590 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2591 convert the right operand to integer type.
2593 2014-11-25 Marek Polacek <polacek@redhat.com>
2596 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2597 for inline functions.
2599 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2602 * c-typeck.c (build_array_ref): Adjust
2603 convert_vector_to_pointer_for_subscript caller. If it returns true,
2604 call non_lvalue_loc on the result.
2606 2014-11-11 Richard Biener <rguenther@suse.de>
2608 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2611 2014-11-10 Andi Kleen <ak@linux.intel.com>
2614 * c-parser.c (c_parser_statement_after_labels): Call
2616 (c_parser_if_statement): Dito.
2617 (c_parser_switch_statement): Dito.
2618 (c_parser_while_statement): Dito.
2619 (c_parser_do_statement): Dito.
2620 (c_parser_for_statement): Dito.
2621 * c-typeck.c (c_finish_loop): Dito.
2623 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2625 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2626 OPT_Wshift_count_overflow in the warnings.
2628 2014-10-30 Marek Polacek <polacek@redhat.com>
2630 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2631 print the stripped version as well, if they're not the same.
2633 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2635 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2638 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2640 * c-decl.c: Adjust include files.
2641 * c-parser.c: Ditto.
2643 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2644 Tom Tromey <tromey@redhat.com>
2646 * c-tree.h (enum c_oracle_request): New.
2647 (c_binding_oracle_function): New typedef.
2648 (c_binding_oracle, c_pushtag, c_bind): Declare.
2649 * c-decl.c (c_binding_oracle): New global.
2650 (I_SYMBOL_CHECKED): New macro.
2651 (i_symbol_binding): New function.
2652 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2653 (I_TAG_CHECKED): New macro.
2654 (i_tag_binding): New function.
2655 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2656 (I_LABEL_CHECKED): New macro.
2657 (i_label_binding): New function.
2658 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2659 (c_print_identifier): Save and restore c_binding_oracle.
2660 (c_pushtag, c_bind): New functions.
2662 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2664 * c-typeck.c: Adjust include files.
2666 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2669 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2670 initialization here...
2671 (c_initialize_diagnostics): ... but here. Set defaults after
2672 building pretty-printer.
2674 2014-10-23 Marek Polacek <polacek@redhat.com>
2677 * c-decl.c (pop_scope): Don't print warning in external_scope.
2679 2014-10-19 Marek Polacek <polacek@redhat.com>
2682 * c-typeck.c (output_init_element): Allow initializing objects with
2683 static storage duration with compound literals even in C99 and add
2686 2014-10-17 Marek Polacek <polacek@redhat.com>
2689 * c-typeck.c (digest_init): Allow initializing objects with static
2690 storage duration with compound literals even in C99 and add pedwarn
2693 2014-10-17 Marek Polacek <polacek@redhat.com>
2696 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2697 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2698 error multiple times. Print the type.
2700 2014-10-17 Marek Polacek <polacek@redhat.com>
2703 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2706 2014-10-17 Marek Polacek <polacek@redhat.com>
2708 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2709 (start_function): Use OPT_Wimplicit_int instead of 0.
2710 (store_parm_decls_oldstyle): Likewise.
2712 2014-10-17 Alan Modra <amodra@gmail.com>
2715 * c-decl.c (merge_decls): Don't merge section name or tls model
2716 to newdecl symtab node, instead merge to olddecl. Override
2717 existing olddecl section name. Set tls_model for all thread-local
2718 vars, not just OMP thread-private ones. Remove incorrect comment.
2720 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2722 * c-decl.c: Adjust include files.
2724 2014-10-14 DJ Delorie <dj@redhat.com>
2726 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2727 (c_token_starts_typename): Check all __intN, not just __int128.
2728 (c_token_starts_declspecs): Likewise.
2729 (c_parser_declspecs): Likewise.
2730 (c_parser_attribute_any_word): Likewise.
2731 (c_parser_objc_selector): Likewise.
2732 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2733 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2735 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2737 (finish_declspecs): Likewise.
2739 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2741 * c-parser.c (c_parser_all_labels): New function to replace
2743 (c_parser_statement): Call the new function.
2745 2014-10-09 Marek Polacek <polacek@redhat.com>
2748 * c-typeck.c (pop_init_level): Don't warn about initializing
2751 2014-10-07 Marek Polacek <polacek@redhat.com>
2754 * c-decl.c (header_for_builtin_fn): New function.
2755 (implicitly_declare): Suggest which header to include.
2757 2014-10-07 Marek Polacek <polacek@redhat.com>
2759 * c-convert.c (convert): Use error_operand_p.
2760 * c-typeck.c (require_complete_type): Likewise.
2761 (really_atomic_lvalue): Likewise.
2762 (digest_init): Likewise.
2763 (handle_omp_array_sections_1): Likewise.
2765 2014-10-03 Marek Polacek <polacek@redhat.com>
2768 * c-decl.c (pop_scope): Don't warn about "inline function declared
2769 but never defined" for functions marked with gnu_inline attribute.
2771 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2774 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2775 on low_bound and length.
2777 2014-09-24 Marek Polacek <polacek@redhat.com>
2781 * c-parser.c: Don't define CPP_KEYWORD.
2782 (c_parser_switch_statement): Pass original type to c_finish_case.
2783 * c-tree.h (c_finish_case): Update declaration.
2784 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2785 conditionally to c_do_switch_warnings.
2787 2014-09-03 Marek Polacek <polacek@redhat.com>
2790 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2793 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2794 Balaji V. Iyer <balaji.v.iyer@intel.com>
2795 Igor Zamyatin <igor.zamyatin@intel.com>
2797 * c-parser.c (c_parser_cilk_for): New function.
2798 (c_parser_cilk_grainsize): Likewise.
2799 (c_get_temp_regvar): Likewise.
2800 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2801 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2802 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2803 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2806 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2808 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2809 with using HOST_WIDE_INT without truncation to 'int'
2811 2014-08-22 Marek Polacek <polacek@redhat.com>
2814 * c-typeck.c (parser_build_binary_op): Adjust call to
2815 warn_logical_not_parentheses.
2817 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2820 * c-parser.c (c_parser_array_notation): Check for correct
2821 type of an array added.
2823 2014-08-19 Marek Polacek <polacek@redhat.com>
2826 * c-typeck.c (build_binary_op): If either operand of a comparison
2827 is a boolean expression, call maybe_warn_bool_compare.
2829 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2832 * c-typeck.c (build_c_cast): Do a conversion even when the
2833 TYPE_MAIN_VARIANTs are the same.
2835 2014-08-19 Marek Polacek <polacek@redhat.com>
2837 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2838 pedwarn_c99 instead of pedwarn.
2839 (grokfield): Likewise.
2840 (warn_defaults_to): New function.
2841 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2842 Unconditionally call pedwarn_c99 instead of pedwarn.
2843 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2844 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2845 check flag_isoc11 before.
2846 * c-errors.c (pedwarn_c99): Change the return type to bool.
2847 Handle -Wc99-c11-compat.
2848 * c-parser.c (disable_extension_diagnostics): Handle
2849 warn_c99_c11_compat.
2850 (restore_extension_diagnostics): Likewise.
2851 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2852 instead of pedwarn, don't check flag_isoc11 before.
2853 (c_parser_declspecs): Likewise.
2854 (c_parser_alignas_specifier): Likewise.
2855 (c_parser_alignof_expression): Likewise.
2856 (c_parser_generic_selection): Likewise.
2857 * c-tree.h (pedwarn_c99): Update declaration.
2858 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2861 2014-08-19 Marek Polacek <polacek@redhat.com>
2863 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2865 * c-errors.c: Include "opts.h".
2866 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2867 * c-parser.c (disable_extension_diagnostics): Handle negative value
2868 of warn_c90_c99_compat, too.
2869 (restore_extension_diagnostics): Likewise.
2870 (c_parser_compound_statement_nostart): Pass
2871 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2873 2014-08-12 Marek Polacek <polacek@redhat.com>
2875 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2877 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2879 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2881 2014-08-10 Marek Polacek <polacek@redhat.com>
2884 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2885 Call pedwarn_c90 instead of pedwarn.
2886 (check_bitfield_type_and_width): Likewise.
2887 (declspecs_add_qual): Likewise.
2888 (declspecs_add_type): Likewise.
2889 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2890 Adjust to only call pedwarn_c90.
2891 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2892 pedwarn_c90 instead of pedwarn.
2893 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2894 * c-parser.c (disable_extension_diagnostics): Handle
2895 warn_c90_c99_compat.
2896 (restore_extension_diagnostics): Likewise.
2897 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2898 pedwarn_c90 instead of pedwarn.
2899 (c_parser_initelt): Likewise.
2900 (c_parser_postfix_expression): Likewise.
2901 (c_parser_postfix_expression_after_paren_type): Likewise.
2902 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2903 * c-tree.h: Fix formatting.
2904 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2905 pedwarn_c90 instead of pedwarn.
2907 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2909 * c-typeck.c: Remove include of pointer-set.h.
2911 2014-08-07 Marek Polacek <polacek@redhat.com>
2913 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2915 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2917 * c-typeck.c: Use hash_map instead of pointer_map.
2919 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2921 * c-decl.c: Use hash_set instead of pointer_set.
2923 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2926 * c-array-notation.c (expand_array_notations): Handling
2929 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2932 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2935 2014-07-30 Tom Tromey <tromey@redhat.com>
2937 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2939 (really_start_incremental_init, push_init_level): Initialize
2941 (pop_init_level): Set global designator_depth.
2942 (process_init_element): Check for designated_init attribute.
2944 2014-07-20 Marek Polacek <polacek@redhat.com>
2947 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2948 (implicitly_declare): Pass location to implicit_decl_warning.
2950 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2953 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2954 If non-NULL, call c_parser_check_literal_zero.
2955 (c_parser_check_literal_zero): New function.
2956 (c_parser_postfix_expression_after_primary): Adjust
2957 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2959 2014-07-06 Marek Polacek <polacek@redhat.com>
2962 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2963 * c-tree.h (C_ARRAY_PARAMETER): Define.
2964 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2967 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2968 Chen Gang <gang.chen.5i5j@gmail.com>
2970 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2973 2014-07-01 Marek Polacek <polacek@redhat.com>
2975 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2976 instead of 0 to WARN_FOR_ASSIGNMENT.
2978 2014-07-01 Marek Polacek <polacek@redhat.com>
2981 * c-typeck.c (convert_for_assignment): Pass
2982 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2984 2014-06-30 Marek Polacek <polacek@redhat.com>
2986 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2987 has no_sanitize_undefined attribute.
2989 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2992 * c-array-notation.c (fix_builtin_array_notation_fn):
2993 Check for 0 arguments in builtin call. Check that bultin argument is
2995 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2998 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3000 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3001 qualifiers in __auto_type for atomic types.
3002 (c_parser_typeof_specifier): Discard all type qualifiers in
3003 __typeof__ for atomic types.
3005 2014-06-25 Marek Polacek <polacek@redhat.com>
3008 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3009 the return expression to c_finish_return.
3011 2014-06-25 Jakub Jelinek <jakub@redhat.com>
3013 * c-typeck.c (c_finish_omp_clauses): Make sure
3014 OMP_CLAUSE_LINEAR_STEP has correct type.
3016 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3020 2014-06-24 Jakub Jelinek <jakub@redhat.com>
3022 * c-parser.c (c_parser_omp_for_loop): For
3023 #pragma omp parallel for simd move lastprivate clause from parallel
3024 to for rather than simd.
3026 2014-06-23 Marek Polacek <polacek@redhat.com>
3028 * c-typeck.c (parser_build_binary_op): Don't call
3029 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3031 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
3033 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3034 * c-decl.c (merge_decls): Likewise.
3036 2014-06-09 Marek Polacek <polacek@redhat.com>
3039 * c-typeck.c (error_init): Call inform instead of error_at.
3040 (pedwarn_init): Call inform instead of pedwarn.
3041 (warning_init): Call inform instead of warning_at.
3043 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
3045 * c-decl.c (merge_decls): Use set_decl_section_name.
3046 (duplicate_decls): Remove node if it exists.
3048 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3051 * c-typeck.c (push_init_level, process_init_element,
3052 pop_init_level): Correct check for zero initialization, move
3053 missing brace warning to respect zero initialization.
3055 2014-06-05 Marek Polacek <polacek@redhat.com>
3058 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3060 2014-06-05 Marek Polacek <polacek@redhat.com>
3063 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3064 on the left hand side operand of a comparison.
3066 2014-06-05 Marek Polacek <polacek@redhat.com>
3069 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3070 Print note only if the warning was printed.
3072 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3075 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3078 2014-06-03 Marek Polacek <polacek@redhat.com>
3081 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3083 * c-tree.h (c_start_case): Update.
3084 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3085 switch condition has boolean value.
3087 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
3089 * c-decl.c: Include builtins.h.
3090 * c-parser.c: Likewise.
3092 2014-05-27 Marek Polacek <polacek@redhat.com>
3095 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3096 error and warning calls to error_at and warning_at. Pass location of
3097 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3098 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3099 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3101 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3104 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3105 function parameters.
3107 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
3109 * c-decl.c (merge_decls): Preserve symtab node pointers.
3110 (duplicate_decls): Free new decl.
3112 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3114 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3117 * c-parser.c (c_parser_omp_target): Return bool values.
3119 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3121 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3122 num_teams_loc variable to num_thread_limit_loc.
3124 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3126 * c-array-notation.c (expand_array_notations): Use void_node
3127 instead of void_zero_node.
3129 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3131 * c-decl.c (finish_struct): Adjust.
3132 (finish_enum): Likewise.
3134 (record_inline_static): Likewise.
3135 (push_scope): Likewise.
3136 (make_label): Likewise.
3137 (lookup_label_for_goto): Likewise.
3138 (finish_struct): Likewise.
3139 (finish_enum): Likewise.
3140 (store_parm_decls): Likewise.
3141 (c_push_function_context): Likewise.
3142 * c-lang.h: Remove usage of variable_size gty attribute.
3143 * c-parser.c (c_parse_init): Adjust.
3144 (c_parse_file): Likewise.
3146 2014-05-13 Marek Polacek <polacek@redhat.com>
3149 * c-typeck.c (convert_for_assignment): Pass location to
3150 WARN_FOR_ASSIGNMENT instead of input_location.
3152 2014-05-10 Marek Polacek <polacek@redhat.com>
3154 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3155 maybe_warn_string_init.
3156 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3157 maybe_warn_string_init.
3158 * c-tree.h (maybe_warn_string_init): Update declaration.
3159 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3160 Call pedwarn_init with loc instead of with input_location.
3161 (digest_init): Pass init_loc to maybe_warn_string_init.
3162 (pop_init_level): Call pedwarn_init with loc instead of with
3164 (set_init_index): Likewise.
3165 (process_init_element): Likewise.
3167 2014-05-09 Marek Polacek <polacek@redhat.com>
3170 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3171 (c_parser_initelt): Pass location to set_init_label. Pass array index
3172 location to set_init_index.
3173 * c-tree.h (push_init_level): Update declaration.
3174 (pop_init_level): Likewise.
3175 (set_init_index): Likewise.
3176 (set_init_label): Likewise.
3177 * c-typeck.c (error_init): Add location parameter. Call error_at
3179 (digest_init): Pass init_loc to error_init.
3180 (really_start_incremental_init):
3181 (push_init_level): Add location parameter. Pass loc to pop_init_level
3183 (pop_init_level): Likewise.
3184 (set_designator): Add location parameter. Pass loc to pop_init_level,
3185 push_init_level, and error_init.
3186 (set_init_index): Add location parameter. Pass loc to error_init and
3188 (set_init_label): Likewise.
3189 (output_init_element): Pass loc to error_init.
3190 (process_init_element): Pass loc to error_init, pop_init_level,
3191 pedwarn_init, and push_init_level.
3193 2014-05-09 Marek Polacek <polacek@redhat.com>
3196 * c-parser.c (c_parser_attributes): Parse the arguments as an
3197 expression-list if the attribute takes identifier.
3199 2014-05-08 Marek Polacek <polacek@redhat.com>
3202 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3205 2014-05-08 Marek Polacek <polacek@redhat.com>
3208 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3211 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3212 Mike Stump <mikestump@comcast.net>
3213 Richard Sandiford <rdsandiford@googlemail.com>
3215 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3216 (finish_enum): Use wide-int interfaces.
3217 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3218 * c-typeck.c (build_c_cast): Likewise.
3219 (set_nonincremental_init_from_string): Likewise.
3220 (c_tree_equal): Likewise.
3222 2014-05-02 Marek Polacek <polacek@redhat.com>
3225 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3226 Return size_one_node when the type is not complete.
3227 (pointer_diff): Remove comment.
3228 (build_unary_op): Improve error messages.
3230 2014-05-02 Marek Polacek <polacek@redhat.com>
3232 * c-typeck.c (c_finish_return): Separate warning_at calls.
3234 2014-05-02 Marek Polacek <polacek@redhat.com>
3236 * c-tree.h (error_init): Remove declaration.
3237 (pedwarn_init): Likewise.
3238 * c-typeck.c (error_init): Make static and move above.
3239 (pedwarn_init): Likewise.
3240 (warning_init): Move above.
3241 (maybe_warn_string_init): Likewise.
3243 2014-05-01 Jeff Law <law@redhat.com>
3247 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3248 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3251 2014-05-02 Marek Polacek <polacek@redhat.com>
3254 * c-typeck.c (push_init_level): Set constructor_designated to
3255 p->designated for structures.
3257 2014-05-01 Marek Polacek <polacek@redhat.com>
3260 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3261 function-definition has an attribute after the declarator.
3263 2014-05-01 Marek Polacek <polacek@redhat.com>
3266 * c-typeck.c (warning_init): Add location_t parameter. Call
3267 warning_at instead of warning.
3268 (push_init_level): Pass input_location to warning_init.
3269 (add_pending_init): Add location_t parameter. Pass loc to
3271 (set_nonincremental_init): Pass input_location to add_pending_init.
3272 (set_nonincremental_init_from_string): Likewise.
3273 (output_init_element): Pass loc to warning_init and to
3276 2014-05-01 Marek Polacek <polacek@redhat.com>
3279 * c-typeck.c (c_finish_return): Distinguish between label and variable
3280 when warning about returning local address.
3282 2014-05-01 Marek Polacek <polacek@redhat.com>
3285 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3288 2014-05-01 Marek Polacek <polacek@redhat.com>
3291 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3292 instead of 0 to WARN_FOR_QUALIFIERS.
3294 2014-05-01 Marek Polacek <polacek@redhat.com>
3297 * c-typeck.c (default_conversion): Use better location for
3300 2014-04-30 Marek Polacek <polacek@redhat.com>
3302 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3303 also when SANITIZE_FLOAT_DIVIDE is on.
3305 2014-04-30 Marek Polacek <polacek@redhat.com>
3308 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3309 and pedwarn_init. Use loc insted of input_location.
3311 2014-04-30 Marek Polacek <polacek@redhat.com>
3314 * c-typeck.c (build_binary_op): Use location when warning about
3317 2014-04-25 Marek Polacek <polacek@redhat.com>
3320 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3321 always_inline/noinline and hot/cold attributes.
3323 2014-04-25 Marek Polacek <polacek@redhat.com>
3326 * c-parser.c (c_parser_initelt): Pass input_location to
3327 process_init_element.
3328 (c_parser_initval): Pass loc to process_init_element.
3329 * c-tree.h (process_init_element): Adjust declaration.
3330 * c-typeck.c (push_init_level): Pass input_location to
3331 process_init_element.
3332 (pop_init_level): Likewise.
3333 (set_designator): Likewise.
3334 (output_init_element): Add location_t parameter. Pass loc to
3336 (output_pending_init_elements): Pass input_location to
3337 output_init_element.
3338 (process_init_element): Add location_t parameter. Pass loc to
3339 output_init_element.
3341 2014-04-24 Jakub Jelinek <jakub@redhat.com>
3343 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3344 atomic-clause, allow comma in between atomic-clause and
3347 2014-04-22 Jakub Jelinek <jakub@redhat.com>
3350 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3351 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3353 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3356 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3357 create_tmp_var instead build_decl for creating temps.
3358 (build_array_notation_expr): Likewise.
3359 (fix_conditional_array_notations_1): Likewise.
3360 (fix_array_notation_expr): Likewise.
3361 (fix_array_notation_call_expr): Likewise.
3363 2014-03-28 Jakub Jelinek <jakub@redhat.com>
3366 * c-tree.h (c_build_function_call_vec): New prototype.
3367 * c-typeck.c (build_function_call_vec): Don't call
3368 resolve_overloaded_builtin here.
3369 (c_build_function_call_vec): New wrapper function around
3370 build_function_call_vec. Call resolve_overloaded_builtin here.
3371 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3372 Call c_build_function_call_vec instead of build_function_call_vec.
3373 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3374 * c-decl.c (finish_decl): Likewise.
3376 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3379 * c-typeck.c: Use correct format string in cast-qual warning
3381 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3383 * c-decl.c (c_decl_attributes): Use
3384 lang_hooks.types.omp_mappable_type.
3385 * c-typeck.c (c_finish_omp_clauses): Likewise.
3387 2014-03-06 Marek Polacek <polacek@redhat.com>
3390 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3391 of checking tree code.
3393 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3395 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3396 (c_parser_parameter_declaration): Likewise.
3398 2014-02-19 Marek Polacek <polacek@redhat.com>
3401 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3402 Call mark_exp_read on exp.value.
3403 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3404 TREE_ADDRESSABLE on old instead of val.
3405 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3407 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3409 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3410 C_EXPR_APPEND by vec_safe_push.
3411 * c-tree.h (C_EXPR_APPEND): Remove.
3413 2014-01-31 Marek Polacek <polacek@redhat.com>
3416 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3417 build_function_call_vec.
3418 (build_function_call): Likewise.
3419 (build_atomic_assign): Likewise.
3420 (build_function_call_vec): Add arg_loc parameter. Use it.
3421 (convert_arguments): Likewise.
3422 (convert_for_assignment): Rename rhs_loc to expr_loc.
3423 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3424 (c_parser_objc_keywordexpr): Likewise.
3425 (c_parser_postfix_expression_after_primary): Call
3426 build_function_call_vec with expr_loc rather than op_loc.
3427 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3428 build_function_call_vec.
3429 (c_parser_expr_list): Add locations parameter. Fill it with locations
3430 of function arguments.
3431 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3433 2014-01-30 Marek Polacek <polacek@redhat.com>
3436 * c-typeck.c (build_function_call_vec): Use loc parameter.
3437 (convert_arguments): Add location parameter. Use it.
3438 (ep_convert_and_check): Likewise.
3439 (build_atomic_assign): Adjust convert_for_assignment call.
3440 (build_modify_expr): Likewise.
3441 (digest_init): Likewise.
3442 (c_finish_return): Likewise.
3443 (build_conditional_expr): Adjust ep_convert_and_check calls.
3444 (convert_for_assignment): Add rhs_loc parameter. Use it.
3445 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3448 2014-01-30 Richard Biener <rguenther@suse.de>
3451 * c-typeck.c (build_function_call_vec): Do not replace calls
3452 to a function via an incompatible type with a runtime abort.
3454 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3456 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3457 flag_enable_cilkplus with flag_cilkplus.
3458 (c_parser_direct_declarator_inner): Likewise.
3459 (c_parser_attribute_any_word): Likewise.
3460 (c_parser_attributes): Likewise.
3461 (c_parser_compound_statement): Likewise.
3462 (c_parser_statement_after_labels): Likewise.
3463 (c_parser_if_statement): Likewise.
3464 (c_parser_switch_statement): Likewise.
3465 (c_parser_do_statement): Likewise.
3466 (c_parser_for_statement): Likewise.
3467 (c_parser_unary_expression): Likewise.
3468 (c_parser_postfix_expression): Likewise.
3469 (c_parser_postfix_expression_after_primary): Likewise.
3470 (c_parser_postfix_expression_after_primary): Likewise.
3471 (c_parser_omp_clause_name): Likewise.
3472 (c_finish_omp_declare_simd): Likewise.
3473 (c_parser_cilk_verify_simd): Likewise.
3474 * c-typeck.c (build_array_ref): Likewise.
3475 (build_function_call_vec): Likewise.
3476 (convert_arguments): Likewise.
3477 (build_compound_expr): Likewise.
3478 (c_finish_return): Likewise.
3479 (c_finish_if_stmt): Likewise.
3480 (c_finish_loop): Likewise.
3481 (build_binary_op): Likewise.
3483 2014-01-23 Marek Polacek <polacek@redhat.com>
3486 * c-typeck.c (parser_build_binary_op): Use location instead of
3488 (build_binary_op): Pass location to shorten_compare.
3490 2014-01-23 Marek Polacek <polacek@redhat.com>
3493 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3496 2014-01-23 Marek Polacek <polacek@redhat.com>
3499 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3500 of a comma expression.
3501 (emit_side_effect_warnings): Likewise.
3503 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3506 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3507 function to use walk_tree and moved a lot of its functionality to
3508 expand_array_notations.
3509 (expand_array_notations): New function.
3511 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3513 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3514 attribute an attribute without value.
3516 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3519 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3520 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3522 2014-01-22 Marek Polacek <polacek@redhat.com>
3525 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3526 of remove_c_maybe_const_expr on op1 and op2.
3528 2014-01-15 Jakub Jelinek <jakub@redhat.com>
3531 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3532 effects, preevaluate rhs using SAVE_EXPR first.
3534 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3537 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3538 statements with if-elseif statements.
3540 2014-01-06 Marek Polacek <polacek@redhat.com>
3543 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3544 defined bit-field types only in ISO C.
3546 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3548 Update copyright years
3550 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3552 * c-array-notation.c: Use the standard form for the copyright notice.
3554 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3556 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3557 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3558 field in parser is not empty. If not-empty, call the function
3559 c_parser_finish_omp_declare_simd.
3560 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3561 between SIMD-enabled functions and #pragma simd. Added new parameter.
3562 (c_parser_cilk_all_clauses): Modified the usage of the function
3563 c_parser_cilk_clause_vectorlength as mentioned above.
3564 (c_parser_cilk_simd_fn_vector_attrs): New function.
3565 (c_finish_cilk_simd_fn_tokens): Likewise.
3566 (is_cilkplus_vector_p): Likewise.
3567 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3568 "nomask," and "mask" strings in clause name.
3569 (c_parser_omp_all_clauses): Added 3 new case statements:
3570 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3571 PRAGMA_CILK_CLAUSE_NOMASK.
3572 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3573 check for vector attribute and if so call the function
3574 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3575 called the function c_finish_cilk_simd_fn_tokens.
3576 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3577 parser field is non-empty. If so, parse them as you would parse
3578 the omp declare simd pragma.
3579 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3580 Added a check when step is a parameter and flag it as error.
3581 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3582 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3585 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3587 * c-parser.c (c_parser_omp_parallel): Fix description.
3589 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3591 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3592 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3593 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3594 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3596 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3599 * c-parser.c (c_parser_alignas_specifier): Use
3600 c_sizeof_or_alignof_type instead of c_alignof.
3601 (c_parser_alignof_expression): Likewise, with min_alignof
3602 parameter depending on alignof spelling used.
3604 2013-12-04 Marek Polacek <polacek@redhat.com>
3607 * c-decl.c (start_function): Don't warn for missing prototype for
3610 2013-12-03 Marek Polacek <polacek@redhat.com>
3613 * c-decl.c (build_compound_literal): Allow compound literals with
3614 empty initial value.
3616 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3619 * c-typeck.c (build_modify_expr): Diagnose assignment to
3620 expression with array type.
3622 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3625 * c-typeck.c (process_init_element): Do not treat a string as
3626 initializing a whole array when used with a designator for an
3629 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3632 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3633 an inline function following a static declaration.
3635 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3638 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3639 to p_name before calling c_parser_omp_teams instead of after.
3640 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3641 argument. Remove unused p_name variable.
3643 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3644 Jakub Jelinek <jakub@redhat.com>
3646 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3647 external_scope is NULL.
3649 2013-11-27 Tom de Vries <tom@codesourcery.com>
3650 Marc Glisse <marc.glisse@inria.fr>
3653 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3655 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3657 * c-typeck.c: Add required include files from gimple.h.
3659 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3661 * c-decl.c (define_label, shadow_tag_warned)
3662 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3663 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3664 (declspecs_add_type): Remove use of in_system_header macro.
3665 * c-parser.c (c_parser_unary_expression): Likewise.
3666 * c-typeck.c (store_init_value, process_init_element)
3667 (c_start_case): Likewise.
3669 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3672 * c-parser.c (c_parser_set_source_position_from_token): Remove
3673 reference to in_system_header from comment.
3675 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3677 * c-decl.c (grokdeclarator): Update comment to refer to
3678 tree_to_[su]hwi rather than tree_low_cst.
3680 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3682 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3683 tree_to_uhwi throughout.
3685 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3687 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3690 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3692 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3695 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3697 * c-parser.c (c_parser_cilk_simd): New.
3698 (c_parser_cilk_verify_simd): New.
3699 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3700 (c_parser_omp_for_loop): Add case for NE_EXPR.
3701 Set c_break_label for CILK_SIMD.
3702 (c_parser_cilk_clause_vectorlength): New.
3703 (c_parser_cilk_clause_linear): New.
3704 (c_parser_cilk_clause_name): New.
3705 (c_parser_cilk_all_clauses): New.
3706 * c-typeck.c (build_unary_op): Pass location argument to
3708 (build_modify_expr): Same.
3709 (build_asm_expr): Same.
3710 (c_finish_bc_stmt): Error on break/continue in loops.
3712 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3714 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3716 2013-11-14 Diego Novillo <dnovillo@google.com>
3718 * c-decl.c: Include print-tree.h.
3719 Include stor-layout.h.
3722 Include stringpool.h.
3723 * c-lang.c: Include fold-const.h.
3724 * c-parser.c: Include stringpool.h.
3726 Include stor-layout.h.
3728 Include trans-mem.h.
3729 * c-typeck.c: Include stor-layout.h.
3730 Include trans-mem.h.
3734 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3736 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3737 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3739 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3740 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3742 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3743 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3744 (c_parser_declarator, c_parser_direct_declarator_inner)
3745 (c_parser_parameter_declaration, c_parser_type_name): All callers
3747 (c_parser_declaration_or_fndef): Handle declarations with type
3748 determined from the initializer.
3750 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3752 * c-typeck.c: Include gimplify.h.
3754 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3756 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3757 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3759 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3760 or _Thread_local as appropriate in diagnostics.
3761 (build_null_declspecs): Initialize ret->thread_gnu_p.
3762 (declspecs_add_scspec): Handle either __thread or _Thread_local
3763 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3764 pedantic. Do not disallow _Thread_local extern and _Thread_local
3767 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3768 Andrew MacLeod <amacleod@redhat.com>
3770 * c-aux-info.c (gen_type): Handle atomic qualifier.
3771 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3772 qualifiers when compating types.
3773 (shadow_tag_warned): Handle atomic_p in declspecs.
3774 (quals_from_declspecs): Likewise.
3775 (start_decl): Use c_type_promotes_to when promoting argument
3777 (grokdeclarator): Handle _Atomic.
3778 (get_parm_info): Diagnose any qualifier on "void" as only
3780 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3781 comparing types. Use c_type_promotes_to when promoting argument
3783 (finish_function): Use c_type_promotes_to when promoting argument
3785 (build_null_declspecs): Handle atomic_p in declspecs.
3786 (declspecs_add_qual): Handle RID_ATOMIC.
3787 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3788 (c_token_starts_declspecs): Handle RID_ATOMIC.
3789 (c_parser_declspecs): Handle atomic type specifiers and
3791 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3792 from types of expressions with atomic type.
3793 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3794 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3795 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3796 (c_parser_statement_after_labels, c_parser_switch_statement)
3797 (c_parser_for_statement, c_parser_expr_no_commas)
3798 (c_parser_conditional_expression, c_parser_binary_expression)
3799 (c_parser_cast_expression, c_parser_unary_expression)
3800 (c_parser_postfix_expression)
3801 (c_parser_postfix_expression_after_primary, c_parser_expression):
3802 Use convert_lvalue_to_rvalue.
3803 (c_parser_expression_conv, c_parser_expr_list): Document
3804 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3805 (c_parser_objc_synchronized_statement): Use
3806 convert_lvalue_to_rvalue.
3807 (c_parser_objc_selector): Handle RID_ATOMIC.
3808 (c_parser_objc_receiver, c_parser_array_notation): Use
3809 convert_lvalue_to_rvalue.
3810 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3811 _Atomic (type-name).
3812 (struct c_declspecs): Add atomic_p field.
3813 (convert_lvalue_to_rvalue): Declare.
3814 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3815 corresponding atomic types.
3816 (qualify_type): Don't add _Atomic qualifiers from second argument.
3817 (comp_target_types): Do not allow _Atomic mismatches.
3818 (type_lists_compatible_p): Do not remove atomic qualifiers when
3820 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3821 (build_atomic_assign): New functions.
3822 (build_unary_op): Use build_atomic_assign for atomic increment and
3824 (build_conditional_expr): Do not treat _Atomic void as a qualified
3826 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3827 (find_anonymous_field_with_type, convert_to_anonymous_field)
3828 (convert_for_assignment): Do not remove atomic qualifiers when
3830 (digest_init): Do not accept initialization of arrays of atomic
3831 elements by string constants.
3832 (build_asm_expr): Use convert_lvalue_to_rvalue.
3833 (build_binary_op): Do not treat _Atomic void as a qualified
3836 2013-11-06 DJ Delorie <dj@redhat.com>
3838 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3839 both explicit and builtin, print the location of the explicit one.
3841 2013-11-05 Tobias Burnus <burnus@net-b.de>
3843 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3844 c_parser_omp_distribute, c_parser_omp_teams,
3845 c_parser_omp_target, c_parser_omp_declare): Handle
3848 2013-11-03 Marek Polacek <polacek@redhat.com>
3850 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3852 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3854 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3855 check_dup_generic at the end, unless remove is true.
3856 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3858 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3860 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3862 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3863 with decl that is not pointer nor array.
3865 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3867 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3868 a spawning function is found.
3869 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3870 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3871 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3872 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3874 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3875 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3877 (c_finish_return): Added a check to reject _Cilk_spawn in return
3879 (build_cilk_spawn): New function.
3880 (build_cilk_sync): Likewise.
3881 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3883 2013-10-27 Tobias Burnus <burnus@net-b.de>
3886 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3887 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3888 (c_parser_statement_after_labels): Update calls.
3890 2013-10-24 Tobias Burnus <burnus@net-b.de>
3893 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3894 Handle PRAGMA_IVDEP.
3895 (c_parser_statement_after_labels): Update call.
3897 2013-10-24 Marek Polacek <polacek@redhat.com>
3899 * c-parser.c (c_parser_struct_declaration): Add a comment.
3900 (c_parser_declarator): Don't allow _Alignas here.
3902 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3904 * c-parser.c: Include omp-low.h.
3905 * c-typeck.c: Likewise.
3907 2013-10-17 Marek Polacek <polacek@redhat.com>
3910 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3911 Document syntax of the array-declarator.
3912 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3914 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3915 (c_parser_struct_declaration): Likewise.
3916 (c_parser_declarator): Likewise.
3917 (c_parser_direct_declarator_inner): Likewise.
3918 (c_parser_parameter_declaration): Likewise.
3919 (c_parser_type_name): Likewise.
3921 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3923 * c-lang.h (current_omp_declare_target_attribute): New extern
3925 * c-parser.c: Include c-lang.h.
3926 (struct c_parser): Change tokens to c_token *.
3927 Add tokens_buf field. Change tokens_avail type to unsigned int.
3928 (c_parser_consume_token): If parser->tokens isn't
3929 &parser->tokens_buf[0], increment parser->tokens.
3930 (c_parser_consume_pragma): Likewise.
3931 (enum pragma_context): Add pragma_struct and pragma_param.
3932 (c_parser_external_declaration): Adjust
3933 c_parser_declaration_or_fndef caller.
3934 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3935 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3936 Adjust recursive call.
3937 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3939 (c_parser_parameter_declaration): Use pragma_param instead of
3941 (c_parser_compound_statement_nostart, c_parser_label,
3942 c_parser_for_statement): Adjust
3943 c_parser_declaration_or_fndef callers.
3944 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3945 it through to c_parser_conditional_expression.
3946 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3947 pass it through to c_parser_binary_expression. Adjust recursive
3949 (c_parser_binary_expression): Remove prec argument, add
3950 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3951 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3952 binop matches it, use build2 instead of parser_build_binary_op.
3953 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3954 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3955 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3956 Handle pragma_struct and pragma_param the same as pragma_external.
3957 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3958 (c_parser_omp_variable_list): Parse array sections for
3959 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3960 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3961 (c_parser_omp_clause_reduction): Handle user defined reductions.
3962 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3963 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3964 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3965 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3966 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3967 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3968 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3969 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3970 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3971 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3972 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3973 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3974 (c_parser_omp_for_loop): Add CODE argument, pass it through
3975 to c_finish_omp_for. Change last argument to cclauses,
3976 and adjust uses to grab parallel clauses from the array of all
3977 the split clauses. Adjust c_parser_binary_expression,
3978 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3979 (omp_split_clauses): New function.
3980 (c_parser_omp_simd): New function.
3981 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3982 Allow the function to be called also when parsing combined constructs,
3983 and call c_parser_omp_simd when parsing for simd.
3984 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3985 #pragma omp section, require exactly one structured-block instead of
3986 sequence of statements.
3987 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3988 Allow the function to be called also when parsing combined constructs.
3989 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3990 Allow the function to be called also when parsing combined
3992 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3993 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3994 c_parser_omp_teams, c_parser_omp_target_data,
3995 c_parser_omp_target_update, c_parser_omp_target,
3996 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3997 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3998 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3999 (c_parser_omp_construct): Add p_name and mask vars. Handle
4000 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4001 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4002 and c_parser_omp_sections callers.
4003 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4004 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4005 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4006 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4007 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4009 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4010 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4011 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4012 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4013 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4014 * c-typeck.c: Include tree-inline.h.
4015 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4016 handle_omp_array_sections_1, handle_omp_array_sections,
4017 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4018 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4019 user defined reductions.
4020 (c_tree_equal): New function.
4021 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4022 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4023 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4024 c_check_omp_declare_reduction_r): New prototypes.
4025 * c-decl.c (current_omp_declare_target_attribute): New variable.
4026 (c_decl_attributes): New function.
4027 (start_decl, start_function): Use it instead of decl_attributes.
4028 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4029 c_omp_reduction_decl, c_omp_reduction_lookup,
4030 c_check_omp_declare_reduction_r): New functions.
4032 2013-09-25 Tom Tromey <tromey@redhat.com>
4034 * Make-lang.in (c/gccspec.o): Remove.
4035 (CFLAGS-c/gccspec.o): New variable.
4036 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4037 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4038 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4040 2013-09-25 Tom Tromey <tromey@redhat.com>
4042 * Make-lang.in (c/gccspec.o): Don't use subshell.
4044 2013-09-18 Marek Polacek <polacek@redhat.com>
4047 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4048 Remove unnecessary check.
4050 2013-09-18 Marek Polacek <polacek@redhat.com>
4053 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4054 no_sanitize_undefined attribute.
4056 2013-09-13 Kai Tietz <ktietz@redhat.com>
4059 * c-decl.c (c_builtin_function_ext_scope): Remove
4060 wrong assumption that it is never called on prexisting
4063 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4065 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4067 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4069 * c-objc-common.c (c_tree_printer): Tidy.
4071 2013-08-30 Marek Polacek <polacek@redhat.com>
4073 * c-typeck.c (build_binary_op): Add division by zero and shift
4076 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
4077 Joseph Myers <joseph@codesourcery.com>
4080 * c-typeck.c (c_common_type): Prefer double_type_node over
4081 other REAL_TYPE types with the same precision.
4082 (convert_arguments): Likewise.
4084 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4086 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4087 (c_initialize_diagnostics): Call a destructor for the early printer.
4089 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4091 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4092 printer initialization.
4094 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
4097 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4098 check for truth values.
4099 (expand_array_notation_exprs): Added truth values case. Removed an
4100 unwanted else. Added for-loop to walk through subtrees in default
4103 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4105 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4107 2013-07-23 Joseph Myers <joseph@codesourcery.com>
4109 * c-parser.c (struct c_generic_association): Fix typo.
4111 2013-07-23 Tom Tromey <tromey@redhat.com>
4112 Joseph Myers <joseph@codesourcery.com>
4114 * c-parser.c (struct c_generic_association): New.
4115 (c_generic_association_d): New typedef.
4116 (c_parser_generic_selection): New function.
4117 (c_parser_postfix_expression): Handle RID_GENERIC.
4119 2013-07-13 Jason Merrill <jason@redhat.com>
4122 * c-decl.c (finish_struct): Check for too-large class.
4124 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
4127 * c-typeck.c (set_init_index): When folding, check for index overflow.
4129 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4131 * c-parser.c (c_parser_array_notation): Removed rejection of array
4132 notations in an array of function pointers.
4134 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4136 * c-array-notation.c (make_triplet_val_inv): New function.
4137 (create_cmp_incr): Likewise.
4138 (create_array_refs): Likewise.
4139 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4140 Also modularized common parts between functions and called the function.
4141 (build_array_notation_expr): Likewise.
4142 (fix_conditional_array_notations_1): Likewise.
4143 (fix_array_notation_expr): Likewise.
4144 (fix_array_notation_call_expr): Likewise.
4146 2013-06-18 Marek Polacek <polacek@redhat.com>
4149 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4151 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4153 * c-array-notation.c (build_array_notation_expr): Reject array notation
4154 mismatch between LHS and RHS even inside a call_expr. Also, removed
4155 a couple while statements that were dead code.
4157 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4159 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4160 excessive precision expressions in function parameters. Also removed
4161 couple unwanted while statements.
4163 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4165 * c-array-notation.c (expand_array_notation_exprs): Added
4166 ARRAY_NOTATION_REF case.
4168 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4170 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4171 function to c-family/array-notation-common.c.
4172 (is_cilkplus_reduce_builtin): Likewise.
4173 (find_rank): Likewise.
4174 (extract_array_notation_exprs): Likewise.
4175 (replace_array_notations): Likewise.
4176 (find_inv_trees): Likewise.
4177 (replace_inv_trees): Likewise.
4178 (contains_array_notation_expr): Likewise.
4179 (find_correct_array_notation_type): Likewise.
4180 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4181 (struct inv_list): Moved this to c-family/array-notation-common.c.
4182 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4184 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4186 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4187 reduction functions outside the for-loop. Added a check if the fundecl
4188 is non-NULL. Finally, removed an unwanted if-statement, and made the
4191 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4193 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4194 condition of the if-statement matches the rank of else-block and then-
4195 block when array notations are used.
4196 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4197 expression after the entire function body is parsed.
4198 (c_parser_expr_no_commas): Delayed creating array notation expressions
4199 to the end of function parsing.
4200 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4201 whole if-statement instead of just the condition.
4202 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4204 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4207 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4208 array to NULL_TREE if they are unused. Also added a check for the
4209 field to be NULL before its fields are used in future.
4211 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4214 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4215 (build_array_notation_expr): Likewise.
4217 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4219 * c-typeck.c (build_array_ref): Added a check to see if array's
4220 index is greater than one. If true, then emit an error.
4221 (build_function_call_vec): Exclude error reporting and checking
4222 for builtin array-notation functions.
4223 (convert_arguments): Likewise.
4224 (c_finish_return): Added a check for array notations as a return
4225 expression. If true, then emit an error.
4226 (c_finish_loop): Added a check for array notations in a loop
4227 condition. If true then emit an error.
4228 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4229 (build_binary_op): Added a check for array notation expr inside
4230 op1 and op0. If present, we call another function to find correct
4232 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4233 * c-parser.c (c_parser_compound_statement): Check if array
4234 notation code is used in tree, if so, then transform them into
4236 (c_parser_expr_no_commas): Check if array notation is used in LHS
4237 or RHS, if so, then build array notation expression instead of
4239 (c_parser_postfix_expression_after_primary): Added a check for
4240 colon(s) after square braces, if so then handle it like an array
4241 notation. Also, break up array notations in unary op if found.
4242 (c_parser_direct_declarator_inner): Added a check for array
4244 (c_parser_compound_statement): Added a check for array notation in
4245 a stmt. If one is present, then expand array notation expr.
4246 (c_parser_if_statement): Likewise.
4247 (c_parser_switch_statement): Added a check for array notations in
4248 a switch statement's condition. If true, then output an error.
4249 (c_parser_while_statement): Similarly, but for a while.
4250 (c_parser_do_statement): Similarly, but for a do-while.
4251 (c_parser_for_statement): Similarly, but for a for-loop.
4252 (c_parser_unary_expression): Check if array notation is used in a
4253 pre-increment or pre-decrement expression. If true, then expand
4255 (c_parser_array_notation): New function.
4256 * c-array-notation.c: New file.
4257 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4259 2013-05-23 Mike Stump <mikestump@comcast.net>
4261 * c-typeck.c (convert_for_assignment): Handle references to memory
4264 2013-05-16 Jason Merrill <jason@redhat.com>
4266 * Make-lang.in (cc1$(exeext)): Use link mutex.
4268 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4270 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4271 to simply use OPT_Wpointer_arith.
4272 (build_unary_op): Likewise.
4274 2013-04-03 Jakub Jelinek <jakub@redhat.com>
4277 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4278 argument. If set, or it temporarily for parsing of the first
4279 argument into force_folding_builtin_constant_p.
4280 (c_parser_postfix_expression): Adjust callers.
4282 2013-03-21 Richard Biener <rguenther@suse.de>
4284 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4285 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4287 2013-02-12 Marek Polacek <polacek@redhat.com>
4290 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4293 2013-01-24 Jakub Jelinek <jakub@redhat.com>
4296 * c-typeck.c (set_nonincremental_init_from_string): If
4297 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4299 (process_init_element): Likewise.
4301 2012-12-20 Jakub Jelinek <jakub@redhat.com>
4304 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4305 argument, don't call default_function_array_conversion
4306 nor c_fully_fold here.
4307 (c_parser_asm_statement): Adjust callers.
4308 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4309 and outputs here, and call default_function_array_conversion
4310 on inputs that don't need to be addressable.
4312 2012-12-18 Jakub Jelinek <jakub@redhat.com>
4315 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4316 warning require that both c_common_unsigned_type as well as
4317 c_common_signed_type is the same for both mvl and mvr types.
4319 2012-11-16 Diego Novillo <dnovillo@google.com>
4321 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4323 * c-common.c: Use new vec API in vec.h.
4324 * c-common.h: Likewise.
4325 * c-gimplify.c: Likewise.
4326 * c-pragma.c: Likewise.
4327 * c-pretty-print.c: Likewise.
4328 * c-pretty-print.h: Likewise.
4329 * c-semantics.c: Likewise.
4330 * c-decl.c: Likewise.
4331 * c-parser.c: Likewise.
4332 * c-tree.h: Likewise.
4333 * c-typeck.c: Likewise.
4335 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4338 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4340 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4343 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4344 shadows a function, unless the variable is a function or a
4345 pointer-to-function.
4347 2012-10-12 Jakub Jelinek <jakub@redhat.com>
4350 * c-parser.c (struct c_tree_loc_pair): Removed.
4351 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4352 add location_t * and tree * arguments, fill in array of 3
4353 sizeof_arg trees and corresponding locs.
4354 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4355 c_parser_expr_list callers.
4356 (c_parser_postfix_expression_after_primary): Likewise. Pass
4357 array of 3 sizeof_arg trees and locs (corresponding to first
4358 3 arguments) to sizeof_pointer_memaccess_warning.
4360 2012-10-09 Lawrence Crowl <crowl@google.com>
4362 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4363 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4366 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4369 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4372 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
4375 * c-typeck.c: Include c-common.h.
4376 (enum stv_conv): Moved to c-common.h.
4377 (scalar_to_vector): Moved to c-common.c.
4378 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4379 * Make-lang.in: c-typeck.c depends on c-common.h.
4381 2012-10-04 Arnaud Charlet <charlet@adacore.com>
4383 * c-decl.c (c_write_global_declarations): Fix handling of
4386 2012-09-30 Sharad Singhai <singhai@google.com>
4388 * c-decl.c (c_write_global_declarations): Use a different method
4389 to determine if the dump has ben initialized.
4391 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4394 * c-typeck.c (c_cast_expr): When casting to a type requiring
4395 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4398 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4401 * c-typeck.c (build_unary_op): Pass original argument of
4402 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4403 any C_MAYBE_CONST_EXPR, if it has integer operands.
4404 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4405 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4406 to c_objc_common_truthvalue_conversion, then remove any
4407 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4408 c_objc_common_truthvalue_conversion not
4409 c_common_truthvalue_conversion.
4410 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4411 call note_integer_operands for arguments with integer operands
4412 that are not integer constants.
4414 2012-09-13 Jakub Jelinek <jakub@redhat.com>
4417 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4418 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4420 2012-08-31 Jakub Jelinek <jakub@redhat.com>
4423 * c-convert.c (convert): Don't call fold_convert_loc if
4424 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4425 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4426 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4428 2012-08-24 Jakub Jelinek <jakub@redhat.com>
4431 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4432 for nested and empty_ok arguments in the call to
4433 c_parser_declaration_or_fndef.
4435 2012-08-17 Jakub Jelinek <jakub@redhat.com>
4437 * c-tree.h (c_last_sizeof_arg): Declare.
4438 * c-parser.c (struct c_tree_loc_pair): New type.
4439 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4441 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4442 (c_parser_postfix_expression_after_primary): Likewise. Call
4443 sizeof_pointer_memaccess_warning if needed.
4444 (sizeof_ptr_memacc_comptypes): New function.
4445 * c-typeck.c (c_last_sizeof_arg): New global variable.
4446 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4448 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
4450 * c-lang.h (lang_decl): Add variable_size GTY option.
4452 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4454 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4455 * Make-lang.in: Fix dependencies.
4457 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4459 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4460 and add language Makefile hooks.
4461 * config-lang.in: New file.
4462 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4463 add the required "normal" config-lang.in rules.
4464 * c-lang.h: Moved from gcc/ to here.
4465 * c-tree.h: Likewise.
4466 * c-objc-common.c: Likewise.
4467 * c-objc-common.h: Likewise.
4468 * c-typeck.c: Likewise.
4469 * c-convert.c: Likewise.
4470 * c-lang.c: Likewise.
4471 * c-aux-info.c: Likewise.
4472 * c-errors.c: Likewise.
4473 * gccspec.c: Likewise.
4474 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4475 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4477 Copyright (C) 2012-2017 Free Software Foundation, Inc.
4479 Copying and distribution of this file, with or without modification,
4480 are permitted in any medium without royalty provided the copyright
4481 notice and this notice are preserved.