* g++.dg/cpp1z/init-statement6.C: Rename a function.
[official-gcc.git] / gcc / c / ChangeLog
blobe7b1b3ceb178c710db62fcc5e6b638b3c6af24b3
1 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
2             Richard Biener  <rguenther@suse.de>
4         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5         * config-lang.in (gtfiles): Add c/c-parser.h.
6         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
7         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
8         * c-parser.c (enum c_id_kind, struct c_token,
9         c_parser_next_token_is, c_parser_next_token_is_not,
10         c_parser_next_token_is_keyword,
11         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
12         Split out to ...
13         * c-parser.h: ... new header.
14         * c-parser.c: Include c-parser.h and gimple-parser.h.
15         (c_parser_peek_token, c_parser_peek_2nd_token,
16         c_token_starts_typename, c_parser_next_token_starts_declspecs,
17         c_parser_next_tokens_start_declaration, c_parser_consume_token,
18         c_parser_error, c_parser_require, c_parser_skip_until_found,
19         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
20         c_parser_type_name): Export.
21         (c_parser_tokens_buf): New function.
22         (c_parser_error): Likewise.
23         (c_parser_set_error): Likewise.
24         (c_parser_declspecs): Handle RID_GIMPLE.
25         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
26         via c_parser_parse_gimple_body.
27         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
28         c_token_starts_typename, c_parser_next_token_starts_declspecs,
29         c_parser_next_tokens_start_declaration, c_parser_consume_token,
30         c_parser_error, c_parser_require, c_parser_skip_until_found,
31         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
32         c_parser_type_name): Declare.
33         (struct c_parser): Declare forward.
34         (c_parser_tokens_buf): Declare.
35         (c_parser_error): Likewise.
36         (c_parser_set_error): Likewise.
37         * gimple-parser.c: New file.
38         * gimple-parser.h: Likewise.
40 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
42         PR c/35503
43         * c-parser.c (c_parser_postfix_expression_after_primary): Call
44         warn_for_restrict.
46 2016-09-11  Le-Chun Wu  <lcwu@google.com>
47             Mark Wielaard  <mjw@redhat.com>
49         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
50         to the given -Wshadow= variant.
52 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
54         * c-typeck.c: Include memmodel.h.
56 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
58         PR target/77957
59         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
60         instead of lhd_return_null_tree_v.
62 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
64         PR c++/69733
65         * c-decl.c (smallest_type_quals_location): New static function.
66         (grokdeclarator): Try to find the correct location for an ignored
67         qualifier.
69 2016-09-26  Marek Polacek  <polacek@redhat.com>
71         PR c/7652
72         * c-decl.c (pop_scope): Add gcc_fallthrough.
74 2016-09-26  Marek Polacek  <polacek@redhat.com>
76         PR c/7652
77         * c-parser.c (struct c_token): Add flags field.
78         (c_lex_one_token): Pass it to c_lex_with_flags.
79         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
80         into IFN_FALLTHROUGH.
81         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
82         attribute fallthrough after a case label or default label.
83         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
85 2016-09-24  Marek Polacek  <polacek@redhat.com>
87         PR c/77490
88         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
89         have boolean value.  Warn about ++/-- on booleans.
91 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
93         * c-parser.c (incomplete_record_decls): Remove unnecessary
94         = vNULL initialization of file scope vec.
96 2016-09-16  Marek Polacek  <polacek@redhat.com>
98         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
100 2016-09-14  Marek Polacek  <polacek@redhat.com>
102         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
103         (fix_array_notation_expr): Likewise.
104         * c-decl.c (finish_decl): Likewise.
105         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
106         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
107         (function_to_pointer_conversion): Use false instead of 0.
108         (convert_lvalue_to_rvalue): Likewise.
109         (parser_build_unary_op): Likewise.
110         (build_atomic_assign): Likewise.
111         (build_unary_op): Change nonconvert parameter type to bool, use
112         true/false instead of 1/0.
113         (build_binary_op): Use true instead of 1.
115 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
117         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
118         of add_fixit_insert to add_fixit_insert_before.
120 2016-09-13  Marek Polacek  <polacek@redhat.com>
122         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
123         it.
125 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
127         PR c++/77496
128         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
129         COMPOUND_EXPR to warn_for_omitted_condop.
131 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
133         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
134         c_get_substring_location for this new langhook.
136 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
138         PR c/65467
139         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
140         flag_openmp.
141         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
142         instead of mark_exp_read on low_bound/length expression.
143         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
144         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
145         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
146         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
147         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
148         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
149         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
150         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
151         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
152         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
153         instead of mark_expr_read.
154         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
155         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
156         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
157         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
158         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
159         array section bases outside of depend clause, for depend clause
160         use convert_lvalue_to_rvalue on the base.
161         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
162         linear, aligned, map, to and from clauses.
163         (c_omp_clause_copy_ctor): New function.
165 2016-09-01  Marek Polacek  <polacek@redhat.com>
167         PR c/7652
168         * c-typeck.c (composite_type): Add FALLTHRU comment.
170 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
172         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
173         to the insertion fixits for "struct", "union", and "enum".
175 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
177         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
178         rather than add_fixit_misspelled_id.
179         (undeclared_variable): Likewise.
180         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
181         now-redundant "here" params from add_fixit_insert method calls.
182         (c_parser_parameter_declaration): Likewise.
183         * c-typeck.c (build_component_ref): Remove now-redundant range
184         param from add_fixit_replace method calls.
186 2016-08-25  Marek Polacek  <polacek@redhat.com>
188         * c-typeck.c (parser_build_binary_op): Pass LHS to
189         warn_logical_not_parentheses.
191 2016-08-25  Marek Polacek  <polacek@redhat.com>
193         PR c/77323
194         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
195         or _FloatN or _FloatNx is not supported.
196         (finish_declspecs): Set type to integer_type_node when _FloatN or
197         _FloatNx is not supported.
199 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
201         PR c/32187
202         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
203         (struct c_declspecs): Add field floatn_nx_idx.
204         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
205         and _FloatNx type specifiers.
206         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
207         (c_parser_declspecs, c_parser_attribute_any_word)
208         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
209         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
210         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
211         narrower than double.
213 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
214             Martin Liska  <mliska@suse.cz>
216         PR c/67410
217         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
218         % to determine val element to change.  Assert that
219         wchar_bytes * charwidth fits into val array.
221 2016-08-12  Marek Polacek  <polacek@redhat.com>
223         PR c/7652
224         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
225         (c_parser_postfix_expression): Likewise.
226         * c-typeck.c (build_unary_op): Adjust fall through comment.
227         (c_mark_addressable): Likewise.
229 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
231         PR c/72816
232         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
233         array member through typedef, for orig_qual_indirect == 0 clear
234         orig_qual_type.
236 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
238         PR c/64955
239         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
240         this up to selftest::run_c_tests.
241         (selftest::run_c_tests): New function.
243 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
245         * c-parser.c (struct oacc_routine_data): Add error_seen and
246         fndecl_seen members.
247         (c_finish_oacc_routine): Use these.
248         (c_parser_declaration_or_fndef): Adjust.
249         (c_parser_oacc_routine): Likewise.  Support more C language
250         constructs, and improve diagnostics.  Move pragma context
251         checking...
252         (c_parser_pragma): ... here.
254         * c-parser.c (struct oacc_routine_data): New.
255         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
256         Simplify code.
257         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
258         declare target" attribute.
260 2016-08-01  Jan Beulich  <jbeulich@suse.com>
262         * c-fold.c (c_fully_fold_internal): Also emit shift count
263         warnings for vector types.
264         * c-typeck.c (build_binary_op): Likewise.
266 2016-07-29  Marek Polacek  <polacek@redhat.com>
268         PR c/71742
269         * c-decl.c (finish_struct): Rephrase an error message.
271         PR c/71853
272         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
273         to error node for invalid code.
275         PR c/71573
276         * c-decl.c (implicitly_declare): Return decl early not only for
277         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
279 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
281         PR c/71969
282         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
283         on GNU extern inline functions.
285 2016-07-29  Marek Polacek  <polacek@redhat.com>
287         PR c/71583
288         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
289         check expr.value.
291 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
293         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
295 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
297         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
298         spellcheck-tree.h
299         (best_macro_match): Likewise, converting from a typedef to a
300         subclass.
301         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
302         (lookup_name_fuzzy): Update for change of best_macro_match to a
303         subclass with a ctor that calls cpp_forall_identifiers.
305 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
307         * c-decl.c (implicit_decl_warning): Update for conversion of
308         return type of lookup_name_fuzzy to const char *.
309         (undeclared_variable): Likewise.
310         (lookup_name_fuzzy): Convert return type from tree to
311         const char *.
312         * c-parser.c (c_parser_declaration_or_fndef): Update for
313         conversion of return type of lookup_name_fuzzy to const char *.
314         (c_parser_parameter_declaration): Likewise.
316 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
318         * c-parser.c (c_parser_oacc_declare): Don't scan for
319         GOMP_MAP_POINTER.
320         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
321         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
322         zero-length subarrays.
324 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
326         PR c/71858
327         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
328         instead of FUZZY_LOOKUP_NAME.
329         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
330         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
332 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
334         PR c/71858
335         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
337 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
339         * c-parser.c (c_parser_generic_selection): Make type of variable
340         auto_vec.
341         (c_parser_omp_declare_simd): Likewise.
343 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
345         * c-decl.c (struct c_struct_parse_info): Change member types
346         from vec to auto_vec.
347         (start_struct): Adjust.
348         (finish_struct): Likewise.
350 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
352         PR c/71719
353         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
355 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
357         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
358         Move pragma context checking into...
359         (c_parser_omp_cancellation_point): ... here, and improve
360         diagnostic messages.
361         * c-typeck.c (c_finish_omp_cancel)
362         (c_finish_omp_cancellation_point): Improve diagnostic messages.
364 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
366         PR c/71685
367         * c-typeck.c (c_build_qualified_type): Don't clear
368         C_TYPE_INCOMPLETE_VARS for the main variant.
370 2016-06-28  Martin Sebor  <msebor@redhat.com>
372         PR c/71552
373         * c-typeck.c (output_init_element): Diagnose incompatible types
374         before non-constant initializers.
376 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
378         * Make-lang.in: Don't cat ../stage_current if it does not exist.
380 2016-06-23  Andi Kleen  <ak@linux.intel.com>
382         * Make-lang.in: Add support for autofdo.
384 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
386         PR c/70339
387         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
388         (implicit_decl_warning): When issuing warnings for implicit
389         declarations, attempt to provide a suggestion via
390         lookup_name_fuzzy.
391         (undeclared_variable): Likewise when issuing errors.
392         (lookup_name_in_scope): Likewise.
393         (struct edit_distance_traits<cpp_hashnode *>): New struct.
394         (best_macro_match): New typedef.
395         (find_closest_macro_cpp_cb): New function.
396         (lookup_name_fuzzy): New function.
397         * c-parser.c: Include gcc-rich-location.h.
398         (c_token_starts_typename): Split out case CPP_KEYWORD into...
399         (c_keyword_starts_typename): ...this new function.
400         (c_parser_declaration_or_fndef): When issuing errors about
401         missing "struct" etc, add a fixit.  For other kinds of errors,
402         attempt to provide a suggestion via lookup_name_fuzzy.
403         (c_parser_parms_declarator): When looking ahead to detect typos in
404         type names, also reject CPP_KEYWORD.
405         (c_parser_parameter_declaration): When issuing errors about
406         unknown type names, attempt to provide a suggestion via
407         lookup_name_fuzzy.
408         * c-tree.h (c_keyword_starts_typename): New prototype.
410 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
412         PR c/71601
413         * c-typeck.c (build_conditional_expr): Return error_mark_node if
414         c_common_type returns error_mark_node.
416 2016-06-19  Martin Sebor  <msebor@redhat.com>
418         PR c/69507
419         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
420         __alignof__ (expression).
422 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
424         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
426 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
428         * c-typeck.c (build_component_ref): Simplify fixit code by
429         using gcc_rich_location::add_fixit_misspelled_id.
430         (set_init_label): Likewise.
432 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
434         * c-parser.c (c_parser_initelt): Provide location of name for new
435         location_t param of set_init_label.
436         * c-tree.h (set_init_label): Add location_t param.
437         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
438         param and use it when issuing error messages about unrecognized
439         field names.  Attempt to provide a fixit hint if appropriate,
440         otherwise update the error message to provide the type name.
442 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
444         PR c/71381
445         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
446         Loosen checking.
448 2016-06-08  Martin Sebor  <msebor@redhat.com>
449             Jakub Jelinek  <jakub@redhat.com>
451         PR c++/70507
452         PR c/68120
453         * c-typeck.c (convert_arguments): Don't promote last argument
454         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
456 2016-06-08  Marek Polacek  <polacek@redhat.com>
458         PR c/71418
459         * c-decl.c (grokdeclarator): Check TYPE_P.
461         PR c/71426
462         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
463         code.
465 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
467         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
468         and structure element reference, capture the location of the
469         element name token and pass it to build_component_ref.
470         (c_parser_postfix_expression_after_primary): Likewise for
471         structure element dereference.
472         (c_parser_omp_variable_list): Likewise for
473         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
474         * c-tree.h (build_component_ref): Add location_t param.
475         * c-typeck.c (build_component_ref): Add location_t param
476         COMPONENT_LOC.  Use it, if available, when issuing hints about
477         mispelled member names to provide a fixit replacement hint.
479 2016-06-06  Marek Polacek  <polacek@redhat.com>
481         PR c/71362
482         * c-parser.c (c_parser_direct_declarator): Set location.
484 2016-06-06  Marek Polacek  <polacek@redhat.com>
486         * c-typeck.c (comptypes_internal): Handle comparisons of
487         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
488         TYPE_REF_CAN_ALIAS_ALL.
490 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
492         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
493         arguments as addressable when async clause exists.
495 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
497         PR c++/71349
498         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
499         when combined with target construct.
501 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
503         * c-parser.c (c_parser_omp_clause_schedule): Warn if
504         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
506 2016-05-25  Marek Polacek  <polacek@redhat.com>
508         PR c/71265
509         * c-decl.c (c_make_fname_decl): Don't check seen_error.
511         PR c/71266
512         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
514 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
516         * c-parser.c (c_parser_oacc_declare): Add support for
517         GOMP_MAP_FIRSTPRIVATE_POINTER.
518         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
519         argument with enum c_omp_region_type ort.
520         (handle_omp_array_sections): Likewise.  Update call to
521         handle_omp_array_sections_1.
522         (c_finish_omp_clauses): Add specific errors and warning messages for
523         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
524         call to handle_omp_array_sections.
526 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
528         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
530 2016-05-24  Richard Biener  <rguenther@suse.de>
532         PR middle-end/70434
533         PR c/69504
534         * c-typeck.c (build_array_ref): Do not complain about indexing
535         non-lvalue vectors.  Adjust for function name change.
537 2016-05-20  Martin Sebor  <msebor@redhat.com>
539         PR c/71115
540         * c-typeck.c (error_init): Use
541         expansion_point_location_if_in_system_header.
542         (warning_init): Same.
544 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
546         PR c/71171
547         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
548         in error-handling.
549         (c_parser_postfix_expression): Likewise.
550         * c-tree.h (c_expr::set_error): New method.
551         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
552         that result's range is initialized.
554 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
556         * c-typeck.c (parser_build_unary_op): Fix formatting.
558 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
560         * c-decl.c (grokdeclarator): Remove errmsg and use of
561         targetm.invalid_return_type.
562         (grokparms): Remove errmsg and use of
563         targetm.invalid_parameter_type.
565 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
567         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
568         function return type.
570 2016-05-12  Marek Polacek  <polacek@redhat.com>
572         PR c/70756
573         * c-decl.c (build_compound_literal): Pass LOC down to
574         c_incomplete_type_error.
575         * c-tree.h (require_complete_type): Adjust declaration.
576         (c_incomplete_type_error): Likewise.
577         * c-typeck.c (require_complete_type): Add location parameter, pass it
578         down to c_incomplete_type_error.
579         (c_incomplete_type_error): Add location parameter, pass it down to
580         error_at.
581         (build_component_ref): Pass location down to c_incomplete_type_error.
582         (default_conversion): Pass location down to require_complete_type.
583         (build_array_ref): Likewise.
584         (build_function_call_vec): Likewise.
585         (convert_arguments): Likewise.
586         (build_unary_op): Likewise.
587         (build_c_cast): Likewise.
588         (build_modify_expr): Likewise.
589         (convert_for_assignment): Likewise.
590         (c_finish_omp_clauses): Likewise.
592 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
594         PR c/43651
595         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
596         is enabled.
597         * c-errors.c (pedwarn_c90): Return true if warned.
598         * c-tree.h (pedwarn_c90): Change return type to bool.
599         (enum c_declspec_word): Add new enumerator cdw_atomic.
601 2016-05-11  Marek Polacek  <polacek@redhat.com>
603         PR c++/71024
604         * c-decl.c (diagnose_mismatched_decls): Factor out code to
605         diagnose_mismatched_attributes and call it.
607 2016-05-10  Marek Polacek  <polacek@redhat.com>
609         PR c/70255
610         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
611         on a declaration following the definition.
613 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
615         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
616         parse it through to c_parser_c99_block_statement.
617         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
618         caller.
620 2016-05-04  Marek Polacek  <polacek@redhat.com>
622         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
623         OPT_Wdangling_else.
625 2016-05-04  Marek Polacek  <polacek@redhat.com>
627         PR c/48778
628         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
629         for macro expansions.
631 2016-05-03  Marek Polacek  <polacek@redhat.com>
633         PR c/70859
634         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
635         check_builtin_function_arguments.
637 2016-05-03  Richard Biener  <rguenther@suse.de>
639         * Make-lang.in (cc1-checksum.c): For stage-final re-use
640         the checksum from the previous stage.
642 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
644         * c-parser.c (c_parser_oacc_all_clauses): Update call to
645         c_finish_omp_clauses.
646         (c_parser_omp_all_clauses): Likewise.
647         (c_parser_oacc_cache): Likewise.
648         (c_parser_oacc_loop): Likewise.
649         (omp_split_clauses): Likewise.
650         (c_parser_omp_declare_target): Likewise.
651         (c_parser_cilk_all_clauses): Likewise.
652         (c_parser_cilk_for): Likewise.
653         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
654         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
656 2016-05-02  Marek Polacek  <polacek@redhat.com>
658         PR c/70851
659         * c-decl.c (grokdeclarator): Diagnose when array's size has an
660         incomplete type.
662 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
664         PR middle-end/70626
665         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
666         OACC_LOOP_CLAUSE_MASK.
667         (c_parser_oacc_kernels_parallel): Update call to
668         c_oacc_split_loop_clauses.
670 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
672         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
673         argument to build_modify_expr in two cases.
675 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
677         * c-parser.c (c_parser_postfix_expression_after_primary): Call
678         warn_for_memset instead of warning directly here.
680 2016-04-26  Marek Polacek  <polacek@redhat.com>
682         PR c/67784
683         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
684         out of ...
685         (c_parser_for_statement): ... here.
686         (c_parser_if_statement): Use it.
687         (c_parser_switch_statement): Use it.
688         (c_parser_while_statement): Use it.
690         PR c/70791
691         * c-decl.c (pushdecl): Pass LOCUS down to warning.
693 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
695         PR c++/69363
696         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
697         instead of c_finish_cilk_clauses.
698         * c-tree.h (c_finish_omp_clauses): Add new default argument.
699         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
700         floating-point variables in the linear clause for Cilk Plus.
702 2016-04-18  Michael Matz  <matz@suse.de>
704         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
705         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
707 2016-04-15  Marek Polacek  <polacek@redhat.com>
709         PR c/70671
710         * c-typeck.c (build_unary_op): Pass location down to error and
711         warning call.
713 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
715         PR c/70436
716         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
717         where needed.
718         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
719         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
720         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
721         Adjust c_parser_pragma callers.
722         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
723         caller.
724         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
725         c_parser_statement.
726         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
727         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
728         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
729         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
730         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
731         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
732         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
733         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
734         down where needed.
735         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
736         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
737         calls.
739 2016-04-13  Marek Polacek  <polacek@redhat.com>
741         PR c/70436
742         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
743         adjust callers.
744         (c_parser_statement): Likewise.
745         (c_parser_c99_block_statement): Likewise.
746         (c_parser_while_statement): Likewise.
747         (c_parser_for_statement): Likewise.
748         (c_parser_if_body): Don't set IF_P here.
749         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
750         about dangling else here.
751         * c-tree.h (c_finish_if_stmt): Adjust declaration.
752         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
753         warn about dangling else here.
755 2016-04-04  Marek Polacek  <polacek@redhat.com>
757         PR c/70307
758         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
760 2016-03-31  Marek Polacek  <polacek@redhat.com>
762         PR c/70297
763         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
765 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
767         PR c/70281
768         * c-parser.c (c_parser_postfix_expression): Set the source range
769         for uses of "__builtin_types_compatible_p".
771 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
773         PR c/70280
774         * c-typeck.c (composite_type): Don't count void_list_node
775         into len, if the list is terminated by void_list_node, start
776         with void_list_node instead of NULL for newargs.  Stop
777         at void_list_node.
779 2016-03-16  Marek Polacek  <polacek@redhat.com>
781         PR c/70093
782         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
783         nested functions returning VM types.
785 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
787         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
788         when calling c_finish_omp_clauses.
790 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
792         PR c/69824
793         * c-decl.c (get_parm_info): Don't queue implicit function declarations
794         for later.
796 2016-03-04  Marek Polacek  <polacek@redhat.com>
798         PR c/69798
799         * c-parser.c (c_parser_postfix_expression): Call
800         c_parser_cast_expression rather than c_parser_postfix_expression.
802 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
804         PR c/69796
805         PR c/69974
806         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
807         of incomplete decls to error_mark_node.
809 2016-02-24  Marek Polacek  <polacek@redhat.com>
811         PR c/69819
812         * c-decl.c (finish_decl): Don't update the copy of the type of a
813         different decl type.
815 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
817         PR objc/69844
818         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
819         in id_kind reclassification.
821 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
823         PR c/69835
824         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
826 2016-02-16  James Norris  <jnorris@codesourcery.com>
828         PR c/64748
829         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
831 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
833         * c-decl.c (build_null_declspecs): Zero the entire struct.
835         PR c/69522
836         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
837         callers changed.  If nested_p is true, use it to call
838         finish_implicit_inits.
839         * c-tree.h (finish_implicit_inits): Declare.
840         * c-typeck.c (finish_implicit_inits): New function.  Move code
841         from ...
842         (push_init_level): ... here.
843         (set_designator, process_init_element): Call finish_implicit_inits.
845 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
847         PR c/69768
848         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
849         arguments for -Waddress warning.
851 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
853         PR c/69669
854         * c-decl.c (finish_enum): When honoring mode attribute,
855         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
857 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
859         PR debug/69518
860         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
861         all type variants, not just TYPE_MAIN_VARIANT.
863 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
865         PR debug/66869
866         * c-decl.c (c_write_global_declarations_1): Warn with
867         warn_unused_function if static prototype without definition
868         is not C_DECL_USED.
870 2016-01-27  Marek Polacek  <polacek@redhat.com>
872         PR c/68062
873         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
874         to unsigned, if needed.  Add -Wsign-compare warning.
876 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
878         PR tree-optimization/69483
879         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
881 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
883         PR c/24293
884         * c-tree.h (incomplete_record_decls): Declare.
885         * c-parser.c (incomplete_record_decls): Define.
886         (c_parser_translation_unit): Iterate through incomplete_record_decls and
887         report error if any decl has zero size.
888         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
889         or enum type to incomplete_record_decls.
891 2016-01-14  Tom de Vries  <tom@codesourcery.com>
893         PR tree-optimization/68773
894         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
895         set force_output.
897 2016-01-14  Marek Polacek  <polacek@redhat.com>
899         PR c/69262
900         * c-decl.c (grokdeclarator): Provide more information for invalid
901         array declarations.
903 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
905         * c-parser.c (c_parser_unary_expression): For dereferences, build
906         a combined location before calling build_indirect_ref, so that
907         error reports cover the full range, manually updating the c_expr
908         src_range.
910 2016-01-06  Marek Polacek  <polacek@redhat.com>
912         PR sanitizer/69099
913         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
914         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
915         NULL.
917 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
919         Update copyright years.
921 2016-01-04  Marek Polacek  <polacek@redhat.com>
923         PR c/68908
924         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
925         optimization to use __atomic_fetch_* built-in if possible.
927 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
929         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
930         into...
931         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
932         all users.
934 2015-12-22  Marek Polacek  <polacek@redhat.com>
936         PR c/69002
937         * c-typeck.c (build_component_ref): Warn when acessing elements of
938         atomic structures or unions.
940 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
942         * c-typeck.c: Include "gcc-rich-location.h".
943         (build_binary_op): In the two places that call binary_op_error,
944         create a gcc_rich_location and populate it with the location of
945         the binary op and its two operands.
947 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
949         * c-parser.c (c_parser_statement_after_labels): When calling
950         c_finish_return, Use the return expression's location if it has
951         one, falling back to the location of the first token within it.
952         * c-typeck.c (c_finish_return): When issuing warnings about
953         the incorrect presence/absence of a return value, issue a note
954         showing the declaration of the function.
956 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
958         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
959         to 4.
960         (c_parser_peek_nth_token): New function.
961         (c_parser_peek_conflict_marker): New function.
962         (c_parser_error): Detect conflict markers and report them as such.
964 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
966         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
967         to preserve range information for the primary expression
968         in the call to c_parser_postfix_expression_after_primary.
970 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
972         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
973         expression location, falling back on the first token location,
974         rather than always using the latter.
976 2015-12-16  Marek Polacek  <polacek@redhat.com>
978         PR c/64637
979         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
980         available.
982 2015-12-15  Marek Polacek  <polacek@redhat.com>
984         PR c/68907
985         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
986         artificial decl.
988 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
990         * c-parser.c (c_parser_alignof_expression): Capture location of
991         closing parenthesis (if any), or of end of unary expression, and
992         use it to build a src_range for the expression.
994 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
996         PR c/68757
997         * c-parser.c (c_parser_get_builtin_args): Add
998         "out_close_paren_loc" param, and write back to it.
999         (c_parser_postfix_expression): Capture the closing
1000         parenthesis location for RID_CHOOSE_EXPR,
1001         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1002         RID_BUILTIN_SHUFFLE and use it to set the source range
1003         for such expressions; within RID_BUILTIN_COMPLEX set
1004         the underlying location.
1006 2015-12-07  Marek Polacek  <polacek@redhat.com>
1008         PR c/68668
1009         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1010         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1012 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
1014         * c-tree.h (c_build_va_arg): Adjust prototype.
1015         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1016         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1017         parameter, adjust throughout and issue an error if EXPR is a component
1018         with reverse storage order.
1020 2015-12-02  Jason Merrill  <jason@redhat.com>
1022         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1023         (c_fully_fold_internal, decl_constant_value_for_optimization):
1024         Move from c-common.c.
1025         * c-tree.h: Declare decl_constant_value_for_optimization.
1026         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1028 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
1030         PR c/68162
1031         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1032         following link from declarator to next declarator.  Track original
1033         qualified type and pass it to c_build_qualified_type.
1034         * c-typeck.c (c_build_qualified_type): Add arguments
1035         orig_qual_type and orig_qual_indirect.
1037 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
1039         * c-parser.c (c_parser_omp_clause_name)
1040         (c_parser_oacc_all_clauses): Alphabetical sorting.
1042 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
1044         PR c/68533
1045         * c-decl.c (get_parm_info): Use b->locus instead of input_location
1046         for diagnostics.
1048 2015-12-01  Julian Brown  <julian@codesourcery.com>
1049             Cesar Philippidis  <cesar@codesourcery.com>
1050             James Norris  <James_Norris@mentor.com>
1052         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1053         (c_parser_oacc_clause_use_device): New function.
1054         (c_parser_oacc_all_clauses): Add use_device support.
1055         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1056         (c_parser_oacc_host_data): New function.
1057         (c_parser_omp_construct): Add host_data support.
1058         * c-tree.h (c_finish_oacc_host_data): Add prototype.
1059         * c-typeck.c (c_finish_oacc_host_data): New function.
1060         (c_finish_omp_clauses): Add use_device support.
1062 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
1064         PR c/67106
1065         * c-decl.c: Set TYPE_PACKED in variants.
1067 2015-11-27  Martin Liska  <mliska@suse.cz>
1069         PR c++/68312
1070         * c-array-notation.c (fix_builtin_array_notation_fn):
1071         Use release_vec_vec instead of vec::release.
1072         (build_array_notation_expr): Likewise.
1073         (fix_conditional_array_notations_1): Likewise.
1074         (fix_array_notation_expr): Likewise.
1075         (fix_array_notation_call_expr): Likewise.
1077 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
1079         PR c/63326
1080         * c-parser.c (c_parser_compound_statement_nostart): If
1081         last_label is true, use pragma_stmt instead of pragma_compound
1082         as second c_parser_pragma argument.
1083         (c_parser_omp_ordered, c_parser_omp_target_update,
1084         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1085         false as second argument to c_parser_skip_to_pragma_eol after
1086         diagnosing standalone directives used in pragma_stmt context.
1088 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
1090         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1091         with "if (ENABLE_OFFLOADING)".
1093 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
1095         PR objc/68438
1096         * c-parser.c (c_parser_postfix_expression): Set up source ranges
1097         for various Objective-C constructs: Class.name syntax,
1098         @selector(), @protocol(), @encode(), and [] message syntax.
1100 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
1102         PR 62314
1103         * c-typeck.c (should_suggest_deref_p): New function.
1104         (build_component_ref): Special-case POINTER_TYPE when
1105         generating a "not a structure of union"  error message, and
1106         suggest a "->" rather than a ".", providing a fix-it hint.
1108 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
1110         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1111         candidate into a new function, find_closest_identifier.
1113 2015-11-19  Marek Polacek  <polacek@redhat.com>
1115         PR c/68412
1116         * c-typeck.c (parser_build_binary_op): Properly handle
1117         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1119 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
1121         * c-parser.c (set_c_expr_source_range): Bulletproof both
1122         overloaded implementations against NULL expr->value.
1123         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1124         values.
1125         (c_parser_unary_expression): Likewise when handling addresses of
1126         labels.
1127         (c_parser_postfix_expression): Likewise for statement expressions,
1128         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1129         __builtin_va_arg, and for __builtin_offset_of.
1130         (c_parser_postfix_expression_after_paren_type): Initialize expr's
1131         src_range using the range of the braced initializer.
1132         (c_parser_transaction_expression): Set src_range for "ret" to a
1133         sane pair of values.
1135 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
1137         * c-parser.c (c_finish_omp_declare_simd): Look for
1138         "simd" attribute as well. Update error message.
1140 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1142         * c-parser.c (c_parser_omp_declare_target): Adjust.
1144 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
1146         * c-typeck.c (c_finish_omp_clauses): Don't mark
1147         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1149 2015-11-14  Marek Polacek  <polacek@redhat.com>
1151         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1152         * c-typeck.c: Likewise.
1154 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1156         * c-decl.c (warn_defaults_to): Pass line_table to
1157         rich_location ctor.
1158         * c-errors.c (pedwarn_c99): Likewise.
1159         (pedwarn_c90): Likewise.
1160         * c-parser.c (set_c_expr_source_range): New functions.
1161         (c_token::get_range): New method.
1162         (c_token::get_finish): New method.
1163         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1164         based on the range from the start of the LHS to the end of the
1165         RHS.
1166         (c_parser_conditional_expression): Likewise, based on the range
1167         from the start of the cond.value to the end of exp2.value.
1168         (c_parser_binary_expression): Call set_c_expr_source_range on
1169         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1170         (c_parser_cast_expression): Call set_c_expr_source_range on ret
1171         based on the cast_loc through to the end of the expr.
1172         (c_parser_unary_expression): Likewise, based on the
1173         op_loc through to the end of op.
1174         (c_parser_sizeof_expression) Likewise, based on the start of the
1175         sizeof token through to either the closing paren or the end of
1176         expr.
1177         (c_parser_postfix_expression): Likewise, using the token range,
1178         or from the open paren through to the close paren for
1179         parenthesized expressions.
1180         (c_parser_postfix_expression_after_primary): Likewise, for
1181         various kinds of expression.
1182         * c-tree.h (struct c_expr): Add field "src_range".
1183         (c_expr::get_start): New method.
1184         (c_expr::get_finish): New method.
1185         (set_c_expr_source_range): New decls.
1186         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1187         on ret for prefix unary ops.
1188         (parser_build_binary_op): Likewise, running from the start of
1189         arg1.value through to the end of arg2.value.
1191 2015-11-13  Marek Polacek  <polacek@redhat.com>
1193         PR c/68320
1194         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1196 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1198         * c-typeck.c: Include spellcheck.h.
1199         (lookup_field_fuzzy_find_candidates): New function.
1200         (lookup_field_fuzzy): New function.
1201         (build_component_ref): If the field was not found, try using
1202         lookup_field_fuzzy and potentially offer a suggestion.
1204 2015-11-12  James Norris  <jnorris@codesourcery.com>
1205             Joseph Myers  <joseph@codesourcery.com>
1207         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1208         (c_parser_omp_clause_name): Handle 'device_resident' clause.
1209         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1210         and PRAGMA_OMP_CLAUSE_LINK.
1211         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1212         and PRAGMA_OACC_CLAUSE_LINK.
1213         (OACC_DECLARE_CLAUSE_MASK): New definition.
1214         (c_parser_oacc_declare): New function.
1216 2015-11-12  Marek Polacek  <polacek@redhat.com>
1218         PR c/67784
1219         * c-parser.c (c_parser_for_statement): Reclassify the token in
1220         a correct scope.
1222 2015-11-11  Marek Polacek  <polacek@redhat.com>
1224         PR c/68107
1225         PR c++/68266
1226         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
1227         checking the size of an array.
1229 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
1231         * c-array-notation.c: Remove unused header files.
1232         * c-aux-info.c: Likewise.
1233         * c-convert.c: Likewise.
1234         * c-decl.c: Likewise.
1235         * c-errors.c: Likewise.
1236         * c-lang.c: Likewise.
1237         * c-objc-common.c: Likewise.
1238         * c-parser.c: Likewise.
1239         * c-typeck.c: Likewise.
1240         * gccspec.c: Likewise.
1242 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
1243             Cesar Philippidis  <cesar@codesourcery.com>
1244             James Norris  <jnorris@codesourcery.com>
1245             Julian Brown  <julian@codesourcery.com>
1246             Nathan Sidwell  <nathan@codesourcery.com>
1248         c/
1249         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1250         routine arg.
1251         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1252         (c_parser_pragma): Parse 'acc routine'.
1253         (OACC_ROUTINE_CLAUSE_MARK): Define.
1254         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1256 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1258         PR debug/67192
1259         * c-typeck.c (c_finish_loop): For unconditional loops, set the
1260         location of the backward-goto to the start of the loop body.
1262 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1264         PR debug/67192
1265         * c-parser.c (c_parser_while_statement): Finish the loop before
1266         parsing ahead for misleading indentation.
1267         (c_parser_for_statement): Likewise.
1269 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1271         * c-decl.c (finish_struct): If the structure has reverse storage
1272         order, rewrite the type of array fields with scalar component.  Call
1273         maybe_apply_pragma_scalar_storage_order on entry.
1274         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
1275         errors on bit-fields and reverse SSO here and not...
1276         (c_mark_addressable): ...here.
1277         (output_init_element): Adjust call to initializer_constant_valid_p.
1278         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1280 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
1282         * c-decl.c (warn_defaults_to): Update for change in signature
1283         of diagnostic_set_info.
1284         * c-errors.c (pedwarn_c99): Likewise.
1285         (pedwarn_c90): Likewise.
1286         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1287         for textinfo::set_location.
1289 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
1290             Thomas Schwinge  <thomas@codesourcery.com>
1291             James Norris  <jnorris@codesourcery.com>
1293         * c-parser.c (c_parser_omp_clause_name): Add support for
1294         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1295         (c_parser_omp_clause_default): Add is_oacc argument. Handle
1296         default(none) in OpenACC.
1297         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1298         arguments.
1299         (c_parser_oacc_clause_tile): New function.
1300         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1301         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1302         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1303         TILE}.
1304         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1305         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1306         FIRSTPRIVATE}.
1307         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1308         (c_parser_oacc_update): Update the error message for missing clauses.
1309         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1310         and OMP_CLAUSE_INDEPENDENT.
1312 2015-11-05  Marek Polacek  <polacek@redhat.com>
1314         PR c/68090
1315         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1316         deal with pre-evaluation on invalid types.
1318 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
1319             Ilya Verbin  <ilya.verbin@intel.com>
1321         * c-parser.c: Include context.h and gimple-expr.h.
1322         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1323         monotonic together with nonmonotonic.
1324         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
1325         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1326         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1327         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1328         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
1329         expressions on combined target teams before the target.
1330         (c_parser_omp_declare_target): If decl has "omp declare target" or
1331         "omp declare target link" attribute, and cgraph or varpool node already
1332         exists, then set corresponding flags.  Call c_finish_omp_clauses
1333         in the parenthesized extended-list syntax case.
1334         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1335         declare target.
1336         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1337         on OMP_CLAUSE_REDUCTION array sections.
1338         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1339         into the constant offset, or for variable low-bound using
1340         POINTER_PLUS_EXPR.  For structure element based array sections use
1341         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1342         (c_finish_omp_clauses): Drop generic_field_head, structure
1343         elements are now always mapped even as array section bases,
1344         diagnose same var in data sharing and mapping clauses.  Diagnose if
1345         linear step on declare simd is neither a constant nor a uniform
1346         parameter.  Look through POINTER_PLUS_EXPR for array section
1347         reductions.  Diagnose the same var or function appearing multiple
1348         times on the same directive.  Fix up wording for the to clause if t
1349         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
1350         modifier on kinds other than dynamic or guided or nonmonotonic
1351         modifier together with ordered clause.
1353 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
1354             Chung-Lin Tang  <cltang@codesourcery.com>
1356         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1358 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
1360         * c-array-notation.c: Reorder #include's and remove duplicates.
1361         * c-aux-info.c: Likewise.
1362         * c-convert.c: Likewise.
1363         * c-decl.c: Likewise.
1364         * c-errors.c: Likewise.
1365         * c-lang.c: Likewise.
1366         * c-objc-common.c: Likewise.
1367         * c-parser.c: Likewise.
1368         * c-typeck.c: Likewise.
1370 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
1372         PR debug/66068
1373         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1374         after calling build_qualified_type.
1376 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
1377             Thomas Schwinge  <thomas@codesourcery.com>
1378             James Norris  <jnorris@codesourcery.com>
1379             Joseph Myers  <joseph@codesourcery.com>
1380             Julian Brown  <julian@codesourcery.com>
1381             Bernd Schmidt  <bschmidt@redhat.com>
1383         * c-parser.c (c_parser_oacc_shape_clause): New.
1384         (c_parser_oacc_simple_clause): New.
1385         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1386         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1388 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
1389             James Norris  <jnorris@codesourcery.com>
1390             Cesar Philippidis  <cesar@codesourcery.com>
1392         PR c/64765
1393         PR c/64880
1394         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1395         parameters, and handle these.  Adjust all users.
1396         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1397         into...
1398         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
1399         all users.
1400         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1401         declare functions.
1402         (c_finish_omp_construct): Declare function.
1403         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1404         Merge functions into...
1405         (c_finish_omp_construct): ... this new function.
1407 2015-10-22  Richard Biener  <rguenther@suse.de>
1409         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1410         before folding a MINUS_EXPR.
1412 2015-10-21  Marek Polacek  <polacek@redhat.com>
1414         PR c/68024
1415         * c-decl.c (start_function): Warn about vararg functions without
1416         a prototype.
1418 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
1420         * c-typeck.c (build_conditional_expr): Use boolean vector
1421         type for vector comparison.
1422         (build_vec_cmp): New.
1423         (build_binary_op): Use build_vec_cmp for comparison.
1425 2015-10-20  Marek Polacek  <polacek@redhat.com>
1427         * c-parser.c (is_cilkplus_vector_p): Don't define here.
1429 2015-10-20  Marek Polacek  <polacek@redhat.com>
1431         PR c/67964
1432         * c-parser.c (c_parser_attributes): Break out of the loop if the
1433         token after an attribute isn't a comma.
1435 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
1436             Aldy Hernandez  <aldyh@redhat.com>
1438         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1439         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1440         (c_parser_omp_variable_list): Handle structure elements for
1441         map, to and from clauses.  Handle array sections in reduction
1442         clause.  Formatting fixes.
1443         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1444         if clause modifiers.
1445         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1446         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1447         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1448         c_parser_omp_clause_is_device_ptr): New functions.
1449         (c_parser_omp_clause_ordered): Parse optional parameter.
1450         (c_parser_omp_clause_reduction): Handle array reductions.
1451         (c_parser_omp_clause_schedule): Parse optional simd modifier.
1452         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1453         functions.
1454         (c_parser_omp_clause_linear): Parse linear clause modifiers.
1455         (c_parser_omp_clause_depend_sink): New function.
1456         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1457         (c_parser_omp_clause_map): Parse release/delete map kinds and
1458         optional always modifier.
1459         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1460         and c_finish_omp_clauses callers.
1461         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
1462         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1463         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1464         (OMP_CRITICAL_CLAUSE_MASK): Define.
1465         (c_parser_omp_critical): Parse critical clauses.
1466         (c_parser_omp_for_loop): Handle doacross loops, adjust
1467         c_finish_omp_for and c_finish_omp_clauses callers.
1468         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1469         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1470         (OMP_FOR_CLAUSE_MASK): Add linear clause.
1471         (c_parser_omp_for): Disallow ordered clause when combined with
1472         distribute.  Disallow linear clause when combined with distribute
1473         and not combined with simd.
1474         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1475         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1476         parse clauses and if depend clause is found, don't parse a body.
1477         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1478         Allow target parallel without for after it.
1479         (OMP_TASK_CLAUSE_MASK): Add priority clause.
1480         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1481         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1482         invalid kinds.
1483         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1484         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1485         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1486         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1487         functions.
1488         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1489         defaultmap and is_device_ptr clauses.
1490         (c_parser_omp_target): Parse target parallel and target simd.  Set
1491         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
1492         and target exit data.  Diagnose invalid map kinds.
1493         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1494         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1495         construct.
1496         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1497         &omp_priv.
1498         (OMP_TASKLOOP_CLAUSE_MASK): Define.
1499         (c_parser_omp_taskloop): New function.
1500         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1501         handle PRAGMA_OMP_TASKLOOP.
1502         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1503         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1504         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1505         Add IS_OMP argument, handle structure element bases, diagnose
1506         bitfields, pass IS_OMP recursively, diagnose known zero length
1507         array sections in depend clauses, handle array sections in reduction
1508         clause, diagnose negative length even for pointers.
1509         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1510         types, pass IS_OMP down to handle_omp_array_sections_1, handle
1511         array sections in reduction clause, set
1512         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1513         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1514         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1515         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1517 2015-10-06  Marek Polacek  <polacek@redhat.com>
1519         * c-parser.c (c_parser_statement_after_labels): Use
1520         protected_set_expr_location.
1521         (c_parser_omp_clause_num_gangs): Likewise.
1522         (c_parser_omp_clause_num_threads): Likewise.
1523         (c_parser_omp_clause_num_workers): Likewise.
1524         (c_parser_omp_clause_vector_length): Likewise.
1525         (c_parser_omp_clause_num_teams): Likewise.
1526         (c_parser_omp_clause_thread_limit): Likewise.
1527         * c-typeck.c (build_c_cast): Likewise.
1528         (c_cast_expr): Likewise.
1530 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
1532         * c-typeck.c (c_tree_equal): Use real_equal instead of
1533         REAL_VALUES_EQUAL.
1535 2015-10-04  Jason Merrill  <jason@redhat.com>
1537         * c-parser.c (c_lex_one_token): Handle @synchronized.
1538         * c-decl.c (match_builtin_function_types): A declaration of a built-in
1539         can change whether the function is transaction_safe.
1541 2015-10-02  Marek Polacek  <polacek@redhat.com>
1543         PR c/67730
1544         * c-typeck.c (convert_for_assignment): Use the expansion point
1545         location throughout.
1547 2015-10-02  Marek Polacek  <polacek@redhat.com>
1549         PR c/64249
1550         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1551         and pass it down to c_parser_if_statement.
1552         (c_parser_else_body): Add CHAIN parameter and pass it down to
1553         c_parser_statement_after_labels.
1554         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
1555         duplicated if-else-if conditions.
1557 2015-10-01  Marek Polacek  <polacek@redhat.com>
1559         * c-typeck.c (convert_for_assignment): Improve commentary.
1561 2015-09-30  Marek Polacek  <polacek@redhat.com>
1563         PR c/67730
1564         * c-typeck.c (c_finish_return): Use the expansion point location for
1565         certain "return with value" warnings.
1567 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1569         * c-parser.c (pragma_lex): Add loc argument.
1571 2015-09-15  Marek Polacek  <polacek@redhat.com>
1573         PR c/67580
1574         * c-decl.c (tag_exists_p): New function.
1575         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1576         struct/union/enum keywords are missing.
1577         * c-tree.h (tag_exists_p): Declare.
1579 2015-09-15  Marek Polacek  <polacek@redhat.com>
1581         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1582         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1583         Return NULL_TREE instead of 0.
1584         (lookup_name): Return NULL_TREE instead of 0.
1585         (lookup_name_in_scope): Likewise.
1586         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1587         (parser_xref_tag): Use false instead of 0.
1588         (start_struct): Use true instead of 1.
1589         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1591 2015-09-14  Marek Polacek  <polacek@redhat.com>
1593         * c-typeck.c (set_nonincremental_init_from_string): Use
1594         HOST_WIDE_INT_M1U when shifting a negative value.
1596 2015-09-09  Mark Wielaard  <mjw@redhat.com>
1598         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1599         parm against NULL.
1601 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
1603         PR c/67502
1604         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1605         into OMP_FOR_PRE_BODY rather than before the loop.
1607 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
1609         PR c/67501
1610         * c-parser.c (c_parser_oacc_all_clauses,
1611         c_parser_omp_all_clauses): Remove invalid clause from
1612         list of clauses even if parser->error is set.
1614         PR c/67500
1615         * c-parser.c (c_parser_omp_clause_aligned,
1616         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1617         test for errors.
1618         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1619         error_mark_node.
1621         PR c/67495
1622         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1623         instead of c_parser_unary_expression.  If the result is !lvalue_p,
1624         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1626 2015-09-04  Marek Polacek  <polacek@redhat.com>
1628         PR sanitizer/67279
1629         * c-typeck.c (build_binary_op): Don't instrument static initializers.
1631 2015-09-03  Martin Sebor  <msebor@redhat.com>
1633         PR c/66516
1634         * c-typeck.c (convert_arguments, parser_build_unary_op,
1635         build_conditional_expr, c_cast_expr, convert_for_assignment,
1636         build_binary_op, _objc_common_truthvalue_conversion): Call
1637         reject_gcc_builtin.
1638         (c_decl_implicit): Define.
1640 2015-09-02  Marek Polacek  <polacek@redhat.com>
1642         PR c/67432
1643         * c-parser.c (c_parser_enum_specifier): Give a better error for
1644         an empty enum.
1646 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
1648         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1650 2015-08-12  Marek Polacek  <polacek@redhat.com>
1652         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1653         LOC to it.
1655 2015-08-03  Marek Polacek  <polacek@redhat.com>
1657         PR c/67088
1658         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1659         Use it.
1660         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1662 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
1664         * c-parser.c (c_parser_if_body): Take token_indent_info
1665         argument. Call warn_for_misleading_indentation even when the
1666         body is a semicolon.  Extract token_indent_infos corresponding
1667         to the guard, body and next tokens.  Adjust call to
1668         warn_for_misleading_indentation accordingly.
1669         (c_parser_else_body): Likewise.
1670         (c_parser_if_statement): Likewise.
1671         (c_parser_while_statement): Likewise.
1672         (c_parser_for_statement): Likewise.
1674 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
1675             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1677         * c-decl.c (get_parm_info): Remove static var. Update warning
1678         message.
1680 2015-07-27  Marek Polacek  <polacek@redhat.com>
1682         PR c++/66555
1683         PR c/54979
1684         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1686 2015-07-20  Marek Polacek  <polacek@redhat.com>
1688         PR c++/55095
1689         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1690         (build_binary_op): Warn about left shift overflows.
1692 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
1694         * c-array-notation.c: Adjust includes for flags.h changes.
1695         * c-objc-common.c: Likewise.
1697 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
1699         * c-array-notation.c: Adjust includes.
1700         * c-aux-info.c: Likewise.
1701         * c-convert.c: Likewise.
1702         * c-decl.c: Likewise.
1703         * c-errors.c: Likewise.
1704         * c-lang.c: Likewise.
1705         * c-objc-common.c: Likewise.
1706         * c-parser.c: Likewise.
1707         * c-typeck.c: Likewise.
1709 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1711         PR fortran/66605
1712         * c-decl.c (finish_function): Call do_warn_unused_parameter.
1714 2015-06-29  Marek Polacek  <polacek@redhat.com>
1716         PR c/66322
1717         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1718         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
1719         about -Wswitch-bool here.
1720         (do_case): Update c_add_case_label call.
1721         (c_finish_case): Update c_do_switch_warnings call.
1723 2015-06-27  Marek Polacek  <polacek@redhat.com>
1725         * c-typeck.c: Use VECTOR_TYPE_P throughout.
1727 2015-06-26  Marek Polacek  <polacek@redhat.com>
1729         * c-array-notation.c (fix_builtin_array_notation_fn): Use
1730         INDIRECT_REF_P.
1731         * c-typeck.c (array_to_pointer_conversion): Likewise.
1732         (build_unary_op): Likewise.
1733         (c_finish_return): Likewise.
1735 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
1737         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1738         * c-parser.c: Likewise.
1740 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
1742         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1743         instead of pointer_hash.
1744         (detect_field_duplicates): Likewise.
1746 2015-06-25  Marek Polacek  <polacek@redhat.com>
1748         * c-array-notation.c: Use VAR_P throughout.
1749         * c-decl.c: Likewise.
1750         * c-objc-common.c: Likewise.
1751         * c-parser.c: Likewise.
1752         * c-typeck.c: Likewise.
1754 2015-06-25  Marek Polacek  <polacek@redhat.com>
1756         * c-decl.c: Use is_global_var throughout.
1757         * c-parser.c: Likewise.
1758         * c-typeck.c: Likewise.
1760 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1762         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1763         * c-aux-info.c: Likewise.
1764         * c-convert.c: Likewise.
1765         * c-decl.c: Likewise.
1766         * c-errors.c: Likewise.
1767         * c-lang.c: Likewise.
1768         * c-objc-common.c: Likewise.
1769         * c-parser.c: Likewise.
1770         * c-typeck.c: Likewise.
1772 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
1774         PR middle-end/66325
1775         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1776         variants.
1778 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
1780         * c-decl.c (pop_scope): Register the main translation unit
1781         through the new debug hook.
1783 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
1785         * c-array-notation.c : Adjust include files.
1786         * c-aux-info.c : Likewise.
1787         * c-convert.c : Likewise.
1788         * c-decl.c : Likewise.
1789         * c-errors.c : Likewise.
1790         * c-lang.c : Likewise.
1791         * c-lang.h : Likewise.
1792         * c-objc-common.c : Likewise.
1793         * c-parser.c : Likewise.
1794         * c-typeck.c : Likewise.
1796 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1798         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1799         immediately clobber it.
1800         (c_write_global_declarations_1): Remove call to
1801         check_global_declaration_1.
1802         (c_write_global_declarations_2): Remove.
1803         (c_write_final_cleanups): Rename from c_write_global_declarations.
1804         Remove call to finalize_compilation_unit.
1805         Remove calls to debugging hooks.
1806         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1807         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1808         * c-tree.h: Remove c_write_global_declarations.
1810 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1812         * c-array-notation.c: Adjust includes for restructured coretypes.h.
1813         * c-aux-info.c: Likewise.
1814         * c-convert.c: Likewise.
1815         * c-decl.c: Likewise.
1816         * c-errors.c: Likewise.
1817         * c-lang.c: Likewise.
1818         * c-objc-common.c: Likewise.
1819         * c-parser.c: Likewise.
1820         * c-typeck.c: Likewise.
1822 2015-06-04  Marek Polacek  <polacek@redhat.com>
1824         PR c/66341
1825         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1826         it is a lvalue.
1828 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1830         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1831         Warn for empty struct.
1832         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1834 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
1836         * c-decl.c (start_function): Call plugin before parsing.
1837         (finish_function): Call plugin after parsing.
1839 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1841         PR c/49551
1842         * c-decl.c (merge_decls): Merge DECL_COMMON.
1844 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
1846         * Make-lang.in (check_gcc_pallelize): Define.
1848 2015-05-22  Marek Polacek  <polacek@redhat.com>
1850         PR c/47043
1851         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1852         attributes.
1854 2015-05-21  Marek Polacek  <polacek@redhat.com>
1856         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1857         DECL_BUILT_IN.
1859 2015-05-20  Marek Polacek  <polacek@redhat.com>
1861         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1862         * c-typeck.c: Likewise.
1864 2015-05-19  Marek Polacek  <polacek@redhat.com>
1866         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1868 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1870         PR middle-end/66199
1871         * c-parser.c (c_parser_omp_for_loop): Don't add
1872         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1873         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1874         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1875         constructs.
1877 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1879         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1880         swaps.
1882 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1884         PR fortran/44054
1885         * c-objc-common.c (c_tree_printer): Replace locus pointer with
1886         accessor function.
1888 2015-05-14  Marek Polacek  <polacek@redhat.com>
1890         PR c/66066
1891         PR c/66127
1892         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1893         rather than with 0.
1895 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1897         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1898         to add a call to warn_for_misleading_indentation.
1899         (c_parser_else_body): Likewise, adding param "else_loc".
1900         (c_parser_if_statement): Check for misleading indentation.
1901         (c_parser_while_statement): Likewise.
1902         (c_parser_for_statement): Likewise.
1904 2015-05-08  Marek Polacek  <polacek@redhat.com>
1906         PR c/64918
1907         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1908         (output_init_element): Likewise.
1910 2015-05-07  Marek Polacek  <polacek@redhat.com>
1912         PR c/65179
1913         * c-typeck.c (build_binary_op): Warn when left shifting a negative
1914         value.
1916 2015-04-30  Marek Polacek  <polacek@redhat.com>
1918         * c-typeck.c (set_init_label): Call error_at instead of error and
1919         pass LOC to it.
1921         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
1922         the type of a decl.
1924         * c-typeck.c (c_build_va_arg): Clarify the error message.
1926 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1928         * c-parser.c (c_parser_oacc_enter_exit_data): Use
1929         OMP_STANDALONE_CLAUSES.
1931 2015-04-28  Marek Polacek  <polacek@redhat.com>
1933         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1935 2015-04-28  Marek Polacek  <polacek@redhat.com>
1937         PR c/65901
1938         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1940 2015-04-25  Marek Polacek  <polacek@redhat.com>
1942         PR c/52085
1943         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
1944         attribute.
1946 2015-04-23  Marek Polacek  <polacek@redhat.com>
1948         PR c/65345
1949         * c-decl.c (set_labels_context_r): New function.
1950         (store_parm_decls): Call it via walk_tree_without_duplicates.
1951         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1952         instead of create_tmp_var.  Build TARGET_EXPR instead of
1953         COMPOUND_EXPR.
1954         (build_atomic_assign): Use create_tmp_var_raw instead of
1955         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
1957 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1959         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1960         (c_parser_omp_target_update): Add missed %> to error_at ().
1962 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1964         PR target/55143
1965         * c-decl.c (c_default_pointer_mode): Remove definition.
1966         * c-tree.h (c_default_pointer_mode): Remove declaration.
1968 2015-03-27  Tobias Burnus  <burnus@net-b.de>
1970         PR c/65586
1971         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1972         error out.
1973         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1974         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1975         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1977 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
1979         * c-decl.c (c_decl_attributes): Also add "omp declare target"
1980         attribute for DECL_EXTERNAL VAR_DECLs.
1982 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
1984         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1985         argument.
1987 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1989         PR c/65120
1990         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1991         before preparing arguments to warn_logical_not_parentheses.
1993 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
1995         PR c/65120
1996         * c-typeck.c (parser_build_binary_op): Don't warn for
1997         !!x == y or !b == y where b is _Bool.
1999 2015-03-09  Marek Polacek  <polacek@redhat.com>
2001         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2002         * c-decl.c (grokdeclarator): Likewise.
2003         * c-typeck.c (build_binary_op): Likewise.
2005 2015-02-27  Marek Polacek  <polacek@redhat.com>
2007         PR c/65228
2008         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2010 2015-02-14  Marek Polacek  <polacek@redhat.com>
2012         PR c/64768
2013         * c-decl.c (grokdeclarator): Set the range of a flexible array member
2014         declared through a typedef name.
2016 2015-02-13  Marek Polacek  <polacek@redhat.com>
2018         PR c/65050
2019         * c-decl.c (grokdeclarator): Print also the type when giving
2020         the error message about array's incomplete element type.
2022 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
2024         PR c/64824
2025         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2026         check in the POP macro.
2028 2015-02-09  Marek Polacek  <polacek@redhat.com>
2030         PR c/64856
2031         * c-typeck.c (process_init_element): Don't always wrap
2032         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2033         initializing a range of elements.
2035 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2037         PR c/64824
2038         PR c/64868
2039         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2041 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
2043         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2044         processing enum declaration.
2046 2015-01-29  Marek Polacek  <polacek@redhat.com>
2048         PR c/64709
2049         * c-typeck.c (pop_init_level): If constructor_elements has
2050         exactly one element with integer_zerop value, set constructor_zeroinit
2051         to 1.  Remove braces around warning_init call.
2053 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
2055         PR c/64766
2056         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2057         of FUNCTION_DECLs with error_mark_node.
2059 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
2061         PR c/64778
2062         * c-typeck.c (convert_arguments): Return -1 if there are
2063         error_args, even if we've diagnosed too many arguments.
2065 2015-01-21  Richard Biener  <rguenther@suse.de>
2067         PR middle-end/64313
2068         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2069         for builtins the user declared correctly.
2071 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2072             Bernd Schmidt  <bernds@codesourcery.com>
2073             Cesar Philippidis  <cesar@codesourcery.com>
2074             James Norris  <jnorris@codesourcery.com>
2075             Jakub Jelinek  <jakub@redhat.com>
2076             Ilmir Usmanov  <i.usmanov@samsung.com>
2078         * c-parser.c: Include "gomp-constants.h".
2079         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2080         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2081         Use OMP_CLAUSE_SET_MAP_KIND.
2082         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2083         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2084         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2085         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2086         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2087         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2088         "copyout", "create", "delete", "deviceptr", "gang", "host",
2089         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2090         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2091         "present_or_create", "pcreate", "seq", "self", "vector",
2092         "vector_length", "wait", "worker".
2093         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2094         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2095         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2096         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2097         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2098         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2099         (c_parser_oacc_data_clause_deviceptr)
2100         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2101         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2102         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2103         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2104         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2105         (c_parser_oacc_parallel, c_parser_oacc_update)
2106         (c_parser_oacc_wait): New functions.
2107         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2108         (c_finish_oacc_data): New prototypes.
2109         * c-typeck.c: Include "gomp-constants.h".
2110         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2111         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2112         OMP_CLAUSE_SET_MAP_KIND.
2113         (c_finish_oacc_parallel, c_finish_oacc_kernels)
2114         (c_finish_oacc_data): New functions.
2115         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2116         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2117         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2118         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2119         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2120         GOMP_MAP_FORCE_DEVICEPTR.
2122 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2124         * c-array-notation.c: Include hash-set.h, machmode.h,
2125         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2126         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2127         * c-aux-info.c: Ditto.
2128         * c-convert.c: Ditto.
2129         * c-decl.c: Ditto.
2130         * c-errors.c: Ditto.
2131         * c-lang.c: Dittoxs.
2132         * c-objc-common.c: Ditto.
2133         * c-parser.c: Ditto.
2134         * c-typeck.c: Include hash-set.h, machmode.h,
2135         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2136         fold-const.h, wide-int.h, inchash.h, real.h and
2137         fixed-value.h due to flattening of tree.h.
2139 2015-01-07  Marek Polacek  <polacek@redhat.com>
2141         PR c/64417
2142         * c-typeck.c (process_init_element): Disallow initialization of
2143         a flexible array member with a string constant if the structure
2144         is in an array.
2146 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2148         PR sanitizer/64344
2149         * c-typeck.c (convert_for_assignment, c_finish_return): For
2150         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2151         types also set in_late_binary_op around convert call.
2152         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2153         to integral type casts, if not in_late_binary_op, pass c_fully_fold
2154         result on expr as last argument to ubsan_instrument_float_cast,
2155         if in_late_binary_op, don't use c_save_expr but save_expr.
2157         Update copyright years.
2159 2015-01-05  Marek Polacek  <polacek@redhat.com>
2161         PR c/64423
2162         * c-typeck.c (build_array_ref): Pass loc down to
2163         warn_array_subscript_with_type_char.
2165 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
2167         * c-typeck.c: New behavious for pointers to arrays with qualifiers
2168         (common-pointer-type): For pointers to arrays take qualifiers from
2169         element type.
2170         (build_conditional_expr): Add warnings for lost qualifiers.
2171         (comp-target-types): Allow pointers to arrays with different qualifiers.
2172         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2173         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2174         to PEDWARN_FOR_QUALIFIERS.
2176 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
2178         PR sanitizer/64289
2179         * c-convert.c: Include ubsan.h.
2180         (convert): For real -> integral casts and
2181         -fsanitize=float-cast-overflow don't call convert_to_integer, but
2182         instead instrument the float cast directly.
2184 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
2186         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2187         c_finish_stmt_expr): Remove NULL last argument from
2188         create_tmp_var_raw and create_tmp_var calls.
2189         * c-array-notation.c (fix_builtin_array_notation_fn,
2190         build_array_notation_expr, fix_conditional_array_notations_1,
2191         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2193 2014-11-28  Marek Polacek  <polacek@redhat.com>
2195         PR c/63862
2196         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2197         convert the right operand to integer type.
2199 2014-11-25  Marek Polacek  <polacek@redhat.com>
2201         PR c/63877
2202         * c-decl.c (start_function): Disable -Wmissing-declarations warning
2203         for inline functions.
2205 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
2207         PR target/63764
2208         * c-typeck.c (build_array_ref): Adjust
2209         convert_vector_to_pointer_for_subscript caller.  If it returns true,
2210         call non_lvalue_loc on the result.
2212 2014-11-11  Richard Biener  <rguenther@suse.de>
2214         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2215         to true.
2217 2014-11-10  Andi Kleen  <ak@linux.intel.com>
2219         PR c/60804
2220         * c-parser.c (c_parser_statement_after_labels): Call
2221         check_no_cilk.
2222         (c_parser_if_statement): Dito.
2223         (c_parser_switch_statement): Dito.
2224         (c_parser_while_statement): Dito.
2225         (c_parser_do_statement): Dito.
2226         (c_parser_for_statement): Dito.
2227         * c-typeck.c (c_finish_loop): Dito.
2229 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
2231         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2232         OPT_Wshift_count_overflow in the warnings.
2234 2014-10-30  Marek Polacek  <polacek@redhat.com>
2236         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2237         print the stripped version as well, if they're not the same.
2239 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
2241         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2242         machine_mode.
2244 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
2246         * c-decl.c: Adjust include files.
2247         * c-parser.c: Ditto.
2249 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
2250             Tom Tromey  <tromey@redhat.com>
2252         * c-tree.h (enum c_oracle_request): New.
2253         (c_binding_oracle_function): New typedef.
2254         (c_binding_oracle, c_pushtag, c_bind): Declare.
2255         * c-decl.c (c_binding_oracle): New global.
2256         (I_SYMBOL_CHECKED): New macro.
2257         (i_symbol_binding): New function.
2258         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2259         (I_TAG_CHECKED): New macro.
2260         (i_tag_binding): New function.
2261         (I_TAG_BINDING, I_TAG_DECL): Redefine.
2262         (I_LABEL_CHECKED): New macro.
2263         (i_label_binding): New function.
2264         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2265         (c_print_identifier): Save and restore c_binding_oracle.
2266         (c_pushtag, c_bind): New functions.
2268 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
2270         * c-typeck.c: Adjust include files.
2272 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2274         PR c++/53061
2275         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2276         initialization here...
2277         (c_initialize_diagnostics): ... but here. Set defaults after
2278         building pretty-printer.
2280 2014-10-23  Marek Polacek  <polacek@redhat.com>
2282         PR c/63626
2283         * c-decl.c (pop_scope): Don't print warning in external_scope.
2285 2014-10-19  Marek Polacek  <polacek@redhat.com>
2287         PR c/63567
2288         * c-typeck.c (output_init_element): Allow initializing objects with
2289         static storage duration with compound literals even in C99 and add
2290         pedwarn for it.
2292 2014-10-17  Marek Polacek  <polacek@redhat.com>
2294         PR c/63567
2295         * c-typeck.c (digest_init): Allow initializing objects with static
2296         storage duration with compound literals even in C99 and add pedwarn
2297         for it.
2299 2014-10-17  Marek Polacek  <polacek@redhat.com>
2301         PR c/63543
2302         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2303         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2304         error multiple times.  Print the type.
2306 2014-10-17  Marek Polacek  <polacek@redhat.com>
2308         PR c/63549
2309         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2310         type.
2312 2014-10-17  Marek Polacek  <polacek@redhat.com>
2314         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2315         (start_function): Use OPT_Wimplicit_int instead of 0.
2316         (store_parm_decls_oldstyle): Likewise.
2318 2014-10-17  Alan Modra  <amodra@gmail.com>
2320         PR middle-end/61848
2321         * c-decl.c (merge_decls): Don't merge section name or tls model
2322         to newdecl symtab node, instead merge to olddecl.  Override
2323         existing olddecl section name.  Set tls_model for all thread-local
2324         vars, not just OMP thread-private ones.  Remove incorrect comment.
2326 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
2328         * c-decl.c: Adjust include files.
2330 2014-10-14  DJ Delorie  <dj@redhat.com>
2332         * c-parser.c (c_parse_init): Add RID entries for each __intN.
2333         (c_token_starts_typename): Check all __intN, not just __int128.
2334         (c_token_starts_declspecs): Likewise.
2335         (c_parser_declspecs): Likewise.
2336         (c_parser_attribute_any_word): Likewise.
2337         (c_parser_objc_selector): Likewise.
2338         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2339         (struct c_declspecs): Add int_n_idx field to record *which* __intN
2340         is specified.
2341         * c-decl.c (declspecs_add_type): Check for all __intN, not just
2342         __int128.
2343         (finish_declspecs): Likewise.
2345 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
2347         * c-parser.c (c_parser_all_labels): New function to replace
2348         the duplicate code.
2349         (c_parser_statement): Call the new function.
2351 2014-10-09  Marek Polacek  <polacek@redhat.com>
2353         PR c/63480
2354         * c-typeck.c (pop_init_level): Don't warn about initializing
2355         with { }.
2357 2014-10-07  Marek Polacek  <polacek@redhat.com>
2359         PR c/59717
2360         * c-decl.c (header_for_builtin_fn): New function.
2361         (implicitly_declare): Suggest which header to include.
2363 2014-10-07  Marek Polacek  <polacek@redhat.com>
2365         * c-convert.c (convert): Use error_operand_p.
2366         * c-typeck.c (require_complete_type): Likewise.
2367         (really_atomic_lvalue): Likewise.
2368         (digest_init): Likewise.
2369         (handle_omp_array_sections_1): Likewise.
2371 2014-10-03  Marek Polacek  <polacek@redhat.com>
2373         PR c/63453
2374         * c-decl.c (pop_scope): Don't warn about "inline function declared
2375         but never defined" for functions marked with gnu_inline attribute.
2377 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
2379         PR c++/63249
2380         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2381         on low_bound and length.
2383 2014-09-24  Marek Polacek  <polacek@redhat.com>
2385         PR c/61405
2386         PR c/53874
2387         * c-parser.c: Don't define CPP_KEYWORD.
2388         (c_parser_switch_statement): Pass original type to c_finish_case.
2389         * c-tree.h (c_finish_case): Update declaration.
2390         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
2391         conditionally to c_do_switch_warnings.
2393 2014-09-03  Marek Polacek  <polacek@redhat.com>
2395         PR c/62024
2396         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2397         conversions.
2399 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
2400             Balaji V. Iyer  <balaji.v.iyer@intel.com>
2401             Igor Zamyatin  <igor.zamyatin@intel.com>
2403         * c-parser.c (c_parser_cilk_for): New function.
2404         (c_parser_cilk_grainsize): Likewise.
2405         (c_get_temp_regvar): Likewise.
2406         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2407         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2408         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2409         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2410         case.
2412 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
2414         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2415         with using HOST_WIDE_INT without truncation to 'int'
2417 2014-08-22  Marek Polacek  <polacek@redhat.com>
2419         PR c++/62199
2420         * c-typeck.c (parser_build_binary_op): Adjust call to
2421         warn_logical_not_parentheses.
2423 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
2425         PR other/62008
2426         * c-parser.c (c_parser_array_notation): Check for correct
2427         type of an array added.
2429 2014-08-19  Marek Polacek  <polacek@redhat.com>
2431         PR c++/62153
2432         * c-typeck.c (build_binary_op): If either operand of a comparison
2433         is a boolean expression, call maybe_warn_bool_compare.
2435 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
2437         PR c/45584
2438         * c-typeck.c (build_c_cast): Do a conversion even when the
2439         TYPE_MAIN_VARIANTs are the same.
2441 2014-08-19  Marek Polacek  <polacek@redhat.com>
2443         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2444         pedwarn_c99 instead of pedwarn.
2445         (grokfield): Likewise.
2446         (warn_defaults_to): New function.
2447         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2448         Unconditionally call pedwarn_c99 instead of pedwarn.
2449         (start_function): Call warn_defaults_to instead of pedwarn_c99.
2450         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2451         check flag_isoc11 before.
2452         * c-errors.c (pedwarn_c99): Change the return type to bool.
2453         Handle -Wc99-c11-compat.
2454         * c-parser.c (disable_extension_diagnostics): Handle
2455         warn_c99_c11_compat.
2456         (restore_extension_diagnostics): Likewise.
2457         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2458         instead of pedwarn, don't check flag_isoc11 before.
2459         (c_parser_declspecs): Likewise.
2460         (c_parser_alignas_specifier): Likewise.
2461         (c_parser_alignof_expression): Likewise.
2462         (c_parser_generic_selection): Likewise.
2463         * c-tree.h (pedwarn_c99): Update declaration.
2464         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2465         of pedwarn_c99.
2467 2014-08-19  Marek Polacek  <polacek@redhat.com>
2469         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2470         to pedwarn_c90.
2471         * c-errors.c: Include "opts.h".
2472         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2473         * c-parser.c (disable_extension_diagnostics): Handle negative value
2474         of warn_c90_c99_compat, too.
2475         (restore_extension_diagnostics): Likewise.
2476         (c_parser_compound_statement_nostart): Pass
2477         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2479 2014-08-12  Marek Polacek  <polacek@redhat.com>
2481         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2482         Add pedwarn.
2483         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2484         Likewise.
2485         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2487 2014-08-10  Marek Polacek  <polacek@redhat.com>
2489         PR c/51849
2490         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2491         Call pedwarn_c90 instead of pedwarn.
2492         (check_bitfield_type_and_width): Likewise.
2493         (declspecs_add_qual): Likewise.
2494         (declspecs_add_type): Likewise.
2495         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2496         Adjust to only call pedwarn_c90.
2497         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
2498         pedwarn_c90 instead of pedwarn.
2499         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2500         * c-parser.c (disable_extension_diagnostics): Handle
2501         warn_c90_c99_compat.
2502         (restore_extension_diagnostics): Likewise.
2503         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
2504         pedwarn_c90 instead of pedwarn.
2505         (c_parser_initelt): Likewise.
2506         (c_parser_postfix_expression): Likewise.
2507         (c_parser_postfix_expression_after_paren_type): Likewise.
2508         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2509         * c-tree.h: Fix formatting.
2510         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
2511         pedwarn_c90 instead of pedwarn.
2513 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
2515         * c-typeck.c: Remove include of pointer-set.h.
2517 2014-08-07  Marek Polacek  <polacek@redhat.com>
2519         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2521 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
2523         * c-typeck.c: Use hash_map instead of pointer_map.
2525 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
2527         * c-decl.c: Use hash_set instead of pointer_set.
2529 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
2531         PR middle-end/61455
2532         * c-array-notation.c (expand_array_notations): Handling
2533         of DECL_EXPR added.
2535 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
2537         PR c++/60517
2538         * c-typeck.c (c_finish_return): Return 0 instead of the address of
2539         a local variable.
2541 2014-07-30  Tom Tromey  <tromey@redhat.com>
2543         * c-typeck.c (struct constructor_stack) <designator_depth>: New
2544         field.
2545         (really_start_incremental_init, push_init_level): Initialize
2546         designator_depth.
2547         (pop_init_level): Set global designator_depth.
2548         (process_init_element): Check for designated_init attribute.
2550 2014-07-20  Marek Polacek  <polacek@redhat.com>
2552         PR c/61852
2553         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
2554         (implicitly_declare): Pass location to implicit_decl_warning.
2556 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
2558         PR middle-end/61294
2559         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2560         If non-NULL, call c_parser_check_literal_zero.
2561         (c_parser_check_literal_zero): New function.
2562         (c_parser_postfix_expression_after_primary): Adjust
2563         c_parser_expr_list caller, handle -Wmemset-transposed-args.
2565 2014-07-06  Marek Polacek  <polacek@redhat.com>
2567         PR c/6940
2568         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2569         * c-tree.h (C_ARRAY_PARAMETER): Define.
2570         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2571         function parameter.
2573 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
2574             Chen Gang  <gang.chen.5i5j@gmail.com>
2576         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2577         releasing symbol.
2579 2014-07-01  Marek Polacek  <polacek@redhat.com>
2581         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2582         instead of 0 to WARN_FOR_ASSIGNMENT.
2584 2014-07-01  Marek Polacek  <polacek@redhat.com>
2586         PR c/58286
2587         * c-typeck.c (convert_for_assignment): Pass
2588         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2590 2014-06-30  Marek Polacek  <polacek@redhat.com>
2592         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2593         has no_sanitize_undefined attribute.
2595 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
2597         PR middle-end/57541
2598         * c-array-notation.c (fix_builtin_array_notation_fn):
2599         Check for 0 arguments in builtin call. Check that bultin argument is
2600         correct.
2601         * c-parser.c (c_parser_array_notation): Check for incorrect initial
2602         index.
2604 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2606         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2607         qualifiers in __auto_type for atomic types.
2608         (c_parser_typeof_specifier): Discard all type qualifiers in
2609         __typeof__ for atomic types.
2611 2014-06-25  Marek Polacek  <polacek@redhat.com>
2613         PR c/61162
2614         * c-parser.c (c_parser_statement_after_labels): Pass the location of
2615         the return expression to c_finish_return.
2617 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
2619         * c-typeck.c (c_finish_omp_clauses): Make sure
2620         OMP_CLAUSE_LINEAR_STEP has correct type.
2622 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
2624         * c-decl.c: Adjust.
2626 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
2628         * c-parser.c (c_parser_omp_for_loop): For
2629         #pragma omp parallel for simd move lastprivate clause from parallel
2630         to for rather than simd.
2632 2014-06-23  Marek Polacek  <polacek@redhat.com>
2634         * c-typeck.c (parser_build_binary_op): Don't call
2635         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2637 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
2639         * c-parser.c (c_parser_omp_threadprivate): Likewise.
2640         * c-decl.c (merge_decls): Likewise.
2642 2014-06-09  Marek Polacek  <polacek@redhat.com>
2644         PR c/36446
2645         * c-typeck.c (error_init): Call inform instead of error_at.
2646         (pedwarn_init): Call inform instead of pedwarn.
2647         (warning_init): Call inform instead of warning_at.
2649 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
2651         * c-decl.c (merge_decls): Use set_decl_section_name.
2652         (duplicate_decls): Remove node if it exists.
2654 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
2656         PR c/53119
2657         * c-typeck.c (push_init_level, process_init_element,
2658         pop_init_level): Correct check for zero initialization, move
2659         missing brace warning to respect zero initialization.
2661 2014-06-05  Marek Polacek  <polacek@redhat.com>
2663         PR c/56724
2664         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2666 2014-06-05  Marek Polacek  <polacek@redhat.com>
2668         PR c/49706
2669         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2670         on the left hand side operand of a comparison. 
2672 2014-06-05  Marek Polacek  <polacek@redhat.com>
2674         PR c/48062
2675         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2676         Print note only if the warning was printed.
2678 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
2680         PR c/58942
2681         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2682         with a pointer.
2684 2014-06-03  Marek Polacek  <polacek@redhat.com>
2686         PR c/60439
2687         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2688         c_start_case.
2689         * c-tree.h (c_start_case): Update.
2690         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
2691         switch condition has boolean value.
2693 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
2695         * c-decl.c: Include builtins.h.
2696         * c-parser.c: Likewise.
2698 2014-05-27  Marek Polacek  <polacek@redhat.com>
2700         PR c/56724
2701         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
2702         error and warning calls to error_at and warning_at.  Pass location of
2703         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
2704         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2705         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
2707 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
2709         PR c/61191
2710         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2711         function parameters.
2713 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
2715         * c-decl.c (merge_decls): Preserve symtab node pointers.
2716         (duplicate_decls): Free new decl.
2718 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
2720         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2721         initialization.
2723         * c-parser.c (c_parser_omp_target): Return bool values.
2725 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
2727         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2728         num_teams_loc variable to num_thread_limit_loc.
2730 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
2732         * c-array-notation.c (expand_array_notations): Use void_node
2733         instead of void_zero_node.
2735 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
2737         * c-decl.c (finish_struct): Adjust.
2738         (finish_enum): Likewise.
2739         (bind): Adjust.
2740         (record_inline_static): Likewise.
2741         (push_scope): Likewise.
2742         (make_label): Likewise.
2743         (lookup_label_for_goto): Likewise.
2744         (finish_struct): Likewise.
2745         (finish_enum): Likewise.
2746         (store_parm_decls): Likewise.
2747         (c_push_function_context): Likewise.
2748         * c-lang.h: Remove usage of variable_size gty attribute.
2749         * c-parser.c (c_parse_init): Adjust.
2750         (c_parse_file): Likewise.
2752 2014-05-13  Marek Polacek  <polacek@redhat.com>
2754         PR c/61162
2755         * c-typeck.c (convert_for_assignment): Pass location to
2756         WARN_FOR_ASSIGNMENT instead of input_location.
2758 2014-05-10  Marek Polacek  <polacek@redhat.com>
2760         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2761         maybe_warn_string_init.
2762         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2763         maybe_warn_string_init.
2764         * c-tree.h (maybe_warn_string_init): Update declaration.
2765         * c-typeck.c (maybe_warn_string_init): Add location parameter.
2766         Call pedwarn_init with loc instead of with input_location.
2767         (digest_init): Pass init_loc to maybe_warn_string_init.
2768         (pop_init_level): Call pedwarn_init with loc instead of with
2769         input_location.
2770         (set_init_index): Likewise.
2771         (process_init_element): Likewise.
2773 2014-05-09  Marek Polacek  <polacek@redhat.com>
2775         PR c/61096
2776         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2777         (c_parser_initelt): Pass location to set_init_label.  Pass array index
2778         location to set_init_index.
2779         * c-tree.h (push_init_level): Update declaration.
2780         (pop_init_level): Likewise.
2781         (set_init_index): Likewise.
2782         (set_init_label): Likewise.
2783         * c-typeck.c (error_init): Add location parameter.  Call error_at
2784         instead of error.
2785         (digest_init): Pass init_loc to error_init.
2786         (really_start_incremental_init):
2787         (push_init_level): Add location parameter.  Pass loc to pop_init_level
2788         and error_init.
2789         (pop_init_level): Likewise.
2790         (set_designator): Add location parameter.  Pass loc to pop_init_level,
2791         push_init_level, and error_init.
2792         (set_init_index): Add location parameter.  Pass loc to error_init and
2793         set_designator.
2794         (set_init_label): Likewise.
2795         (output_init_element): Pass loc to error_init.
2796         (process_init_element): Pass loc to error_init, pop_init_level,
2797         pedwarn_init, and push_init_level.
2799 2014-05-09  Marek Polacek  <polacek@redhat.com>
2801         PR c/50459
2802         * c-parser.c (c_parser_attributes): Parse the arguments as an
2803         expression-list if the attribute takes identifier.
2805 2014-05-08  Marek Polacek  <polacek@redhat.com>
2807         PR c/61053
2808         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2809         TYPE_ALIGN_UNIT.
2811 2014-05-08  Marek Polacek  <polacek@redhat.com>
2813         PR c/61077
2814         * c-decl.c (start_function): Warn for _Atomic-qualified return type
2815         of main.
2817 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2818             Mike Stump  <mikestump@comcast.net>
2819             Richard Sandiford  <rdsandiford@googlemail.com>
2821         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2822         (finish_enum): Use wide-int interfaces.
2823         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2824         * c-typeck.c (build_c_cast): Likewise.
2825         (set_nonincremental_init_from_string): Likewise.
2826         (c_tree_equal): Likewise.
2828 2014-05-02  Marek Polacek  <polacek@redhat.com>
2830         PR c/25801
2831         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
2832         Return size_one_node when the type is not complete.
2833         (pointer_diff): Remove comment.
2834         (build_unary_op): Improve error messages.
2836 2014-05-02  Marek Polacek  <polacek@redhat.com>
2838         * c-typeck.c (c_finish_return): Separate warning_at calls.
2840 2014-05-02  Marek Polacek  <polacek@redhat.com>
2842         * c-tree.h (error_init): Remove declaration.
2843         (pedwarn_init): Likewise.
2844         * c-typeck.c (error_init): Make static and move above.
2845         (pedwarn_init): Likewise.
2846         (warning_init): Move above.
2847         (maybe_warn_string_init): Likewise.
2849 2014-05-01  Jeff Law  <law@redhat.com>
2851         Revert:
2853         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
2854         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2855         avoid goto.
2857 2014-05-02  Marek Polacek  <polacek@redhat.com>
2859         PR c/60784
2860         * c-typeck.c (push_init_level): Set constructor_designated to
2861         p->designated for structures.
2863 2014-05-01  Marek Polacek  <polacek@redhat.com>
2865         PR c/60915
2866         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2867         function-definition has an attribute after the declarator.
2869 2014-05-01  Marek Polacek  <polacek@redhat.com>
2871         PR c/60257
2872         * c-typeck.c (warning_init): Add location_t parameter.  Call
2873         warning_at instead of warning.
2874         (push_init_level): Pass input_location to warning_init.
2875         (add_pending_init): Add location_t parameter.  Pass loc to
2876         warning_init.
2877         (set_nonincremental_init): Pass input_location to add_pending_init.
2878         (set_nonincremental_init_from_string): Likewise.
2879         (output_init_element): Pass loc to warning_init and to
2880         add_pending_init.
2882 2014-05-01  Marek Polacek  <polacek@redhat.com>
2884         PR c/43395
2885         * c-typeck.c (c_finish_return): Distinguish between label and variable
2886         when warning about returning local address.
2888 2014-05-01  Marek Polacek  <polacek@redhat.com>
2890         PR c/29467
2891         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2892         in C89 mode.
2894 2014-05-01  Marek Polacek  <polacek@redhat.com>
2896         PR c/43245
2897         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2898         instead of 0 to WARN_FOR_QUALIFIERS.
2900 2014-05-01  Marek Polacek  <polacek@redhat.com>
2902         PR c/56989
2903         * c-typeck.c (default_conversion): Use better location for
2904         error call.
2906 2014-04-30  Marek Polacek  <polacek@redhat.com>
2908         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2909         also when SANITIZE_FLOAT_DIVIDE is on.
2911 2014-04-30  Marek Polacek  <polacek@redhat.com>
2913         PR c/60139
2914         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2915         and pedwarn_init.  Use loc insted of input_location.
2917 2014-04-30  Marek Polacek  <polacek@redhat.com>
2919         PR c/60351
2920         * c-typeck.c (build_binary_op): Use location when warning about
2921         shift count.
2923 2014-04-25  Marek Polacek  <polacek@redhat.com>
2925         PR c/18079
2926         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2927         always_inline/noinline and hot/cold attributes.
2929 2014-04-25  Marek Polacek  <polacek@redhat.com>
2931         PR c/60114
2932         * c-parser.c (c_parser_initelt): Pass input_location to
2933         process_init_element.
2934         (c_parser_initval): Pass loc to process_init_element.
2935         * c-tree.h (process_init_element): Adjust declaration.
2936         * c-typeck.c (push_init_level): Pass input_location to
2937         process_init_element.
2938         (pop_init_level): Likewise.
2939         (set_designator): Likewise.
2940         (output_init_element): Add location_t parameter.  Pass loc to
2941         digest_init.
2942         (output_pending_init_elements): Pass input_location to
2943         output_init_element.
2944         (process_init_element): Add location_t parameter.  Pass loc to
2945         output_init_element.
2947 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
2949         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2950         atomic-clause, allow comma in between atomic-clause and
2951         seq_cst.
2953 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
2955         PR c/59073
2956         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2957         fails, don't set OM_PARALLEL_COMBINED and return NULL.
2959 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
2961         PR middle-end/60469
2962         * c-array-notation.c (fix_builtin_array_notation_fn): Use
2963         create_tmp_var instead build_decl for creating temps.
2964         (build_array_notation_expr): Likewise.
2965         (fix_conditional_array_notations_1): Likewise.
2966         (fix_array_notation_expr): Likewise.
2967         (fix_array_notation_call_expr): Likewise.
2969 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
2971         PR c++/60689
2972         * c-tree.h (c_build_function_call_vec): New prototype.
2973         * c-typeck.c (build_function_call_vec): Don't call
2974         resolve_overloaded_builtin here.
2975         (c_build_function_call_vec): New wrapper function around
2976         build_function_call_vec.  Call resolve_overloaded_builtin here.
2977         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2978         Call c_build_function_call_vec instead of build_function_call_vec.
2979         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2980         * c-decl.c (finish_decl): Likewise.
2982 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2984         PR c/55383
2985         * c-typeck.c: Use correct format string in cast-qual warning
2987 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
2989         * c-decl.c (c_decl_attributes): Use
2990         lang_hooks.types.omp_mappable_type.
2991         * c-typeck.c (c_finish_omp_clauses): Likewise.
2993 2014-03-06  Marek Polacek  <polacek@redhat.com>
2995         PR c/60197
2996         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2997         of checking tree code.
2999 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3001         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3002         (c_parser_parameter_declaration): Likewise.
3004 2014-02-19  Marek Polacek  <polacek@redhat.com>
3006         PR c/60195
3007         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3008         Call mark_exp_read on exp.value.
3009         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
3010         TREE_ADDRESSABLE on old instead of val.
3011         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3013 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3015         * c-parser.c (c_parser_get_builtin_args): Replace calls to
3016         C_EXPR_APPEND by vec_safe_push.
3017         * c-tree.h (C_EXPR_APPEND): Remove.
3019 2014-01-31  Marek Polacek  <polacek@redhat.com>
3021         PR c/59963
3022         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3023         build_function_call_vec.
3024         (build_function_call): Likewise.
3025         (build_atomic_assign): Likewise.
3026         (build_function_call_vec): Add arg_loc parameter.  Use it.
3027         (convert_arguments): Likewise.
3028         (convert_for_assignment): Rename rhs_loc to expr_loc.
3029         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3030         (c_parser_objc_keywordexpr): Likewise.
3031         (c_parser_postfix_expression_after_primary): Call
3032         build_function_call_vec with expr_loc rather than op_loc.
3033         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
3034         build_function_call_vec.
3035         (c_parser_expr_list): Add locations parameter.  Fill it with locations
3036         of function arguments.
3037         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3039 2014-01-30  Marek Polacek  <polacek@redhat.com>
3041         PR c/59940
3042         * c-typeck.c (build_function_call_vec): Use loc parameter.
3043         (convert_arguments): Add location parameter.  Use it.
3044         (ep_convert_and_check): Likewise.
3045         (build_atomic_assign): Adjust convert_for_assignment call.
3046         (build_modify_expr): Likewise.
3047         (digest_init): Likewise.
3048         (c_finish_return): Likewise.
3049         (build_conditional_expr): Adjust ep_convert_and_check calls.
3050         (convert_for_assignment): Add rhs_loc parameter.  Use it.
3051         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3052         calls.
3054 2014-01-30  Richard Biener  <rguenther@suse.de>
3056         PR c/59905
3057         * c-typeck.c (build_function_call_vec): Do not replace calls
3058         to a function via an incompatible type with a runtime abort.
3060 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3062         * c-parser.c (c_parser_declaration_or_fndef): Replaced
3063         flag_enable_cilkplus with flag_cilkplus.
3064         (c_parser_direct_declarator_inner): Likewise.
3065         (c_parser_attribute_any_word): Likewise.
3066         (c_parser_attributes): Likewise.
3067         (c_parser_compound_statement): Likewise.
3068         (c_parser_statement_after_labels): Likewise.
3069         (c_parser_if_statement): Likewise.
3070         (c_parser_switch_statement): Likewise.
3071         (c_parser_do_statement): Likewise.
3072         (c_parser_for_statement): Likewise.
3073         (c_parser_unary_expression): Likewise.
3074         (c_parser_postfix_expression): Likewise.
3075         (c_parser_postfix_expression_after_primary): Likewise.
3076         (c_parser_postfix_expression_after_primary): Likewise.
3077         (c_parser_omp_clause_name): Likewise.
3078         (c_finish_omp_declare_simd): Likewise.
3079         (c_parser_cilk_verify_simd): Likewise.
3080         * c-typeck.c (build_array_ref): Likewise.
3081         (build_function_call_vec): Likewise.
3082         (convert_arguments): Likewise.
3083         (build_compound_expr): Likewise.
3084         (c_finish_return): Likewise.
3085         (c_finish_if_stmt): Likewise.
3086         (c_finish_loop): Likewise.
3087         (build_binary_op): Likewise.
3089 2014-01-23  Marek Polacek  <polacek@redhat.com>
3091         PR c/59846
3092         * c-typeck.c (parser_build_binary_op): Use location instead of
3093         input_location.
3094         (build_binary_op): Pass location to shorten_compare.
3096 2014-01-23  Marek Polacek  <polacek@redhat.com>
3098         PR c/58346
3099         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3100         an empty aggregate.
3102 2014-01-23  Marek Polacek  <polacek@redhat.com>
3104         PR c/59871
3105         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3106         of a comma expression.
3107         (emit_side_effect_warnings): Likewise.
3109 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3111         PR c/59825
3112         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3113         function to use walk_tree and moved a lot of its functionality to
3114         expand_array_notations.
3115         (expand_array_notations): New function.
3117 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3119         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3120         attribute an attribute without value.
3122 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3124         PR middle-end/58809
3125         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3126         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3128 2014-01-22  Marek Polacek  <polacek@redhat.com>
3130         PR c/59891
3131         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3132         of remove_c_maybe_const_expr on op1 and op2.
3134 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
3136         PR c/58943
3137         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3138         effects, preevaluate rhs using SAVE_EXPR first.
3140 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3142         PR c++/59631
3143         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3144         statements with if-elseif statements.
3146 2014-01-06  Marek Polacek  <polacek@redhat.com>
3148         PR c/57773
3149         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3150         defined bit-field types only in ISO C.
3152 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3154         Update copyright years
3156 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3158         * c-array-notation.c: Use the standard form for the copyright notice.
3160 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3162         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3163         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3164         field in parser is not empty.  If not-empty, call the function
3165         c_parser_finish_omp_declare_simd.
3166         (c_parser_cilk_clause_vectorlength): Modified function to be shared
3167         between SIMD-enabled functions and #pragma simd.  Added new parameter.
3168         (c_parser_cilk_all_clauses): Modified the usage of the function
3169         c_parser_cilk_clause_vectorlength as mentioned above.
3170         (c_parser_cilk_simd_fn_vector_attrs): New function.
3171         (c_finish_cilk_simd_fn_tokens): Likewise.
3172         (is_cilkplus_vector_p): Likewise.
3173         (c_parser_omp_clause_name): Added checking for "vectorlength,"
3174         "nomask," and "mask" strings in clause name.
3175         (c_parser_omp_all_clauses): Added 3 new case statements:
3176         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3177         PRAGMA_CILK_CLAUSE_NOMASK.
3178         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
3179         check for vector attribute and if so call the function
3180         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
3181         called the function c_finish_cilk_simd_fn_tokens.
3182         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3183         parser field is non-empty.  If so, parse them as you would parse
3184         the omp declare simd pragma.
3185         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3186         Added a check when step is a parameter and flag it as error.
3187         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3188         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3189         pragma_omp_clause.
3191 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
3193         * c-parser.c (c_parser_omp_parallel): Fix description.
3195 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3197         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3198         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3199         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3200         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3202 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
3204         PR c/52023
3205         * c-parser.c (c_parser_alignas_specifier): Use
3206         c_sizeof_or_alignof_type instead of c_alignof.
3207         (c_parser_alignof_expression): Likewise, with min_alignof
3208         parameter depending on alignof spelling used.
3210 2013-12-04  Marek Polacek  <polacek@redhat.com>
3212         PR c/54113
3213         * c-decl.c (start_function): Don't warn for missing prototype for
3214         inline functions.
3216 2013-12-03  Marek Polacek  <polacek@redhat.com>
3218         PR c/59351
3219         * c-decl.c (build_compound_literal): Allow compound literals with
3220         empty initial value.
3222 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
3224         PR c/58235
3225         * c-typeck.c (build_modify_expr): Diagnose assignment to
3226         expression with array type.
3228 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
3230         PR c/42262
3231         * c-typeck.c (process_init_element): Do not treat a string as
3232         initializing a whole array when used with a designator for an
3233         individual element.
3235 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
3237         PR c/57574
3238         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3239         an inline function following a static declaration.
3241 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
3243         PR c/59310
3244         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3245         to p_name before calling c_parser_omp_teams instead of after.
3246         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3247         argument.  Remove unused p_name variable.
3249 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
3250             Jakub Jelinek  <jakub@redhat.com>
3252         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3253         external_scope is NULL.
3255 2013-11-27  Tom de Vries  <tom@codesourcery.com>
3256             Marc Glisse  <marc.glisse@inria.fr>
3258         PR c++/59032
3259         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3261 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
3263         * c-typeck.c: Add required include files from gimple.h.
3265 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
3267         * c-decl.c (define_label, shadow_tag_warned)
3268         (check_bitfield_type_and_width, grokdeclarator, grokparms,
3269         store_parm_decls_newstyle, store_parm_decls_oldstyle)
3270         (declspecs_add_type): Remove use of in_system_header macro.
3271         * c-parser.c (c_parser_unary_expression): Likewise.
3272         * c-typeck.c (store_init_value, process_init_element)
3273         (c_start_case): Likewise.
3275         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3276         macro.
3278         * c-parser.c (c_parser_set_source_position_from_token): Remove
3279         reference to in_system_header from comment.
3281 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3283         * c-decl.c (grokdeclarator): Update comment to refer to
3284         tree_to_[su]hwi rather than tree_low_cst.
3286 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3288         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3289         tree_to_uhwi throughout.
3291 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3293         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3294         throughout.
3296 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
3298         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3299         throughout.
3301 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
3303         * c-parser.c (c_parser_cilk_simd): New.
3304         (c_parser_cilk_verify_simd): New.
3305         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3306         (c_parser_omp_for_loop): Add case for NE_EXPR.
3307         Set c_break_label for CILK_SIMD.
3308         (c_parser_cilk_clause_vectorlength): New.
3309         (c_parser_cilk_clause_linear): New.
3310         (c_parser_cilk_clause_name): New.
3311         (c_parser_cilk_all_clauses): New.
3312         * c-typeck.c (build_unary_op): Pass location argument to
3313         readonly_error.
3314         (build_modify_expr): Same.
3315         (build_asm_expr): Same.
3316         (c_finish_bc_stmt): Error on break/continue in loops.
3318 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
3320         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3322 2013-11-14  Diego Novillo  <dnovillo@google.com>
3324         * c-decl.c: Include print-tree.h.
3325         Include stor-layout.h.
3326         Include varasm.h.
3327         Include attribs.h.
3328         Include stringpool.h.
3329         * c-lang.c: Include fold-const.h.
3330         * c-parser.c: Include stringpool.h.
3331         Include attribs.h.
3332         Include stor-layout.h.
3333         Include varasm.h.
3334         Include trans-mem.h.
3335         * c-typeck.c: Include stor-layout.h.
3336         Include trans-mem.h.
3337         Include varasm.h.
3338         Include stmt.h.
3340 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
3342         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3343         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3344         __auto_type.
3345         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3346         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3347         RID_AUTO_TYPE.
3348         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3349         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3350         (c_parser_declarator, c_parser_direct_declarator_inner)
3351         (c_parser_parameter_declaration, c_parser_type_name): All callers
3352         changed.
3353         (c_parser_declaration_or_fndef): Handle declarations with type
3354         determined from the initializer.
3356 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
3358         * c-typeck.c: Include gimplify.h.
3360 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
3362         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3363         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3364         comment.
3365         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3366         or _Thread_local as appropriate in diagnostics.
3367         (build_null_declspecs): Initialize ret->thread_gnu_p.
3368         (declspecs_add_scspec): Handle either __thread or _Thread_local
3369         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
3370         pedantic.  Do not disallow _Thread_local extern and _Thread_local
3371         static.
3373 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
3374             Andrew MacLeod  <amacleod@redhat.com>
3376         * c-aux-info.c (gen_type): Handle atomic qualifier.
3377         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3378         qualifiers when compating types.
3379         (shadow_tag_warned): Handle atomic_p in declspecs.
3380         (quals_from_declspecs): Likewise.
3381         (start_decl): Use c_type_promotes_to when promoting argument
3382         types.
3383         (grokdeclarator): Handle _Atomic.
3384         (get_parm_info): Diagnose any qualifier on "void" as only
3385         parameter.
3386         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3387         comparing types.  Use c_type_promotes_to when promoting argument
3388         types.
3389         (finish_function): Use c_type_promotes_to when promoting argument
3390         types.
3391         (build_null_declspecs): Handle atomic_p in declspecs.
3392         (declspecs_add_qual): Handle RID_ATOMIC.
3393         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3394         (c_token_starts_declspecs): Handle RID_ATOMIC.
3395         (c_parser_declspecs): Handle atomic type specifiers and
3396         qualifiers.
3397         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3398         from types of expressions with atomic type.
3399         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3400         (c_parser_attribute_any_word): Handle RID_ATOMIC.
3401         (c_parser_initializer, c_parser_initelt, c_parser_initval)
3402         (c_parser_statement_after_labels, c_parser_switch_statement)
3403         (c_parser_for_statement, c_parser_expr_no_commas)
3404         (c_parser_conditional_expression, c_parser_binary_expression)
3405         (c_parser_cast_expression, c_parser_unary_expression)
3406         (c_parser_postfix_expression)
3407         (c_parser_postfix_expression_after_primary, c_parser_expression):
3408         Use convert_lvalue_to_rvalue.
3409         (c_parser_expression_conv, c_parser_expr_list): Document
3410         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
3411         (c_parser_objc_synchronized_statement): Use
3412         convert_lvalue_to_rvalue.
3413         (c_parser_objc_selector): Handle RID_ATOMIC.
3414         (c_parser_objc_receiver, c_parser_array_notation): Use
3415         convert_lvalue_to_rvalue.
3416         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3417         _Atomic (type-name).
3418         (struct c_declspecs): Add atomic_p field.
3419         (convert_lvalue_to_rvalue): Declare.
3420         * c-typeck.c (c_type_promotes_to): Promote atomic types to
3421         corresponding atomic types.
3422         (qualify_type): Don't add _Atomic qualifiers from second argument.
3423         (comp_target_types): Do not allow _Atomic mismatches.
3424         (type_lists_compatible_p): Do not remove atomic qualifiers when
3425         comparing types.
3426         (really_atomic_lvalue, convert_lvalue_to_rvalue)
3427         (build_atomic_assign): New functions.
3428         (build_unary_op): Use build_atomic_assign for atomic increment and
3429         decrement.
3430         (build_conditional_expr): Do not treat _Atomic void as a qualified
3431         version of void.
3432         (build_modify_expr): Use build_atomic_assign for atomic LHS.
3433         (find_anonymous_field_with_type, convert_to_anonymous_field)
3434         (convert_for_assignment): Do not remove atomic qualifiers when
3435         comparing types.
3436         (digest_init): Do not accept initialization of arrays of atomic
3437         elements by string constants.
3438         (build_asm_expr): Use convert_lvalue_to_rvalue.
3439         (build_binary_op): Do not treat _Atomic void as a qualified
3440         version of void.
3442 2013-11-06  DJ Delorie  <dj@redhat.com>
3444         * c-decl.c (locate_old_decl): If a previous conflicting decl is
3445         both explicit and builtin, print the location of the explicit one.
3447 2013-11-05  Tobias Burnus  <burnus@net-b.de>
3449         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3450         c_parser_omp_distribute, c_parser_omp_teams,
3451         c_parser_omp_target, c_parser_omp_declare): Handle
3452         -fopenmp-simd.
3454 2013-11-03  Marek Polacek  <polacek@redhat.com>
3456         * c-decl.c (grokdeclarator): Add VLA instrumentation.
3458 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
3460         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3461         check_dup_generic at the end, unless remove is true.
3462         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3463         remove = true;.
3464         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3466 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
3468         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3469         with decl that is not pointer nor array.
3471 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3473         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3474         a spawning function is found.
3475         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3476         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3477         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3478         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3479         case.
3480         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3481         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3482         expr.
3483         (c_finish_return): Added a check to reject _Cilk_spawn in return
3484         expression.
3485         (build_cilk_spawn): New function.
3486         (build_cilk_sync): Likewise.
3487         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3488         
3489 2013-10-27  Tobias Burnus  <burnus@net-b.de>
3491         PR other/33426
3492         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3493         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3494         (c_parser_statement_after_labels): Update calls.
3496 2013-10-24  Tobias Burnus  <burnus@net-b.de>
3498         PR other/33426
3499         * c-parser.c (c_parser_pragma, c_parser_for_statement):
3500         Handle PRAGMA_IVDEP.
3501         (c_parser_statement_after_labels): Update call.
3503 2013-10-24  Marek Polacek  <polacek@redhat.com>
3505         * c-parser.c (c_parser_struct_declaration): Add a comment.
3506         (c_parser_declarator): Don't allow _Alignas here.
3508 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
3510         * c-parser.c: Include omp-low.h.
3511         * c-typeck.c: Likewise.
3513 2013-10-17  Marek Polacek  <polacek@redhat.com>
3515         PR c/58267
3516         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3517         Document syntax of the array-declarator.
3518         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3519         are not permitted.
3520         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3521         (c_parser_struct_declaration): Likewise.
3522         (c_parser_declarator): Likewise.
3523         (c_parser_direct_declarator_inner): Likewise.
3524         (c_parser_parameter_declaration): Likewise.
3525         (c_parser_type_name): Likewise.
3527 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
3529         * c-lang.h (current_omp_declare_target_attribute): New extern
3530         decl.
3531         * c-parser.c: Include c-lang.h.
3532         (struct c_parser): Change tokens to c_token *.
3533         Add tokens_buf field.  Change tokens_avail type to unsigned int.
3534         (c_parser_consume_token): If parser->tokens isn't
3535         &parser->tokens_buf[0], increment parser->tokens.
3536         (c_parser_consume_pragma): Likewise.
3537         (enum pragma_context): Add pragma_struct and pragma_param.
3538         (c_parser_external_declaration): Adjust
3539         c_parser_declaration_or_fndef caller.
3540         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3541         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3542         Adjust recursive call.
3543         (c_parser_struct_or_union_specifier): Use pragma_struct instead
3544         of pragma_external.
3545         (c_parser_parameter_declaration): Use pragma_param instead of
3546         pragma_external.
3547         (c_parser_compound_statement_nostart, c_parser_label,
3548         c_parser_for_statement): Adjust
3549         c_parser_declaration_or_fndef callers.
3550         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3551         it through to c_parser_conditional_expression.
3552         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3553         pass it through to c_parser_binary_expression.  Adjust recursive
3554         call.
3555         (c_parser_binary_expression): Remove prec argument, add
3556         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
3557         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3558         binop matches it, use build2 instead of parser_build_binary_op.
3559         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3560         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3561         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3562         Handle pragma_struct and pragma_param the same as pragma_external.
3563         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3564         (c_parser_omp_variable_list): Parse array sections for
3565         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3566         (c_parser_omp_clause_collapse): Fully fold collapse expression.
3567         (c_parser_omp_clause_reduction): Handle user defined reductions.
3568         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3569         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3570         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3571         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3572         c_parser_omp_clause_depend, c_parser_omp_clause_map,
3573         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3574         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3575         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3576         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
3577         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
3578         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3579         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
3580         (c_parser_omp_for_loop): Add CODE argument, pass it through
3581         to c_finish_omp_for.  Change last argument to cclauses,
3582         and adjust uses to grab parallel clauses from the array of all
3583         the split clauses.  Adjust c_parser_binary_expression,
3584         c_parser_declaration_or_fndef and c_finish_omp_for callers.
3585         (omp_split_clauses): New function.
3586         (c_parser_omp_simd): New function.
3587         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3588         Allow the function to be called also when parsing combined constructs,
3589         and call c_parser_omp_simd when parsing for simd.
3590         (c_parser_omp_sections_scope): If section-sequence doesn't start with
3591         #pragma omp section, require exactly one structured-block instead of
3592         sequence of statements.
3593         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3594         Allow the function to be called also when parsing combined constructs.
3595         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3596         Allow the function to be called also when parsing combined
3597         constructs.
3598         (c_parser_omp_taskgroup, c_parser_omp_cancel,
3599         c_parser_omp_cancellation_point, c_parser_omp_distribute,
3600         c_parser_omp_teams, c_parser_omp_target_data,
3601         c_parser_omp_target_update, c_parser_omp_target,
3602         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3603         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3604         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3605         (c_parser_omp_construct): Add p_name and mask vars.  Handle
3606         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3607         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
3608         and c_parser_omp_sections callers.
3609         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3610         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3611         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3612         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
3613         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
3614         OMP_CLAUSE_DEPEND.
3615         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3616         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3617         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3618         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3619         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3620         * c-typeck.c: Include tree-inline.h.
3621         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3622         handle_omp_array_sections_1, handle_omp_array_sections,
3623         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3624         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3625         user defined reductions.
3626         (c_tree_equal): New function.
3627         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3628         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3629         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3630         c_check_omp_declare_reduction_r): New prototypes.
3631         * c-decl.c (current_omp_declare_target_attribute): New variable.
3632         (c_decl_attributes): New function.
3633         (start_decl, start_function): Use it instead of decl_attributes.
3634         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3635         c_omp_reduction_decl, c_omp_reduction_lookup,
3636         c_check_omp_declare_reduction_r): New functions.
3638 2013-09-25  Tom Tromey  <tromey@redhat.com>
3640         * Make-lang.in (c/gccspec.o): Remove.
3641         (CFLAGS-c/gccspec.o): New variable.
3642         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3643         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3644         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3646 2013-09-25  Tom Tromey  <tromey@redhat.com>
3648         * Make-lang.in (c/gccspec.o): Don't use subshell.
3650 2013-09-18  Marek Polacek  <polacek@redhat.com>
3652         PR sanitize/58443
3653         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3654         Remove unnecessary check.
3656 2013-09-18  Marek Polacek  <polacek@redhat.com>
3658         PR sanitizer/58411
3659         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3660         no_sanitize_undefined attribute.
3662 2013-09-13  Kai Tietz  <ktietz@redhat.com>
3664         PR target/57848
3665         * c-decl.c (c_builtin_function_ext_scope): Remove
3666         wrong assumption that it is never called on prexisting
3667         symbol.
3669 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
3671         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3673 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3675         * c-objc-common.c (c_tree_printer): Tidy.
3677 2013-08-30  Marek Polacek  <polacek@redhat.com>
3679         * c-typeck.c (build_binary_op): Add division by zero and shift
3680         instrumentation.
3682 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
3683             Joseph Myers  <joseph@codesourcery.com>
3685         PR c/35649
3686         * c-typeck.c (c_common_type): Prefer double_type_node over
3687         other REAL_TYPE types with the same precision.
3688         (convert_arguments): Likewise.
3690 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3692         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3693         (c_initialize_diagnostics): Call a destructor for the early printer.
3695 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3697         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3698         printer initialization.
3700 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3702         PR c/57490
3703         * c-array-notation.c (fix_conditional_array_notations_1): Added a
3704         check for truth values.
3705         (expand_array_notation_exprs): Added truth values case.  Removed an
3706         unwanted else.  Added for-loop to walk through subtrees in default
3707         case.
3709 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3711         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3713 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
3715         * c-parser.c (struct c_generic_association): Fix typo.
3717 2013-07-23  Tom Tromey  <tromey@redhat.com>
3718             Joseph Myers  <joseph@codesourcery.com>
3720         * c-parser.c (struct c_generic_association): New.
3721         (c_generic_association_d): New typedef.
3722         (c_parser_generic_selection): New function.
3723         (c_parser_postfix_expression): Handle RID_GENERIC.
3725 2013-07-13  Jason Merrill  <jason@redhat.com>
3727         PR c++/57793
3728         * c-decl.c (finish_struct): Check for too-large class.
3730 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
3732         PR c/57821
3733         * c-typeck.c (set_init_index): When folding, check for index overflow.
3735 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3737         * c-parser.c (c_parser_array_notation): Removed rejection of array
3738         notations in an array of function pointers.
3740 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3742         * c-array-notation.c (make_triplet_val_inv): New function.
3743         (create_cmp_incr): Likewise.
3744         (create_array_refs): Likewise.
3745         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3746         Also modularized common parts between functions and called the function.
3747         (build_array_notation_expr): Likewise.
3748         (fix_conditional_array_notations_1): Likewise.
3749         (fix_array_notation_expr): Likewise.
3750         (fix_array_notation_call_expr): Likewise.
3752 2013-06-18  Marek Polacek  <polacek@redhat.com>
3754         PR c/57630
3755         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3757 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3759         * c-array-notation.c (build_array_notation_expr): Reject array notation
3760         mismatch between LHS and RHS even inside a call_expr.  Also, removed
3761         a couple while statements that were dead code.
3763 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3765         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3766         excessive precision expressions in function parameters.  Also removed
3767         couple unwanted while statements.
3769 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3771         * c-array-notation.c (expand_array_notation_exprs): Added
3772         ARRAY_NOTATION_REF case.
3773         
3774 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3776         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3777         function to c-family/array-notation-common.c.
3778         (is_cilkplus_reduce_builtin): Likewise.
3779         (find_rank): Likewise.
3780         (extract_array_notation_exprs): Likewise.
3781         (replace_array_notations): Likewise.
3782         (find_inv_trees): Likewise.
3783         (replace_inv_trees): Likewise.
3784         (contains_array_notation_expr): Likewise.
3785         (find_correct_array_notation_type): Likewise.
3786         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3787         (struct inv_list): Moved this to c-family/array-notation-common.c.
3788         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3789         
3790 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3792         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3793         reduction functions outside the for-loop.  Added a check if the fundecl
3794         is non-NULL.  Finally, removed an unwanted if-statement, and made the
3795         body unconditional.
3797 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3799         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3800         condition of the if-statement matches the rank of else-block and then-
3801         block when array notations are used.
3802         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3803         expression after the entire function body is parsed.
3804         (c_parser_expr_no_commas): Delayed creating array notation expressions
3805         to the end of function parsing.
3806         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3807         whole if-statement instead of just the condition.
3808         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
3810 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3812         PR c/57474
3813         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3814         array to NULL_TREE if they are unused.  Also added a check for the
3815         field to be NULL before its fields are used in future.
3816         
3817 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3819         PR bootstrap/57450
3820         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3821         (build_array_notation_expr): Likewise.
3823 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3825         * c-typeck.c (build_array_ref): Added a check to see if array's
3826         index is greater than one.  If true, then emit an error.
3827         (build_function_call_vec): Exclude error reporting and checking
3828         for builtin array-notation functions.
3829         (convert_arguments): Likewise.
3830         (c_finish_return): Added a check for array notations as a return
3831         expression.  If true, then emit an error.
3832         (c_finish_loop): Added a check for array notations in a loop
3833         condition.  If true then emit an error.
3834         (lvalue_p): Added a ARRAY_NOTATION_REF case.
3835         (build_binary_op): Added a check for array notation expr inside
3836         op1 and op0.  If present, we call another function to find correct
3837         type.
3838         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3839         * c-parser.c (c_parser_compound_statement): Check if array
3840         notation code is used in tree, if so, then transform them into
3841         appropriate C code.
3842         (c_parser_expr_no_commas): Check if array notation is used in LHS
3843         or RHS, if so, then build array notation expression instead of
3844         regular modify.
3845         (c_parser_postfix_expression_after_primary): Added a check for
3846         colon(s) after square braces, if so then handle it like an array
3847         notation.  Also, break up array notations in unary op if found.
3848         (c_parser_direct_declarator_inner): Added a check for array
3849         notation.
3850         (c_parser_compound_statement): Added a check for array notation in
3851         a stmt.  If one is present, then expand array notation expr.
3852         (c_parser_if_statement): Likewise.
3853         (c_parser_switch_statement): Added a check for array notations in
3854         a switch statement's condition.  If true, then output an error.
3855         (c_parser_while_statement): Similarly, but for a while.
3856         (c_parser_do_statement): Similarly, but for a do-while.
3857         (c_parser_for_statement): Similarly, but for a for-loop.
3858         (c_parser_unary_expression): Check if array notation is used in a
3859         pre-increment or pre-decrement expression.  If true, then expand
3860         them.
3861         (c_parser_array_notation): New function.
3862         * c-array-notation.c: New file.
3863         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3864         
3865 2013-05-23  Mike Stump  <mikestump@comcast.net>
3867         * c-typeck.c (convert_for_assignment): Handle references to memory
3868         spaces better.
3870 2013-05-16  Jason Merrill  <jason@redhat.com>
3872         * Make-lang.in (cc1$(exeext)): Use link mutex.
3874 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
3876         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3877         to simply use OPT_Wpointer_arith.
3878         (build_unary_op): Likewise.
3880 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
3882         PR c/19449
3883         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3884         argument.  If set, or it temporarily for parsing of the first
3885         argument into force_folding_builtin_constant_p.
3886         (c_parser_postfix_expression): Adjust callers.
3888 2013-03-21  Richard Biener  <rguenther@suse.de>
3890         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3891         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
3893 2013-02-12  Marek Polacek  <polacek@redhat.com>
3895         PR c/44938
3896         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3897         origtypes to NULL.
3899 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
3901         PR c/56078
3902         * c-typeck.c (set_nonincremental_init_from_string): If
3903         constructor_max_index is NULL, treat it as if tree_int_cst_lt
3904         returned false.
3905         (process_init_element): Likewise.
3907 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
3909         PR c++/55619
3910         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3911         argument, don't call default_function_array_conversion
3912         nor c_fully_fold here.
3913         (c_parser_asm_statement): Adjust callers.
3914         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3915         and outputs here, and call default_function_array_conversion
3916         on inputs that don't need to be addressable.
3918 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
3920         PR c/39464
3921         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3922         warning require that both c_common_unsigned_type as well as
3923         c_common_signed_type is the same for both mvl and mvr types.
3925 2012-11-16  Diego Novillo  <dnovillo@google.com>
3927         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3929         * c-common.c: Use new vec API in vec.h.
3930         * c-common.h: Likewise.
3931         * c-gimplify.c: Likewise.
3932         * c-pragma.c: Likewise.
3933         * c-pretty-print.c: Likewise.
3934         * c-pretty-print.h: Likewise.
3935         * c-semantics.c: Likewise.
3936         * c-decl.c: Likewise.
3937         * c-parser.c: Likewise.
3938         * c-tree.h: Likewise.
3939         * c-typeck.c: Likewise.
3941 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
3943         PR c++/54930
3944         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3946 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3948         PR c/53066
3949         * c-decl.c (warn_if_shadowing): Do not warn if a variable
3950         shadows a function, unless the variable is a function or a
3951         pointer-to-function.
3953 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
3955         PR c/54381
3956         * c-parser.c (struct c_tree_loc_pair): Removed.
3957         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3958         add location_t * and tree * arguments, fill in array of 3
3959         sizeof_arg trees and corresponding locs.
3960         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3961         c_parser_expr_list callers.
3962         (c_parser_postfix_expression_after_primary): Likewise.  Pass
3963         array of 3 sizeof_arg trees and locs (corresponding to first
3964         3 arguments) to sizeof_pointer_memaccess_warning.
3966 2012-10-09  Lawrence Crowl  <crowl@google.com>
3968         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3969         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3970         hash table.
3972 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
3974         PR c++/54194
3975         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3976         call.
3978 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
3980         PR c++/54427
3981         * c-typeck.c: Include c-common.h.
3982         (enum stv_conv): Moved to c-common.h.
3983         (scalar_to_vector): Moved to c-common.c.
3984         (build_binary_op): Adapt to scalar_to_vector's new prototype.
3985         * Make-lang.in: c-typeck.c depends on c-common.h.
3987 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
3989         * c-decl.c (c_write_global_declarations): Fix handling of
3990         -fdump-ada-spec*.
3992 2012-09-30  Sharad Singhai  <singhai@google.com>
3994         * c-decl.c (c_write_global_declarations): Use a different method
3995         to determine if the dump has ben initialized.
3997 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
3999         PR c/54552
4000         * c-typeck.c (c_cast_expr): When casting to a type requiring
4001         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4002         c_fully_fold first.
4004 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4006         PR c/54103
4007         * c-typeck.c (build_unary_op): Pass original argument of
4008         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4009         any C_MAYBE_CONST_EXPR, if it has integer operands.
4010         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4011         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4012         to c_objc_common_truthvalue_conversion, then remove any
4013         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
4014         c_objc_common_truthvalue_conversion not
4015         c_common_truthvalue_conversion.
4016         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4017         call note_integer_operands for arguments with integer operands
4018         that are not integer constants.
4020 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
4022         PR c/54559
4023         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4024         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4026 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
4028         PR c/54428
4029         * c-convert.c (convert): Don't call fold_convert_loc if
4030         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4031         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
4032         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4034 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
4036         PR c/54355
4037         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4038         for nested and empty_ok arguments in the call to
4039         c_parser_declaration_or_fndef.
4041 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
4043         * c-tree.h (c_last_sizeof_arg): Declare.
4044         * c-parser.c (struct c_tree_loc_pair): New type.
4045         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
4046         non-NULL.
4047         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4048         (c_parser_postfix_expression_after_primary): Likewise.  Call
4049         sizeof_pointer_memaccess_warning if needed.
4050         (sizeof_ptr_memacc_comptypes): New function.
4051         * c-typeck.c (c_last_sizeof_arg): New global variable.
4052         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4054 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
4056         * c-lang.h (lang_decl): Add variable_size GTY option.
4058 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
4060         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4061         * Make-lang.in: Fix dependencies.
4063 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
4065         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4066         and add language Makefile hooks.
4067         * config-lang.in: New file.
4068         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4069         add the required "normal" config-lang.in rules.
4070         * c-lang.h: Moved from gcc/ to here.
4071         * c-tree.h: Likewise.
4072         * c-objc-common.c: Likewise.
4073         * c-objc-common.h: Likewise.
4074         * c-typeck.c: Likewise.
4075         * c-convert.c: Likewise.
4076         * c-lang.c: Likewise.
4077         * c-aux-info.c: Likewise.
4078         * c-errors.c: Likewise.
4079         * gccspec.c: Likewise.
4080         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
4081         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
4083 Copyright (C) 2012-2016 Free Software Foundation, Inc.
4085 Copying and distribution of this file, with or without modification,
4086 are permitted in any medium without royalty provided the copyright
4087 notice and this notice are preserved.