* c-parser.c (c_parser_compound_statement_nostart): Remove redundant
[official-gcc.git] / gcc / c / ChangeLog
blobd768d93564c145529354cf3b105346999de288e2
1 2017-05-23  Marek Polacek  <polacek@redhat.com>
3         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4         quotes.
6 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
8         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
9         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
10         it returned invariant.  Call tree_invariant_p unconditionally
11         afterwards to decide whether to return expr or op0.
13 2017-05-22  Nathan Sidwell  <nathan@acm.org>
15         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
17 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
19         * c-parser.c (c_parser_omp_clause_default): Handle
20         "OMP_CLAUSE_DEFAULT_PRESENT".
22 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
24         * config-lang.in (gtfiles): Add c-family/c-format.c.
26 2017-05-18  Nathan Sidwell  <nathan@acm.org>
28         * c-decl.c (pushdecl_top_level): Delete unused function.
30 2017-05-18  Marek Polacek  <polacek@redhat.com>
32         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
33         (check_earlier_gotos): Likewise.
34         (define_label): Likewise.
35         (pending_xref_error): Likewise.
36         (smallest_type_quals_location): Likewise.
37         (grokdeclarator): Likewise.
38         (grokparms): Likewise.
39         (identifier_global_value): Likewise.
40         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
41         (find_init_member): Likewise.
43 2017-05-18  Marek Polacek  <polacek@redhat.com>
45         * c-decl.c (start_decl): Use false/true instead of 0/1.
46         (grokdeclarator): Likewise.
47         (finish_struct): Likewise.
48         (start_function): Change the return type to bool.  Use false/true
49         instead of 0/1.
50         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
51         * c-tree.h (start_function): Update.
52         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
53         (set_designator): Change the return type to bool.  Use false/true
54         instead of 0/1.
56 2017-05-17  Marek Polacek  <polacek@redhat.com>
58         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
59         * c-typeck.c: Likewise.
61 2017-05-17  Marek Polacek  <polacek@redhat.com>
63         PR sanitizer/80659
64         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
65         DECL_IGNORED_P even for non-static compound literals.
67 2017-05-17  Martin Liska  <mliska@suse.cz>
69         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
70         use it instead of int type.
72 2017-05-17  Marek Polacek  <polacek@redhat.com>
74         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
75         call c_fully_fold.
76         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
77         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 
78         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
79         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
80         save_expr.
81         (c_parser_conditional_expression): Likewise.
82         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
83         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
84         (process_init_element): Likewise.
85         (build_binary_op): Likewise.
86         (handle_omp_array_sections_1): Likewise.
88 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
90         * c-parser.c (c_parser_omp_clause_num_gangs)
91         (c_parser_omp_clause_num_workers)
92         (c_parser_omp_clause_vector_length): Merge functions into...
93         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
94         all users.
96 2017-05-11  Nathan Sidwell  <nathan@acm.org>
98         * gimple-parser.c: Don't #include tree-dump.h.
100 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
102         PR testsuite/80580
103         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
105 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
107         PR testsuite/80580
108         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
109         incorrect __MEM syntax.
111 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
113         PR testsuite/80580
114         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
115         type of unary '*'.
117 2017-05-09  Nathan Sidwell  <nathan@acm.org>
119         * c-tree.h (pushdecl): Declare.
121 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
123         * c-decl.c (warn_defaults_to): Replace report_diagnostic
124         with diagnostic_report_diagnostic.
125         * c-errors.c (pedwarn_c99): Likewise.
126         (pedwarn_c90): Likewise.
128 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
130         PR c++/80038
131         * c-gimplify.c (c_gimplify_expr): Remove calls to
132         cilk_gimplifY_call_params_in_spawned_fn.
134 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
136         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
137         hint for removing extra semicolon.
139 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
141         PR c/80468
142         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
143         enabled, set specs->type to integer_type_node.
145 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
147         * c-array-notation.c: Fix typo in comment.
149 2017-03-29  Marek Polacek  <polacek@redhat.com>
151         PR c/79730
152         * c-decl.c (finish_decl): Check VAR_P.
154 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
156         PR middle-end/80162
157         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
158         * c-typeck.c (c_mark_addressable): Likewise.  Look through
159         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
160         to ARRAY_TYPE.
161         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
163 2017-03-23  Marek Polacek  <polacek@redhat.com>
165         * c-tree.h: Remove a C_RID_YYCODE reference.
167 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
169         PR c/80097
170         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
171         optional COMPOUND_EXPR with ubsan instrumentation.
173 2017-03-17  Marek Polacek  <polacek@redhat.com>
175         * c-parser.c: Add C11 references.
177 2017-03-15  Marek Polacek  <polacek@redhat.com>
179         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
181 2017-03-11  Marek Polacek  <polacek@redhat.com>
183         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
185 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
187         PR translation/79848
188         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
189         "%qs".
190         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
192 2017-03-09  Marek Polacek  <polacek@redhat.com>
194         PR sanitizer/79757
195         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
196         parameter declarations with initializers.
198 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
200         PR c/79969
201         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
202         TYPE_STUB_DECL.
204 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
206         PR c/79834
207         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
208         for "may only be used in compound statements" diagnostics, change it
209         such that the same translatable string is used for all pragmas.  For
210         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
211         diagnostics.
212         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
213         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
214         "may only be used in compound statements" diagnostics, such that the
215         same translatable string is used for all pragmas.
217 2017-03-04  Marek Polacek  <polacek@redhat.com>
219         PR c/79847
220         * c-decl.c (implicit_decl_warning): Add missing space.
222 2017-03-03  Marek Polacek  <polacek@redhat.com>
224         PR c/79758
225         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
226         current_function_prototype_arg_types is error_mark_node.  Fix
227         formatting.  Use TREE_VALUE instead of TREE_TYPE.
229 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
231         PR c/79837
232         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
233         %<min%> or %<max%> in the diagnostics, instead mention identifier.
234         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
235         diagnostics.
237         PR c/79836
238         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
239         instead of %<_Generic>.
240         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
241         (c_parser_omp_target_exit_data): Use %<release%> instead of
242         %<release>.
244 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
246         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
247         instead of just cond ? "..." : "...".
248         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
249         for "enter"/"exit" keyword.
250         (c_finish_oacc_routine): Don't use %s to supply portions of the
251         message.
253 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
255         PR c++/79588
256         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
257         handle -Wrestrict here.
258         * c-typeck.c (build_function_call_vec): Adjust
259         check_function_arguments caller.
261 2017-02-23  Richard Biener  <rguenther@suse.de>
263         PR c/79684
264         * gimple-parser.c (c_parser_gimple_statement): Use set_error
265         to initialize c_exprs to return.
266         (c_parser_gimple_binary_expression): Likewise.
267         (c_parser_gimple_unary_expression): Likewise.
268         (c_parser_gimple_postfix_expression): Likewise.
270 2017-02-22  Marek Polacek  <polacek@redhat.com>
272         PR c/79662
273         * c-typeck.c (convert_arguments): Handle error_mark_node.
275 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
277         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
278         value of c_parser_parse_ssa_name against error_mark_node and emit
279         error if ssa name is anonymous and written as default definition.
281 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
283         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
284         FMA_EXPR.
286 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
288         PR c++/79512
289         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
290         ignore #pragma omp target even when not followed by identifier.
292 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
294         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
295         (c_parser_gimple_unary_expression): Likewise.
297 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
299         * c-parser.c (c_parser_oacc_declare): Add missing space in
300         diagnostics.
302 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
304         PR c/79478
305         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
306         set_c_expr_source_range when parsing ssa-name.
308 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
309         Richard Biener  <rguenther@suse.de>
311         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
312         building IL when arguments are error_mark_node.
313         (c_parser_gimple_unary_expression): Likewise.
314         (c_parser_gimple_if_stmt): Likewise.
315         (c_parser_gimple_switch_stmt): Likewise.
316         (c_parser_gimple_return_stmt): Likewise.
317         (c_parser_parse_ssa_name): When name lookup fails do not build
318         an SSA name.  Use undeclared rather than not declared in error
319         reporting.
321 2017-02-09  Marek Polacek  <polacek@redhat.com>
323         PR c/79428
324         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
325         instead of c_parser_skip_until_found.
327 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
329         PR c/79431
330         * c-parser.c (c_parser_omp_declare_target): Don't invoke
331         symtab_node::get on automatic variables.
333 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
334             Chung-Lin Tang  <cltang@codesourcery.com>
336         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
337         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
338         semantic checking.
339         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
341 2017-02-07  Richard Biener  <rguenther@suse.de>
343         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
344         (c_parser_gimple_postfix_expression_after_primary):
345         Do not use c_build_function_call_vec to avoid folding and promotion.
346         Simplify.
348 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
350         PR lto/79061
351         * c-decl.c (pop_scope): Pass main_input_filename to
352         build_translation_unit_decl.
354 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
356         * c-parser.c: Include "read-rtl-function.h" and
357         "run-rtl-passes.h".
358         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
359         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
360         production.  Update for renaming of field "gimple_pass" to
361         "gimple_or_rtl_pass".  If __RTL was seen, call
362         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
363         to an auto_timevar, to cope with early exit.
364         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
365         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
366         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
367         Handle RID_RTL.
368         (c_parser_parse_rtl_body): New function.
369         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
370         (struct c_declspecs): Rename field "gimple_pass" to
371         "gimple_or_rtl_pass".  Add field "rtl_p".
372         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
373         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
374         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
375         (c_parser_gimple_or_rtl_pass_list): ...this.
377 2017-01-20  Marek Polacek  <polacek@redhat.com>
379         PR c/64279
380         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
382 2017-01-13  Richard Biener  <rguenther@suse.de>
384         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
385         nops.
387 2017-01-13  Richard Biener  <rguenther@suse.de>
389         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
390         _Literal ( type-name ) number.
392 2017-01-12  Richard Biener  <rguenther@suse.de>
394         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
395         __MEM.
397 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
399         PR c++/72813
400         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
401         PCH file.
403 2017-01-11  Richard Biener  <rguenther@suse.de>
405         PR bootstrap/79052
406         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
407         returns on parse errors.
409 2017-01-04  Marek Polacek  <polacek@redhat.com>
411         PR c++/64767
412         * c-parser.c (c_parser_postfix_expression): Mark zero character
413         constants by setting original_type in c_expr.
414         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
415         with a zero character constant.
416         (char_type_p): New function.
418 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
420         * c-parser.c (c_parser_declaration_or_fndef): Create a
421         rich_location at init_loc and parse it to start_init.
422         (last_init_list_comma): New global.
423         (c_parser_braced_init): Update last_init_list_comma when parsing
424         commas.  Pass it to pop_init_level.  Pass location of closing
425         brace to pop_init_level.
426         (c_parser_postfix_expression_after_paren_type): Create a
427         rich_location at type_loc and parse it to start_init.
428         (c_parser_omp_declare_reduction): Likewise for loc.
429         * c-tree.h (start_init): Add rich_location * param.
430         (pop_init_level): Add location_t param.
431         * c-typeck.c (struct initializer_stack): Add field
432         "missing_brace_richloc".
433         (start_init): Add richloc param, use it to initialize
434         the stack node's missing_brace_richloc.
435         (last_init_list_comma): New decl.
436         (finish_implicit_inits): Pass last_init_list_comma to
437         pop_init_level.
438         (push_init_level): When finding missing open braces, add fix-it
439         hints to the richloc.
440         (pop_init_level): Add "insert_before" param and pass it
441         when calling pop_init_level.  Add fixits about missing
442         close braces to any richloc.  Use the richloc for the
443         -Wmissing-braces warning.
444         (set_designator): Pass last_init_list_comma to pop_init_level.
445         (process_init_element): Likewise.
447 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
449         Update copyright years.
451 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
453         PR bootstrap/78817
454         * c-typeck.c (build_function_call_vec): If check_function_arguments
455         returns true, set TREE_NO_WARNING on CALL_EXPR.
457         PR c/77767
458         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
459         to *expr instead of overwriting it.
461 2016-12-20  Richard Biener  <rguenther@suse.de>
463         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
464         error recovery.
465         (c_parser_gimple_statement): Only build assigns for non-error
466         stmts.
467         (c_parser_gimple_postfix_expression_after): Improve error recovery.
469 2016-12-14  Martin Jambor  <mjambor@suse.cz>
471         * c-parser.c: Include omp-general.h and omp-offload.h instead of
472         omp-low.h.
473         (c_finish_oacc_routine): Adjusted call to
474         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
475         to use their new names.
476         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
477         use its new name.
478         (c_parser_oacc_update): Likewise.
479         (c_parser_omp_simd): Likewise.
480         (c_parser_omp_target_update): Likewise.
481         * c-typeck.c: Include omp-general.h instead of omp-low.h.
482         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
483         name.
484         (c_finish_omp_cancellation_point): Likewise.
485         * gimple-parser.c: Do not include omp-low.h
487 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
488             James Norris  <jnorris@codesourcery.com>
490         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
491         EXIT_DATA,WAIT} are not used in compound statements.
492         (c_parser_oacc_enter_exit_data): Update diagnostics.
494 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
496         PR c++/71973
497         * c-decl.c (diagnose_mismatched_decls): Use
498         OPT_Wbuiltin_declaration_mismatch here too.
500 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
501             Alan Hayward  <alan.hayward@arm.com>
502             David Sherwood  <david.sherwood@arm.com>
504         * c-decl.c (merge_decls): Use SET_DECL_MODE.
505         (make_label, finish_struct): Likewise.
507 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
508             Richard Biener  <rguenther@suse.de>
510         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
511         * config-lang.in (gtfiles): Add c/c-parser.h.
512         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
513         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
514         * c-parser.c (enum c_id_kind, struct c_token,
515         c_parser_next_token_is, c_parser_next_token_is_not,
516         c_parser_next_token_is_keyword,
517         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
518         Split out to ...
519         * c-parser.h: ... new header.
520         * c-parser.c: Include c-parser.h and gimple-parser.h.
521         (c_parser_peek_token, c_parser_peek_2nd_token,
522         c_token_starts_typename, c_parser_next_token_starts_declspecs,
523         c_parser_next_tokens_start_declaration, c_parser_consume_token,
524         c_parser_error, c_parser_require, c_parser_skip_until_found,
525         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
526         c_parser_type_name): Export.
527         (c_parser_tokens_buf): New function.
528         (c_parser_error): Likewise.
529         (c_parser_set_error): Likewise.
530         (c_parser_declspecs): Handle RID_GIMPLE.
531         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
532         via c_parser_parse_gimple_body.
533         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
534         c_token_starts_typename, c_parser_next_token_starts_declspecs,
535         c_parser_next_tokens_start_declaration, c_parser_consume_token,
536         c_parser_error, c_parser_require, c_parser_skip_until_found,
537         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
538         c_parser_type_name): Declare.
539         (struct c_parser): Declare forward.
540         (c_parser_tokens_buf): Declare.
541         (c_parser_error): Likewise.
542         (c_parser_set_error): Likewise.
543         * gimple-parser.c: New file.
544         * gimple-parser.h: Likewise.
546 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
548         PR c/35503
549         * c-parser.c (c_parser_postfix_expression_after_primary): Call
550         warn_for_restrict.
552 2016-09-11  Le-Chun Wu  <lcwu@google.com>
553             Mark Wielaard  <mjw@redhat.com>
555         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
556         to the given -Wshadow= variant.
558 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
560         * c-typeck.c: Include memmodel.h.
562 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
564         PR target/77957
565         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
566         instead of lhd_return_null_tree_v.
568 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
570         PR c++/69733
571         * c-decl.c (smallest_type_quals_location): New static function.
572         (grokdeclarator): Try to find the correct location for an ignored
573         qualifier.
575 2016-09-26  Marek Polacek  <polacek@redhat.com>
577         PR c/7652
578         * c-decl.c (pop_scope): Add gcc_fallthrough.
580 2016-09-26  Marek Polacek  <polacek@redhat.com>
582         PR c/7652
583         * c-parser.c (struct c_token): Add flags field.
584         (c_lex_one_token): Pass it to c_lex_with_flags.
585         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
586         into IFN_FALLTHROUGH.
587         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
588         attribute fallthrough after a case label or default label.
589         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
591 2016-09-24  Marek Polacek  <polacek@redhat.com>
593         PR c/77490
594         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
595         have boolean value.  Warn about ++/-- on booleans.
597 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
599         * c-parser.c (incomplete_record_decls): Remove unnecessary
600         = vNULL initialization of file scope vec.
602 2016-09-16  Marek Polacek  <polacek@redhat.com>
604         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
606 2016-09-14  Marek Polacek  <polacek@redhat.com>
608         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
609         (fix_array_notation_expr): Likewise.
610         * c-decl.c (finish_decl): Likewise.
611         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
612         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
613         (function_to_pointer_conversion): Use false instead of 0.
614         (convert_lvalue_to_rvalue): Likewise.
615         (parser_build_unary_op): Likewise.
616         (build_atomic_assign): Likewise.
617         (build_unary_op): Change nonconvert parameter type to bool, use
618         true/false instead of 1/0.
619         (build_binary_op): Use true instead of 1.
621 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
623         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
624         of add_fixit_insert to add_fixit_insert_before.
626 2016-09-13  Marek Polacek  <polacek@redhat.com>
628         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
629         it.
631 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
633         PR c++/77496
634         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
635         COMPOUND_EXPR to warn_for_omitted_condop.
637 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
639         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
640         c_get_substring_location for this new langhook.
642 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
644         PR c/65467
645         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
646         flag_openmp.
647         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
648         instead of mark_exp_read on low_bound/length expression.
649         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
650         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
651         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
652         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
653         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
654         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
655         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
656         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
657         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
658         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
659         instead of mark_expr_read.
660         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
661         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
662         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
663         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
664         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
665         array section bases outside of depend clause, for depend clause
666         use convert_lvalue_to_rvalue on the base.
667         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
668         linear, aligned, map, to and from clauses.
669         (c_omp_clause_copy_ctor): New function.
671 2016-09-01  Marek Polacek  <polacek@redhat.com>
673         PR c/7652
674         * c-typeck.c (composite_type): Add FALLTHRU comment.
676 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
678         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
679         to the insertion fixits for "struct", "union", and "enum".
681 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
683         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
684         rather than add_fixit_misspelled_id.
685         (undeclared_variable): Likewise.
686         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
687         now-redundant "here" params from add_fixit_insert method calls.
688         (c_parser_parameter_declaration): Likewise.
689         * c-typeck.c (build_component_ref): Remove now-redundant range
690         param from add_fixit_replace method calls.
692 2016-08-25  Marek Polacek  <polacek@redhat.com>
694         * c-typeck.c (parser_build_binary_op): Pass LHS to
695         warn_logical_not_parentheses.
697 2016-08-25  Marek Polacek  <polacek@redhat.com>
699         PR c/77323
700         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
701         or _FloatN or _FloatNx is not supported.
702         (finish_declspecs): Set type to integer_type_node when _FloatN or
703         _FloatNx is not supported.
705 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
707         PR c/32187
708         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
709         (struct c_declspecs): Add field floatn_nx_idx.
710         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
711         and _FloatNx type specifiers.
712         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
713         (c_parser_declspecs, c_parser_attribute_any_word)
714         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
715         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
716         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
717         narrower than double.
719 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
720             Martin Liska  <mliska@suse.cz>
722         PR c/67410
723         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
724         % to determine val element to change.  Assert that
725         wchar_bytes * charwidth fits into val array.
727 2016-08-12  Marek Polacek  <polacek@redhat.com>
729         PR c/7652
730         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
731         (c_parser_postfix_expression): Likewise.
732         * c-typeck.c (build_unary_op): Adjust fall through comment.
733         (c_mark_addressable): Likewise.
735 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
737         PR c/72816
738         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
739         array member through typedef, for orig_qual_indirect == 0 clear
740         orig_qual_type.
742 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
744         PR c/64955
745         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
746         this up to selftest::run_c_tests.
747         (selftest::run_c_tests): New function.
749 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
751         * c-parser.c (struct oacc_routine_data): Add error_seen and
752         fndecl_seen members.
753         (c_finish_oacc_routine): Use these.
754         (c_parser_declaration_or_fndef): Adjust.
755         (c_parser_oacc_routine): Likewise.  Support more C language
756         constructs, and improve diagnostics.  Move pragma context
757         checking...
758         (c_parser_pragma): ... here.
760         * c-parser.c (struct oacc_routine_data): New.
761         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
762         Simplify code.
763         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
764         declare target" attribute.
766 2016-08-01  Jan Beulich  <jbeulich@suse.com>
768         * c-fold.c (c_fully_fold_internal): Also emit shift count
769         warnings for vector types.
770         * c-typeck.c (build_binary_op): Likewise.
772 2016-07-29  Marek Polacek  <polacek@redhat.com>
774         PR c/71742
775         * c-decl.c (finish_struct): Rephrase an error message.
777         PR c/71853
778         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
779         to error node for invalid code.
781         PR c/71573
782         * c-decl.c (implicitly_declare): Return decl early not only for
783         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
785 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
787         PR c/71969
788         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
789         on GNU extern inline functions.
791 2016-07-29  Marek Polacek  <polacek@redhat.com>
793         PR c/71583
794         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
795         check expr.value.
797 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
799         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
801 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
803         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
804         spellcheck-tree.h
805         (best_macro_match): Likewise, converting from a typedef to a
806         subclass.
807         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
808         (lookup_name_fuzzy): Update for change of best_macro_match to a
809         subclass with a ctor that calls cpp_forall_identifiers.
811 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
813         * c-decl.c (implicit_decl_warning): Update for conversion of
814         return type of lookup_name_fuzzy to const char *.
815         (undeclared_variable): Likewise.
816         (lookup_name_fuzzy): Convert return type from tree to
817         const char *.
818         * c-parser.c (c_parser_declaration_or_fndef): Update for
819         conversion of return type of lookup_name_fuzzy to const char *.
820         (c_parser_parameter_declaration): Likewise.
822 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
824         * c-parser.c (c_parser_oacc_declare): Don't scan for
825         GOMP_MAP_POINTER.
826         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
827         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
828         zero-length subarrays.
830 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
832         PR c/71858
833         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
834         instead of FUZZY_LOOKUP_NAME.
835         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
836         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
838 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
840         PR c/71858
841         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
843 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
845         * c-parser.c (c_parser_generic_selection): Make type of variable
846         auto_vec.
847         (c_parser_omp_declare_simd): Likewise.
849 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
851         * c-decl.c (struct c_struct_parse_info): Change member types
852         from vec to auto_vec.
853         (start_struct): Adjust.
854         (finish_struct): Likewise.
856 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
858         PR c/71719
859         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
861 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
863         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
864         Move pragma context checking into...
865         (c_parser_omp_cancellation_point): ... here, and improve
866         diagnostic messages.
867         * c-typeck.c (c_finish_omp_cancel)
868         (c_finish_omp_cancellation_point): Improve diagnostic messages.
870 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
872         PR c/71685
873         * c-typeck.c (c_build_qualified_type): Don't clear
874         C_TYPE_INCOMPLETE_VARS for the main variant.
876 2016-06-28  Martin Sebor  <msebor@redhat.com>
878         PR c/71552
879         * c-typeck.c (output_init_element): Diagnose incompatible types
880         before non-constant initializers.
882 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
884         * Make-lang.in: Don't cat ../stage_current if it does not exist.
886 2016-06-23  Andi Kleen  <ak@linux.intel.com>
888         * Make-lang.in: Add support for autofdo.
890 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
892         PR c/70339
893         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
894         (implicit_decl_warning): When issuing warnings for implicit
895         declarations, attempt to provide a suggestion via
896         lookup_name_fuzzy.
897         (undeclared_variable): Likewise when issuing errors.
898         (lookup_name_in_scope): Likewise.
899         (struct edit_distance_traits<cpp_hashnode *>): New struct.
900         (best_macro_match): New typedef.
901         (find_closest_macro_cpp_cb): New function.
902         (lookup_name_fuzzy): New function.
903         * c-parser.c: Include gcc-rich-location.h.
904         (c_token_starts_typename): Split out case CPP_KEYWORD into...
905         (c_keyword_starts_typename): ...this new function.
906         (c_parser_declaration_or_fndef): When issuing errors about
907         missing "struct" etc, add a fixit.  For other kinds of errors,
908         attempt to provide a suggestion via lookup_name_fuzzy.
909         (c_parser_parms_declarator): When looking ahead to detect typos in
910         type names, also reject CPP_KEYWORD.
911         (c_parser_parameter_declaration): When issuing errors about
912         unknown type names, attempt to provide a suggestion via
913         lookup_name_fuzzy.
914         * c-tree.h (c_keyword_starts_typename): New prototype.
916 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
918         PR c/71601
919         * c-typeck.c (build_conditional_expr): Return error_mark_node if
920         c_common_type returns error_mark_node.
922 2016-06-19  Martin Sebor  <msebor@redhat.com>
924         PR c/69507
925         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
926         __alignof__ (expression).
928 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
930         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
932 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
934         * c-typeck.c (build_component_ref): Simplify fixit code by
935         using gcc_rich_location::add_fixit_misspelled_id.
936         (set_init_label): Likewise.
938 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
940         * c-parser.c (c_parser_initelt): Provide location of name for new
941         location_t param of set_init_label.
942         * c-tree.h (set_init_label): Add location_t param.
943         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
944         param and use it when issuing error messages about unrecognized
945         field names.  Attempt to provide a fixit hint if appropriate,
946         otherwise update the error message to provide the type name.
948 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
950         PR c/71381
951         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
952         Loosen checking.
954 2016-06-08  Martin Sebor  <msebor@redhat.com>
955             Jakub Jelinek  <jakub@redhat.com>
957         PR c++/70507
958         PR c/68120
959         * c-typeck.c (convert_arguments): Don't promote last argument
960         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
962 2016-06-08  Marek Polacek  <polacek@redhat.com>
964         PR c/71418
965         * c-decl.c (grokdeclarator): Check TYPE_P.
967         PR c/71426
968         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
969         code.
971 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
973         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
974         and structure element reference, capture the location of the
975         element name token and pass it to build_component_ref.
976         (c_parser_postfix_expression_after_primary): Likewise for
977         structure element dereference.
978         (c_parser_omp_variable_list): Likewise for
979         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
980         * c-tree.h (build_component_ref): Add location_t param.
981         * c-typeck.c (build_component_ref): Add location_t param
982         COMPONENT_LOC.  Use it, if available, when issuing hints about
983         mispelled member names to provide a fixit replacement hint.
985 2016-06-06  Marek Polacek  <polacek@redhat.com>
987         PR c/71362
988         * c-parser.c (c_parser_direct_declarator): Set location.
990 2016-06-06  Marek Polacek  <polacek@redhat.com>
992         * c-typeck.c (comptypes_internal): Handle comparisons of
993         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
994         TYPE_REF_CAN_ALIAS_ALL.
996 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
998         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
999         arguments as addressable when async clause exists.
1001 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
1003         PR c++/71349
1004         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1005         when combined with target construct.
1007 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
1009         * c-parser.c (c_parser_omp_clause_schedule): Warn if
1010         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1012 2016-05-25  Marek Polacek  <polacek@redhat.com>
1014         PR c/71265
1015         * c-decl.c (c_make_fname_decl): Don't check seen_error.
1017         PR c/71266
1018         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1020 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
1022         * c-parser.c (c_parser_oacc_declare): Add support for
1023         GOMP_MAP_FIRSTPRIVATE_POINTER.
1024         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1025         argument with enum c_omp_region_type ort.
1026         (handle_omp_array_sections): Likewise.  Update call to
1027         handle_omp_array_sections_1.
1028         (c_finish_omp_clauses): Add specific errors and warning messages for
1029         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
1030         call to handle_omp_array_sections.
1032 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
1034         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1036 2016-05-24  Richard Biener  <rguenther@suse.de>
1038         PR middle-end/70434
1039         PR c/69504
1040         * c-typeck.c (build_array_ref): Do not complain about indexing
1041         non-lvalue vectors.  Adjust for function name change.
1043 2016-05-20  Martin Sebor  <msebor@redhat.com>
1045         PR c/71115
1046         * c-typeck.c (error_init): Use
1047         expansion_point_location_if_in_system_header.
1048         (warning_init): Same.
1050 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
1052         PR c/71171
1053         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1054         in error-handling.
1055         (c_parser_postfix_expression): Likewise.
1056         * c-tree.h (c_expr::set_error): New method.
1057         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1058         that result's range is initialized.
1060 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1062         * c-typeck.c (parser_build_unary_op): Fix formatting.
1064 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
1066         * c-decl.c (grokdeclarator): Remove errmsg and use of
1067         targetm.invalid_return_type.
1068         (grokparms): Remove errmsg and use of
1069         targetm.invalid_parameter_type.
1071 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
1073         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1074         function return type.
1076 2016-05-12  Marek Polacek  <polacek@redhat.com>
1078         PR c/70756
1079         * c-decl.c (build_compound_literal): Pass LOC down to
1080         c_incomplete_type_error.
1081         * c-tree.h (require_complete_type): Adjust declaration.
1082         (c_incomplete_type_error): Likewise.
1083         * c-typeck.c (require_complete_type): Add location parameter, pass it
1084         down to c_incomplete_type_error.
1085         (c_incomplete_type_error): Add location parameter, pass it down to
1086         error_at.
1087         (build_component_ref): Pass location down to c_incomplete_type_error.
1088         (default_conversion): Pass location down to require_complete_type.
1089         (build_array_ref): Likewise.
1090         (build_function_call_vec): Likewise.
1091         (convert_arguments): Likewise.
1092         (build_unary_op): Likewise.
1093         (build_c_cast): Likewise.
1094         (build_modify_expr): Likewise.
1095         (convert_for_assignment): Likewise.
1096         (c_finish_omp_clauses): Likewise.
1098 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1100         PR c/43651
1101         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1102         is enabled.
1103         * c-errors.c (pedwarn_c90): Return true if warned.
1104         * c-tree.h (pedwarn_c90): Change return type to bool.
1105         (enum c_declspec_word): Add new enumerator cdw_atomic.
1107 2016-05-11  Marek Polacek  <polacek@redhat.com>
1109         PR c++/71024
1110         * c-decl.c (diagnose_mismatched_decls): Factor out code to
1111         diagnose_mismatched_attributes and call it.
1113 2016-05-10  Marek Polacek  <polacek@redhat.com>
1115         PR c/70255
1116         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1117         on a declaration following the definition.
1119 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
1121         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1122         parse it through to c_parser_c99_block_statement.
1123         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1124         caller.
1126 2016-05-04  Marek Polacek  <polacek@redhat.com>
1128         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1129         OPT_Wdangling_else.
1131 2016-05-04  Marek Polacek  <polacek@redhat.com>
1133         PR c/48778
1134         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1135         for macro expansions.
1137 2016-05-03  Marek Polacek  <polacek@redhat.com>
1139         PR c/70859
1140         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1141         check_builtin_function_arguments.
1143 2016-05-03  Richard Biener  <rguenther@suse.de>
1145         * Make-lang.in (cc1-checksum.c): For stage-final re-use
1146         the checksum from the previous stage.
1148 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
1150         * c-parser.c (c_parser_oacc_all_clauses): Update call to
1151         c_finish_omp_clauses.
1152         (c_parser_omp_all_clauses): Likewise.
1153         (c_parser_oacc_cache): Likewise.
1154         (c_parser_oacc_loop): Likewise.
1155         (omp_split_clauses): Likewise.
1156         (c_parser_omp_declare_target): Likewise.
1157         (c_parser_cilk_all_clauses): Likewise.
1158         (c_parser_cilk_for): Likewise.
1159         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1160         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1162 2016-05-02  Marek Polacek  <polacek@redhat.com>
1164         PR c/70851
1165         * c-decl.c (grokdeclarator): Diagnose when array's size has an
1166         incomplete type.
1168 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
1170         PR middle-end/70626
1171         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1172         OACC_LOOP_CLAUSE_MASK.
1173         (c_parser_oacc_kernels_parallel): Update call to
1174         c_oacc_split_loop_clauses.
1176 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
1178         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1179         argument to build_modify_expr in two cases.
1181 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
1183         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1184         warn_for_memset instead of warning directly here.
1186 2016-04-26  Marek Polacek  <polacek@redhat.com>
1188         PR c/67784
1189         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1190         out of ...
1191         (c_parser_for_statement): ... here.
1192         (c_parser_if_statement): Use it.
1193         (c_parser_switch_statement): Use it.
1194         (c_parser_while_statement): Use it.
1196         PR c/70791
1197         * c-decl.c (pushdecl): Pass LOCUS down to warning.
1199 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1201         PR c++/69363
1202         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1203         instead of c_finish_cilk_clauses.
1204         * c-tree.h (c_finish_omp_clauses): Add new default argument.
1205         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
1206         floating-point variables in the linear clause for Cilk Plus.
1208 2016-04-18  Michael Matz  <matz@suse.de>
1210         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1211         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1213 2016-04-15  Marek Polacek  <polacek@redhat.com>
1215         PR c/70671
1216         * c-typeck.c (build_unary_op): Pass location down to error and
1217         warning call.
1219 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
1221         PR c/70436
1222         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1223         where needed.
1224         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1225         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1226         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1227         Adjust c_parser_pragma callers.
1228         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
1229         caller.
1230         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1231         c_parser_statement.
1232         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1233         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1234         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1235         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1236         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1237         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1238         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1239         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1240         down where needed.
1241         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
1242         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1243         calls.
1245 2016-04-13  Marek Polacek  <polacek@redhat.com>
1247         PR c/70436
1248         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1249         adjust callers.
1250         (c_parser_statement): Likewise.
1251         (c_parser_c99_block_statement): Likewise.
1252         (c_parser_while_statement): Likewise.
1253         (c_parser_for_statement): Likewise.
1254         (c_parser_if_body): Don't set IF_P here.
1255         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
1256         about dangling else here.
1257         * c-tree.h (c_finish_if_stmt): Adjust declaration.
1258         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
1259         warn about dangling else here.
1261 2016-04-04  Marek Polacek  <polacek@redhat.com>
1263         PR c/70307
1264         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1266 2016-03-31  Marek Polacek  <polacek@redhat.com>
1268         PR c/70297
1269         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1271 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
1273         PR c/70281
1274         * c-parser.c (c_parser_postfix_expression): Set the source range
1275         for uses of "__builtin_types_compatible_p".
1277 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
1279         PR c/70280
1280         * c-typeck.c (composite_type): Don't count void_list_node
1281         into len, if the list is terminated by void_list_node, start
1282         with void_list_node instead of NULL for newargs.  Stop
1283         at void_list_node.
1285 2016-03-16  Marek Polacek  <polacek@redhat.com>
1287         PR c/70093
1288         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1289         nested functions returning VM types.
1291 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
1293         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1294         when calling c_finish_omp_clauses.
1296 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
1298         PR c/69824
1299         * c-decl.c (get_parm_info): Don't queue implicit function declarations
1300         for later.
1302 2016-03-04  Marek Polacek  <polacek@redhat.com>
1304         PR c/69798
1305         * c-parser.c (c_parser_postfix_expression): Call
1306         c_parser_cast_expression rather than c_parser_postfix_expression.
1308 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
1310         PR c/69796
1311         PR c/69974
1312         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1313         of incomplete decls to error_mark_node.
1315 2016-02-24  Marek Polacek  <polacek@redhat.com>
1317         PR c/69819
1318         * c-decl.c (finish_decl): Don't update the copy of the type of a
1319         different decl type.
1321 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
1323         PR objc/69844
1324         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1325         in id_kind reclassification.
1327 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
1329         PR c/69835
1330         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1332 2016-02-16  James Norris  <jnorris@codesourcery.com>
1334         PR c/64748
1335         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1337 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
1339         * c-decl.c (build_null_declspecs): Zero the entire struct.
1341         PR c/69522
1342         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
1343         callers changed.  If nested_p is true, use it to call
1344         finish_implicit_inits.
1345         * c-tree.h (finish_implicit_inits): Declare.
1346         * c-typeck.c (finish_implicit_inits): New function.  Move code
1347         from ...
1348         (push_init_level): ... here.
1349         (set_designator, process_init_element): Call finish_implicit_inits.
1351 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
1353         PR c/69768
1354         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1355         arguments for -Waddress warning.
1357 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
1359         PR c/69669
1360         * c-decl.c (finish_enum): When honoring mode attribute,
1361         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1363 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
1365         PR debug/69518
1366         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1367         all type variants, not just TYPE_MAIN_VARIANT.
1369 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
1371         PR debug/66869
1372         * c-decl.c (c_write_global_declarations_1): Warn with
1373         warn_unused_function if static prototype without definition
1374         is not C_DECL_USED.
1376 2016-01-27  Marek Polacek  <polacek@redhat.com>
1378         PR c/68062
1379         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1380         to unsigned, if needed.  Add -Wsign-compare warning.
1382 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
1384         PR tree-optimization/69483
1385         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1387 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1389         PR c/24293
1390         * c-tree.h (incomplete_record_decls): Declare.
1391         * c-parser.c (incomplete_record_decls): Define.
1392         (c_parser_translation_unit): Iterate through incomplete_record_decls and
1393         report error if any decl has zero size.
1394         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1395         or enum type to incomplete_record_decls.
1397 2016-01-14  Tom de Vries  <tom@codesourcery.com>
1399         PR tree-optimization/68773
1400         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1401         set force_output.
1403 2016-01-14  Marek Polacek  <polacek@redhat.com>
1405         PR c/69262
1406         * c-decl.c (grokdeclarator): Provide more information for invalid
1407         array declarations.
1409 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
1411         * c-parser.c (c_parser_unary_expression): For dereferences, build
1412         a combined location before calling build_indirect_ref, so that
1413         error reports cover the full range, manually updating the c_expr
1414         src_range.
1416 2016-01-06  Marek Polacek  <polacek@redhat.com>
1418         PR sanitizer/69099
1419         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
1420         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
1421         NULL.
1423 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1425         Update copyright years.
1427 2016-01-04  Marek Polacek  <polacek@redhat.com>
1429         PR c/68908
1430         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
1431         optimization to use __atomic_fetch_* built-in if possible.
1433 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
1435         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1436         into...
1437         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
1438         all users.
1440 2015-12-22  Marek Polacek  <polacek@redhat.com>
1442         PR c/69002
1443         * c-typeck.c (build_component_ref): Warn when acessing elements of
1444         atomic structures or unions.
1446 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
1448         * c-typeck.c: Include "gcc-rich-location.h".
1449         (build_binary_op): In the two places that call binary_op_error,
1450         create a gcc_rich_location and populate it with the location of
1451         the binary op and its two operands.
1453 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1455         * c-parser.c (c_parser_statement_after_labels): When calling
1456         c_finish_return, Use the return expression's location if it has
1457         one, falling back to the location of the first token within it.
1458         * c-typeck.c (c_finish_return): When issuing warnings about
1459         the incorrect presence/absence of a return value, issue a note
1460         showing the declaration of the function.
1462 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1464         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1465         to 4.
1466         (c_parser_peek_nth_token): New function.
1467         (c_parser_peek_conflict_marker): New function.
1468         (c_parser_error): Detect conflict markers and report them as such.
1470 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1472         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1473         to preserve range information for the primary expression
1474         in the call to c_parser_postfix_expression_after_primary.
1476 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1478         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1479         expression location, falling back on the first token location,
1480         rather than always using the latter.
1482 2015-12-16  Marek Polacek  <polacek@redhat.com>
1484         PR c/64637
1485         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1486         available.
1488 2015-12-15  Marek Polacek  <polacek@redhat.com>
1490         PR c/68907
1491         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1492         artificial decl.
1494 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
1496         * c-parser.c (c_parser_alignof_expression): Capture location of
1497         closing parenthesis (if any), or of end of unary expression, and
1498         use it to build a src_range for the expression.
1500 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
1502         PR c/68757
1503         * c-parser.c (c_parser_get_builtin_args): Add
1504         "out_close_paren_loc" param, and write back to it.
1505         (c_parser_postfix_expression): Capture the closing
1506         parenthesis location for RID_CHOOSE_EXPR,
1507         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1508         RID_BUILTIN_SHUFFLE and use it to set the source range
1509         for such expressions; within RID_BUILTIN_COMPLEX set
1510         the underlying location.
1512 2015-12-07  Marek Polacek  <polacek@redhat.com>
1514         PR c/68668
1515         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1516         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1518 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
1520         * c-tree.h (c_build_va_arg): Adjust prototype.
1521         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1522         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1523         parameter, adjust throughout and issue an error if EXPR is a component
1524         with reverse storage order.
1526 2015-12-02  Jason Merrill  <jason@redhat.com>
1528         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1529         (c_fully_fold_internal, decl_constant_value_for_optimization):
1530         Move from c-common.c.
1531         * c-tree.h: Declare decl_constant_value_for_optimization.
1532         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1534 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
1536         PR c/68162
1537         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1538         following link from declarator to next declarator.  Track original
1539         qualified type and pass it to c_build_qualified_type.
1540         * c-typeck.c (c_build_qualified_type): Add arguments
1541         orig_qual_type and orig_qual_indirect.
1543 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
1545         * c-parser.c (c_parser_omp_clause_name)
1546         (c_parser_oacc_all_clauses): Alphabetical sorting.
1548 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
1550         PR c/68533
1551         * c-decl.c (get_parm_info): Use b->locus instead of input_location
1552         for diagnostics.
1554 2015-12-01  Julian Brown  <julian@codesourcery.com>
1555             Cesar Philippidis  <cesar@codesourcery.com>
1556             James Norris  <James_Norris@mentor.com>
1558         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1559         (c_parser_oacc_clause_use_device): New function.
1560         (c_parser_oacc_all_clauses): Add use_device support.
1561         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1562         (c_parser_oacc_host_data): New function.
1563         (c_parser_omp_construct): Add host_data support.
1564         * c-tree.h (c_finish_oacc_host_data): Add prototype.
1565         * c-typeck.c (c_finish_oacc_host_data): New function.
1566         (c_finish_omp_clauses): Add use_device support.
1568 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
1570         PR c/67106
1571         * c-decl.c: Set TYPE_PACKED in variants.
1573 2015-11-27  Martin Liska  <mliska@suse.cz>
1575         PR c++/68312
1576         * c-array-notation.c (fix_builtin_array_notation_fn):
1577         Use release_vec_vec instead of vec::release.
1578         (build_array_notation_expr): Likewise.
1579         (fix_conditional_array_notations_1): Likewise.
1580         (fix_array_notation_expr): Likewise.
1581         (fix_array_notation_call_expr): Likewise.
1583 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
1585         PR c/63326
1586         * c-parser.c (c_parser_compound_statement_nostart): If
1587         last_label is true, use pragma_stmt instead of pragma_compound
1588         as second c_parser_pragma argument.
1589         (c_parser_omp_ordered, c_parser_omp_target_update,
1590         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1591         false as second argument to c_parser_skip_to_pragma_eol after
1592         diagnosing standalone directives used in pragma_stmt context.
1594 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
1596         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1597         with "if (ENABLE_OFFLOADING)".
1599 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
1601         PR objc/68438
1602         * c-parser.c (c_parser_postfix_expression): Set up source ranges
1603         for various Objective-C constructs: Class.name syntax,
1604         @selector(), @protocol(), @encode(), and [] message syntax.
1606 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
1608         PR 62314
1609         * c-typeck.c (should_suggest_deref_p): New function.
1610         (build_component_ref): Special-case POINTER_TYPE when
1611         generating a "not a structure of union"  error message, and
1612         suggest a "->" rather than a ".", providing a fix-it hint.
1614 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
1616         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1617         candidate into a new function, find_closest_identifier.
1619 2015-11-19  Marek Polacek  <polacek@redhat.com>
1621         PR c/68412
1622         * c-typeck.c (parser_build_binary_op): Properly handle
1623         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1625 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
1627         * c-parser.c (set_c_expr_source_range): Bulletproof both
1628         overloaded implementations against NULL expr->value.
1629         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1630         values.
1631         (c_parser_unary_expression): Likewise when handling addresses of
1632         labels.
1633         (c_parser_postfix_expression): Likewise for statement expressions,
1634         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1635         __builtin_va_arg, and for __builtin_offset_of.
1636         (c_parser_postfix_expression_after_paren_type): Initialize expr's
1637         src_range using the range of the braced initializer.
1638         (c_parser_transaction_expression): Set src_range for "ret" to a
1639         sane pair of values.
1641 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
1643         * c-parser.c (c_finish_omp_declare_simd): Look for
1644         "simd" attribute as well. Update error message.
1646 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1648         * c-parser.c (c_parser_omp_declare_target): Adjust.
1650 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
1652         * c-typeck.c (c_finish_omp_clauses): Don't mark
1653         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1655 2015-11-14  Marek Polacek  <polacek@redhat.com>
1657         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1658         * c-typeck.c: Likewise.
1660 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1662         * c-decl.c (warn_defaults_to): Pass line_table to
1663         rich_location ctor.
1664         * c-errors.c (pedwarn_c99): Likewise.
1665         (pedwarn_c90): Likewise.
1666         * c-parser.c (set_c_expr_source_range): New functions.
1667         (c_token::get_range): New method.
1668         (c_token::get_finish): New method.
1669         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1670         based on the range from the start of the LHS to the end of the
1671         RHS.
1672         (c_parser_conditional_expression): Likewise, based on the range
1673         from the start of the cond.value to the end of exp2.value.
1674         (c_parser_binary_expression): Call set_c_expr_source_range on
1675         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1676         (c_parser_cast_expression): Call set_c_expr_source_range on ret
1677         based on the cast_loc through to the end of the expr.
1678         (c_parser_unary_expression): Likewise, based on the
1679         op_loc through to the end of op.
1680         (c_parser_sizeof_expression) Likewise, based on the start of the
1681         sizeof token through to either the closing paren or the end of
1682         expr.
1683         (c_parser_postfix_expression): Likewise, using the token range,
1684         or from the open paren through to the close paren for
1685         parenthesized expressions.
1686         (c_parser_postfix_expression_after_primary): Likewise, for
1687         various kinds of expression.
1688         * c-tree.h (struct c_expr): Add field "src_range".
1689         (c_expr::get_start): New method.
1690         (c_expr::get_finish): New method.
1691         (set_c_expr_source_range): New decls.
1692         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1693         on ret for prefix unary ops.
1694         (parser_build_binary_op): Likewise, running from the start of
1695         arg1.value through to the end of arg2.value.
1697 2015-11-13  Marek Polacek  <polacek@redhat.com>
1699         PR c/68320
1700         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1702 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1704         * c-typeck.c: Include spellcheck.h.
1705         (lookup_field_fuzzy_find_candidates): New function.
1706         (lookup_field_fuzzy): New function.
1707         (build_component_ref): If the field was not found, try using
1708         lookup_field_fuzzy and potentially offer a suggestion.
1710 2015-11-12  James Norris  <jnorris@codesourcery.com>
1711             Joseph Myers  <joseph@codesourcery.com>
1713         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1714         (c_parser_omp_clause_name): Handle 'device_resident' clause.
1715         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1716         and PRAGMA_OMP_CLAUSE_LINK.
1717         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1718         and PRAGMA_OACC_CLAUSE_LINK.
1719         (OACC_DECLARE_CLAUSE_MASK): New definition.
1720         (c_parser_oacc_declare): New function.
1722 2015-11-12  Marek Polacek  <polacek@redhat.com>
1724         PR c/67784
1725         * c-parser.c (c_parser_for_statement): Reclassify the token in
1726         a correct scope.
1728 2015-11-11  Marek Polacek  <polacek@redhat.com>
1730         PR c/68107
1731         PR c++/68266
1732         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
1733         checking the size of an array.
1735 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
1737         * c-array-notation.c: Remove unused header files.
1738         * c-aux-info.c: Likewise.
1739         * c-convert.c: Likewise.
1740         * c-decl.c: Likewise.
1741         * c-errors.c: Likewise.
1742         * c-lang.c: Likewise.
1743         * c-objc-common.c: Likewise.
1744         * c-parser.c: Likewise.
1745         * c-typeck.c: Likewise.
1746         * gccspec.c: Likewise.
1748 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
1749             Cesar Philippidis  <cesar@codesourcery.com>
1750             James Norris  <jnorris@codesourcery.com>
1751             Julian Brown  <julian@codesourcery.com>
1752             Nathan Sidwell  <nathan@codesourcery.com>
1754         c/
1755         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1756         routine arg.
1757         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1758         (c_parser_pragma): Parse 'acc routine'.
1759         (OACC_ROUTINE_CLAUSE_MARK): Define.
1760         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1762 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1764         PR debug/67192
1765         * c-typeck.c (c_finish_loop): For unconditional loops, set the
1766         location of the backward-goto to the start of the loop body.
1768 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1770         PR debug/67192
1771         * c-parser.c (c_parser_while_statement): Finish the loop before
1772         parsing ahead for misleading indentation.
1773         (c_parser_for_statement): Likewise.
1775 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1777         * c-decl.c (finish_struct): If the structure has reverse storage
1778         order, rewrite the type of array fields with scalar component.  Call
1779         maybe_apply_pragma_scalar_storage_order on entry.
1780         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
1781         errors on bit-fields and reverse SSO here and not...
1782         (c_mark_addressable): ...here.
1783         (output_init_element): Adjust call to initializer_constant_valid_p.
1784         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1786 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
1788         * c-decl.c (warn_defaults_to): Update for change in signature
1789         of diagnostic_set_info.
1790         * c-errors.c (pedwarn_c99): Likewise.
1791         (pedwarn_c90): Likewise.
1792         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1793         for textinfo::set_location.
1795 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
1796             Thomas Schwinge  <thomas@codesourcery.com>
1797             James Norris  <jnorris@codesourcery.com>
1799         * c-parser.c (c_parser_omp_clause_name): Add support for
1800         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1801         (c_parser_omp_clause_default): Add is_oacc argument. Handle
1802         default(none) in OpenACC.
1803         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1804         arguments.
1805         (c_parser_oacc_clause_tile): New function.
1806         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1807         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1808         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1809         TILE}.
1810         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1811         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1812         FIRSTPRIVATE}.
1813         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1814         (c_parser_oacc_update): Update the error message for missing clauses.
1815         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1816         and OMP_CLAUSE_INDEPENDENT.
1818 2015-11-05  Marek Polacek  <polacek@redhat.com>
1820         PR c/68090
1821         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1822         deal with pre-evaluation on invalid types.
1824 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
1825             Ilya Verbin  <ilya.verbin@intel.com>
1827         * c-parser.c: Include context.h and gimple-expr.h.
1828         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1829         monotonic together with nonmonotonic.
1830         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
1831         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1832         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1833         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1834         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
1835         expressions on combined target teams before the target.
1836         (c_parser_omp_declare_target): If decl has "omp declare target" or
1837         "omp declare target link" attribute, and cgraph or varpool node already
1838         exists, then set corresponding flags.  Call c_finish_omp_clauses
1839         in the parenthesized extended-list syntax case.
1840         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1841         declare target.
1842         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1843         on OMP_CLAUSE_REDUCTION array sections.
1844         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1845         into the constant offset, or for variable low-bound using
1846         POINTER_PLUS_EXPR.  For structure element based array sections use
1847         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1848         (c_finish_omp_clauses): Drop generic_field_head, structure
1849         elements are now always mapped even as array section bases,
1850         diagnose same var in data sharing and mapping clauses.  Diagnose if
1851         linear step on declare simd is neither a constant nor a uniform
1852         parameter.  Look through POINTER_PLUS_EXPR for array section
1853         reductions.  Diagnose the same var or function appearing multiple
1854         times on the same directive.  Fix up wording for the to clause if t
1855         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
1856         modifier on kinds other than dynamic or guided or nonmonotonic
1857         modifier together with ordered clause.
1859 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
1860             Chung-Lin Tang  <cltang@codesourcery.com>
1862         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1864 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
1866         * c-array-notation.c: Reorder #include's and remove duplicates.
1867         * c-aux-info.c: Likewise.
1868         * c-convert.c: Likewise.
1869         * c-decl.c: Likewise.
1870         * c-errors.c: Likewise.
1871         * c-lang.c: Likewise.
1872         * c-objc-common.c: Likewise.
1873         * c-parser.c: Likewise.
1874         * c-typeck.c: Likewise.
1876 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
1878         PR debug/66068
1879         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1880         after calling build_qualified_type.
1882 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
1883             Thomas Schwinge  <thomas@codesourcery.com>
1884             James Norris  <jnorris@codesourcery.com>
1885             Joseph Myers  <joseph@codesourcery.com>
1886             Julian Brown  <julian@codesourcery.com>
1887             Bernd Schmidt  <bschmidt@redhat.com>
1889         * c-parser.c (c_parser_oacc_shape_clause): New.
1890         (c_parser_oacc_simple_clause): New.
1891         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1892         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1894 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
1895             James Norris  <jnorris@codesourcery.com>
1896             Cesar Philippidis  <cesar@codesourcery.com>
1898         PR c/64765
1899         PR c/64880
1900         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1901         parameters, and handle these.  Adjust all users.
1902         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1903         into...
1904         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
1905         all users.
1906         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1907         declare functions.
1908         (c_finish_omp_construct): Declare function.
1909         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1910         Merge functions into...
1911         (c_finish_omp_construct): ... this new function.
1913 2015-10-22  Richard Biener  <rguenther@suse.de>
1915         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1916         before folding a MINUS_EXPR.
1918 2015-10-21  Marek Polacek  <polacek@redhat.com>
1920         PR c/68024
1921         * c-decl.c (start_function): Warn about vararg functions without
1922         a prototype.
1924 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
1926         * c-typeck.c (build_conditional_expr): Use boolean vector
1927         type for vector comparison.
1928         (build_vec_cmp): New.
1929         (build_binary_op): Use build_vec_cmp for comparison.
1931 2015-10-20  Marek Polacek  <polacek@redhat.com>
1933         * c-parser.c (is_cilkplus_vector_p): Don't define here.
1935 2015-10-20  Marek Polacek  <polacek@redhat.com>
1937         PR c/67964
1938         * c-parser.c (c_parser_attributes): Break out of the loop if the
1939         token after an attribute isn't a comma.
1941 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
1942             Aldy Hernandez  <aldyh@redhat.com>
1944         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1945         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1946         (c_parser_omp_variable_list): Handle structure elements for
1947         map, to and from clauses.  Handle array sections in reduction
1948         clause.  Formatting fixes.
1949         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1950         if clause modifiers.
1951         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1952         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1953         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1954         c_parser_omp_clause_is_device_ptr): New functions.
1955         (c_parser_omp_clause_ordered): Parse optional parameter.
1956         (c_parser_omp_clause_reduction): Handle array reductions.
1957         (c_parser_omp_clause_schedule): Parse optional simd modifier.
1958         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1959         functions.
1960         (c_parser_omp_clause_linear): Parse linear clause modifiers.
1961         (c_parser_omp_clause_depend_sink): New function.
1962         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1963         (c_parser_omp_clause_map): Parse release/delete map kinds and
1964         optional always modifier.
1965         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1966         and c_finish_omp_clauses callers.
1967         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
1968         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1969         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1970         (OMP_CRITICAL_CLAUSE_MASK): Define.
1971         (c_parser_omp_critical): Parse critical clauses.
1972         (c_parser_omp_for_loop): Handle doacross loops, adjust
1973         c_finish_omp_for and c_finish_omp_clauses callers.
1974         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1975         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1976         (OMP_FOR_CLAUSE_MASK): Add linear clause.
1977         (c_parser_omp_for): Disallow ordered clause when combined with
1978         distribute.  Disallow linear clause when combined with distribute
1979         and not combined with simd.
1980         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1981         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1982         parse clauses and if depend clause is found, don't parse a body.
1983         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1984         Allow target parallel without for after it.
1985         (OMP_TASK_CLAUSE_MASK): Add priority clause.
1986         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1987         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1988         invalid kinds.
1989         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1990         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1991         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1992         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1993         functions.
1994         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1995         defaultmap and is_device_ptr clauses.
1996         (c_parser_omp_target): Parse target parallel and target simd.  Set
1997         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
1998         and target exit data.  Diagnose invalid map kinds.
1999         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2000         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2001         construct.
2002         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2003         &omp_priv.
2004         (OMP_TASKLOOP_CLAUSE_MASK): Define.
2005         (c_parser_omp_taskloop): New function.
2006         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2007         handle PRAGMA_OMP_TASKLOOP.
2008         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2009         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2010         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2011         Add IS_OMP argument, handle structure element bases, diagnose
2012         bitfields, pass IS_OMP recursively, diagnose known zero length
2013         array sections in depend clauses, handle array sections in reduction
2014         clause, diagnose negative length even for pointers.
2015         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2016         types, pass IS_OMP down to handle_omp_array_sections_1, handle
2017         array sections in reduction clause, set
2018         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2019         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2020         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2021         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2023 2015-10-06  Marek Polacek  <polacek@redhat.com>
2025         * c-parser.c (c_parser_statement_after_labels): Use
2026         protected_set_expr_location.
2027         (c_parser_omp_clause_num_gangs): Likewise.
2028         (c_parser_omp_clause_num_threads): Likewise.
2029         (c_parser_omp_clause_num_workers): Likewise.
2030         (c_parser_omp_clause_vector_length): Likewise.
2031         (c_parser_omp_clause_num_teams): Likewise.
2032         (c_parser_omp_clause_thread_limit): Likewise.
2033         * c-typeck.c (build_c_cast): Likewise.
2034         (c_cast_expr): Likewise.
2036 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
2038         * c-typeck.c (c_tree_equal): Use real_equal instead of
2039         REAL_VALUES_EQUAL.
2041 2015-10-04  Jason Merrill  <jason@redhat.com>
2043         * c-parser.c (c_lex_one_token): Handle @synchronized.
2044         * c-decl.c (match_builtin_function_types): A declaration of a built-in
2045         can change whether the function is transaction_safe.
2047 2015-10-02  Marek Polacek  <polacek@redhat.com>
2049         PR c/67730
2050         * c-typeck.c (convert_for_assignment): Use the expansion point
2051         location throughout.
2053 2015-10-02  Marek Polacek  <polacek@redhat.com>
2055         PR c/64249
2056         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2057         and pass it down to c_parser_if_statement.
2058         (c_parser_else_body): Add CHAIN parameter and pass it down to
2059         c_parser_statement_after_labels.
2060         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
2061         duplicated if-else-if conditions.
2063 2015-10-01  Marek Polacek  <polacek@redhat.com>
2065         * c-typeck.c (convert_for_assignment): Improve commentary.
2067 2015-09-30  Marek Polacek  <polacek@redhat.com>
2069         PR c/67730
2070         * c-typeck.c (c_finish_return): Use the expansion point location for
2071         certain "return with value" warnings.
2073 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2075         * c-parser.c (pragma_lex): Add loc argument.
2077 2015-09-15  Marek Polacek  <polacek@redhat.com>
2079         PR c/67580
2080         * c-decl.c (tag_exists_p): New function.
2081         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2082         struct/union/enum keywords are missing.
2083         * c-tree.h (tag_exists_p): Declare.
2085 2015-09-15  Marek Polacek  <polacek@redhat.com>
2087         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2088         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2089         Return NULL_TREE instead of 0.
2090         (lookup_name): Return NULL_TREE instead of 0.
2091         (lookup_name_in_scope): Likewise.
2092         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2093         (parser_xref_tag): Use false instead of 0.
2094         (start_struct): Use true instead of 1.
2095         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2097 2015-09-14  Marek Polacek  <polacek@redhat.com>
2099         * c-typeck.c (set_nonincremental_init_from_string): Use
2100         HOST_WIDE_INT_M1U when shifting a negative value.
2102 2015-09-09  Mark Wielaard  <mjw@redhat.com>
2104         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2105         parm against NULL.
2107 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
2109         PR c/67502
2110         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2111         into OMP_FOR_PRE_BODY rather than before the loop.
2113 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
2115         PR c/67501
2116         * c-parser.c (c_parser_oacc_all_clauses,
2117         c_parser_omp_all_clauses): Remove invalid clause from
2118         list of clauses even if parser->error is set.
2120         PR c/67500
2121         * c-parser.c (c_parser_omp_clause_aligned,
2122         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2123         test for errors.
2124         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2125         error_mark_node.
2127         PR c/67495
2128         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2129         instead of c_parser_unary_expression.  If the result is !lvalue_p,
2130         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2132 2015-09-04  Marek Polacek  <polacek@redhat.com>
2134         PR sanitizer/67279
2135         * c-typeck.c (build_binary_op): Don't instrument static initializers.
2137 2015-09-03  Martin Sebor  <msebor@redhat.com>
2139         PR c/66516
2140         * c-typeck.c (convert_arguments, parser_build_unary_op,
2141         build_conditional_expr, c_cast_expr, convert_for_assignment,
2142         build_binary_op, _objc_common_truthvalue_conversion): Call
2143         reject_gcc_builtin.
2144         (c_decl_implicit): Define.
2146 2015-09-02  Marek Polacek  <polacek@redhat.com>
2148         PR c/67432
2149         * c-parser.c (c_parser_enum_specifier): Give a better error for
2150         an empty enum.
2152 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
2154         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2156 2015-08-12  Marek Polacek  <polacek@redhat.com>
2158         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2159         LOC to it.
2161 2015-08-03  Marek Polacek  <polacek@redhat.com>
2163         PR c/67088
2164         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2165         Use it.
2166         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2168 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
2170         * c-parser.c (c_parser_if_body): Take token_indent_info
2171         argument. Call warn_for_misleading_indentation even when the
2172         body is a semicolon.  Extract token_indent_infos corresponding
2173         to the guard, body and next tokens.  Adjust call to
2174         warn_for_misleading_indentation accordingly.
2175         (c_parser_else_body): Likewise.
2176         (c_parser_if_statement): Likewise.
2177         (c_parser_while_statement): Likewise.
2178         (c_parser_for_statement): Likewise.
2180 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
2181             Manuel López-Ibáñez  <manu@gcc.gnu.org>
2183         * c-decl.c (get_parm_info): Remove static var. Update warning
2184         message.
2186 2015-07-27  Marek Polacek  <polacek@redhat.com>
2188         PR c++/66555
2189         PR c/54979
2190         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2192 2015-07-20  Marek Polacek  <polacek@redhat.com>
2194         PR c++/55095
2195         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2196         (build_binary_op): Warn about left shift overflows.
2198 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
2200         * c-array-notation.c: Adjust includes for flags.h changes.
2201         * c-objc-common.c: Likewise.
2203 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
2205         * c-array-notation.c: Adjust includes.
2206         * c-aux-info.c: Likewise.
2207         * c-convert.c: Likewise.
2208         * c-decl.c: Likewise.
2209         * c-errors.c: Likewise.
2210         * c-lang.c: Likewise.
2211         * c-objc-common.c: Likewise.
2212         * c-parser.c: Likewise.
2213         * c-typeck.c: Likewise.
2215 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2217         PR fortran/66605
2218         * c-decl.c (finish_function): Call do_warn_unused_parameter.
2220 2015-06-29  Marek Polacek  <polacek@redhat.com>
2222         PR c/66322
2223         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2224         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
2225         about -Wswitch-bool here.
2226         (do_case): Update c_add_case_label call.
2227         (c_finish_case): Update c_do_switch_warnings call.
2229 2015-06-27  Marek Polacek  <polacek@redhat.com>
2231         * c-typeck.c: Use VECTOR_TYPE_P throughout.
2233 2015-06-26  Marek Polacek  <polacek@redhat.com>
2235         * c-array-notation.c (fix_builtin_array_notation_fn): Use
2236         INDIRECT_REF_P.
2237         * c-typeck.c (array_to_pointer_conversion): Likewise.
2238         (build_unary_op): Likewise.
2239         (c_finish_return): Likewise.
2241 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
2243         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2244         * c-parser.c: Likewise.
2246 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
2248         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2249         instead of pointer_hash.
2250         (detect_field_duplicates): Likewise.
2252 2015-06-25  Marek Polacek  <polacek@redhat.com>
2254         * c-array-notation.c: Use VAR_P throughout.
2255         * c-decl.c: Likewise.
2256         * c-objc-common.c: Likewise.
2257         * c-parser.c: Likewise.
2258         * c-typeck.c: Likewise.
2260 2015-06-25  Marek Polacek  <polacek@redhat.com>
2262         * c-decl.c: Use is_global_var throughout.
2263         * c-parser.c: Likewise.
2264         * c-typeck.c: Likewise.
2266 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
2268         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2269         * c-aux-info.c: Likewise.
2270         * c-convert.c: Likewise.
2271         * c-decl.c: Likewise.
2272         * c-errors.c: Likewise.
2273         * c-lang.c: Likewise.
2274         * c-objc-common.c: Likewise.
2275         * c-parser.c: Likewise.
2276         * c-typeck.c: Likewise.
2278 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
2280         PR middle-end/66325
2281         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2282         variants.
2284 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
2286         * c-decl.c (pop_scope): Register the main translation unit
2287         through the new debug hook.
2289 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
2291         * c-array-notation.c : Adjust include files.
2292         * c-aux-info.c : Likewise.
2293         * c-convert.c : Likewise.
2294         * c-decl.c : Likewise.
2295         * c-errors.c : Likewise.
2296         * c-lang.c : Likewise.
2297         * c-lang.h : Likewise.
2298         * c-objc-common.c : Likewise.
2299         * c-parser.c : Likewise.
2300         * c-typeck.c : Likewise.
2302 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
2304         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2305         immediately clobber it.
2306         (c_write_global_declarations_1): Remove call to
2307         check_global_declaration_1.
2308         (c_write_global_declarations_2): Remove.
2309         (c_write_final_cleanups): Rename from c_write_global_declarations.
2310         Remove call to finalize_compilation_unit.
2311         Remove calls to debugging hooks.
2312         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2313         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2314         * c-tree.h: Remove c_write_global_declarations.
2316 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
2318         * c-array-notation.c: Adjust includes for restructured coretypes.h.
2319         * c-aux-info.c: Likewise.
2320         * c-convert.c: Likewise.
2321         * c-decl.c: Likewise.
2322         * c-errors.c: Likewise.
2323         * c-lang.c: Likewise.
2324         * c-objc-common.c: Likewise.
2325         * c-parser.c: Likewise.
2326         * c-typeck.c: Likewise.
2328 2015-06-04  Marek Polacek  <polacek@redhat.com>
2330         PR c/66341
2331         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2332         it is a lvalue.
2334 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2336         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2337         Warn for empty struct.
2338         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2340 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
2342         * c-decl.c (start_function): Call plugin before parsing.
2343         (finish_function): Call plugin after parsing.
2345 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2347         PR c/49551
2348         * c-decl.c (merge_decls): Merge DECL_COMMON.
2350 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
2352         * Make-lang.in (check_gcc_pallelize): Define.
2354 2015-05-22  Marek Polacek  <polacek@redhat.com>
2356         PR c/47043
2357         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2358         attributes.
2360 2015-05-21  Marek Polacek  <polacek@redhat.com>
2362         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2363         DECL_BUILT_IN.
2365 2015-05-20  Marek Polacek  <polacek@redhat.com>
2367         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2368         * c-typeck.c: Likewise.
2370 2015-05-19  Marek Polacek  <polacek@redhat.com>
2372         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2374 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
2376         PR middle-end/66199
2377         * c-parser.c (c_parser_omp_for_loop): Don't add
2378         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2379         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2380         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2381         constructs.
2383 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
2385         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
2386         swaps.
2388 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2390         PR fortran/44054
2391         * c-objc-common.c (c_tree_printer): Replace locus pointer with
2392         accessor function.
2394 2015-05-14  Marek Polacek  <polacek@redhat.com>
2396         PR c/66066
2397         PR c/66127
2398         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2399         rather than with 0.
2401 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
2403         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2404         to add a call to warn_for_misleading_indentation.
2405         (c_parser_else_body): Likewise, adding param "else_loc".
2406         (c_parser_if_statement): Check for misleading indentation.
2407         (c_parser_while_statement): Likewise.
2408         (c_parser_for_statement): Likewise.
2410 2015-05-08  Marek Polacek  <polacek@redhat.com>
2412         PR c/64918
2413         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2414         (output_init_element): Likewise.
2416 2015-05-07  Marek Polacek  <polacek@redhat.com>
2418         PR c/65179
2419         * c-typeck.c (build_binary_op): Warn when left shifting a negative
2420         value.
2422 2015-04-30  Marek Polacek  <polacek@redhat.com>
2424         * c-typeck.c (set_init_label): Call error_at instead of error and
2425         pass LOC to it.
2427         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
2428         the type of a decl.
2430         * c-typeck.c (c_build_va_arg): Clarify the error message.
2432 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2434         * c-parser.c (c_parser_oacc_enter_exit_data): Use
2435         OMP_STANDALONE_CLAUSES.
2437 2015-04-28  Marek Polacek  <polacek@redhat.com>
2439         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2441 2015-04-28  Marek Polacek  <polacek@redhat.com>
2443         PR c/65901
2444         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2446 2015-04-25  Marek Polacek  <polacek@redhat.com>
2448         PR c/52085
2449         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
2450         attribute.
2452 2015-04-23  Marek Polacek  <polacek@redhat.com>
2454         PR c/65345
2455         * c-decl.c (set_labels_context_r): New function.
2456         (store_parm_decls): Call it via walk_tree_without_duplicates.
2457         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2458         instead of create_tmp_var.  Build TARGET_EXPR instead of
2459         COMPOUND_EXPR.
2460         (build_atomic_assign): Use create_tmp_var_raw instead of
2461         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
2463 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2465         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2466         (c_parser_omp_target_update): Add missed %> to error_at ().
2468 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
2470         PR target/55143
2471         * c-decl.c (c_default_pointer_mode): Remove definition.
2472         * c-tree.h (c_default_pointer_mode): Remove declaration.
2474 2015-03-27  Tobias Burnus  <burnus@net-b.de>
2476         PR c/65586
2477         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2478         error out.
2479         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2480         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2481         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2483 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
2485         * c-decl.c (c_decl_attributes): Also add "omp declare target"
2486         attribute for DECL_EXTERNAL VAR_DECLs.
2488 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
2490         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2491         argument.
2493 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2495         PR c/65120
2496         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2497         before preparing arguments to warn_logical_not_parentheses.
2499 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
2501         PR c/65120
2502         * c-typeck.c (parser_build_binary_op): Don't warn for
2503         !!x == y or !b == y where b is _Bool.
2505 2015-03-09  Marek Polacek  <polacek@redhat.com>
2507         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2508         * c-decl.c (grokdeclarator): Likewise.
2509         * c-typeck.c (build_binary_op): Likewise.
2511 2015-02-27  Marek Polacek  <polacek@redhat.com>
2513         PR c/65228
2514         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2516 2015-02-14  Marek Polacek  <polacek@redhat.com>
2518         PR c/64768
2519         * c-decl.c (grokdeclarator): Set the range of a flexible array member
2520         declared through a typedef name.
2522 2015-02-13  Marek Polacek  <polacek@redhat.com>
2524         PR c/65050
2525         * c-decl.c (grokdeclarator): Print also the type when giving
2526         the error message about array's incomplete element type.
2528 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
2530         PR c/64824
2531         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2532         check in the POP macro.
2534 2015-02-09  Marek Polacek  <polacek@redhat.com>
2536         PR c/64856
2537         * c-typeck.c (process_init_element): Don't always wrap
2538         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2539         initializing a range of elements.
2541 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2543         PR c/64824
2544         PR c/64868
2545         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2547 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
2549         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2550         processing enum declaration.
2552 2015-01-29  Marek Polacek  <polacek@redhat.com>
2554         PR c/64709
2555         * c-typeck.c (pop_init_level): If constructor_elements has
2556         exactly one element with integer_zerop value, set constructor_zeroinit
2557         to 1.  Remove braces around warning_init call.
2559 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
2561         PR c/64766
2562         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2563         of FUNCTION_DECLs with error_mark_node.
2565 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
2567         PR c/64778
2568         * c-typeck.c (convert_arguments): Return -1 if there are
2569         error_args, even if we've diagnosed too many arguments.
2571 2015-01-21  Richard Biener  <rguenther@suse.de>
2573         PR middle-end/64313
2574         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2575         for builtins the user declared correctly.
2577 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2578             Bernd Schmidt  <bernds@codesourcery.com>
2579             Cesar Philippidis  <cesar@codesourcery.com>
2580             James Norris  <jnorris@codesourcery.com>
2581             Jakub Jelinek  <jakub@redhat.com>
2582             Ilmir Usmanov  <i.usmanov@samsung.com>
2584         * c-parser.c: Include "gomp-constants.h".
2585         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2586         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2587         Use OMP_CLAUSE_SET_MAP_KIND.
2588         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2589         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2590         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2591         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2592         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2593         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2594         "copyout", "create", "delete", "deviceptr", "gang", "host",
2595         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2596         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2597         "present_or_create", "pcreate", "seq", "self", "vector",
2598         "vector_length", "wait", "worker".
2599         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2600         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2601         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2602         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2603         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2604         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2605         (c_parser_oacc_data_clause_deviceptr)
2606         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2607         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2608         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2609         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2610         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2611         (c_parser_oacc_parallel, c_parser_oacc_update)
2612         (c_parser_oacc_wait): New functions.
2613         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2614         (c_finish_oacc_data): New prototypes.
2615         * c-typeck.c: Include "gomp-constants.h".
2616         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2617         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2618         OMP_CLAUSE_SET_MAP_KIND.
2619         (c_finish_oacc_parallel, c_finish_oacc_kernels)
2620         (c_finish_oacc_data): New functions.
2621         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2622         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2623         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2624         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2625         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2626         GOMP_MAP_FORCE_DEVICEPTR.
2628 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2630         * c-array-notation.c: Include hash-set.h, machmode.h,
2631         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2632         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2633         * c-aux-info.c: Ditto.
2634         * c-convert.c: Ditto.
2635         * c-decl.c: Ditto.
2636         * c-errors.c: Ditto.
2637         * c-lang.c: Dittoxs.
2638         * c-objc-common.c: Ditto.
2639         * c-parser.c: Ditto.
2640         * c-typeck.c: Include hash-set.h, machmode.h,
2641         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2642         fold-const.h, wide-int.h, inchash.h, real.h and
2643         fixed-value.h due to flattening of tree.h.
2645 2015-01-07  Marek Polacek  <polacek@redhat.com>
2647         PR c/64417
2648         * c-typeck.c (process_init_element): Disallow initialization of
2649         a flexible array member with a string constant if the structure
2650         is in an array.
2652 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2654         PR sanitizer/64344
2655         * c-typeck.c (convert_for_assignment, c_finish_return): For
2656         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2657         types also set in_late_binary_op around convert call.
2658         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2659         to integral type casts, if not in_late_binary_op, pass c_fully_fold
2660         result on expr as last argument to ubsan_instrument_float_cast,
2661         if in_late_binary_op, don't use c_save_expr but save_expr.
2663         Update copyright years.
2665 2015-01-05  Marek Polacek  <polacek@redhat.com>
2667         PR c/64423
2668         * c-typeck.c (build_array_ref): Pass loc down to
2669         warn_array_subscript_with_type_char.
2671 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
2673         * c-typeck.c: New behavious for pointers to arrays with qualifiers
2674         (common-pointer-type): For pointers to arrays take qualifiers from
2675         element type.
2676         (build_conditional_expr): Add warnings for lost qualifiers.
2677         (comp-target-types): Allow pointers to arrays with different qualifiers.
2678         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2679         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2680         to PEDWARN_FOR_QUALIFIERS.
2682 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
2684         PR sanitizer/64289
2685         * c-convert.c: Include ubsan.h.
2686         (convert): For real -> integral casts and
2687         -fsanitize=float-cast-overflow don't call convert_to_integer, but
2688         instead instrument the float cast directly.
2690 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
2692         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2693         c_finish_stmt_expr): Remove NULL last argument from
2694         create_tmp_var_raw and create_tmp_var calls.
2695         * c-array-notation.c (fix_builtin_array_notation_fn,
2696         build_array_notation_expr, fix_conditional_array_notations_1,
2697         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2699 2014-11-28  Marek Polacek  <polacek@redhat.com>
2701         PR c/63862
2702         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2703         convert the right operand to integer type.
2705 2014-11-25  Marek Polacek  <polacek@redhat.com>
2707         PR c/63877
2708         * c-decl.c (start_function): Disable -Wmissing-declarations warning
2709         for inline functions.
2711 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
2713         PR target/63764
2714         * c-typeck.c (build_array_ref): Adjust
2715         convert_vector_to_pointer_for_subscript caller.  If it returns true,
2716         call non_lvalue_loc on the result.
2718 2014-11-11  Richard Biener  <rguenther@suse.de>
2720         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2721         to true.
2723 2014-11-10  Andi Kleen  <ak@linux.intel.com>
2725         PR c/60804
2726         * c-parser.c (c_parser_statement_after_labels): Call
2727         check_no_cilk.
2728         (c_parser_if_statement): Dito.
2729         (c_parser_switch_statement): Dito.
2730         (c_parser_while_statement): Dito.
2731         (c_parser_do_statement): Dito.
2732         (c_parser_for_statement): Dito.
2733         * c-typeck.c (c_finish_loop): Dito.
2735 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
2737         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2738         OPT_Wshift_count_overflow in the warnings.
2740 2014-10-30  Marek Polacek  <polacek@redhat.com>
2742         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2743         print the stripped version as well, if they're not the same.
2745 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
2747         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2748         machine_mode.
2750 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
2752         * c-decl.c: Adjust include files.
2753         * c-parser.c: Ditto.
2755 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
2756             Tom Tromey  <tromey@redhat.com>
2758         * c-tree.h (enum c_oracle_request): New.
2759         (c_binding_oracle_function): New typedef.
2760         (c_binding_oracle, c_pushtag, c_bind): Declare.
2761         * c-decl.c (c_binding_oracle): New global.
2762         (I_SYMBOL_CHECKED): New macro.
2763         (i_symbol_binding): New function.
2764         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2765         (I_TAG_CHECKED): New macro.
2766         (i_tag_binding): New function.
2767         (I_TAG_BINDING, I_TAG_DECL): Redefine.
2768         (I_LABEL_CHECKED): New macro.
2769         (i_label_binding): New function.
2770         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2771         (c_print_identifier): Save and restore c_binding_oracle.
2772         (c_pushtag, c_bind): New functions.
2774 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
2776         * c-typeck.c: Adjust include files.
2778 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2780         PR c++/53061
2781         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2782         initialization here...
2783         (c_initialize_diagnostics): ... but here. Set defaults after
2784         building pretty-printer.
2786 2014-10-23  Marek Polacek  <polacek@redhat.com>
2788         PR c/63626
2789         * c-decl.c (pop_scope): Don't print warning in external_scope.
2791 2014-10-19  Marek Polacek  <polacek@redhat.com>
2793         PR c/63567
2794         * c-typeck.c (output_init_element): Allow initializing objects with
2795         static storage duration with compound literals even in C99 and add
2796         pedwarn for it.
2798 2014-10-17  Marek Polacek  <polacek@redhat.com>
2800         PR c/63567
2801         * c-typeck.c (digest_init): Allow initializing objects with static
2802         storage duration with compound literals even in C99 and add pedwarn
2803         for it.
2805 2014-10-17  Marek Polacek  <polacek@redhat.com>
2807         PR c/63543
2808         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2809         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2810         error multiple times.  Print the type.
2812 2014-10-17  Marek Polacek  <polacek@redhat.com>
2814         PR c/63549
2815         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2816         type.
2818 2014-10-17  Marek Polacek  <polacek@redhat.com>
2820         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2821         (start_function): Use OPT_Wimplicit_int instead of 0.
2822         (store_parm_decls_oldstyle): Likewise.
2824 2014-10-17  Alan Modra  <amodra@gmail.com>
2826         PR middle-end/61848
2827         * c-decl.c (merge_decls): Don't merge section name or tls model
2828         to newdecl symtab node, instead merge to olddecl.  Override
2829         existing olddecl section name.  Set tls_model for all thread-local
2830         vars, not just OMP thread-private ones.  Remove incorrect comment.
2832 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
2834         * c-decl.c: Adjust include files.
2836 2014-10-14  DJ Delorie  <dj@redhat.com>
2838         * c-parser.c (c_parse_init): Add RID entries for each __intN.
2839         (c_token_starts_typename): Check all __intN, not just __int128.
2840         (c_token_starts_declspecs): Likewise.
2841         (c_parser_declspecs): Likewise.
2842         (c_parser_attribute_any_word): Likewise.
2843         (c_parser_objc_selector): Likewise.
2844         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2845         (struct c_declspecs): Add int_n_idx field to record *which* __intN
2846         is specified.
2847         * c-decl.c (declspecs_add_type): Check for all __intN, not just
2848         __int128.
2849         (finish_declspecs): Likewise.
2851 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
2853         * c-parser.c (c_parser_all_labels): New function to replace
2854         the duplicate code.
2855         (c_parser_statement): Call the new function.
2857 2014-10-09  Marek Polacek  <polacek@redhat.com>
2859         PR c/63480
2860         * c-typeck.c (pop_init_level): Don't warn about initializing
2861         with { }.
2863 2014-10-07  Marek Polacek  <polacek@redhat.com>
2865         PR c/59717
2866         * c-decl.c (header_for_builtin_fn): New function.
2867         (implicitly_declare): Suggest which header to include.
2869 2014-10-07  Marek Polacek  <polacek@redhat.com>
2871         * c-convert.c (convert): Use error_operand_p.
2872         * c-typeck.c (require_complete_type): Likewise.
2873         (really_atomic_lvalue): Likewise.
2874         (digest_init): Likewise.
2875         (handle_omp_array_sections_1): Likewise.
2877 2014-10-03  Marek Polacek  <polacek@redhat.com>
2879         PR c/63453
2880         * c-decl.c (pop_scope): Don't warn about "inline function declared
2881         but never defined" for functions marked with gnu_inline attribute.
2883 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
2885         PR c++/63249
2886         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2887         on low_bound and length.
2889 2014-09-24  Marek Polacek  <polacek@redhat.com>
2891         PR c/61405
2892         PR c/53874
2893         * c-parser.c: Don't define CPP_KEYWORD.
2894         (c_parser_switch_statement): Pass original type to c_finish_case.
2895         * c-tree.h (c_finish_case): Update declaration.
2896         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
2897         conditionally to c_do_switch_warnings.
2899 2014-09-03  Marek Polacek  <polacek@redhat.com>
2901         PR c/62024
2902         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2903         conversions.
2905 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
2906             Balaji V. Iyer  <balaji.v.iyer@intel.com>
2907             Igor Zamyatin  <igor.zamyatin@intel.com>
2909         * c-parser.c (c_parser_cilk_for): New function.
2910         (c_parser_cilk_grainsize): Likewise.
2911         (c_get_temp_regvar): Likewise.
2912         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2913         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2914         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2915         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2916         case.
2918 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
2920         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2921         with using HOST_WIDE_INT without truncation to 'int'
2923 2014-08-22  Marek Polacek  <polacek@redhat.com>
2925         PR c++/62199
2926         * c-typeck.c (parser_build_binary_op): Adjust call to
2927         warn_logical_not_parentheses.
2929 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
2931         PR other/62008
2932         * c-parser.c (c_parser_array_notation): Check for correct
2933         type of an array added.
2935 2014-08-19  Marek Polacek  <polacek@redhat.com>
2937         PR c++/62153
2938         * c-typeck.c (build_binary_op): If either operand of a comparison
2939         is a boolean expression, call maybe_warn_bool_compare.
2941 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
2943         PR c/45584
2944         * c-typeck.c (build_c_cast): Do a conversion even when the
2945         TYPE_MAIN_VARIANTs are the same.
2947 2014-08-19  Marek Polacek  <polacek@redhat.com>
2949         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2950         pedwarn_c99 instead of pedwarn.
2951         (grokfield): Likewise.
2952         (warn_defaults_to): New function.
2953         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2954         Unconditionally call pedwarn_c99 instead of pedwarn.
2955         (start_function): Call warn_defaults_to instead of pedwarn_c99.
2956         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2957         check flag_isoc11 before.
2958         * c-errors.c (pedwarn_c99): Change the return type to bool.
2959         Handle -Wc99-c11-compat.
2960         * c-parser.c (disable_extension_diagnostics): Handle
2961         warn_c99_c11_compat.
2962         (restore_extension_diagnostics): Likewise.
2963         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2964         instead of pedwarn, don't check flag_isoc11 before.
2965         (c_parser_declspecs): Likewise.
2966         (c_parser_alignas_specifier): Likewise.
2967         (c_parser_alignof_expression): Likewise.
2968         (c_parser_generic_selection): Likewise.
2969         * c-tree.h (pedwarn_c99): Update declaration.
2970         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2971         of pedwarn_c99.
2973 2014-08-19  Marek Polacek  <polacek@redhat.com>
2975         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2976         to pedwarn_c90.
2977         * c-errors.c: Include "opts.h".
2978         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2979         * c-parser.c (disable_extension_diagnostics): Handle negative value
2980         of warn_c90_c99_compat, too.
2981         (restore_extension_diagnostics): Likewise.
2982         (c_parser_compound_statement_nostart): Pass
2983         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2985 2014-08-12  Marek Polacek  <polacek@redhat.com>
2987         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2988         Add pedwarn.
2989         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2990         Likewise.
2991         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2993 2014-08-10  Marek Polacek  <polacek@redhat.com>
2995         PR c/51849
2996         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2997         Call pedwarn_c90 instead of pedwarn.
2998         (check_bitfield_type_and_width): Likewise.
2999         (declspecs_add_qual): Likewise.
3000         (declspecs_add_type): Likewise.
3001         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3002         Adjust to only call pedwarn_c90.
3003         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
3004         pedwarn_c90 instead of pedwarn.
3005         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3006         * c-parser.c (disable_extension_diagnostics): Handle
3007         warn_c90_c99_compat.
3008         (restore_extension_diagnostics): Likewise.
3009         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
3010         pedwarn_c90 instead of pedwarn.
3011         (c_parser_initelt): Likewise.
3012         (c_parser_postfix_expression): Likewise.
3013         (c_parser_postfix_expression_after_paren_type): Likewise.
3014         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3015         * c-tree.h: Fix formatting.
3016         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
3017         pedwarn_c90 instead of pedwarn.
3019 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
3021         * c-typeck.c: Remove include of pointer-set.h.
3023 2014-08-07  Marek Polacek  <polacek@redhat.com>
3025         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3027 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3029         * c-typeck.c: Use hash_map instead of pointer_map.
3031 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3033         * c-decl.c: Use hash_set instead of pointer_set.
3035 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
3037         PR middle-end/61455
3038         * c-array-notation.c (expand_array_notations): Handling
3039         of DECL_EXPR added.
3041 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
3043         PR c++/60517
3044         * c-typeck.c (c_finish_return): Return 0 instead of the address of
3045         a local variable.
3047 2014-07-30  Tom Tromey  <tromey@redhat.com>
3049         * c-typeck.c (struct constructor_stack) <designator_depth>: New
3050         field.
3051         (really_start_incremental_init, push_init_level): Initialize
3052         designator_depth.
3053         (pop_init_level): Set global designator_depth.
3054         (process_init_element): Check for designated_init attribute.
3056 2014-07-20  Marek Polacek  <polacek@redhat.com>
3058         PR c/61852
3059         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
3060         (implicitly_declare): Pass location to implicit_decl_warning.
3062 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
3064         PR middle-end/61294
3065         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3066         If non-NULL, call c_parser_check_literal_zero.
3067         (c_parser_check_literal_zero): New function.
3068         (c_parser_postfix_expression_after_primary): Adjust
3069         c_parser_expr_list caller, handle -Wmemset-transposed-args.
3071 2014-07-06  Marek Polacek  <polacek@redhat.com>
3073         PR c/6940
3074         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3075         * c-tree.h (C_ARRAY_PARAMETER): Define.
3076         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3077         function parameter.
3079 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
3080             Chen Gang  <gang.chen.5i5j@gmail.com>
3082         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3083         releasing symbol.
3085 2014-07-01  Marek Polacek  <polacek@redhat.com>
3087         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3088         instead of 0 to WARN_FOR_ASSIGNMENT.
3090 2014-07-01  Marek Polacek  <polacek@redhat.com>
3092         PR c/58286
3093         * c-typeck.c (convert_for_assignment): Pass
3094         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3096 2014-06-30  Marek Polacek  <polacek@redhat.com>
3098         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3099         has no_sanitize_undefined attribute.
3101 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
3103         PR middle-end/57541
3104         * c-array-notation.c (fix_builtin_array_notation_fn):
3105         Check for 0 arguments in builtin call. Check that bultin argument is
3106         correct.
3107         * c-parser.c (c_parser_array_notation): Check for incorrect initial
3108         index.
3110 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3112         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3113         qualifiers in __auto_type for atomic types.
3114         (c_parser_typeof_specifier): Discard all type qualifiers in
3115         __typeof__ for atomic types.
3117 2014-06-25  Marek Polacek  <polacek@redhat.com>
3119         PR c/61162
3120         * c-parser.c (c_parser_statement_after_labels): Pass the location of
3121         the return expression to c_finish_return.
3123 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
3125         * c-typeck.c (c_finish_omp_clauses): Make sure
3126         OMP_CLAUSE_LINEAR_STEP has correct type.
3128 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
3130         * c-decl.c: Adjust.
3132 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
3134         * c-parser.c (c_parser_omp_for_loop): For
3135         #pragma omp parallel for simd move lastprivate clause from parallel
3136         to for rather than simd.
3138 2014-06-23  Marek Polacek  <polacek@redhat.com>
3140         * c-typeck.c (parser_build_binary_op): Don't call
3141         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3143 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
3145         * c-parser.c (c_parser_omp_threadprivate): Likewise.
3146         * c-decl.c (merge_decls): Likewise.
3148 2014-06-09  Marek Polacek  <polacek@redhat.com>
3150         PR c/36446
3151         * c-typeck.c (error_init): Call inform instead of error_at.
3152         (pedwarn_init): Call inform instead of pedwarn.
3153         (warning_init): Call inform instead of warning_at.
3155 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
3157         * c-decl.c (merge_decls): Use set_decl_section_name.
3158         (duplicate_decls): Remove node if it exists.
3160 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
3162         PR c/53119
3163         * c-typeck.c (push_init_level, process_init_element,
3164         pop_init_level): Correct check for zero initialization, move
3165         missing brace warning to respect zero initialization.
3167 2014-06-05  Marek Polacek  <polacek@redhat.com>
3169         PR c/56724
3170         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3172 2014-06-05  Marek Polacek  <polacek@redhat.com>
3174         PR c/49706
3175         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3176         on the left hand side operand of a comparison. 
3178 2014-06-05  Marek Polacek  <polacek@redhat.com>
3180         PR c/48062
3181         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3182         Print note only if the warning was printed.
3184 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
3186         PR c/58942
3187         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3188         with a pointer.
3190 2014-06-03  Marek Polacek  <polacek@redhat.com>
3192         PR c/60439
3193         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3194         c_start_case.
3195         * c-tree.h (c_start_case): Update.
3196         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
3197         switch condition has boolean value.
3199 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
3201         * c-decl.c: Include builtins.h.
3202         * c-parser.c: Likewise.
3204 2014-05-27  Marek Polacek  <polacek@redhat.com>
3206         PR c/56724
3207         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
3208         error and warning calls to error_at and warning_at.  Pass location of
3209         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
3210         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3211         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
3213 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
3215         PR c/61191
3216         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3217         function parameters.
3219 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
3221         * c-decl.c (merge_decls): Preserve symtab node pointers.
3222         (duplicate_decls): Free new decl.
3224 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
3226         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3227         initialization.
3229         * c-parser.c (c_parser_omp_target): Return bool values.
3231 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
3233         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3234         num_teams_loc variable to num_thread_limit_loc.
3236 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
3238         * c-array-notation.c (expand_array_notations): Use void_node
3239         instead of void_zero_node.
3241 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
3243         * c-decl.c (finish_struct): Adjust.
3244         (finish_enum): Likewise.
3245         (bind): Adjust.
3246         (record_inline_static): Likewise.
3247         (push_scope): Likewise.
3248         (make_label): Likewise.
3249         (lookup_label_for_goto): Likewise.
3250         (finish_struct): Likewise.
3251         (finish_enum): Likewise.
3252         (store_parm_decls): Likewise.
3253         (c_push_function_context): Likewise.
3254         * c-lang.h: Remove usage of variable_size gty attribute.
3255         * c-parser.c (c_parse_init): Adjust.
3256         (c_parse_file): Likewise.
3258 2014-05-13  Marek Polacek  <polacek@redhat.com>
3260         PR c/61162
3261         * c-typeck.c (convert_for_assignment): Pass location to
3262         WARN_FOR_ASSIGNMENT instead of input_location.
3264 2014-05-10  Marek Polacek  <polacek@redhat.com>
3266         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3267         maybe_warn_string_init.
3268         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3269         maybe_warn_string_init.
3270         * c-tree.h (maybe_warn_string_init): Update declaration.
3271         * c-typeck.c (maybe_warn_string_init): Add location parameter.
3272         Call pedwarn_init with loc instead of with input_location.
3273         (digest_init): Pass init_loc to maybe_warn_string_init.
3274         (pop_init_level): Call pedwarn_init with loc instead of with
3275         input_location.
3276         (set_init_index): Likewise.
3277         (process_init_element): Likewise.
3279 2014-05-09  Marek Polacek  <polacek@redhat.com>
3281         PR c/61096
3282         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3283         (c_parser_initelt): Pass location to set_init_label.  Pass array index
3284         location to set_init_index.
3285         * c-tree.h (push_init_level): Update declaration.
3286         (pop_init_level): Likewise.
3287         (set_init_index): Likewise.
3288         (set_init_label): Likewise.
3289         * c-typeck.c (error_init): Add location parameter.  Call error_at
3290         instead of error.
3291         (digest_init): Pass init_loc to error_init.
3292         (really_start_incremental_init):
3293         (push_init_level): Add location parameter.  Pass loc to pop_init_level
3294         and error_init.
3295         (pop_init_level): Likewise.
3296         (set_designator): Add location parameter.  Pass loc to pop_init_level,
3297         push_init_level, and error_init.
3298         (set_init_index): Add location parameter.  Pass loc to error_init and
3299         set_designator.
3300         (set_init_label): Likewise.
3301         (output_init_element): Pass loc to error_init.
3302         (process_init_element): Pass loc to error_init, pop_init_level,
3303         pedwarn_init, and push_init_level.
3305 2014-05-09  Marek Polacek  <polacek@redhat.com>
3307         PR c/50459
3308         * c-parser.c (c_parser_attributes): Parse the arguments as an
3309         expression-list if the attribute takes identifier.
3311 2014-05-08  Marek Polacek  <polacek@redhat.com>
3313         PR c/61053
3314         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3315         TYPE_ALIGN_UNIT.
3317 2014-05-08  Marek Polacek  <polacek@redhat.com>
3319         PR c/61077
3320         * c-decl.c (start_function): Warn for _Atomic-qualified return type
3321         of main.
3323 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
3324             Mike Stump  <mikestump@comcast.net>
3325             Richard Sandiford  <rdsandiford@googlemail.com>
3327         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3328         (finish_enum): Use wide-int interfaces.
3329         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3330         * c-typeck.c (build_c_cast): Likewise.
3331         (set_nonincremental_init_from_string): Likewise.
3332         (c_tree_equal): Likewise.
3334 2014-05-02  Marek Polacek  <polacek@redhat.com>
3336         PR c/25801
3337         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
3338         Return size_one_node when the type is not complete.
3339         (pointer_diff): Remove comment.
3340         (build_unary_op): Improve error messages.
3342 2014-05-02  Marek Polacek  <polacek@redhat.com>
3344         * c-typeck.c (c_finish_return): Separate warning_at calls.
3346 2014-05-02  Marek Polacek  <polacek@redhat.com>
3348         * c-tree.h (error_init): Remove declaration.
3349         (pedwarn_init): Likewise.
3350         * c-typeck.c (error_init): Make static and move above.
3351         (pedwarn_init): Likewise.
3352         (warning_init): Move above.
3353         (maybe_warn_string_init): Likewise.
3355 2014-05-01  Jeff Law  <law@redhat.com>
3357         Revert:
3359         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3360         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3361         avoid goto.
3363 2014-05-02  Marek Polacek  <polacek@redhat.com>
3365         PR c/60784
3366         * c-typeck.c (push_init_level): Set constructor_designated to
3367         p->designated for structures.
3369 2014-05-01  Marek Polacek  <polacek@redhat.com>
3371         PR c/60915
3372         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3373         function-definition has an attribute after the declarator.
3375 2014-05-01  Marek Polacek  <polacek@redhat.com>
3377         PR c/60257
3378         * c-typeck.c (warning_init): Add location_t parameter.  Call
3379         warning_at instead of warning.
3380         (push_init_level): Pass input_location to warning_init.
3381         (add_pending_init): Add location_t parameter.  Pass loc to
3382         warning_init.
3383         (set_nonincremental_init): Pass input_location to add_pending_init.
3384         (set_nonincremental_init_from_string): Likewise.
3385         (output_init_element): Pass loc to warning_init and to
3386         add_pending_init.
3388 2014-05-01  Marek Polacek  <polacek@redhat.com>
3390         PR c/43395
3391         * c-typeck.c (c_finish_return): Distinguish between label and variable
3392         when warning about returning local address.
3394 2014-05-01  Marek Polacek  <polacek@redhat.com>
3396         PR c/29467
3397         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3398         in C89 mode.
3400 2014-05-01  Marek Polacek  <polacek@redhat.com>
3402         PR c/43245
3403         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3404         instead of 0 to WARN_FOR_QUALIFIERS.
3406 2014-05-01  Marek Polacek  <polacek@redhat.com>
3408         PR c/56989
3409         * c-typeck.c (default_conversion): Use better location for
3410         error call.
3412 2014-04-30  Marek Polacek  <polacek@redhat.com>
3414         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3415         also when SANITIZE_FLOAT_DIVIDE is on.
3417 2014-04-30  Marek Polacek  <polacek@redhat.com>
3419         PR c/60139
3420         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3421         and pedwarn_init.  Use loc insted of input_location.
3423 2014-04-30  Marek Polacek  <polacek@redhat.com>
3425         PR c/60351
3426         * c-typeck.c (build_binary_op): Use location when warning about
3427         shift count.
3429 2014-04-25  Marek Polacek  <polacek@redhat.com>
3431         PR c/18079
3432         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3433         always_inline/noinline and hot/cold attributes.
3435 2014-04-25  Marek Polacek  <polacek@redhat.com>
3437         PR c/60114
3438         * c-parser.c (c_parser_initelt): Pass input_location to
3439         process_init_element.
3440         (c_parser_initval): Pass loc to process_init_element.
3441         * c-tree.h (process_init_element): Adjust declaration.
3442         * c-typeck.c (push_init_level): Pass input_location to
3443         process_init_element.
3444         (pop_init_level): Likewise.
3445         (set_designator): Likewise.
3446         (output_init_element): Add location_t parameter.  Pass loc to
3447         digest_init.
3448         (output_pending_init_elements): Pass input_location to
3449         output_init_element.
3450         (process_init_element): Add location_t parameter.  Pass loc to
3451         output_init_element.
3453 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
3455         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3456         atomic-clause, allow comma in between atomic-clause and
3457         seq_cst.
3459 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
3461         PR c/59073
3462         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3463         fails, don't set OM_PARALLEL_COMBINED and return NULL.
3465 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
3467         PR middle-end/60469
3468         * c-array-notation.c (fix_builtin_array_notation_fn): Use
3469         create_tmp_var instead build_decl for creating temps.
3470         (build_array_notation_expr): Likewise.
3471         (fix_conditional_array_notations_1): Likewise.
3472         (fix_array_notation_expr): Likewise.
3473         (fix_array_notation_call_expr): Likewise.
3475 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
3477         PR c++/60689
3478         * c-tree.h (c_build_function_call_vec): New prototype.
3479         * c-typeck.c (build_function_call_vec): Don't call
3480         resolve_overloaded_builtin here.
3481         (c_build_function_call_vec): New wrapper function around
3482         build_function_call_vec.  Call resolve_overloaded_builtin here.
3483         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3484         Call c_build_function_call_vec instead of build_function_call_vec.
3485         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3486         * c-decl.c (finish_decl): Likewise.
3488 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3490         PR c/55383
3491         * c-typeck.c: Use correct format string in cast-qual warning
3493 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
3495         * c-decl.c (c_decl_attributes): Use
3496         lang_hooks.types.omp_mappable_type.
3497         * c-typeck.c (c_finish_omp_clauses): Likewise.
3499 2014-03-06  Marek Polacek  <polacek@redhat.com>
3501         PR c/60197
3502         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3503         of checking tree code.
3505 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3507         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3508         (c_parser_parameter_declaration): Likewise.
3510 2014-02-19  Marek Polacek  <polacek@redhat.com>
3512         PR c/60195
3513         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3514         Call mark_exp_read on exp.value.
3515         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
3516         TREE_ADDRESSABLE on old instead of val.
3517         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3519 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3521         * c-parser.c (c_parser_get_builtin_args): Replace calls to
3522         C_EXPR_APPEND by vec_safe_push.
3523         * c-tree.h (C_EXPR_APPEND): Remove.
3525 2014-01-31  Marek Polacek  <polacek@redhat.com>
3527         PR c/59963
3528         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3529         build_function_call_vec.
3530         (build_function_call): Likewise.
3531         (build_atomic_assign): Likewise.
3532         (build_function_call_vec): Add arg_loc parameter.  Use it.
3533         (convert_arguments): Likewise.
3534         (convert_for_assignment): Rename rhs_loc to expr_loc.
3535         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3536         (c_parser_objc_keywordexpr): Likewise.
3537         (c_parser_postfix_expression_after_primary): Call
3538         build_function_call_vec with expr_loc rather than op_loc.
3539         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
3540         build_function_call_vec.
3541         (c_parser_expr_list): Add locations parameter.  Fill it with locations
3542         of function arguments.
3543         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3545 2014-01-30  Marek Polacek  <polacek@redhat.com>
3547         PR c/59940
3548         * c-typeck.c (build_function_call_vec): Use loc parameter.
3549         (convert_arguments): Add location parameter.  Use it.
3550         (ep_convert_and_check): Likewise.
3551         (build_atomic_assign): Adjust convert_for_assignment call.
3552         (build_modify_expr): Likewise.
3553         (digest_init): Likewise.
3554         (c_finish_return): Likewise.
3555         (build_conditional_expr): Adjust ep_convert_and_check calls.
3556         (convert_for_assignment): Add rhs_loc parameter.  Use it.
3557         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3558         calls.
3560 2014-01-30  Richard Biener  <rguenther@suse.de>
3562         PR c/59905
3563         * c-typeck.c (build_function_call_vec): Do not replace calls
3564         to a function via an incompatible type with a runtime abort.
3566 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3568         * c-parser.c (c_parser_declaration_or_fndef): Replaced
3569         flag_enable_cilkplus with flag_cilkplus.
3570         (c_parser_direct_declarator_inner): Likewise.
3571         (c_parser_attribute_any_word): Likewise.
3572         (c_parser_attributes): Likewise.
3573         (c_parser_compound_statement): Likewise.
3574         (c_parser_statement_after_labels): Likewise.
3575         (c_parser_if_statement): Likewise.
3576         (c_parser_switch_statement): Likewise.
3577         (c_parser_do_statement): Likewise.
3578         (c_parser_for_statement): Likewise.
3579         (c_parser_unary_expression): Likewise.
3580         (c_parser_postfix_expression): Likewise.
3581         (c_parser_postfix_expression_after_primary): Likewise.
3582         (c_parser_postfix_expression_after_primary): Likewise.
3583         (c_parser_omp_clause_name): Likewise.
3584         (c_finish_omp_declare_simd): Likewise.
3585         (c_parser_cilk_verify_simd): Likewise.
3586         * c-typeck.c (build_array_ref): Likewise.
3587         (build_function_call_vec): Likewise.
3588         (convert_arguments): Likewise.
3589         (build_compound_expr): Likewise.
3590         (c_finish_return): Likewise.
3591         (c_finish_if_stmt): Likewise.
3592         (c_finish_loop): Likewise.
3593         (build_binary_op): Likewise.
3595 2014-01-23  Marek Polacek  <polacek@redhat.com>
3597         PR c/59846
3598         * c-typeck.c (parser_build_binary_op): Use location instead of
3599         input_location.
3600         (build_binary_op): Pass location to shorten_compare.
3602 2014-01-23  Marek Polacek  <polacek@redhat.com>
3604         PR c/58346
3605         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3606         an empty aggregate.
3608 2014-01-23  Marek Polacek  <polacek@redhat.com>
3610         PR c/59871
3611         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3612         of a comma expression.
3613         (emit_side_effect_warnings): Likewise.
3615 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3617         PR c/59825
3618         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3619         function to use walk_tree and moved a lot of its functionality to
3620         expand_array_notations.
3621         (expand_array_notations): New function.
3623 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3625         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3626         attribute an attribute without value.
3628 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3630         PR middle-end/58809
3631         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3632         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3634 2014-01-22  Marek Polacek  <polacek@redhat.com>
3636         PR c/59891
3637         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3638         of remove_c_maybe_const_expr on op1 and op2.
3640 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
3642         PR c/58943
3643         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3644         effects, preevaluate rhs using SAVE_EXPR first.
3646 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3648         PR c++/59631
3649         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3650         statements with if-elseif statements.
3652 2014-01-06  Marek Polacek  <polacek@redhat.com>
3654         PR c/57773
3655         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3656         defined bit-field types only in ISO C.
3658 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3660         Update copyright years
3662 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3664         * c-array-notation.c: Use the standard form for the copyright notice.
3666 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3668         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3669         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3670         field in parser is not empty.  If not-empty, call the function
3671         c_parser_finish_omp_declare_simd.
3672         (c_parser_cilk_clause_vectorlength): Modified function to be shared
3673         between SIMD-enabled functions and #pragma simd.  Added new parameter.
3674         (c_parser_cilk_all_clauses): Modified the usage of the function
3675         c_parser_cilk_clause_vectorlength as mentioned above.
3676         (c_parser_cilk_simd_fn_vector_attrs): New function.
3677         (c_finish_cilk_simd_fn_tokens): Likewise.
3678         (is_cilkplus_vector_p): Likewise.
3679         (c_parser_omp_clause_name): Added checking for "vectorlength,"
3680         "nomask," and "mask" strings in clause name.
3681         (c_parser_omp_all_clauses): Added 3 new case statements:
3682         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3683         PRAGMA_CILK_CLAUSE_NOMASK.
3684         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
3685         check for vector attribute and if so call the function
3686         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
3687         called the function c_finish_cilk_simd_fn_tokens.
3688         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3689         parser field is non-empty.  If so, parse them as you would parse
3690         the omp declare simd pragma.
3691         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3692         Added a check when step is a parameter and flag it as error.
3693         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3694         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3695         pragma_omp_clause.
3697 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
3699         * c-parser.c (c_parser_omp_parallel): Fix description.
3701 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3703         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3704         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3705         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3706         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3708 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
3710         PR c/52023
3711         * c-parser.c (c_parser_alignas_specifier): Use
3712         c_sizeof_or_alignof_type instead of c_alignof.
3713         (c_parser_alignof_expression): Likewise, with min_alignof
3714         parameter depending on alignof spelling used.
3716 2013-12-04  Marek Polacek  <polacek@redhat.com>
3718         PR c/54113
3719         * c-decl.c (start_function): Don't warn for missing prototype for
3720         inline functions.
3722 2013-12-03  Marek Polacek  <polacek@redhat.com>
3724         PR c/59351
3725         * c-decl.c (build_compound_literal): Allow compound literals with
3726         empty initial value.
3728 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
3730         PR c/58235
3731         * c-typeck.c (build_modify_expr): Diagnose assignment to
3732         expression with array type.
3734 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
3736         PR c/42262
3737         * c-typeck.c (process_init_element): Do not treat a string as
3738         initializing a whole array when used with a designator for an
3739         individual element.
3741 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
3743         PR c/57574
3744         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3745         an inline function following a static declaration.
3747 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
3749         PR c/59310
3750         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3751         to p_name before calling c_parser_omp_teams instead of after.
3752         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3753         argument.  Remove unused p_name variable.
3755 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
3756             Jakub Jelinek  <jakub@redhat.com>
3758         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3759         external_scope is NULL.
3761 2013-11-27  Tom de Vries  <tom@codesourcery.com>
3762             Marc Glisse  <marc.glisse@inria.fr>
3764         PR c++/59032
3765         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3767 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
3769         * c-typeck.c: Add required include files from gimple.h.
3771 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
3773         * c-decl.c (define_label, shadow_tag_warned)
3774         (check_bitfield_type_and_width, grokdeclarator, grokparms,
3775         store_parm_decls_newstyle, store_parm_decls_oldstyle)
3776         (declspecs_add_type): Remove use of in_system_header macro.
3777         * c-parser.c (c_parser_unary_expression): Likewise.
3778         * c-typeck.c (store_init_value, process_init_element)
3779         (c_start_case): Likewise.
3781         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3782         macro.
3784         * c-parser.c (c_parser_set_source_position_from_token): Remove
3785         reference to in_system_header from comment.
3787 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3789         * c-decl.c (grokdeclarator): Update comment to refer to
3790         tree_to_[su]hwi rather than tree_low_cst.
3792 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3794         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3795         tree_to_uhwi throughout.
3797 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3799         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3800         throughout.
3802 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3804         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3805         throughout.
3807 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
3809         * c-parser.c (c_parser_cilk_simd): New.
3810         (c_parser_cilk_verify_simd): New.
3811         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3812         (c_parser_omp_for_loop): Add case for NE_EXPR.
3813         Set c_break_label for CILK_SIMD.
3814         (c_parser_cilk_clause_vectorlength): New.
3815         (c_parser_cilk_clause_linear): New.
3816         (c_parser_cilk_clause_name): New.
3817         (c_parser_cilk_all_clauses): New.
3818         * c-typeck.c (build_unary_op): Pass location argument to
3819         readonly_error.
3820         (build_modify_expr): Same.
3821         (build_asm_expr): Same.
3822         (c_finish_bc_stmt): Error on break/continue in loops.
3824 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
3826         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3828 2013-11-14  Diego Novillo  <dnovillo@google.com>
3830         * c-decl.c: Include print-tree.h.
3831         Include stor-layout.h.
3832         Include varasm.h.
3833         Include attribs.h.
3834         Include stringpool.h.
3835         * c-lang.c: Include fold-const.h.
3836         * c-parser.c: Include stringpool.h.
3837         Include attribs.h.
3838         Include stor-layout.h.
3839         Include varasm.h.
3840         Include trans-mem.h.
3841         * c-typeck.c: Include stor-layout.h.
3842         Include trans-mem.h.
3843         Include varasm.h.
3844         Include stmt.h.
3846 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
3848         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3849         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3850         __auto_type.
3851         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3852         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3853         RID_AUTO_TYPE.
3854         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3855         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3856         (c_parser_declarator, c_parser_direct_declarator_inner)
3857         (c_parser_parameter_declaration, c_parser_type_name): All callers
3858         changed.
3859         (c_parser_declaration_or_fndef): Handle declarations with type
3860         determined from the initializer.
3862 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
3864         * c-typeck.c: Include gimplify.h.
3866 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
3868         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3869         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3870         comment.
3871         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3872         or _Thread_local as appropriate in diagnostics.
3873         (build_null_declspecs): Initialize ret->thread_gnu_p.
3874         (declspecs_add_scspec): Handle either __thread or _Thread_local
3875         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
3876         pedantic.  Do not disallow _Thread_local extern and _Thread_local
3877         static.
3879 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
3880             Andrew MacLeod  <amacleod@redhat.com>
3882         * c-aux-info.c (gen_type): Handle atomic qualifier.
3883         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3884         qualifiers when compating types.
3885         (shadow_tag_warned): Handle atomic_p in declspecs.
3886         (quals_from_declspecs): Likewise.
3887         (start_decl): Use c_type_promotes_to when promoting argument
3888         types.
3889         (grokdeclarator): Handle _Atomic.
3890         (get_parm_info): Diagnose any qualifier on "void" as only
3891         parameter.
3892         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3893         comparing types.  Use c_type_promotes_to when promoting argument
3894         types.
3895         (finish_function): Use c_type_promotes_to when promoting argument
3896         types.
3897         (build_null_declspecs): Handle atomic_p in declspecs.
3898         (declspecs_add_qual): Handle RID_ATOMIC.
3899         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3900         (c_token_starts_declspecs): Handle RID_ATOMIC.
3901         (c_parser_declspecs): Handle atomic type specifiers and
3902         qualifiers.
3903         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3904         from types of expressions with atomic type.
3905         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3906         (c_parser_attribute_any_word): Handle RID_ATOMIC.
3907         (c_parser_initializer, c_parser_initelt, c_parser_initval)
3908         (c_parser_statement_after_labels, c_parser_switch_statement)
3909         (c_parser_for_statement, c_parser_expr_no_commas)
3910         (c_parser_conditional_expression, c_parser_binary_expression)
3911         (c_parser_cast_expression, c_parser_unary_expression)
3912         (c_parser_postfix_expression)
3913         (c_parser_postfix_expression_after_primary, c_parser_expression):
3914         Use convert_lvalue_to_rvalue.
3915         (c_parser_expression_conv, c_parser_expr_list): Document
3916         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
3917         (c_parser_objc_synchronized_statement): Use
3918         convert_lvalue_to_rvalue.
3919         (c_parser_objc_selector): Handle RID_ATOMIC.
3920         (c_parser_objc_receiver, c_parser_array_notation): Use
3921         convert_lvalue_to_rvalue.
3922         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3923         _Atomic (type-name).
3924         (struct c_declspecs): Add atomic_p field.
3925         (convert_lvalue_to_rvalue): Declare.
3926         * c-typeck.c (c_type_promotes_to): Promote atomic types to
3927         corresponding atomic types.
3928         (qualify_type): Don't add _Atomic qualifiers from second argument.
3929         (comp_target_types): Do not allow _Atomic mismatches.
3930         (type_lists_compatible_p): Do not remove atomic qualifiers when
3931         comparing types.
3932         (really_atomic_lvalue, convert_lvalue_to_rvalue)
3933         (build_atomic_assign): New functions.
3934         (build_unary_op): Use build_atomic_assign for atomic increment and
3935         decrement.
3936         (build_conditional_expr): Do not treat _Atomic void as a qualified
3937         version of void.
3938         (build_modify_expr): Use build_atomic_assign for atomic LHS.
3939         (find_anonymous_field_with_type, convert_to_anonymous_field)
3940         (convert_for_assignment): Do not remove atomic qualifiers when
3941         comparing types.
3942         (digest_init): Do not accept initialization of arrays of atomic
3943         elements by string constants.
3944         (build_asm_expr): Use convert_lvalue_to_rvalue.
3945         (build_binary_op): Do not treat _Atomic void as a qualified
3946         version of void.
3948 2013-11-06  DJ Delorie  <dj@redhat.com>
3950         * c-decl.c (locate_old_decl): If a previous conflicting decl is
3951         both explicit and builtin, print the location of the explicit one.
3953 2013-11-05  Tobias Burnus  <burnus@net-b.de>
3955         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3956         c_parser_omp_distribute, c_parser_omp_teams,
3957         c_parser_omp_target, c_parser_omp_declare): Handle
3958         -fopenmp-simd.
3960 2013-11-03  Marek Polacek  <polacek@redhat.com>
3962         * c-decl.c (grokdeclarator): Add VLA instrumentation.
3964 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
3966         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3967         check_dup_generic at the end, unless remove is true.
3968         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3969         remove = true;.
3970         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3972 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
3974         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3975         with decl that is not pointer nor array.
3977 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3979         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3980         a spawning function is found.
3981         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3982         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3983         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3984         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3985         case.
3986         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3987         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3988         expr.
3989         (c_finish_return): Added a check to reject _Cilk_spawn in return
3990         expression.
3991         (build_cilk_spawn): New function.
3992         (build_cilk_sync): Likewise.
3993         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3994         
3995 2013-10-27  Tobias Burnus  <burnus@net-b.de>
3997         PR other/33426
3998         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3999         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4000         (c_parser_statement_after_labels): Update calls.
4002 2013-10-24  Tobias Burnus  <burnus@net-b.de>
4004         PR other/33426
4005         * c-parser.c (c_parser_pragma, c_parser_for_statement):
4006         Handle PRAGMA_IVDEP.
4007         (c_parser_statement_after_labels): Update call.
4009 2013-10-24  Marek Polacek  <polacek@redhat.com>
4011         * c-parser.c (c_parser_struct_declaration): Add a comment.
4012         (c_parser_declarator): Don't allow _Alignas here.
4014 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
4016         * c-parser.c: Include omp-low.h.
4017         * c-typeck.c: Likewise.
4019 2013-10-17  Marek Polacek  <polacek@redhat.com>
4021         PR c/58267
4022         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4023         Document syntax of the array-declarator.
4024         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4025         are not permitted.
4026         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4027         (c_parser_struct_declaration): Likewise.
4028         (c_parser_declarator): Likewise.
4029         (c_parser_direct_declarator_inner): Likewise.
4030         (c_parser_parameter_declaration): Likewise.
4031         (c_parser_type_name): Likewise.
4033 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
4035         * c-lang.h (current_omp_declare_target_attribute): New extern
4036         decl.
4037         * c-parser.c: Include c-lang.h.
4038         (struct c_parser): Change tokens to c_token *.
4039         Add tokens_buf field.  Change tokens_avail type to unsigned int.
4040         (c_parser_consume_token): If parser->tokens isn't
4041         &parser->tokens_buf[0], increment parser->tokens.
4042         (c_parser_consume_pragma): Likewise.
4043         (enum pragma_context): Add pragma_struct and pragma_param.
4044         (c_parser_external_declaration): Adjust
4045         c_parser_declaration_or_fndef caller.
4046         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4047         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4048         Adjust recursive call.
4049         (c_parser_struct_or_union_specifier): Use pragma_struct instead
4050         of pragma_external.
4051         (c_parser_parameter_declaration): Use pragma_param instead of
4052         pragma_external.
4053         (c_parser_compound_statement_nostart, c_parser_label,
4054         c_parser_for_statement): Adjust
4055         c_parser_declaration_or_fndef callers.
4056         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4057         it through to c_parser_conditional_expression.
4058         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4059         pass it through to c_parser_binary_expression.  Adjust recursive
4060         call.
4061         (c_parser_binary_expression): Remove prec argument, add
4062         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
4063         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4064         binop matches it, use build2 instead of parser_build_binary_op.
4065         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4066         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4067         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4068         Handle pragma_struct and pragma_param the same as pragma_external.
4069         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4070         (c_parser_omp_variable_list): Parse array sections for
4071         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4072         (c_parser_omp_clause_collapse): Fully fold collapse expression.
4073         (c_parser_omp_clause_reduction): Handle user defined reductions.
4074         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4075         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4076         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4077         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4078         c_parser_omp_clause_depend, c_parser_omp_clause_map,
4079         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4080         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4081         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4082         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
4083         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
4084         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4085         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
4086         (c_parser_omp_for_loop): Add CODE argument, pass it through
4087         to c_finish_omp_for.  Change last argument to cclauses,
4088         and adjust uses to grab parallel clauses from the array of all
4089         the split clauses.  Adjust c_parser_binary_expression,
4090         c_parser_declaration_or_fndef and c_finish_omp_for callers.
4091         (omp_split_clauses): New function.
4092         (c_parser_omp_simd): New function.
4093         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4094         Allow the function to be called also when parsing combined constructs,
4095         and call c_parser_omp_simd when parsing for simd.
4096         (c_parser_omp_sections_scope): If section-sequence doesn't start with
4097         #pragma omp section, require exactly one structured-block instead of
4098         sequence of statements.
4099         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4100         Allow the function to be called also when parsing combined constructs.
4101         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4102         Allow the function to be called also when parsing combined
4103         constructs.
4104         (c_parser_omp_taskgroup, c_parser_omp_cancel,
4105         c_parser_omp_cancellation_point, c_parser_omp_distribute,
4106         c_parser_omp_teams, c_parser_omp_target_data,
4107         c_parser_omp_target_update, c_parser_omp_target,
4108         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4109         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4110         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4111         (c_parser_omp_construct): Add p_name and mask vars.  Handle
4112         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4113         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
4114         and c_parser_omp_sections callers.
4115         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4116         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4117         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4118         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
4119         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
4120         OMP_CLAUSE_DEPEND.
4121         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4122         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4123         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4124         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4125         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4126         * c-typeck.c: Include tree-inline.h.
4127         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4128         handle_omp_array_sections_1, handle_omp_array_sections,
4129         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4130         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4131         user defined reductions.
4132         (c_tree_equal): New function.
4133         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4134         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4135         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4136         c_check_omp_declare_reduction_r): New prototypes.
4137         * c-decl.c (current_omp_declare_target_attribute): New variable.
4138         (c_decl_attributes): New function.
4139         (start_decl, start_function): Use it instead of decl_attributes.
4140         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4141         c_omp_reduction_decl, c_omp_reduction_lookup,
4142         c_check_omp_declare_reduction_r): New functions.
4144 2013-09-25  Tom Tromey  <tromey@redhat.com>
4146         * Make-lang.in (c/gccspec.o): Remove.
4147         (CFLAGS-c/gccspec.o): New variable.
4148         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4149         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4150         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4152 2013-09-25  Tom Tromey  <tromey@redhat.com>
4154         * Make-lang.in (c/gccspec.o): Don't use subshell.
4156 2013-09-18  Marek Polacek  <polacek@redhat.com>
4158         PR sanitize/58443
4159         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4160         Remove unnecessary check.
4162 2013-09-18  Marek Polacek  <polacek@redhat.com>
4164         PR sanitizer/58411
4165         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4166         no_sanitize_undefined attribute.
4168 2013-09-13  Kai Tietz  <ktietz@redhat.com>
4170         PR target/57848
4171         * c-decl.c (c_builtin_function_ext_scope): Remove
4172         wrong assumption that it is never called on prexisting
4173         symbol.
4175 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
4177         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4179 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4181         * c-objc-common.c (c_tree_printer): Tidy.
4183 2013-08-30  Marek Polacek  <polacek@redhat.com>
4185         * c-typeck.c (build_binary_op): Add division by zero and shift
4186         instrumentation.
4188 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
4189             Joseph Myers  <joseph@codesourcery.com>
4191         PR c/35649
4192         * c-typeck.c (c_common_type): Prefer double_type_node over
4193         other REAL_TYPE types with the same precision.
4194         (convert_arguments): Likewise.
4196 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4198         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4199         (c_initialize_diagnostics): Call a destructor for the early printer.
4201 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4203         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4204         printer initialization.
4206 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4208         PR c/57490
4209         * c-array-notation.c (fix_conditional_array_notations_1): Added a
4210         check for truth values.
4211         (expand_array_notation_exprs): Added truth values case.  Removed an
4212         unwanted else.  Added for-loop to walk through subtrees in default
4213         case.
4215 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4217         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4219 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
4221         * c-parser.c (struct c_generic_association): Fix typo.
4223 2013-07-23  Tom Tromey  <tromey@redhat.com>
4224             Joseph Myers  <joseph@codesourcery.com>
4226         * c-parser.c (struct c_generic_association): New.
4227         (c_generic_association_d): New typedef.
4228         (c_parser_generic_selection): New function.
4229         (c_parser_postfix_expression): Handle RID_GENERIC.
4231 2013-07-13  Jason Merrill  <jason@redhat.com>
4233         PR c++/57793
4234         * c-decl.c (finish_struct): Check for too-large class.
4236 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
4238         PR c/57821
4239         * c-typeck.c (set_init_index): When folding, check for index overflow.
4241 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4243         * c-parser.c (c_parser_array_notation): Removed rejection of array
4244         notations in an array of function pointers.
4246 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4248         * c-array-notation.c (make_triplet_val_inv): New function.
4249         (create_cmp_incr): Likewise.
4250         (create_array_refs): Likewise.
4251         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4252         Also modularized common parts between functions and called the function.
4253         (build_array_notation_expr): Likewise.
4254         (fix_conditional_array_notations_1): Likewise.
4255         (fix_array_notation_expr): Likewise.
4256         (fix_array_notation_call_expr): Likewise.
4258 2013-06-18  Marek Polacek  <polacek@redhat.com>
4260         PR c/57630
4261         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4263 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4265         * c-array-notation.c (build_array_notation_expr): Reject array notation
4266         mismatch between LHS and RHS even inside a call_expr.  Also, removed
4267         a couple while statements that were dead code.
4269 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4271         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4272         excessive precision expressions in function parameters.  Also removed
4273         couple unwanted while statements.
4275 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4277         * c-array-notation.c (expand_array_notation_exprs): Added
4278         ARRAY_NOTATION_REF case.
4279         
4280 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4282         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4283         function to c-family/array-notation-common.c.
4284         (is_cilkplus_reduce_builtin): Likewise.
4285         (find_rank): Likewise.
4286         (extract_array_notation_exprs): Likewise.
4287         (replace_array_notations): Likewise.
4288         (find_inv_trees): Likewise.
4289         (replace_inv_trees): Likewise.
4290         (contains_array_notation_expr): Likewise.
4291         (find_correct_array_notation_type): Likewise.
4292         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4293         (struct inv_list): Moved this to c-family/array-notation-common.c.
4294         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4295         
4296 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4298         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4299         reduction functions outside the for-loop.  Added a check if the fundecl
4300         is non-NULL.  Finally, removed an unwanted if-statement, and made the
4301         body unconditional.
4303 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4305         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4306         condition of the if-statement matches the rank of else-block and then-
4307         block when array notations are used.
4308         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4309         expression after the entire function body is parsed.
4310         (c_parser_expr_no_commas): Delayed creating array notation expressions
4311         to the end of function parsing.
4312         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4313         whole if-statement instead of just the condition.
4314         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
4316 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4318         PR c/57474
4319         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4320         array to NULL_TREE if they are unused.  Also added a check for the
4321         field to be NULL before its fields are used in future.
4322         
4323 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4325         PR bootstrap/57450
4326         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4327         (build_array_notation_expr): Likewise.
4329 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4331         * c-typeck.c (build_array_ref): Added a check to see if array's
4332         index is greater than one.  If true, then emit an error.
4333         (build_function_call_vec): Exclude error reporting and checking
4334         for builtin array-notation functions.
4335         (convert_arguments): Likewise.
4336         (c_finish_return): Added a check for array notations as a return
4337         expression.  If true, then emit an error.
4338         (c_finish_loop): Added a check for array notations in a loop
4339         condition.  If true then emit an error.
4340         (lvalue_p): Added a ARRAY_NOTATION_REF case.
4341         (build_binary_op): Added a check for array notation expr inside
4342         op1 and op0.  If present, we call another function to find correct
4343         type.
4344         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4345         * c-parser.c (c_parser_compound_statement): Check if array
4346         notation code is used in tree, if so, then transform them into
4347         appropriate C code.
4348         (c_parser_expr_no_commas): Check if array notation is used in LHS
4349         or RHS, if so, then build array notation expression instead of
4350         regular modify.
4351         (c_parser_postfix_expression_after_primary): Added a check for
4352         colon(s) after square braces, if so then handle it like an array
4353         notation.  Also, break up array notations in unary op if found.
4354         (c_parser_direct_declarator_inner): Added a check for array
4355         notation.
4356         (c_parser_compound_statement): Added a check for array notation in
4357         a stmt.  If one is present, then expand array notation expr.
4358         (c_parser_if_statement): Likewise.
4359         (c_parser_switch_statement): Added a check for array notations in
4360         a switch statement's condition.  If true, then output an error.
4361         (c_parser_while_statement): Similarly, but for a while.
4362         (c_parser_do_statement): Similarly, but for a do-while.
4363         (c_parser_for_statement): Similarly, but for a for-loop.
4364         (c_parser_unary_expression): Check if array notation is used in a
4365         pre-increment or pre-decrement expression.  If true, then expand
4366         them.
4367         (c_parser_array_notation): New function.
4368         * c-array-notation.c: New file.
4369         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4370         
4371 2013-05-23  Mike Stump  <mikestump@comcast.net>
4373         * c-typeck.c (convert_for_assignment): Handle references to memory
4374         spaces better.
4376 2013-05-16  Jason Merrill  <jason@redhat.com>
4378         * Make-lang.in (cc1$(exeext)): Use link mutex.
4380 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
4382         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4383         to simply use OPT_Wpointer_arith.
4384         (build_unary_op): Likewise.
4386 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
4388         PR c/19449
4389         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4390         argument.  If set, or it temporarily for parsing of the first
4391         argument into force_folding_builtin_constant_p.
4392         (c_parser_postfix_expression): Adjust callers.
4394 2013-03-21  Richard Biener  <rguenther@suse.de>
4396         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4397         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
4399 2013-02-12  Marek Polacek  <polacek@redhat.com>
4401         PR c/44938
4402         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4403         origtypes to NULL.
4405 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
4407         PR c/56078
4408         * c-typeck.c (set_nonincremental_init_from_string): If
4409         constructor_max_index is NULL, treat it as if tree_int_cst_lt
4410         returned false.
4411         (process_init_element): Likewise.
4413 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
4415         PR c++/55619
4416         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4417         argument, don't call default_function_array_conversion
4418         nor c_fully_fold here.
4419         (c_parser_asm_statement): Adjust callers.
4420         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4421         and outputs here, and call default_function_array_conversion
4422         on inputs that don't need to be addressable.
4424 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
4426         PR c/39464
4427         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4428         warning require that both c_common_unsigned_type as well as
4429         c_common_signed_type is the same for both mvl and mvr types.
4431 2012-11-16  Diego Novillo  <dnovillo@google.com>
4433         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4435         * c-common.c: Use new vec API in vec.h.
4436         * c-common.h: Likewise.
4437         * c-gimplify.c: Likewise.
4438         * c-pragma.c: Likewise.
4439         * c-pretty-print.c: Likewise.
4440         * c-pretty-print.h: Likewise.
4441         * c-semantics.c: Likewise.
4442         * c-decl.c: Likewise.
4443         * c-parser.c: Likewise.
4444         * c-tree.h: Likewise.
4445         * c-typeck.c: Likewise.
4447 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
4449         PR c++/54930
4450         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4452 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4454         PR c/53066
4455         * c-decl.c (warn_if_shadowing): Do not warn if a variable
4456         shadows a function, unless the variable is a function or a
4457         pointer-to-function.
4459 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
4461         PR c/54381
4462         * c-parser.c (struct c_tree_loc_pair): Removed.
4463         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4464         add location_t * and tree * arguments, fill in array of 3
4465         sizeof_arg trees and corresponding locs.
4466         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4467         c_parser_expr_list callers.
4468         (c_parser_postfix_expression_after_primary): Likewise.  Pass
4469         array of 3 sizeof_arg trees and locs (corresponding to first
4470         3 arguments) to sizeof_pointer_memaccess_warning.
4472 2012-10-09  Lawrence Crowl  <crowl@google.com>
4474         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4475         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4476         hash table.
4478 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
4480         PR c++/54194
4481         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4482         call.
4484 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
4486         PR c++/54427
4487         * c-typeck.c: Include c-common.h.
4488         (enum stv_conv): Moved to c-common.h.
4489         (scalar_to_vector): Moved to c-common.c.
4490         (build_binary_op): Adapt to scalar_to_vector's new prototype.
4491         * Make-lang.in: c-typeck.c depends on c-common.h.
4493 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
4495         * c-decl.c (c_write_global_declarations): Fix handling of
4496         -fdump-ada-spec*.
4498 2012-09-30  Sharad Singhai  <singhai@google.com>
4500         * c-decl.c (c_write_global_declarations): Use a different method
4501         to determine if the dump has ben initialized.
4503 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4505         PR c/54552
4506         * c-typeck.c (c_cast_expr): When casting to a type requiring
4507         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4508         c_fully_fold first.
4510 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4512         PR c/54103
4513         * c-typeck.c (build_unary_op): Pass original argument of
4514         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4515         any C_MAYBE_CONST_EXPR, if it has integer operands.
4516         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4517         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4518         to c_objc_common_truthvalue_conversion, then remove any
4519         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
4520         c_objc_common_truthvalue_conversion not
4521         c_common_truthvalue_conversion.
4522         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4523         call note_integer_operands for arguments with integer operands
4524         that are not integer constants.
4526 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
4528         PR c/54559
4529         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4530         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4532 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
4534         PR c/54428
4535         * c-convert.c (convert): Don't call fold_convert_loc if
4536         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4537         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
4538         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4540 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
4542         PR c/54355
4543         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4544         for nested and empty_ok arguments in the call to
4545         c_parser_declaration_or_fndef.
4547 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
4549         * c-tree.h (c_last_sizeof_arg): Declare.
4550         * c-parser.c (struct c_tree_loc_pair): New type.
4551         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
4552         non-NULL.
4553         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4554         (c_parser_postfix_expression_after_primary): Likewise.  Call
4555         sizeof_pointer_memaccess_warning if needed.
4556         (sizeof_ptr_memacc_comptypes): New function.
4557         * c-typeck.c (c_last_sizeof_arg): New global variable.
4558         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4560 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
4562         * c-lang.h (lang_decl): Add variable_size GTY option.
4564 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
4566         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4567         * Make-lang.in: Fix dependencies.
4569 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
4571         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4572         and add language Makefile hooks.
4573         * config-lang.in: New file.
4574         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4575         add the required "normal" config-lang.in rules.
4576         * c-lang.h: Moved from gcc/ to here.
4577         * c-tree.h: Likewise.
4578         * c-objc-common.c: Likewise.
4579         * c-objc-common.h: Likewise.
4580         * c-typeck.c: Likewise.
4581         * c-convert.c: Likewise.
4582         * c-lang.c: Likewise.
4583         * c-aux-info.c: Likewise.
4584         * c-errors.c: Likewise.
4585         * gccspec.c: Likewise.
4586         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
4587         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
4589 Copyright (C) 2012-2017 Free Software Foundation, Inc.
4591 Copying and distribution of this file, with or without modification,
4592 are permitted in any medium without royalty provided the copyright
4593 notice and this notice are preserved.