gcc/ChangeLog:
[official-gcc.git] / gcc / c / ChangeLog
blob16fb6f8a9f98c51dcbc68618b89be03500dd951c
1 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
3         PR lto/79061
4         * c-decl.c (pop_scope): Pass main_input_filename to
5         build_translation_unit_decl.
7 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
9         * c-parser.c: Include "read-rtl-function.h" and
10         "run-rtl-passes.h".
11         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
12         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
13         production.  Update for renaming of field "gimple_pass" to
14         "gimple_or_rtl_pass".  If __RTL was seen, call
15         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
16         to an auto_timevar, to cope with early exit.
17         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
18         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
19         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
20         Handle RID_RTL.
21         (c_parser_parse_rtl_body): New function.
22         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
23         (struct c_declspecs): Rename field "gimple_pass" to
24         "gimple_or_rtl_pass".  Add field "rtl_p".
25         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
26         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
27         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
28         (c_parser_gimple_or_rtl_pass_list): ...this.
30 2017-01-20  Marek Polacek  <polacek@redhat.com>
32         PR c/64279
33         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
35 2017-01-13  Richard Biener  <rguenther@suse.de>
37         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
38         nops.
40 2017-01-13  Richard Biener  <rguenther@suse.de>
42         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
43         _Literal ( type-name ) number.
45 2017-01-12  Richard Biener  <rguenther@suse.de>
47         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
48         __MEM.
50 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
52         PR c++/72813
53         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
54         PCH file.
56 2017-01-11  Richard Biener  <rguenther@suse.de>
58         PR bootstrap/79052
59         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
60         returns on parse errors.
62 2017-01-04  Marek Polacek  <polacek@redhat.com>
64         PR c++/64767
65         * c-parser.c (c_parser_postfix_expression): Mark zero character
66         constants by setting original_type in c_expr.
67         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
68         with a zero character constant.
69         (char_type_p): New function.
71 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
73         * c-parser.c (c_parser_declaration_or_fndef): Create a
74         rich_location at init_loc and parse it to start_init.
75         (last_init_list_comma): New global.
76         (c_parser_braced_init): Update last_init_list_comma when parsing
77         commas.  Pass it to pop_init_level.  Pass location of closing
78         brace to pop_init_level.
79         (c_parser_postfix_expression_after_paren_type): Create a
80         rich_location at type_loc and parse it to start_init.
81         (c_parser_omp_declare_reduction): Likewise for loc.
82         * c-tree.h (start_init): Add rich_location * param.
83         (pop_init_level): Add location_t param.
84         * c-typeck.c (struct initializer_stack): Add field
85         "missing_brace_richloc".
86         (start_init): Add richloc param, use it to initialize
87         the stack node's missing_brace_richloc.
88         (last_init_list_comma): New decl.
89         (finish_implicit_inits): Pass last_init_list_comma to
90         pop_init_level.
91         (push_init_level): When finding missing open braces, add fix-it
92         hints to the richloc.
93         (pop_init_level): Add "insert_before" param and pass it
94         when calling pop_init_level.  Add fixits about missing
95         close braces to any richloc.  Use the richloc for the
96         -Wmissing-braces warning.
97         (set_designator): Pass last_init_list_comma to pop_init_level.
98         (process_init_element): Likewise.
100 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
102         Update copyright years.
104 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
106         PR bootstrap/78817
107         * c-typeck.c (build_function_call_vec): If check_function_arguments
108         returns true, set TREE_NO_WARNING on CALL_EXPR.
110         PR c/77767
111         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
112         to *expr instead of overwriting it.
114 2016-12-20  Richard Biener  <rguenther@suse.de>
116         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
117         error recovery.
118         (c_parser_gimple_statement): Only build assigns for non-error
119         stmts.
120         (c_parser_gimple_postfix_expression_after): Improve error recovery.
122 2016-12-14  Martin Jambor  <mjambor@suse.cz>
124         * c-parser.c: Include omp-general.h and omp-offload.h instead of
125         omp-low.h.
126         (c_finish_oacc_routine): Adjusted call to
127         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
128         to use their new names.
129         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
130         use its new name.
131         (c_parser_oacc_update): Likewise.
132         (c_parser_omp_simd): Likewise.
133         (c_parser_omp_target_update): Likewise.
134         * c-typeck.c: Include omp-general.h instead of omp-low.h.
135         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
136         name.
137         (c_finish_omp_cancellation_point): Likewise.
138         * gimple-parser.c: Do not include omp-low.h
140 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
141             James Norris  <jnorris@codesourcery.com>
143         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
144         EXIT_DATA,WAIT} are not used in compound statements.
145         (c_parser_oacc_enter_exit_data): Update diagnostics.
147 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
149         PR c++/71973
150         * c-decl.c (diagnose_mismatched_decls): Use
151         OPT_Wbuiltin_declaration_mismatch here too.
153 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
154             Alan Hayward  <alan.hayward@arm.com>
155             David Sherwood  <david.sherwood@arm.com>
157         * c-decl.c (merge_decls): Use SET_DECL_MODE.
158         (make_label, finish_struct): Likewise.
160 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
161             Richard Biener  <rguenther@suse.de>
163         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
164         * config-lang.in (gtfiles): Add c/c-parser.h.
165         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
166         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
167         * c-parser.c (enum c_id_kind, struct c_token,
168         c_parser_next_token_is, c_parser_next_token_is_not,
169         c_parser_next_token_is_keyword,
170         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
171         Split out to ...
172         * c-parser.h: ... new header.
173         * c-parser.c: Include c-parser.h and gimple-parser.h.
174         (c_parser_peek_token, c_parser_peek_2nd_token,
175         c_token_starts_typename, c_parser_next_token_starts_declspecs,
176         c_parser_next_tokens_start_declaration, c_parser_consume_token,
177         c_parser_error, c_parser_require, c_parser_skip_until_found,
178         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
179         c_parser_type_name): Export.
180         (c_parser_tokens_buf): New function.
181         (c_parser_error): Likewise.
182         (c_parser_set_error): Likewise.
183         (c_parser_declspecs): Handle RID_GIMPLE.
184         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
185         via c_parser_parse_gimple_body.
186         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
187         c_token_starts_typename, c_parser_next_token_starts_declspecs,
188         c_parser_next_tokens_start_declaration, c_parser_consume_token,
189         c_parser_error, c_parser_require, c_parser_skip_until_found,
190         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
191         c_parser_type_name): Declare.
192         (struct c_parser): Declare forward.
193         (c_parser_tokens_buf): Declare.
194         (c_parser_error): Likewise.
195         (c_parser_set_error): Likewise.
196         * gimple-parser.c: New file.
197         * gimple-parser.h: Likewise.
199 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
201         PR c/35503
202         * c-parser.c (c_parser_postfix_expression_after_primary): Call
203         warn_for_restrict.
205 2016-09-11  Le-Chun Wu  <lcwu@google.com>
206             Mark Wielaard  <mjw@redhat.com>
208         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
209         to the given -Wshadow= variant.
211 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
213         * c-typeck.c: Include memmodel.h.
215 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
217         PR target/77957
218         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
219         instead of lhd_return_null_tree_v.
221 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
223         PR c++/69733
224         * c-decl.c (smallest_type_quals_location): New static function.
225         (grokdeclarator): Try to find the correct location for an ignored
226         qualifier.
228 2016-09-26  Marek Polacek  <polacek@redhat.com>
230         PR c/7652
231         * c-decl.c (pop_scope): Add gcc_fallthrough.
233 2016-09-26  Marek Polacek  <polacek@redhat.com>
235         PR c/7652
236         * c-parser.c (struct c_token): Add flags field.
237         (c_lex_one_token): Pass it to c_lex_with_flags.
238         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
239         into IFN_FALLTHROUGH.
240         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
241         attribute fallthrough after a case label or default label.
242         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
244 2016-09-24  Marek Polacek  <polacek@redhat.com>
246         PR c/77490
247         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
248         have boolean value.  Warn about ++/-- on booleans.
250 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
252         * c-parser.c (incomplete_record_decls): Remove unnecessary
253         = vNULL initialization of file scope vec.
255 2016-09-16  Marek Polacek  <polacek@redhat.com>
257         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
259 2016-09-14  Marek Polacek  <polacek@redhat.com>
261         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
262         (fix_array_notation_expr): Likewise.
263         * c-decl.c (finish_decl): Likewise.
264         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
265         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
266         (function_to_pointer_conversion): Use false instead of 0.
267         (convert_lvalue_to_rvalue): Likewise.
268         (parser_build_unary_op): Likewise.
269         (build_atomic_assign): Likewise.
270         (build_unary_op): Change nonconvert parameter type to bool, use
271         true/false instead of 1/0.
272         (build_binary_op): Use true instead of 1.
274 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
276         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
277         of add_fixit_insert to add_fixit_insert_before.
279 2016-09-13  Marek Polacek  <polacek@redhat.com>
281         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
282         it.
284 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
286         PR c++/77496
287         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
288         COMPOUND_EXPR to warn_for_omitted_condop.
290 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
292         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
293         c_get_substring_location for this new langhook.
295 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
297         PR c/65467
298         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
299         flag_openmp.
300         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
301         instead of mark_exp_read on low_bound/length expression.
302         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
303         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
304         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
305         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
306         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
307         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
308         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
309         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
310         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
311         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
312         instead of mark_expr_read.
313         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
314         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
315         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
316         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
317         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
318         array section bases outside of depend clause, for depend clause
319         use convert_lvalue_to_rvalue on the base.
320         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
321         linear, aligned, map, to and from clauses.
322         (c_omp_clause_copy_ctor): New function.
324 2016-09-01  Marek Polacek  <polacek@redhat.com>
326         PR c/7652
327         * c-typeck.c (composite_type): Add FALLTHRU comment.
329 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
331         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
332         to the insertion fixits for "struct", "union", and "enum".
334 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
336         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
337         rather than add_fixit_misspelled_id.
338         (undeclared_variable): Likewise.
339         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
340         now-redundant "here" params from add_fixit_insert method calls.
341         (c_parser_parameter_declaration): Likewise.
342         * c-typeck.c (build_component_ref): Remove now-redundant range
343         param from add_fixit_replace method calls.
345 2016-08-25  Marek Polacek  <polacek@redhat.com>
347         * c-typeck.c (parser_build_binary_op): Pass LHS to
348         warn_logical_not_parentheses.
350 2016-08-25  Marek Polacek  <polacek@redhat.com>
352         PR c/77323
353         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
354         or _FloatN or _FloatNx is not supported.
355         (finish_declspecs): Set type to integer_type_node when _FloatN or
356         _FloatNx is not supported.
358 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
360         PR c/32187
361         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
362         (struct c_declspecs): Add field floatn_nx_idx.
363         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
364         and _FloatNx type specifiers.
365         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
366         (c_parser_declspecs, c_parser_attribute_any_word)
367         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
368         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
369         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
370         narrower than double.
372 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
373             Martin Liska  <mliska@suse.cz>
375         PR c/67410
376         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
377         % to determine val element to change.  Assert that
378         wchar_bytes * charwidth fits into val array.
380 2016-08-12  Marek Polacek  <polacek@redhat.com>
382         PR c/7652
383         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
384         (c_parser_postfix_expression): Likewise.
385         * c-typeck.c (build_unary_op): Adjust fall through comment.
386         (c_mark_addressable): Likewise.
388 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
390         PR c/72816
391         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
392         array member through typedef, for orig_qual_indirect == 0 clear
393         orig_qual_type.
395 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
397         PR c/64955
398         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
399         this up to selftest::run_c_tests.
400         (selftest::run_c_tests): New function.
402 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
404         * c-parser.c (struct oacc_routine_data): Add error_seen and
405         fndecl_seen members.
406         (c_finish_oacc_routine): Use these.
407         (c_parser_declaration_or_fndef): Adjust.
408         (c_parser_oacc_routine): Likewise.  Support more C language
409         constructs, and improve diagnostics.  Move pragma context
410         checking...
411         (c_parser_pragma): ... here.
413         * c-parser.c (struct oacc_routine_data): New.
414         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
415         Simplify code.
416         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
417         declare target" attribute.
419 2016-08-01  Jan Beulich  <jbeulich@suse.com>
421         * c-fold.c (c_fully_fold_internal): Also emit shift count
422         warnings for vector types.
423         * c-typeck.c (build_binary_op): Likewise.
425 2016-07-29  Marek Polacek  <polacek@redhat.com>
427         PR c/71742
428         * c-decl.c (finish_struct): Rephrase an error message.
430         PR c/71853
431         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
432         to error node for invalid code.
434         PR c/71573
435         * c-decl.c (implicitly_declare): Return decl early not only for
436         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
438 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
440         PR c/71969
441         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
442         on GNU extern inline functions.
444 2016-07-29  Marek Polacek  <polacek@redhat.com>
446         PR c/71583
447         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
448         check expr.value.
450 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
452         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
454 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
456         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
457         spellcheck-tree.h
458         (best_macro_match): Likewise, converting from a typedef to a
459         subclass.
460         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
461         (lookup_name_fuzzy): Update for change of best_macro_match to a
462         subclass with a ctor that calls cpp_forall_identifiers.
464 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
466         * c-decl.c (implicit_decl_warning): Update for conversion of
467         return type of lookup_name_fuzzy to const char *.
468         (undeclared_variable): Likewise.
469         (lookup_name_fuzzy): Convert return type from tree to
470         const char *.
471         * c-parser.c (c_parser_declaration_or_fndef): Update for
472         conversion of return type of lookup_name_fuzzy to const char *.
473         (c_parser_parameter_declaration): Likewise.
475 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
477         * c-parser.c (c_parser_oacc_declare): Don't scan for
478         GOMP_MAP_POINTER.
479         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
480         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
481         zero-length subarrays.
483 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
485         PR c/71858
486         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
487         instead of FUZZY_LOOKUP_NAME.
488         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
489         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
491 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
493         PR c/71858
494         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
496 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
498         * c-parser.c (c_parser_generic_selection): Make type of variable
499         auto_vec.
500         (c_parser_omp_declare_simd): Likewise.
502 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
504         * c-decl.c (struct c_struct_parse_info): Change member types
505         from vec to auto_vec.
506         (start_struct): Adjust.
507         (finish_struct): Likewise.
509 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
511         PR c/71719
512         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
514 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
516         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
517         Move pragma context checking into...
518         (c_parser_omp_cancellation_point): ... here, and improve
519         diagnostic messages.
520         * c-typeck.c (c_finish_omp_cancel)
521         (c_finish_omp_cancellation_point): Improve diagnostic messages.
523 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
525         PR c/71685
526         * c-typeck.c (c_build_qualified_type): Don't clear
527         C_TYPE_INCOMPLETE_VARS for the main variant.
529 2016-06-28  Martin Sebor  <msebor@redhat.com>
531         PR c/71552
532         * c-typeck.c (output_init_element): Diagnose incompatible types
533         before non-constant initializers.
535 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
537         * Make-lang.in: Don't cat ../stage_current if it does not exist.
539 2016-06-23  Andi Kleen  <ak@linux.intel.com>
541         * Make-lang.in: Add support for autofdo.
543 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
545         PR c/70339
546         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
547         (implicit_decl_warning): When issuing warnings for implicit
548         declarations, attempt to provide a suggestion via
549         lookup_name_fuzzy.
550         (undeclared_variable): Likewise when issuing errors.
551         (lookup_name_in_scope): Likewise.
552         (struct edit_distance_traits<cpp_hashnode *>): New struct.
553         (best_macro_match): New typedef.
554         (find_closest_macro_cpp_cb): New function.
555         (lookup_name_fuzzy): New function.
556         * c-parser.c: Include gcc-rich-location.h.
557         (c_token_starts_typename): Split out case CPP_KEYWORD into...
558         (c_keyword_starts_typename): ...this new function.
559         (c_parser_declaration_or_fndef): When issuing errors about
560         missing "struct" etc, add a fixit.  For other kinds of errors,
561         attempt to provide a suggestion via lookup_name_fuzzy.
562         (c_parser_parms_declarator): When looking ahead to detect typos in
563         type names, also reject CPP_KEYWORD.
564         (c_parser_parameter_declaration): When issuing errors about
565         unknown type names, attempt to provide a suggestion via
566         lookup_name_fuzzy.
567         * c-tree.h (c_keyword_starts_typename): New prototype.
569 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
571         PR c/71601
572         * c-typeck.c (build_conditional_expr): Return error_mark_node if
573         c_common_type returns error_mark_node.
575 2016-06-19  Martin Sebor  <msebor@redhat.com>
577         PR c/69507
578         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
579         __alignof__ (expression).
581 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
583         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
585 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
587         * c-typeck.c (build_component_ref): Simplify fixit code by
588         using gcc_rich_location::add_fixit_misspelled_id.
589         (set_init_label): Likewise.
591 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
593         * c-parser.c (c_parser_initelt): Provide location of name for new
594         location_t param of set_init_label.
595         * c-tree.h (set_init_label): Add location_t param.
596         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
597         param and use it when issuing error messages about unrecognized
598         field names.  Attempt to provide a fixit hint if appropriate,
599         otherwise update the error message to provide the type name.
601 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
603         PR c/71381
604         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
605         Loosen checking.
607 2016-06-08  Martin Sebor  <msebor@redhat.com>
608             Jakub Jelinek  <jakub@redhat.com>
610         PR c++/70507
611         PR c/68120
612         * c-typeck.c (convert_arguments): Don't promote last argument
613         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
615 2016-06-08  Marek Polacek  <polacek@redhat.com>
617         PR c/71418
618         * c-decl.c (grokdeclarator): Check TYPE_P.
620         PR c/71426
621         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
622         code.
624 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
626         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
627         and structure element reference, capture the location of the
628         element name token and pass it to build_component_ref.
629         (c_parser_postfix_expression_after_primary): Likewise for
630         structure element dereference.
631         (c_parser_omp_variable_list): Likewise for
632         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
633         * c-tree.h (build_component_ref): Add location_t param.
634         * c-typeck.c (build_component_ref): Add location_t param
635         COMPONENT_LOC.  Use it, if available, when issuing hints about
636         mispelled member names to provide a fixit replacement hint.
638 2016-06-06  Marek Polacek  <polacek@redhat.com>
640         PR c/71362
641         * c-parser.c (c_parser_direct_declarator): Set location.
643 2016-06-06  Marek Polacek  <polacek@redhat.com>
645         * c-typeck.c (comptypes_internal): Handle comparisons of
646         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
647         TYPE_REF_CAN_ALIAS_ALL.
649 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
651         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
652         arguments as addressable when async clause exists.
654 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
656         PR c++/71349
657         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
658         when combined with target construct.
660 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
662         * c-parser.c (c_parser_omp_clause_schedule): Warn if
663         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
665 2016-05-25  Marek Polacek  <polacek@redhat.com>
667         PR c/71265
668         * c-decl.c (c_make_fname_decl): Don't check seen_error.
670         PR c/71266
671         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
673 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
675         * c-parser.c (c_parser_oacc_declare): Add support for
676         GOMP_MAP_FIRSTPRIVATE_POINTER.
677         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
678         argument with enum c_omp_region_type ort.
679         (handle_omp_array_sections): Likewise.  Update call to
680         handle_omp_array_sections_1.
681         (c_finish_omp_clauses): Add specific errors and warning messages for
682         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
683         call to handle_omp_array_sections.
685 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
687         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
689 2016-05-24  Richard Biener  <rguenther@suse.de>
691         PR middle-end/70434
692         PR c/69504
693         * c-typeck.c (build_array_ref): Do not complain about indexing
694         non-lvalue vectors.  Adjust for function name change.
696 2016-05-20  Martin Sebor  <msebor@redhat.com>
698         PR c/71115
699         * c-typeck.c (error_init): Use
700         expansion_point_location_if_in_system_header.
701         (warning_init): Same.
703 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
705         PR c/71171
706         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
707         in error-handling.
708         (c_parser_postfix_expression): Likewise.
709         * c-tree.h (c_expr::set_error): New method.
710         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
711         that result's range is initialized.
713 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
715         * c-typeck.c (parser_build_unary_op): Fix formatting.
717 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
719         * c-decl.c (grokdeclarator): Remove errmsg and use of
720         targetm.invalid_return_type.
721         (grokparms): Remove errmsg and use of
722         targetm.invalid_parameter_type.
724 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
726         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
727         function return type.
729 2016-05-12  Marek Polacek  <polacek@redhat.com>
731         PR c/70756
732         * c-decl.c (build_compound_literal): Pass LOC down to
733         c_incomplete_type_error.
734         * c-tree.h (require_complete_type): Adjust declaration.
735         (c_incomplete_type_error): Likewise.
736         * c-typeck.c (require_complete_type): Add location parameter, pass it
737         down to c_incomplete_type_error.
738         (c_incomplete_type_error): Add location parameter, pass it down to
739         error_at.
740         (build_component_ref): Pass location down to c_incomplete_type_error.
741         (default_conversion): Pass location down to require_complete_type.
742         (build_array_ref): Likewise.
743         (build_function_call_vec): Likewise.
744         (convert_arguments): Likewise.
745         (build_unary_op): Likewise.
746         (build_c_cast): Likewise.
747         (build_modify_expr): Likewise.
748         (convert_for_assignment): Likewise.
749         (c_finish_omp_clauses): Likewise.
751 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
753         PR c/43651
754         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
755         is enabled.
756         * c-errors.c (pedwarn_c90): Return true if warned.
757         * c-tree.h (pedwarn_c90): Change return type to bool.
758         (enum c_declspec_word): Add new enumerator cdw_atomic.
760 2016-05-11  Marek Polacek  <polacek@redhat.com>
762         PR c++/71024
763         * c-decl.c (diagnose_mismatched_decls): Factor out code to
764         diagnose_mismatched_attributes and call it.
766 2016-05-10  Marek Polacek  <polacek@redhat.com>
768         PR c/70255
769         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
770         on a declaration following the definition.
772 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
774         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
775         parse it through to c_parser_c99_block_statement.
776         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
777         caller.
779 2016-05-04  Marek Polacek  <polacek@redhat.com>
781         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
782         OPT_Wdangling_else.
784 2016-05-04  Marek Polacek  <polacek@redhat.com>
786         PR c/48778
787         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
788         for macro expansions.
790 2016-05-03  Marek Polacek  <polacek@redhat.com>
792         PR c/70859
793         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
794         check_builtin_function_arguments.
796 2016-05-03  Richard Biener  <rguenther@suse.de>
798         * Make-lang.in (cc1-checksum.c): For stage-final re-use
799         the checksum from the previous stage.
801 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
803         * c-parser.c (c_parser_oacc_all_clauses): Update call to
804         c_finish_omp_clauses.
805         (c_parser_omp_all_clauses): Likewise.
806         (c_parser_oacc_cache): Likewise.
807         (c_parser_oacc_loop): Likewise.
808         (omp_split_clauses): Likewise.
809         (c_parser_omp_declare_target): Likewise.
810         (c_parser_cilk_all_clauses): Likewise.
811         (c_parser_cilk_for): Likewise.
812         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
813         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
815 2016-05-02  Marek Polacek  <polacek@redhat.com>
817         PR c/70851
818         * c-decl.c (grokdeclarator): Diagnose when array's size has an
819         incomplete type.
821 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
823         PR middle-end/70626
824         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
825         OACC_LOOP_CLAUSE_MASK.
826         (c_parser_oacc_kernels_parallel): Update call to
827         c_oacc_split_loop_clauses.
829 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
831         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
832         argument to build_modify_expr in two cases.
834 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
836         * c-parser.c (c_parser_postfix_expression_after_primary): Call
837         warn_for_memset instead of warning directly here.
839 2016-04-26  Marek Polacek  <polacek@redhat.com>
841         PR c/67784
842         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
843         out of ...
844         (c_parser_for_statement): ... here.
845         (c_parser_if_statement): Use it.
846         (c_parser_switch_statement): Use it.
847         (c_parser_while_statement): Use it.
849         PR c/70791
850         * c-decl.c (pushdecl): Pass LOCUS down to warning.
852 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
854         PR c++/69363
855         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
856         instead of c_finish_cilk_clauses.
857         * c-tree.h (c_finish_omp_clauses): Add new default argument.
858         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
859         floating-point variables in the linear clause for Cilk Plus.
861 2016-04-18  Michael Matz  <matz@suse.de>
863         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
864         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
866 2016-04-15  Marek Polacek  <polacek@redhat.com>
868         PR c/70671
869         * c-typeck.c (build_unary_op): Pass location down to error and
870         warning call.
872 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
874         PR c/70436
875         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
876         where needed.
877         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
878         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
879         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
880         Adjust c_parser_pragma callers.
881         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
882         caller.
883         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
884         c_parser_statement.
885         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
886         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
887         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
888         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
889         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
890         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
891         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
892         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
893         down where needed.
894         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
895         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
896         calls.
898 2016-04-13  Marek Polacek  <polacek@redhat.com>
900         PR c/70436
901         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
902         adjust callers.
903         (c_parser_statement): Likewise.
904         (c_parser_c99_block_statement): Likewise.
905         (c_parser_while_statement): Likewise.
906         (c_parser_for_statement): Likewise.
907         (c_parser_if_body): Don't set IF_P here.
908         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
909         about dangling else here.
910         * c-tree.h (c_finish_if_stmt): Adjust declaration.
911         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
912         warn about dangling else here.
914 2016-04-04  Marek Polacek  <polacek@redhat.com>
916         PR c/70307
917         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
919 2016-03-31  Marek Polacek  <polacek@redhat.com>
921         PR c/70297
922         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
924 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
926         PR c/70281
927         * c-parser.c (c_parser_postfix_expression): Set the source range
928         for uses of "__builtin_types_compatible_p".
930 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
932         PR c/70280
933         * c-typeck.c (composite_type): Don't count void_list_node
934         into len, if the list is terminated by void_list_node, start
935         with void_list_node instead of NULL for newargs.  Stop
936         at void_list_node.
938 2016-03-16  Marek Polacek  <polacek@redhat.com>
940         PR c/70093
941         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
942         nested functions returning VM types.
944 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
946         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
947         when calling c_finish_omp_clauses.
949 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
951         PR c/69824
952         * c-decl.c (get_parm_info): Don't queue implicit function declarations
953         for later.
955 2016-03-04  Marek Polacek  <polacek@redhat.com>
957         PR c/69798
958         * c-parser.c (c_parser_postfix_expression): Call
959         c_parser_cast_expression rather than c_parser_postfix_expression.
961 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
963         PR c/69796
964         PR c/69974
965         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
966         of incomplete decls to error_mark_node.
968 2016-02-24  Marek Polacek  <polacek@redhat.com>
970         PR c/69819
971         * c-decl.c (finish_decl): Don't update the copy of the type of a
972         different decl type.
974 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
976         PR objc/69844
977         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
978         in id_kind reclassification.
980 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
982         PR c/69835
983         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
985 2016-02-16  James Norris  <jnorris@codesourcery.com>
987         PR c/64748
988         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
990 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
992         * c-decl.c (build_null_declspecs): Zero the entire struct.
994         PR c/69522
995         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
996         callers changed.  If nested_p is true, use it to call
997         finish_implicit_inits.
998         * c-tree.h (finish_implicit_inits): Declare.
999         * c-typeck.c (finish_implicit_inits): New function.  Move code
1000         from ...
1001         (push_init_level): ... here.
1002         (set_designator, process_init_element): Call finish_implicit_inits.
1004 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
1006         PR c/69768
1007         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1008         arguments for -Waddress warning.
1010 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
1012         PR c/69669
1013         * c-decl.c (finish_enum): When honoring mode attribute,
1014         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1016 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
1018         PR debug/69518
1019         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1020         all type variants, not just TYPE_MAIN_VARIANT.
1022 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
1024         PR debug/66869
1025         * c-decl.c (c_write_global_declarations_1): Warn with
1026         warn_unused_function if static prototype without definition
1027         is not C_DECL_USED.
1029 2016-01-27  Marek Polacek  <polacek@redhat.com>
1031         PR c/68062
1032         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1033         to unsigned, if needed.  Add -Wsign-compare warning.
1035 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
1037         PR tree-optimization/69483
1038         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1040 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1042         PR c/24293
1043         * c-tree.h (incomplete_record_decls): Declare.
1044         * c-parser.c (incomplete_record_decls): Define.
1045         (c_parser_translation_unit): Iterate through incomplete_record_decls and
1046         report error if any decl has zero size.
1047         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1048         or enum type to incomplete_record_decls.
1050 2016-01-14  Tom de Vries  <tom@codesourcery.com>
1052         PR tree-optimization/68773
1053         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1054         set force_output.
1056 2016-01-14  Marek Polacek  <polacek@redhat.com>
1058         PR c/69262
1059         * c-decl.c (grokdeclarator): Provide more information for invalid
1060         array declarations.
1062 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
1064         * c-parser.c (c_parser_unary_expression): For dereferences, build
1065         a combined location before calling build_indirect_ref, so that
1066         error reports cover the full range, manually updating the c_expr
1067         src_range.
1069 2016-01-06  Marek Polacek  <polacek@redhat.com>
1071         PR sanitizer/69099
1072         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
1073         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
1074         NULL.
1076 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1078         Update copyright years.
1080 2016-01-04  Marek Polacek  <polacek@redhat.com>
1082         PR c/68908
1083         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
1084         optimization to use __atomic_fetch_* built-in if possible.
1086 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
1088         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1089         into...
1090         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
1091         all users.
1093 2015-12-22  Marek Polacek  <polacek@redhat.com>
1095         PR c/69002
1096         * c-typeck.c (build_component_ref): Warn when acessing elements of
1097         atomic structures or unions.
1099 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
1101         * c-typeck.c: Include "gcc-rich-location.h".
1102         (build_binary_op): In the two places that call binary_op_error,
1103         create a gcc_rich_location and populate it with the location of
1104         the binary op and its two operands.
1106 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1108         * c-parser.c (c_parser_statement_after_labels): When calling
1109         c_finish_return, Use the return expression's location if it has
1110         one, falling back to the location of the first token within it.
1111         * c-typeck.c (c_finish_return): When issuing warnings about
1112         the incorrect presence/absence of a return value, issue a note
1113         showing the declaration of the function.
1115 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1117         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1118         to 4.
1119         (c_parser_peek_nth_token): New function.
1120         (c_parser_peek_conflict_marker): New function.
1121         (c_parser_error): Detect conflict markers and report them as such.
1123 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1125         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1126         to preserve range information for the primary expression
1127         in the call to c_parser_postfix_expression_after_primary.
1129 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1131         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1132         expression location, falling back on the first token location,
1133         rather than always using the latter.
1135 2015-12-16  Marek Polacek  <polacek@redhat.com>
1137         PR c/64637
1138         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1139         available.
1141 2015-12-15  Marek Polacek  <polacek@redhat.com>
1143         PR c/68907
1144         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1145         artificial decl.
1147 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
1149         * c-parser.c (c_parser_alignof_expression): Capture location of
1150         closing parenthesis (if any), or of end of unary expression, and
1151         use it to build a src_range for the expression.
1153 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
1155         PR c/68757
1156         * c-parser.c (c_parser_get_builtin_args): Add
1157         "out_close_paren_loc" param, and write back to it.
1158         (c_parser_postfix_expression): Capture the closing
1159         parenthesis location for RID_CHOOSE_EXPR,
1160         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1161         RID_BUILTIN_SHUFFLE and use it to set the source range
1162         for such expressions; within RID_BUILTIN_COMPLEX set
1163         the underlying location.
1165 2015-12-07  Marek Polacek  <polacek@redhat.com>
1167         PR c/68668
1168         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1169         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1171 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
1173         * c-tree.h (c_build_va_arg): Adjust prototype.
1174         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1175         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1176         parameter, adjust throughout and issue an error if EXPR is a component
1177         with reverse storage order.
1179 2015-12-02  Jason Merrill  <jason@redhat.com>
1181         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1182         (c_fully_fold_internal, decl_constant_value_for_optimization):
1183         Move from c-common.c.
1184         * c-tree.h: Declare decl_constant_value_for_optimization.
1185         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1187 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
1189         PR c/68162
1190         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1191         following link from declarator to next declarator.  Track original
1192         qualified type and pass it to c_build_qualified_type.
1193         * c-typeck.c (c_build_qualified_type): Add arguments
1194         orig_qual_type and orig_qual_indirect.
1196 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
1198         * c-parser.c (c_parser_omp_clause_name)
1199         (c_parser_oacc_all_clauses): Alphabetical sorting.
1201 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
1203         PR c/68533
1204         * c-decl.c (get_parm_info): Use b->locus instead of input_location
1205         for diagnostics.
1207 2015-12-01  Julian Brown  <julian@codesourcery.com>
1208             Cesar Philippidis  <cesar@codesourcery.com>
1209             James Norris  <James_Norris@mentor.com>
1211         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1212         (c_parser_oacc_clause_use_device): New function.
1213         (c_parser_oacc_all_clauses): Add use_device support.
1214         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1215         (c_parser_oacc_host_data): New function.
1216         (c_parser_omp_construct): Add host_data support.
1217         * c-tree.h (c_finish_oacc_host_data): Add prototype.
1218         * c-typeck.c (c_finish_oacc_host_data): New function.
1219         (c_finish_omp_clauses): Add use_device support.
1221 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
1223         PR c/67106
1224         * c-decl.c: Set TYPE_PACKED in variants.
1226 2015-11-27  Martin Liska  <mliska@suse.cz>
1228         PR c++/68312
1229         * c-array-notation.c (fix_builtin_array_notation_fn):
1230         Use release_vec_vec instead of vec::release.
1231         (build_array_notation_expr): Likewise.
1232         (fix_conditional_array_notations_1): Likewise.
1233         (fix_array_notation_expr): Likewise.
1234         (fix_array_notation_call_expr): Likewise.
1236 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
1238         PR c/63326
1239         * c-parser.c (c_parser_compound_statement_nostart): If
1240         last_label is true, use pragma_stmt instead of pragma_compound
1241         as second c_parser_pragma argument.
1242         (c_parser_omp_ordered, c_parser_omp_target_update,
1243         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1244         false as second argument to c_parser_skip_to_pragma_eol after
1245         diagnosing standalone directives used in pragma_stmt context.
1247 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
1249         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1250         with "if (ENABLE_OFFLOADING)".
1252 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
1254         PR objc/68438
1255         * c-parser.c (c_parser_postfix_expression): Set up source ranges
1256         for various Objective-C constructs: Class.name syntax,
1257         @selector(), @protocol(), @encode(), and [] message syntax.
1259 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
1261         PR 62314
1262         * c-typeck.c (should_suggest_deref_p): New function.
1263         (build_component_ref): Special-case POINTER_TYPE when
1264         generating a "not a structure of union"  error message, and
1265         suggest a "->" rather than a ".", providing a fix-it hint.
1267 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
1269         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1270         candidate into a new function, find_closest_identifier.
1272 2015-11-19  Marek Polacek  <polacek@redhat.com>
1274         PR c/68412
1275         * c-typeck.c (parser_build_binary_op): Properly handle
1276         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1278 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
1280         * c-parser.c (set_c_expr_source_range): Bulletproof both
1281         overloaded implementations against NULL expr->value.
1282         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1283         values.
1284         (c_parser_unary_expression): Likewise when handling addresses of
1285         labels.
1286         (c_parser_postfix_expression): Likewise for statement expressions,
1287         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1288         __builtin_va_arg, and for __builtin_offset_of.
1289         (c_parser_postfix_expression_after_paren_type): Initialize expr's
1290         src_range using the range of the braced initializer.
1291         (c_parser_transaction_expression): Set src_range for "ret" to a
1292         sane pair of values.
1294 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
1296         * c-parser.c (c_finish_omp_declare_simd): Look for
1297         "simd" attribute as well. Update error message.
1299 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1301         * c-parser.c (c_parser_omp_declare_target): Adjust.
1303 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
1305         * c-typeck.c (c_finish_omp_clauses): Don't mark
1306         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1308 2015-11-14  Marek Polacek  <polacek@redhat.com>
1310         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1311         * c-typeck.c: Likewise.
1313 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1315         * c-decl.c (warn_defaults_to): Pass line_table to
1316         rich_location ctor.
1317         * c-errors.c (pedwarn_c99): Likewise.
1318         (pedwarn_c90): Likewise.
1319         * c-parser.c (set_c_expr_source_range): New functions.
1320         (c_token::get_range): New method.
1321         (c_token::get_finish): New method.
1322         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1323         based on the range from the start of the LHS to the end of the
1324         RHS.
1325         (c_parser_conditional_expression): Likewise, based on the range
1326         from the start of the cond.value to the end of exp2.value.
1327         (c_parser_binary_expression): Call set_c_expr_source_range on
1328         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1329         (c_parser_cast_expression): Call set_c_expr_source_range on ret
1330         based on the cast_loc through to the end of the expr.
1331         (c_parser_unary_expression): Likewise, based on the
1332         op_loc through to the end of op.
1333         (c_parser_sizeof_expression) Likewise, based on the start of the
1334         sizeof token through to either the closing paren or the end of
1335         expr.
1336         (c_parser_postfix_expression): Likewise, using the token range,
1337         or from the open paren through to the close paren for
1338         parenthesized expressions.
1339         (c_parser_postfix_expression_after_primary): Likewise, for
1340         various kinds of expression.
1341         * c-tree.h (struct c_expr): Add field "src_range".
1342         (c_expr::get_start): New method.
1343         (c_expr::get_finish): New method.
1344         (set_c_expr_source_range): New decls.
1345         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1346         on ret for prefix unary ops.
1347         (parser_build_binary_op): Likewise, running from the start of
1348         arg1.value through to the end of arg2.value.
1350 2015-11-13  Marek Polacek  <polacek@redhat.com>
1352         PR c/68320
1353         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1355 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1357         * c-typeck.c: Include spellcheck.h.
1358         (lookup_field_fuzzy_find_candidates): New function.
1359         (lookup_field_fuzzy): New function.
1360         (build_component_ref): If the field was not found, try using
1361         lookup_field_fuzzy and potentially offer a suggestion.
1363 2015-11-12  James Norris  <jnorris@codesourcery.com>
1364             Joseph Myers  <joseph@codesourcery.com>
1366         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1367         (c_parser_omp_clause_name): Handle 'device_resident' clause.
1368         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1369         and PRAGMA_OMP_CLAUSE_LINK.
1370         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1371         and PRAGMA_OACC_CLAUSE_LINK.
1372         (OACC_DECLARE_CLAUSE_MASK): New definition.
1373         (c_parser_oacc_declare): New function.
1375 2015-11-12  Marek Polacek  <polacek@redhat.com>
1377         PR c/67784
1378         * c-parser.c (c_parser_for_statement): Reclassify the token in
1379         a correct scope.
1381 2015-11-11  Marek Polacek  <polacek@redhat.com>
1383         PR c/68107
1384         PR c++/68266
1385         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
1386         checking the size of an array.
1388 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
1390         * c-array-notation.c: Remove unused header files.
1391         * c-aux-info.c: Likewise.
1392         * c-convert.c: Likewise.
1393         * c-decl.c: Likewise.
1394         * c-errors.c: Likewise.
1395         * c-lang.c: Likewise.
1396         * c-objc-common.c: Likewise.
1397         * c-parser.c: Likewise.
1398         * c-typeck.c: Likewise.
1399         * gccspec.c: Likewise.
1401 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
1402             Cesar Philippidis  <cesar@codesourcery.com>
1403             James Norris  <jnorris@codesourcery.com>
1404             Julian Brown  <julian@codesourcery.com>
1405             Nathan Sidwell  <nathan@codesourcery.com>
1407         c/
1408         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1409         routine arg.
1410         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1411         (c_parser_pragma): Parse 'acc routine'.
1412         (OACC_ROUTINE_CLAUSE_MARK): Define.
1413         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1415 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1417         PR debug/67192
1418         * c-typeck.c (c_finish_loop): For unconditional loops, set the
1419         location of the backward-goto to the start of the loop body.
1421 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1423         PR debug/67192
1424         * c-parser.c (c_parser_while_statement): Finish the loop before
1425         parsing ahead for misleading indentation.
1426         (c_parser_for_statement): Likewise.
1428 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1430         * c-decl.c (finish_struct): If the structure has reverse storage
1431         order, rewrite the type of array fields with scalar component.  Call
1432         maybe_apply_pragma_scalar_storage_order on entry.
1433         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
1434         errors on bit-fields and reverse SSO here and not...
1435         (c_mark_addressable): ...here.
1436         (output_init_element): Adjust call to initializer_constant_valid_p.
1437         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1439 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
1441         * c-decl.c (warn_defaults_to): Update for change in signature
1442         of diagnostic_set_info.
1443         * c-errors.c (pedwarn_c99): Likewise.
1444         (pedwarn_c90): Likewise.
1445         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1446         for textinfo::set_location.
1448 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
1449             Thomas Schwinge  <thomas@codesourcery.com>
1450             James Norris  <jnorris@codesourcery.com>
1452         * c-parser.c (c_parser_omp_clause_name): Add support for
1453         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1454         (c_parser_omp_clause_default): Add is_oacc argument. Handle
1455         default(none) in OpenACC.
1456         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1457         arguments.
1458         (c_parser_oacc_clause_tile): New function.
1459         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1460         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1461         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1462         TILE}.
1463         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1464         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1465         FIRSTPRIVATE}.
1466         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1467         (c_parser_oacc_update): Update the error message for missing clauses.
1468         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1469         and OMP_CLAUSE_INDEPENDENT.
1471 2015-11-05  Marek Polacek  <polacek@redhat.com>
1473         PR c/68090
1474         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1475         deal with pre-evaluation on invalid types.
1477 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
1478             Ilya Verbin  <ilya.verbin@intel.com>
1480         * c-parser.c: Include context.h and gimple-expr.h.
1481         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1482         monotonic together with nonmonotonic.
1483         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
1484         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1485         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1486         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1487         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
1488         expressions on combined target teams before the target.
1489         (c_parser_omp_declare_target): If decl has "omp declare target" or
1490         "omp declare target link" attribute, and cgraph or varpool node already
1491         exists, then set corresponding flags.  Call c_finish_omp_clauses
1492         in the parenthesized extended-list syntax case.
1493         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1494         declare target.
1495         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1496         on OMP_CLAUSE_REDUCTION array sections.
1497         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1498         into the constant offset, or for variable low-bound using
1499         POINTER_PLUS_EXPR.  For structure element based array sections use
1500         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1501         (c_finish_omp_clauses): Drop generic_field_head, structure
1502         elements are now always mapped even as array section bases,
1503         diagnose same var in data sharing and mapping clauses.  Diagnose if
1504         linear step on declare simd is neither a constant nor a uniform
1505         parameter.  Look through POINTER_PLUS_EXPR for array section
1506         reductions.  Diagnose the same var or function appearing multiple
1507         times on the same directive.  Fix up wording for the to clause if t
1508         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
1509         modifier on kinds other than dynamic or guided or nonmonotonic
1510         modifier together with ordered clause.
1512 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
1513             Chung-Lin Tang  <cltang@codesourcery.com>
1515         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1517 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
1519         * c-array-notation.c: Reorder #include's and remove duplicates.
1520         * c-aux-info.c: Likewise.
1521         * c-convert.c: Likewise.
1522         * c-decl.c: Likewise.
1523         * c-errors.c: Likewise.
1524         * c-lang.c: Likewise.
1525         * c-objc-common.c: Likewise.
1526         * c-parser.c: Likewise.
1527         * c-typeck.c: Likewise.
1529 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
1531         PR debug/66068
1532         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1533         after calling build_qualified_type.
1535 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
1536             Thomas Schwinge  <thomas@codesourcery.com>
1537             James Norris  <jnorris@codesourcery.com>
1538             Joseph Myers  <joseph@codesourcery.com>
1539             Julian Brown  <julian@codesourcery.com>
1540             Bernd Schmidt  <bschmidt@redhat.com>
1542         * c-parser.c (c_parser_oacc_shape_clause): New.
1543         (c_parser_oacc_simple_clause): New.
1544         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1545         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1547 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
1548             James Norris  <jnorris@codesourcery.com>
1549             Cesar Philippidis  <cesar@codesourcery.com>
1551         PR c/64765
1552         PR c/64880
1553         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1554         parameters, and handle these.  Adjust all users.
1555         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1556         into...
1557         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
1558         all users.
1559         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1560         declare functions.
1561         (c_finish_omp_construct): Declare function.
1562         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1563         Merge functions into...
1564         (c_finish_omp_construct): ... this new function.
1566 2015-10-22  Richard Biener  <rguenther@suse.de>
1568         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1569         before folding a MINUS_EXPR.
1571 2015-10-21  Marek Polacek  <polacek@redhat.com>
1573         PR c/68024
1574         * c-decl.c (start_function): Warn about vararg functions without
1575         a prototype.
1577 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
1579         * c-typeck.c (build_conditional_expr): Use boolean vector
1580         type for vector comparison.
1581         (build_vec_cmp): New.
1582         (build_binary_op): Use build_vec_cmp for comparison.
1584 2015-10-20  Marek Polacek  <polacek@redhat.com>
1586         * c-parser.c (is_cilkplus_vector_p): Don't define here.
1588 2015-10-20  Marek Polacek  <polacek@redhat.com>
1590         PR c/67964
1591         * c-parser.c (c_parser_attributes): Break out of the loop if the
1592         token after an attribute isn't a comma.
1594 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
1595             Aldy Hernandez  <aldyh@redhat.com>
1597         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1598         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1599         (c_parser_omp_variable_list): Handle structure elements for
1600         map, to and from clauses.  Handle array sections in reduction
1601         clause.  Formatting fixes.
1602         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1603         if clause modifiers.
1604         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1605         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1606         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1607         c_parser_omp_clause_is_device_ptr): New functions.
1608         (c_parser_omp_clause_ordered): Parse optional parameter.
1609         (c_parser_omp_clause_reduction): Handle array reductions.
1610         (c_parser_omp_clause_schedule): Parse optional simd modifier.
1611         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1612         functions.
1613         (c_parser_omp_clause_linear): Parse linear clause modifiers.
1614         (c_parser_omp_clause_depend_sink): New function.
1615         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1616         (c_parser_omp_clause_map): Parse release/delete map kinds and
1617         optional always modifier.
1618         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1619         and c_finish_omp_clauses callers.
1620         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
1621         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1622         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1623         (OMP_CRITICAL_CLAUSE_MASK): Define.
1624         (c_parser_omp_critical): Parse critical clauses.
1625         (c_parser_omp_for_loop): Handle doacross loops, adjust
1626         c_finish_omp_for and c_finish_omp_clauses callers.
1627         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1628         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1629         (OMP_FOR_CLAUSE_MASK): Add linear clause.
1630         (c_parser_omp_for): Disallow ordered clause when combined with
1631         distribute.  Disallow linear clause when combined with distribute
1632         and not combined with simd.
1633         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1634         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1635         parse clauses and if depend clause is found, don't parse a body.
1636         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1637         Allow target parallel without for after it.
1638         (OMP_TASK_CLAUSE_MASK): Add priority clause.
1639         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1640         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1641         invalid kinds.
1642         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1643         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1644         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1645         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1646         functions.
1647         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1648         defaultmap and is_device_ptr clauses.
1649         (c_parser_omp_target): Parse target parallel and target simd.  Set
1650         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
1651         and target exit data.  Diagnose invalid map kinds.
1652         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1653         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1654         construct.
1655         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1656         &omp_priv.
1657         (OMP_TASKLOOP_CLAUSE_MASK): Define.
1658         (c_parser_omp_taskloop): New function.
1659         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1660         handle PRAGMA_OMP_TASKLOOP.
1661         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1662         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1663         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1664         Add IS_OMP argument, handle structure element bases, diagnose
1665         bitfields, pass IS_OMP recursively, diagnose known zero length
1666         array sections in depend clauses, handle array sections in reduction
1667         clause, diagnose negative length even for pointers.
1668         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1669         types, pass IS_OMP down to handle_omp_array_sections_1, handle
1670         array sections in reduction clause, set
1671         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1672         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1673         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1674         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1676 2015-10-06  Marek Polacek  <polacek@redhat.com>
1678         * c-parser.c (c_parser_statement_after_labels): Use
1679         protected_set_expr_location.
1680         (c_parser_omp_clause_num_gangs): Likewise.
1681         (c_parser_omp_clause_num_threads): Likewise.
1682         (c_parser_omp_clause_num_workers): Likewise.
1683         (c_parser_omp_clause_vector_length): Likewise.
1684         (c_parser_omp_clause_num_teams): Likewise.
1685         (c_parser_omp_clause_thread_limit): Likewise.
1686         * c-typeck.c (build_c_cast): Likewise.
1687         (c_cast_expr): Likewise.
1689 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
1691         * c-typeck.c (c_tree_equal): Use real_equal instead of
1692         REAL_VALUES_EQUAL.
1694 2015-10-04  Jason Merrill  <jason@redhat.com>
1696         * c-parser.c (c_lex_one_token): Handle @synchronized.
1697         * c-decl.c (match_builtin_function_types): A declaration of a built-in
1698         can change whether the function is transaction_safe.
1700 2015-10-02  Marek Polacek  <polacek@redhat.com>
1702         PR c/67730
1703         * c-typeck.c (convert_for_assignment): Use the expansion point
1704         location throughout.
1706 2015-10-02  Marek Polacek  <polacek@redhat.com>
1708         PR c/64249
1709         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1710         and pass it down to c_parser_if_statement.
1711         (c_parser_else_body): Add CHAIN parameter and pass it down to
1712         c_parser_statement_after_labels.
1713         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
1714         duplicated if-else-if conditions.
1716 2015-10-01  Marek Polacek  <polacek@redhat.com>
1718         * c-typeck.c (convert_for_assignment): Improve commentary.
1720 2015-09-30  Marek Polacek  <polacek@redhat.com>
1722         PR c/67730
1723         * c-typeck.c (c_finish_return): Use the expansion point location for
1724         certain "return with value" warnings.
1726 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1728         * c-parser.c (pragma_lex): Add loc argument.
1730 2015-09-15  Marek Polacek  <polacek@redhat.com>
1732         PR c/67580
1733         * c-decl.c (tag_exists_p): New function.
1734         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1735         struct/union/enum keywords are missing.
1736         * c-tree.h (tag_exists_p): Declare.
1738 2015-09-15  Marek Polacek  <polacek@redhat.com>
1740         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1741         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1742         Return NULL_TREE instead of 0.
1743         (lookup_name): Return NULL_TREE instead of 0.
1744         (lookup_name_in_scope): Likewise.
1745         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1746         (parser_xref_tag): Use false instead of 0.
1747         (start_struct): Use true instead of 1.
1748         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1750 2015-09-14  Marek Polacek  <polacek@redhat.com>
1752         * c-typeck.c (set_nonincremental_init_from_string): Use
1753         HOST_WIDE_INT_M1U when shifting a negative value.
1755 2015-09-09  Mark Wielaard  <mjw@redhat.com>
1757         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1758         parm against NULL.
1760 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
1762         PR c/67502
1763         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1764         into OMP_FOR_PRE_BODY rather than before the loop.
1766 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
1768         PR c/67501
1769         * c-parser.c (c_parser_oacc_all_clauses,
1770         c_parser_omp_all_clauses): Remove invalid clause from
1771         list of clauses even if parser->error is set.
1773         PR c/67500
1774         * c-parser.c (c_parser_omp_clause_aligned,
1775         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1776         test for errors.
1777         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1778         error_mark_node.
1780         PR c/67495
1781         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1782         instead of c_parser_unary_expression.  If the result is !lvalue_p,
1783         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1785 2015-09-04  Marek Polacek  <polacek@redhat.com>
1787         PR sanitizer/67279
1788         * c-typeck.c (build_binary_op): Don't instrument static initializers.
1790 2015-09-03  Martin Sebor  <msebor@redhat.com>
1792         PR c/66516
1793         * c-typeck.c (convert_arguments, parser_build_unary_op,
1794         build_conditional_expr, c_cast_expr, convert_for_assignment,
1795         build_binary_op, _objc_common_truthvalue_conversion): Call
1796         reject_gcc_builtin.
1797         (c_decl_implicit): Define.
1799 2015-09-02  Marek Polacek  <polacek@redhat.com>
1801         PR c/67432
1802         * c-parser.c (c_parser_enum_specifier): Give a better error for
1803         an empty enum.
1805 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
1807         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1809 2015-08-12  Marek Polacek  <polacek@redhat.com>
1811         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1812         LOC to it.
1814 2015-08-03  Marek Polacek  <polacek@redhat.com>
1816         PR c/67088
1817         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1818         Use it.
1819         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1821 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
1823         * c-parser.c (c_parser_if_body): Take token_indent_info
1824         argument. Call warn_for_misleading_indentation even when the
1825         body is a semicolon.  Extract token_indent_infos corresponding
1826         to the guard, body and next tokens.  Adjust call to
1827         warn_for_misleading_indentation accordingly.
1828         (c_parser_else_body): Likewise.
1829         (c_parser_if_statement): Likewise.
1830         (c_parser_while_statement): Likewise.
1831         (c_parser_for_statement): Likewise.
1833 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
1834             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1836         * c-decl.c (get_parm_info): Remove static var. Update warning
1837         message.
1839 2015-07-27  Marek Polacek  <polacek@redhat.com>
1841         PR c++/66555
1842         PR c/54979
1843         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1845 2015-07-20  Marek Polacek  <polacek@redhat.com>
1847         PR c++/55095
1848         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1849         (build_binary_op): Warn about left shift overflows.
1851 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
1853         * c-array-notation.c: Adjust includes for flags.h changes.
1854         * c-objc-common.c: Likewise.
1856 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
1858         * c-array-notation.c: Adjust includes.
1859         * c-aux-info.c: Likewise.
1860         * c-convert.c: Likewise.
1861         * c-decl.c: Likewise.
1862         * c-errors.c: Likewise.
1863         * c-lang.c: Likewise.
1864         * c-objc-common.c: Likewise.
1865         * c-parser.c: Likewise.
1866         * c-typeck.c: Likewise.
1868 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1870         PR fortran/66605
1871         * c-decl.c (finish_function): Call do_warn_unused_parameter.
1873 2015-06-29  Marek Polacek  <polacek@redhat.com>
1875         PR c/66322
1876         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1877         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
1878         about -Wswitch-bool here.
1879         (do_case): Update c_add_case_label call.
1880         (c_finish_case): Update c_do_switch_warnings call.
1882 2015-06-27  Marek Polacek  <polacek@redhat.com>
1884         * c-typeck.c: Use VECTOR_TYPE_P throughout.
1886 2015-06-26  Marek Polacek  <polacek@redhat.com>
1888         * c-array-notation.c (fix_builtin_array_notation_fn): Use
1889         INDIRECT_REF_P.
1890         * c-typeck.c (array_to_pointer_conversion): Likewise.
1891         (build_unary_op): Likewise.
1892         (c_finish_return): Likewise.
1894 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
1896         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1897         * c-parser.c: Likewise.
1899 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
1901         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1902         instead of pointer_hash.
1903         (detect_field_duplicates): Likewise.
1905 2015-06-25  Marek Polacek  <polacek@redhat.com>
1907         * c-array-notation.c: Use VAR_P throughout.
1908         * c-decl.c: Likewise.
1909         * c-objc-common.c: Likewise.
1910         * c-parser.c: Likewise.
1911         * c-typeck.c: Likewise.
1913 2015-06-25  Marek Polacek  <polacek@redhat.com>
1915         * c-decl.c: Use is_global_var throughout.
1916         * c-parser.c: Likewise.
1917         * c-typeck.c: Likewise.
1919 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1921         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1922         * c-aux-info.c: Likewise.
1923         * c-convert.c: Likewise.
1924         * c-decl.c: Likewise.
1925         * c-errors.c: Likewise.
1926         * c-lang.c: Likewise.
1927         * c-objc-common.c: Likewise.
1928         * c-parser.c: Likewise.
1929         * c-typeck.c: Likewise.
1931 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
1933         PR middle-end/66325
1934         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1935         variants.
1937 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
1939         * c-decl.c (pop_scope): Register the main translation unit
1940         through the new debug hook.
1942 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
1944         * c-array-notation.c : Adjust include files.
1945         * c-aux-info.c : Likewise.
1946         * c-convert.c : Likewise.
1947         * c-decl.c : Likewise.
1948         * c-errors.c : Likewise.
1949         * c-lang.c : Likewise.
1950         * c-lang.h : Likewise.
1951         * c-objc-common.c : Likewise.
1952         * c-parser.c : Likewise.
1953         * c-typeck.c : Likewise.
1955 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1957         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1958         immediately clobber it.
1959         (c_write_global_declarations_1): Remove call to
1960         check_global_declaration_1.
1961         (c_write_global_declarations_2): Remove.
1962         (c_write_final_cleanups): Rename from c_write_global_declarations.
1963         Remove call to finalize_compilation_unit.
1964         Remove calls to debugging hooks.
1965         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1966         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1967         * c-tree.h: Remove c_write_global_declarations.
1969 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1971         * c-array-notation.c: Adjust includes for restructured coretypes.h.
1972         * c-aux-info.c: Likewise.
1973         * c-convert.c: Likewise.
1974         * c-decl.c: Likewise.
1975         * c-errors.c: Likewise.
1976         * c-lang.c: Likewise.
1977         * c-objc-common.c: Likewise.
1978         * c-parser.c: Likewise.
1979         * c-typeck.c: Likewise.
1981 2015-06-04  Marek Polacek  <polacek@redhat.com>
1983         PR c/66341
1984         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1985         it is a lvalue.
1987 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1989         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1990         Warn for empty struct.
1991         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1993 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
1995         * c-decl.c (start_function): Call plugin before parsing.
1996         (finish_function): Call plugin after parsing.
1998 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2000         PR c/49551
2001         * c-decl.c (merge_decls): Merge DECL_COMMON.
2003 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
2005         * Make-lang.in (check_gcc_pallelize): Define.
2007 2015-05-22  Marek Polacek  <polacek@redhat.com>
2009         PR c/47043
2010         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2011         attributes.
2013 2015-05-21  Marek Polacek  <polacek@redhat.com>
2015         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2016         DECL_BUILT_IN.
2018 2015-05-20  Marek Polacek  <polacek@redhat.com>
2020         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2021         * c-typeck.c: Likewise.
2023 2015-05-19  Marek Polacek  <polacek@redhat.com>
2025         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2027 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
2029         PR middle-end/66199
2030         * c-parser.c (c_parser_omp_for_loop): Don't add
2031         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2032         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2033         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2034         constructs.
2036 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
2038         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
2039         swaps.
2041 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2043         PR fortran/44054
2044         * c-objc-common.c (c_tree_printer): Replace locus pointer with
2045         accessor function.
2047 2015-05-14  Marek Polacek  <polacek@redhat.com>
2049         PR c/66066
2050         PR c/66127
2051         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2052         rather than with 0.
2054 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
2056         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2057         to add a call to warn_for_misleading_indentation.
2058         (c_parser_else_body): Likewise, adding param "else_loc".
2059         (c_parser_if_statement): Check for misleading indentation.
2060         (c_parser_while_statement): Likewise.
2061         (c_parser_for_statement): Likewise.
2063 2015-05-08  Marek Polacek  <polacek@redhat.com>
2065         PR c/64918
2066         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2067         (output_init_element): Likewise.
2069 2015-05-07  Marek Polacek  <polacek@redhat.com>
2071         PR c/65179
2072         * c-typeck.c (build_binary_op): Warn when left shifting a negative
2073         value.
2075 2015-04-30  Marek Polacek  <polacek@redhat.com>
2077         * c-typeck.c (set_init_label): Call error_at instead of error and
2078         pass LOC to it.
2080         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
2081         the type of a decl.
2083         * c-typeck.c (c_build_va_arg): Clarify the error message.
2085 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2087         * c-parser.c (c_parser_oacc_enter_exit_data): Use
2088         OMP_STANDALONE_CLAUSES.
2090 2015-04-28  Marek Polacek  <polacek@redhat.com>
2092         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2094 2015-04-28  Marek Polacek  <polacek@redhat.com>
2096         PR c/65901
2097         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2099 2015-04-25  Marek Polacek  <polacek@redhat.com>
2101         PR c/52085
2102         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
2103         attribute.
2105 2015-04-23  Marek Polacek  <polacek@redhat.com>
2107         PR c/65345
2108         * c-decl.c (set_labels_context_r): New function.
2109         (store_parm_decls): Call it via walk_tree_without_duplicates.
2110         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2111         instead of create_tmp_var.  Build TARGET_EXPR instead of
2112         COMPOUND_EXPR.
2113         (build_atomic_assign): Use create_tmp_var_raw instead of
2114         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
2116 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2118         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2119         (c_parser_omp_target_update): Add missed %> to error_at ().
2121 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
2123         PR target/55143
2124         * c-decl.c (c_default_pointer_mode): Remove definition.
2125         * c-tree.h (c_default_pointer_mode): Remove declaration.
2127 2015-03-27  Tobias Burnus  <burnus@net-b.de>
2129         PR c/65586
2130         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2131         error out.
2132         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2133         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2134         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2136 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
2138         * c-decl.c (c_decl_attributes): Also add "omp declare target"
2139         attribute for DECL_EXTERNAL VAR_DECLs.
2141 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
2143         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2144         argument.
2146 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2148         PR c/65120
2149         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2150         before preparing arguments to warn_logical_not_parentheses.
2152 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
2154         PR c/65120
2155         * c-typeck.c (parser_build_binary_op): Don't warn for
2156         !!x == y or !b == y where b is _Bool.
2158 2015-03-09  Marek Polacek  <polacek@redhat.com>
2160         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2161         * c-decl.c (grokdeclarator): Likewise.
2162         * c-typeck.c (build_binary_op): Likewise.
2164 2015-02-27  Marek Polacek  <polacek@redhat.com>
2166         PR c/65228
2167         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2169 2015-02-14  Marek Polacek  <polacek@redhat.com>
2171         PR c/64768
2172         * c-decl.c (grokdeclarator): Set the range of a flexible array member
2173         declared through a typedef name.
2175 2015-02-13  Marek Polacek  <polacek@redhat.com>
2177         PR c/65050
2178         * c-decl.c (grokdeclarator): Print also the type when giving
2179         the error message about array's incomplete element type.
2181 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
2183         PR c/64824
2184         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2185         check in the POP macro.
2187 2015-02-09  Marek Polacek  <polacek@redhat.com>
2189         PR c/64856
2190         * c-typeck.c (process_init_element): Don't always wrap
2191         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2192         initializing a range of elements.
2194 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2196         PR c/64824
2197         PR c/64868
2198         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2200 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
2202         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2203         processing enum declaration.
2205 2015-01-29  Marek Polacek  <polacek@redhat.com>
2207         PR c/64709
2208         * c-typeck.c (pop_init_level): If constructor_elements has
2209         exactly one element with integer_zerop value, set constructor_zeroinit
2210         to 1.  Remove braces around warning_init call.
2212 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
2214         PR c/64766
2215         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2216         of FUNCTION_DECLs with error_mark_node.
2218 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
2220         PR c/64778
2221         * c-typeck.c (convert_arguments): Return -1 if there are
2222         error_args, even if we've diagnosed too many arguments.
2224 2015-01-21  Richard Biener  <rguenther@suse.de>
2226         PR middle-end/64313
2227         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2228         for builtins the user declared correctly.
2230 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2231             Bernd Schmidt  <bernds@codesourcery.com>
2232             Cesar Philippidis  <cesar@codesourcery.com>
2233             James Norris  <jnorris@codesourcery.com>
2234             Jakub Jelinek  <jakub@redhat.com>
2235             Ilmir Usmanov  <i.usmanov@samsung.com>
2237         * c-parser.c: Include "gomp-constants.h".
2238         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2239         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2240         Use OMP_CLAUSE_SET_MAP_KIND.
2241         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2242         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2243         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2244         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2245         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2246         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2247         "copyout", "create", "delete", "deviceptr", "gang", "host",
2248         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2249         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2250         "present_or_create", "pcreate", "seq", "self", "vector",
2251         "vector_length", "wait", "worker".
2252         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2253         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2254         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2255         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2256         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2257         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2258         (c_parser_oacc_data_clause_deviceptr)
2259         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2260         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2261         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2262         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2263         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2264         (c_parser_oacc_parallel, c_parser_oacc_update)
2265         (c_parser_oacc_wait): New functions.
2266         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2267         (c_finish_oacc_data): New prototypes.
2268         * c-typeck.c: Include "gomp-constants.h".
2269         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2270         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2271         OMP_CLAUSE_SET_MAP_KIND.
2272         (c_finish_oacc_parallel, c_finish_oacc_kernels)
2273         (c_finish_oacc_data): New functions.
2274         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2275         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2276         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2277         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2278         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2279         GOMP_MAP_FORCE_DEVICEPTR.
2281 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2283         * c-array-notation.c: Include hash-set.h, machmode.h,
2284         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2285         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2286         * c-aux-info.c: Ditto.
2287         * c-convert.c: Ditto.
2288         * c-decl.c: Ditto.
2289         * c-errors.c: Ditto.
2290         * c-lang.c: Dittoxs.
2291         * c-objc-common.c: Ditto.
2292         * c-parser.c: Ditto.
2293         * c-typeck.c: Include hash-set.h, machmode.h,
2294         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2295         fold-const.h, wide-int.h, inchash.h, real.h and
2296         fixed-value.h due to flattening of tree.h.
2298 2015-01-07  Marek Polacek  <polacek@redhat.com>
2300         PR c/64417
2301         * c-typeck.c (process_init_element): Disallow initialization of
2302         a flexible array member with a string constant if the structure
2303         is in an array.
2305 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2307         PR sanitizer/64344
2308         * c-typeck.c (convert_for_assignment, c_finish_return): For
2309         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2310         types also set in_late_binary_op around convert call.
2311         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2312         to integral type casts, if not in_late_binary_op, pass c_fully_fold
2313         result on expr as last argument to ubsan_instrument_float_cast,
2314         if in_late_binary_op, don't use c_save_expr but save_expr.
2316         Update copyright years.
2318 2015-01-05  Marek Polacek  <polacek@redhat.com>
2320         PR c/64423
2321         * c-typeck.c (build_array_ref): Pass loc down to
2322         warn_array_subscript_with_type_char.
2324 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
2326         * c-typeck.c: New behavious for pointers to arrays with qualifiers
2327         (common-pointer-type): For pointers to arrays take qualifiers from
2328         element type.
2329         (build_conditional_expr): Add warnings for lost qualifiers.
2330         (comp-target-types): Allow pointers to arrays with different qualifiers.
2331         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2332         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2333         to PEDWARN_FOR_QUALIFIERS.
2335 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
2337         PR sanitizer/64289
2338         * c-convert.c: Include ubsan.h.
2339         (convert): For real -> integral casts and
2340         -fsanitize=float-cast-overflow don't call convert_to_integer, but
2341         instead instrument the float cast directly.
2343 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
2345         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2346         c_finish_stmt_expr): Remove NULL last argument from
2347         create_tmp_var_raw and create_tmp_var calls.
2348         * c-array-notation.c (fix_builtin_array_notation_fn,
2349         build_array_notation_expr, fix_conditional_array_notations_1,
2350         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2352 2014-11-28  Marek Polacek  <polacek@redhat.com>
2354         PR c/63862
2355         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2356         convert the right operand to integer type.
2358 2014-11-25  Marek Polacek  <polacek@redhat.com>
2360         PR c/63877
2361         * c-decl.c (start_function): Disable -Wmissing-declarations warning
2362         for inline functions.
2364 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
2366         PR target/63764
2367         * c-typeck.c (build_array_ref): Adjust
2368         convert_vector_to_pointer_for_subscript caller.  If it returns true,
2369         call non_lvalue_loc on the result.
2371 2014-11-11  Richard Biener  <rguenther@suse.de>
2373         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2374         to true.
2376 2014-11-10  Andi Kleen  <ak@linux.intel.com>
2378         PR c/60804
2379         * c-parser.c (c_parser_statement_after_labels): Call
2380         check_no_cilk.
2381         (c_parser_if_statement): Dito.
2382         (c_parser_switch_statement): Dito.
2383         (c_parser_while_statement): Dito.
2384         (c_parser_do_statement): Dito.
2385         (c_parser_for_statement): Dito.
2386         * c-typeck.c (c_finish_loop): Dito.
2388 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
2390         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2391         OPT_Wshift_count_overflow in the warnings.
2393 2014-10-30  Marek Polacek  <polacek@redhat.com>
2395         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2396         print the stripped version as well, if they're not the same.
2398 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
2400         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2401         machine_mode.
2403 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
2405         * c-decl.c: Adjust include files.
2406         * c-parser.c: Ditto.
2408 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
2409             Tom Tromey  <tromey@redhat.com>
2411         * c-tree.h (enum c_oracle_request): New.
2412         (c_binding_oracle_function): New typedef.
2413         (c_binding_oracle, c_pushtag, c_bind): Declare.
2414         * c-decl.c (c_binding_oracle): New global.
2415         (I_SYMBOL_CHECKED): New macro.
2416         (i_symbol_binding): New function.
2417         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2418         (I_TAG_CHECKED): New macro.
2419         (i_tag_binding): New function.
2420         (I_TAG_BINDING, I_TAG_DECL): Redefine.
2421         (I_LABEL_CHECKED): New macro.
2422         (i_label_binding): New function.
2423         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2424         (c_print_identifier): Save and restore c_binding_oracle.
2425         (c_pushtag, c_bind): New functions.
2427 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
2429         * c-typeck.c: Adjust include files.
2431 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2433         PR c++/53061
2434         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2435         initialization here...
2436         (c_initialize_diagnostics): ... but here. Set defaults after
2437         building pretty-printer.
2439 2014-10-23  Marek Polacek  <polacek@redhat.com>
2441         PR c/63626
2442         * c-decl.c (pop_scope): Don't print warning in external_scope.
2444 2014-10-19  Marek Polacek  <polacek@redhat.com>
2446         PR c/63567
2447         * c-typeck.c (output_init_element): Allow initializing objects with
2448         static storage duration with compound literals even in C99 and add
2449         pedwarn for it.
2451 2014-10-17  Marek Polacek  <polacek@redhat.com>
2453         PR c/63567
2454         * c-typeck.c (digest_init): Allow initializing objects with static
2455         storage duration with compound literals even in C99 and add pedwarn
2456         for it.
2458 2014-10-17  Marek Polacek  <polacek@redhat.com>
2460         PR c/63543
2461         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2462         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2463         error multiple times.  Print the type.
2465 2014-10-17  Marek Polacek  <polacek@redhat.com>
2467         PR c/63549
2468         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2469         type.
2471 2014-10-17  Marek Polacek  <polacek@redhat.com>
2473         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2474         (start_function): Use OPT_Wimplicit_int instead of 0.
2475         (store_parm_decls_oldstyle): Likewise.
2477 2014-10-17  Alan Modra  <amodra@gmail.com>
2479         PR middle-end/61848
2480         * c-decl.c (merge_decls): Don't merge section name or tls model
2481         to newdecl symtab node, instead merge to olddecl.  Override
2482         existing olddecl section name.  Set tls_model for all thread-local
2483         vars, not just OMP thread-private ones.  Remove incorrect comment.
2485 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
2487         * c-decl.c: Adjust include files.
2489 2014-10-14  DJ Delorie  <dj@redhat.com>
2491         * c-parser.c (c_parse_init): Add RID entries for each __intN.
2492         (c_token_starts_typename): Check all __intN, not just __int128.
2493         (c_token_starts_declspecs): Likewise.
2494         (c_parser_declspecs): Likewise.
2495         (c_parser_attribute_any_word): Likewise.
2496         (c_parser_objc_selector): Likewise.
2497         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2498         (struct c_declspecs): Add int_n_idx field to record *which* __intN
2499         is specified.
2500         * c-decl.c (declspecs_add_type): Check for all __intN, not just
2501         __int128.
2502         (finish_declspecs): Likewise.
2504 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
2506         * c-parser.c (c_parser_all_labels): New function to replace
2507         the duplicate code.
2508         (c_parser_statement): Call the new function.
2510 2014-10-09  Marek Polacek  <polacek@redhat.com>
2512         PR c/63480
2513         * c-typeck.c (pop_init_level): Don't warn about initializing
2514         with { }.
2516 2014-10-07  Marek Polacek  <polacek@redhat.com>
2518         PR c/59717
2519         * c-decl.c (header_for_builtin_fn): New function.
2520         (implicitly_declare): Suggest which header to include.
2522 2014-10-07  Marek Polacek  <polacek@redhat.com>
2524         * c-convert.c (convert): Use error_operand_p.
2525         * c-typeck.c (require_complete_type): Likewise.
2526         (really_atomic_lvalue): Likewise.
2527         (digest_init): Likewise.
2528         (handle_omp_array_sections_1): Likewise.
2530 2014-10-03  Marek Polacek  <polacek@redhat.com>
2532         PR c/63453
2533         * c-decl.c (pop_scope): Don't warn about "inline function declared
2534         but never defined" for functions marked with gnu_inline attribute.
2536 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
2538         PR c++/63249
2539         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2540         on low_bound and length.
2542 2014-09-24  Marek Polacek  <polacek@redhat.com>
2544         PR c/61405
2545         PR c/53874
2546         * c-parser.c: Don't define CPP_KEYWORD.
2547         (c_parser_switch_statement): Pass original type to c_finish_case.
2548         * c-tree.h (c_finish_case): Update declaration.
2549         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
2550         conditionally to c_do_switch_warnings.
2552 2014-09-03  Marek Polacek  <polacek@redhat.com>
2554         PR c/62024
2555         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2556         conversions.
2558 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
2559             Balaji V. Iyer  <balaji.v.iyer@intel.com>
2560             Igor Zamyatin  <igor.zamyatin@intel.com>
2562         * c-parser.c (c_parser_cilk_for): New function.
2563         (c_parser_cilk_grainsize): Likewise.
2564         (c_get_temp_regvar): Likewise.
2565         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2566         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2567         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2568         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2569         case.
2571 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
2573         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2574         with using HOST_WIDE_INT without truncation to 'int'
2576 2014-08-22  Marek Polacek  <polacek@redhat.com>
2578         PR c++/62199
2579         * c-typeck.c (parser_build_binary_op): Adjust call to
2580         warn_logical_not_parentheses.
2582 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
2584         PR other/62008
2585         * c-parser.c (c_parser_array_notation): Check for correct
2586         type of an array added.
2588 2014-08-19  Marek Polacek  <polacek@redhat.com>
2590         PR c++/62153
2591         * c-typeck.c (build_binary_op): If either operand of a comparison
2592         is a boolean expression, call maybe_warn_bool_compare.
2594 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
2596         PR c/45584
2597         * c-typeck.c (build_c_cast): Do a conversion even when the
2598         TYPE_MAIN_VARIANTs are the same.
2600 2014-08-19  Marek Polacek  <polacek@redhat.com>
2602         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2603         pedwarn_c99 instead of pedwarn.
2604         (grokfield): Likewise.
2605         (warn_defaults_to): New function.
2606         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2607         Unconditionally call pedwarn_c99 instead of pedwarn.
2608         (start_function): Call warn_defaults_to instead of pedwarn_c99.
2609         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2610         check flag_isoc11 before.
2611         * c-errors.c (pedwarn_c99): Change the return type to bool.
2612         Handle -Wc99-c11-compat.
2613         * c-parser.c (disable_extension_diagnostics): Handle
2614         warn_c99_c11_compat.
2615         (restore_extension_diagnostics): Likewise.
2616         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2617         instead of pedwarn, don't check flag_isoc11 before.
2618         (c_parser_declspecs): Likewise.
2619         (c_parser_alignas_specifier): Likewise.
2620         (c_parser_alignof_expression): Likewise.
2621         (c_parser_generic_selection): Likewise.
2622         * c-tree.h (pedwarn_c99): Update declaration.
2623         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2624         of pedwarn_c99.
2626 2014-08-19  Marek Polacek  <polacek@redhat.com>
2628         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2629         to pedwarn_c90.
2630         * c-errors.c: Include "opts.h".
2631         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2632         * c-parser.c (disable_extension_diagnostics): Handle negative value
2633         of warn_c90_c99_compat, too.
2634         (restore_extension_diagnostics): Likewise.
2635         (c_parser_compound_statement_nostart): Pass
2636         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2638 2014-08-12  Marek Polacek  <polacek@redhat.com>
2640         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2641         Add pedwarn.
2642         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2643         Likewise.
2644         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2646 2014-08-10  Marek Polacek  <polacek@redhat.com>
2648         PR c/51849
2649         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2650         Call pedwarn_c90 instead of pedwarn.
2651         (check_bitfield_type_and_width): Likewise.
2652         (declspecs_add_qual): Likewise.
2653         (declspecs_add_type): Likewise.
2654         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2655         Adjust to only call pedwarn_c90.
2656         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
2657         pedwarn_c90 instead of pedwarn.
2658         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2659         * c-parser.c (disable_extension_diagnostics): Handle
2660         warn_c90_c99_compat.
2661         (restore_extension_diagnostics): Likewise.
2662         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
2663         pedwarn_c90 instead of pedwarn.
2664         (c_parser_initelt): Likewise.
2665         (c_parser_postfix_expression): Likewise.
2666         (c_parser_postfix_expression_after_paren_type): Likewise.
2667         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2668         * c-tree.h: Fix formatting.
2669         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
2670         pedwarn_c90 instead of pedwarn.
2672 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
2674         * c-typeck.c: Remove include of pointer-set.h.
2676 2014-08-07  Marek Polacek  <polacek@redhat.com>
2678         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2680 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
2682         * c-typeck.c: Use hash_map instead of pointer_map.
2684 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
2686         * c-decl.c: Use hash_set instead of pointer_set.
2688 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
2690         PR middle-end/61455
2691         * c-array-notation.c (expand_array_notations): Handling
2692         of DECL_EXPR added.
2694 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
2696         PR c++/60517
2697         * c-typeck.c (c_finish_return): Return 0 instead of the address of
2698         a local variable.
2700 2014-07-30  Tom Tromey  <tromey@redhat.com>
2702         * c-typeck.c (struct constructor_stack) <designator_depth>: New
2703         field.
2704         (really_start_incremental_init, push_init_level): Initialize
2705         designator_depth.
2706         (pop_init_level): Set global designator_depth.
2707         (process_init_element): Check for designated_init attribute.
2709 2014-07-20  Marek Polacek  <polacek@redhat.com>
2711         PR c/61852
2712         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
2713         (implicitly_declare): Pass location to implicit_decl_warning.
2715 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
2717         PR middle-end/61294
2718         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2719         If non-NULL, call c_parser_check_literal_zero.
2720         (c_parser_check_literal_zero): New function.
2721         (c_parser_postfix_expression_after_primary): Adjust
2722         c_parser_expr_list caller, handle -Wmemset-transposed-args.
2724 2014-07-06  Marek Polacek  <polacek@redhat.com>
2726         PR c/6940
2727         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2728         * c-tree.h (C_ARRAY_PARAMETER): Define.
2729         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2730         function parameter.
2732 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
2733             Chen Gang  <gang.chen.5i5j@gmail.com>
2735         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2736         releasing symbol.
2738 2014-07-01  Marek Polacek  <polacek@redhat.com>
2740         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2741         instead of 0 to WARN_FOR_ASSIGNMENT.
2743 2014-07-01  Marek Polacek  <polacek@redhat.com>
2745         PR c/58286
2746         * c-typeck.c (convert_for_assignment): Pass
2747         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2749 2014-06-30  Marek Polacek  <polacek@redhat.com>
2751         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2752         has no_sanitize_undefined attribute.
2754 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
2756         PR middle-end/57541
2757         * c-array-notation.c (fix_builtin_array_notation_fn):
2758         Check for 0 arguments in builtin call. Check that bultin argument is
2759         correct.
2760         * c-parser.c (c_parser_array_notation): Check for incorrect initial
2761         index.
2763 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2765         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2766         qualifiers in __auto_type for atomic types.
2767         (c_parser_typeof_specifier): Discard all type qualifiers in
2768         __typeof__ for atomic types.
2770 2014-06-25  Marek Polacek  <polacek@redhat.com>
2772         PR c/61162
2773         * c-parser.c (c_parser_statement_after_labels): Pass the location of
2774         the return expression to c_finish_return.
2776 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
2778         * c-typeck.c (c_finish_omp_clauses): Make sure
2779         OMP_CLAUSE_LINEAR_STEP has correct type.
2781 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
2783         * c-decl.c: Adjust.
2785 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
2787         * c-parser.c (c_parser_omp_for_loop): For
2788         #pragma omp parallel for simd move lastprivate clause from parallel
2789         to for rather than simd.
2791 2014-06-23  Marek Polacek  <polacek@redhat.com>
2793         * c-typeck.c (parser_build_binary_op): Don't call
2794         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2796 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
2798         * c-parser.c (c_parser_omp_threadprivate): Likewise.
2799         * c-decl.c (merge_decls): Likewise.
2801 2014-06-09  Marek Polacek  <polacek@redhat.com>
2803         PR c/36446
2804         * c-typeck.c (error_init): Call inform instead of error_at.
2805         (pedwarn_init): Call inform instead of pedwarn.
2806         (warning_init): Call inform instead of warning_at.
2808 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
2810         * c-decl.c (merge_decls): Use set_decl_section_name.
2811         (duplicate_decls): Remove node if it exists.
2813 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
2815         PR c/53119
2816         * c-typeck.c (push_init_level, process_init_element,
2817         pop_init_level): Correct check for zero initialization, move
2818         missing brace warning to respect zero initialization.
2820 2014-06-05  Marek Polacek  <polacek@redhat.com>
2822         PR c/56724
2823         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2825 2014-06-05  Marek Polacek  <polacek@redhat.com>
2827         PR c/49706
2828         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2829         on the left hand side operand of a comparison. 
2831 2014-06-05  Marek Polacek  <polacek@redhat.com>
2833         PR c/48062
2834         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2835         Print note only if the warning was printed.
2837 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
2839         PR c/58942
2840         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2841         with a pointer.
2843 2014-06-03  Marek Polacek  <polacek@redhat.com>
2845         PR c/60439
2846         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2847         c_start_case.
2848         * c-tree.h (c_start_case): Update.
2849         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
2850         switch condition has boolean value.
2852 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
2854         * c-decl.c: Include builtins.h.
2855         * c-parser.c: Likewise.
2857 2014-05-27  Marek Polacek  <polacek@redhat.com>
2859         PR c/56724
2860         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
2861         error and warning calls to error_at and warning_at.  Pass location of
2862         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
2863         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2864         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
2866 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
2868         PR c/61191
2869         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2870         function parameters.
2872 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
2874         * c-decl.c (merge_decls): Preserve symtab node pointers.
2875         (duplicate_decls): Free new decl.
2877 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
2879         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2880         initialization.
2882         * c-parser.c (c_parser_omp_target): Return bool values.
2884 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
2886         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2887         num_teams_loc variable to num_thread_limit_loc.
2889 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
2891         * c-array-notation.c (expand_array_notations): Use void_node
2892         instead of void_zero_node.
2894 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
2896         * c-decl.c (finish_struct): Adjust.
2897         (finish_enum): Likewise.
2898         (bind): Adjust.
2899         (record_inline_static): Likewise.
2900         (push_scope): Likewise.
2901         (make_label): Likewise.
2902         (lookup_label_for_goto): Likewise.
2903         (finish_struct): Likewise.
2904         (finish_enum): Likewise.
2905         (store_parm_decls): Likewise.
2906         (c_push_function_context): Likewise.
2907         * c-lang.h: Remove usage of variable_size gty attribute.
2908         * c-parser.c (c_parse_init): Adjust.
2909         (c_parse_file): Likewise.
2911 2014-05-13  Marek Polacek  <polacek@redhat.com>
2913         PR c/61162
2914         * c-typeck.c (convert_for_assignment): Pass location to
2915         WARN_FOR_ASSIGNMENT instead of input_location.
2917 2014-05-10  Marek Polacek  <polacek@redhat.com>
2919         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2920         maybe_warn_string_init.
2921         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2922         maybe_warn_string_init.
2923         * c-tree.h (maybe_warn_string_init): Update declaration.
2924         * c-typeck.c (maybe_warn_string_init): Add location parameter.
2925         Call pedwarn_init with loc instead of with input_location.
2926         (digest_init): Pass init_loc to maybe_warn_string_init.
2927         (pop_init_level): Call pedwarn_init with loc instead of with
2928         input_location.
2929         (set_init_index): Likewise.
2930         (process_init_element): Likewise.
2932 2014-05-09  Marek Polacek  <polacek@redhat.com>
2934         PR c/61096
2935         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2936         (c_parser_initelt): Pass location to set_init_label.  Pass array index
2937         location to set_init_index.
2938         * c-tree.h (push_init_level): Update declaration.
2939         (pop_init_level): Likewise.
2940         (set_init_index): Likewise.
2941         (set_init_label): Likewise.
2942         * c-typeck.c (error_init): Add location parameter.  Call error_at
2943         instead of error.
2944         (digest_init): Pass init_loc to error_init.
2945         (really_start_incremental_init):
2946         (push_init_level): Add location parameter.  Pass loc to pop_init_level
2947         and error_init.
2948         (pop_init_level): Likewise.
2949         (set_designator): Add location parameter.  Pass loc to pop_init_level,
2950         push_init_level, and error_init.
2951         (set_init_index): Add location parameter.  Pass loc to error_init and
2952         set_designator.
2953         (set_init_label): Likewise.
2954         (output_init_element): Pass loc to error_init.
2955         (process_init_element): Pass loc to error_init, pop_init_level,
2956         pedwarn_init, and push_init_level.
2958 2014-05-09  Marek Polacek  <polacek@redhat.com>
2960         PR c/50459
2961         * c-parser.c (c_parser_attributes): Parse the arguments as an
2962         expression-list if the attribute takes identifier.
2964 2014-05-08  Marek Polacek  <polacek@redhat.com>
2966         PR c/61053
2967         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2968         TYPE_ALIGN_UNIT.
2970 2014-05-08  Marek Polacek  <polacek@redhat.com>
2972         PR c/61077
2973         * c-decl.c (start_function): Warn for _Atomic-qualified return type
2974         of main.
2976 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2977             Mike Stump  <mikestump@comcast.net>
2978             Richard Sandiford  <rdsandiford@googlemail.com>
2980         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2981         (finish_enum): Use wide-int interfaces.
2982         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2983         * c-typeck.c (build_c_cast): Likewise.
2984         (set_nonincremental_init_from_string): Likewise.
2985         (c_tree_equal): Likewise.
2987 2014-05-02  Marek Polacek  <polacek@redhat.com>
2989         PR c/25801
2990         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
2991         Return size_one_node when the type is not complete.
2992         (pointer_diff): Remove comment.
2993         (build_unary_op): Improve error messages.
2995 2014-05-02  Marek Polacek  <polacek@redhat.com>
2997         * c-typeck.c (c_finish_return): Separate warning_at calls.
2999 2014-05-02  Marek Polacek  <polacek@redhat.com>
3001         * c-tree.h (error_init): Remove declaration.
3002         (pedwarn_init): Likewise.
3003         * c-typeck.c (error_init): Make static and move above.
3004         (pedwarn_init): Likewise.
3005         (warning_init): Move above.
3006         (maybe_warn_string_init): Likewise.
3008 2014-05-01  Jeff Law  <law@redhat.com>
3010         Revert:
3012         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3013         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3014         avoid goto.
3016 2014-05-02  Marek Polacek  <polacek@redhat.com>
3018         PR c/60784
3019         * c-typeck.c (push_init_level): Set constructor_designated to
3020         p->designated for structures.
3022 2014-05-01  Marek Polacek  <polacek@redhat.com>
3024         PR c/60915
3025         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3026         function-definition has an attribute after the declarator.
3028 2014-05-01  Marek Polacek  <polacek@redhat.com>
3030         PR c/60257
3031         * c-typeck.c (warning_init): Add location_t parameter.  Call
3032         warning_at instead of warning.
3033         (push_init_level): Pass input_location to warning_init.
3034         (add_pending_init): Add location_t parameter.  Pass loc to
3035         warning_init.
3036         (set_nonincremental_init): Pass input_location to add_pending_init.
3037         (set_nonincremental_init_from_string): Likewise.
3038         (output_init_element): Pass loc to warning_init and to
3039         add_pending_init.
3041 2014-05-01  Marek Polacek  <polacek@redhat.com>
3043         PR c/43395
3044         * c-typeck.c (c_finish_return): Distinguish between label and variable
3045         when warning about returning local address.
3047 2014-05-01  Marek Polacek  <polacek@redhat.com>
3049         PR c/29467
3050         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3051         in C89 mode.
3053 2014-05-01  Marek Polacek  <polacek@redhat.com>
3055         PR c/43245
3056         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3057         instead of 0 to WARN_FOR_QUALIFIERS.
3059 2014-05-01  Marek Polacek  <polacek@redhat.com>
3061         PR c/56989
3062         * c-typeck.c (default_conversion): Use better location for
3063         error call.
3065 2014-04-30  Marek Polacek  <polacek@redhat.com>
3067         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3068         also when SANITIZE_FLOAT_DIVIDE is on.
3070 2014-04-30  Marek Polacek  <polacek@redhat.com>
3072         PR c/60139
3073         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3074         and pedwarn_init.  Use loc insted of input_location.
3076 2014-04-30  Marek Polacek  <polacek@redhat.com>
3078         PR c/60351
3079         * c-typeck.c (build_binary_op): Use location when warning about
3080         shift count.
3082 2014-04-25  Marek Polacek  <polacek@redhat.com>
3084         PR c/18079
3085         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3086         always_inline/noinline and hot/cold attributes.
3088 2014-04-25  Marek Polacek  <polacek@redhat.com>
3090         PR c/60114
3091         * c-parser.c (c_parser_initelt): Pass input_location to
3092         process_init_element.
3093         (c_parser_initval): Pass loc to process_init_element.
3094         * c-tree.h (process_init_element): Adjust declaration.
3095         * c-typeck.c (push_init_level): Pass input_location to
3096         process_init_element.
3097         (pop_init_level): Likewise.
3098         (set_designator): Likewise.
3099         (output_init_element): Add location_t parameter.  Pass loc to
3100         digest_init.
3101         (output_pending_init_elements): Pass input_location to
3102         output_init_element.
3103         (process_init_element): Add location_t parameter.  Pass loc to
3104         output_init_element.
3106 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
3108         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3109         atomic-clause, allow comma in between atomic-clause and
3110         seq_cst.
3112 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
3114         PR c/59073
3115         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3116         fails, don't set OM_PARALLEL_COMBINED and return NULL.
3118 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
3120         PR middle-end/60469
3121         * c-array-notation.c (fix_builtin_array_notation_fn): Use
3122         create_tmp_var instead build_decl for creating temps.
3123         (build_array_notation_expr): Likewise.
3124         (fix_conditional_array_notations_1): Likewise.
3125         (fix_array_notation_expr): Likewise.
3126         (fix_array_notation_call_expr): Likewise.
3128 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
3130         PR c++/60689
3131         * c-tree.h (c_build_function_call_vec): New prototype.
3132         * c-typeck.c (build_function_call_vec): Don't call
3133         resolve_overloaded_builtin here.
3134         (c_build_function_call_vec): New wrapper function around
3135         build_function_call_vec.  Call resolve_overloaded_builtin here.
3136         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3137         Call c_build_function_call_vec instead of build_function_call_vec.
3138         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3139         * c-decl.c (finish_decl): Likewise.
3141 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3143         PR c/55383
3144         * c-typeck.c: Use correct format string in cast-qual warning
3146 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
3148         * c-decl.c (c_decl_attributes): Use
3149         lang_hooks.types.omp_mappable_type.
3150         * c-typeck.c (c_finish_omp_clauses): Likewise.
3152 2014-03-06  Marek Polacek  <polacek@redhat.com>
3154         PR c/60197
3155         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3156         of checking tree code.
3158 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3160         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3161         (c_parser_parameter_declaration): Likewise.
3163 2014-02-19  Marek Polacek  <polacek@redhat.com>
3165         PR c/60195
3166         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3167         Call mark_exp_read on exp.value.
3168         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
3169         TREE_ADDRESSABLE on old instead of val.
3170         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3172 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3174         * c-parser.c (c_parser_get_builtin_args): Replace calls to
3175         C_EXPR_APPEND by vec_safe_push.
3176         * c-tree.h (C_EXPR_APPEND): Remove.
3178 2014-01-31  Marek Polacek  <polacek@redhat.com>
3180         PR c/59963
3181         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3182         build_function_call_vec.
3183         (build_function_call): Likewise.
3184         (build_atomic_assign): Likewise.
3185         (build_function_call_vec): Add arg_loc parameter.  Use it.
3186         (convert_arguments): Likewise.
3187         (convert_for_assignment): Rename rhs_loc to expr_loc.
3188         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3189         (c_parser_objc_keywordexpr): Likewise.
3190         (c_parser_postfix_expression_after_primary): Call
3191         build_function_call_vec with expr_loc rather than op_loc.
3192         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
3193         build_function_call_vec.
3194         (c_parser_expr_list): Add locations parameter.  Fill it with locations
3195         of function arguments.
3196         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3198 2014-01-30  Marek Polacek  <polacek@redhat.com>
3200         PR c/59940
3201         * c-typeck.c (build_function_call_vec): Use loc parameter.
3202         (convert_arguments): Add location parameter.  Use it.
3203         (ep_convert_and_check): Likewise.
3204         (build_atomic_assign): Adjust convert_for_assignment call.
3205         (build_modify_expr): Likewise.
3206         (digest_init): Likewise.
3207         (c_finish_return): Likewise.
3208         (build_conditional_expr): Adjust ep_convert_and_check calls.
3209         (convert_for_assignment): Add rhs_loc parameter.  Use it.
3210         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3211         calls.
3213 2014-01-30  Richard Biener  <rguenther@suse.de>
3215         PR c/59905
3216         * c-typeck.c (build_function_call_vec): Do not replace calls
3217         to a function via an incompatible type with a runtime abort.
3219 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3221         * c-parser.c (c_parser_declaration_or_fndef): Replaced
3222         flag_enable_cilkplus with flag_cilkplus.
3223         (c_parser_direct_declarator_inner): Likewise.
3224         (c_parser_attribute_any_word): Likewise.
3225         (c_parser_attributes): Likewise.
3226         (c_parser_compound_statement): Likewise.
3227         (c_parser_statement_after_labels): Likewise.
3228         (c_parser_if_statement): Likewise.
3229         (c_parser_switch_statement): Likewise.
3230         (c_parser_do_statement): Likewise.
3231         (c_parser_for_statement): Likewise.
3232         (c_parser_unary_expression): Likewise.
3233         (c_parser_postfix_expression): Likewise.
3234         (c_parser_postfix_expression_after_primary): Likewise.
3235         (c_parser_postfix_expression_after_primary): Likewise.
3236         (c_parser_omp_clause_name): Likewise.
3237         (c_finish_omp_declare_simd): Likewise.
3238         (c_parser_cilk_verify_simd): Likewise.
3239         * c-typeck.c (build_array_ref): Likewise.
3240         (build_function_call_vec): Likewise.
3241         (convert_arguments): Likewise.
3242         (build_compound_expr): Likewise.
3243         (c_finish_return): Likewise.
3244         (c_finish_if_stmt): Likewise.
3245         (c_finish_loop): Likewise.
3246         (build_binary_op): Likewise.
3248 2014-01-23  Marek Polacek  <polacek@redhat.com>
3250         PR c/59846
3251         * c-typeck.c (parser_build_binary_op): Use location instead of
3252         input_location.
3253         (build_binary_op): Pass location to shorten_compare.
3255 2014-01-23  Marek Polacek  <polacek@redhat.com>
3257         PR c/58346
3258         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3259         an empty aggregate.
3261 2014-01-23  Marek Polacek  <polacek@redhat.com>
3263         PR c/59871
3264         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3265         of a comma expression.
3266         (emit_side_effect_warnings): Likewise.
3268 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3270         PR c/59825
3271         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3272         function to use walk_tree and moved a lot of its functionality to
3273         expand_array_notations.
3274         (expand_array_notations): New function.
3276 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3278         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3279         attribute an attribute without value.
3281 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3283         PR middle-end/58809
3284         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3285         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3287 2014-01-22  Marek Polacek  <polacek@redhat.com>
3289         PR c/59891
3290         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3291         of remove_c_maybe_const_expr on op1 and op2.
3293 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
3295         PR c/58943
3296         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3297         effects, preevaluate rhs using SAVE_EXPR first.
3299 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3301         PR c++/59631
3302         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3303         statements with if-elseif statements.
3305 2014-01-06  Marek Polacek  <polacek@redhat.com>
3307         PR c/57773
3308         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3309         defined bit-field types only in ISO C.
3311 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3313         Update copyright years
3315 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3317         * c-array-notation.c: Use the standard form for the copyright notice.
3319 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3321         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3322         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3323         field in parser is not empty.  If not-empty, call the function
3324         c_parser_finish_omp_declare_simd.
3325         (c_parser_cilk_clause_vectorlength): Modified function to be shared
3326         between SIMD-enabled functions and #pragma simd.  Added new parameter.
3327         (c_parser_cilk_all_clauses): Modified the usage of the function
3328         c_parser_cilk_clause_vectorlength as mentioned above.
3329         (c_parser_cilk_simd_fn_vector_attrs): New function.
3330         (c_finish_cilk_simd_fn_tokens): Likewise.
3331         (is_cilkplus_vector_p): Likewise.
3332         (c_parser_omp_clause_name): Added checking for "vectorlength,"
3333         "nomask," and "mask" strings in clause name.
3334         (c_parser_omp_all_clauses): Added 3 new case statements:
3335         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3336         PRAGMA_CILK_CLAUSE_NOMASK.
3337         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
3338         check for vector attribute and if so call the function
3339         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
3340         called the function c_finish_cilk_simd_fn_tokens.
3341         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3342         parser field is non-empty.  If so, parse them as you would parse
3343         the omp declare simd pragma.
3344         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3345         Added a check when step is a parameter and flag it as error.
3346         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3347         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3348         pragma_omp_clause.
3350 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
3352         * c-parser.c (c_parser_omp_parallel): Fix description.
3354 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3356         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3357         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3358         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3359         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3361 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
3363         PR c/52023
3364         * c-parser.c (c_parser_alignas_specifier): Use
3365         c_sizeof_or_alignof_type instead of c_alignof.
3366         (c_parser_alignof_expression): Likewise, with min_alignof
3367         parameter depending on alignof spelling used.
3369 2013-12-04  Marek Polacek  <polacek@redhat.com>
3371         PR c/54113
3372         * c-decl.c (start_function): Don't warn for missing prototype for
3373         inline functions.
3375 2013-12-03  Marek Polacek  <polacek@redhat.com>
3377         PR c/59351
3378         * c-decl.c (build_compound_literal): Allow compound literals with
3379         empty initial value.
3381 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
3383         PR c/58235
3384         * c-typeck.c (build_modify_expr): Diagnose assignment to
3385         expression with array type.
3387 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
3389         PR c/42262
3390         * c-typeck.c (process_init_element): Do not treat a string as
3391         initializing a whole array when used with a designator for an
3392         individual element.
3394 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
3396         PR c/57574
3397         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3398         an inline function following a static declaration.
3400 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
3402         PR c/59310
3403         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3404         to p_name before calling c_parser_omp_teams instead of after.
3405         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3406         argument.  Remove unused p_name variable.
3408 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
3409             Jakub Jelinek  <jakub@redhat.com>
3411         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3412         external_scope is NULL.
3414 2013-11-27  Tom de Vries  <tom@codesourcery.com>
3415             Marc Glisse  <marc.glisse@inria.fr>
3417         PR c++/59032
3418         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3420 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
3422         * c-typeck.c: Add required include files from gimple.h.
3424 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
3426         * c-decl.c (define_label, shadow_tag_warned)
3427         (check_bitfield_type_and_width, grokdeclarator, grokparms,
3428         store_parm_decls_newstyle, store_parm_decls_oldstyle)
3429         (declspecs_add_type): Remove use of in_system_header macro.
3430         * c-parser.c (c_parser_unary_expression): Likewise.
3431         * c-typeck.c (store_init_value, process_init_element)
3432         (c_start_case): Likewise.
3434         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3435         macro.
3437         * c-parser.c (c_parser_set_source_position_from_token): Remove
3438         reference to in_system_header from comment.
3440 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3442         * c-decl.c (grokdeclarator): Update comment to refer to
3443         tree_to_[su]hwi rather than tree_low_cst.
3445 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3447         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3448         tree_to_uhwi throughout.
3450 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3452         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3453         throughout.
3455 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3457         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3458         throughout.
3460 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
3462         * c-parser.c (c_parser_cilk_simd): New.
3463         (c_parser_cilk_verify_simd): New.
3464         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3465         (c_parser_omp_for_loop): Add case for NE_EXPR.
3466         Set c_break_label for CILK_SIMD.
3467         (c_parser_cilk_clause_vectorlength): New.
3468         (c_parser_cilk_clause_linear): New.
3469         (c_parser_cilk_clause_name): New.
3470         (c_parser_cilk_all_clauses): New.
3471         * c-typeck.c (build_unary_op): Pass location argument to
3472         readonly_error.
3473         (build_modify_expr): Same.
3474         (build_asm_expr): Same.
3475         (c_finish_bc_stmt): Error on break/continue in loops.
3477 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
3479         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3481 2013-11-14  Diego Novillo  <dnovillo@google.com>
3483         * c-decl.c: Include print-tree.h.
3484         Include stor-layout.h.
3485         Include varasm.h.
3486         Include attribs.h.
3487         Include stringpool.h.
3488         * c-lang.c: Include fold-const.h.
3489         * c-parser.c: Include stringpool.h.
3490         Include attribs.h.
3491         Include stor-layout.h.
3492         Include varasm.h.
3493         Include trans-mem.h.
3494         * c-typeck.c: Include stor-layout.h.
3495         Include trans-mem.h.
3496         Include varasm.h.
3497         Include stmt.h.
3499 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
3501         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3502         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3503         __auto_type.
3504         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3505         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3506         RID_AUTO_TYPE.
3507         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3508         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3509         (c_parser_declarator, c_parser_direct_declarator_inner)
3510         (c_parser_parameter_declaration, c_parser_type_name): All callers
3511         changed.
3512         (c_parser_declaration_or_fndef): Handle declarations with type
3513         determined from the initializer.
3515 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
3517         * c-typeck.c: Include gimplify.h.
3519 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
3521         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3522         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3523         comment.
3524         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3525         or _Thread_local as appropriate in diagnostics.
3526         (build_null_declspecs): Initialize ret->thread_gnu_p.
3527         (declspecs_add_scspec): Handle either __thread or _Thread_local
3528         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
3529         pedantic.  Do not disallow _Thread_local extern and _Thread_local
3530         static.
3532 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
3533             Andrew MacLeod  <amacleod@redhat.com>
3535         * c-aux-info.c (gen_type): Handle atomic qualifier.
3536         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3537         qualifiers when compating types.
3538         (shadow_tag_warned): Handle atomic_p in declspecs.
3539         (quals_from_declspecs): Likewise.
3540         (start_decl): Use c_type_promotes_to when promoting argument
3541         types.
3542         (grokdeclarator): Handle _Atomic.
3543         (get_parm_info): Diagnose any qualifier on "void" as only
3544         parameter.
3545         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3546         comparing types.  Use c_type_promotes_to when promoting argument
3547         types.
3548         (finish_function): Use c_type_promotes_to when promoting argument
3549         types.
3550         (build_null_declspecs): Handle atomic_p in declspecs.
3551         (declspecs_add_qual): Handle RID_ATOMIC.
3552         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3553         (c_token_starts_declspecs): Handle RID_ATOMIC.
3554         (c_parser_declspecs): Handle atomic type specifiers and
3555         qualifiers.
3556         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3557         from types of expressions with atomic type.
3558         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3559         (c_parser_attribute_any_word): Handle RID_ATOMIC.
3560         (c_parser_initializer, c_parser_initelt, c_parser_initval)
3561         (c_parser_statement_after_labels, c_parser_switch_statement)
3562         (c_parser_for_statement, c_parser_expr_no_commas)
3563         (c_parser_conditional_expression, c_parser_binary_expression)
3564         (c_parser_cast_expression, c_parser_unary_expression)
3565         (c_parser_postfix_expression)
3566         (c_parser_postfix_expression_after_primary, c_parser_expression):
3567         Use convert_lvalue_to_rvalue.
3568         (c_parser_expression_conv, c_parser_expr_list): Document
3569         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
3570         (c_parser_objc_synchronized_statement): Use
3571         convert_lvalue_to_rvalue.
3572         (c_parser_objc_selector): Handle RID_ATOMIC.
3573         (c_parser_objc_receiver, c_parser_array_notation): Use
3574         convert_lvalue_to_rvalue.
3575         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3576         _Atomic (type-name).
3577         (struct c_declspecs): Add atomic_p field.
3578         (convert_lvalue_to_rvalue): Declare.
3579         * c-typeck.c (c_type_promotes_to): Promote atomic types to
3580         corresponding atomic types.
3581         (qualify_type): Don't add _Atomic qualifiers from second argument.
3582         (comp_target_types): Do not allow _Atomic mismatches.
3583         (type_lists_compatible_p): Do not remove atomic qualifiers when
3584         comparing types.
3585         (really_atomic_lvalue, convert_lvalue_to_rvalue)
3586         (build_atomic_assign): New functions.
3587         (build_unary_op): Use build_atomic_assign for atomic increment and
3588         decrement.
3589         (build_conditional_expr): Do not treat _Atomic void as a qualified
3590         version of void.
3591         (build_modify_expr): Use build_atomic_assign for atomic LHS.
3592         (find_anonymous_field_with_type, convert_to_anonymous_field)
3593         (convert_for_assignment): Do not remove atomic qualifiers when
3594         comparing types.
3595         (digest_init): Do not accept initialization of arrays of atomic
3596         elements by string constants.
3597         (build_asm_expr): Use convert_lvalue_to_rvalue.
3598         (build_binary_op): Do not treat _Atomic void as a qualified
3599         version of void.
3601 2013-11-06  DJ Delorie  <dj@redhat.com>
3603         * c-decl.c (locate_old_decl): If a previous conflicting decl is
3604         both explicit and builtin, print the location of the explicit one.
3606 2013-11-05  Tobias Burnus  <burnus@net-b.de>
3608         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3609         c_parser_omp_distribute, c_parser_omp_teams,
3610         c_parser_omp_target, c_parser_omp_declare): Handle
3611         -fopenmp-simd.
3613 2013-11-03  Marek Polacek  <polacek@redhat.com>
3615         * c-decl.c (grokdeclarator): Add VLA instrumentation.
3617 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
3619         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3620         check_dup_generic at the end, unless remove is true.
3621         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3622         remove = true;.
3623         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3625 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
3627         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3628         with decl that is not pointer nor array.
3630 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3632         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3633         a spawning function is found.
3634         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3635         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3636         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3637         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3638         case.
3639         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3640         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3641         expr.
3642         (c_finish_return): Added a check to reject _Cilk_spawn in return
3643         expression.
3644         (build_cilk_spawn): New function.
3645         (build_cilk_sync): Likewise.
3646         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3647         
3648 2013-10-27  Tobias Burnus  <burnus@net-b.de>
3650         PR other/33426
3651         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3652         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3653         (c_parser_statement_after_labels): Update calls.
3655 2013-10-24  Tobias Burnus  <burnus@net-b.de>
3657         PR other/33426
3658         * c-parser.c (c_parser_pragma, c_parser_for_statement):
3659         Handle PRAGMA_IVDEP.
3660         (c_parser_statement_after_labels): Update call.
3662 2013-10-24  Marek Polacek  <polacek@redhat.com>
3664         * c-parser.c (c_parser_struct_declaration): Add a comment.
3665         (c_parser_declarator): Don't allow _Alignas here.
3667 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
3669         * c-parser.c: Include omp-low.h.
3670         * c-typeck.c: Likewise.
3672 2013-10-17  Marek Polacek  <polacek@redhat.com>
3674         PR c/58267
3675         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3676         Document syntax of the array-declarator.
3677         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3678         are not permitted.
3679         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3680         (c_parser_struct_declaration): Likewise.
3681         (c_parser_declarator): Likewise.
3682         (c_parser_direct_declarator_inner): Likewise.
3683         (c_parser_parameter_declaration): Likewise.
3684         (c_parser_type_name): Likewise.
3686 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
3688         * c-lang.h (current_omp_declare_target_attribute): New extern
3689         decl.
3690         * c-parser.c: Include c-lang.h.
3691         (struct c_parser): Change tokens to c_token *.
3692         Add tokens_buf field.  Change tokens_avail type to unsigned int.
3693         (c_parser_consume_token): If parser->tokens isn't
3694         &parser->tokens_buf[0], increment parser->tokens.
3695         (c_parser_consume_pragma): Likewise.
3696         (enum pragma_context): Add pragma_struct and pragma_param.
3697         (c_parser_external_declaration): Adjust
3698         c_parser_declaration_or_fndef caller.
3699         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3700         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3701         Adjust recursive call.
3702         (c_parser_struct_or_union_specifier): Use pragma_struct instead
3703         of pragma_external.
3704         (c_parser_parameter_declaration): Use pragma_param instead of
3705         pragma_external.
3706         (c_parser_compound_statement_nostart, c_parser_label,
3707         c_parser_for_statement): Adjust
3708         c_parser_declaration_or_fndef callers.
3709         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3710         it through to c_parser_conditional_expression.
3711         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3712         pass it through to c_parser_binary_expression.  Adjust recursive
3713         call.
3714         (c_parser_binary_expression): Remove prec argument, add
3715         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
3716         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3717         binop matches it, use build2 instead of parser_build_binary_op.
3718         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3719         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3720         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3721         Handle pragma_struct and pragma_param the same as pragma_external.
3722         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3723         (c_parser_omp_variable_list): Parse array sections for
3724         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3725         (c_parser_omp_clause_collapse): Fully fold collapse expression.
3726         (c_parser_omp_clause_reduction): Handle user defined reductions.
3727         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3728         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3729         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3730         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3731         c_parser_omp_clause_depend, c_parser_omp_clause_map,
3732         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3733         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3734         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3735         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
3736         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
3737         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3738         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
3739         (c_parser_omp_for_loop): Add CODE argument, pass it through
3740         to c_finish_omp_for.  Change last argument to cclauses,
3741         and adjust uses to grab parallel clauses from the array of all
3742         the split clauses.  Adjust c_parser_binary_expression,
3743         c_parser_declaration_or_fndef and c_finish_omp_for callers.
3744         (omp_split_clauses): New function.
3745         (c_parser_omp_simd): New function.
3746         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3747         Allow the function to be called also when parsing combined constructs,
3748         and call c_parser_omp_simd when parsing for simd.
3749         (c_parser_omp_sections_scope): If section-sequence doesn't start with
3750         #pragma omp section, require exactly one structured-block instead of
3751         sequence of statements.
3752         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3753         Allow the function to be called also when parsing combined constructs.
3754         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3755         Allow the function to be called also when parsing combined
3756         constructs.
3757         (c_parser_omp_taskgroup, c_parser_omp_cancel,
3758         c_parser_omp_cancellation_point, c_parser_omp_distribute,
3759         c_parser_omp_teams, c_parser_omp_target_data,
3760         c_parser_omp_target_update, c_parser_omp_target,
3761         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3762         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3763         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3764         (c_parser_omp_construct): Add p_name and mask vars.  Handle
3765         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3766         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
3767         and c_parser_omp_sections callers.
3768         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3769         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3770         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3771         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
3772         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
3773         OMP_CLAUSE_DEPEND.
3774         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3775         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3776         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3777         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3778         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3779         * c-typeck.c: Include tree-inline.h.
3780         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3781         handle_omp_array_sections_1, handle_omp_array_sections,
3782         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3783         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3784         user defined reductions.
3785         (c_tree_equal): New function.
3786         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3787         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3788         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3789         c_check_omp_declare_reduction_r): New prototypes.
3790         * c-decl.c (current_omp_declare_target_attribute): New variable.
3791         (c_decl_attributes): New function.
3792         (start_decl, start_function): Use it instead of decl_attributes.
3793         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3794         c_omp_reduction_decl, c_omp_reduction_lookup,
3795         c_check_omp_declare_reduction_r): New functions.
3797 2013-09-25  Tom Tromey  <tromey@redhat.com>
3799         * Make-lang.in (c/gccspec.o): Remove.
3800         (CFLAGS-c/gccspec.o): New variable.
3801         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3802         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3803         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3805 2013-09-25  Tom Tromey  <tromey@redhat.com>
3807         * Make-lang.in (c/gccspec.o): Don't use subshell.
3809 2013-09-18  Marek Polacek  <polacek@redhat.com>
3811         PR sanitize/58443
3812         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3813         Remove unnecessary check.
3815 2013-09-18  Marek Polacek  <polacek@redhat.com>
3817         PR sanitizer/58411
3818         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3819         no_sanitize_undefined attribute.
3821 2013-09-13  Kai Tietz  <ktietz@redhat.com>
3823         PR target/57848
3824         * c-decl.c (c_builtin_function_ext_scope): Remove
3825         wrong assumption that it is never called on prexisting
3826         symbol.
3828 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
3830         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3832 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3834         * c-objc-common.c (c_tree_printer): Tidy.
3836 2013-08-30  Marek Polacek  <polacek@redhat.com>
3838         * c-typeck.c (build_binary_op): Add division by zero and shift
3839         instrumentation.
3841 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
3842             Joseph Myers  <joseph@codesourcery.com>
3844         PR c/35649
3845         * c-typeck.c (c_common_type): Prefer double_type_node over
3846         other REAL_TYPE types with the same precision.
3847         (convert_arguments): Likewise.
3849 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3851         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3852         (c_initialize_diagnostics): Call a destructor for the early printer.
3854 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3856         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3857         printer initialization.
3859 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3861         PR c/57490
3862         * c-array-notation.c (fix_conditional_array_notations_1): Added a
3863         check for truth values.
3864         (expand_array_notation_exprs): Added truth values case.  Removed an
3865         unwanted else.  Added for-loop to walk through subtrees in default
3866         case.
3868 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3870         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3872 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
3874         * c-parser.c (struct c_generic_association): Fix typo.
3876 2013-07-23  Tom Tromey  <tromey@redhat.com>
3877             Joseph Myers  <joseph@codesourcery.com>
3879         * c-parser.c (struct c_generic_association): New.
3880         (c_generic_association_d): New typedef.
3881         (c_parser_generic_selection): New function.
3882         (c_parser_postfix_expression): Handle RID_GENERIC.
3884 2013-07-13  Jason Merrill  <jason@redhat.com>
3886         PR c++/57793
3887         * c-decl.c (finish_struct): Check for too-large class.
3889 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
3891         PR c/57821
3892         * c-typeck.c (set_init_index): When folding, check for index overflow.
3894 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3896         * c-parser.c (c_parser_array_notation): Removed rejection of array
3897         notations in an array of function pointers.
3899 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3901         * c-array-notation.c (make_triplet_val_inv): New function.
3902         (create_cmp_incr): Likewise.
3903         (create_array_refs): Likewise.
3904         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3905         Also modularized common parts between functions and called the function.
3906         (build_array_notation_expr): Likewise.
3907         (fix_conditional_array_notations_1): Likewise.
3908         (fix_array_notation_expr): Likewise.
3909         (fix_array_notation_call_expr): Likewise.
3911 2013-06-18  Marek Polacek  <polacek@redhat.com>
3913         PR c/57630
3914         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3916 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3918         * c-array-notation.c (build_array_notation_expr): Reject array notation
3919         mismatch between LHS and RHS even inside a call_expr.  Also, removed
3920         a couple while statements that were dead code.
3922 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3924         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3925         excessive precision expressions in function parameters.  Also removed
3926         couple unwanted while statements.
3928 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3930         * c-array-notation.c (expand_array_notation_exprs): Added
3931         ARRAY_NOTATION_REF case.
3932         
3933 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3935         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3936         function to c-family/array-notation-common.c.
3937         (is_cilkplus_reduce_builtin): Likewise.
3938         (find_rank): Likewise.
3939         (extract_array_notation_exprs): Likewise.
3940         (replace_array_notations): Likewise.
3941         (find_inv_trees): Likewise.
3942         (replace_inv_trees): Likewise.
3943         (contains_array_notation_expr): Likewise.
3944         (find_correct_array_notation_type): Likewise.
3945         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3946         (struct inv_list): Moved this to c-family/array-notation-common.c.
3947         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3948         
3949 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3951         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3952         reduction functions outside the for-loop.  Added a check if the fundecl
3953         is non-NULL.  Finally, removed an unwanted if-statement, and made the
3954         body unconditional.
3956 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3958         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3959         condition of the if-statement matches the rank of else-block and then-
3960         block when array notations are used.
3961         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3962         expression after the entire function body is parsed.
3963         (c_parser_expr_no_commas): Delayed creating array notation expressions
3964         to the end of function parsing.
3965         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3966         whole if-statement instead of just the condition.
3967         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
3969 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3971         PR c/57474
3972         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3973         array to NULL_TREE if they are unused.  Also added a check for the
3974         field to be NULL before its fields are used in future.
3975         
3976 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3978         PR bootstrap/57450
3979         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3980         (build_array_notation_expr): Likewise.
3982 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3984         * c-typeck.c (build_array_ref): Added a check to see if array's
3985         index is greater than one.  If true, then emit an error.
3986         (build_function_call_vec): Exclude error reporting and checking
3987         for builtin array-notation functions.
3988         (convert_arguments): Likewise.
3989         (c_finish_return): Added a check for array notations as a return
3990         expression.  If true, then emit an error.
3991         (c_finish_loop): Added a check for array notations in a loop
3992         condition.  If true then emit an error.
3993         (lvalue_p): Added a ARRAY_NOTATION_REF case.
3994         (build_binary_op): Added a check for array notation expr inside
3995         op1 and op0.  If present, we call another function to find correct
3996         type.
3997         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3998         * c-parser.c (c_parser_compound_statement): Check if array
3999         notation code is used in tree, if so, then transform them into
4000         appropriate C code.
4001         (c_parser_expr_no_commas): Check if array notation is used in LHS
4002         or RHS, if so, then build array notation expression instead of
4003         regular modify.
4004         (c_parser_postfix_expression_after_primary): Added a check for
4005         colon(s) after square braces, if so then handle it like an array
4006         notation.  Also, break up array notations in unary op if found.
4007         (c_parser_direct_declarator_inner): Added a check for array
4008         notation.
4009         (c_parser_compound_statement): Added a check for array notation in
4010         a stmt.  If one is present, then expand array notation expr.
4011         (c_parser_if_statement): Likewise.
4012         (c_parser_switch_statement): Added a check for array notations in
4013         a switch statement's condition.  If true, then output an error.
4014         (c_parser_while_statement): Similarly, but for a while.
4015         (c_parser_do_statement): Similarly, but for a do-while.
4016         (c_parser_for_statement): Similarly, but for a for-loop.
4017         (c_parser_unary_expression): Check if array notation is used in a
4018         pre-increment or pre-decrement expression.  If true, then expand
4019         them.
4020         (c_parser_array_notation): New function.
4021         * c-array-notation.c: New file.
4022         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4023         
4024 2013-05-23  Mike Stump  <mikestump@comcast.net>
4026         * c-typeck.c (convert_for_assignment): Handle references to memory
4027         spaces better.
4029 2013-05-16  Jason Merrill  <jason@redhat.com>
4031         * Make-lang.in (cc1$(exeext)): Use link mutex.
4033 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
4035         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4036         to simply use OPT_Wpointer_arith.
4037         (build_unary_op): Likewise.
4039 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
4041         PR c/19449
4042         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4043         argument.  If set, or it temporarily for parsing of the first
4044         argument into force_folding_builtin_constant_p.
4045         (c_parser_postfix_expression): Adjust callers.
4047 2013-03-21  Richard Biener  <rguenther@suse.de>
4049         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4050         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
4052 2013-02-12  Marek Polacek  <polacek@redhat.com>
4054         PR c/44938
4055         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4056         origtypes to NULL.
4058 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
4060         PR c/56078
4061         * c-typeck.c (set_nonincremental_init_from_string): If
4062         constructor_max_index is NULL, treat it as if tree_int_cst_lt
4063         returned false.
4064         (process_init_element): Likewise.
4066 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
4068         PR c++/55619
4069         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4070         argument, don't call default_function_array_conversion
4071         nor c_fully_fold here.
4072         (c_parser_asm_statement): Adjust callers.
4073         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4074         and outputs here, and call default_function_array_conversion
4075         on inputs that don't need to be addressable.
4077 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
4079         PR c/39464
4080         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4081         warning require that both c_common_unsigned_type as well as
4082         c_common_signed_type is the same for both mvl and mvr types.
4084 2012-11-16  Diego Novillo  <dnovillo@google.com>
4086         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4088         * c-common.c: Use new vec API in vec.h.
4089         * c-common.h: Likewise.
4090         * c-gimplify.c: Likewise.
4091         * c-pragma.c: Likewise.
4092         * c-pretty-print.c: Likewise.
4093         * c-pretty-print.h: Likewise.
4094         * c-semantics.c: Likewise.
4095         * c-decl.c: Likewise.
4096         * c-parser.c: Likewise.
4097         * c-tree.h: Likewise.
4098         * c-typeck.c: Likewise.
4100 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
4102         PR c++/54930
4103         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4105 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4107         PR c/53066
4108         * c-decl.c (warn_if_shadowing): Do not warn if a variable
4109         shadows a function, unless the variable is a function or a
4110         pointer-to-function.
4112 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
4114         PR c/54381
4115         * c-parser.c (struct c_tree_loc_pair): Removed.
4116         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4117         add location_t * and tree * arguments, fill in array of 3
4118         sizeof_arg trees and corresponding locs.
4119         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4120         c_parser_expr_list callers.
4121         (c_parser_postfix_expression_after_primary): Likewise.  Pass
4122         array of 3 sizeof_arg trees and locs (corresponding to first
4123         3 arguments) to sizeof_pointer_memaccess_warning.
4125 2012-10-09  Lawrence Crowl  <crowl@google.com>
4127         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4128         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4129         hash table.
4131 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
4133         PR c++/54194
4134         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4135         call.
4137 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
4139         PR c++/54427
4140         * c-typeck.c: Include c-common.h.
4141         (enum stv_conv): Moved to c-common.h.
4142         (scalar_to_vector): Moved to c-common.c.
4143         (build_binary_op): Adapt to scalar_to_vector's new prototype.
4144         * Make-lang.in: c-typeck.c depends on c-common.h.
4146 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
4148         * c-decl.c (c_write_global_declarations): Fix handling of
4149         -fdump-ada-spec*.
4151 2012-09-30  Sharad Singhai  <singhai@google.com>
4153         * c-decl.c (c_write_global_declarations): Use a different method
4154         to determine if the dump has ben initialized.
4156 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4158         PR c/54552
4159         * c-typeck.c (c_cast_expr): When casting to a type requiring
4160         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4161         c_fully_fold first.
4163 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4165         PR c/54103
4166         * c-typeck.c (build_unary_op): Pass original argument of
4167         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4168         any C_MAYBE_CONST_EXPR, if it has integer operands.
4169         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4170         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4171         to c_objc_common_truthvalue_conversion, then remove any
4172         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
4173         c_objc_common_truthvalue_conversion not
4174         c_common_truthvalue_conversion.
4175         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4176         call note_integer_operands for arguments with integer operands
4177         that are not integer constants.
4179 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
4181         PR c/54559
4182         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4183         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4185 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
4187         PR c/54428
4188         * c-convert.c (convert): Don't call fold_convert_loc if
4189         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4190         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
4191         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4193 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
4195         PR c/54355
4196         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4197         for nested and empty_ok arguments in the call to
4198         c_parser_declaration_or_fndef.
4200 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
4202         * c-tree.h (c_last_sizeof_arg): Declare.
4203         * c-parser.c (struct c_tree_loc_pair): New type.
4204         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
4205         non-NULL.
4206         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4207         (c_parser_postfix_expression_after_primary): Likewise.  Call
4208         sizeof_pointer_memaccess_warning if needed.
4209         (sizeof_ptr_memacc_comptypes): New function.
4210         * c-typeck.c (c_last_sizeof_arg): New global variable.
4211         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4213 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
4215         * c-lang.h (lang_decl): Add variable_size GTY option.
4217 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
4219         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4220         * Make-lang.in: Fix dependencies.
4222 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
4224         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4225         and add language Makefile hooks.
4226         * config-lang.in: New file.
4227         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4228         add the required "normal" config-lang.in rules.
4229         * c-lang.h: Moved from gcc/ to here.
4230         * c-tree.h: Likewise.
4231         * c-objc-common.c: Likewise.
4232         * c-objc-common.h: Likewise.
4233         * c-typeck.c: Likewise.
4234         * c-convert.c: Likewise.
4235         * c-lang.c: Likewise.
4236         * c-aux-info.c: Likewise.
4237         * c-errors.c: Likewise.
4238         * gccspec.c: Likewise.
4239         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
4240         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
4242 Copyright (C) 2012-2017 Free Software Foundation, Inc.
4244 Copying and distribution of this file, with or without modification,
4245 are permitted in any medium without royalty provided the copyright
4246 notice and this notice are preserved.