PR c/82167
[official-gcc.git] / gcc / c / ChangeLog
blob957daeb4fe9979e7587c69fbf8daa2813e6a2636
1 2017-09-13  Marek Polacek  <polacek@redhat.com>
3         PR c/82167
4         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
5         than expr.original_type.
7 2017-09-12  Nathan Sidwell  <nathan@acm.org>
9         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
10         resort_sorted_fields): Moved from c-family/c-common.c.
11         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
13 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
15         PR c/82071
16         * c-typeck.c (build_atomic_assign): Handle argument with excess
17         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
18         argument passed to build_binary_op and convert_for_assignment but
19         not for call to c_fully_fold.
20         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
21         Ensure build_binary_op is called with argument with original
22         semantic type.  Avoid calling c_fully_fold with an
23         EXCESS_PRECISION_EXPR from build_binary_op.
25 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
27         PR c/81887
28         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
30 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
31             Alan Hayward  <alan.hayward@arm.com>
32             David Sherwood  <david.sherwood@arm.com>
34         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
35         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
36         m1 and m2 to the signed equivalent of a fixed-point
37         SCALAR_TYPE_MODE.
39 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
41         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
42         than CAN_HAVE_LOCATION_P when determining whether to use the
43         location_t value within "value".
45 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
47         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
48         rather than peeking the location of the first token.
49         * c-tree.h (c_expr::get_location): New method.
51 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
53         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
54         to check_function_arguments.
56 2017-08-18  Marek Polacek  <polacek@redhat.com>
58         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
59         commentary.
61 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
63         PR c/53037
64         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
65         (check_bitfield_type_and_width): Don't allow bit-field with
66         warn_if_not_aligned type.
68 2017-08-14  Martin Sebor  <msebor@redhat.com>
70         PR c/81117
71         * c-objc-common.c (c_objc_common_init): Handle 'G'.
73 2017-08-11  Marek Polacek  <polacek@redhat.com>
75         PR c/81795
76         * c-decl.c (pushtag): Only print inform if the warning was printed.
77         (grokdeclarator): Likewise.
79 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
81         * c-parser.c (c_parser_error): Rename to...
82         (c_parser_error_richloc): ...this, making static, and adding
83         "richloc" parameter, passing it to the c_parse_error call,
84         rather than calling c_parser_set_source_position_from_token.
85         (c_parser_error): Reintroduce, reimplementing in terms of the
86         above, converting return type from void to bool.
87         (class token_pair): New class.
88         (struct matching_paren_traits): New struct.
89         (matching_parens): New typedef.
90         (struct matching_brace_traits): New struct.
91         (matching_braces): New typedef.
92         (get_matching_symbol): New function.
93         (c_parser_require): Add param MATCHING_LOCATION, using it to
94         highlight matching "opening" tokens for missing "closing" tokens.
95         (c_parser_skip_until_found): Likewise.
96         (c_parser_static_assert_declaration_no_semi): Convert explicit
97         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
98         class matching_parens, so that the pertinent open parenthesis is
99         highlighted when there are problems locating the close
100         parenthesis.
101         (c_parser_struct_or_union_specifier): Likewise.
102         (c_parser_typeof_specifier): Likewise.
103         (c_parser_alignas_specifier): Likewise.
104         (c_parser_simple_asm_expr): Likewise.
105         (c_parser_braced_init): Likewise, for matching_braces.
106         (c_parser_paren_condition): Likewise, for matching_parens.
107         (c_parser_switch_statement): Likewise.
108         (c_parser_for_statement): Likewise.
109         (c_parser_asm_statement): Likewise.
110         (c_parser_asm_operands): Likewise.
111         (c_parser_cast_expression): Likewise.
112         (c_parser_sizeof_expression): Likewise.
113         (c_parser_alignof_expression): Likewise.
114         (c_parser_generic_selection): Likewise.
115         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
116         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
117         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
118         In case CPP_OPEN_PAREN, pass loc_open_paren to the
119         c_parser_skip_until_found call.
120         (c_parser_objc_class_definition): Use class matching_parens as
121         above.
122         (c_parser_objc_method_decl): Likewise.
123         (c_parser_objc_try_catch_finally_statement): Likewise.
124         (c_parser_objc_synchronized_statement): Likewise.
125         (c_parser_objc_at_property_declaration): Likewise.
126         (c_parser_oacc_wait_list): Likewise.
127         (c_parser_omp_var_list_parens): Likewise.
128         (c_parser_omp_clause_collapse): Likewise.
129         (c_parser_omp_clause_default): Likewise.
130         (c_parser_omp_clause_if): Likewise.
131         (c_parser_omp_clause_num_threads): Likewise.
132         (c_parser_omp_clause_num_tasks): Likewise.
133         (c_parser_omp_clause_grainsize): Likewise.
134         (c_parser_omp_clause_priority): Likewise.
135         (c_parser_omp_clause_hint): Likewise.
136         (c_parser_omp_clause_defaultmap): Likewise.
137         (c_parser_oacc_single_int_clause): Likewise.
138         (c_parser_omp_clause_ordered): Likewise.
139         (c_parser_omp_clause_reduction): Likewise.
140         (c_parser_omp_clause_schedule): Likewise.
141         (c_parser_omp_clause_num_teams): Likewise.
142         (c_parser_omp_clause_thread_limit): Likewise.
143         (c_parser_omp_clause_aligned): Likewise.
144         (c_parser_omp_clause_linear): Likewise.
145         (c_parser_omp_clause_safelen): Likewise.
146         (c_parser_omp_clause_simdlen): Likewise.
147         (c_parser_omp_clause_depend): Likewise.
148         (c_parser_omp_clause_map): Likewise.
149         (c_parser_omp_clause_device): Likewise.
150         (c_parser_omp_clause_dist_schedule): Likewise.
151         (c_parser_omp_clause_proc_bind): Likewise.
152         (c_parser_omp_clause_uniform): Likewise.
153         (c_parser_omp_for_loop): Likewise.
154         (c_parser_cilk_clause_vectorlength): Likewise.
155         (c_parser_cilk_clause_linear): Likewise.
156         (c_parser_transaction_expression): Likewise.
157         * c-parser.h (c_parser_require): Add param matching_location with
158         default UNKNOWN_LOCATION.
159         (c_parser_error): Convert return type from void to bool.
160         (c_parser_skip_until_found): Add param matching_location with
161         default UNKNOWN_LOCATION.
163 2017-08-09  Marek Polacek  <polacek@redhat.com>
165         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
166         * c-tree.h (build_external_ref): Update declaration.
167         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
168         (build_external_ref): Change the type of a parameter to bool.
169         (parser_build_binary_op): Use true/false instead of 1/0.
170         (pointer_diff): Likewise.
171         (build_modify_expr): Likewise.
172         (set_designator): Change the type of a parameter to bool.
173         (set_init_index): Use true/false instead of 1/0.
174         (set_init_label): Likewise.
175         (output_init_element): Change the type of a parameter to bool.
176         (output_pending_init_elements): Use true/false instead of 1/0.
177         (process_init_element): Likewise.
178         (build_binary_op): Change the type of a parameter to bool.
180 2017-08-09  Marek Polacek  <polacek@redhat.com>
182         PR c/81233
183         * c-typeck.c (pedwarn_init): Make the function take a variable list.
184         Call emit_diagnostic_valist instead of pedwarn.
185         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
186         Print the relevant types in diagnostics.
188 2017-08-09  Marek Polacek  <polacek@redhat.com>
190         PR c/81417
191         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
192         build_conditional_expr. 
193         * c-parser.c (c_parser_conditional_expression): Create locations for
194         EXP1 and EXP2 from their source ranges.  Pass the locations down to
195         build_conditional_expr.
196         * c-tree.h (build_conditional_expr): Update declaration.
197         * c-typeck.c (build_conditional_expr): Add location_t parameters.
198         For -Wsign-compare, also print the types.
200 2017-08-08  Martin Liska  <mliska@suse.cz>
202         * c-convert.c: Include header files.
203         * c-typeck.c: Likewise.
205 2017-08-07  Martin Liska  <mliska@suse.cz>
207         * c-parser.c (c_parser_attributes): Canonicalize name of an
208         attribute.
210 2017-08-02  Marek Polacek  <polacek@redhat.com>
212         PR c/81289
213         * c-parser.c (c_parser_unary_expression): Use set_error.
215         PR c/81448
216         PR c/81306
217         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
218         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
220 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
221             Martin Liska  <mliska@suse.cz>
223         * c-typeck.c (c_finish_goto_label): Build gimple predict
224         statement.
226 2017-07-31  Martin Liska  <mliska@suse.cz>
228         PR sanitize/81530
229         * c-convert.c (convert): Guard condition with flag_sanitize_p
230         also with current_function_decl non-null equality.
231         * c-decl.c (grokdeclarator): Likewise.
232         * c-typeck.c (build_binary_op): Likewise.
234 2017-07-25  Marek Polacek  <polacek@redhat.com>
236         * c-decl.c (grokfield): Remove local variable.
238 2017-07-25  Marek Polacek  <polacek@redhat.com>
240         PR c/81364
241         * c-parser.c (c_parser_else_body): Don't warn about multistatement
242         macro expansion if the body is in { }.
243         (c_parser_while_statement): Likewise.
244         (c_parser_for_statement): Likewise.
246 2017-07-18  Nathan Sidwell  <nathan@acm.org>
248         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
250 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
252         * c-decl.c (implicitly_declare): When suggesting a missing
253         #include, provide a fix-it hint.
255 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
257         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
258         and call that instead.
259         * c-tree.h (selftest::run_c_tests): New decl.
261 2017-06-26  Marek Polacek  <polacek@redhat.com>
263         PR c/80116
264         * c-parser.c (c_parser_if_body): Set the location of the
265         body of the conditional after parsing all the labels.  Call
266         warn_for_multistatement_macros.
267         (c_parser_else_body): Likewise.
268         (c_parser_switch_statement): Likewise.
269         (c_parser_while_statement): Likewise.
270         (c_parser_for_statement): Likewise.
271         (c_parser_statement): Add a default argument.  Save the location
272         after labels have been parsed.
273         (c_parser_c99_block_statement): Likewise.
275 2017-06-19  Richard Biener  <rguenther@suse.de>
277         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
278         negated _Literals to parse _Literal (int) -1.
280 2017-06-13  Martin Liska  <mliska@suse.cz>
282         PR sanitize/78204
283         * c-convert.c (convert): Use sanitize_flags_p.
284         * c-decl.c (grokdeclarator): Likewise.
285         * c-typeck.c (convert_for_assignment): Likewise.
286         (c_finish_return): Likewise.
287         (build_binary_op): Likewise.
289 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
291         PR c/81006
292         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
293         to sizetype before size_binop.
295 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
297         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
298         of TDI_generic.
300 2017-06-06  Marek Polacek  <polacek@redhat.com>
302         PR c/79983
303         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
304         ref.
305         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
307 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
309         * c-parser.c (c_parser_binary_expression): Implement the
310         -Wsizeof_pointer_div warning.
311         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
312         from a parenthesized expression.
313         (c_parser_expr_list): Use c_last_sizeof_loc.
314         * c-tree.h (c_last_sizeof_loc): New external.
315         * c-typeck.c (c_last_sizeof_loc): New variable.
316         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
318 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
320         PR testsuite/80580
321         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
323 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
325         * c-objc-common.c (c_tree_printer): Gain bool and const char **
326         parameters.
328 2017-05-24  Martin Sebor  <msebor@redhat.com>
330         PR c/80731
331         * c-fold.c (c_fully_fold_internal): Adjust.
332         * c-typeck.c (parser_build_unary_op): Adjust.
334 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
336         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
337         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
338         "VECTOR_LENGTH".
340 2017-05-23  Marek Polacek  <polacek@redhat.com>
342         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
343         quotes.
345 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
347         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
348         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
349         it returned invariant.  Call tree_invariant_p unconditionally
350         afterwards to decide whether to return expr or op0.
352 2017-05-22  Nathan Sidwell  <nathan@acm.org>
354         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
356 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
358         * c-parser.c (c_parser_omp_clause_default): Handle
359         "OMP_CLAUSE_DEFAULT_PRESENT".
361 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
363         * config-lang.in (gtfiles): Add c-family/c-format.c.
365 2017-05-18  Nathan Sidwell  <nathan@acm.org>
367         * c-decl.c (pushdecl_top_level): Delete unused function.
369 2017-05-18  Marek Polacek  <polacek@redhat.com>
371         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
372         (check_earlier_gotos): Likewise.
373         (define_label): Likewise.
374         (pending_xref_error): Likewise.
375         (smallest_type_quals_location): Likewise.
376         (grokdeclarator): Likewise.
377         (grokparms): Likewise.
378         (identifier_global_value): Likewise.
379         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
380         (find_init_member): Likewise.
382 2017-05-18  Marek Polacek  <polacek@redhat.com>
384         * c-decl.c (start_decl): Use false/true instead of 0/1.
385         (grokdeclarator): Likewise.
386         (finish_struct): Likewise.
387         (start_function): Change the return type to bool.  Use false/true
388         instead of 0/1.
389         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
390         * c-tree.h (start_function): Update.
391         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
392         (set_designator): Change the return type to bool.  Use false/true
393         instead of 0/1.
395 2017-05-17  Marek Polacek  <polacek@redhat.com>
397         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
398         * c-typeck.c: Likewise.
400 2017-05-17  Marek Polacek  <polacek@redhat.com>
402         PR sanitizer/80659
403         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
404         DECL_IGNORED_P even for non-static compound literals.
406 2017-05-17  Martin Liska  <mliska@suse.cz>
408         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
409         use it instead of int type.
411 2017-05-17  Marek Polacek  <polacek@redhat.com>
413         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
414         call c_fully_fold.
415         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
416         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 
417         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
418         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
419         save_expr.
420         (c_parser_conditional_expression): Likewise.
421         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
422         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
423         (process_init_element): Likewise.
424         (build_binary_op): Likewise.
425         (handle_omp_array_sections_1): Likewise.
427 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
429         * c-parser.c (c_parser_omp_clause_num_gangs)
430         (c_parser_omp_clause_num_workers)
431         (c_parser_omp_clause_vector_length): Merge functions into...
432         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
433         all users.
435 2017-05-11  Nathan Sidwell  <nathan@acm.org>
437         * gimple-parser.c: Don't #include tree-dump.h.
439 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
441         PR testsuite/80580
442         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
444 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
446         PR testsuite/80580
447         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
448         incorrect __MEM syntax.
450 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
452         PR testsuite/80580
453         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
454         type of unary '*'.
456 2017-05-09  Nathan Sidwell  <nathan@acm.org>
458         * c-tree.h (pushdecl): Declare.
460 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
462         * c-decl.c (warn_defaults_to): Replace report_diagnostic
463         with diagnostic_report_diagnostic.
464         * c-errors.c (pedwarn_c99): Likewise.
465         (pedwarn_c90): Likewise.
467 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
469         PR c++/80038
470         * c-gimplify.c (c_gimplify_expr): Remove calls to
471         cilk_gimplifY_call_params_in_spawned_fn.
473 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
475         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
476         hint for removing extra semicolon.
478 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
480         PR c/80468
481         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
482         enabled, set specs->type to integer_type_node.
484 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
486         * c-array-notation.c: Fix typo in comment.
488 2017-03-29  Marek Polacek  <polacek@redhat.com>
490         PR c/79730
491         * c-decl.c (finish_decl): Check VAR_P.
493 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
495         PR middle-end/80162
496         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
497         * c-typeck.c (c_mark_addressable): Likewise.  Look through
498         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
499         to ARRAY_TYPE.
500         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
502 2017-03-23  Marek Polacek  <polacek@redhat.com>
504         * c-tree.h: Remove a C_RID_YYCODE reference.
506 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
508         PR c/80097
509         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
510         optional COMPOUND_EXPR with ubsan instrumentation.
512 2017-03-17  Marek Polacek  <polacek@redhat.com>
514         * c-parser.c: Add C11 references.
516 2017-03-15  Marek Polacek  <polacek@redhat.com>
518         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
520 2017-03-11  Marek Polacek  <polacek@redhat.com>
522         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
524 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
526         PR translation/79848
527         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
528         "%qs".
529         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
531 2017-03-09  Marek Polacek  <polacek@redhat.com>
533         PR sanitizer/79757
534         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
535         parameter declarations with initializers.
537 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
539         PR c/79969
540         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
541         TYPE_STUB_DECL.
543 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
545         PR c/79834
546         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
547         for "may only be used in compound statements" diagnostics, change it
548         such that the same translatable string is used for all pragmas.  For
549         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
550         diagnostics.
551         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
552         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
553         "may only be used in compound statements" diagnostics, such that the
554         same translatable string is used for all pragmas.
556 2017-03-04  Marek Polacek  <polacek@redhat.com>
558         PR c/79847
559         * c-decl.c (implicit_decl_warning): Add missing space.
561 2017-03-03  Marek Polacek  <polacek@redhat.com>
563         PR c/79758
564         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
565         current_function_prototype_arg_types is error_mark_node.  Fix
566         formatting.  Use TREE_VALUE instead of TREE_TYPE.
568 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
570         PR c/79837
571         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
572         %<min%> or %<max%> in the diagnostics, instead mention identifier.
573         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
574         diagnostics.
576         PR c/79836
577         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
578         instead of %<_Generic>.
579         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
580         (c_parser_omp_target_exit_data): Use %<release%> instead of
581         %<release>.
583 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
585         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
586         instead of just cond ? "..." : "...".
587         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
588         for "enter"/"exit" keyword.
589         (c_finish_oacc_routine): Don't use %s to supply portions of the
590         message.
592 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
594         PR c++/79588
595         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
596         handle -Wrestrict here.
597         * c-typeck.c (build_function_call_vec): Adjust
598         check_function_arguments caller.
600 2017-02-23  Richard Biener  <rguenther@suse.de>
602         PR c/79684
603         * gimple-parser.c (c_parser_gimple_statement): Use set_error
604         to initialize c_exprs to return.
605         (c_parser_gimple_binary_expression): Likewise.
606         (c_parser_gimple_unary_expression): Likewise.
607         (c_parser_gimple_postfix_expression): Likewise.
609 2017-02-22  Marek Polacek  <polacek@redhat.com>
611         PR c/79662
612         * c-typeck.c (convert_arguments): Handle error_mark_node.
614 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
616         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
617         value of c_parser_parse_ssa_name against error_mark_node and emit
618         error if ssa name is anonymous and written as default definition.
620 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
622         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
623         FMA_EXPR.
625 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
627         PR c++/79512
628         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
629         ignore #pragma omp target even when not followed by identifier.
631 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
633         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
634         (c_parser_gimple_unary_expression): Likewise.
636 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
638         * c-parser.c (c_parser_oacc_declare): Add missing space in
639         diagnostics.
641 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
643         PR c/79478
644         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
645         set_c_expr_source_range when parsing ssa-name.
647 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
648         Richard Biener  <rguenther@suse.de>
650         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
651         building IL when arguments are error_mark_node.
652         (c_parser_gimple_unary_expression): Likewise.
653         (c_parser_gimple_if_stmt): Likewise.
654         (c_parser_gimple_switch_stmt): Likewise.
655         (c_parser_gimple_return_stmt): Likewise.
656         (c_parser_parse_ssa_name): When name lookup fails do not build
657         an SSA name.  Use undeclared rather than not declared in error
658         reporting.
660 2017-02-09  Marek Polacek  <polacek@redhat.com>
662         PR c/79428
663         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
664         instead of c_parser_skip_until_found.
666 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
668         PR c/79431
669         * c-parser.c (c_parser_omp_declare_target): Don't invoke
670         symtab_node::get on automatic variables.
672 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
673             Chung-Lin Tang  <cltang@codesourcery.com>
675         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
676         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
677         semantic checking.
678         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
680 2017-02-07  Richard Biener  <rguenther@suse.de>
682         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
683         (c_parser_gimple_postfix_expression_after_primary):
684         Do not use c_build_function_call_vec to avoid folding and promotion.
685         Simplify.
687 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
689         PR lto/79061
690         * c-decl.c (pop_scope): Pass main_input_filename to
691         build_translation_unit_decl.
693 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
695         * c-parser.c: Include "read-rtl-function.h" and
696         "run-rtl-passes.h".
697         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
698         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
699         production.  Update for renaming of field "gimple_pass" to
700         "gimple_or_rtl_pass".  If __RTL was seen, call
701         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
702         to an auto_timevar, to cope with early exit.
703         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
704         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
705         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
706         Handle RID_RTL.
707         (c_parser_parse_rtl_body): New function.
708         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
709         (struct c_declspecs): Rename field "gimple_pass" to
710         "gimple_or_rtl_pass".  Add field "rtl_p".
711         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
712         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
713         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
714         (c_parser_gimple_or_rtl_pass_list): ...this.
716 2017-01-20  Marek Polacek  <polacek@redhat.com>
718         PR c/64279
719         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
721 2017-01-13  Richard Biener  <rguenther@suse.de>
723         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
724         nops.
726 2017-01-13  Richard Biener  <rguenther@suse.de>
728         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
729         _Literal ( type-name ) number.
731 2017-01-12  Richard Biener  <rguenther@suse.de>
733         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
734         __MEM.
736 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
738         PR c++/72813
739         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
740         PCH file.
742 2017-01-11  Richard Biener  <rguenther@suse.de>
744         PR bootstrap/79052
745         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
746         returns on parse errors.
748 2017-01-04  Marek Polacek  <polacek@redhat.com>
750         PR c++/64767
751         * c-parser.c (c_parser_postfix_expression): Mark zero character
752         constants by setting original_type in c_expr.
753         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
754         with a zero character constant.
755         (char_type_p): New function.
757 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
759         * c-parser.c (c_parser_declaration_or_fndef): Create a
760         rich_location at init_loc and parse it to start_init.
761         (last_init_list_comma): New global.
762         (c_parser_braced_init): Update last_init_list_comma when parsing
763         commas.  Pass it to pop_init_level.  Pass location of closing
764         brace to pop_init_level.
765         (c_parser_postfix_expression_after_paren_type): Create a
766         rich_location at type_loc and parse it to start_init.
767         (c_parser_omp_declare_reduction): Likewise for loc.
768         * c-tree.h (start_init): Add rich_location * param.
769         (pop_init_level): Add location_t param.
770         * c-typeck.c (struct initializer_stack): Add field
771         "missing_brace_richloc".
772         (start_init): Add richloc param, use it to initialize
773         the stack node's missing_brace_richloc.
774         (last_init_list_comma): New decl.
775         (finish_implicit_inits): Pass last_init_list_comma to
776         pop_init_level.
777         (push_init_level): When finding missing open braces, add fix-it
778         hints to the richloc.
779         (pop_init_level): Add "insert_before" param and pass it
780         when calling pop_init_level.  Add fixits about missing
781         close braces to any richloc.  Use the richloc for the
782         -Wmissing-braces warning.
783         (set_designator): Pass last_init_list_comma to pop_init_level.
784         (process_init_element): Likewise.
786 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
788         Update copyright years.
790 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
792         PR bootstrap/78817
793         * c-typeck.c (build_function_call_vec): If check_function_arguments
794         returns true, set TREE_NO_WARNING on CALL_EXPR.
796         PR c/77767
797         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
798         to *expr instead of overwriting it.
800 2016-12-20  Richard Biener  <rguenther@suse.de>
802         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
803         error recovery.
804         (c_parser_gimple_statement): Only build assigns for non-error
805         stmts.
806         (c_parser_gimple_postfix_expression_after): Improve error recovery.
808 2016-12-14  Martin Jambor  <mjambor@suse.cz>
810         * c-parser.c: Include omp-general.h and omp-offload.h instead of
811         omp-low.h.
812         (c_finish_oacc_routine): Adjusted call to
813         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
814         to use their new names.
815         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
816         use its new name.
817         (c_parser_oacc_update): Likewise.
818         (c_parser_omp_simd): Likewise.
819         (c_parser_omp_target_update): Likewise.
820         * c-typeck.c: Include omp-general.h instead of omp-low.h.
821         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
822         name.
823         (c_finish_omp_cancellation_point): Likewise.
824         * gimple-parser.c: Do not include omp-low.h
826 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
827             James Norris  <jnorris@codesourcery.com>
829         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
830         EXIT_DATA,WAIT} are not used in compound statements.
831         (c_parser_oacc_enter_exit_data): Update diagnostics.
833 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
835         PR c++/71973
836         * c-decl.c (diagnose_mismatched_decls): Use
837         OPT_Wbuiltin_declaration_mismatch here too.
839 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
840             Alan Hayward  <alan.hayward@arm.com>
841             David Sherwood  <david.sherwood@arm.com>
843         * c-decl.c (merge_decls): Use SET_DECL_MODE.
844         (make_label, finish_struct): Likewise.
846 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
847             Richard Biener  <rguenther@suse.de>
849         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
850         * config-lang.in (gtfiles): Add c/c-parser.h.
851         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
852         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
853         * c-parser.c (enum c_id_kind, struct c_token,
854         c_parser_next_token_is, c_parser_next_token_is_not,
855         c_parser_next_token_is_keyword,
856         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
857         Split out to ...
858         * c-parser.h: ... new header.
859         * c-parser.c: Include c-parser.h and gimple-parser.h.
860         (c_parser_peek_token, c_parser_peek_2nd_token,
861         c_token_starts_typename, c_parser_next_token_starts_declspecs,
862         c_parser_next_tokens_start_declaration, c_parser_consume_token,
863         c_parser_error, c_parser_require, c_parser_skip_until_found,
864         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
865         c_parser_type_name): Export.
866         (c_parser_tokens_buf): New function.
867         (c_parser_error): Likewise.
868         (c_parser_set_error): Likewise.
869         (c_parser_declspecs): Handle RID_GIMPLE.
870         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
871         via c_parser_parse_gimple_body.
872         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
873         c_token_starts_typename, c_parser_next_token_starts_declspecs,
874         c_parser_next_tokens_start_declaration, c_parser_consume_token,
875         c_parser_error, c_parser_require, c_parser_skip_until_found,
876         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
877         c_parser_type_name): Declare.
878         (struct c_parser): Declare forward.
879         (c_parser_tokens_buf): Declare.
880         (c_parser_error): Likewise.
881         (c_parser_set_error): Likewise.
882         * gimple-parser.c: New file.
883         * gimple-parser.h: Likewise.
885 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
887         PR c/35503
888         * c-parser.c (c_parser_postfix_expression_after_primary): Call
889         warn_for_restrict.
891 2016-09-11  Le-Chun Wu  <lcwu@google.com>
892             Mark Wielaard  <mjw@redhat.com>
894         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
895         to the given -Wshadow= variant.
897 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
899         * c-typeck.c: Include memmodel.h.
901 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
903         PR target/77957
904         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
905         instead of lhd_return_null_tree_v.
907 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
909         PR c++/69733
910         * c-decl.c (smallest_type_quals_location): New static function.
911         (grokdeclarator): Try to find the correct location for an ignored
912         qualifier.
914 2016-09-26  Marek Polacek  <polacek@redhat.com>
916         PR c/7652
917         * c-decl.c (pop_scope): Add gcc_fallthrough.
919 2016-09-26  Marek Polacek  <polacek@redhat.com>
921         PR c/7652
922         * c-parser.c (struct c_token): Add flags field.
923         (c_lex_one_token): Pass it to c_lex_with_flags.
924         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
925         into IFN_FALLTHROUGH.
926         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
927         attribute fallthrough after a case label or default label.
928         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
930 2016-09-24  Marek Polacek  <polacek@redhat.com>
932         PR c/77490
933         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
934         have boolean value.  Warn about ++/-- on booleans.
936 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
938         * c-parser.c (incomplete_record_decls): Remove unnecessary
939         = vNULL initialization of file scope vec.
941 2016-09-16  Marek Polacek  <polacek@redhat.com>
943         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
945 2016-09-14  Marek Polacek  <polacek@redhat.com>
947         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
948         (fix_array_notation_expr): Likewise.
949         * c-decl.c (finish_decl): Likewise.
950         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
951         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
952         (function_to_pointer_conversion): Use false instead of 0.
953         (convert_lvalue_to_rvalue): Likewise.
954         (parser_build_unary_op): Likewise.
955         (build_atomic_assign): Likewise.
956         (build_unary_op): Change nonconvert parameter type to bool, use
957         true/false instead of 1/0.
958         (build_binary_op): Use true instead of 1.
960 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
962         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
963         of add_fixit_insert to add_fixit_insert_before.
965 2016-09-13  Marek Polacek  <polacek@redhat.com>
967         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
968         it.
970 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
972         PR c++/77496
973         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
974         COMPOUND_EXPR to warn_for_omitted_condop.
976 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
978         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
979         c_get_substring_location for this new langhook.
981 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
983         PR c/65467
984         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
985         flag_openmp.
986         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
987         instead of mark_exp_read on low_bound/length expression.
988         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
989         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
990         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
991         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
992         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
993         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
994         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
995         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
996         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
997         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
998         instead of mark_expr_read.
999         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1000         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1001         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1002         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1003         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1004         array section bases outside of depend clause, for depend clause
1005         use convert_lvalue_to_rvalue on the base.
1006         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1007         linear, aligned, map, to and from clauses.
1008         (c_omp_clause_copy_ctor): New function.
1010 2016-09-01  Marek Polacek  <polacek@redhat.com>
1012         PR c/7652
1013         * c-typeck.c (composite_type): Add FALLTHRU comment.
1015 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
1017         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1018         to the insertion fixits for "struct", "union", and "enum".
1020 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
1022         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1023         rather than add_fixit_misspelled_id.
1024         (undeclared_variable): Likewise.
1025         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
1026         now-redundant "here" params from add_fixit_insert method calls.
1027         (c_parser_parameter_declaration): Likewise.
1028         * c-typeck.c (build_component_ref): Remove now-redundant range
1029         param from add_fixit_replace method calls.
1031 2016-08-25  Marek Polacek  <polacek@redhat.com>
1033         * c-typeck.c (parser_build_binary_op): Pass LHS to
1034         warn_logical_not_parentheses.
1036 2016-08-25  Marek Polacek  <polacek@redhat.com>
1038         PR c/77323
1039         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1040         or _FloatN or _FloatNx is not supported.
1041         (finish_declspecs): Set type to integer_type_node when _FloatN or
1042         _FloatNx is not supported.
1044 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
1046         PR c/32187
1047         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1048         (struct c_declspecs): Add field floatn_nx_idx.
1049         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1050         and _FloatNx type specifiers.
1051         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1052         (c_parser_declspecs, c_parser_attribute_any_word)
1053         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1054         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1055         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1056         narrower than double.
1058 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
1059             Martin Liska  <mliska@suse.cz>
1061         PR c/67410
1062         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1063         % to determine val element to change.  Assert that
1064         wchar_bytes * charwidth fits into val array.
1066 2016-08-12  Marek Polacek  <polacek@redhat.com>
1068         PR c/7652
1069         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1070         (c_parser_postfix_expression): Likewise.
1071         * c-typeck.c (build_unary_op): Adjust fall through comment.
1072         (c_mark_addressable): Likewise.
1074 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
1076         PR c/72816
1077         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1078         array member through typedef, for orig_qual_indirect == 0 clear
1079         orig_qual_type.
1081 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
1083         PR c/64955
1084         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1085         this up to selftest::run_c_tests.
1086         (selftest::run_c_tests): New function.
1088 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
1090         * c-parser.c (struct oacc_routine_data): Add error_seen and
1091         fndecl_seen members.
1092         (c_finish_oacc_routine): Use these.
1093         (c_parser_declaration_or_fndef): Adjust.
1094         (c_parser_oacc_routine): Likewise.  Support more C language
1095         constructs, and improve diagnostics.  Move pragma context
1096         checking...
1097         (c_parser_pragma): ... here.
1099         * c-parser.c (struct oacc_routine_data): New.
1100         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1101         Simplify code.
1102         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
1103         declare target" attribute.
1105 2016-08-01  Jan Beulich  <jbeulich@suse.com>
1107         * c-fold.c (c_fully_fold_internal): Also emit shift count
1108         warnings for vector types.
1109         * c-typeck.c (build_binary_op): Likewise.
1111 2016-07-29  Marek Polacek  <polacek@redhat.com>
1113         PR c/71742
1114         * c-decl.c (finish_struct): Rephrase an error message.
1116         PR c/71853
1117         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1118         to error node for invalid code.
1120         PR c/71573
1121         * c-decl.c (implicitly_declare): Return decl early not only for
1122         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1124 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
1126         PR c/71969
1127         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1128         on GNU extern inline functions.
1130 2016-07-29  Marek Polacek  <polacek@redhat.com>
1132         PR c/71583
1133         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1134         check expr.value.
1136 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
1138         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1140 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1142         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1143         spellcheck-tree.h
1144         (best_macro_match): Likewise, converting from a typedef to a
1145         subclass.
1146         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1147         (lookup_name_fuzzy): Update for change of best_macro_match to a
1148         subclass with a ctor that calls cpp_forall_identifiers.
1150 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1152         * c-decl.c (implicit_decl_warning): Update for conversion of
1153         return type of lookup_name_fuzzy to const char *.
1154         (undeclared_variable): Likewise.
1155         (lookup_name_fuzzy): Convert return type from tree to
1156         const char *.
1157         * c-parser.c (c_parser_declaration_or_fndef): Update for
1158         conversion of return type of lookup_name_fuzzy to const char *.
1159         (c_parser_parameter_declaration): Likewise.
1161 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
1163         * c-parser.c (c_parser_oacc_declare): Don't scan for
1164         GOMP_MAP_POINTER.
1165         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1166         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1167         zero-length subarrays.
1169 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
1171         PR c/71858
1172         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1173         instead of FUZZY_LOOKUP_NAME.
1174         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1175         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1177 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
1179         PR c/71858
1180         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1182 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1184         * c-parser.c (c_parser_generic_selection): Make type of variable
1185         auto_vec.
1186         (c_parser_omp_declare_simd): Likewise.
1188 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1190         * c-decl.c (struct c_struct_parse_info): Change member types
1191         from vec to auto_vec.
1192         (start_struct): Adjust.
1193         (finish_struct): Likewise.
1195 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
1197         PR c/71719
1198         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1200 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
1202         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1203         Move pragma context checking into...
1204         (c_parser_omp_cancellation_point): ... here, and improve
1205         diagnostic messages.
1206         * c-typeck.c (c_finish_omp_cancel)
1207         (c_finish_omp_cancellation_point): Improve diagnostic messages.
1209 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
1211         PR c/71685
1212         * c-typeck.c (c_build_qualified_type): Don't clear
1213         C_TYPE_INCOMPLETE_VARS for the main variant.
1215 2016-06-28  Martin Sebor  <msebor@redhat.com>
1217         PR c/71552
1218         * c-typeck.c (output_init_element): Diagnose incompatible types
1219         before non-constant initializers.
1221 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
1223         * Make-lang.in: Don't cat ../stage_current if it does not exist.
1225 2016-06-23  Andi Kleen  <ak@linux.intel.com>
1227         * Make-lang.in: Add support for autofdo.
1229 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
1231         PR c/70339
1232         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1233         (implicit_decl_warning): When issuing warnings for implicit
1234         declarations, attempt to provide a suggestion via
1235         lookup_name_fuzzy.
1236         (undeclared_variable): Likewise when issuing errors.
1237         (lookup_name_in_scope): Likewise.
1238         (struct edit_distance_traits<cpp_hashnode *>): New struct.
1239         (best_macro_match): New typedef.
1240         (find_closest_macro_cpp_cb): New function.
1241         (lookup_name_fuzzy): New function.
1242         * c-parser.c: Include gcc-rich-location.h.
1243         (c_token_starts_typename): Split out case CPP_KEYWORD into...
1244         (c_keyword_starts_typename): ...this new function.
1245         (c_parser_declaration_or_fndef): When issuing errors about
1246         missing "struct" etc, add a fixit.  For other kinds of errors,
1247         attempt to provide a suggestion via lookup_name_fuzzy.
1248         (c_parser_parms_declarator): When looking ahead to detect typos in
1249         type names, also reject CPP_KEYWORD.
1250         (c_parser_parameter_declaration): When issuing errors about
1251         unknown type names, attempt to provide a suggestion via
1252         lookup_name_fuzzy.
1253         * c-tree.h (c_keyword_starts_typename): New prototype.
1255 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
1257         PR c/71601
1258         * c-typeck.c (build_conditional_expr): Return error_mark_node if
1259         c_common_type returns error_mark_node.
1261 2016-06-19  Martin Sebor  <msebor@redhat.com>
1263         PR c/69507
1264         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1265         __alignof__ (expression).
1267 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1269         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1271 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1273         * c-typeck.c (build_component_ref): Simplify fixit code by
1274         using gcc_rich_location::add_fixit_misspelled_id.
1275         (set_init_label): Likewise.
1277 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
1279         * c-parser.c (c_parser_initelt): Provide location of name for new
1280         location_t param of set_init_label.
1281         * c-tree.h (set_init_label): Add location_t param.
1282         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1283         param and use it when issuing error messages about unrecognized
1284         field names.  Attempt to provide a fixit hint if appropriate,
1285         otherwise update the error message to provide the type name.
1287 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
1289         PR c/71381
1290         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1291         Loosen checking.
1293 2016-06-08  Martin Sebor  <msebor@redhat.com>
1294             Jakub Jelinek  <jakub@redhat.com>
1296         PR c++/70507
1297         PR c/68120
1298         * c-typeck.c (convert_arguments): Don't promote last argument
1299         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1301 2016-06-08  Marek Polacek  <polacek@redhat.com>
1303         PR c/71418
1304         * c-decl.c (grokdeclarator): Check TYPE_P.
1306         PR c/71426
1307         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1308         code.
1310 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
1312         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1313         and structure element reference, capture the location of the
1314         element name token and pass it to build_component_ref.
1315         (c_parser_postfix_expression_after_primary): Likewise for
1316         structure element dereference.
1317         (c_parser_omp_variable_list): Likewise for
1318         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1319         * c-tree.h (build_component_ref): Add location_t param.
1320         * c-typeck.c (build_component_ref): Add location_t param
1321         COMPONENT_LOC.  Use it, if available, when issuing hints about
1322         mispelled member names to provide a fixit replacement hint.
1324 2016-06-06  Marek Polacek  <polacek@redhat.com>
1326         PR c/71362
1327         * c-parser.c (c_parser_direct_declarator): Set location.
1329 2016-06-06  Marek Polacek  <polacek@redhat.com>
1331         * c-typeck.c (comptypes_internal): Handle comparisons of
1332         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
1333         TYPE_REF_CAN_ALIAS_ALL.
1335 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
1337         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1338         arguments as addressable when async clause exists.
1340 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
1342         PR c++/71349
1343         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1344         when combined with target construct.
1346 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
1348         * c-parser.c (c_parser_omp_clause_schedule): Warn if
1349         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1351 2016-05-25  Marek Polacek  <polacek@redhat.com>
1353         PR c/71265
1354         * c-decl.c (c_make_fname_decl): Don't check seen_error.
1356         PR c/71266
1357         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1359 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
1361         * c-parser.c (c_parser_oacc_declare): Add support for
1362         GOMP_MAP_FIRSTPRIVATE_POINTER.
1363         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1364         argument with enum c_omp_region_type ort.
1365         (handle_omp_array_sections): Likewise.  Update call to
1366         handle_omp_array_sections_1.
1367         (c_finish_omp_clauses): Add specific errors and warning messages for
1368         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
1369         call to handle_omp_array_sections.
1371 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
1373         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1375 2016-05-24  Richard Biener  <rguenther@suse.de>
1377         PR middle-end/70434
1378         PR c/69504
1379         * c-typeck.c (build_array_ref): Do not complain about indexing
1380         non-lvalue vectors.  Adjust for function name change.
1382 2016-05-20  Martin Sebor  <msebor@redhat.com>
1384         PR c/71115
1385         * c-typeck.c (error_init): Use
1386         expansion_point_location_if_in_system_header.
1387         (warning_init): Same.
1389 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
1391         PR c/71171
1392         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1393         in error-handling.
1394         (c_parser_postfix_expression): Likewise.
1395         * c-tree.h (c_expr::set_error): New method.
1396         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1397         that result's range is initialized.
1399 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1401         * c-typeck.c (parser_build_unary_op): Fix formatting.
1403 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
1405         * c-decl.c (grokdeclarator): Remove errmsg and use of
1406         targetm.invalid_return_type.
1407         (grokparms): Remove errmsg and use of
1408         targetm.invalid_parameter_type.
1410 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
1412         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1413         function return type.
1415 2016-05-12  Marek Polacek  <polacek@redhat.com>
1417         PR c/70756
1418         * c-decl.c (build_compound_literal): Pass LOC down to
1419         c_incomplete_type_error.
1420         * c-tree.h (require_complete_type): Adjust declaration.
1421         (c_incomplete_type_error): Likewise.
1422         * c-typeck.c (require_complete_type): Add location parameter, pass it
1423         down to c_incomplete_type_error.
1424         (c_incomplete_type_error): Add location parameter, pass it down to
1425         error_at.
1426         (build_component_ref): Pass location down to c_incomplete_type_error.
1427         (default_conversion): Pass location down to require_complete_type.
1428         (build_array_ref): Likewise.
1429         (build_function_call_vec): Likewise.
1430         (convert_arguments): Likewise.
1431         (build_unary_op): Likewise.
1432         (build_c_cast): Likewise.
1433         (build_modify_expr): Likewise.
1434         (convert_for_assignment): Likewise.
1435         (c_finish_omp_clauses): Likewise.
1437 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1439         PR c/43651
1440         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1441         is enabled.
1442         * c-errors.c (pedwarn_c90): Return true if warned.
1443         * c-tree.h (pedwarn_c90): Change return type to bool.
1444         (enum c_declspec_word): Add new enumerator cdw_atomic.
1446 2016-05-11  Marek Polacek  <polacek@redhat.com>
1448         PR c++/71024
1449         * c-decl.c (diagnose_mismatched_decls): Factor out code to
1450         diagnose_mismatched_attributes and call it.
1452 2016-05-10  Marek Polacek  <polacek@redhat.com>
1454         PR c/70255
1455         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1456         on a declaration following the definition.
1458 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
1460         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1461         parse it through to c_parser_c99_block_statement.
1462         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1463         caller.
1465 2016-05-04  Marek Polacek  <polacek@redhat.com>
1467         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1468         OPT_Wdangling_else.
1470 2016-05-04  Marek Polacek  <polacek@redhat.com>
1472         PR c/48778
1473         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1474         for macro expansions.
1476 2016-05-03  Marek Polacek  <polacek@redhat.com>
1478         PR c/70859
1479         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1480         check_builtin_function_arguments.
1482 2016-05-03  Richard Biener  <rguenther@suse.de>
1484         * Make-lang.in (cc1-checksum.c): For stage-final re-use
1485         the checksum from the previous stage.
1487 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
1489         * c-parser.c (c_parser_oacc_all_clauses): Update call to
1490         c_finish_omp_clauses.
1491         (c_parser_omp_all_clauses): Likewise.
1492         (c_parser_oacc_cache): Likewise.
1493         (c_parser_oacc_loop): Likewise.
1494         (omp_split_clauses): Likewise.
1495         (c_parser_omp_declare_target): Likewise.
1496         (c_parser_cilk_all_clauses): Likewise.
1497         (c_parser_cilk_for): Likewise.
1498         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1499         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1501 2016-05-02  Marek Polacek  <polacek@redhat.com>
1503         PR c/70851
1504         * c-decl.c (grokdeclarator): Diagnose when array's size has an
1505         incomplete type.
1507 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
1509         PR middle-end/70626
1510         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1511         OACC_LOOP_CLAUSE_MASK.
1512         (c_parser_oacc_kernels_parallel): Update call to
1513         c_oacc_split_loop_clauses.
1515 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
1517         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1518         argument to build_modify_expr in two cases.
1520 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
1522         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1523         warn_for_memset instead of warning directly here.
1525 2016-04-26  Marek Polacek  <polacek@redhat.com>
1527         PR c/67784
1528         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1529         out of ...
1530         (c_parser_for_statement): ... here.
1531         (c_parser_if_statement): Use it.
1532         (c_parser_switch_statement): Use it.
1533         (c_parser_while_statement): Use it.
1535         PR c/70791
1536         * c-decl.c (pushdecl): Pass LOCUS down to warning.
1538 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1540         PR c++/69363
1541         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1542         instead of c_finish_cilk_clauses.
1543         * c-tree.h (c_finish_omp_clauses): Add new default argument.
1544         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
1545         floating-point variables in the linear clause for Cilk Plus.
1547 2016-04-18  Michael Matz  <matz@suse.de>
1549         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1550         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1552 2016-04-15  Marek Polacek  <polacek@redhat.com>
1554         PR c/70671
1555         * c-typeck.c (build_unary_op): Pass location down to error and
1556         warning call.
1558 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
1560         PR c/70436
1561         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1562         where needed.
1563         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1564         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1565         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1566         Adjust c_parser_pragma callers.
1567         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
1568         caller.
1569         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1570         c_parser_statement.
1571         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1572         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1573         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1574         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1575         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1576         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1577         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1578         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1579         down where needed.
1580         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
1581         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1582         calls.
1584 2016-04-13  Marek Polacek  <polacek@redhat.com>
1586         PR c/70436
1587         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1588         adjust callers.
1589         (c_parser_statement): Likewise.
1590         (c_parser_c99_block_statement): Likewise.
1591         (c_parser_while_statement): Likewise.
1592         (c_parser_for_statement): Likewise.
1593         (c_parser_if_body): Don't set IF_P here.
1594         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
1595         about dangling else here.
1596         * c-tree.h (c_finish_if_stmt): Adjust declaration.
1597         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
1598         warn about dangling else here.
1600 2016-04-04  Marek Polacek  <polacek@redhat.com>
1602         PR c/70307
1603         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1605 2016-03-31  Marek Polacek  <polacek@redhat.com>
1607         PR c/70297
1608         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1610 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
1612         PR c/70281
1613         * c-parser.c (c_parser_postfix_expression): Set the source range
1614         for uses of "__builtin_types_compatible_p".
1616 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
1618         PR c/70280
1619         * c-typeck.c (composite_type): Don't count void_list_node
1620         into len, if the list is terminated by void_list_node, start
1621         with void_list_node instead of NULL for newargs.  Stop
1622         at void_list_node.
1624 2016-03-16  Marek Polacek  <polacek@redhat.com>
1626         PR c/70093
1627         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1628         nested functions returning VM types.
1630 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
1632         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1633         when calling c_finish_omp_clauses.
1635 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
1637         PR c/69824
1638         * c-decl.c (get_parm_info): Don't queue implicit function declarations
1639         for later.
1641 2016-03-04  Marek Polacek  <polacek@redhat.com>
1643         PR c/69798
1644         * c-parser.c (c_parser_postfix_expression): Call
1645         c_parser_cast_expression rather than c_parser_postfix_expression.
1647 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
1649         PR c/69796
1650         PR c/69974
1651         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1652         of incomplete decls to error_mark_node.
1654 2016-02-24  Marek Polacek  <polacek@redhat.com>
1656         PR c/69819
1657         * c-decl.c (finish_decl): Don't update the copy of the type of a
1658         different decl type.
1660 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
1662         PR objc/69844
1663         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1664         in id_kind reclassification.
1666 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
1668         PR c/69835
1669         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1671 2016-02-16  James Norris  <jnorris@codesourcery.com>
1673         PR c/64748
1674         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1676 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
1678         * c-decl.c (build_null_declspecs): Zero the entire struct.
1680         PR c/69522
1681         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
1682         callers changed.  If nested_p is true, use it to call
1683         finish_implicit_inits.
1684         * c-tree.h (finish_implicit_inits): Declare.
1685         * c-typeck.c (finish_implicit_inits): New function.  Move code
1686         from ...
1687         (push_init_level): ... here.
1688         (set_designator, process_init_element): Call finish_implicit_inits.
1690 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
1692         PR c/69768
1693         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1694         arguments for -Waddress warning.
1696 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
1698         PR c/69669
1699         * c-decl.c (finish_enum): When honoring mode attribute,
1700         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1702 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
1704         PR debug/69518
1705         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1706         all type variants, not just TYPE_MAIN_VARIANT.
1708 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
1710         PR debug/66869
1711         * c-decl.c (c_write_global_declarations_1): Warn with
1712         warn_unused_function if static prototype without definition
1713         is not C_DECL_USED.
1715 2016-01-27  Marek Polacek  <polacek@redhat.com>
1717         PR c/68062
1718         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1719         to unsigned, if needed.  Add -Wsign-compare warning.
1721 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
1723         PR tree-optimization/69483
1724         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1726 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1728         PR c/24293
1729         * c-tree.h (incomplete_record_decls): Declare.
1730         * c-parser.c (incomplete_record_decls): Define.
1731         (c_parser_translation_unit): Iterate through incomplete_record_decls and
1732         report error if any decl has zero size.
1733         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1734         or enum type to incomplete_record_decls.
1736 2016-01-14  Tom de Vries  <tom@codesourcery.com>
1738         PR tree-optimization/68773
1739         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1740         set force_output.
1742 2016-01-14  Marek Polacek  <polacek@redhat.com>
1744         PR c/69262
1745         * c-decl.c (grokdeclarator): Provide more information for invalid
1746         array declarations.
1748 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
1750         * c-parser.c (c_parser_unary_expression): For dereferences, build
1751         a combined location before calling build_indirect_ref, so that
1752         error reports cover the full range, manually updating the c_expr
1753         src_range.
1755 2016-01-06  Marek Polacek  <polacek@redhat.com>
1757         PR sanitizer/69099
1758         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
1759         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
1760         NULL.
1762 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1764         Update copyright years.
1766 2016-01-04  Marek Polacek  <polacek@redhat.com>
1768         PR c/68908
1769         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
1770         optimization to use __atomic_fetch_* built-in if possible.
1772 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
1774         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1775         into...
1776         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
1777         all users.
1779 2015-12-22  Marek Polacek  <polacek@redhat.com>
1781         PR c/69002
1782         * c-typeck.c (build_component_ref): Warn when acessing elements of
1783         atomic structures or unions.
1785 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
1787         * c-typeck.c: Include "gcc-rich-location.h".
1788         (build_binary_op): In the two places that call binary_op_error,
1789         create a gcc_rich_location and populate it with the location of
1790         the binary op and its two operands.
1792 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1794         * c-parser.c (c_parser_statement_after_labels): When calling
1795         c_finish_return, Use the return expression's location if it has
1796         one, falling back to the location of the first token within it.
1797         * c-typeck.c (c_finish_return): When issuing warnings about
1798         the incorrect presence/absence of a return value, issue a note
1799         showing the declaration of the function.
1801 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1803         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1804         to 4.
1805         (c_parser_peek_nth_token): New function.
1806         (c_parser_peek_conflict_marker): New function.
1807         (c_parser_error): Detect conflict markers and report them as such.
1809 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1811         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1812         to preserve range information for the primary expression
1813         in the call to c_parser_postfix_expression_after_primary.
1815 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
1817         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1818         expression location, falling back on the first token location,
1819         rather than always using the latter.
1821 2015-12-16  Marek Polacek  <polacek@redhat.com>
1823         PR c/64637
1824         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1825         available.
1827 2015-12-15  Marek Polacek  <polacek@redhat.com>
1829         PR c/68907
1830         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1831         artificial decl.
1833 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
1835         * c-parser.c (c_parser_alignof_expression): Capture location of
1836         closing parenthesis (if any), or of end of unary expression, and
1837         use it to build a src_range for the expression.
1839 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
1841         PR c/68757
1842         * c-parser.c (c_parser_get_builtin_args): Add
1843         "out_close_paren_loc" param, and write back to it.
1844         (c_parser_postfix_expression): Capture the closing
1845         parenthesis location for RID_CHOOSE_EXPR,
1846         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1847         RID_BUILTIN_SHUFFLE and use it to set the source range
1848         for such expressions; within RID_BUILTIN_COMPLEX set
1849         the underlying location.
1851 2015-12-07  Marek Polacek  <polacek@redhat.com>
1853         PR c/68668
1854         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1855         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1857 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
1859         * c-tree.h (c_build_va_arg): Adjust prototype.
1860         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1861         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1862         parameter, adjust throughout and issue an error if EXPR is a component
1863         with reverse storage order.
1865 2015-12-02  Jason Merrill  <jason@redhat.com>
1867         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1868         (c_fully_fold_internal, decl_constant_value_for_optimization):
1869         Move from c-common.c.
1870         * c-tree.h: Declare decl_constant_value_for_optimization.
1871         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1873 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
1875         PR c/68162
1876         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1877         following link from declarator to next declarator.  Track original
1878         qualified type and pass it to c_build_qualified_type.
1879         * c-typeck.c (c_build_qualified_type): Add arguments
1880         orig_qual_type and orig_qual_indirect.
1882 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
1884         * c-parser.c (c_parser_omp_clause_name)
1885         (c_parser_oacc_all_clauses): Alphabetical sorting.
1887 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
1889         PR c/68533
1890         * c-decl.c (get_parm_info): Use b->locus instead of input_location
1891         for diagnostics.
1893 2015-12-01  Julian Brown  <julian@codesourcery.com>
1894             Cesar Philippidis  <cesar@codesourcery.com>
1895             James Norris  <James_Norris@mentor.com>
1897         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1898         (c_parser_oacc_clause_use_device): New function.
1899         (c_parser_oacc_all_clauses): Add use_device support.
1900         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1901         (c_parser_oacc_host_data): New function.
1902         (c_parser_omp_construct): Add host_data support.
1903         * c-tree.h (c_finish_oacc_host_data): Add prototype.
1904         * c-typeck.c (c_finish_oacc_host_data): New function.
1905         (c_finish_omp_clauses): Add use_device support.
1907 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
1909         PR c/67106
1910         * c-decl.c: Set TYPE_PACKED in variants.
1912 2015-11-27  Martin Liska  <mliska@suse.cz>
1914         PR c++/68312
1915         * c-array-notation.c (fix_builtin_array_notation_fn):
1916         Use release_vec_vec instead of vec::release.
1917         (build_array_notation_expr): Likewise.
1918         (fix_conditional_array_notations_1): Likewise.
1919         (fix_array_notation_expr): Likewise.
1920         (fix_array_notation_call_expr): Likewise.
1922 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
1924         PR c/63326
1925         * c-parser.c (c_parser_compound_statement_nostart): If
1926         last_label is true, use pragma_stmt instead of pragma_compound
1927         as second c_parser_pragma argument.
1928         (c_parser_omp_ordered, c_parser_omp_target_update,
1929         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1930         false as second argument to c_parser_skip_to_pragma_eol after
1931         diagnosing standalone directives used in pragma_stmt context.
1933 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
1935         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1936         with "if (ENABLE_OFFLOADING)".
1938 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
1940         PR objc/68438
1941         * c-parser.c (c_parser_postfix_expression): Set up source ranges
1942         for various Objective-C constructs: Class.name syntax,
1943         @selector(), @protocol(), @encode(), and [] message syntax.
1945 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
1947         PR 62314
1948         * c-typeck.c (should_suggest_deref_p): New function.
1949         (build_component_ref): Special-case POINTER_TYPE when
1950         generating a "not a structure of union"  error message, and
1951         suggest a "->" rather than a ".", providing a fix-it hint.
1953 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
1955         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1956         candidate into a new function, find_closest_identifier.
1958 2015-11-19  Marek Polacek  <polacek@redhat.com>
1960         PR c/68412
1961         * c-typeck.c (parser_build_binary_op): Properly handle
1962         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1964 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
1966         * c-parser.c (set_c_expr_source_range): Bulletproof both
1967         overloaded implementations against NULL expr->value.
1968         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1969         values.
1970         (c_parser_unary_expression): Likewise when handling addresses of
1971         labels.
1972         (c_parser_postfix_expression): Likewise for statement expressions,
1973         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1974         __builtin_va_arg, and for __builtin_offset_of.
1975         (c_parser_postfix_expression_after_paren_type): Initialize expr's
1976         src_range using the range of the braced initializer.
1977         (c_parser_transaction_expression): Set src_range for "ret" to a
1978         sane pair of values.
1980 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
1982         * c-parser.c (c_finish_omp_declare_simd): Look for
1983         "simd" attribute as well. Update error message.
1985 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1987         * c-parser.c (c_parser_omp_declare_target): Adjust.
1989 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
1991         * c-typeck.c (c_finish_omp_clauses): Don't mark
1992         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1994 2015-11-14  Marek Polacek  <polacek@redhat.com>
1996         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1997         * c-typeck.c: Likewise.
1999 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2001         * c-decl.c (warn_defaults_to): Pass line_table to
2002         rich_location ctor.
2003         * c-errors.c (pedwarn_c99): Likewise.
2004         (pedwarn_c90): Likewise.
2005         * c-parser.c (set_c_expr_source_range): New functions.
2006         (c_token::get_range): New method.
2007         (c_token::get_finish): New method.
2008         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2009         based on the range from the start of the LHS to the end of the
2010         RHS.
2011         (c_parser_conditional_expression): Likewise, based on the range
2012         from the start of the cond.value to the end of exp2.value.
2013         (c_parser_binary_expression): Call set_c_expr_source_range on
2014         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2015         (c_parser_cast_expression): Call set_c_expr_source_range on ret
2016         based on the cast_loc through to the end of the expr.
2017         (c_parser_unary_expression): Likewise, based on the
2018         op_loc through to the end of op.
2019         (c_parser_sizeof_expression) Likewise, based on the start of the
2020         sizeof token through to either the closing paren or the end of
2021         expr.
2022         (c_parser_postfix_expression): Likewise, using the token range,
2023         or from the open paren through to the close paren for
2024         parenthesized expressions.
2025         (c_parser_postfix_expression_after_primary): Likewise, for
2026         various kinds of expression.
2027         * c-tree.h (struct c_expr): Add field "src_range".
2028         (c_expr::get_start): New method.
2029         (c_expr::get_finish): New method.
2030         (set_c_expr_source_range): New decls.
2031         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2032         on ret for prefix unary ops.
2033         (parser_build_binary_op): Likewise, running from the start of
2034         arg1.value through to the end of arg2.value.
2036 2015-11-13  Marek Polacek  <polacek@redhat.com>
2038         PR c/68320
2039         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2041 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2043         * c-typeck.c: Include spellcheck.h.
2044         (lookup_field_fuzzy_find_candidates): New function.
2045         (lookup_field_fuzzy): New function.
2046         (build_component_ref): If the field was not found, try using
2047         lookup_field_fuzzy and potentially offer a suggestion.
2049 2015-11-12  James Norris  <jnorris@codesourcery.com>
2050             Joseph Myers  <joseph@codesourcery.com>
2052         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2053         (c_parser_omp_clause_name): Handle 'device_resident' clause.
2054         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2055         and PRAGMA_OMP_CLAUSE_LINK.
2056         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2057         and PRAGMA_OACC_CLAUSE_LINK.
2058         (OACC_DECLARE_CLAUSE_MASK): New definition.
2059         (c_parser_oacc_declare): New function.
2061 2015-11-12  Marek Polacek  <polacek@redhat.com>
2063         PR c/67784
2064         * c-parser.c (c_parser_for_statement): Reclassify the token in
2065         a correct scope.
2067 2015-11-11  Marek Polacek  <polacek@redhat.com>
2069         PR c/68107
2070         PR c++/68266
2071         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
2072         checking the size of an array.
2074 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
2076         * c-array-notation.c: Remove unused header files.
2077         * c-aux-info.c: Likewise.
2078         * c-convert.c: Likewise.
2079         * c-decl.c: Likewise.
2080         * c-errors.c: Likewise.
2081         * c-lang.c: Likewise.
2082         * c-objc-common.c: Likewise.
2083         * c-parser.c: Likewise.
2084         * c-typeck.c: Likewise.
2085         * gccspec.c: Likewise.
2087 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
2088             Cesar Philippidis  <cesar@codesourcery.com>
2089             James Norris  <jnorris@codesourcery.com>
2090             Julian Brown  <julian@codesourcery.com>
2091             Nathan Sidwell  <nathan@codesourcery.com>
2093         c/
2094         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2095         routine arg.
2096         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2097         (c_parser_pragma): Parse 'acc routine'.
2098         (OACC_ROUTINE_CLAUSE_MARK): Define.
2099         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2101 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2103         PR debug/67192
2104         * c-typeck.c (c_finish_loop): For unconditional loops, set the
2105         location of the backward-goto to the start of the loop body.
2107 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2109         PR debug/67192
2110         * c-parser.c (c_parser_while_statement): Finish the loop before
2111         parsing ahead for misleading indentation.
2112         (c_parser_for_statement): Likewise.
2114 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
2116         * c-decl.c (finish_struct): If the structure has reverse storage
2117         order, rewrite the type of array fields with scalar component.  Call
2118         maybe_apply_pragma_scalar_storage_order on entry.
2119         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
2120         errors on bit-fields and reverse SSO here and not...
2121         (c_mark_addressable): ...here.
2122         (output_init_element): Adjust call to initializer_constant_valid_p.
2123         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2125 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
2127         * c-decl.c (warn_defaults_to): Update for change in signature
2128         of diagnostic_set_info.
2129         * c-errors.c (pedwarn_c99): Likewise.
2130         (pedwarn_c90): Likewise.
2131         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2132         for textinfo::set_location.
2134 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
2135             Thomas Schwinge  <thomas@codesourcery.com>
2136             James Norris  <jnorris@codesourcery.com>
2138         * c-parser.c (c_parser_omp_clause_name): Add support for
2139         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2140         (c_parser_omp_clause_default): Add is_oacc argument. Handle
2141         default(none) in OpenACC.
2142         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2143         arguments.
2144         (c_parser_oacc_clause_tile): New function.
2145         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2146         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2147         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2148         TILE}.
2149         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2150         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2151         FIRSTPRIVATE}.
2152         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2153         (c_parser_oacc_update): Update the error message for missing clauses.
2154         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2155         and OMP_CLAUSE_INDEPENDENT.
2157 2015-11-05  Marek Polacek  <polacek@redhat.com>
2159         PR c/68090
2160         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2161         deal with pre-evaluation on invalid types.
2163 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
2164             Ilya Verbin  <ilya.verbin@intel.com>
2166         * c-parser.c: Include context.h and gimple-expr.h.
2167         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2168         monotonic together with nonmonotonic.
2169         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
2170         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2171         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2172         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2173         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
2174         expressions on combined target teams before the target.
2175         (c_parser_omp_declare_target): If decl has "omp declare target" or
2176         "omp declare target link" attribute, and cgraph or varpool node already
2177         exists, then set corresponding flags.  Call c_finish_omp_clauses
2178         in the parenthesized extended-list syntax case.
2179         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2180         declare target.
2181         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2182         on OMP_CLAUSE_REDUCTION array sections.
2183         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2184         into the constant offset, or for variable low-bound using
2185         POINTER_PLUS_EXPR.  For structure element based array sections use
2186         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2187         (c_finish_omp_clauses): Drop generic_field_head, structure
2188         elements are now always mapped even as array section bases,
2189         diagnose same var in data sharing and mapping clauses.  Diagnose if
2190         linear step on declare simd is neither a constant nor a uniform
2191         parameter.  Look through POINTER_PLUS_EXPR for array section
2192         reductions.  Diagnose the same var or function appearing multiple
2193         times on the same directive.  Fix up wording for the to clause if t
2194         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
2195         modifier on kinds other than dynamic or guided or nonmonotonic
2196         modifier together with ordered clause.
2198 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
2199             Chung-Lin Tang  <cltang@codesourcery.com>
2201         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2203 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
2205         * c-array-notation.c: Reorder #include's and remove duplicates.
2206         * c-aux-info.c: Likewise.
2207         * c-convert.c: Likewise.
2208         * c-decl.c: Likewise.
2209         * c-errors.c: Likewise.
2210         * c-lang.c: Likewise.
2211         * c-objc-common.c: Likewise.
2212         * c-parser.c: Likewise.
2213         * c-typeck.c: Likewise.
2215 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
2217         PR debug/66068
2218         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2219         after calling build_qualified_type.
2221 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
2222             Thomas Schwinge  <thomas@codesourcery.com>
2223             James Norris  <jnorris@codesourcery.com>
2224             Joseph Myers  <joseph@codesourcery.com>
2225             Julian Brown  <julian@codesourcery.com>
2226             Bernd Schmidt  <bschmidt@redhat.com>
2228         * c-parser.c (c_parser_oacc_shape_clause): New.
2229         (c_parser_oacc_simple_clause): New.
2230         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2231         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2233 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
2234             James Norris  <jnorris@codesourcery.com>
2235             Cesar Philippidis  <cesar@codesourcery.com>
2237         PR c/64765
2238         PR c/64880
2239         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2240         parameters, and handle these.  Adjust all users.
2241         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2242         into...
2243         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
2244         all users.
2245         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2246         declare functions.
2247         (c_finish_omp_construct): Declare function.
2248         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2249         Merge functions into...
2250         (c_finish_omp_construct): ... this new function.
2252 2015-10-22  Richard Biener  <rguenther@suse.de>
2254         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2255         before folding a MINUS_EXPR.
2257 2015-10-21  Marek Polacek  <polacek@redhat.com>
2259         PR c/68024
2260         * c-decl.c (start_function): Warn about vararg functions without
2261         a prototype.
2263 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
2265         * c-typeck.c (build_conditional_expr): Use boolean vector
2266         type for vector comparison.
2267         (build_vec_cmp): New.
2268         (build_binary_op): Use build_vec_cmp for comparison.
2270 2015-10-20  Marek Polacek  <polacek@redhat.com>
2272         * c-parser.c (is_cilkplus_vector_p): Don't define here.
2274 2015-10-20  Marek Polacek  <polacek@redhat.com>
2276         PR c/67964
2277         * c-parser.c (c_parser_attributes): Break out of the loop if the
2278         token after an attribute isn't a comma.
2280 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
2281             Aldy Hernandez  <aldyh@redhat.com>
2283         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2284         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2285         (c_parser_omp_variable_list): Handle structure elements for
2286         map, to and from clauses.  Handle array sections in reduction
2287         clause.  Formatting fixes.
2288         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2289         if clause modifiers.
2290         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2291         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2292         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2293         c_parser_omp_clause_is_device_ptr): New functions.
2294         (c_parser_omp_clause_ordered): Parse optional parameter.
2295         (c_parser_omp_clause_reduction): Handle array reductions.
2296         (c_parser_omp_clause_schedule): Parse optional simd modifier.
2297         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2298         functions.
2299         (c_parser_omp_clause_linear): Parse linear clause modifiers.
2300         (c_parser_omp_clause_depend_sink): New function.
2301         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2302         (c_parser_omp_clause_map): Parse release/delete map kinds and
2303         optional always modifier.
2304         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2305         and c_finish_omp_clauses callers.
2306         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
2307         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2308         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2309         (OMP_CRITICAL_CLAUSE_MASK): Define.
2310         (c_parser_omp_critical): Parse critical clauses.
2311         (c_parser_omp_for_loop): Handle doacross loops, adjust
2312         c_finish_omp_for and c_finish_omp_clauses callers.
2313         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2314         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2315         (OMP_FOR_CLAUSE_MASK): Add linear clause.
2316         (c_parser_omp_for): Disallow ordered clause when combined with
2317         distribute.  Disallow linear clause when combined with distribute
2318         and not combined with simd.
2319         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2320         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2321         parse clauses and if depend clause is found, don't parse a body.
2322         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2323         Allow target parallel without for after it.
2324         (OMP_TASK_CLAUSE_MASK): Add priority clause.
2325         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2326         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2327         invalid kinds.
2328         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2329         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2330         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2331         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2332         functions.
2333         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2334         defaultmap and is_device_ptr clauses.
2335         (c_parser_omp_target): Parse target parallel and target simd.  Set
2336         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
2337         and target exit data.  Diagnose invalid map kinds.
2338         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2339         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2340         construct.
2341         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2342         &omp_priv.
2343         (OMP_TASKLOOP_CLAUSE_MASK): Define.
2344         (c_parser_omp_taskloop): New function.
2345         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2346         handle PRAGMA_OMP_TASKLOOP.
2347         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2348         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2349         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2350         Add IS_OMP argument, handle structure element bases, diagnose
2351         bitfields, pass IS_OMP recursively, diagnose known zero length
2352         array sections in depend clauses, handle array sections in reduction
2353         clause, diagnose negative length even for pointers.
2354         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2355         types, pass IS_OMP down to handle_omp_array_sections_1, handle
2356         array sections in reduction clause, set
2357         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2358         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2359         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2360         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2362 2015-10-06  Marek Polacek  <polacek@redhat.com>
2364         * c-parser.c (c_parser_statement_after_labels): Use
2365         protected_set_expr_location.
2366         (c_parser_omp_clause_num_gangs): Likewise.
2367         (c_parser_omp_clause_num_threads): Likewise.
2368         (c_parser_omp_clause_num_workers): Likewise.
2369         (c_parser_omp_clause_vector_length): Likewise.
2370         (c_parser_omp_clause_num_teams): Likewise.
2371         (c_parser_omp_clause_thread_limit): Likewise.
2372         * c-typeck.c (build_c_cast): Likewise.
2373         (c_cast_expr): Likewise.
2375 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
2377         * c-typeck.c (c_tree_equal): Use real_equal instead of
2378         REAL_VALUES_EQUAL.
2380 2015-10-04  Jason Merrill  <jason@redhat.com>
2382         * c-parser.c (c_lex_one_token): Handle @synchronized.
2383         * c-decl.c (match_builtin_function_types): A declaration of a built-in
2384         can change whether the function is transaction_safe.
2386 2015-10-02  Marek Polacek  <polacek@redhat.com>
2388         PR c/67730
2389         * c-typeck.c (convert_for_assignment): Use the expansion point
2390         location throughout.
2392 2015-10-02  Marek Polacek  <polacek@redhat.com>
2394         PR c/64249
2395         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2396         and pass it down to c_parser_if_statement.
2397         (c_parser_else_body): Add CHAIN parameter and pass it down to
2398         c_parser_statement_after_labels.
2399         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
2400         duplicated if-else-if conditions.
2402 2015-10-01  Marek Polacek  <polacek@redhat.com>
2404         * c-typeck.c (convert_for_assignment): Improve commentary.
2406 2015-09-30  Marek Polacek  <polacek@redhat.com>
2408         PR c/67730
2409         * c-typeck.c (c_finish_return): Use the expansion point location for
2410         certain "return with value" warnings.
2412 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2414         * c-parser.c (pragma_lex): Add loc argument.
2416 2015-09-15  Marek Polacek  <polacek@redhat.com>
2418         PR c/67580
2419         * c-decl.c (tag_exists_p): New function.
2420         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2421         struct/union/enum keywords are missing.
2422         * c-tree.h (tag_exists_p): Declare.
2424 2015-09-15  Marek Polacek  <polacek@redhat.com>
2426         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2427         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2428         Return NULL_TREE instead of 0.
2429         (lookup_name): Return NULL_TREE instead of 0.
2430         (lookup_name_in_scope): Likewise.
2431         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2432         (parser_xref_tag): Use false instead of 0.
2433         (start_struct): Use true instead of 1.
2434         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2436 2015-09-14  Marek Polacek  <polacek@redhat.com>
2438         * c-typeck.c (set_nonincremental_init_from_string): Use
2439         HOST_WIDE_INT_M1U when shifting a negative value.
2441 2015-09-09  Mark Wielaard  <mjw@redhat.com>
2443         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2444         parm against NULL.
2446 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
2448         PR c/67502
2449         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2450         into OMP_FOR_PRE_BODY rather than before the loop.
2452 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
2454         PR c/67501
2455         * c-parser.c (c_parser_oacc_all_clauses,
2456         c_parser_omp_all_clauses): Remove invalid clause from
2457         list of clauses even if parser->error is set.
2459         PR c/67500
2460         * c-parser.c (c_parser_omp_clause_aligned,
2461         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2462         test for errors.
2463         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2464         error_mark_node.
2466         PR c/67495
2467         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2468         instead of c_parser_unary_expression.  If the result is !lvalue_p,
2469         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2471 2015-09-04  Marek Polacek  <polacek@redhat.com>
2473         PR sanitizer/67279
2474         * c-typeck.c (build_binary_op): Don't instrument static initializers.
2476 2015-09-03  Martin Sebor  <msebor@redhat.com>
2478         PR c/66516
2479         * c-typeck.c (convert_arguments, parser_build_unary_op,
2480         build_conditional_expr, c_cast_expr, convert_for_assignment,
2481         build_binary_op, _objc_common_truthvalue_conversion): Call
2482         reject_gcc_builtin.
2483         (c_decl_implicit): Define.
2485 2015-09-02  Marek Polacek  <polacek@redhat.com>
2487         PR c/67432
2488         * c-parser.c (c_parser_enum_specifier): Give a better error for
2489         an empty enum.
2491 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
2493         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2495 2015-08-12  Marek Polacek  <polacek@redhat.com>
2497         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2498         LOC to it.
2500 2015-08-03  Marek Polacek  <polacek@redhat.com>
2502         PR c/67088
2503         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2504         Use it.
2505         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2507 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
2509         * c-parser.c (c_parser_if_body): Take token_indent_info
2510         argument. Call warn_for_misleading_indentation even when the
2511         body is a semicolon.  Extract token_indent_infos corresponding
2512         to the guard, body and next tokens.  Adjust call to
2513         warn_for_misleading_indentation accordingly.
2514         (c_parser_else_body): Likewise.
2515         (c_parser_if_statement): Likewise.
2516         (c_parser_while_statement): Likewise.
2517         (c_parser_for_statement): Likewise.
2519 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
2520             Manuel López-Ibáñez  <manu@gcc.gnu.org>
2522         * c-decl.c (get_parm_info): Remove static var. Update warning
2523         message.
2525 2015-07-27  Marek Polacek  <polacek@redhat.com>
2527         PR c++/66555
2528         PR c/54979
2529         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2531 2015-07-20  Marek Polacek  <polacek@redhat.com>
2533         PR c++/55095
2534         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2535         (build_binary_op): Warn about left shift overflows.
2537 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
2539         * c-array-notation.c: Adjust includes for flags.h changes.
2540         * c-objc-common.c: Likewise.
2542 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
2544         * c-array-notation.c: Adjust includes.
2545         * c-aux-info.c: Likewise.
2546         * c-convert.c: Likewise.
2547         * c-decl.c: Likewise.
2548         * c-errors.c: Likewise.
2549         * c-lang.c: Likewise.
2550         * c-objc-common.c: Likewise.
2551         * c-parser.c: Likewise.
2552         * c-typeck.c: Likewise.
2554 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2556         PR fortran/66605
2557         * c-decl.c (finish_function): Call do_warn_unused_parameter.
2559 2015-06-29  Marek Polacek  <polacek@redhat.com>
2561         PR c/66322
2562         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2563         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
2564         about -Wswitch-bool here.
2565         (do_case): Update c_add_case_label call.
2566         (c_finish_case): Update c_do_switch_warnings call.
2568 2015-06-27  Marek Polacek  <polacek@redhat.com>
2570         * c-typeck.c: Use VECTOR_TYPE_P throughout.
2572 2015-06-26  Marek Polacek  <polacek@redhat.com>
2574         * c-array-notation.c (fix_builtin_array_notation_fn): Use
2575         INDIRECT_REF_P.
2576         * c-typeck.c (array_to_pointer_conversion): Likewise.
2577         (build_unary_op): Likewise.
2578         (c_finish_return): Likewise.
2580 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
2582         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2583         * c-parser.c: Likewise.
2585 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
2587         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2588         instead of pointer_hash.
2589         (detect_field_duplicates): Likewise.
2591 2015-06-25  Marek Polacek  <polacek@redhat.com>
2593         * c-array-notation.c: Use VAR_P throughout.
2594         * c-decl.c: Likewise.
2595         * c-objc-common.c: Likewise.
2596         * c-parser.c: Likewise.
2597         * c-typeck.c: Likewise.
2599 2015-06-25  Marek Polacek  <polacek@redhat.com>
2601         * c-decl.c: Use is_global_var throughout.
2602         * c-parser.c: Likewise.
2603         * c-typeck.c: Likewise.
2605 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
2607         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2608         * c-aux-info.c: Likewise.
2609         * c-convert.c: Likewise.
2610         * c-decl.c: Likewise.
2611         * c-errors.c: Likewise.
2612         * c-lang.c: Likewise.
2613         * c-objc-common.c: Likewise.
2614         * c-parser.c: Likewise.
2615         * c-typeck.c: Likewise.
2617 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
2619         PR middle-end/66325
2620         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2621         variants.
2623 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
2625         * c-decl.c (pop_scope): Register the main translation unit
2626         through the new debug hook.
2628 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
2630         * c-array-notation.c : Adjust include files.
2631         * c-aux-info.c : Likewise.
2632         * c-convert.c : Likewise.
2633         * c-decl.c : Likewise.
2634         * c-errors.c : Likewise.
2635         * c-lang.c : Likewise.
2636         * c-lang.h : Likewise.
2637         * c-objc-common.c : Likewise.
2638         * c-parser.c : Likewise.
2639         * c-typeck.c : Likewise.
2641 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
2643         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2644         immediately clobber it.
2645         (c_write_global_declarations_1): Remove call to
2646         check_global_declaration_1.
2647         (c_write_global_declarations_2): Remove.
2648         (c_write_final_cleanups): Rename from c_write_global_declarations.
2649         Remove call to finalize_compilation_unit.
2650         Remove calls to debugging hooks.
2651         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2652         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2653         * c-tree.h: Remove c_write_global_declarations.
2655 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
2657         * c-array-notation.c: Adjust includes for restructured coretypes.h.
2658         * c-aux-info.c: Likewise.
2659         * c-convert.c: Likewise.
2660         * c-decl.c: Likewise.
2661         * c-errors.c: Likewise.
2662         * c-lang.c: Likewise.
2663         * c-objc-common.c: Likewise.
2664         * c-parser.c: Likewise.
2665         * c-typeck.c: Likewise.
2667 2015-06-04  Marek Polacek  <polacek@redhat.com>
2669         PR c/66341
2670         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2671         it is a lvalue.
2673 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2675         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2676         Warn for empty struct.
2677         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2679 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
2681         * c-decl.c (start_function): Call plugin before parsing.
2682         (finish_function): Call plugin after parsing.
2684 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2686         PR c/49551
2687         * c-decl.c (merge_decls): Merge DECL_COMMON.
2689 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
2691         * Make-lang.in (check_gcc_pallelize): Define.
2693 2015-05-22  Marek Polacek  <polacek@redhat.com>
2695         PR c/47043
2696         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2697         attributes.
2699 2015-05-21  Marek Polacek  <polacek@redhat.com>
2701         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2702         DECL_BUILT_IN.
2704 2015-05-20  Marek Polacek  <polacek@redhat.com>
2706         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2707         * c-typeck.c: Likewise.
2709 2015-05-19  Marek Polacek  <polacek@redhat.com>
2711         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2713 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
2715         PR middle-end/66199
2716         * c-parser.c (c_parser_omp_for_loop): Don't add
2717         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2718         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2719         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2720         constructs.
2722 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
2724         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
2725         swaps.
2727 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2729         PR fortran/44054
2730         * c-objc-common.c (c_tree_printer): Replace locus pointer with
2731         accessor function.
2733 2015-05-14  Marek Polacek  <polacek@redhat.com>
2735         PR c/66066
2736         PR c/66127
2737         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2738         rather than with 0.
2740 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
2742         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2743         to add a call to warn_for_misleading_indentation.
2744         (c_parser_else_body): Likewise, adding param "else_loc".
2745         (c_parser_if_statement): Check for misleading indentation.
2746         (c_parser_while_statement): Likewise.
2747         (c_parser_for_statement): Likewise.
2749 2015-05-08  Marek Polacek  <polacek@redhat.com>
2751         PR c/64918
2752         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2753         (output_init_element): Likewise.
2755 2015-05-07  Marek Polacek  <polacek@redhat.com>
2757         PR c/65179
2758         * c-typeck.c (build_binary_op): Warn when left shifting a negative
2759         value.
2761 2015-04-30  Marek Polacek  <polacek@redhat.com>
2763         * c-typeck.c (set_init_label): Call error_at instead of error and
2764         pass LOC to it.
2766         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
2767         the type of a decl.
2769         * c-typeck.c (c_build_va_arg): Clarify the error message.
2771 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2773         * c-parser.c (c_parser_oacc_enter_exit_data): Use
2774         OMP_STANDALONE_CLAUSES.
2776 2015-04-28  Marek Polacek  <polacek@redhat.com>
2778         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2780 2015-04-28  Marek Polacek  <polacek@redhat.com>
2782         PR c/65901
2783         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2785 2015-04-25  Marek Polacek  <polacek@redhat.com>
2787         PR c/52085
2788         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
2789         attribute.
2791 2015-04-23  Marek Polacek  <polacek@redhat.com>
2793         PR c/65345
2794         * c-decl.c (set_labels_context_r): New function.
2795         (store_parm_decls): Call it via walk_tree_without_duplicates.
2796         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2797         instead of create_tmp_var.  Build TARGET_EXPR instead of
2798         COMPOUND_EXPR.
2799         (build_atomic_assign): Use create_tmp_var_raw instead of
2800         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
2802 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2804         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2805         (c_parser_omp_target_update): Add missed %> to error_at ().
2807 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
2809         PR target/55143
2810         * c-decl.c (c_default_pointer_mode): Remove definition.
2811         * c-tree.h (c_default_pointer_mode): Remove declaration.
2813 2015-03-27  Tobias Burnus  <burnus@net-b.de>
2815         PR c/65586
2816         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2817         error out.
2818         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2819         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2820         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2822 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
2824         * c-decl.c (c_decl_attributes): Also add "omp declare target"
2825         attribute for DECL_EXTERNAL VAR_DECLs.
2827 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
2829         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2830         argument.
2832 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2834         PR c/65120
2835         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2836         before preparing arguments to warn_logical_not_parentheses.
2838 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
2840         PR c/65120
2841         * c-typeck.c (parser_build_binary_op): Don't warn for
2842         !!x == y or !b == y where b is _Bool.
2844 2015-03-09  Marek Polacek  <polacek@redhat.com>
2846         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2847         * c-decl.c (grokdeclarator): Likewise.
2848         * c-typeck.c (build_binary_op): Likewise.
2850 2015-02-27  Marek Polacek  <polacek@redhat.com>
2852         PR c/65228
2853         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2855 2015-02-14  Marek Polacek  <polacek@redhat.com>
2857         PR c/64768
2858         * c-decl.c (grokdeclarator): Set the range of a flexible array member
2859         declared through a typedef name.
2861 2015-02-13  Marek Polacek  <polacek@redhat.com>
2863         PR c/65050
2864         * c-decl.c (grokdeclarator): Print also the type when giving
2865         the error message about array's incomplete element type.
2867 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
2869         PR c/64824
2870         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2871         check in the POP macro.
2873 2015-02-09  Marek Polacek  <polacek@redhat.com>
2875         PR c/64856
2876         * c-typeck.c (process_init_element): Don't always wrap
2877         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2878         initializing a range of elements.
2880 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2882         PR c/64824
2883         PR c/64868
2884         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2886 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
2888         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2889         processing enum declaration.
2891 2015-01-29  Marek Polacek  <polacek@redhat.com>
2893         PR c/64709
2894         * c-typeck.c (pop_init_level): If constructor_elements has
2895         exactly one element with integer_zerop value, set constructor_zeroinit
2896         to 1.  Remove braces around warning_init call.
2898 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
2900         PR c/64766
2901         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2902         of FUNCTION_DECLs with error_mark_node.
2904 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
2906         PR c/64778
2907         * c-typeck.c (convert_arguments): Return -1 if there are
2908         error_args, even if we've diagnosed too many arguments.
2910 2015-01-21  Richard Biener  <rguenther@suse.de>
2912         PR middle-end/64313
2913         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2914         for builtins the user declared correctly.
2916 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2917             Bernd Schmidt  <bernds@codesourcery.com>
2918             Cesar Philippidis  <cesar@codesourcery.com>
2919             James Norris  <jnorris@codesourcery.com>
2920             Jakub Jelinek  <jakub@redhat.com>
2921             Ilmir Usmanov  <i.usmanov@samsung.com>
2923         * c-parser.c: Include "gomp-constants.h".
2924         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2925         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2926         Use OMP_CLAUSE_SET_MAP_KIND.
2927         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2928         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2929         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2930         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2931         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2932         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2933         "copyout", "create", "delete", "deviceptr", "gang", "host",
2934         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2935         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2936         "present_or_create", "pcreate", "seq", "self", "vector",
2937         "vector_length", "wait", "worker".
2938         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2939         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2940         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2941         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2942         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2943         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2944         (c_parser_oacc_data_clause_deviceptr)
2945         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2946         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2947         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2948         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2949         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2950         (c_parser_oacc_parallel, c_parser_oacc_update)
2951         (c_parser_oacc_wait): New functions.
2952         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2953         (c_finish_oacc_data): New prototypes.
2954         * c-typeck.c: Include "gomp-constants.h".
2955         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2956         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2957         OMP_CLAUSE_SET_MAP_KIND.
2958         (c_finish_oacc_parallel, c_finish_oacc_kernels)
2959         (c_finish_oacc_data): New functions.
2960         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2961         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2962         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2963         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2964         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2965         GOMP_MAP_FORCE_DEVICEPTR.
2967 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2969         * c-array-notation.c: Include hash-set.h, machmode.h,
2970         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2971         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2972         * c-aux-info.c: Ditto.
2973         * c-convert.c: Ditto.
2974         * c-decl.c: Ditto.
2975         * c-errors.c: Ditto.
2976         * c-lang.c: Dittoxs.
2977         * c-objc-common.c: Ditto.
2978         * c-parser.c: Ditto.
2979         * c-typeck.c: Include hash-set.h, machmode.h,
2980         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2981         fold-const.h, wide-int.h, inchash.h, real.h and
2982         fixed-value.h due to flattening of tree.h.
2984 2015-01-07  Marek Polacek  <polacek@redhat.com>
2986         PR c/64417
2987         * c-typeck.c (process_init_element): Disallow initialization of
2988         a flexible array member with a string constant if the structure
2989         is in an array.
2991 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2993         PR sanitizer/64344
2994         * c-typeck.c (convert_for_assignment, c_finish_return): For
2995         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2996         types also set in_late_binary_op around convert call.
2997         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2998         to integral type casts, if not in_late_binary_op, pass c_fully_fold
2999         result on expr as last argument to ubsan_instrument_float_cast,
3000         if in_late_binary_op, don't use c_save_expr but save_expr.
3002         Update copyright years.
3004 2015-01-05  Marek Polacek  <polacek@redhat.com>
3006         PR c/64423
3007         * c-typeck.c (build_array_ref): Pass loc down to
3008         warn_array_subscript_with_type_char.
3010 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
3012         * c-typeck.c: New behavious for pointers to arrays with qualifiers
3013         (common-pointer-type): For pointers to arrays take qualifiers from
3014         element type.
3015         (build_conditional_expr): Add warnings for lost qualifiers.
3016         (comp-target-types): Allow pointers to arrays with different qualifiers.
3017         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3018         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3019         to PEDWARN_FOR_QUALIFIERS.
3021 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
3023         PR sanitizer/64289
3024         * c-convert.c: Include ubsan.h.
3025         (convert): For real -> integral casts and
3026         -fsanitize=float-cast-overflow don't call convert_to_integer, but
3027         instead instrument the float cast directly.
3029 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
3031         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3032         c_finish_stmt_expr): Remove NULL last argument from
3033         create_tmp_var_raw and create_tmp_var calls.
3034         * c-array-notation.c (fix_builtin_array_notation_fn,
3035         build_array_notation_expr, fix_conditional_array_notations_1,
3036         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3038 2014-11-28  Marek Polacek  <polacek@redhat.com>
3040         PR c/63862
3041         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3042         convert the right operand to integer type.
3044 2014-11-25  Marek Polacek  <polacek@redhat.com>
3046         PR c/63877
3047         * c-decl.c (start_function): Disable -Wmissing-declarations warning
3048         for inline functions.
3050 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
3052         PR target/63764
3053         * c-typeck.c (build_array_ref): Adjust
3054         convert_vector_to_pointer_for_subscript caller.  If it returns true,
3055         call non_lvalue_loc on the result.
3057 2014-11-11  Richard Biener  <rguenther@suse.de>
3059         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3060         to true.
3062 2014-11-10  Andi Kleen  <ak@linux.intel.com>
3064         PR c/60804
3065         * c-parser.c (c_parser_statement_after_labels): Call
3066         check_no_cilk.
3067         (c_parser_if_statement): Dito.
3068         (c_parser_switch_statement): Dito.
3069         (c_parser_while_statement): Dito.
3070         (c_parser_do_statement): Dito.
3071         (c_parser_for_statement): Dito.
3072         * c-typeck.c (c_finish_loop): Dito.
3074 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
3076         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3077         OPT_Wshift_count_overflow in the warnings.
3079 2014-10-30  Marek Polacek  <polacek@redhat.com>
3081         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3082         print the stripped version as well, if they're not the same.
3084 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3086         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3087         machine_mode.
3089 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
3091         * c-decl.c: Adjust include files.
3092         * c-parser.c: Ditto.
3094 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
3095             Tom Tromey  <tromey@redhat.com>
3097         * c-tree.h (enum c_oracle_request): New.
3098         (c_binding_oracle_function): New typedef.
3099         (c_binding_oracle, c_pushtag, c_bind): Declare.
3100         * c-decl.c (c_binding_oracle): New global.
3101         (I_SYMBOL_CHECKED): New macro.
3102         (i_symbol_binding): New function.
3103         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3104         (I_TAG_CHECKED): New macro.
3105         (i_tag_binding): New function.
3106         (I_TAG_BINDING, I_TAG_DECL): Redefine.
3107         (I_LABEL_CHECKED): New macro.
3108         (i_label_binding): New function.
3109         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3110         (c_print_identifier): Save and restore c_binding_oracle.
3111         (c_pushtag, c_bind): New functions.
3113 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
3115         * c-typeck.c: Adjust include files.
3117 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3119         PR c++/53061
3120         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3121         initialization here...
3122         (c_initialize_diagnostics): ... but here. Set defaults after
3123         building pretty-printer.
3125 2014-10-23  Marek Polacek  <polacek@redhat.com>
3127         PR c/63626
3128         * c-decl.c (pop_scope): Don't print warning in external_scope.
3130 2014-10-19  Marek Polacek  <polacek@redhat.com>
3132         PR c/63567
3133         * c-typeck.c (output_init_element): Allow initializing objects with
3134         static storage duration with compound literals even in C99 and add
3135         pedwarn for it.
3137 2014-10-17  Marek Polacek  <polacek@redhat.com>
3139         PR c/63567
3140         * c-typeck.c (digest_init): Allow initializing objects with static
3141         storage duration with compound literals even in C99 and add pedwarn
3142         for it.
3144 2014-10-17  Marek Polacek  <polacek@redhat.com>
3146         PR c/63543
3147         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3148         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3149         error multiple times.  Print the type.
3151 2014-10-17  Marek Polacek  <polacek@redhat.com>
3153         PR c/63549
3154         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3155         type.
3157 2014-10-17  Marek Polacek  <polacek@redhat.com>
3159         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3160         (start_function): Use OPT_Wimplicit_int instead of 0.
3161         (store_parm_decls_oldstyle): Likewise.
3163 2014-10-17  Alan Modra  <amodra@gmail.com>
3165         PR middle-end/61848
3166         * c-decl.c (merge_decls): Don't merge section name or tls model
3167         to newdecl symtab node, instead merge to olddecl.  Override
3168         existing olddecl section name.  Set tls_model for all thread-local
3169         vars, not just OMP thread-private ones.  Remove incorrect comment.
3171 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
3173         * c-decl.c: Adjust include files.
3175 2014-10-14  DJ Delorie  <dj@redhat.com>
3177         * c-parser.c (c_parse_init): Add RID entries for each __intN.
3178         (c_token_starts_typename): Check all __intN, not just __int128.
3179         (c_token_starts_declspecs): Likewise.
3180         (c_parser_declspecs): Likewise.
3181         (c_parser_attribute_any_word): Likewise.
3182         (c_parser_objc_selector): Likewise.
3183         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3184         (struct c_declspecs): Add int_n_idx field to record *which* __intN
3185         is specified.
3186         * c-decl.c (declspecs_add_type): Check for all __intN, not just
3187         __int128.
3188         (finish_declspecs): Likewise.
3190 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
3192         * c-parser.c (c_parser_all_labels): New function to replace
3193         the duplicate code.
3194         (c_parser_statement): Call the new function.
3196 2014-10-09  Marek Polacek  <polacek@redhat.com>
3198         PR c/63480
3199         * c-typeck.c (pop_init_level): Don't warn about initializing
3200         with { }.
3202 2014-10-07  Marek Polacek  <polacek@redhat.com>
3204         PR c/59717
3205         * c-decl.c (header_for_builtin_fn): New function.
3206         (implicitly_declare): Suggest which header to include.
3208 2014-10-07  Marek Polacek  <polacek@redhat.com>
3210         * c-convert.c (convert): Use error_operand_p.
3211         * c-typeck.c (require_complete_type): Likewise.
3212         (really_atomic_lvalue): Likewise.
3213         (digest_init): Likewise.
3214         (handle_omp_array_sections_1): Likewise.
3216 2014-10-03  Marek Polacek  <polacek@redhat.com>
3218         PR c/63453
3219         * c-decl.c (pop_scope): Don't warn about "inline function declared
3220         but never defined" for functions marked with gnu_inline attribute.
3222 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
3224         PR c++/63249
3225         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3226         on low_bound and length.
3228 2014-09-24  Marek Polacek  <polacek@redhat.com>
3230         PR c/61405
3231         PR c/53874
3232         * c-parser.c: Don't define CPP_KEYWORD.
3233         (c_parser_switch_statement): Pass original type to c_finish_case.
3234         * c-tree.h (c_finish_case): Update declaration.
3235         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
3236         conditionally to c_do_switch_warnings.
3238 2014-09-03  Marek Polacek  <polacek@redhat.com>
3240         PR c/62024
3241         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3242         conversions.
3244 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
3245             Balaji V. Iyer  <balaji.v.iyer@intel.com>
3246             Igor Zamyatin  <igor.zamyatin@intel.com>
3248         * c-parser.c (c_parser_cilk_for): New function.
3249         (c_parser_cilk_grainsize): Likewise.
3250         (c_get_temp_regvar): Likewise.
3251         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3252         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3253         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3254         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3255         case.
3257 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
3259         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3260         with using HOST_WIDE_INT without truncation to 'int'
3262 2014-08-22  Marek Polacek  <polacek@redhat.com>
3264         PR c++/62199
3265         * c-typeck.c (parser_build_binary_op): Adjust call to
3266         warn_logical_not_parentheses.
3268 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
3270         PR other/62008
3271         * c-parser.c (c_parser_array_notation): Check for correct
3272         type of an array added.
3274 2014-08-19  Marek Polacek  <polacek@redhat.com>
3276         PR c++/62153
3277         * c-typeck.c (build_binary_op): If either operand of a comparison
3278         is a boolean expression, call maybe_warn_bool_compare.
3280 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
3282         PR c/45584
3283         * c-typeck.c (build_c_cast): Do a conversion even when the
3284         TYPE_MAIN_VARIANTs are the same.
3286 2014-08-19  Marek Polacek  <polacek@redhat.com>
3288         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3289         pedwarn_c99 instead of pedwarn.
3290         (grokfield): Likewise.
3291         (warn_defaults_to): New function.
3292         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3293         Unconditionally call pedwarn_c99 instead of pedwarn.
3294         (start_function): Call warn_defaults_to instead of pedwarn_c99.
3295         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3296         check flag_isoc11 before.
3297         * c-errors.c (pedwarn_c99): Change the return type to bool.
3298         Handle -Wc99-c11-compat.
3299         * c-parser.c (disable_extension_diagnostics): Handle
3300         warn_c99_c11_compat.
3301         (restore_extension_diagnostics): Likewise.
3302         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3303         instead of pedwarn, don't check flag_isoc11 before.
3304         (c_parser_declspecs): Likewise.
3305         (c_parser_alignas_specifier): Likewise.
3306         (c_parser_alignof_expression): Likewise.
3307         (c_parser_generic_selection): Likewise.
3308         * c-tree.h (pedwarn_c99): Update declaration.
3309         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3310         of pedwarn_c99.
3312 2014-08-19  Marek Polacek  <polacek@redhat.com>
3314         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3315         to pedwarn_c90.
3316         * c-errors.c: Include "opts.h".
3317         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3318         * c-parser.c (disable_extension_diagnostics): Handle negative value
3319         of warn_c90_c99_compat, too.
3320         (restore_extension_diagnostics): Likewise.
3321         (c_parser_compound_statement_nostart): Pass
3322         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3324 2014-08-12  Marek Polacek  <polacek@redhat.com>
3326         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3327         Add pedwarn.
3328         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3329         Likewise.
3330         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3332 2014-08-10  Marek Polacek  <polacek@redhat.com>
3334         PR c/51849
3335         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3336         Call pedwarn_c90 instead of pedwarn.
3337         (check_bitfield_type_and_width): Likewise.
3338         (declspecs_add_qual): Likewise.
3339         (declspecs_add_type): Likewise.
3340         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3341         Adjust to only call pedwarn_c90.
3342         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
3343         pedwarn_c90 instead of pedwarn.
3344         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3345         * c-parser.c (disable_extension_diagnostics): Handle
3346         warn_c90_c99_compat.
3347         (restore_extension_diagnostics): Likewise.
3348         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
3349         pedwarn_c90 instead of pedwarn.
3350         (c_parser_initelt): Likewise.
3351         (c_parser_postfix_expression): Likewise.
3352         (c_parser_postfix_expression_after_paren_type): Likewise.
3353         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3354         * c-tree.h: Fix formatting.
3355         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
3356         pedwarn_c90 instead of pedwarn.
3358 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
3360         * c-typeck.c: Remove include of pointer-set.h.
3362 2014-08-07  Marek Polacek  <polacek@redhat.com>
3364         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3366 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3368         * c-typeck.c: Use hash_map instead of pointer_map.
3370 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3372         * c-decl.c: Use hash_set instead of pointer_set.
3374 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
3376         PR middle-end/61455
3377         * c-array-notation.c (expand_array_notations): Handling
3378         of DECL_EXPR added.
3380 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
3382         PR c++/60517
3383         * c-typeck.c (c_finish_return): Return 0 instead of the address of
3384         a local variable.
3386 2014-07-30  Tom Tromey  <tromey@redhat.com>
3388         * c-typeck.c (struct constructor_stack) <designator_depth>: New
3389         field.
3390         (really_start_incremental_init, push_init_level): Initialize
3391         designator_depth.
3392         (pop_init_level): Set global designator_depth.
3393         (process_init_element): Check for designated_init attribute.
3395 2014-07-20  Marek Polacek  <polacek@redhat.com>
3397         PR c/61852
3398         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
3399         (implicitly_declare): Pass location to implicit_decl_warning.
3401 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
3403         PR middle-end/61294
3404         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3405         If non-NULL, call c_parser_check_literal_zero.
3406         (c_parser_check_literal_zero): New function.
3407         (c_parser_postfix_expression_after_primary): Adjust
3408         c_parser_expr_list caller, handle -Wmemset-transposed-args.
3410 2014-07-06  Marek Polacek  <polacek@redhat.com>
3412         PR c/6940
3413         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3414         * c-tree.h (C_ARRAY_PARAMETER): Define.
3415         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3416         function parameter.
3418 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
3419             Chen Gang  <gang.chen.5i5j@gmail.com>
3421         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3422         releasing symbol.
3424 2014-07-01  Marek Polacek  <polacek@redhat.com>
3426         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3427         instead of 0 to WARN_FOR_ASSIGNMENT.
3429 2014-07-01  Marek Polacek  <polacek@redhat.com>
3431         PR c/58286
3432         * c-typeck.c (convert_for_assignment): Pass
3433         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3435 2014-06-30  Marek Polacek  <polacek@redhat.com>
3437         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3438         has no_sanitize_undefined attribute.
3440 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
3442         PR middle-end/57541
3443         * c-array-notation.c (fix_builtin_array_notation_fn):
3444         Check for 0 arguments in builtin call. Check that bultin argument is
3445         correct.
3446         * c-parser.c (c_parser_array_notation): Check for incorrect initial
3447         index.
3449 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3451         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3452         qualifiers in __auto_type for atomic types.
3453         (c_parser_typeof_specifier): Discard all type qualifiers in
3454         __typeof__ for atomic types.
3456 2014-06-25  Marek Polacek  <polacek@redhat.com>
3458         PR c/61162
3459         * c-parser.c (c_parser_statement_after_labels): Pass the location of
3460         the return expression to c_finish_return.
3462 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
3464         * c-typeck.c (c_finish_omp_clauses): Make sure
3465         OMP_CLAUSE_LINEAR_STEP has correct type.
3467 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
3469         * c-decl.c: Adjust.
3471 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
3473         * c-parser.c (c_parser_omp_for_loop): For
3474         #pragma omp parallel for simd move lastprivate clause from parallel
3475         to for rather than simd.
3477 2014-06-23  Marek Polacek  <polacek@redhat.com>
3479         * c-typeck.c (parser_build_binary_op): Don't call
3480         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3482 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
3484         * c-parser.c (c_parser_omp_threadprivate): Likewise.
3485         * c-decl.c (merge_decls): Likewise.
3487 2014-06-09  Marek Polacek  <polacek@redhat.com>
3489         PR c/36446
3490         * c-typeck.c (error_init): Call inform instead of error_at.
3491         (pedwarn_init): Call inform instead of pedwarn.
3492         (warning_init): Call inform instead of warning_at.
3494 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
3496         * c-decl.c (merge_decls): Use set_decl_section_name.
3497         (duplicate_decls): Remove node if it exists.
3499 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
3501         PR c/53119
3502         * c-typeck.c (push_init_level, process_init_element,
3503         pop_init_level): Correct check for zero initialization, move
3504         missing brace warning to respect zero initialization.
3506 2014-06-05  Marek Polacek  <polacek@redhat.com>
3508         PR c/56724
3509         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3511 2014-06-05  Marek Polacek  <polacek@redhat.com>
3513         PR c/49706
3514         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3515         on the left hand side operand of a comparison. 
3517 2014-06-05  Marek Polacek  <polacek@redhat.com>
3519         PR c/48062
3520         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3521         Print note only if the warning was printed.
3523 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
3525         PR c/58942
3526         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3527         with a pointer.
3529 2014-06-03  Marek Polacek  <polacek@redhat.com>
3531         PR c/60439
3532         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3533         c_start_case.
3534         * c-tree.h (c_start_case): Update.
3535         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
3536         switch condition has boolean value.
3538 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
3540         * c-decl.c: Include builtins.h.
3541         * c-parser.c: Likewise.
3543 2014-05-27  Marek Polacek  <polacek@redhat.com>
3545         PR c/56724
3546         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
3547         error and warning calls to error_at and warning_at.  Pass location of
3548         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
3549         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3550         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
3552 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
3554         PR c/61191
3555         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3556         function parameters.
3558 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
3560         * c-decl.c (merge_decls): Preserve symtab node pointers.
3561         (duplicate_decls): Free new decl.
3563 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
3565         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3566         initialization.
3568         * c-parser.c (c_parser_omp_target): Return bool values.
3570 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
3572         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3573         num_teams_loc variable to num_thread_limit_loc.
3575 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
3577         * c-array-notation.c (expand_array_notations): Use void_node
3578         instead of void_zero_node.
3580 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
3582         * c-decl.c (finish_struct): Adjust.
3583         (finish_enum): Likewise.
3584         (bind): Adjust.
3585         (record_inline_static): Likewise.
3586         (push_scope): Likewise.
3587         (make_label): Likewise.
3588         (lookup_label_for_goto): Likewise.
3589         (finish_struct): Likewise.
3590         (finish_enum): Likewise.
3591         (store_parm_decls): Likewise.
3592         (c_push_function_context): Likewise.
3593         * c-lang.h: Remove usage of variable_size gty attribute.
3594         * c-parser.c (c_parse_init): Adjust.
3595         (c_parse_file): Likewise.
3597 2014-05-13  Marek Polacek  <polacek@redhat.com>
3599         PR c/61162
3600         * c-typeck.c (convert_for_assignment): Pass location to
3601         WARN_FOR_ASSIGNMENT instead of input_location.
3603 2014-05-10  Marek Polacek  <polacek@redhat.com>
3605         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3606         maybe_warn_string_init.
3607         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3608         maybe_warn_string_init.
3609         * c-tree.h (maybe_warn_string_init): Update declaration.
3610         * c-typeck.c (maybe_warn_string_init): Add location parameter.
3611         Call pedwarn_init with loc instead of with input_location.
3612         (digest_init): Pass init_loc to maybe_warn_string_init.
3613         (pop_init_level): Call pedwarn_init with loc instead of with
3614         input_location.
3615         (set_init_index): Likewise.
3616         (process_init_element): Likewise.
3618 2014-05-09  Marek Polacek  <polacek@redhat.com>
3620         PR c/61096
3621         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3622         (c_parser_initelt): Pass location to set_init_label.  Pass array index
3623         location to set_init_index.
3624         * c-tree.h (push_init_level): Update declaration.
3625         (pop_init_level): Likewise.
3626         (set_init_index): Likewise.
3627         (set_init_label): Likewise.
3628         * c-typeck.c (error_init): Add location parameter.  Call error_at
3629         instead of error.
3630         (digest_init): Pass init_loc to error_init.
3631         (really_start_incremental_init):
3632         (push_init_level): Add location parameter.  Pass loc to pop_init_level
3633         and error_init.
3634         (pop_init_level): Likewise.
3635         (set_designator): Add location parameter.  Pass loc to pop_init_level,
3636         push_init_level, and error_init.
3637         (set_init_index): Add location parameter.  Pass loc to error_init and
3638         set_designator.
3639         (set_init_label): Likewise.
3640         (output_init_element): Pass loc to error_init.
3641         (process_init_element): Pass loc to error_init, pop_init_level,
3642         pedwarn_init, and push_init_level.
3644 2014-05-09  Marek Polacek  <polacek@redhat.com>
3646         PR c/50459
3647         * c-parser.c (c_parser_attributes): Parse the arguments as an
3648         expression-list if the attribute takes identifier.
3650 2014-05-08  Marek Polacek  <polacek@redhat.com>
3652         PR c/61053
3653         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3654         TYPE_ALIGN_UNIT.
3656 2014-05-08  Marek Polacek  <polacek@redhat.com>
3658         PR c/61077
3659         * c-decl.c (start_function): Warn for _Atomic-qualified return type
3660         of main.
3662 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
3663             Mike Stump  <mikestump@comcast.net>
3664             Richard Sandiford  <rdsandiford@googlemail.com>
3666         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3667         (finish_enum): Use wide-int interfaces.
3668         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3669         * c-typeck.c (build_c_cast): Likewise.
3670         (set_nonincremental_init_from_string): Likewise.
3671         (c_tree_equal): Likewise.
3673 2014-05-02  Marek Polacek  <polacek@redhat.com>
3675         PR c/25801
3676         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
3677         Return size_one_node when the type is not complete.
3678         (pointer_diff): Remove comment.
3679         (build_unary_op): Improve error messages.
3681 2014-05-02  Marek Polacek  <polacek@redhat.com>
3683         * c-typeck.c (c_finish_return): Separate warning_at calls.
3685 2014-05-02  Marek Polacek  <polacek@redhat.com>
3687         * c-tree.h (error_init): Remove declaration.
3688         (pedwarn_init): Likewise.
3689         * c-typeck.c (error_init): Make static and move above.
3690         (pedwarn_init): Likewise.
3691         (warning_init): Move above.
3692         (maybe_warn_string_init): Likewise.
3694 2014-05-01  Jeff Law  <law@redhat.com>
3696         Revert:
3698         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3699         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3700         avoid goto.
3702 2014-05-02  Marek Polacek  <polacek@redhat.com>
3704         PR c/60784
3705         * c-typeck.c (push_init_level): Set constructor_designated to
3706         p->designated for structures.
3708 2014-05-01  Marek Polacek  <polacek@redhat.com>
3710         PR c/60915
3711         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3712         function-definition has an attribute after the declarator.
3714 2014-05-01  Marek Polacek  <polacek@redhat.com>
3716         PR c/60257
3717         * c-typeck.c (warning_init): Add location_t parameter.  Call
3718         warning_at instead of warning.
3719         (push_init_level): Pass input_location to warning_init.
3720         (add_pending_init): Add location_t parameter.  Pass loc to
3721         warning_init.
3722         (set_nonincremental_init): Pass input_location to add_pending_init.
3723         (set_nonincremental_init_from_string): Likewise.
3724         (output_init_element): Pass loc to warning_init and to
3725         add_pending_init.
3727 2014-05-01  Marek Polacek  <polacek@redhat.com>
3729         PR c/43395
3730         * c-typeck.c (c_finish_return): Distinguish between label and variable
3731         when warning about returning local address.
3733 2014-05-01  Marek Polacek  <polacek@redhat.com>
3735         PR c/29467
3736         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3737         in C89 mode.
3739 2014-05-01  Marek Polacek  <polacek@redhat.com>
3741         PR c/43245
3742         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3743         instead of 0 to WARN_FOR_QUALIFIERS.
3745 2014-05-01  Marek Polacek  <polacek@redhat.com>
3747         PR c/56989
3748         * c-typeck.c (default_conversion): Use better location for
3749         error call.
3751 2014-04-30  Marek Polacek  <polacek@redhat.com>
3753         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3754         also when SANITIZE_FLOAT_DIVIDE is on.
3756 2014-04-30  Marek Polacek  <polacek@redhat.com>
3758         PR c/60139
3759         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3760         and pedwarn_init.  Use loc insted of input_location.
3762 2014-04-30  Marek Polacek  <polacek@redhat.com>
3764         PR c/60351
3765         * c-typeck.c (build_binary_op): Use location when warning about
3766         shift count.
3768 2014-04-25  Marek Polacek  <polacek@redhat.com>
3770         PR c/18079
3771         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3772         always_inline/noinline and hot/cold attributes.
3774 2014-04-25  Marek Polacek  <polacek@redhat.com>
3776         PR c/60114
3777         * c-parser.c (c_parser_initelt): Pass input_location to
3778         process_init_element.
3779         (c_parser_initval): Pass loc to process_init_element.
3780         * c-tree.h (process_init_element): Adjust declaration.
3781         * c-typeck.c (push_init_level): Pass input_location to
3782         process_init_element.
3783         (pop_init_level): Likewise.
3784         (set_designator): Likewise.
3785         (output_init_element): Add location_t parameter.  Pass loc to
3786         digest_init.
3787         (output_pending_init_elements): Pass input_location to
3788         output_init_element.
3789         (process_init_element): Add location_t parameter.  Pass loc to
3790         output_init_element.
3792 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
3794         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3795         atomic-clause, allow comma in between atomic-clause and
3796         seq_cst.
3798 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
3800         PR c/59073
3801         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3802         fails, don't set OM_PARALLEL_COMBINED and return NULL.
3804 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
3806         PR middle-end/60469
3807         * c-array-notation.c (fix_builtin_array_notation_fn): Use
3808         create_tmp_var instead build_decl for creating temps.
3809         (build_array_notation_expr): Likewise.
3810         (fix_conditional_array_notations_1): Likewise.
3811         (fix_array_notation_expr): Likewise.
3812         (fix_array_notation_call_expr): Likewise.
3814 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
3816         PR c++/60689
3817         * c-tree.h (c_build_function_call_vec): New prototype.
3818         * c-typeck.c (build_function_call_vec): Don't call
3819         resolve_overloaded_builtin here.
3820         (c_build_function_call_vec): New wrapper function around
3821         build_function_call_vec.  Call resolve_overloaded_builtin here.
3822         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3823         Call c_build_function_call_vec instead of build_function_call_vec.
3824         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3825         * c-decl.c (finish_decl): Likewise.
3827 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3829         PR c/55383
3830         * c-typeck.c: Use correct format string in cast-qual warning
3832 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
3834         * c-decl.c (c_decl_attributes): Use
3835         lang_hooks.types.omp_mappable_type.
3836         * c-typeck.c (c_finish_omp_clauses): Likewise.
3838 2014-03-06  Marek Polacek  <polacek@redhat.com>
3840         PR c/60197
3841         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3842         of checking tree code.
3844 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3846         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3847         (c_parser_parameter_declaration): Likewise.
3849 2014-02-19  Marek Polacek  <polacek@redhat.com>
3851         PR c/60195
3852         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3853         Call mark_exp_read on exp.value.
3854         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
3855         TREE_ADDRESSABLE on old instead of val.
3856         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3858 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
3860         * c-parser.c (c_parser_get_builtin_args): Replace calls to
3861         C_EXPR_APPEND by vec_safe_push.
3862         * c-tree.h (C_EXPR_APPEND): Remove.
3864 2014-01-31  Marek Polacek  <polacek@redhat.com>
3866         PR c/59963
3867         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3868         build_function_call_vec.
3869         (build_function_call): Likewise.
3870         (build_atomic_assign): Likewise.
3871         (build_function_call_vec): Add arg_loc parameter.  Use it.
3872         (convert_arguments): Likewise.
3873         (convert_for_assignment): Rename rhs_loc to expr_loc.
3874         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3875         (c_parser_objc_keywordexpr): Likewise.
3876         (c_parser_postfix_expression_after_primary): Call
3877         build_function_call_vec with expr_loc rather than op_loc.
3878         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
3879         build_function_call_vec.
3880         (c_parser_expr_list): Add locations parameter.  Fill it with locations
3881         of function arguments.
3882         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3884 2014-01-30  Marek Polacek  <polacek@redhat.com>
3886         PR c/59940
3887         * c-typeck.c (build_function_call_vec): Use loc parameter.
3888         (convert_arguments): Add location parameter.  Use it.
3889         (ep_convert_and_check): Likewise.
3890         (build_atomic_assign): Adjust convert_for_assignment call.
3891         (build_modify_expr): Likewise.
3892         (digest_init): Likewise.
3893         (c_finish_return): Likewise.
3894         (build_conditional_expr): Adjust ep_convert_and_check calls.
3895         (convert_for_assignment): Add rhs_loc parameter.  Use it.
3896         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3897         calls.
3899 2014-01-30  Richard Biener  <rguenther@suse.de>
3901         PR c/59905
3902         * c-typeck.c (build_function_call_vec): Do not replace calls
3903         to a function via an incompatible type with a runtime abort.
3905 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3907         * c-parser.c (c_parser_declaration_or_fndef): Replaced
3908         flag_enable_cilkplus with flag_cilkplus.
3909         (c_parser_direct_declarator_inner): Likewise.
3910         (c_parser_attribute_any_word): Likewise.
3911         (c_parser_attributes): Likewise.
3912         (c_parser_compound_statement): Likewise.
3913         (c_parser_statement_after_labels): Likewise.
3914         (c_parser_if_statement): Likewise.
3915         (c_parser_switch_statement): Likewise.
3916         (c_parser_do_statement): Likewise.
3917         (c_parser_for_statement): Likewise.
3918         (c_parser_unary_expression): Likewise.
3919         (c_parser_postfix_expression): Likewise.
3920         (c_parser_postfix_expression_after_primary): Likewise.
3921         (c_parser_postfix_expression_after_primary): Likewise.
3922         (c_parser_omp_clause_name): Likewise.
3923         (c_finish_omp_declare_simd): Likewise.
3924         (c_parser_cilk_verify_simd): Likewise.
3925         * c-typeck.c (build_array_ref): Likewise.
3926         (build_function_call_vec): Likewise.
3927         (convert_arguments): Likewise.
3928         (build_compound_expr): Likewise.
3929         (c_finish_return): Likewise.
3930         (c_finish_if_stmt): Likewise.
3931         (c_finish_loop): Likewise.
3932         (build_binary_op): Likewise.
3934 2014-01-23  Marek Polacek  <polacek@redhat.com>
3936         PR c/59846
3937         * c-typeck.c (parser_build_binary_op): Use location instead of
3938         input_location.
3939         (build_binary_op): Pass location to shorten_compare.
3941 2014-01-23  Marek Polacek  <polacek@redhat.com>
3943         PR c/58346
3944         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3945         an empty aggregate.
3947 2014-01-23  Marek Polacek  <polacek@redhat.com>
3949         PR c/59871
3950         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3951         of a comma expression.
3952         (emit_side_effect_warnings): Likewise.
3954 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3956         PR c/59825
3957         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3958         function to use walk_tree and moved a lot of its functionality to
3959         expand_array_notations.
3960         (expand_array_notations): New function.
3962 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3964         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3965         attribute an attribute without value.
3967 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3969         PR middle-end/58809
3970         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3971         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3973 2014-01-22  Marek Polacek  <polacek@redhat.com>
3975         PR c/59891
3976         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3977         of remove_c_maybe_const_expr on op1 and op2.
3979 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
3981         PR c/58943
3982         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3983         effects, preevaluate rhs using SAVE_EXPR first.
3985 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3987         PR c++/59631
3988         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3989         statements with if-elseif statements.
3991 2014-01-06  Marek Polacek  <polacek@redhat.com>
3993         PR c/57773
3994         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3995         defined bit-field types only in ISO C.
3997 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3999         Update copyright years
4001 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4003         * c-array-notation.c: Use the standard form for the copyright notice.
4005 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4007         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4008         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4009         field in parser is not empty.  If not-empty, call the function
4010         c_parser_finish_omp_declare_simd.
4011         (c_parser_cilk_clause_vectorlength): Modified function to be shared
4012         between SIMD-enabled functions and #pragma simd.  Added new parameter.
4013         (c_parser_cilk_all_clauses): Modified the usage of the function
4014         c_parser_cilk_clause_vectorlength as mentioned above.
4015         (c_parser_cilk_simd_fn_vector_attrs): New function.
4016         (c_finish_cilk_simd_fn_tokens): Likewise.
4017         (is_cilkplus_vector_p): Likewise.
4018         (c_parser_omp_clause_name): Added checking for "vectorlength,"
4019         "nomask," and "mask" strings in clause name.
4020         (c_parser_omp_all_clauses): Added 3 new case statements:
4021         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4022         PRAGMA_CILK_CLAUSE_NOMASK.
4023         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
4024         check for vector attribute and if so call the function
4025         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
4026         called the function c_finish_cilk_simd_fn_tokens.
4027         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4028         parser field is non-empty.  If so, parse them as you would parse
4029         the omp declare simd pragma.
4030         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4031         Added a check when step is a parameter and flag it as error.
4032         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4033         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4034         pragma_omp_clause.
4036 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
4038         * c-parser.c (c_parser_omp_parallel): Fix description.
4040 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4042         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4043         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4044         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4045         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4047 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
4049         PR c/52023
4050         * c-parser.c (c_parser_alignas_specifier): Use
4051         c_sizeof_or_alignof_type instead of c_alignof.
4052         (c_parser_alignof_expression): Likewise, with min_alignof
4053         parameter depending on alignof spelling used.
4055 2013-12-04  Marek Polacek  <polacek@redhat.com>
4057         PR c/54113
4058         * c-decl.c (start_function): Don't warn for missing prototype for
4059         inline functions.
4061 2013-12-03  Marek Polacek  <polacek@redhat.com>
4063         PR c/59351
4064         * c-decl.c (build_compound_literal): Allow compound literals with
4065         empty initial value.
4067 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
4069         PR c/58235
4070         * c-typeck.c (build_modify_expr): Diagnose assignment to
4071         expression with array type.
4073 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4075         PR c/42262
4076         * c-typeck.c (process_init_element): Do not treat a string as
4077         initializing a whole array when used with a designator for an
4078         individual element.
4080 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4082         PR c/57574
4083         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4084         an inline function following a static declaration.
4086 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
4088         PR c/59310
4089         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4090         to p_name before calling c_parser_omp_teams instead of after.
4091         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4092         argument.  Remove unused p_name variable.
4094 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
4095             Jakub Jelinek  <jakub@redhat.com>
4097         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4098         external_scope is NULL.
4100 2013-11-27  Tom de Vries  <tom@codesourcery.com>
4101             Marc Glisse  <marc.glisse@inria.fr>
4103         PR c++/59032
4104         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4106 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
4108         * c-typeck.c: Add required include files from gimple.h.
4110 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
4112         * c-decl.c (define_label, shadow_tag_warned)
4113         (check_bitfield_type_and_width, grokdeclarator, grokparms,
4114         store_parm_decls_newstyle, store_parm_decls_oldstyle)
4115         (declspecs_add_type): Remove use of in_system_header macro.
4116         * c-parser.c (c_parser_unary_expression): Likewise.
4117         * c-typeck.c (store_init_value, process_init_element)
4118         (c_start_case): Likewise.
4120         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4121         macro.
4123         * c-parser.c (c_parser_set_source_position_from_token): Remove
4124         reference to in_system_header from comment.
4126 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4128         * c-decl.c (grokdeclarator): Update comment to refer to
4129         tree_to_[su]hwi rather than tree_low_cst.
4131 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4133         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4134         tree_to_uhwi throughout.
4136 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4138         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4139         throughout.
4141 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4143         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4144         throughout.
4146 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
4148         * c-parser.c (c_parser_cilk_simd): New.
4149         (c_parser_cilk_verify_simd): New.
4150         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4151         (c_parser_omp_for_loop): Add case for NE_EXPR.
4152         Set c_break_label for CILK_SIMD.
4153         (c_parser_cilk_clause_vectorlength): New.
4154         (c_parser_cilk_clause_linear): New.
4155         (c_parser_cilk_clause_name): New.
4156         (c_parser_cilk_all_clauses): New.
4157         * c-typeck.c (build_unary_op): Pass location argument to
4158         readonly_error.
4159         (build_modify_expr): Same.
4160         (build_asm_expr): Same.
4161         (c_finish_bc_stmt): Error on break/continue in loops.
4163 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
4165         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4167 2013-11-14  Diego Novillo  <dnovillo@google.com>
4169         * c-decl.c: Include print-tree.h.
4170         Include stor-layout.h.
4171         Include varasm.h.
4172         Include attribs.h.
4173         Include stringpool.h.
4174         * c-lang.c: Include fold-const.h.
4175         * c-parser.c: Include stringpool.h.
4176         Include attribs.h.
4177         Include stor-layout.h.
4178         Include varasm.h.
4179         Include trans-mem.h.
4180         * c-typeck.c: Include stor-layout.h.
4181         Include trans-mem.h.
4182         Include varasm.h.
4183         Include stmt.h.
4185 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
4187         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4188         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4189         __auto_type.
4190         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4191         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4192         RID_AUTO_TYPE.
4193         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4194         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4195         (c_parser_declarator, c_parser_direct_declarator_inner)
4196         (c_parser_parameter_declaration, c_parser_type_name): All callers
4197         changed.
4198         (c_parser_declaration_or_fndef): Handle declarations with type
4199         determined from the initializer.
4201 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
4203         * c-typeck.c: Include gimplify.h.
4205 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
4207         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4208         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4209         comment.
4210         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4211         or _Thread_local as appropriate in diagnostics.
4212         (build_null_declspecs): Initialize ret->thread_gnu_p.
4213         (declspecs_add_scspec): Handle either __thread or _Thread_local
4214         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
4215         pedantic.  Do not disallow _Thread_local extern and _Thread_local
4216         static.
4218 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
4219             Andrew MacLeod  <amacleod@redhat.com>
4221         * c-aux-info.c (gen_type): Handle atomic qualifier.
4222         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4223         qualifiers when compating types.
4224         (shadow_tag_warned): Handle atomic_p in declspecs.
4225         (quals_from_declspecs): Likewise.
4226         (start_decl): Use c_type_promotes_to when promoting argument
4227         types.
4228         (grokdeclarator): Handle _Atomic.
4229         (get_parm_info): Diagnose any qualifier on "void" as only
4230         parameter.
4231         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4232         comparing types.  Use c_type_promotes_to when promoting argument
4233         types.
4234         (finish_function): Use c_type_promotes_to when promoting argument
4235         types.
4236         (build_null_declspecs): Handle atomic_p in declspecs.
4237         (declspecs_add_qual): Handle RID_ATOMIC.
4238         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4239         (c_token_starts_declspecs): Handle RID_ATOMIC.
4240         (c_parser_declspecs): Handle atomic type specifiers and
4241         qualifiers.
4242         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4243         from types of expressions with atomic type.
4244         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4245         (c_parser_attribute_any_word): Handle RID_ATOMIC.
4246         (c_parser_initializer, c_parser_initelt, c_parser_initval)
4247         (c_parser_statement_after_labels, c_parser_switch_statement)
4248         (c_parser_for_statement, c_parser_expr_no_commas)
4249         (c_parser_conditional_expression, c_parser_binary_expression)
4250         (c_parser_cast_expression, c_parser_unary_expression)
4251         (c_parser_postfix_expression)
4252         (c_parser_postfix_expression_after_primary, c_parser_expression):
4253         Use convert_lvalue_to_rvalue.
4254         (c_parser_expression_conv, c_parser_expr_list): Document
4255         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
4256         (c_parser_objc_synchronized_statement): Use
4257         convert_lvalue_to_rvalue.
4258         (c_parser_objc_selector): Handle RID_ATOMIC.
4259         (c_parser_objc_receiver, c_parser_array_notation): Use
4260         convert_lvalue_to_rvalue.
4261         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4262         _Atomic (type-name).
4263         (struct c_declspecs): Add atomic_p field.
4264         (convert_lvalue_to_rvalue): Declare.
4265         * c-typeck.c (c_type_promotes_to): Promote atomic types to
4266         corresponding atomic types.
4267         (qualify_type): Don't add _Atomic qualifiers from second argument.
4268         (comp_target_types): Do not allow _Atomic mismatches.
4269         (type_lists_compatible_p): Do not remove atomic qualifiers when
4270         comparing types.
4271         (really_atomic_lvalue, convert_lvalue_to_rvalue)
4272         (build_atomic_assign): New functions.
4273         (build_unary_op): Use build_atomic_assign for atomic increment and
4274         decrement.
4275         (build_conditional_expr): Do not treat _Atomic void as a qualified
4276         version of void.
4277         (build_modify_expr): Use build_atomic_assign for atomic LHS.
4278         (find_anonymous_field_with_type, convert_to_anonymous_field)
4279         (convert_for_assignment): Do not remove atomic qualifiers when
4280         comparing types.
4281         (digest_init): Do not accept initialization of arrays of atomic
4282         elements by string constants.
4283         (build_asm_expr): Use convert_lvalue_to_rvalue.
4284         (build_binary_op): Do not treat _Atomic void as a qualified
4285         version of void.
4287 2013-11-06  DJ Delorie  <dj@redhat.com>
4289         * c-decl.c (locate_old_decl): If a previous conflicting decl is
4290         both explicit and builtin, print the location of the explicit one.
4292 2013-11-05  Tobias Burnus  <burnus@net-b.de>
4294         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4295         c_parser_omp_distribute, c_parser_omp_teams,
4296         c_parser_omp_target, c_parser_omp_declare): Handle
4297         -fopenmp-simd.
4299 2013-11-03  Marek Polacek  <polacek@redhat.com>
4301         * c-decl.c (grokdeclarator): Add VLA instrumentation.
4303 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
4305         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4306         check_dup_generic at the end, unless remove is true.
4307         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4308         remove = true;.
4309         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4311 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
4313         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4314         with decl that is not pointer nor array.
4316 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4318         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4319         a spawning function is found.
4320         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4321         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4322         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4323         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4324         case.
4325         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4326         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4327         expr.
4328         (c_finish_return): Added a check to reject _Cilk_spawn in return
4329         expression.
4330         (build_cilk_spawn): New function.
4331         (build_cilk_sync): Likewise.
4332         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4333         
4334 2013-10-27  Tobias Burnus  <burnus@net-b.de>
4336         PR other/33426
4337         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4338         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4339         (c_parser_statement_after_labels): Update calls.
4341 2013-10-24  Tobias Burnus  <burnus@net-b.de>
4343         PR other/33426
4344         * c-parser.c (c_parser_pragma, c_parser_for_statement):
4345         Handle PRAGMA_IVDEP.
4346         (c_parser_statement_after_labels): Update call.
4348 2013-10-24  Marek Polacek  <polacek@redhat.com>
4350         * c-parser.c (c_parser_struct_declaration): Add a comment.
4351         (c_parser_declarator): Don't allow _Alignas here.
4353 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
4355         * c-parser.c: Include omp-low.h.
4356         * c-typeck.c: Likewise.
4358 2013-10-17  Marek Polacek  <polacek@redhat.com>
4360         PR c/58267
4361         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4362         Document syntax of the array-declarator.
4363         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4364         are not permitted.
4365         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4366         (c_parser_struct_declaration): Likewise.
4367         (c_parser_declarator): Likewise.
4368         (c_parser_direct_declarator_inner): Likewise.
4369         (c_parser_parameter_declaration): Likewise.
4370         (c_parser_type_name): Likewise.
4372 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
4374         * c-lang.h (current_omp_declare_target_attribute): New extern
4375         decl.
4376         * c-parser.c: Include c-lang.h.
4377         (struct c_parser): Change tokens to c_token *.
4378         Add tokens_buf field.  Change tokens_avail type to unsigned int.
4379         (c_parser_consume_token): If parser->tokens isn't
4380         &parser->tokens_buf[0], increment parser->tokens.
4381         (c_parser_consume_pragma): Likewise.
4382         (enum pragma_context): Add pragma_struct and pragma_param.
4383         (c_parser_external_declaration): Adjust
4384         c_parser_declaration_or_fndef caller.
4385         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4386         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4387         Adjust recursive call.
4388         (c_parser_struct_or_union_specifier): Use pragma_struct instead
4389         of pragma_external.
4390         (c_parser_parameter_declaration): Use pragma_param instead of
4391         pragma_external.
4392         (c_parser_compound_statement_nostart, c_parser_label,
4393         c_parser_for_statement): Adjust
4394         c_parser_declaration_or_fndef callers.
4395         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4396         it through to c_parser_conditional_expression.
4397         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4398         pass it through to c_parser_binary_expression.  Adjust recursive
4399         call.
4400         (c_parser_binary_expression): Remove prec argument, add
4401         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
4402         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4403         binop matches it, use build2 instead of parser_build_binary_op.
4404         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4405         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4406         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4407         Handle pragma_struct and pragma_param the same as pragma_external.
4408         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4409         (c_parser_omp_variable_list): Parse array sections for
4410         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4411         (c_parser_omp_clause_collapse): Fully fold collapse expression.
4412         (c_parser_omp_clause_reduction): Handle user defined reductions.
4413         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4414         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4415         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4416         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4417         c_parser_omp_clause_depend, c_parser_omp_clause_map,
4418         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4419         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4420         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4421         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
4422         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
4423         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4424         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
4425         (c_parser_omp_for_loop): Add CODE argument, pass it through
4426         to c_finish_omp_for.  Change last argument to cclauses,
4427         and adjust uses to grab parallel clauses from the array of all
4428         the split clauses.  Adjust c_parser_binary_expression,
4429         c_parser_declaration_or_fndef and c_finish_omp_for callers.
4430         (omp_split_clauses): New function.
4431         (c_parser_omp_simd): New function.
4432         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4433         Allow the function to be called also when parsing combined constructs,
4434         and call c_parser_omp_simd when parsing for simd.
4435         (c_parser_omp_sections_scope): If section-sequence doesn't start with
4436         #pragma omp section, require exactly one structured-block instead of
4437         sequence of statements.
4438         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4439         Allow the function to be called also when parsing combined constructs.
4440         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4441         Allow the function to be called also when parsing combined
4442         constructs.
4443         (c_parser_omp_taskgroup, c_parser_omp_cancel,
4444         c_parser_omp_cancellation_point, c_parser_omp_distribute,
4445         c_parser_omp_teams, c_parser_omp_target_data,
4446         c_parser_omp_target_update, c_parser_omp_target,
4447         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4448         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4449         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4450         (c_parser_omp_construct): Add p_name and mask vars.  Handle
4451         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4452         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
4453         and c_parser_omp_sections callers.
4454         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4455         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4456         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4457         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
4458         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
4459         OMP_CLAUSE_DEPEND.
4460         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4461         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4462         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4463         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4464         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4465         * c-typeck.c: Include tree-inline.h.
4466         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4467         handle_omp_array_sections_1, handle_omp_array_sections,
4468         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4469         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4470         user defined reductions.
4471         (c_tree_equal): New function.
4472         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4473         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4474         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4475         c_check_omp_declare_reduction_r): New prototypes.
4476         * c-decl.c (current_omp_declare_target_attribute): New variable.
4477         (c_decl_attributes): New function.
4478         (start_decl, start_function): Use it instead of decl_attributes.
4479         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4480         c_omp_reduction_decl, c_omp_reduction_lookup,
4481         c_check_omp_declare_reduction_r): New functions.
4483 2013-09-25  Tom Tromey  <tromey@redhat.com>
4485         * Make-lang.in (c/gccspec.o): Remove.
4486         (CFLAGS-c/gccspec.o): New variable.
4487         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4488         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4489         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4491 2013-09-25  Tom Tromey  <tromey@redhat.com>
4493         * Make-lang.in (c/gccspec.o): Don't use subshell.
4495 2013-09-18  Marek Polacek  <polacek@redhat.com>
4497         PR sanitize/58443
4498         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4499         Remove unnecessary check.
4501 2013-09-18  Marek Polacek  <polacek@redhat.com>
4503         PR sanitizer/58411
4504         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4505         no_sanitize_undefined attribute.
4507 2013-09-13  Kai Tietz  <ktietz@redhat.com>
4509         PR target/57848
4510         * c-decl.c (c_builtin_function_ext_scope): Remove
4511         wrong assumption that it is never called on prexisting
4512         symbol.
4514 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
4516         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4518 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4520         * c-objc-common.c (c_tree_printer): Tidy.
4522 2013-08-30  Marek Polacek  <polacek@redhat.com>
4524         * c-typeck.c (build_binary_op): Add division by zero and shift
4525         instrumentation.
4527 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
4528             Joseph Myers  <joseph@codesourcery.com>
4530         PR c/35649
4531         * c-typeck.c (c_common_type): Prefer double_type_node over
4532         other REAL_TYPE types with the same precision.
4533         (convert_arguments): Likewise.
4535 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4537         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4538         (c_initialize_diagnostics): Call a destructor for the early printer.
4540 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4542         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4543         printer initialization.
4545 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4547         PR c/57490
4548         * c-array-notation.c (fix_conditional_array_notations_1): Added a
4549         check for truth values.
4550         (expand_array_notation_exprs): Added truth values case.  Removed an
4551         unwanted else.  Added for-loop to walk through subtrees in default
4552         case.
4554 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4556         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4558 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
4560         * c-parser.c (struct c_generic_association): Fix typo.
4562 2013-07-23  Tom Tromey  <tromey@redhat.com>
4563             Joseph Myers  <joseph@codesourcery.com>
4565         * c-parser.c (struct c_generic_association): New.
4566         (c_generic_association_d): New typedef.
4567         (c_parser_generic_selection): New function.
4568         (c_parser_postfix_expression): Handle RID_GENERIC.
4570 2013-07-13  Jason Merrill  <jason@redhat.com>
4572         PR c++/57793
4573         * c-decl.c (finish_struct): Check for too-large class.
4575 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
4577         PR c/57821
4578         * c-typeck.c (set_init_index): When folding, check for index overflow.
4580 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4582         * c-parser.c (c_parser_array_notation): Removed rejection of array
4583         notations in an array of function pointers.
4585 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4587         * c-array-notation.c (make_triplet_val_inv): New function.
4588         (create_cmp_incr): Likewise.
4589         (create_array_refs): Likewise.
4590         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4591         Also modularized common parts between functions and called the function.
4592         (build_array_notation_expr): Likewise.
4593         (fix_conditional_array_notations_1): Likewise.
4594         (fix_array_notation_expr): Likewise.
4595         (fix_array_notation_call_expr): Likewise.
4597 2013-06-18  Marek Polacek  <polacek@redhat.com>
4599         PR c/57630
4600         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4602 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4604         * c-array-notation.c (build_array_notation_expr): Reject array notation
4605         mismatch between LHS and RHS even inside a call_expr.  Also, removed
4606         a couple while statements that were dead code.
4608 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4610         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4611         excessive precision expressions in function parameters.  Also removed
4612         couple unwanted while statements.
4614 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4616         * c-array-notation.c (expand_array_notation_exprs): Added
4617         ARRAY_NOTATION_REF case.
4618         
4619 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4621         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4622         function to c-family/array-notation-common.c.
4623         (is_cilkplus_reduce_builtin): Likewise.
4624         (find_rank): Likewise.
4625         (extract_array_notation_exprs): Likewise.
4626         (replace_array_notations): Likewise.
4627         (find_inv_trees): Likewise.
4628         (replace_inv_trees): Likewise.
4629         (contains_array_notation_expr): Likewise.
4630         (find_correct_array_notation_type): Likewise.
4631         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4632         (struct inv_list): Moved this to c-family/array-notation-common.c.
4633         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4634         
4635 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4637         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4638         reduction functions outside the for-loop.  Added a check if the fundecl
4639         is non-NULL.  Finally, removed an unwanted if-statement, and made the
4640         body unconditional.
4642 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4644         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4645         condition of the if-statement matches the rank of else-block and then-
4646         block when array notations are used.
4647         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4648         expression after the entire function body is parsed.
4649         (c_parser_expr_no_commas): Delayed creating array notation expressions
4650         to the end of function parsing.
4651         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4652         whole if-statement instead of just the condition.
4653         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
4655 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4657         PR c/57474
4658         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4659         array to NULL_TREE if they are unused.  Also added a check for the
4660         field to be NULL before its fields are used in future.
4661         
4662 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4664         PR bootstrap/57450
4665         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4666         (build_array_notation_expr): Likewise.
4668 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4670         * c-typeck.c (build_array_ref): Added a check to see if array's
4671         index is greater than one.  If true, then emit an error.
4672         (build_function_call_vec): Exclude error reporting and checking
4673         for builtin array-notation functions.
4674         (convert_arguments): Likewise.
4675         (c_finish_return): Added a check for array notations as a return
4676         expression.  If true, then emit an error.
4677         (c_finish_loop): Added a check for array notations in a loop
4678         condition.  If true then emit an error.
4679         (lvalue_p): Added a ARRAY_NOTATION_REF case.
4680         (build_binary_op): Added a check for array notation expr inside
4681         op1 and op0.  If present, we call another function to find correct
4682         type.
4683         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4684         * c-parser.c (c_parser_compound_statement): Check if array
4685         notation code is used in tree, if so, then transform them into
4686         appropriate C code.
4687         (c_parser_expr_no_commas): Check if array notation is used in LHS
4688         or RHS, if so, then build array notation expression instead of
4689         regular modify.
4690         (c_parser_postfix_expression_after_primary): Added a check for
4691         colon(s) after square braces, if so then handle it like an array
4692         notation.  Also, break up array notations in unary op if found.
4693         (c_parser_direct_declarator_inner): Added a check for array
4694         notation.
4695         (c_parser_compound_statement): Added a check for array notation in
4696         a stmt.  If one is present, then expand array notation expr.
4697         (c_parser_if_statement): Likewise.
4698         (c_parser_switch_statement): Added a check for array notations in
4699         a switch statement's condition.  If true, then output an error.
4700         (c_parser_while_statement): Similarly, but for a while.
4701         (c_parser_do_statement): Similarly, but for a do-while.
4702         (c_parser_for_statement): Similarly, but for a for-loop.
4703         (c_parser_unary_expression): Check if array notation is used in a
4704         pre-increment or pre-decrement expression.  If true, then expand
4705         them.
4706         (c_parser_array_notation): New function.
4707         * c-array-notation.c: New file.
4708         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4709         
4710 2013-05-23  Mike Stump  <mikestump@comcast.net>
4712         * c-typeck.c (convert_for_assignment): Handle references to memory
4713         spaces better.
4715 2013-05-16  Jason Merrill  <jason@redhat.com>
4717         * Make-lang.in (cc1$(exeext)): Use link mutex.
4719 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
4721         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4722         to simply use OPT_Wpointer_arith.
4723         (build_unary_op): Likewise.
4725 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
4727         PR c/19449
4728         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4729         argument.  If set, or it temporarily for parsing of the first
4730         argument into force_folding_builtin_constant_p.
4731         (c_parser_postfix_expression): Adjust callers.
4733 2013-03-21  Richard Biener  <rguenther@suse.de>
4735         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4736         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
4738 2013-02-12  Marek Polacek  <polacek@redhat.com>
4740         PR c/44938
4741         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4742         origtypes to NULL.
4744 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
4746         PR c/56078
4747         * c-typeck.c (set_nonincremental_init_from_string): If
4748         constructor_max_index is NULL, treat it as if tree_int_cst_lt
4749         returned false.
4750         (process_init_element): Likewise.
4752 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
4754         PR c++/55619
4755         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4756         argument, don't call default_function_array_conversion
4757         nor c_fully_fold here.
4758         (c_parser_asm_statement): Adjust callers.
4759         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4760         and outputs here, and call default_function_array_conversion
4761         on inputs that don't need to be addressable.
4763 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
4765         PR c/39464
4766         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4767         warning require that both c_common_unsigned_type as well as
4768         c_common_signed_type is the same for both mvl and mvr types.
4770 2012-11-16  Diego Novillo  <dnovillo@google.com>
4772         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4774         * c-common.c: Use new vec API in vec.h.
4775         * c-common.h: Likewise.
4776         * c-gimplify.c: Likewise.
4777         * c-pragma.c: Likewise.
4778         * c-pretty-print.c: Likewise.
4779         * c-pretty-print.h: Likewise.
4780         * c-semantics.c: Likewise.
4781         * c-decl.c: Likewise.
4782         * c-parser.c: Likewise.
4783         * c-tree.h: Likewise.
4784         * c-typeck.c: Likewise.
4786 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
4788         PR c++/54930
4789         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4791 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4793         PR c/53066
4794         * c-decl.c (warn_if_shadowing): Do not warn if a variable
4795         shadows a function, unless the variable is a function or a
4796         pointer-to-function.
4798 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
4800         PR c/54381
4801         * c-parser.c (struct c_tree_loc_pair): Removed.
4802         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4803         add location_t * and tree * arguments, fill in array of 3
4804         sizeof_arg trees and corresponding locs.
4805         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4806         c_parser_expr_list callers.
4807         (c_parser_postfix_expression_after_primary): Likewise.  Pass
4808         array of 3 sizeof_arg trees and locs (corresponding to first
4809         3 arguments) to sizeof_pointer_memaccess_warning.
4811 2012-10-09  Lawrence Crowl  <crowl@google.com>
4813         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4814         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4815         hash table.
4817 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
4819         PR c++/54194
4820         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4821         call.
4823 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
4825         PR c++/54427
4826         * c-typeck.c: Include c-common.h.
4827         (enum stv_conv): Moved to c-common.h.
4828         (scalar_to_vector): Moved to c-common.c.
4829         (build_binary_op): Adapt to scalar_to_vector's new prototype.
4830         * Make-lang.in: c-typeck.c depends on c-common.h.
4832 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
4834         * c-decl.c (c_write_global_declarations): Fix handling of
4835         -fdump-ada-spec*.
4837 2012-09-30  Sharad Singhai  <singhai@google.com>
4839         * c-decl.c (c_write_global_declarations): Use a different method
4840         to determine if the dump has ben initialized.
4842 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4844         PR c/54552
4845         * c-typeck.c (c_cast_expr): When casting to a type requiring
4846         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4847         c_fully_fold first.
4849 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
4851         PR c/54103
4852         * c-typeck.c (build_unary_op): Pass original argument of
4853         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4854         any C_MAYBE_CONST_EXPR, if it has integer operands.
4855         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4856         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4857         to c_objc_common_truthvalue_conversion, then remove any
4858         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
4859         c_objc_common_truthvalue_conversion not
4860         c_common_truthvalue_conversion.
4861         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4862         call note_integer_operands for arguments with integer operands
4863         that are not integer constants.
4865 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
4867         PR c/54559
4868         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4869         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4871 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
4873         PR c/54428
4874         * c-convert.c (convert): Don't call fold_convert_loc if
4875         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4876         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
4877         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4879 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
4881         PR c/54355
4882         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4883         for nested and empty_ok arguments in the call to
4884         c_parser_declaration_or_fndef.
4886 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
4888         * c-tree.h (c_last_sizeof_arg): Declare.
4889         * c-parser.c (struct c_tree_loc_pair): New type.
4890         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
4891         non-NULL.
4892         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4893         (c_parser_postfix_expression_after_primary): Likewise.  Call
4894         sizeof_pointer_memaccess_warning if needed.
4895         (sizeof_ptr_memacc_comptypes): New function.
4896         * c-typeck.c (c_last_sizeof_arg): New global variable.
4897         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4899 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
4901         * c-lang.h (lang_decl): Add variable_size GTY option.
4903 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
4905         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4906         * Make-lang.in: Fix dependencies.
4908 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
4910         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4911         and add language Makefile hooks.
4912         * config-lang.in: New file.
4913         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4914         add the required "normal" config-lang.in rules.
4915         * c-lang.h: Moved from gcc/ to here.
4916         * c-tree.h: Likewise.
4917         * c-objc-common.c: Likewise.
4918         * c-objc-common.h: Likewise.
4919         * c-typeck.c: Likewise.
4920         * c-convert.c: Likewise.
4921         * c-lang.c: Likewise.
4922         * c-aux-info.c: Likewise.
4923         * c-errors.c: Likewise.
4924         * gccspec.c: Likewise.
4925         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
4926         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
4928 Copyright (C) 2012-2017 Free Software Foundation, Inc.
4930 Copying and distribution of this file, with or without modification,
4931 are permitted in any medium without royalty provided the copyright
4932 notice and this notice are preserved.