Update ChangeLog and version files for release
[official-gcc.git] / gcc / c / ChangeLog
blob2324203a9b1e016bb6ca92dc4218f866ca2a2fa6
1 2017-05-02  Release Manager
3         * GCC 7.1.0 released.
5 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
7         * c-array-notation.c: Fix typo in comment.
9 2017-03-29  Marek Polacek  <polacek@redhat.com>
11         PR c/79730
12         * c-decl.c (finish_decl): Check VAR_P.
14 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
16         PR middle-end/80162
17         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
18         * c-typeck.c (c_mark_addressable): Likewise.  Look through
19         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
20         to ARRAY_TYPE.
21         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
23 2017-03-23  Marek Polacek  <polacek@redhat.com>
25         * c-tree.h: Remove a C_RID_YYCODE reference.
27 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
29         PR c/80097
30         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
31         optional COMPOUND_EXPR with ubsan instrumentation.
33 2017-03-17  Marek Polacek  <polacek@redhat.com>
35         * c-parser.c: Add C11 references.
37 2017-03-15  Marek Polacek  <polacek@redhat.com>
39         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
41 2017-03-11  Marek Polacek  <polacek@redhat.com>
43         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
45 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
47         PR translation/79848
48         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
49         "%qs".
50         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
52 2017-03-09  Marek Polacek  <polacek@redhat.com>
54         PR sanitizer/79757
55         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
56         parameter declarations with initializers.
58 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
60         PR c/79969
61         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
62         TYPE_STUB_DECL.
64 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
66         PR c/79834
67         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
68         for "may only be used in compound statements" diagnostics, change it
69         such that the same translatable string is used for all pragmas.  For
70         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
71         diagnostics.
72         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
73         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
74         "may only be used in compound statements" diagnostics, such that the
75         same translatable string is used for all pragmas.
77 2017-03-04  Marek Polacek  <polacek@redhat.com>
79         PR c/79847
80         * c-decl.c (implicit_decl_warning): Add missing space.
82 2017-03-03  Marek Polacek  <polacek@redhat.com>
84         PR c/79758
85         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
86         current_function_prototype_arg_types is error_mark_node.  Fix
87         formatting.  Use TREE_VALUE instead of TREE_TYPE.
89 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
91         PR c/79837
92         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
93         %<min%> or %<max%> in the diagnostics, instead mention identifier.
94         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
95         diagnostics.
97         PR c/79836
98         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
99         instead of %<_Generic>.
100         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
101         (c_parser_omp_target_exit_data): Use %<release%> instead of
102         %<release>.
104 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
106         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
107         instead of just cond ? "..." : "...".
108         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
109         for "enter"/"exit" keyword.
110         (c_finish_oacc_routine): Don't use %s to supply portions of the
111         message.
113 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
115         PR c++/79588
116         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
117         handle -Wrestrict here.
118         * c-typeck.c (build_function_call_vec): Adjust
119         check_function_arguments caller.
121 2017-02-23  Richard Biener  <rguenther@suse.de>
123         PR c/79684
124         * gimple-parser.c (c_parser_gimple_statement): Use set_error
125         to initialize c_exprs to return.
126         (c_parser_gimple_binary_expression): Likewise.
127         (c_parser_gimple_unary_expression): Likewise.
128         (c_parser_gimple_postfix_expression): Likewise.
130 2017-02-22  Marek Polacek  <polacek@redhat.com>
132         PR c/79662
133         * c-typeck.c (convert_arguments): Handle error_mark_node.
135 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
137         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
138         value of c_parser_parse_ssa_name against error_mark_node and emit
139         error if ssa name is anonymous and written as default definition.
141 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
143         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
144         FMA_EXPR.
146 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
148         PR c++/79512
149         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
150         ignore #pragma omp target even when not followed by identifier.
152 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
154         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
155         (c_parser_gimple_unary_expression): Likewise.
157 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
159         * c-parser.c (c_parser_oacc_declare): Add missing space in
160         diagnostics.
162 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
164         PR c/79478
165         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
166         set_c_expr_source_range when parsing ssa-name.
168 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
169         Richard Biener  <rguenther@suse.de>
171         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
172         building IL when arguments are error_mark_node.
173         (c_parser_gimple_unary_expression): Likewise.
174         (c_parser_gimple_if_stmt): Likewise.
175         (c_parser_gimple_switch_stmt): Likewise.
176         (c_parser_gimple_return_stmt): Likewise.
177         (c_parser_parse_ssa_name): When name lookup fails do not build
178         an SSA name.  Use undeclared rather than not declared in error
179         reporting.
181 2017-02-09  Marek Polacek  <polacek@redhat.com>
183         PR c/79428
184         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
185         instead of c_parser_skip_until_found.
187 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
189         PR c/79431
190         * c-parser.c (c_parser_omp_declare_target): Don't invoke
191         symtab_node::get on automatic variables.
193 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
194             Chung-Lin Tang  <cltang@codesourcery.com>
196         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
197         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
198         semantic checking.
199         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
201 2017-02-07  Richard Biener  <rguenther@suse.de>
203         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
204         (c_parser_gimple_postfix_expression_after_primary):
205         Do not use c_build_function_call_vec to avoid folding and promotion.
206         Simplify.
208 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
210         PR lto/79061
211         * c-decl.c (pop_scope): Pass main_input_filename to
212         build_translation_unit_decl.
214 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
216         * c-parser.c: Include "read-rtl-function.h" and
217         "run-rtl-passes.h".
218         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
219         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
220         production.  Update for renaming of field "gimple_pass" to
221         "gimple_or_rtl_pass".  If __RTL was seen, call
222         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
223         to an auto_timevar, to cope with early exit.
224         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
225         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
226         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
227         Handle RID_RTL.
228         (c_parser_parse_rtl_body): New function.
229         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
230         (struct c_declspecs): Rename field "gimple_pass" to
231         "gimple_or_rtl_pass".  Add field "rtl_p".
232         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
233         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
234         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
235         (c_parser_gimple_or_rtl_pass_list): ...this.
237 2017-01-20  Marek Polacek  <polacek@redhat.com>
239         PR c/64279
240         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
242 2017-01-13  Richard Biener  <rguenther@suse.de>
244         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
245         nops.
247 2017-01-13  Richard Biener  <rguenther@suse.de>
249         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
250         _Literal ( type-name ) number.
252 2017-01-12  Richard Biener  <rguenther@suse.de>
254         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
255         __MEM.
257 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
259         PR c++/72813
260         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
261         PCH file.
263 2017-01-11  Richard Biener  <rguenther@suse.de>
265         PR bootstrap/79052
266         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
267         returns on parse errors.
269 2017-01-04  Marek Polacek  <polacek@redhat.com>
271         PR c++/64767
272         * c-parser.c (c_parser_postfix_expression): Mark zero character
273         constants by setting original_type in c_expr.
274         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
275         with a zero character constant.
276         (char_type_p): New function.
278 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
280         * c-parser.c (c_parser_declaration_or_fndef): Create a
281         rich_location at init_loc and parse it to start_init.
282         (last_init_list_comma): New global.
283         (c_parser_braced_init): Update last_init_list_comma when parsing
284         commas.  Pass it to pop_init_level.  Pass location of closing
285         brace to pop_init_level.
286         (c_parser_postfix_expression_after_paren_type): Create a
287         rich_location at type_loc and parse it to start_init.
288         (c_parser_omp_declare_reduction): Likewise for loc.
289         * c-tree.h (start_init): Add rich_location * param.
290         (pop_init_level): Add location_t param.
291         * c-typeck.c (struct initializer_stack): Add field
292         "missing_brace_richloc".
293         (start_init): Add richloc param, use it to initialize
294         the stack node's missing_brace_richloc.
295         (last_init_list_comma): New decl.
296         (finish_implicit_inits): Pass last_init_list_comma to
297         pop_init_level.
298         (push_init_level): When finding missing open braces, add fix-it
299         hints to the richloc.
300         (pop_init_level): Add "insert_before" param and pass it
301         when calling pop_init_level.  Add fixits about missing
302         close braces to any richloc.  Use the richloc for the
303         -Wmissing-braces warning.
304         (set_designator): Pass last_init_list_comma to pop_init_level.
305         (process_init_element): Likewise.
307 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
309         Update copyright years.
311 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
313         PR bootstrap/78817
314         * c-typeck.c (build_function_call_vec): If check_function_arguments
315         returns true, set TREE_NO_WARNING on CALL_EXPR.
317         PR c/77767
318         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
319         to *expr instead of overwriting it.
321 2016-12-20  Richard Biener  <rguenther@suse.de>
323         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
324         error recovery.
325         (c_parser_gimple_statement): Only build assigns for non-error
326         stmts.
327         (c_parser_gimple_postfix_expression_after): Improve error recovery.
329 2016-12-14  Martin Jambor  <mjambor@suse.cz>
331         * c-parser.c: Include omp-general.h and omp-offload.h instead of
332         omp-low.h.
333         (c_finish_oacc_routine): Adjusted call to
334         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
335         to use their new names.
336         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
337         use its new name.
338         (c_parser_oacc_update): Likewise.
339         (c_parser_omp_simd): Likewise.
340         (c_parser_omp_target_update): Likewise.
341         * c-typeck.c: Include omp-general.h instead of omp-low.h.
342         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
343         name.
344         (c_finish_omp_cancellation_point): Likewise.
345         * gimple-parser.c: Do not include omp-low.h
347 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
348             James Norris  <jnorris@codesourcery.com>
350         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
351         EXIT_DATA,WAIT} are not used in compound statements.
352         (c_parser_oacc_enter_exit_data): Update diagnostics.
354 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
356         PR c++/71973
357         * c-decl.c (diagnose_mismatched_decls): Use
358         OPT_Wbuiltin_declaration_mismatch here too.
360 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
361             Alan Hayward  <alan.hayward@arm.com>
362             David Sherwood  <david.sherwood@arm.com>
364         * c-decl.c (merge_decls): Use SET_DECL_MODE.
365         (make_label, finish_struct): Likewise.
367 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
368             Richard Biener  <rguenther@suse.de>
370         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
371         * config-lang.in (gtfiles): Add c/c-parser.h.
372         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
373         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
374         * c-parser.c (enum c_id_kind, struct c_token,
375         c_parser_next_token_is, c_parser_next_token_is_not,
376         c_parser_next_token_is_keyword,
377         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
378         Split out to ...
379         * c-parser.h: ... new header.
380         * c-parser.c: Include c-parser.h and gimple-parser.h.
381         (c_parser_peek_token, c_parser_peek_2nd_token,
382         c_token_starts_typename, c_parser_next_token_starts_declspecs,
383         c_parser_next_tokens_start_declaration, c_parser_consume_token,
384         c_parser_error, c_parser_require, c_parser_skip_until_found,
385         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
386         c_parser_type_name): Export.
387         (c_parser_tokens_buf): New function.
388         (c_parser_error): Likewise.
389         (c_parser_set_error): Likewise.
390         (c_parser_declspecs): Handle RID_GIMPLE.
391         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
392         via c_parser_parse_gimple_body.
393         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
394         c_token_starts_typename, c_parser_next_token_starts_declspecs,
395         c_parser_next_tokens_start_declaration, c_parser_consume_token,
396         c_parser_error, c_parser_require, c_parser_skip_until_found,
397         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
398         c_parser_type_name): Declare.
399         (struct c_parser): Declare forward.
400         (c_parser_tokens_buf): Declare.
401         (c_parser_error): Likewise.
402         (c_parser_set_error): Likewise.
403         * gimple-parser.c: New file.
404         * gimple-parser.h: Likewise.
406 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
408         PR c/35503
409         * c-parser.c (c_parser_postfix_expression_after_primary): Call
410         warn_for_restrict.
412 2016-09-11  Le-Chun Wu  <lcwu@google.com>
413             Mark Wielaard  <mjw@redhat.com>
415         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
416         to the given -Wshadow= variant.
418 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
420         * c-typeck.c: Include memmodel.h.
422 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
424         PR target/77957
425         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
426         instead of lhd_return_null_tree_v.
428 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
430         PR c++/69733
431         * c-decl.c (smallest_type_quals_location): New static function.
432         (grokdeclarator): Try to find the correct location for an ignored
433         qualifier.
435 2016-09-26  Marek Polacek  <polacek@redhat.com>
437         PR c/7652
438         * c-decl.c (pop_scope): Add gcc_fallthrough.
440 2016-09-26  Marek Polacek  <polacek@redhat.com>
442         PR c/7652
443         * c-parser.c (struct c_token): Add flags field.
444         (c_lex_one_token): Pass it to c_lex_with_flags.
445         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
446         into IFN_FALLTHROUGH.
447         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
448         attribute fallthrough after a case label or default label.
449         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
451 2016-09-24  Marek Polacek  <polacek@redhat.com>
453         PR c/77490
454         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
455         have boolean value.  Warn about ++/-- on booleans.
457 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
459         * c-parser.c (incomplete_record_decls): Remove unnecessary
460         = vNULL initialization of file scope vec.
462 2016-09-16  Marek Polacek  <polacek@redhat.com>
464         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
466 2016-09-14  Marek Polacek  <polacek@redhat.com>
468         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
469         (fix_array_notation_expr): Likewise.
470         * c-decl.c (finish_decl): Likewise.
471         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
472         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
473         (function_to_pointer_conversion): Use false instead of 0.
474         (convert_lvalue_to_rvalue): Likewise.
475         (parser_build_unary_op): Likewise.
476         (build_atomic_assign): Likewise.
477         (build_unary_op): Change nonconvert parameter type to bool, use
478         true/false instead of 1/0.
479         (build_binary_op): Use true instead of 1.
481 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
483         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
484         of add_fixit_insert to add_fixit_insert_before.
486 2016-09-13  Marek Polacek  <polacek@redhat.com>
488         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
489         it.
491 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
493         PR c++/77496
494         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
495         COMPOUND_EXPR to warn_for_omitted_condop.
497 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
499         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
500         c_get_substring_location for this new langhook.
502 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
504         PR c/65467
505         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
506         flag_openmp.
507         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
508         instead of mark_exp_read on low_bound/length expression.
509         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
510         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
511         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
512         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
513         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
514         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
515         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
516         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
517         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
518         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
519         instead of mark_expr_read.
520         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
521         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
522         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
523         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
524         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
525         array section bases outside of depend clause, for depend clause
526         use convert_lvalue_to_rvalue on the base.
527         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
528         linear, aligned, map, to and from clauses.
529         (c_omp_clause_copy_ctor): New function.
531 2016-09-01  Marek Polacek  <polacek@redhat.com>
533         PR c/7652
534         * c-typeck.c (composite_type): Add FALLTHRU comment.
536 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
538         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
539         to the insertion fixits for "struct", "union", and "enum".
541 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
543         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
544         rather than add_fixit_misspelled_id.
545         (undeclared_variable): Likewise.
546         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
547         now-redundant "here" params from add_fixit_insert method calls.
548         (c_parser_parameter_declaration): Likewise.
549         * c-typeck.c (build_component_ref): Remove now-redundant range
550         param from add_fixit_replace method calls.
552 2016-08-25  Marek Polacek  <polacek@redhat.com>
554         * c-typeck.c (parser_build_binary_op): Pass LHS to
555         warn_logical_not_parentheses.
557 2016-08-25  Marek Polacek  <polacek@redhat.com>
559         PR c/77323
560         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
561         or _FloatN or _FloatNx is not supported.
562         (finish_declspecs): Set type to integer_type_node when _FloatN or
563         _FloatNx is not supported.
565 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
567         PR c/32187
568         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
569         (struct c_declspecs): Add field floatn_nx_idx.
570         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
571         and _FloatNx type specifiers.
572         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
573         (c_parser_declspecs, c_parser_attribute_any_word)
574         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
575         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
576         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
577         narrower than double.
579 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
580             Martin Liska  <mliska@suse.cz>
582         PR c/67410
583         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
584         % to determine val element to change.  Assert that
585         wchar_bytes * charwidth fits into val array.
587 2016-08-12  Marek Polacek  <polacek@redhat.com>
589         PR c/7652
590         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
591         (c_parser_postfix_expression): Likewise.
592         * c-typeck.c (build_unary_op): Adjust fall through comment.
593         (c_mark_addressable): Likewise.
595 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
597         PR c/72816
598         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
599         array member through typedef, for orig_qual_indirect == 0 clear
600         orig_qual_type.
602 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
604         PR c/64955
605         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
606         this up to selftest::run_c_tests.
607         (selftest::run_c_tests): New function.
609 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
611         * c-parser.c (struct oacc_routine_data): Add error_seen and
612         fndecl_seen members.
613         (c_finish_oacc_routine): Use these.
614         (c_parser_declaration_or_fndef): Adjust.
615         (c_parser_oacc_routine): Likewise.  Support more C language
616         constructs, and improve diagnostics.  Move pragma context
617         checking...
618         (c_parser_pragma): ... here.
620         * c-parser.c (struct oacc_routine_data): New.
621         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
622         Simplify code.
623         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
624         declare target" attribute.
626 2016-08-01  Jan Beulich  <jbeulich@suse.com>
628         * c-fold.c (c_fully_fold_internal): Also emit shift count
629         warnings for vector types.
630         * c-typeck.c (build_binary_op): Likewise.
632 2016-07-29  Marek Polacek  <polacek@redhat.com>
634         PR c/71742
635         * c-decl.c (finish_struct): Rephrase an error message.
637         PR c/71853
638         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
639         to error node for invalid code.
641         PR c/71573
642         * c-decl.c (implicitly_declare): Return decl early not only for
643         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
645 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
647         PR c/71969
648         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
649         on GNU extern inline functions.
651 2016-07-29  Marek Polacek  <polacek@redhat.com>
653         PR c/71583
654         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
655         check expr.value.
657 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
659         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
661 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
663         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
664         spellcheck-tree.h
665         (best_macro_match): Likewise, converting from a typedef to a
666         subclass.
667         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
668         (lookup_name_fuzzy): Update for change of best_macro_match to a
669         subclass with a ctor that calls cpp_forall_identifiers.
671 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
673         * c-decl.c (implicit_decl_warning): Update for conversion of
674         return type of lookup_name_fuzzy to const char *.
675         (undeclared_variable): Likewise.
676         (lookup_name_fuzzy): Convert return type from tree to
677         const char *.
678         * c-parser.c (c_parser_declaration_or_fndef): Update for
679         conversion of return type of lookup_name_fuzzy to const char *.
680         (c_parser_parameter_declaration): Likewise.
682 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
684         * c-parser.c (c_parser_oacc_declare): Don't scan for
685         GOMP_MAP_POINTER.
686         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
687         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
688         zero-length subarrays.
690 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
692         PR c/71858
693         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
694         instead of FUZZY_LOOKUP_NAME.
695         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
696         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
698 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
700         PR c/71858
701         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
703 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
705         * c-parser.c (c_parser_generic_selection): Make type of variable
706         auto_vec.
707         (c_parser_omp_declare_simd): Likewise.
709 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
711         * c-decl.c (struct c_struct_parse_info): Change member types
712         from vec to auto_vec.
713         (start_struct): Adjust.
714         (finish_struct): Likewise.
716 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
718         PR c/71719
719         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
721 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
723         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
724         Move pragma context checking into...
725         (c_parser_omp_cancellation_point): ... here, and improve
726         diagnostic messages.
727         * c-typeck.c (c_finish_omp_cancel)
728         (c_finish_omp_cancellation_point): Improve diagnostic messages.
730 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
732         PR c/71685
733         * c-typeck.c (c_build_qualified_type): Don't clear
734         C_TYPE_INCOMPLETE_VARS for the main variant.
736 2016-06-28  Martin Sebor  <msebor@redhat.com>
738         PR c/71552
739         * c-typeck.c (output_init_element): Diagnose incompatible types
740         before non-constant initializers.
742 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
744         * Make-lang.in: Don't cat ../stage_current if it does not exist.
746 2016-06-23  Andi Kleen  <ak@linux.intel.com>
748         * Make-lang.in: Add support for autofdo.
750 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
752         PR c/70339
753         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
754         (implicit_decl_warning): When issuing warnings for implicit
755         declarations, attempt to provide a suggestion via
756         lookup_name_fuzzy.
757         (undeclared_variable): Likewise when issuing errors.
758         (lookup_name_in_scope): Likewise.
759         (struct edit_distance_traits<cpp_hashnode *>): New struct.
760         (best_macro_match): New typedef.
761         (find_closest_macro_cpp_cb): New function.
762         (lookup_name_fuzzy): New function.
763         * c-parser.c: Include gcc-rich-location.h.
764         (c_token_starts_typename): Split out case CPP_KEYWORD into...
765         (c_keyword_starts_typename): ...this new function.
766         (c_parser_declaration_or_fndef): When issuing errors about
767         missing "struct" etc, add a fixit.  For other kinds of errors,
768         attempt to provide a suggestion via lookup_name_fuzzy.
769         (c_parser_parms_declarator): When looking ahead to detect typos in
770         type names, also reject CPP_KEYWORD.
771         (c_parser_parameter_declaration): When issuing errors about
772         unknown type names, attempt to provide a suggestion via
773         lookup_name_fuzzy.
774         * c-tree.h (c_keyword_starts_typename): New prototype.
776 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
778         PR c/71601
779         * c-typeck.c (build_conditional_expr): Return error_mark_node if
780         c_common_type returns error_mark_node.
782 2016-06-19  Martin Sebor  <msebor@redhat.com>
784         PR c/69507
785         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
786         __alignof__ (expression).
788 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
790         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
792 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
794         * c-typeck.c (build_component_ref): Simplify fixit code by
795         using gcc_rich_location::add_fixit_misspelled_id.
796         (set_init_label): Likewise.
798 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
800         * c-parser.c (c_parser_initelt): Provide location of name for new
801         location_t param of set_init_label.
802         * c-tree.h (set_init_label): Add location_t param.
803         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
804         param and use it when issuing error messages about unrecognized
805         field names.  Attempt to provide a fixit hint if appropriate,
806         otherwise update the error message to provide the type name.
808 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
810         PR c/71381
811         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
812         Loosen checking.
814 2016-06-08  Martin Sebor  <msebor@redhat.com>
815             Jakub Jelinek  <jakub@redhat.com>
817         PR c++/70507
818         PR c/68120
819         * c-typeck.c (convert_arguments): Don't promote last argument
820         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
822 2016-06-08  Marek Polacek  <polacek@redhat.com>
824         PR c/71418
825         * c-decl.c (grokdeclarator): Check TYPE_P.
827         PR c/71426
828         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
829         code.
831 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
833         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
834         and structure element reference, capture the location of the
835         element name token and pass it to build_component_ref.
836         (c_parser_postfix_expression_after_primary): Likewise for
837         structure element dereference.
838         (c_parser_omp_variable_list): Likewise for
839         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
840         * c-tree.h (build_component_ref): Add location_t param.
841         * c-typeck.c (build_component_ref): Add location_t param
842         COMPONENT_LOC.  Use it, if available, when issuing hints about
843         mispelled member names to provide a fixit replacement hint.
845 2016-06-06  Marek Polacek  <polacek@redhat.com>
847         PR c/71362
848         * c-parser.c (c_parser_direct_declarator): Set location.
850 2016-06-06  Marek Polacek  <polacek@redhat.com>
852         * c-typeck.c (comptypes_internal): Handle comparisons of
853         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
854         TYPE_REF_CAN_ALIAS_ALL.
856 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
858         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
859         arguments as addressable when async clause exists.
861 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
863         PR c++/71349
864         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
865         when combined with target construct.
867 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
869         * c-parser.c (c_parser_omp_clause_schedule): Warn if
870         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
872 2016-05-25  Marek Polacek  <polacek@redhat.com>
874         PR c/71265
875         * c-decl.c (c_make_fname_decl): Don't check seen_error.
877         PR c/71266
878         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
880 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
882         * c-parser.c (c_parser_oacc_declare): Add support for
883         GOMP_MAP_FIRSTPRIVATE_POINTER.
884         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
885         argument with enum c_omp_region_type ort.
886         (handle_omp_array_sections): Likewise.  Update call to
887         handle_omp_array_sections_1.
888         (c_finish_omp_clauses): Add specific errors and warning messages for
889         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
890         call to handle_omp_array_sections.
892 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
894         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
896 2016-05-24  Richard Biener  <rguenther@suse.de>
898         PR middle-end/70434
899         PR c/69504
900         * c-typeck.c (build_array_ref): Do not complain about indexing
901         non-lvalue vectors.  Adjust for function name change.
903 2016-05-20  Martin Sebor  <msebor@redhat.com>
905         PR c/71115
906         * c-typeck.c (error_init): Use
907         expansion_point_location_if_in_system_header.
908         (warning_init): Same.
910 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
912         PR c/71171
913         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
914         in error-handling.
915         (c_parser_postfix_expression): Likewise.
916         * c-tree.h (c_expr::set_error): New method.
917         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
918         that result's range is initialized.
920 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
922         * c-typeck.c (parser_build_unary_op): Fix formatting.
924 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
926         * c-decl.c (grokdeclarator): Remove errmsg and use of
927         targetm.invalid_return_type.
928         (grokparms): Remove errmsg and use of
929         targetm.invalid_parameter_type.
931 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
933         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
934         function return type.
936 2016-05-12  Marek Polacek  <polacek@redhat.com>
938         PR c/70756
939         * c-decl.c (build_compound_literal): Pass LOC down to
940         c_incomplete_type_error.
941         * c-tree.h (require_complete_type): Adjust declaration.
942         (c_incomplete_type_error): Likewise.
943         * c-typeck.c (require_complete_type): Add location parameter, pass it
944         down to c_incomplete_type_error.
945         (c_incomplete_type_error): Add location parameter, pass it down to
946         error_at.
947         (build_component_ref): Pass location down to c_incomplete_type_error.
948         (default_conversion): Pass location down to require_complete_type.
949         (build_array_ref): Likewise.
950         (build_function_call_vec): Likewise.
951         (convert_arguments): Likewise.
952         (build_unary_op): Likewise.
953         (build_c_cast): Likewise.
954         (build_modify_expr): Likewise.
955         (convert_for_assignment): Likewise.
956         (c_finish_omp_clauses): Likewise.
958 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
960         PR c/43651
961         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
962         is enabled.
963         * c-errors.c (pedwarn_c90): Return true if warned.
964         * c-tree.h (pedwarn_c90): Change return type to bool.
965         (enum c_declspec_word): Add new enumerator cdw_atomic.
967 2016-05-11  Marek Polacek  <polacek@redhat.com>
969         PR c++/71024
970         * c-decl.c (diagnose_mismatched_decls): Factor out code to
971         diagnose_mismatched_attributes and call it.
973 2016-05-10  Marek Polacek  <polacek@redhat.com>
975         PR c/70255
976         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
977         on a declaration following the definition.
979 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
981         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
982         parse it through to c_parser_c99_block_statement.
983         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
984         caller.
986 2016-05-04  Marek Polacek  <polacek@redhat.com>
988         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
989         OPT_Wdangling_else.
991 2016-05-04  Marek Polacek  <polacek@redhat.com>
993         PR c/48778
994         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
995         for macro expansions.
997 2016-05-03  Marek Polacek  <polacek@redhat.com>
999         PR c/70859
1000         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1001         check_builtin_function_arguments.
1003 2016-05-03  Richard Biener  <rguenther@suse.de>
1005         * Make-lang.in (cc1-checksum.c): For stage-final re-use
1006         the checksum from the previous stage.
1008 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
1010         * c-parser.c (c_parser_oacc_all_clauses): Update call to
1011         c_finish_omp_clauses.
1012         (c_parser_omp_all_clauses): Likewise.
1013         (c_parser_oacc_cache): Likewise.
1014         (c_parser_oacc_loop): Likewise.
1015         (omp_split_clauses): Likewise.
1016         (c_parser_omp_declare_target): Likewise.
1017         (c_parser_cilk_all_clauses): Likewise.
1018         (c_parser_cilk_for): Likewise.
1019         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1020         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1022 2016-05-02  Marek Polacek  <polacek@redhat.com>
1024         PR c/70851
1025         * c-decl.c (grokdeclarator): Diagnose when array's size has an
1026         incomplete type.
1028 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
1030         PR middle-end/70626
1031         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1032         OACC_LOOP_CLAUSE_MASK.
1033         (c_parser_oacc_kernels_parallel): Update call to
1034         c_oacc_split_loop_clauses.
1036 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
1038         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1039         argument to build_modify_expr in two cases.
1041 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
1043         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1044         warn_for_memset instead of warning directly here.
1046 2016-04-26  Marek Polacek  <polacek@redhat.com>
1048         PR c/67784
1049         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1050         out of ...
1051         (c_parser_for_statement): ... here.
1052         (c_parser_if_statement): Use it.
1053         (c_parser_switch_statement): Use it.
1054         (c_parser_while_statement): Use it.
1056         PR c/70791
1057         * c-decl.c (pushdecl): Pass LOCUS down to warning.
1059 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1061         PR c++/69363
1062         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1063         instead of c_finish_cilk_clauses.
1064         * c-tree.h (c_finish_omp_clauses): Add new default argument.
1065         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
1066         floating-point variables in the linear clause for Cilk Plus.
1068 2016-04-18  Michael Matz  <matz@suse.de>
1070         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1071         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1073 2016-04-15  Marek Polacek  <polacek@redhat.com>
1075         PR c/70671
1076         * c-typeck.c (build_unary_op): Pass location down to error and
1077         warning call.
1079 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
1081         PR c/70436
1082         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1083         where needed.
1084         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1085         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1086         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1087         Adjust c_parser_pragma callers.
1088         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
1089         caller.
1090         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1091         c_parser_statement.
1092         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1093         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1094         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1095         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1096         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1097         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1098         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1099         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1100         down where needed.
1101         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
1102         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1103         calls.
1105 2016-04-13  Marek Polacek  <polacek@redhat.com>
1107         PR c/70436
1108         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1109         adjust callers.
1110         (c_parser_statement): Likewise.
1111         (c_parser_c99_block_statement): Likewise.
1112         (c_parser_while_statement): Likewise.
1113         (c_parser_for_statement): Likewise.
1114         (c_parser_if_body): Don't set IF_P here.
1115         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
1116         about dangling else here.
1117         * c-tree.h (c_finish_if_stmt): Adjust declaration.
1118         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
1119         warn about dangling else here.
1121 2016-04-04  Marek Polacek  <polacek@redhat.com>
1123         PR c/70307
1124         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1126 2016-03-31  Marek Polacek  <polacek@redhat.com>
1128         PR c/70297
1129         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1131 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
1133         PR c/70281
1134         * c-parser.c (c_parser_postfix_expression): Set the source range
1135         for uses of "__builtin_types_compatible_p".
1137 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
1139         PR c/70280
1140         * c-typeck.c (composite_type): Don't count void_list_node
1141         into len, if the list is terminated by void_list_node, start
1142         with void_list_node instead of NULL for newargs.  Stop
1143         at void_list_node.
1145 2016-03-16  Marek Polacek  <polacek@redhat.com>
1147         PR c/70093
1148         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1149         nested functions returning VM types.
1151 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
1153         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1154         when calling c_finish_omp_clauses.
1156 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
1158         PR c/69824
1159         * c-decl.c (get_parm_info): Don't queue implicit function declarations
1160         for later.
1162 2016-03-04  Marek Polacek  <polacek@redhat.com>
1164         PR c/69798
1165         * c-parser.c (c_parser_postfix_expression): Call
1166         c_parser_cast_expression rather than c_parser_postfix_expression.
1168 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
1170         PR c/69796
1171         PR c/69974
1172         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1173         of incomplete decls to error_mark_node.
1175 2016-02-24  Marek Polacek  <polacek@redhat.com>
1177         PR c/69819
1178         * c-decl.c (finish_decl): Don't update the copy of the type of a
1179         different decl type.
1181 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
1183         PR objc/69844
1184         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1185         in id_kind reclassification.
1187 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
1189         PR c/69835
1190         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1192 2016-02-16  James Norris  <jnorris@codesourcery.com>
1194         PR c/64748
1195         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1197 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
1199         * c-decl.c (build_null_declspecs): Zero the entire struct.
1201         PR c/69522
1202         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
1203         callers changed.  If nested_p is true, use it to call
1204         finish_implicit_inits.
1205         * c-tree.h (finish_implicit_inits): Declare.
1206         * c-typeck.c (finish_implicit_inits): New function.  Move code
1207         from ...
1208         (push_init_level): ... here.
1209         (set_designator, process_init_element): Call finish_implicit_inits.
1211 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
1213         PR c/69768
1214         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1215         arguments for -Waddress warning.
1217 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
1219         PR c/69669
1220         * c-decl.c (finish_enum): When honoring mode attribute,
1221         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1223 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
1225         PR debug/69518
1226         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1227         all type variants, not just TYPE_MAIN_VARIANT.
1229 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
1231         PR debug/66869
1232         * c-decl.c (c_write_global_declarations_1): Warn with
1233         warn_unused_function if static prototype without definition
1234         is not C_DECL_USED.
1236 2016-01-27  Marek Polacek  <polacek@redhat.com>
1238         PR c/68062
1239         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1240         to unsigned, if needed.  Add -Wsign-compare warning.
1242 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
1244         PR tree-optimization/69483
1245         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1247 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1249         PR c/24293
1250         * c-tree.h (incomplete_record_decls): Declare.
1251         * c-parser.c (incomplete_record_decls): Define.
1252         (c_parser_translation_unit): Iterate through incomplete_record_decls and
1253         report error if any decl has zero size.
1254         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1255         or enum type to incomplete_record_decls.
1257 2016-01-14  Tom de Vries  <tom@codesourcery.com>
1259         PR tree-optimization/68773
1260         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1261         set force_output.
1263 2016-01-14  Marek Polacek  <polacek@redhat.com>
1265         PR c/69262
1266         * c-decl.c (grokdeclarator): Provide more information for invalid
1267         array declarations.
1269 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
1271         * c-parser.c (c_parser_unary_expression): For dereferences, build
1272         a combined location before calling build_indirect_ref, so that
1273         error reports cover the full range, manually updating the c_expr
1274         src_range.
1276 2016-01-06  Marek Polacek  <polacek@redhat.com>
1278         PR sanitizer/69099
1279         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
1280         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
1281         NULL.
1283 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1285         Update copyright years.
1287 2016-01-04  Marek Polacek  <polacek@redhat.com>
1289         PR c/68908
1290         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
1291         optimization to use __atomic_fetch_* built-in if possible.
1293 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
1295         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1296         into...
1297         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
1298         all users.
1300 2015-12-22  Marek Polacek  <polacek@redhat.com>
1302         PR c/69002
1303         * c-typeck.c (build_component_ref): Warn when acessing elements of
1304         atomic structures or unions.
1306 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
1308         * c-typeck.c: Include "gcc-rich-location.h".
1309         (build_binary_op): In the two places that call binary_op_error,
1310         create a gcc_rich_location and populate it with the location of
1311         the binary op and its two operands.
1313 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1315         * c-parser.c (c_parser_statement_after_labels): When calling
1316         c_finish_return, Use the return expression's location if it has
1317         one, falling back to the location of the first token within it.
1318         * c-typeck.c (c_finish_return): When issuing warnings about
1319         the incorrect presence/absence of a return value, issue a note
1320         showing the declaration of the function.
1322 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1324         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1325         to 4.
1326         (c_parser_peek_nth_token): New function.
1327         (c_parser_peek_conflict_marker): New function.
1328         (c_parser_error): Detect conflict markers and report them as such.
1330 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1332         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1333         to preserve range information for the primary expression
1334         in the call to c_parser_postfix_expression_after_primary.
1336 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1338         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1339         expression location, falling back on the first token location,
1340         rather than always using the latter.
1342 2015-12-16  Marek Polacek  <polacek@redhat.com>
1344         PR c/64637
1345         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1346         available.
1348 2015-12-15  Marek Polacek  <polacek@redhat.com>
1350         PR c/68907
1351         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1352         artificial decl.
1354 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
1356         * c-parser.c (c_parser_alignof_expression): Capture location of
1357         closing parenthesis (if any), or of end of unary expression, and
1358         use it to build a src_range for the expression.
1360 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
1362         PR c/68757
1363         * c-parser.c (c_parser_get_builtin_args): Add
1364         "out_close_paren_loc" param, and write back to it.
1365         (c_parser_postfix_expression): Capture the closing
1366         parenthesis location for RID_CHOOSE_EXPR,
1367         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1368         RID_BUILTIN_SHUFFLE and use it to set the source range
1369         for such expressions; within RID_BUILTIN_COMPLEX set
1370         the underlying location.
1372 2015-12-07  Marek Polacek  <polacek@redhat.com>
1374         PR c/68668
1375         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1376         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1378 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
1380         * c-tree.h (c_build_va_arg): Adjust prototype.
1381         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1382         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1383         parameter, adjust throughout and issue an error if EXPR is a component
1384         with reverse storage order.
1386 2015-12-02  Jason Merrill  <jason@redhat.com>
1388         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1389         (c_fully_fold_internal, decl_constant_value_for_optimization):
1390         Move from c-common.c.
1391         * c-tree.h: Declare decl_constant_value_for_optimization.
1392         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1394 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
1396         PR c/68162
1397         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1398         following link from declarator to next declarator.  Track original
1399         qualified type and pass it to c_build_qualified_type.
1400         * c-typeck.c (c_build_qualified_type): Add arguments
1401         orig_qual_type and orig_qual_indirect.
1403 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
1405         * c-parser.c (c_parser_omp_clause_name)
1406         (c_parser_oacc_all_clauses): Alphabetical sorting.
1408 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
1410         PR c/68533
1411         * c-decl.c (get_parm_info): Use b->locus instead of input_location
1412         for diagnostics.
1414 2015-12-01  Julian Brown  <julian@codesourcery.com>
1415             Cesar Philippidis  <cesar@codesourcery.com>
1416             James Norris  <James_Norris@mentor.com>
1418         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1419         (c_parser_oacc_clause_use_device): New function.
1420         (c_parser_oacc_all_clauses): Add use_device support.
1421         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1422         (c_parser_oacc_host_data): New function.
1423         (c_parser_omp_construct): Add host_data support.
1424         * c-tree.h (c_finish_oacc_host_data): Add prototype.
1425         * c-typeck.c (c_finish_oacc_host_data): New function.
1426         (c_finish_omp_clauses): Add use_device support.
1428 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
1430         PR c/67106
1431         * c-decl.c: Set TYPE_PACKED in variants.
1433 2015-11-27  Martin Liska  <mliska@suse.cz>
1435         PR c++/68312
1436         * c-array-notation.c (fix_builtin_array_notation_fn):
1437         Use release_vec_vec instead of vec::release.
1438         (build_array_notation_expr): Likewise.
1439         (fix_conditional_array_notations_1): Likewise.
1440         (fix_array_notation_expr): Likewise.
1441         (fix_array_notation_call_expr): Likewise.
1443 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
1445         PR c/63326
1446         * c-parser.c (c_parser_compound_statement_nostart): If
1447         last_label is true, use pragma_stmt instead of pragma_compound
1448         as second c_parser_pragma argument.
1449         (c_parser_omp_ordered, c_parser_omp_target_update,
1450         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1451         false as second argument to c_parser_skip_to_pragma_eol after
1452         diagnosing standalone directives used in pragma_stmt context.
1454 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
1456         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1457         with "if (ENABLE_OFFLOADING)".
1459 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
1461         PR objc/68438
1462         * c-parser.c (c_parser_postfix_expression): Set up source ranges
1463         for various Objective-C constructs: Class.name syntax,
1464         @selector(), @protocol(), @encode(), and [] message syntax.
1466 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
1468         PR 62314
1469         * c-typeck.c (should_suggest_deref_p): New function.
1470         (build_component_ref): Special-case POINTER_TYPE when
1471         generating a "not a structure of union"  error message, and
1472         suggest a "->" rather than a ".", providing a fix-it hint.
1474 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
1476         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1477         candidate into a new function, find_closest_identifier.
1479 2015-11-19  Marek Polacek  <polacek@redhat.com>
1481         PR c/68412
1482         * c-typeck.c (parser_build_binary_op): Properly handle
1483         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1485 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
1487         * c-parser.c (set_c_expr_source_range): Bulletproof both
1488         overloaded implementations against NULL expr->value.
1489         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1490         values.
1491         (c_parser_unary_expression): Likewise when handling addresses of
1492         labels.
1493         (c_parser_postfix_expression): Likewise for statement expressions,
1494         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1495         __builtin_va_arg, and for __builtin_offset_of.
1496         (c_parser_postfix_expression_after_paren_type): Initialize expr's
1497         src_range using the range of the braced initializer.
1498         (c_parser_transaction_expression): Set src_range for "ret" to a
1499         sane pair of values.
1501 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
1503         * c-parser.c (c_finish_omp_declare_simd): Look for
1504         "simd" attribute as well. Update error message.
1506 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1508         * c-parser.c (c_parser_omp_declare_target): Adjust.
1510 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
1512         * c-typeck.c (c_finish_omp_clauses): Don't mark
1513         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1515 2015-11-14  Marek Polacek  <polacek@redhat.com>
1517         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1518         * c-typeck.c: Likewise.
1520 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1522         * c-decl.c (warn_defaults_to): Pass line_table to
1523         rich_location ctor.
1524         * c-errors.c (pedwarn_c99): Likewise.
1525         (pedwarn_c90): Likewise.
1526         * c-parser.c (set_c_expr_source_range): New functions.
1527         (c_token::get_range): New method.
1528         (c_token::get_finish): New method.
1529         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1530         based on the range from the start of the LHS to the end of the
1531         RHS.
1532         (c_parser_conditional_expression): Likewise, based on the range
1533         from the start of the cond.value to the end of exp2.value.
1534         (c_parser_binary_expression): Call set_c_expr_source_range on
1535         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1536         (c_parser_cast_expression): Call set_c_expr_source_range on ret
1537         based on the cast_loc through to the end of the expr.
1538         (c_parser_unary_expression): Likewise, based on the
1539         op_loc through to the end of op.
1540         (c_parser_sizeof_expression) Likewise, based on the start of the
1541         sizeof token through to either the closing paren or the end of
1542         expr.
1543         (c_parser_postfix_expression): Likewise, using the token range,
1544         or from the open paren through to the close paren for
1545         parenthesized expressions.
1546         (c_parser_postfix_expression_after_primary): Likewise, for
1547         various kinds of expression.
1548         * c-tree.h (struct c_expr): Add field "src_range".
1549         (c_expr::get_start): New method.
1550         (c_expr::get_finish): New method.
1551         (set_c_expr_source_range): New decls.
1552         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1553         on ret for prefix unary ops.
1554         (parser_build_binary_op): Likewise, running from the start of
1555         arg1.value through to the end of arg2.value.
1557 2015-11-13  Marek Polacek  <polacek@redhat.com>
1559         PR c/68320
1560         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1562 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1564         * c-typeck.c: Include spellcheck.h.
1565         (lookup_field_fuzzy_find_candidates): New function.
1566         (lookup_field_fuzzy): New function.
1567         (build_component_ref): If the field was not found, try using
1568         lookup_field_fuzzy and potentially offer a suggestion.
1570 2015-11-12  James Norris  <jnorris@codesourcery.com>
1571             Joseph Myers  <joseph@codesourcery.com>
1573         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1574         (c_parser_omp_clause_name): Handle 'device_resident' clause.
1575         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1576         and PRAGMA_OMP_CLAUSE_LINK.
1577         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1578         and PRAGMA_OACC_CLAUSE_LINK.
1579         (OACC_DECLARE_CLAUSE_MASK): New definition.
1580         (c_parser_oacc_declare): New function.
1582 2015-11-12  Marek Polacek  <polacek@redhat.com>
1584         PR c/67784
1585         * c-parser.c (c_parser_for_statement): Reclassify the token in
1586         a correct scope.
1588 2015-11-11  Marek Polacek  <polacek@redhat.com>
1590         PR c/68107
1591         PR c++/68266
1592         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
1593         checking the size of an array.
1595 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
1597         * c-array-notation.c: Remove unused header files.
1598         * c-aux-info.c: Likewise.
1599         * c-convert.c: Likewise.
1600         * c-decl.c: Likewise.
1601         * c-errors.c: Likewise.
1602         * c-lang.c: Likewise.
1603         * c-objc-common.c: Likewise.
1604         * c-parser.c: Likewise.
1605         * c-typeck.c: Likewise.
1606         * gccspec.c: Likewise.
1608 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
1609             Cesar Philippidis  <cesar@codesourcery.com>
1610             James Norris  <jnorris@codesourcery.com>
1611             Julian Brown  <julian@codesourcery.com>
1612             Nathan Sidwell  <nathan@codesourcery.com>
1614         c/
1615         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1616         routine arg.
1617         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1618         (c_parser_pragma): Parse 'acc routine'.
1619         (OACC_ROUTINE_CLAUSE_MARK): Define.
1620         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1622 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1624         PR debug/67192
1625         * c-typeck.c (c_finish_loop): For unconditional loops, set the
1626         location of the backward-goto to the start of the loop body.
1628 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1630         PR debug/67192
1631         * c-parser.c (c_parser_while_statement): Finish the loop before
1632         parsing ahead for misleading indentation.
1633         (c_parser_for_statement): Likewise.
1635 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1637         * c-decl.c (finish_struct): If the structure has reverse storage
1638         order, rewrite the type of array fields with scalar component.  Call
1639         maybe_apply_pragma_scalar_storage_order on entry.
1640         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
1641         errors on bit-fields and reverse SSO here and not...
1642         (c_mark_addressable): ...here.
1643         (output_init_element): Adjust call to initializer_constant_valid_p.
1644         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1646 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
1648         * c-decl.c (warn_defaults_to): Update for change in signature
1649         of diagnostic_set_info.
1650         * c-errors.c (pedwarn_c99): Likewise.
1651         (pedwarn_c90): Likewise.
1652         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1653         for textinfo::set_location.
1655 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
1656             Thomas Schwinge  <thomas@codesourcery.com>
1657             James Norris  <jnorris@codesourcery.com>
1659         * c-parser.c (c_parser_omp_clause_name): Add support for
1660         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1661         (c_parser_omp_clause_default): Add is_oacc argument. Handle
1662         default(none) in OpenACC.
1663         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1664         arguments.
1665         (c_parser_oacc_clause_tile): New function.
1666         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1667         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1668         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1669         TILE}.
1670         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1671         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1672         FIRSTPRIVATE}.
1673         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1674         (c_parser_oacc_update): Update the error message for missing clauses.
1675         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1676         and OMP_CLAUSE_INDEPENDENT.
1678 2015-11-05  Marek Polacek  <polacek@redhat.com>
1680         PR c/68090
1681         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1682         deal with pre-evaluation on invalid types.
1684 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
1685             Ilya Verbin  <ilya.verbin@intel.com>
1687         * c-parser.c: Include context.h and gimple-expr.h.
1688         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1689         monotonic together with nonmonotonic.
1690         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
1691         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1692         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1693         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1694         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
1695         expressions on combined target teams before the target.
1696         (c_parser_omp_declare_target): If decl has "omp declare target" or
1697         "omp declare target link" attribute, and cgraph or varpool node already
1698         exists, then set corresponding flags.  Call c_finish_omp_clauses
1699         in the parenthesized extended-list syntax case.
1700         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1701         declare target.
1702         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1703         on OMP_CLAUSE_REDUCTION array sections.
1704         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1705         into the constant offset, or for variable low-bound using
1706         POINTER_PLUS_EXPR.  For structure element based array sections use
1707         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1708         (c_finish_omp_clauses): Drop generic_field_head, structure
1709         elements are now always mapped even as array section bases,
1710         diagnose same var in data sharing and mapping clauses.  Diagnose if
1711         linear step on declare simd is neither a constant nor a uniform
1712         parameter.  Look through POINTER_PLUS_EXPR for array section
1713         reductions.  Diagnose the same var or function appearing multiple
1714         times on the same directive.  Fix up wording for the to clause if t
1715         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
1716         modifier on kinds other than dynamic or guided or nonmonotonic
1717         modifier together with ordered clause.
1719 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
1720             Chung-Lin Tang  <cltang@codesourcery.com>
1722         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1724 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
1726         * c-array-notation.c: Reorder #include's and remove duplicates.
1727         * c-aux-info.c: Likewise.
1728         * c-convert.c: Likewise.
1729         * c-decl.c: Likewise.
1730         * c-errors.c: Likewise.
1731         * c-lang.c: Likewise.
1732         * c-objc-common.c: Likewise.
1733         * c-parser.c: Likewise.
1734         * c-typeck.c: Likewise.
1736 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
1738         PR debug/66068
1739         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1740         after calling build_qualified_type.
1742 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
1743             Thomas Schwinge  <thomas@codesourcery.com>
1744             James Norris  <jnorris@codesourcery.com>
1745             Joseph Myers  <joseph@codesourcery.com>
1746             Julian Brown  <julian@codesourcery.com>
1747             Bernd Schmidt  <bschmidt@redhat.com>
1749         * c-parser.c (c_parser_oacc_shape_clause): New.
1750         (c_parser_oacc_simple_clause): New.
1751         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1752         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1754 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
1755             James Norris  <jnorris@codesourcery.com>
1756             Cesar Philippidis  <cesar@codesourcery.com>
1758         PR c/64765
1759         PR c/64880
1760         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1761         parameters, and handle these.  Adjust all users.
1762         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1763         into...
1764         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
1765         all users.
1766         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1767         declare functions.
1768         (c_finish_omp_construct): Declare function.
1769         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1770         Merge functions into...
1771         (c_finish_omp_construct): ... this new function.
1773 2015-10-22  Richard Biener  <rguenther@suse.de>
1775         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1776         before folding a MINUS_EXPR.
1778 2015-10-21  Marek Polacek  <polacek@redhat.com>
1780         PR c/68024
1781         * c-decl.c (start_function): Warn about vararg functions without
1782         a prototype.
1784 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
1786         * c-typeck.c (build_conditional_expr): Use boolean vector
1787         type for vector comparison.
1788         (build_vec_cmp): New.
1789         (build_binary_op): Use build_vec_cmp for comparison.
1791 2015-10-20  Marek Polacek  <polacek@redhat.com>
1793         * c-parser.c (is_cilkplus_vector_p): Don't define here.
1795 2015-10-20  Marek Polacek  <polacek@redhat.com>
1797         PR c/67964
1798         * c-parser.c (c_parser_attributes): Break out of the loop if the
1799         token after an attribute isn't a comma.
1801 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
1802             Aldy Hernandez  <aldyh@redhat.com>
1804         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1805         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1806         (c_parser_omp_variable_list): Handle structure elements for
1807         map, to and from clauses.  Handle array sections in reduction
1808         clause.  Formatting fixes.
1809         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1810         if clause modifiers.
1811         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1812         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1813         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1814         c_parser_omp_clause_is_device_ptr): New functions.
1815         (c_parser_omp_clause_ordered): Parse optional parameter.
1816         (c_parser_omp_clause_reduction): Handle array reductions.
1817         (c_parser_omp_clause_schedule): Parse optional simd modifier.
1818         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1819         functions.
1820         (c_parser_omp_clause_linear): Parse linear clause modifiers.
1821         (c_parser_omp_clause_depend_sink): New function.
1822         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1823         (c_parser_omp_clause_map): Parse release/delete map kinds and
1824         optional always modifier.
1825         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1826         and c_finish_omp_clauses callers.
1827         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
1828         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1829         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1830         (OMP_CRITICAL_CLAUSE_MASK): Define.
1831         (c_parser_omp_critical): Parse critical clauses.
1832         (c_parser_omp_for_loop): Handle doacross loops, adjust
1833         c_finish_omp_for and c_finish_omp_clauses callers.
1834         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1835         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1836         (OMP_FOR_CLAUSE_MASK): Add linear clause.
1837         (c_parser_omp_for): Disallow ordered clause when combined with
1838         distribute.  Disallow linear clause when combined with distribute
1839         and not combined with simd.
1840         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1841         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1842         parse clauses and if depend clause is found, don't parse a body.
1843         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1844         Allow target parallel without for after it.
1845         (OMP_TASK_CLAUSE_MASK): Add priority clause.
1846         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1847         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1848         invalid kinds.
1849         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1850         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1851         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1852         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1853         functions.
1854         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1855         defaultmap and is_device_ptr clauses.
1856         (c_parser_omp_target): Parse target parallel and target simd.  Set
1857         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
1858         and target exit data.  Diagnose invalid map kinds.
1859         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1860         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1861         construct.
1862         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1863         &omp_priv.
1864         (OMP_TASKLOOP_CLAUSE_MASK): Define.
1865         (c_parser_omp_taskloop): New function.
1866         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1867         handle PRAGMA_OMP_TASKLOOP.
1868         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1869         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1870         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1871         Add IS_OMP argument, handle structure element bases, diagnose
1872         bitfields, pass IS_OMP recursively, diagnose known zero length
1873         array sections in depend clauses, handle array sections in reduction
1874         clause, diagnose negative length even for pointers.
1875         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1876         types, pass IS_OMP down to handle_omp_array_sections_1, handle
1877         array sections in reduction clause, set
1878         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1879         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1880         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1881         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1883 2015-10-06  Marek Polacek  <polacek@redhat.com>
1885         * c-parser.c (c_parser_statement_after_labels): Use
1886         protected_set_expr_location.
1887         (c_parser_omp_clause_num_gangs): Likewise.
1888         (c_parser_omp_clause_num_threads): Likewise.
1889         (c_parser_omp_clause_num_workers): Likewise.
1890         (c_parser_omp_clause_vector_length): Likewise.
1891         (c_parser_omp_clause_num_teams): Likewise.
1892         (c_parser_omp_clause_thread_limit): Likewise.
1893         * c-typeck.c (build_c_cast): Likewise.
1894         (c_cast_expr): Likewise.
1896 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
1898         * c-typeck.c (c_tree_equal): Use real_equal instead of
1899         REAL_VALUES_EQUAL.
1901 2015-10-04  Jason Merrill  <jason@redhat.com>
1903         * c-parser.c (c_lex_one_token): Handle @synchronized.
1904         * c-decl.c (match_builtin_function_types): A declaration of a built-in
1905         can change whether the function is transaction_safe.
1907 2015-10-02  Marek Polacek  <polacek@redhat.com>
1909         PR c/67730
1910         * c-typeck.c (convert_for_assignment): Use the expansion point
1911         location throughout.
1913 2015-10-02  Marek Polacek  <polacek@redhat.com>
1915         PR c/64249
1916         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1917         and pass it down to c_parser_if_statement.
1918         (c_parser_else_body): Add CHAIN parameter and pass it down to
1919         c_parser_statement_after_labels.
1920         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
1921         duplicated if-else-if conditions.
1923 2015-10-01  Marek Polacek  <polacek@redhat.com>
1925         * c-typeck.c (convert_for_assignment): Improve commentary.
1927 2015-09-30  Marek Polacek  <polacek@redhat.com>
1929         PR c/67730
1930         * c-typeck.c (c_finish_return): Use the expansion point location for
1931         certain "return with value" warnings.
1933 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1935         * c-parser.c (pragma_lex): Add loc argument.
1937 2015-09-15  Marek Polacek  <polacek@redhat.com>
1939         PR c/67580
1940         * c-decl.c (tag_exists_p): New function.
1941         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1942         struct/union/enum keywords are missing.
1943         * c-tree.h (tag_exists_p): Declare.
1945 2015-09-15  Marek Polacek  <polacek@redhat.com>
1947         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1948         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1949         Return NULL_TREE instead of 0.
1950         (lookup_name): Return NULL_TREE instead of 0.
1951         (lookup_name_in_scope): Likewise.
1952         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1953         (parser_xref_tag): Use false instead of 0.
1954         (start_struct): Use true instead of 1.
1955         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1957 2015-09-14  Marek Polacek  <polacek@redhat.com>
1959         * c-typeck.c (set_nonincremental_init_from_string): Use
1960         HOST_WIDE_INT_M1U when shifting a negative value.
1962 2015-09-09  Mark Wielaard  <mjw@redhat.com>
1964         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1965         parm against NULL.
1967 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
1969         PR c/67502
1970         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1971         into OMP_FOR_PRE_BODY rather than before the loop.
1973 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
1975         PR c/67501
1976         * c-parser.c (c_parser_oacc_all_clauses,
1977         c_parser_omp_all_clauses): Remove invalid clause from
1978         list of clauses even if parser->error is set.
1980         PR c/67500
1981         * c-parser.c (c_parser_omp_clause_aligned,
1982         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1983         test for errors.
1984         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1985         error_mark_node.
1987         PR c/67495
1988         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1989         instead of c_parser_unary_expression.  If the result is !lvalue_p,
1990         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1992 2015-09-04  Marek Polacek  <polacek@redhat.com>
1994         PR sanitizer/67279
1995         * c-typeck.c (build_binary_op): Don't instrument static initializers.
1997 2015-09-03  Martin Sebor  <msebor@redhat.com>
1999         PR c/66516
2000         * c-typeck.c (convert_arguments, parser_build_unary_op,
2001         build_conditional_expr, c_cast_expr, convert_for_assignment,
2002         build_binary_op, _objc_common_truthvalue_conversion): Call
2003         reject_gcc_builtin.
2004         (c_decl_implicit): Define.
2006 2015-09-02  Marek Polacek  <polacek@redhat.com>
2008         PR c/67432
2009         * c-parser.c (c_parser_enum_specifier): Give a better error for
2010         an empty enum.
2012 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
2014         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2016 2015-08-12  Marek Polacek  <polacek@redhat.com>
2018         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2019         LOC to it.
2021 2015-08-03  Marek Polacek  <polacek@redhat.com>
2023         PR c/67088
2024         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2025         Use it.
2026         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2028 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
2030         * c-parser.c (c_parser_if_body): Take token_indent_info
2031         argument. Call warn_for_misleading_indentation even when the
2032         body is a semicolon.  Extract token_indent_infos corresponding
2033         to the guard, body and next tokens.  Adjust call to
2034         warn_for_misleading_indentation accordingly.
2035         (c_parser_else_body): Likewise.
2036         (c_parser_if_statement): Likewise.
2037         (c_parser_while_statement): Likewise.
2038         (c_parser_for_statement): Likewise.
2040 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
2041             Manuel López-Ibáñez  <manu@gcc.gnu.org>
2043         * c-decl.c (get_parm_info): Remove static var. Update warning
2044         message.
2046 2015-07-27  Marek Polacek  <polacek@redhat.com>
2048         PR c++/66555
2049         PR c/54979
2050         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2052 2015-07-20  Marek Polacek  <polacek@redhat.com>
2054         PR c++/55095
2055         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2056         (build_binary_op): Warn about left shift overflows.
2058 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
2060         * c-array-notation.c: Adjust includes for flags.h changes.
2061         * c-objc-common.c: Likewise.
2063 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
2065         * c-array-notation.c: Adjust includes.
2066         * c-aux-info.c: Likewise.
2067         * c-convert.c: Likewise.
2068         * c-decl.c: Likewise.
2069         * c-errors.c: Likewise.
2070         * c-lang.c: Likewise.
2071         * c-objc-common.c: Likewise.
2072         * c-parser.c: Likewise.
2073         * c-typeck.c: Likewise.
2075 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2077         PR fortran/66605
2078         * c-decl.c (finish_function): Call do_warn_unused_parameter.
2080 2015-06-29  Marek Polacek  <polacek@redhat.com>
2082         PR c/66322
2083         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2084         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
2085         about -Wswitch-bool here.
2086         (do_case): Update c_add_case_label call.
2087         (c_finish_case): Update c_do_switch_warnings call.
2089 2015-06-27  Marek Polacek  <polacek@redhat.com>
2091         * c-typeck.c: Use VECTOR_TYPE_P throughout.
2093 2015-06-26  Marek Polacek  <polacek@redhat.com>
2095         * c-array-notation.c (fix_builtin_array_notation_fn): Use
2096         INDIRECT_REF_P.
2097         * c-typeck.c (array_to_pointer_conversion): Likewise.
2098         (build_unary_op): Likewise.
2099         (c_finish_return): Likewise.
2101 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
2103         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2104         * c-parser.c: Likewise.
2106 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
2108         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2109         instead of pointer_hash.
2110         (detect_field_duplicates): Likewise.
2112 2015-06-25  Marek Polacek  <polacek@redhat.com>
2114         * c-array-notation.c: Use VAR_P throughout.
2115         * c-decl.c: Likewise.
2116         * c-objc-common.c: Likewise.
2117         * c-parser.c: Likewise.
2118         * c-typeck.c: Likewise.
2120 2015-06-25  Marek Polacek  <polacek@redhat.com>
2122         * c-decl.c: Use is_global_var throughout.
2123         * c-parser.c: Likewise.
2124         * c-typeck.c: Likewise.
2126 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
2128         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2129         * c-aux-info.c: Likewise.
2130         * c-convert.c: Likewise.
2131         * c-decl.c: Likewise.
2132         * c-errors.c: Likewise.
2133         * c-lang.c: Likewise.
2134         * c-objc-common.c: Likewise.
2135         * c-parser.c: Likewise.
2136         * c-typeck.c: Likewise.
2138 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
2140         PR middle-end/66325
2141         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2142         variants.
2144 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
2146         * c-decl.c (pop_scope): Register the main translation unit
2147         through the new debug hook.
2149 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
2151         * c-array-notation.c : Adjust include files.
2152         * c-aux-info.c : Likewise.
2153         * c-convert.c : Likewise.
2154         * c-decl.c : Likewise.
2155         * c-errors.c : Likewise.
2156         * c-lang.c : Likewise.
2157         * c-lang.h : Likewise.
2158         * c-objc-common.c : Likewise.
2159         * c-parser.c : Likewise.
2160         * c-typeck.c : Likewise.
2162 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
2164         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2165         immediately clobber it.
2166         (c_write_global_declarations_1): Remove call to
2167         check_global_declaration_1.
2168         (c_write_global_declarations_2): Remove.
2169         (c_write_final_cleanups): Rename from c_write_global_declarations.
2170         Remove call to finalize_compilation_unit.
2171         Remove calls to debugging hooks.
2172         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2173         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2174         * c-tree.h: Remove c_write_global_declarations.
2176 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
2178         * c-array-notation.c: Adjust includes for restructured coretypes.h.
2179         * c-aux-info.c: Likewise.
2180         * c-convert.c: Likewise.
2181         * c-decl.c: Likewise.
2182         * c-errors.c: Likewise.
2183         * c-lang.c: Likewise.
2184         * c-objc-common.c: Likewise.
2185         * c-parser.c: Likewise.
2186         * c-typeck.c: Likewise.
2188 2015-06-04  Marek Polacek  <polacek@redhat.com>
2190         PR c/66341
2191         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2192         it is a lvalue.
2194 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2196         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2197         Warn for empty struct.
2198         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2200 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
2202         * c-decl.c (start_function): Call plugin before parsing.
2203         (finish_function): Call plugin after parsing.
2205 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2207         PR c/49551
2208         * c-decl.c (merge_decls): Merge DECL_COMMON.
2210 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
2212         * Make-lang.in (check_gcc_pallelize): Define.
2214 2015-05-22  Marek Polacek  <polacek@redhat.com>
2216         PR c/47043
2217         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2218         attributes.
2220 2015-05-21  Marek Polacek  <polacek@redhat.com>
2222         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2223         DECL_BUILT_IN.
2225 2015-05-20  Marek Polacek  <polacek@redhat.com>
2227         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2228         * c-typeck.c: Likewise.
2230 2015-05-19  Marek Polacek  <polacek@redhat.com>
2232         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2234 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
2236         PR middle-end/66199
2237         * c-parser.c (c_parser_omp_for_loop): Don't add
2238         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2239         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2240         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2241         constructs.
2243 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
2245         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
2246         swaps.
2248 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2250         PR fortran/44054
2251         * c-objc-common.c (c_tree_printer): Replace locus pointer with
2252         accessor function.
2254 2015-05-14  Marek Polacek  <polacek@redhat.com>
2256         PR c/66066
2257         PR c/66127
2258         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2259         rather than with 0.
2261 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
2263         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2264         to add a call to warn_for_misleading_indentation.
2265         (c_parser_else_body): Likewise, adding param "else_loc".
2266         (c_parser_if_statement): Check for misleading indentation.
2267         (c_parser_while_statement): Likewise.
2268         (c_parser_for_statement): Likewise.
2270 2015-05-08  Marek Polacek  <polacek@redhat.com>
2272         PR c/64918
2273         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2274         (output_init_element): Likewise.
2276 2015-05-07  Marek Polacek  <polacek@redhat.com>
2278         PR c/65179
2279         * c-typeck.c (build_binary_op): Warn when left shifting a negative
2280         value.
2282 2015-04-30  Marek Polacek  <polacek@redhat.com>
2284         * c-typeck.c (set_init_label): Call error_at instead of error and
2285         pass LOC to it.
2287         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
2288         the type of a decl.
2290         * c-typeck.c (c_build_va_arg): Clarify the error message.
2292 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2294         * c-parser.c (c_parser_oacc_enter_exit_data): Use
2295         OMP_STANDALONE_CLAUSES.
2297 2015-04-28  Marek Polacek  <polacek@redhat.com>
2299         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2301 2015-04-28  Marek Polacek  <polacek@redhat.com>
2303         PR c/65901
2304         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2306 2015-04-25  Marek Polacek  <polacek@redhat.com>
2308         PR c/52085
2309         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
2310         attribute.
2312 2015-04-23  Marek Polacek  <polacek@redhat.com>
2314         PR c/65345
2315         * c-decl.c (set_labels_context_r): New function.
2316         (store_parm_decls): Call it via walk_tree_without_duplicates.
2317         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2318         instead of create_tmp_var.  Build TARGET_EXPR instead of
2319         COMPOUND_EXPR.
2320         (build_atomic_assign): Use create_tmp_var_raw instead of
2321         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
2323 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2325         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2326         (c_parser_omp_target_update): Add missed %> to error_at ().
2328 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
2330         PR target/55143
2331         * c-decl.c (c_default_pointer_mode): Remove definition.
2332         * c-tree.h (c_default_pointer_mode): Remove declaration.
2334 2015-03-27  Tobias Burnus  <burnus@net-b.de>
2336         PR c/65586
2337         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2338         error out.
2339         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2340         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2341         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2343 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
2345         * c-decl.c (c_decl_attributes): Also add "omp declare target"
2346         attribute for DECL_EXTERNAL VAR_DECLs.
2348 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
2350         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2351         argument.
2353 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2355         PR c/65120
2356         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2357         before preparing arguments to warn_logical_not_parentheses.
2359 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
2361         PR c/65120
2362         * c-typeck.c (parser_build_binary_op): Don't warn for
2363         !!x == y or !b == y where b is _Bool.
2365 2015-03-09  Marek Polacek  <polacek@redhat.com>
2367         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2368         * c-decl.c (grokdeclarator): Likewise.
2369         * c-typeck.c (build_binary_op): Likewise.
2371 2015-02-27  Marek Polacek  <polacek@redhat.com>
2373         PR c/65228
2374         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2376 2015-02-14  Marek Polacek  <polacek@redhat.com>
2378         PR c/64768
2379         * c-decl.c (grokdeclarator): Set the range of a flexible array member
2380         declared through a typedef name.
2382 2015-02-13  Marek Polacek  <polacek@redhat.com>
2384         PR c/65050
2385         * c-decl.c (grokdeclarator): Print also the type when giving
2386         the error message about array's incomplete element type.
2388 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
2390         PR c/64824
2391         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2392         check in the POP macro.
2394 2015-02-09  Marek Polacek  <polacek@redhat.com>
2396         PR c/64856
2397         * c-typeck.c (process_init_element): Don't always wrap
2398         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2399         initializing a range of elements.
2401 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2403         PR c/64824
2404         PR c/64868
2405         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2407 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
2409         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2410         processing enum declaration.
2412 2015-01-29  Marek Polacek  <polacek@redhat.com>
2414         PR c/64709
2415         * c-typeck.c (pop_init_level): If constructor_elements has
2416         exactly one element with integer_zerop value, set constructor_zeroinit
2417         to 1.  Remove braces around warning_init call.
2419 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
2421         PR c/64766
2422         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2423         of FUNCTION_DECLs with error_mark_node.
2425 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
2427         PR c/64778
2428         * c-typeck.c (convert_arguments): Return -1 if there are
2429         error_args, even if we've diagnosed too many arguments.
2431 2015-01-21  Richard Biener  <rguenther@suse.de>
2433         PR middle-end/64313
2434         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2435         for builtins the user declared correctly.
2437 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2438             Bernd Schmidt  <bernds@codesourcery.com>
2439             Cesar Philippidis  <cesar@codesourcery.com>
2440             James Norris  <jnorris@codesourcery.com>
2441             Jakub Jelinek  <jakub@redhat.com>
2442             Ilmir Usmanov  <i.usmanov@samsung.com>
2444         * c-parser.c: Include "gomp-constants.h".
2445         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2446         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2447         Use OMP_CLAUSE_SET_MAP_KIND.
2448         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2449         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2450         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2451         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2452         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2453         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2454         "copyout", "create", "delete", "deviceptr", "gang", "host",
2455         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2456         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2457         "present_or_create", "pcreate", "seq", "self", "vector",
2458         "vector_length", "wait", "worker".
2459         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2460         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2461         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2462         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2463         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2464         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2465         (c_parser_oacc_data_clause_deviceptr)
2466         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2467         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2468         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2469         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2470         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2471         (c_parser_oacc_parallel, c_parser_oacc_update)
2472         (c_parser_oacc_wait): New functions.
2473         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2474         (c_finish_oacc_data): New prototypes.
2475         * c-typeck.c: Include "gomp-constants.h".
2476         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2477         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2478         OMP_CLAUSE_SET_MAP_KIND.
2479         (c_finish_oacc_parallel, c_finish_oacc_kernels)
2480         (c_finish_oacc_data): New functions.
2481         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2482         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2483         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2484         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2485         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2486         GOMP_MAP_FORCE_DEVICEPTR.
2488 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2490         * c-array-notation.c: Include hash-set.h, machmode.h,
2491         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2492         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2493         * c-aux-info.c: Ditto.
2494         * c-convert.c: Ditto.
2495         * c-decl.c: Ditto.
2496         * c-errors.c: Ditto.
2497         * c-lang.c: Dittoxs.
2498         * c-objc-common.c: Ditto.
2499         * c-parser.c: Ditto.
2500         * c-typeck.c: Include hash-set.h, machmode.h,
2501         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2502         fold-const.h, wide-int.h, inchash.h, real.h and
2503         fixed-value.h due to flattening of tree.h.
2505 2015-01-07  Marek Polacek  <polacek@redhat.com>
2507         PR c/64417
2508         * c-typeck.c (process_init_element): Disallow initialization of
2509         a flexible array member with a string constant if the structure
2510         is in an array.
2512 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2514         PR sanitizer/64344
2515         * c-typeck.c (convert_for_assignment, c_finish_return): For
2516         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2517         types also set in_late_binary_op around convert call.
2518         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2519         to integral type casts, if not in_late_binary_op, pass c_fully_fold
2520         result on expr as last argument to ubsan_instrument_float_cast,
2521         if in_late_binary_op, don't use c_save_expr but save_expr.
2523         Update copyright years.
2525 2015-01-05  Marek Polacek  <polacek@redhat.com>
2527         PR c/64423
2528         * c-typeck.c (build_array_ref): Pass loc down to
2529         warn_array_subscript_with_type_char.
2531 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
2533         * c-typeck.c: New behavious for pointers to arrays with qualifiers
2534         (common-pointer-type): For pointers to arrays take qualifiers from
2535         element type.
2536         (build_conditional_expr): Add warnings for lost qualifiers.
2537         (comp-target-types): Allow pointers to arrays with different qualifiers.
2538         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2539         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2540         to PEDWARN_FOR_QUALIFIERS.
2542 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
2544         PR sanitizer/64289
2545         * c-convert.c: Include ubsan.h.
2546         (convert): For real -> integral casts and
2547         -fsanitize=float-cast-overflow don't call convert_to_integer, but
2548         instead instrument the float cast directly.
2550 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
2552         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2553         c_finish_stmt_expr): Remove NULL last argument from
2554         create_tmp_var_raw and create_tmp_var calls.
2555         * c-array-notation.c (fix_builtin_array_notation_fn,
2556         build_array_notation_expr, fix_conditional_array_notations_1,
2557         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2559 2014-11-28  Marek Polacek  <polacek@redhat.com>
2561         PR c/63862
2562         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2563         convert the right operand to integer type.
2565 2014-11-25  Marek Polacek  <polacek@redhat.com>
2567         PR c/63877
2568         * c-decl.c (start_function): Disable -Wmissing-declarations warning
2569         for inline functions.
2571 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
2573         PR target/63764
2574         * c-typeck.c (build_array_ref): Adjust
2575         convert_vector_to_pointer_for_subscript caller.  If it returns true,
2576         call non_lvalue_loc on the result.
2578 2014-11-11  Richard Biener  <rguenther@suse.de>
2580         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2581         to true.
2583 2014-11-10  Andi Kleen  <ak@linux.intel.com>
2585         PR c/60804
2586         * c-parser.c (c_parser_statement_after_labels): Call
2587         check_no_cilk.
2588         (c_parser_if_statement): Dito.
2589         (c_parser_switch_statement): Dito.
2590         (c_parser_while_statement): Dito.
2591         (c_parser_do_statement): Dito.
2592         (c_parser_for_statement): Dito.
2593         * c-typeck.c (c_finish_loop): Dito.
2595 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
2597         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2598         OPT_Wshift_count_overflow in the warnings.
2600 2014-10-30  Marek Polacek  <polacek@redhat.com>
2602         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2603         print the stripped version as well, if they're not the same.
2605 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
2607         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2608         machine_mode.
2610 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
2612         * c-decl.c: Adjust include files.
2613         * c-parser.c: Ditto.
2615 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
2616             Tom Tromey  <tromey@redhat.com>
2618         * c-tree.h (enum c_oracle_request): New.
2619         (c_binding_oracle_function): New typedef.
2620         (c_binding_oracle, c_pushtag, c_bind): Declare.
2621         * c-decl.c (c_binding_oracle): New global.
2622         (I_SYMBOL_CHECKED): New macro.
2623         (i_symbol_binding): New function.
2624         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2625         (I_TAG_CHECKED): New macro.
2626         (i_tag_binding): New function.
2627         (I_TAG_BINDING, I_TAG_DECL): Redefine.
2628         (I_LABEL_CHECKED): New macro.
2629         (i_label_binding): New function.
2630         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2631         (c_print_identifier): Save and restore c_binding_oracle.
2632         (c_pushtag, c_bind): New functions.
2634 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
2636         * c-typeck.c: Adjust include files.
2638 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2640         PR c++/53061
2641         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2642         initialization here...
2643         (c_initialize_diagnostics): ... but here. Set defaults after
2644         building pretty-printer.
2646 2014-10-23  Marek Polacek  <polacek@redhat.com>
2648         PR c/63626
2649         * c-decl.c (pop_scope): Don't print warning in external_scope.
2651 2014-10-19  Marek Polacek  <polacek@redhat.com>
2653         PR c/63567
2654         * c-typeck.c (output_init_element): Allow initializing objects with
2655         static storage duration with compound literals even in C99 and add
2656         pedwarn for it.
2658 2014-10-17  Marek Polacek  <polacek@redhat.com>
2660         PR c/63567
2661         * c-typeck.c (digest_init): Allow initializing objects with static
2662         storage duration with compound literals even in C99 and add pedwarn
2663         for it.
2665 2014-10-17  Marek Polacek  <polacek@redhat.com>
2667         PR c/63543
2668         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2669         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2670         error multiple times.  Print the type.
2672 2014-10-17  Marek Polacek  <polacek@redhat.com>
2674         PR c/63549
2675         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2676         type.
2678 2014-10-17  Marek Polacek  <polacek@redhat.com>
2680         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2681         (start_function): Use OPT_Wimplicit_int instead of 0.
2682         (store_parm_decls_oldstyle): Likewise.
2684 2014-10-17  Alan Modra  <amodra@gmail.com>
2686         PR middle-end/61848
2687         * c-decl.c (merge_decls): Don't merge section name or tls model
2688         to newdecl symtab node, instead merge to olddecl.  Override
2689         existing olddecl section name.  Set tls_model for all thread-local
2690         vars, not just OMP thread-private ones.  Remove incorrect comment.
2692 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
2694         * c-decl.c: Adjust include files.
2696 2014-10-14  DJ Delorie  <dj@redhat.com>
2698         * c-parser.c (c_parse_init): Add RID entries for each __intN.
2699         (c_token_starts_typename): Check all __intN, not just __int128.
2700         (c_token_starts_declspecs): Likewise.
2701         (c_parser_declspecs): Likewise.
2702         (c_parser_attribute_any_word): Likewise.
2703         (c_parser_objc_selector): Likewise.
2704         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2705         (struct c_declspecs): Add int_n_idx field to record *which* __intN
2706         is specified.
2707         * c-decl.c (declspecs_add_type): Check for all __intN, not just
2708         __int128.
2709         (finish_declspecs): Likewise.
2711 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
2713         * c-parser.c (c_parser_all_labels): New function to replace
2714         the duplicate code.
2715         (c_parser_statement): Call the new function.
2717 2014-10-09  Marek Polacek  <polacek@redhat.com>
2719         PR c/63480
2720         * c-typeck.c (pop_init_level): Don't warn about initializing
2721         with { }.
2723 2014-10-07  Marek Polacek  <polacek@redhat.com>
2725         PR c/59717
2726         * c-decl.c (header_for_builtin_fn): New function.
2727         (implicitly_declare): Suggest which header to include.
2729 2014-10-07  Marek Polacek  <polacek@redhat.com>
2731         * c-convert.c (convert): Use error_operand_p.
2732         * c-typeck.c (require_complete_type): Likewise.
2733         (really_atomic_lvalue): Likewise.
2734         (digest_init): Likewise.
2735         (handle_omp_array_sections_1): Likewise.
2737 2014-10-03  Marek Polacek  <polacek@redhat.com>
2739         PR c/63453
2740         * c-decl.c (pop_scope): Don't warn about "inline function declared
2741         but never defined" for functions marked with gnu_inline attribute.
2743 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
2745         PR c++/63249
2746         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2747         on low_bound and length.
2749 2014-09-24  Marek Polacek  <polacek@redhat.com>
2751         PR c/61405
2752         PR c/53874
2753         * c-parser.c: Don't define CPP_KEYWORD.
2754         (c_parser_switch_statement): Pass original type to c_finish_case.
2755         * c-tree.h (c_finish_case): Update declaration.
2756         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
2757         conditionally to c_do_switch_warnings.
2759 2014-09-03  Marek Polacek  <polacek@redhat.com>
2761         PR c/62024
2762         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2763         conversions.
2765 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
2766             Balaji V. Iyer  <balaji.v.iyer@intel.com>
2767             Igor Zamyatin  <igor.zamyatin@intel.com>
2769         * c-parser.c (c_parser_cilk_for): New function.
2770         (c_parser_cilk_grainsize): Likewise.
2771         (c_get_temp_regvar): Likewise.
2772         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2773         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2774         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2775         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2776         case.
2778 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
2780         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2781         with using HOST_WIDE_INT without truncation to 'int'
2783 2014-08-22  Marek Polacek  <polacek@redhat.com>
2785         PR c++/62199
2786         * c-typeck.c (parser_build_binary_op): Adjust call to
2787         warn_logical_not_parentheses.
2789 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
2791         PR other/62008
2792         * c-parser.c (c_parser_array_notation): Check for correct
2793         type of an array added.
2795 2014-08-19  Marek Polacek  <polacek@redhat.com>
2797         PR c++/62153
2798         * c-typeck.c (build_binary_op): If either operand of a comparison
2799         is a boolean expression, call maybe_warn_bool_compare.
2801 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
2803         PR c/45584
2804         * c-typeck.c (build_c_cast): Do a conversion even when the
2805         TYPE_MAIN_VARIANTs are the same.
2807 2014-08-19  Marek Polacek  <polacek@redhat.com>
2809         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2810         pedwarn_c99 instead of pedwarn.
2811         (grokfield): Likewise.
2812         (warn_defaults_to): New function.
2813         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2814         Unconditionally call pedwarn_c99 instead of pedwarn.
2815         (start_function): Call warn_defaults_to instead of pedwarn_c99.
2816         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2817         check flag_isoc11 before.
2818         * c-errors.c (pedwarn_c99): Change the return type to bool.
2819         Handle -Wc99-c11-compat.
2820         * c-parser.c (disable_extension_diagnostics): Handle
2821         warn_c99_c11_compat.
2822         (restore_extension_diagnostics): Likewise.
2823         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2824         instead of pedwarn, don't check flag_isoc11 before.
2825         (c_parser_declspecs): Likewise.
2826         (c_parser_alignas_specifier): Likewise.
2827         (c_parser_alignof_expression): Likewise.
2828         (c_parser_generic_selection): Likewise.
2829         * c-tree.h (pedwarn_c99): Update declaration.
2830         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2831         of pedwarn_c99.
2833 2014-08-19  Marek Polacek  <polacek@redhat.com>
2835         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2836         to pedwarn_c90.
2837         * c-errors.c: Include "opts.h".
2838         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2839         * c-parser.c (disable_extension_diagnostics): Handle negative value
2840         of warn_c90_c99_compat, too.
2841         (restore_extension_diagnostics): Likewise.
2842         (c_parser_compound_statement_nostart): Pass
2843         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2845 2014-08-12  Marek Polacek  <polacek@redhat.com>
2847         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2848         Add pedwarn.
2849         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2850         Likewise.
2851         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2853 2014-08-10  Marek Polacek  <polacek@redhat.com>
2855         PR c/51849
2856         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2857         Call pedwarn_c90 instead of pedwarn.
2858         (check_bitfield_type_and_width): Likewise.
2859         (declspecs_add_qual): Likewise.
2860         (declspecs_add_type): Likewise.
2861         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2862         Adjust to only call pedwarn_c90.
2863         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
2864         pedwarn_c90 instead of pedwarn.
2865         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2866         * c-parser.c (disable_extension_diagnostics): Handle
2867         warn_c90_c99_compat.
2868         (restore_extension_diagnostics): Likewise.
2869         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
2870         pedwarn_c90 instead of pedwarn.
2871         (c_parser_initelt): Likewise.
2872         (c_parser_postfix_expression): Likewise.
2873         (c_parser_postfix_expression_after_paren_type): Likewise.
2874         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2875         * c-tree.h: Fix formatting.
2876         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
2877         pedwarn_c90 instead of pedwarn.
2879 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
2881         * c-typeck.c: Remove include of pointer-set.h.
2883 2014-08-07  Marek Polacek  <polacek@redhat.com>
2885         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2887 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
2889         * c-typeck.c: Use hash_map instead of pointer_map.
2891 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
2893         * c-decl.c: Use hash_set instead of pointer_set.
2895 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
2897         PR middle-end/61455
2898         * c-array-notation.c (expand_array_notations): Handling
2899         of DECL_EXPR added.
2901 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
2903         PR c++/60517
2904         * c-typeck.c (c_finish_return): Return 0 instead of the address of
2905         a local variable.
2907 2014-07-30  Tom Tromey  <tromey@redhat.com>
2909         * c-typeck.c (struct constructor_stack) <designator_depth>: New
2910         field.
2911         (really_start_incremental_init, push_init_level): Initialize
2912         designator_depth.
2913         (pop_init_level): Set global designator_depth.
2914         (process_init_element): Check for designated_init attribute.
2916 2014-07-20  Marek Polacek  <polacek@redhat.com>
2918         PR c/61852
2919         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
2920         (implicitly_declare): Pass location to implicit_decl_warning.
2922 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
2924         PR middle-end/61294
2925         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2926         If non-NULL, call c_parser_check_literal_zero.
2927         (c_parser_check_literal_zero): New function.
2928         (c_parser_postfix_expression_after_primary): Adjust
2929         c_parser_expr_list caller, handle -Wmemset-transposed-args.
2931 2014-07-06  Marek Polacek  <polacek@redhat.com>
2933         PR c/6940
2934         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2935         * c-tree.h (C_ARRAY_PARAMETER): Define.
2936         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2937         function parameter.
2939 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
2940             Chen Gang  <gang.chen.5i5j@gmail.com>
2942         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2943         releasing symbol.
2945 2014-07-01  Marek Polacek  <polacek@redhat.com>
2947         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2948         instead of 0 to WARN_FOR_ASSIGNMENT.
2950 2014-07-01  Marek Polacek  <polacek@redhat.com>
2952         PR c/58286
2953         * c-typeck.c (convert_for_assignment): Pass
2954         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2956 2014-06-30  Marek Polacek  <polacek@redhat.com>
2958         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2959         has no_sanitize_undefined attribute.
2961 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
2963         PR middle-end/57541
2964         * c-array-notation.c (fix_builtin_array_notation_fn):
2965         Check for 0 arguments in builtin call. Check that bultin argument is
2966         correct.
2967         * c-parser.c (c_parser_array_notation): Check for incorrect initial
2968         index.
2970 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2972         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2973         qualifiers in __auto_type for atomic types.
2974         (c_parser_typeof_specifier): Discard all type qualifiers in
2975         __typeof__ for atomic types.
2977 2014-06-25  Marek Polacek  <polacek@redhat.com>
2979         PR c/61162
2980         * c-parser.c (c_parser_statement_after_labels): Pass the location of
2981         the return expression to c_finish_return.
2983 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
2985         * c-typeck.c (c_finish_omp_clauses): Make sure
2986         OMP_CLAUSE_LINEAR_STEP has correct type.
2988 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
2990         * c-decl.c: Adjust.
2992 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
2994         * c-parser.c (c_parser_omp_for_loop): For
2995         #pragma omp parallel for simd move lastprivate clause from parallel
2996         to for rather than simd.
2998 2014-06-23  Marek Polacek  <polacek@redhat.com>
3000         * c-typeck.c (parser_build_binary_op): Don't call
3001         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3003 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
3005         * c-parser.c (c_parser_omp_threadprivate): Likewise.
3006         * c-decl.c (merge_decls): Likewise.
3008 2014-06-09  Marek Polacek  <polacek@redhat.com>
3010         PR c/36446
3011         * c-typeck.c (error_init): Call inform instead of error_at.
3012         (pedwarn_init): Call inform instead of pedwarn.
3013         (warning_init): Call inform instead of warning_at.
3015 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
3017         * c-decl.c (merge_decls): Use set_decl_section_name.
3018         (duplicate_decls): Remove node if it exists.
3020 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
3022         PR c/53119
3023         * c-typeck.c (push_init_level, process_init_element,
3024         pop_init_level): Correct check for zero initialization, move
3025         missing brace warning to respect zero initialization.
3027 2014-06-05  Marek Polacek  <polacek@redhat.com>
3029         PR c/56724
3030         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3032 2014-06-05  Marek Polacek  <polacek@redhat.com>
3034         PR c/49706
3035         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3036         on the left hand side operand of a comparison. 
3038 2014-06-05  Marek Polacek  <polacek@redhat.com>
3040         PR c/48062
3041         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3042         Print note only if the warning was printed.
3044 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
3046         PR c/58942
3047         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3048         with a pointer.
3050 2014-06-03  Marek Polacek  <polacek@redhat.com>
3052         PR c/60439
3053         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3054         c_start_case.
3055         * c-tree.h (c_start_case): Update.
3056         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
3057         switch condition has boolean value.
3059 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
3061         * c-decl.c: Include builtins.h.
3062         * c-parser.c: Likewise.
3064 2014-05-27  Marek Polacek  <polacek@redhat.com>
3066         PR c/56724
3067         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
3068         error and warning calls to error_at and warning_at.  Pass location of
3069         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
3070         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3071         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
3073 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
3075         PR c/61191
3076         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3077         function parameters.
3079 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
3081         * c-decl.c (merge_decls): Preserve symtab node pointers.
3082         (duplicate_decls): Free new decl.
3084 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
3086         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3087         initialization.
3089         * c-parser.c (c_parser_omp_target): Return bool values.
3091 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
3093         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3094         num_teams_loc variable to num_thread_limit_loc.
3096 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
3098         * c-array-notation.c (expand_array_notations): Use void_node
3099         instead of void_zero_node.
3101 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
3103         * c-decl.c (finish_struct): Adjust.
3104         (finish_enum): Likewise.
3105         (bind): Adjust.
3106         (record_inline_static): Likewise.
3107         (push_scope): Likewise.
3108         (make_label): Likewise.
3109         (lookup_label_for_goto): Likewise.
3110         (finish_struct): Likewise.
3111         (finish_enum): Likewise.
3112         (store_parm_decls): Likewise.
3113         (c_push_function_context): Likewise.
3114         * c-lang.h: Remove usage of variable_size gty attribute.
3115         * c-parser.c (c_parse_init): Adjust.
3116         (c_parse_file): Likewise.
3118 2014-05-13  Marek Polacek  <polacek@redhat.com>
3120         PR c/61162
3121         * c-typeck.c (convert_for_assignment): Pass location to
3122         WARN_FOR_ASSIGNMENT instead of input_location.
3124 2014-05-10  Marek Polacek  <polacek@redhat.com>
3126         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3127         maybe_warn_string_init.
3128         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3129         maybe_warn_string_init.
3130         * c-tree.h (maybe_warn_string_init): Update declaration.
3131         * c-typeck.c (maybe_warn_string_init): Add location parameter.
3132         Call pedwarn_init with loc instead of with input_location.
3133         (digest_init): Pass init_loc to maybe_warn_string_init.
3134         (pop_init_level): Call pedwarn_init with loc instead of with
3135         input_location.
3136         (set_init_index): Likewise.
3137         (process_init_element): Likewise.
3139 2014-05-09  Marek Polacek  <polacek@redhat.com>
3141         PR c/61096
3142         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3143         (c_parser_initelt): Pass location to set_init_label.  Pass array index
3144         location to set_init_index.
3145         * c-tree.h (push_init_level): Update declaration.
3146         (pop_init_level): Likewise.
3147         (set_init_index): Likewise.
3148         (set_init_label): Likewise.
3149         * c-typeck.c (error_init): Add location parameter.  Call error_at
3150         instead of error.
3151         (digest_init): Pass init_loc to error_init.
3152         (really_start_incremental_init):
3153         (push_init_level): Add location parameter.  Pass loc to pop_init_level
3154         and error_init.
3155         (pop_init_level): Likewise.
3156         (set_designator): Add location parameter.  Pass loc to pop_init_level,
3157         push_init_level, and error_init.
3158         (set_init_index): Add location parameter.  Pass loc to error_init and
3159         set_designator.
3160         (set_init_label): Likewise.
3161         (output_init_element): Pass loc to error_init.
3162         (process_init_element): Pass loc to error_init, pop_init_level,
3163         pedwarn_init, and push_init_level.
3165 2014-05-09  Marek Polacek  <polacek@redhat.com>
3167         PR c/50459
3168         * c-parser.c (c_parser_attributes): Parse the arguments as an
3169         expression-list if the attribute takes identifier.
3171 2014-05-08  Marek Polacek  <polacek@redhat.com>
3173         PR c/61053
3174         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3175         TYPE_ALIGN_UNIT.
3177 2014-05-08  Marek Polacek  <polacek@redhat.com>
3179         PR c/61077
3180         * c-decl.c (start_function): Warn for _Atomic-qualified return type
3181         of main.
3183 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
3184             Mike Stump  <mikestump@comcast.net>
3185             Richard Sandiford  <rdsandiford@googlemail.com>
3187         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3188         (finish_enum): Use wide-int interfaces.
3189         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3190         * c-typeck.c (build_c_cast): Likewise.
3191         (set_nonincremental_init_from_string): Likewise.
3192         (c_tree_equal): Likewise.
3194 2014-05-02  Marek Polacek  <polacek@redhat.com>
3196         PR c/25801
3197         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
3198         Return size_one_node when the type is not complete.
3199         (pointer_diff): Remove comment.
3200         (build_unary_op): Improve error messages.
3202 2014-05-02  Marek Polacek  <polacek@redhat.com>
3204         * c-typeck.c (c_finish_return): Separate warning_at calls.
3206 2014-05-02  Marek Polacek  <polacek@redhat.com>
3208         * c-tree.h (error_init): Remove declaration.
3209         (pedwarn_init): Likewise.
3210         * c-typeck.c (error_init): Make static and move above.
3211         (pedwarn_init): Likewise.
3212         (warning_init): Move above.
3213         (maybe_warn_string_init): Likewise.
3215 2014-05-01  Jeff Law  <law@redhat.com>
3217         Revert:
3219         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3220         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3221         avoid goto.
3223 2014-05-02  Marek Polacek  <polacek@redhat.com>
3225         PR c/60784
3226         * c-typeck.c (push_init_level): Set constructor_designated to
3227         p->designated for structures.
3229 2014-05-01  Marek Polacek  <polacek@redhat.com>
3231         PR c/60915
3232         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3233         function-definition has an attribute after the declarator.
3235 2014-05-01  Marek Polacek  <polacek@redhat.com>
3237         PR c/60257
3238         * c-typeck.c (warning_init): Add location_t parameter.  Call
3239         warning_at instead of warning.
3240         (push_init_level): Pass input_location to warning_init.
3241         (add_pending_init): Add location_t parameter.  Pass loc to
3242         warning_init.
3243         (set_nonincremental_init): Pass input_location to add_pending_init.
3244         (set_nonincremental_init_from_string): Likewise.
3245         (output_init_element): Pass loc to warning_init and to
3246         add_pending_init.
3248 2014-05-01  Marek Polacek  <polacek@redhat.com>
3250         PR c/43395
3251         * c-typeck.c (c_finish_return): Distinguish between label and variable
3252         when warning about returning local address.
3254 2014-05-01  Marek Polacek  <polacek@redhat.com>
3256         PR c/29467
3257         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3258         in C89 mode.
3260 2014-05-01  Marek Polacek  <polacek@redhat.com>
3262         PR c/43245
3263         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3264         instead of 0 to WARN_FOR_QUALIFIERS.
3266 2014-05-01  Marek Polacek  <polacek@redhat.com>
3268         PR c/56989
3269         * c-typeck.c (default_conversion): Use better location for
3270         error call.
3272 2014-04-30  Marek Polacek  <polacek@redhat.com>
3274         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3275         also when SANITIZE_FLOAT_DIVIDE is on.
3277 2014-04-30  Marek Polacek  <polacek@redhat.com>
3279         PR c/60139
3280         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3281         and pedwarn_init.  Use loc insted of input_location.
3283 2014-04-30  Marek Polacek  <polacek@redhat.com>
3285         PR c/60351
3286         * c-typeck.c (build_binary_op): Use location when warning about
3287         shift count.
3289 2014-04-25  Marek Polacek  <polacek@redhat.com>
3291         PR c/18079
3292         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3293         always_inline/noinline and hot/cold attributes.
3295 2014-04-25  Marek Polacek  <polacek@redhat.com>
3297         PR c/60114
3298         * c-parser.c (c_parser_initelt): Pass input_location to
3299         process_init_element.
3300         (c_parser_initval): Pass loc to process_init_element.
3301         * c-tree.h (process_init_element): Adjust declaration.
3302         * c-typeck.c (push_init_level): Pass input_location to
3303         process_init_element.
3304         (pop_init_level): Likewise.
3305         (set_designator): Likewise.
3306         (output_init_element): Add location_t parameter.  Pass loc to
3307         digest_init.
3308         (output_pending_init_elements): Pass input_location to
3309         output_init_element.
3310         (process_init_element): Add location_t parameter.  Pass loc to
3311         output_init_element.
3313 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
3315         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3316         atomic-clause, allow comma in between atomic-clause and
3317         seq_cst.
3319 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
3321         PR c/59073
3322         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3323         fails, don't set OM_PARALLEL_COMBINED and return NULL.
3325 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
3327         PR middle-end/60469
3328         * c-array-notation.c (fix_builtin_array_notation_fn): Use
3329         create_tmp_var instead build_decl for creating temps.
3330         (build_array_notation_expr): Likewise.
3331         (fix_conditional_array_notations_1): Likewise.
3332         (fix_array_notation_expr): Likewise.
3333         (fix_array_notation_call_expr): Likewise.
3335 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
3337         PR c++/60689
3338         * c-tree.h (c_build_function_call_vec): New prototype.
3339         * c-typeck.c (build_function_call_vec): Don't call
3340         resolve_overloaded_builtin here.
3341         (c_build_function_call_vec): New wrapper function around
3342         build_function_call_vec.  Call resolve_overloaded_builtin here.
3343         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3344         Call c_build_function_call_vec instead of build_function_call_vec.
3345         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3346         * c-decl.c (finish_decl): Likewise.
3348 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3350         PR c/55383
3351         * c-typeck.c: Use correct format string in cast-qual warning
3353 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
3355         * c-decl.c (c_decl_attributes): Use
3356         lang_hooks.types.omp_mappable_type.
3357         * c-typeck.c (c_finish_omp_clauses): Likewise.
3359 2014-03-06  Marek Polacek  <polacek@redhat.com>
3361         PR c/60197
3362         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3363         of checking tree code.
3365 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3367         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3368         (c_parser_parameter_declaration): Likewise.
3370 2014-02-19  Marek Polacek  <polacek@redhat.com>
3372         PR c/60195
3373         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3374         Call mark_exp_read on exp.value.
3375         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
3376         TREE_ADDRESSABLE on old instead of val.
3377         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3379 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3381         * c-parser.c (c_parser_get_builtin_args): Replace calls to
3382         C_EXPR_APPEND by vec_safe_push.
3383         * c-tree.h (C_EXPR_APPEND): Remove.
3385 2014-01-31  Marek Polacek  <polacek@redhat.com>
3387         PR c/59963
3388         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3389         build_function_call_vec.
3390         (build_function_call): Likewise.
3391         (build_atomic_assign): Likewise.
3392         (build_function_call_vec): Add arg_loc parameter.  Use it.
3393         (convert_arguments): Likewise.
3394         (convert_for_assignment): Rename rhs_loc to expr_loc.
3395         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3396         (c_parser_objc_keywordexpr): Likewise.
3397         (c_parser_postfix_expression_after_primary): Call
3398         build_function_call_vec with expr_loc rather than op_loc.
3399         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
3400         build_function_call_vec.
3401         (c_parser_expr_list): Add locations parameter.  Fill it with locations
3402         of function arguments.
3403         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3405 2014-01-30  Marek Polacek  <polacek@redhat.com>
3407         PR c/59940
3408         * c-typeck.c (build_function_call_vec): Use loc parameter.
3409         (convert_arguments): Add location parameter.  Use it.
3410         (ep_convert_and_check): Likewise.
3411         (build_atomic_assign): Adjust convert_for_assignment call.
3412         (build_modify_expr): Likewise.
3413         (digest_init): Likewise.
3414         (c_finish_return): Likewise.
3415         (build_conditional_expr): Adjust ep_convert_and_check calls.
3416         (convert_for_assignment): Add rhs_loc parameter.  Use it.
3417         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3418         calls.
3420 2014-01-30  Richard Biener  <rguenther@suse.de>
3422         PR c/59905
3423         * c-typeck.c (build_function_call_vec): Do not replace calls
3424         to a function via an incompatible type with a runtime abort.
3426 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3428         * c-parser.c (c_parser_declaration_or_fndef): Replaced
3429         flag_enable_cilkplus with flag_cilkplus.
3430         (c_parser_direct_declarator_inner): Likewise.
3431         (c_parser_attribute_any_word): Likewise.
3432         (c_parser_attributes): Likewise.
3433         (c_parser_compound_statement): Likewise.
3434         (c_parser_statement_after_labels): Likewise.
3435         (c_parser_if_statement): Likewise.
3436         (c_parser_switch_statement): Likewise.
3437         (c_parser_do_statement): Likewise.
3438         (c_parser_for_statement): Likewise.
3439         (c_parser_unary_expression): Likewise.
3440         (c_parser_postfix_expression): Likewise.
3441         (c_parser_postfix_expression_after_primary): Likewise.
3442         (c_parser_postfix_expression_after_primary): Likewise.
3443         (c_parser_omp_clause_name): Likewise.
3444         (c_finish_omp_declare_simd): Likewise.
3445         (c_parser_cilk_verify_simd): Likewise.
3446         * c-typeck.c (build_array_ref): Likewise.
3447         (build_function_call_vec): Likewise.
3448         (convert_arguments): Likewise.
3449         (build_compound_expr): Likewise.
3450         (c_finish_return): Likewise.
3451         (c_finish_if_stmt): Likewise.
3452         (c_finish_loop): Likewise.
3453         (build_binary_op): Likewise.
3455 2014-01-23  Marek Polacek  <polacek@redhat.com>
3457         PR c/59846
3458         * c-typeck.c (parser_build_binary_op): Use location instead of
3459         input_location.
3460         (build_binary_op): Pass location to shorten_compare.
3462 2014-01-23  Marek Polacek  <polacek@redhat.com>
3464         PR c/58346
3465         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3466         an empty aggregate.
3468 2014-01-23  Marek Polacek  <polacek@redhat.com>
3470         PR c/59871
3471         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3472         of a comma expression.
3473         (emit_side_effect_warnings): Likewise.
3475 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3477         PR c/59825
3478         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3479         function to use walk_tree and moved a lot of its functionality to
3480         expand_array_notations.
3481         (expand_array_notations): New function.
3483 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3485         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3486         attribute an attribute without value.
3488 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3490         PR middle-end/58809
3491         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3492         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3494 2014-01-22  Marek Polacek  <polacek@redhat.com>
3496         PR c/59891
3497         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3498         of remove_c_maybe_const_expr on op1 and op2.
3500 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
3502         PR c/58943
3503         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3504         effects, preevaluate rhs using SAVE_EXPR first.
3506 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3508         PR c++/59631
3509         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3510         statements with if-elseif statements.
3512 2014-01-06  Marek Polacek  <polacek@redhat.com>
3514         PR c/57773
3515         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3516         defined bit-field types only in ISO C.
3518 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3520         Update copyright years
3522 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3524         * c-array-notation.c: Use the standard form for the copyright notice.
3526 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3528         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3529         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3530         field in parser is not empty.  If not-empty, call the function
3531         c_parser_finish_omp_declare_simd.
3532         (c_parser_cilk_clause_vectorlength): Modified function to be shared
3533         between SIMD-enabled functions and #pragma simd.  Added new parameter.
3534         (c_parser_cilk_all_clauses): Modified the usage of the function
3535         c_parser_cilk_clause_vectorlength as mentioned above.
3536         (c_parser_cilk_simd_fn_vector_attrs): New function.
3537         (c_finish_cilk_simd_fn_tokens): Likewise.
3538         (is_cilkplus_vector_p): Likewise.
3539         (c_parser_omp_clause_name): Added checking for "vectorlength,"
3540         "nomask," and "mask" strings in clause name.
3541         (c_parser_omp_all_clauses): Added 3 new case statements:
3542         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3543         PRAGMA_CILK_CLAUSE_NOMASK.
3544         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
3545         check for vector attribute and if so call the function
3546         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
3547         called the function c_finish_cilk_simd_fn_tokens.
3548         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3549         parser field is non-empty.  If so, parse them as you would parse
3550         the omp declare simd pragma.
3551         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3552         Added a check when step is a parameter and flag it as error.
3553         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3554         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3555         pragma_omp_clause.
3557 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
3559         * c-parser.c (c_parser_omp_parallel): Fix description.
3561 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3563         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3564         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3565         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3566         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3568 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
3570         PR c/52023
3571         * c-parser.c (c_parser_alignas_specifier): Use
3572         c_sizeof_or_alignof_type instead of c_alignof.
3573         (c_parser_alignof_expression): Likewise, with min_alignof
3574         parameter depending on alignof spelling used.
3576 2013-12-04  Marek Polacek  <polacek@redhat.com>
3578         PR c/54113
3579         * c-decl.c (start_function): Don't warn for missing prototype for
3580         inline functions.
3582 2013-12-03  Marek Polacek  <polacek@redhat.com>
3584         PR c/59351
3585         * c-decl.c (build_compound_literal): Allow compound literals with
3586         empty initial value.
3588 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
3590         PR c/58235
3591         * c-typeck.c (build_modify_expr): Diagnose assignment to
3592         expression with array type.
3594 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
3596         PR c/42262
3597         * c-typeck.c (process_init_element): Do not treat a string as
3598         initializing a whole array when used with a designator for an
3599         individual element.
3601 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
3603         PR c/57574
3604         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3605         an inline function following a static declaration.
3607 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
3609         PR c/59310
3610         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3611         to p_name before calling c_parser_omp_teams instead of after.
3612         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3613         argument.  Remove unused p_name variable.
3615 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
3616             Jakub Jelinek  <jakub@redhat.com>
3618         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3619         external_scope is NULL.
3621 2013-11-27  Tom de Vries  <tom@codesourcery.com>
3622             Marc Glisse  <marc.glisse@inria.fr>
3624         PR c++/59032
3625         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3627 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
3629         * c-typeck.c: Add required include files from gimple.h.
3631 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
3633         * c-decl.c (define_label, shadow_tag_warned)
3634         (check_bitfield_type_and_width, grokdeclarator, grokparms,
3635         store_parm_decls_newstyle, store_parm_decls_oldstyle)
3636         (declspecs_add_type): Remove use of in_system_header macro.
3637         * c-parser.c (c_parser_unary_expression): Likewise.
3638         * c-typeck.c (store_init_value, process_init_element)
3639         (c_start_case): Likewise.
3641         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3642         macro.
3644         * c-parser.c (c_parser_set_source_position_from_token): Remove
3645         reference to in_system_header from comment.
3647 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3649         * c-decl.c (grokdeclarator): Update comment to refer to
3650         tree_to_[su]hwi rather than tree_low_cst.
3652 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3654         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3655         tree_to_uhwi throughout.
3657 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3659         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3660         throughout.
3662 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3664         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3665         throughout.
3667 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
3669         * c-parser.c (c_parser_cilk_simd): New.
3670         (c_parser_cilk_verify_simd): New.
3671         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3672         (c_parser_omp_for_loop): Add case for NE_EXPR.
3673         Set c_break_label for CILK_SIMD.
3674         (c_parser_cilk_clause_vectorlength): New.
3675         (c_parser_cilk_clause_linear): New.
3676         (c_parser_cilk_clause_name): New.
3677         (c_parser_cilk_all_clauses): New.
3678         * c-typeck.c (build_unary_op): Pass location argument to
3679         readonly_error.
3680         (build_modify_expr): Same.
3681         (build_asm_expr): Same.
3682         (c_finish_bc_stmt): Error on break/continue in loops.
3684 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
3686         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3688 2013-11-14  Diego Novillo  <dnovillo@google.com>
3690         * c-decl.c: Include print-tree.h.
3691         Include stor-layout.h.
3692         Include varasm.h.
3693         Include attribs.h.
3694         Include stringpool.h.
3695         * c-lang.c: Include fold-const.h.
3696         * c-parser.c: Include stringpool.h.
3697         Include attribs.h.
3698         Include stor-layout.h.
3699         Include varasm.h.
3700         Include trans-mem.h.
3701         * c-typeck.c: Include stor-layout.h.
3702         Include trans-mem.h.
3703         Include varasm.h.
3704         Include stmt.h.
3706 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
3708         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3709         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3710         __auto_type.
3711         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3712         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3713         RID_AUTO_TYPE.
3714         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3715         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3716         (c_parser_declarator, c_parser_direct_declarator_inner)
3717         (c_parser_parameter_declaration, c_parser_type_name): All callers
3718         changed.
3719         (c_parser_declaration_or_fndef): Handle declarations with type
3720         determined from the initializer.
3722 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
3724         * c-typeck.c: Include gimplify.h.
3726 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
3728         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3729         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3730         comment.
3731         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3732         or _Thread_local as appropriate in diagnostics.
3733         (build_null_declspecs): Initialize ret->thread_gnu_p.
3734         (declspecs_add_scspec): Handle either __thread or _Thread_local
3735         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
3736         pedantic.  Do not disallow _Thread_local extern and _Thread_local
3737         static.
3739 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
3740             Andrew MacLeod  <amacleod@redhat.com>
3742         * c-aux-info.c (gen_type): Handle atomic qualifier.
3743         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3744         qualifiers when compating types.
3745         (shadow_tag_warned): Handle atomic_p in declspecs.
3746         (quals_from_declspecs): Likewise.
3747         (start_decl): Use c_type_promotes_to when promoting argument
3748         types.
3749         (grokdeclarator): Handle _Atomic.
3750         (get_parm_info): Diagnose any qualifier on "void" as only
3751         parameter.
3752         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3753         comparing types.  Use c_type_promotes_to when promoting argument
3754         types.
3755         (finish_function): Use c_type_promotes_to when promoting argument
3756         types.
3757         (build_null_declspecs): Handle atomic_p in declspecs.
3758         (declspecs_add_qual): Handle RID_ATOMIC.
3759         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3760         (c_token_starts_declspecs): Handle RID_ATOMIC.
3761         (c_parser_declspecs): Handle atomic type specifiers and
3762         qualifiers.
3763         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3764         from types of expressions with atomic type.
3765         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3766         (c_parser_attribute_any_word): Handle RID_ATOMIC.
3767         (c_parser_initializer, c_parser_initelt, c_parser_initval)
3768         (c_parser_statement_after_labels, c_parser_switch_statement)
3769         (c_parser_for_statement, c_parser_expr_no_commas)
3770         (c_parser_conditional_expression, c_parser_binary_expression)
3771         (c_parser_cast_expression, c_parser_unary_expression)
3772         (c_parser_postfix_expression)
3773         (c_parser_postfix_expression_after_primary, c_parser_expression):
3774         Use convert_lvalue_to_rvalue.
3775         (c_parser_expression_conv, c_parser_expr_list): Document
3776         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
3777         (c_parser_objc_synchronized_statement): Use
3778         convert_lvalue_to_rvalue.
3779         (c_parser_objc_selector): Handle RID_ATOMIC.
3780         (c_parser_objc_receiver, c_parser_array_notation): Use
3781         convert_lvalue_to_rvalue.
3782         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3783         _Atomic (type-name).
3784         (struct c_declspecs): Add atomic_p field.
3785         (convert_lvalue_to_rvalue): Declare.
3786         * c-typeck.c (c_type_promotes_to): Promote atomic types to
3787         corresponding atomic types.
3788         (qualify_type): Don't add _Atomic qualifiers from second argument.
3789         (comp_target_types): Do not allow _Atomic mismatches.
3790         (type_lists_compatible_p): Do not remove atomic qualifiers when
3791         comparing types.
3792         (really_atomic_lvalue, convert_lvalue_to_rvalue)
3793         (build_atomic_assign): New functions.
3794         (build_unary_op): Use build_atomic_assign for atomic increment and
3795         decrement.
3796         (build_conditional_expr): Do not treat _Atomic void as a qualified
3797         version of void.
3798         (build_modify_expr): Use build_atomic_assign for atomic LHS.
3799         (find_anonymous_field_with_type, convert_to_anonymous_field)
3800         (convert_for_assignment): Do not remove atomic qualifiers when
3801         comparing types.
3802         (digest_init): Do not accept initialization of arrays of atomic
3803         elements by string constants.
3804         (build_asm_expr): Use convert_lvalue_to_rvalue.
3805         (build_binary_op): Do not treat _Atomic void as a qualified
3806         version of void.
3808 2013-11-06  DJ Delorie  <dj@redhat.com>
3810         * c-decl.c (locate_old_decl): If a previous conflicting decl is
3811         both explicit and builtin, print the location of the explicit one.
3813 2013-11-05  Tobias Burnus  <burnus@net-b.de>
3815         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3816         c_parser_omp_distribute, c_parser_omp_teams,
3817         c_parser_omp_target, c_parser_omp_declare): Handle
3818         -fopenmp-simd.
3820 2013-11-03  Marek Polacek  <polacek@redhat.com>
3822         * c-decl.c (grokdeclarator): Add VLA instrumentation.
3824 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
3826         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3827         check_dup_generic at the end, unless remove is true.
3828         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3829         remove = true;.
3830         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3832 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
3834         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3835         with decl that is not pointer nor array.
3837 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3839         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3840         a spawning function is found.
3841         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3842         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3843         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3844         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3845         case.
3846         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3847         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3848         expr.
3849         (c_finish_return): Added a check to reject _Cilk_spawn in return
3850         expression.
3851         (build_cilk_spawn): New function.
3852         (build_cilk_sync): Likewise.
3853         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3854         
3855 2013-10-27  Tobias Burnus  <burnus@net-b.de>
3857         PR other/33426
3858         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3859         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3860         (c_parser_statement_after_labels): Update calls.
3862 2013-10-24  Tobias Burnus  <burnus@net-b.de>
3864         PR other/33426
3865         * c-parser.c (c_parser_pragma, c_parser_for_statement):
3866         Handle PRAGMA_IVDEP.
3867         (c_parser_statement_after_labels): Update call.
3869 2013-10-24  Marek Polacek  <polacek@redhat.com>
3871         * c-parser.c (c_parser_struct_declaration): Add a comment.
3872         (c_parser_declarator): Don't allow _Alignas here.
3874 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
3876         * c-parser.c: Include omp-low.h.
3877         * c-typeck.c: Likewise.
3879 2013-10-17  Marek Polacek  <polacek@redhat.com>
3881         PR c/58267
3882         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3883         Document syntax of the array-declarator.
3884         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3885         are not permitted.
3886         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3887         (c_parser_struct_declaration): Likewise.
3888         (c_parser_declarator): Likewise.
3889         (c_parser_direct_declarator_inner): Likewise.
3890         (c_parser_parameter_declaration): Likewise.
3891         (c_parser_type_name): Likewise.
3893 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
3895         * c-lang.h (current_omp_declare_target_attribute): New extern
3896         decl.
3897         * c-parser.c: Include c-lang.h.
3898         (struct c_parser): Change tokens to c_token *.
3899         Add tokens_buf field.  Change tokens_avail type to unsigned int.
3900         (c_parser_consume_token): If parser->tokens isn't
3901         &parser->tokens_buf[0], increment parser->tokens.
3902         (c_parser_consume_pragma): Likewise.
3903         (enum pragma_context): Add pragma_struct and pragma_param.
3904         (c_parser_external_declaration): Adjust
3905         c_parser_declaration_or_fndef caller.
3906         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3907         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3908         Adjust recursive call.
3909         (c_parser_struct_or_union_specifier): Use pragma_struct instead
3910         of pragma_external.
3911         (c_parser_parameter_declaration): Use pragma_param instead of
3912         pragma_external.
3913         (c_parser_compound_statement_nostart, c_parser_label,
3914         c_parser_for_statement): Adjust
3915         c_parser_declaration_or_fndef callers.
3916         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3917         it through to c_parser_conditional_expression.
3918         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3919         pass it through to c_parser_binary_expression.  Adjust recursive
3920         call.
3921         (c_parser_binary_expression): Remove prec argument, add
3922         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
3923         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3924         binop matches it, use build2 instead of parser_build_binary_op.
3925         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3926         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3927         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3928         Handle pragma_struct and pragma_param the same as pragma_external.
3929         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3930         (c_parser_omp_variable_list): Parse array sections for
3931         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3932         (c_parser_omp_clause_collapse): Fully fold collapse expression.
3933         (c_parser_omp_clause_reduction): Handle user defined reductions.
3934         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3935         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3936         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3937         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3938         c_parser_omp_clause_depend, c_parser_omp_clause_map,
3939         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3940         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3941         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3942         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
3943         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
3944         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3945         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
3946         (c_parser_omp_for_loop): Add CODE argument, pass it through
3947         to c_finish_omp_for.  Change last argument to cclauses,
3948         and adjust uses to grab parallel clauses from the array of all
3949         the split clauses.  Adjust c_parser_binary_expression,
3950         c_parser_declaration_or_fndef and c_finish_omp_for callers.
3951         (omp_split_clauses): New function.
3952         (c_parser_omp_simd): New function.
3953         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3954         Allow the function to be called also when parsing combined constructs,
3955         and call c_parser_omp_simd when parsing for simd.
3956         (c_parser_omp_sections_scope): If section-sequence doesn't start with
3957         #pragma omp section, require exactly one structured-block instead of
3958         sequence of statements.
3959         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3960         Allow the function to be called also when parsing combined constructs.
3961         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3962         Allow the function to be called also when parsing combined
3963         constructs.
3964         (c_parser_omp_taskgroup, c_parser_omp_cancel,
3965         c_parser_omp_cancellation_point, c_parser_omp_distribute,
3966         c_parser_omp_teams, c_parser_omp_target_data,
3967         c_parser_omp_target_update, c_parser_omp_target,
3968         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3969         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3970         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3971         (c_parser_omp_construct): Add p_name and mask vars.  Handle
3972         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3973         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
3974         and c_parser_omp_sections callers.
3975         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3976         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3977         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3978         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
3979         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
3980         OMP_CLAUSE_DEPEND.
3981         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3982         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3983         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3984         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3985         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3986         * c-typeck.c: Include tree-inline.h.
3987         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3988         handle_omp_array_sections_1, handle_omp_array_sections,
3989         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3990         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3991         user defined reductions.
3992         (c_tree_equal): New function.
3993         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3994         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3995         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3996         c_check_omp_declare_reduction_r): New prototypes.
3997         * c-decl.c (current_omp_declare_target_attribute): New variable.
3998         (c_decl_attributes): New function.
3999         (start_decl, start_function): Use it instead of decl_attributes.
4000         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4001         c_omp_reduction_decl, c_omp_reduction_lookup,
4002         c_check_omp_declare_reduction_r): New functions.
4004 2013-09-25  Tom Tromey  <tromey@redhat.com>
4006         * Make-lang.in (c/gccspec.o): Remove.
4007         (CFLAGS-c/gccspec.o): New variable.
4008         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4009         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4010         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4012 2013-09-25  Tom Tromey  <tromey@redhat.com>
4014         * Make-lang.in (c/gccspec.o): Don't use subshell.
4016 2013-09-18  Marek Polacek  <polacek@redhat.com>
4018         PR sanitize/58443
4019         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4020         Remove unnecessary check.
4022 2013-09-18  Marek Polacek  <polacek@redhat.com>
4024         PR sanitizer/58411
4025         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4026         no_sanitize_undefined attribute.
4028 2013-09-13  Kai Tietz  <ktietz@redhat.com>
4030         PR target/57848
4031         * c-decl.c (c_builtin_function_ext_scope): Remove
4032         wrong assumption that it is never called on prexisting
4033         symbol.
4035 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
4037         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4039 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4041         * c-objc-common.c (c_tree_printer): Tidy.
4043 2013-08-30  Marek Polacek  <polacek@redhat.com>
4045         * c-typeck.c (build_binary_op): Add division by zero and shift
4046         instrumentation.
4048 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
4049             Joseph Myers  <joseph@codesourcery.com>
4051         PR c/35649
4052         * c-typeck.c (c_common_type): Prefer double_type_node over
4053         other REAL_TYPE types with the same precision.
4054         (convert_arguments): Likewise.
4056 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4058         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4059         (c_initialize_diagnostics): Call a destructor for the early printer.
4061 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4063         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4064         printer initialization.
4066 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4068         PR c/57490
4069         * c-array-notation.c (fix_conditional_array_notations_1): Added a
4070         check for truth values.
4071         (expand_array_notation_exprs): Added truth values case.  Removed an
4072         unwanted else.  Added for-loop to walk through subtrees in default
4073         case.
4075 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4077         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4079 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
4081         * c-parser.c (struct c_generic_association): Fix typo.
4083 2013-07-23  Tom Tromey  <tromey@redhat.com>
4084             Joseph Myers  <joseph@codesourcery.com>
4086         * c-parser.c (struct c_generic_association): New.
4087         (c_generic_association_d): New typedef.
4088         (c_parser_generic_selection): New function.
4089         (c_parser_postfix_expression): Handle RID_GENERIC.
4091 2013-07-13  Jason Merrill  <jason@redhat.com>
4093         PR c++/57793
4094         * c-decl.c (finish_struct): Check for too-large class.
4096 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
4098         PR c/57821
4099         * c-typeck.c (set_init_index): When folding, check for index overflow.
4101 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4103         * c-parser.c (c_parser_array_notation): Removed rejection of array
4104         notations in an array of function pointers.
4106 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4108         * c-array-notation.c (make_triplet_val_inv): New function.
4109         (create_cmp_incr): Likewise.
4110         (create_array_refs): Likewise.
4111         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4112         Also modularized common parts between functions and called the function.
4113         (build_array_notation_expr): Likewise.
4114         (fix_conditional_array_notations_1): Likewise.
4115         (fix_array_notation_expr): Likewise.
4116         (fix_array_notation_call_expr): Likewise.
4118 2013-06-18  Marek Polacek  <polacek@redhat.com>
4120         PR c/57630
4121         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4123 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4125         * c-array-notation.c (build_array_notation_expr): Reject array notation
4126         mismatch between LHS and RHS even inside a call_expr.  Also, removed
4127         a couple while statements that were dead code.
4129 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4131         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4132         excessive precision expressions in function parameters.  Also removed
4133         couple unwanted while statements.
4135 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4137         * c-array-notation.c (expand_array_notation_exprs): Added
4138         ARRAY_NOTATION_REF case.
4139         
4140 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4142         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4143         function to c-family/array-notation-common.c.
4144         (is_cilkplus_reduce_builtin): Likewise.
4145         (find_rank): Likewise.
4146         (extract_array_notation_exprs): Likewise.
4147         (replace_array_notations): Likewise.
4148         (find_inv_trees): Likewise.
4149         (replace_inv_trees): Likewise.
4150         (contains_array_notation_expr): Likewise.
4151         (find_correct_array_notation_type): Likewise.
4152         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4153         (struct inv_list): Moved this to c-family/array-notation-common.c.
4154         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4155         
4156 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4158         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4159         reduction functions outside the for-loop.  Added a check if the fundecl
4160         is non-NULL.  Finally, removed an unwanted if-statement, and made the
4161         body unconditional.
4163 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4165         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4166         condition of the if-statement matches the rank of else-block and then-
4167         block when array notations are used.
4168         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4169         expression after the entire function body is parsed.
4170         (c_parser_expr_no_commas): Delayed creating array notation expressions
4171         to the end of function parsing.
4172         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4173         whole if-statement instead of just the condition.
4174         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
4176 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4178         PR c/57474
4179         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4180         array to NULL_TREE if they are unused.  Also added a check for the
4181         field to be NULL before its fields are used in future.
4182         
4183 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4185         PR bootstrap/57450
4186         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4187         (build_array_notation_expr): Likewise.
4189 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4191         * c-typeck.c (build_array_ref): Added a check to see if array's
4192         index is greater than one.  If true, then emit an error.
4193         (build_function_call_vec): Exclude error reporting and checking
4194         for builtin array-notation functions.
4195         (convert_arguments): Likewise.
4196         (c_finish_return): Added a check for array notations as a return
4197         expression.  If true, then emit an error.
4198         (c_finish_loop): Added a check for array notations in a loop
4199         condition.  If true then emit an error.
4200         (lvalue_p): Added a ARRAY_NOTATION_REF case.
4201         (build_binary_op): Added a check for array notation expr inside
4202         op1 and op0.  If present, we call another function to find correct
4203         type.
4204         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4205         * c-parser.c (c_parser_compound_statement): Check if array
4206         notation code is used in tree, if so, then transform them into
4207         appropriate C code.
4208         (c_parser_expr_no_commas): Check if array notation is used in LHS
4209         or RHS, if so, then build array notation expression instead of
4210         regular modify.
4211         (c_parser_postfix_expression_after_primary): Added a check for
4212         colon(s) after square braces, if so then handle it like an array
4213         notation.  Also, break up array notations in unary op if found.
4214         (c_parser_direct_declarator_inner): Added a check for array
4215         notation.
4216         (c_parser_compound_statement): Added a check for array notation in
4217         a stmt.  If one is present, then expand array notation expr.
4218         (c_parser_if_statement): Likewise.
4219         (c_parser_switch_statement): Added a check for array notations in
4220         a switch statement's condition.  If true, then output an error.
4221         (c_parser_while_statement): Similarly, but for a while.
4222         (c_parser_do_statement): Similarly, but for a do-while.
4223         (c_parser_for_statement): Similarly, but for a for-loop.
4224         (c_parser_unary_expression): Check if array notation is used in a
4225         pre-increment or pre-decrement expression.  If true, then expand
4226         them.
4227         (c_parser_array_notation): New function.
4228         * c-array-notation.c: New file.
4229         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4230         
4231 2013-05-23  Mike Stump  <mikestump@comcast.net>
4233         * c-typeck.c (convert_for_assignment): Handle references to memory
4234         spaces better.
4236 2013-05-16  Jason Merrill  <jason@redhat.com>
4238         * Make-lang.in (cc1$(exeext)): Use link mutex.
4240 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
4242         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4243         to simply use OPT_Wpointer_arith.
4244         (build_unary_op): Likewise.
4246 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
4248         PR c/19449
4249         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4250         argument.  If set, or it temporarily for parsing of the first
4251         argument into force_folding_builtin_constant_p.
4252         (c_parser_postfix_expression): Adjust callers.
4254 2013-03-21  Richard Biener  <rguenther@suse.de>
4256         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4257         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
4259 2013-02-12  Marek Polacek  <polacek@redhat.com>
4261         PR c/44938
4262         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4263         origtypes to NULL.
4265 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
4267         PR c/56078
4268         * c-typeck.c (set_nonincremental_init_from_string): If
4269         constructor_max_index is NULL, treat it as if tree_int_cst_lt
4270         returned false.
4271         (process_init_element): Likewise.
4273 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
4275         PR c++/55619
4276         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4277         argument, don't call default_function_array_conversion
4278         nor c_fully_fold here.
4279         (c_parser_asm_statement): Adjust callers.
4280         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4281         and outputs here, and call default_function_array_conversion
4282         on inputs that don't need to be addressable.
4284 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
4286         PR c/39464
4287         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4288         warning require that both c_common_unsigned_type as well as
4289         c_common_signed_type is the same for both mvl and mvr types.
4291 2012-11-16  Diego Novillo  <dnovillo@google.com>
4293         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4295         * c-common.c: Use new vec API in vec.h.
4296         * c-common.h: Likewise.
4297         * c-gimplify.c: Likewise.
4298         * c-pragma.c: Likewise.
4299         * c-pretty-print.c: Likewise.
4300         * c-pretty-print.h: Likewise.
4301         * c-semantics.c: Likewise.
4302         * c-decl.c: Likewise.
4303         * c-parser.c: Likewise.
4304         * c-tree.h: Likewise.
4305         * c-typeck.c: Likewise.
4307 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
4309         PR c++/54930
4310         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4312 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4314         PR c/53066
4315         * c-decl.c (warn_if_shadowing): Do not warn if a variable
4316         shadows a function, unless the variable is a function or a
4317         pointer-to-function.
4319 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
4321         PR c/54381
4322         * c-parser.c (struct c_tree_loc_pair): Removed.
4323         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4324         add location_t * and tree * arguments, fill in array of 3
4325         sizeof_arg trees and corresponding locs.
4326         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4327         c_parser_expr_list callers.
4328         (c_parser_postfix_expression_after_primary): Likewise.  Pass
4329         array of 3 sizeof_arg trees and locs (corresponding to first
4330         3 arguments) to sizeof_pointer_memaccess_warning.
4332 2012-10-09  Lawrence Crowl  <crowl@google.com>
4334         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4335         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4336         hash table.
4338 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
4340         PR c++/54194
4341         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4342         call.
4344 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
4346         PR c++/54427
4347         * c-typeck.c: Include c-common.h.
4348         (enum stv_conv): Moved to c-common.h.
4349         (scalar_to_vector): Moved to c-common.c.
4350         (build_binary_op): Adapt to scalar_to_vector's new prototype.
4351         * Make-lang.in: c-typeck.c depends on c-common.h.
4353 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
4355         * c-decl.c (c_write_global_declarations): Fix handling of
4356         -fdump-ada-spec*.
4358 2012-09-30  Sharad Singhai  <singhai@google.com>
4360         * c-decl.c (c_write_global_declarations): Use a different method
4361         to determine if the dump has ben initialized.
4363 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4365         PR c/54552
4366         * c-typeck.c (c_cast_expr): When casting to a type requiring
4367         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4368         c_fully_fold first.
4370 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4372         PR c/54103
4373         * c-typeck.c (build_unary_op): Pass original argument of
4374         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4375         any C_MAYBE_CONST_EXPR, if it has integer operands.
4376         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4377         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4378         to c_objc_common_truthvalue_conversion, then remove any
4379         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
4380         c_objc_common_truthvalue_conversion not
4381         c_common_truthvalue_conversion.
4382         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4383         call note_integer_operands for arguments with integer operands
4384         that are not integer constants.
4386 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
4388         PR c/54559
4389         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4390         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4392 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
4394         PR c/54428
4395         * c-convert.c (convert): Don't call fold_convert_loc if
4396         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4397         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
4398         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4400 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
4402         PR c/54355
4403         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4404         for nested and empty_ok arguments in the call to
4405         c_parser_declaration_or_fndef.
4407 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
4409         * c-tree.h (c_last_sizeof_arg): Declare.
4410         * c-parser.c (struct c_tree_loc_pair): New type.
4411         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
4412         non-NULL.
4413         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4414         (c_parser_postfix_expression_after_primary): Likewise.  Call
4415         sizeof_pointer_memaccess_warning if needed.
4416         (sizeof_ptr_memacc_comptypes): New function.
4417         * c-typeck.c (c_last_sizeof_arg): New global variable.
4418         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4420 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
4422         * c-lang.h (lang_decl): Add variable_size GTY option.
4424 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
4426         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4427         * Make-lang.in: Fix dependencies.
4429 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
4431         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4432         and add language Makefile hooks.
4433         * config-lang.in: New file.
4434         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4435         add the required "normal" config-lang.in rules.
4436         * c-lang.h: Moved from gcc/ to here.
4437         * c-tree.h: Likewise.
4438         * c-objc-common.c: Likewise.
4439         * c-objc-common.h: Likewise.
4440         * c-typeck.c: Likewise.
4441         * c-convert.c: Likewise.
4442         * c-lang.c: Likewise.
4443         * c-aux-info.c: Likewise.
4444         * c-errors.c: Likewise.
4445         * gccspec.c: Likewise.
4446         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
4447         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
4449 Copyright (C) 2012-2017 Free Software Foundation, Inc.
4451 Copying and distribution of this file, with or without modification,
4452 are permitted in any medium without royalty provided the copyright
4453 notice and this notice are preserved.