gimplefe: expose MULT_HIGHPART_EXPR
[platform/upstream/gcc.git] / gcc / c / ChangeLog
1 2018-08-30  Alexander Monakov  <amonakov@ispras.ru>
2
3         * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4         "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
5
6 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
7
8         PR 87091
9         * c-decl.c (implicitly_declare): Update call to
10         maybe_add_include_fixit to suggest overriding the location, as it
11         is for a note.
12         * c-objc-common.c (c_tree_printer): Update for conversion of
13         show_caret_p to a tri-state.
14
15 2018-08-27  Martin Liska  <mliska@suse.cz>
16
17         * c-decl.c (locate_old_decl): Use new function
18         fndecl_built_in_p and remove check for FUNCTION_DECL if
19         possible.
20         (diagnose_mismatched_decls): Likewise.
21         (merge_decls): Likewise.
22         (warn_if_shadowing): Likewise.
23         (pushdecl): Likewise.
24         (implicitly_declare): Likewise.
25         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
26         * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
27         * c-typeck.c (build_function_call_vec): Likewise.
28         (convert_arguments): Likewise.
29
30 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
31
32         PR other/84889
33         * c-decl.c (pushtag): Add auto_diagnostic_group instance.
34         (diagnose_mismatched_decls): Likewise, in various places.
35         (warn_if_shadowing): Likewise.
36         (implicit_decl_warning): Likewise.
37         (implicitly_declare): Likewise.
38         (undeclared_variable): Likewise.
39         (declare_label): Likewise.
40         (grokdeclarator): Likewise.
41         (start_function): Likewise.
42         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
43         (c_parser_parameter_declaration): Likewise.
44         (c_parser_binary_expression): Likewise.
45         * c-typeck.c (c_expr_sizeof_expr): Likewise.
46         (parser_build_binary_op): Likewise.
47         (build_unary_op): Likewise.
48         (error_init): Likewise.
49         (pedwarn_init): Likewise.
50         (warning_init): Likewise.
51         (convert_for_assignment): Likewise.
52
53 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
54
55         * c-objc-common.c: Include "gcc-rich-location.h".
56         (c_tree_printer): Move implemenation of '%T' to...
57         (print_type): ...this new function.
58         (range_label_for_type_mismatch::get_text): New function.
59         * c-typeck.c (convert_for_assignment): Add type labels to the rhs
60         range for the various ic_argpass cases.
61         (class maybe_range_label_for_tree_type_mismatch): New class.
62         (build_binary_op): Use it when calling binary_op_error.
63
64 2018-08-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
65         
66         * c-decl.c (start_decl): Do not warn if variables is named as main
67         and is a local variable.
68
69 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
70
71         PR c/19315
72         * c-decl.c (finish_decl): Don't add the 'extern' storage class to
73         objects of unknown size.
74
75 2018-08-13  Martin Sebor  <msebor@redhat.com>
76
77         PR tree-optimization/71625
78         * c-parser.c (c_parser_declaration_or_fndef): Call
79         braced_list_to_string.
80
81 2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
82
83         PR c/86690
84         * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
85         errors.
86
87 2018-08-01  Martin Sebor  <msebor@redhat.com>
88
89         PR tree-optimization/86650
90         * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
91         and TREE_BLOCK (t) from within percent_K_format to this callsite.
92
93 2018-08-01  Jakub Jelinek  <jakub@redhat.com>
94
95         PR c/85704
96         * c-typeck.c (init_field_decl_cmp): New function.
97         (output_pending_init_elements): Use it for field comparisons
98         instead of pure bit_position comparisons.
99
100 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
101
102         * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
103         type here, instead add "omp declare target implicit" attribute.
104         (finish_decl): Diagnose vars without mappable type here.
105
106 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
107             Thomas Schwinge <thomas@codesourcery.com>
108             Cesar Philippidis  <cesar@codesourcery.com>
109
110         * c-parser.c (c_parser_omp_clause_name): Add support for finalize
111         and if_present. Make present_or_{copy,copyin,copyout,create} aliases
112         to their non-present_or_* counterparts. Make 'self' an alias to
113         PRAGMA_OACC_CLAUSE_HOST.
114         (c_parser_oacc_data_clause): Update GOMP mappings for
115         PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
116         PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
117         (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
118         Remove support for present_or_* clauses.
119         (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
120         (OACC_PARALLEL_CLAUSE_MASK): Likewise.
121         (OACC_DECLARE_CLAUSE_MASK): Likewise.
122         (OACC_DATA_CLAUSE_MASK): Likewise.
123         (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
124         (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
125         (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
126         (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
127         * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
128
129 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
130
131         * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
132         * gimple-parser.c (c_parser_gimple_statement): Likewise.
133         (c_parser_gimple_unary_expression): Likewise.
134
135 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
136
137         PR c/86093
138         * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
139         before doing POINTER_DIFF_EXPR.
140
141 2018-06-07  Marek Polacek  <polacek@redhat.com>
142
143         PR c/85318
144         * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
145         for loop initial declarations.
146
147 2018-05-30  David Pagan  <dave.pagan@oracle.com>
148
149         PR c/55976
150         * c-decl.c (grokdeclarator): Update check for return type warnings.
151         (start_function): Likewise.
152         (finish_function): Likewise.
153         * c-typeck.c (c_finish_return): Update check for return type warnings.
154         Pass OPT_Wreturn_type to pedwarn when appropriate.
155
156 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
157
158         * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
159         __FMA_EXPR handlng.
160
161 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
162
163         * gimple-parser.c: Include internal-fn.h.
164         (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
165         (c_parser_gimple_call_internal): New function.
166         (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
167         Fix typos in comment.
168
169 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
170
171         PR c++/85662
172         * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
173         fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
174         fold_convert_loc.
175         * c-typeck.c (build_unary_op): Use fold_offsetof rather than
176         fold_offsetof_1, pass argtype as TYPE to it and drop the
177         fold_convert_loc.
178
179 2018-05-02  David Pagan  <dave.pagan@oracle.com>
180
181         PR c/30552
182         * c-decl.c (old_style_parameter_scope): New function.
183         * c-parser.c (c_parser_postfix_expression): Check for statement
184         expressions in old-style function parameter list declarations.
185         * c-parser.h (old_style_parameter_scope): New extern declaration.
186
187 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
188
189         PR sanitizer/84307
190         * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
191         it is not TREE_STATIC.
192         * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
193         not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
194         its COMPOUND_LITERAL_EXPR_DECL.
195
196 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
197
198         * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
199         where all functions return the same _FloatN or _FloatNx type,
200         treat integer types as _Float64 instead of double.
201
202 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
203
204         PR c/84999
205         * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
206         building vector comparison, diagnose it and return error_mark_node.
207
208 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
209
210         PR c/84853
211         * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
212         If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
213         INTEGER_TYPE element type.
214
215 2018-03-13  David Pagan  <dave.pagan@oracle.com>
216
217         PR c/46921
218         * c-typeck.c (output_init_element): Ensure field initializer
219         expression is always evaluated if there are side effects.
220
221 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
222
223         PR c/84721
224         * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
225         !building_stmt_list_p ().
226
227 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
228
229         PR c/84305
230         * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
231         in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
232         and include the BIND_EXPR in the list of things that need to be
233         pre-evaluated.
234
235 2018-02-09  Nathan Sidwell  <nathan@acm.org>
236
237         PR c/84293
238         * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
239         to strict_aliasing_warning.
240
241 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
242
243         * c-typeck.c (really_start_incremental_init, push_init_level,
244         set_nonincremental_init, output_init_element, process_init_element):
245         Use DECL_UNNAMED_BIT_FIELD.
246
247 2018-01-31  Marek Polacek  <polacek@redhat.com>
248
249         PR c/81779
250         * c-parser.c (c_parser_compound_statement_nostart): Call
251         expansion_point_location_if_in_system_header.
252
253 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
254
255         PR c++/83814
256         * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
257         the C part.
258
259 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
260
261         PR c/83801
262         * c-tree.h (decl_constant_value_1): Add a bool argument.
263         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
264         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
265         (decl_constant_value): Adjust caller.
266         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
267         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
268         decl_constant_value returns initializer that has BLKmode or
269         array type.
270         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
271
272 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
273             Alan Hayward  <alan.hayward@arm.com>
274             David Sherwood  <david.sherwood@arm.com>
275
276         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
277         TYPE_VECTOR_SUBPARTS.
278
279 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
280
281         Update copyright years.
282
283 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
284
285         PR c/83595
286         * c-parser.c (c_parser_braced_init, c_parser_initelt,
287         c_parser_conditional_expression, c_parser_cast_expression,
288         c_parser_sizeof_expression, c_parser_alignof_expression,
289         c_parser_postfix_expression, c_parser_omp_declare_reduction,
290         c_parser_transaction_expression): Use set_error () method instead
291         of setting value member to error_mark_node.
292
293 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
294
295         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
296         and _Float<N>X built-in functions.
297
298 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
299
300         PR debug/83550
301         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
302         TYPE_STUB_DECL and call rest_of_type_compilation before processing
303         incomplete vars rather than after it.
304
305         PR debug/83547
306         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
307         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
308         and consider empty ones if there are no other stmts.  For
309         -Wunused-value walk all statements before the one only followed by
310         DEBUG_BEGIN_STMTs.
311
312 2017-12-22  Mike Stump  <mikestump@comcast.net>
313             Eric Botcazou  <ebotcazou@adacore.com>
314
315         * c-parser.c (c_parser_while_statement): Add unroll parameter and
316         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
317         (c_parser_do_statement): Likewise.
318         (c_parser_for_statement): Likewise.
319         (c_parser_statement_after_labels): Adjust calls to above.
320         (c_parse_pragma_ivdep): New static function.
321         (c_parser_pragma_unroll): Likewise.
322         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
323         <PRAGMA_UNROLL>: New case.
324
325 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
326
327         * c-typeck.c (comptypes_internal, function_types_compatible_p,
328         perform_integral_promotions, digest_init): Replace Yoda conditions
329         with typical order conditions.
330         * c-decl.c (check_bitfield_type_and_width): Likewise.
331
332 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
333
334         * c-typeck.c (c_safe_arg_type_equiv_p,
335         c_safe_function_type_cast_p): New function.
336         (build_c_cast): Implement -Wcast-function-type.
337
338 2017-12-14  Richard Biener  <rguenther@suse.de>
339
340         PR c/83415
341         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
342         like REALPART_EXPR for the behavior of whether its operand
343         is an lvalue.
344
345 2017-12-12  Marek Polacek  <polacek@redhat.com>
346
347         PR c/82679
348         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
349
350 2017-12-12  Alexandre Oliva <aoliva@redhat.com>
351
352         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
353         * c-parser.c (add_debug_begin_stmt): New.
354         (c_parser_declaration_or_fndef): Call it.
355         (c_parser_compound_statement_nostart): Likewise.
356         (c_parser_statement_after_labels): Likewise.
357         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
358
359 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
360
361         * c-decl.c (build_compound_literal): Add parameter alignas_align
362         and set alignment of decl if nonzero.
363         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
364         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
365         qualifier.
366         (c_parser_struct_declaration): Update syntax comment.
367         (c_parser_type_name): Add alignas_ok argument and pass it to
368         c_parser_declspecs.
369         (c_parser_cast_expression): Pass true to c_parser_type_name and
370         give error if a cast used an _Alignas specifier.
371         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
372         give error if sizeof (type-name) used an _Alignas specifier.
373         (c_parser_alignof_expression): Pass true to c_parser_type_name and
374         give error if _Alignof (type-name) used an _Alignas specifier.
375         (c_parser_postfix_expression_after_paren_type): Check specified
376         alignment for a compound literal and pass it to
377         build_compound_literal.
378         * c-parser.h (c_parser_type_name): Update prototype.
379         * c-tree.h (build_compound_literal): Update prototype.
380
381 2017-12-07  Martin Sebor  <msebor@redhat.com>
382
383         PR c/81544
384         * c-decl.c (c_decl_attributes): Look up existing declaration and
385         pass it to decl_attributes.
386
387 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
388
389         PR c/83236
390         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
391         reserved for use by the implementation.
392
393 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
394
395         * c-decl.c: Include "c-family/c-spellcheck.h".
396
397 2017-12-05  Martin Liska  <mliska@suse.cz>
398             Jakub Jelinek  <jakub@redhat.com>
399
400         * c-typeck.c (pointer_diff): Add new argument and instrument
401         pointer subtraction.
402         (build_binary_op): Similar for pointer comparison.
403
404 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
405
406         PR c/79153
407         * c-parser.c: Include tree-iterator.h.
408         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
409         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
410         on it.
411
412         PR c/83222
413         * c-tree.h (decl_constant_value_1): Declare.
414         * c-typeck.c (decl_constant_value_1): New function.
415         (decl_constant_value): Use it.
416         * c-fold.c (c_fully_fold_internal): If in_init, use
417         decl_constant_value_1 instead of decl_constant_value.
418
419 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
420
421         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
422
423 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
424
425         PR sanitizer/81275
426         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
427         c_switch_covers_all_cases_p returns true.
428
429 2017-11-28  Julia Koval  <julia.koval@intel.com>
430             Sebastian Peryt  <sebastian.peryt@intel.com>
431
432         * Make-lang.in (c/c-array-notation.o): Remove.
433         * c-array-notation.c: Delete.
434         * c-decl.c: Remove cilkplus condition.
435         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
436         c_parser_cilk_verify_simd, c_parser_array_notation,
437         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
438         c_parser_cilk_simd_fn_vector_attrs,
439         c_finish_cilk_simd_fn_tokens): Delete.
440         (c_parser_declaration_or_fndef): Remove cilkplus condition.
441         (c_parser_direct_declarator_inner): Ditto.
442         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
443         (c_parser_attributes, c_parser_compound_statement,
444         c_parser_statement_after_labels, c_parser_if_statement,
445         c_parser_switch_statement, c_parser_while_statement,
446         c_parser_do_statement, c_parser_for_statement,
447         c_parser_unary_expression, c_parser_postfix_expression,
448         c_parser_postfix_expression_after_primary,
449         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
450         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
451         support.
452         * c-typeck.c (build_array_ref, build_function_call_vec,
453         convert_arguments,
454         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
455         c_finish_loop, build_binary_op): Remove cilkplus support.
456
457 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
458
459         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
460         of build3.
461
462 2017-11-14 Boris Kolpackov  <boris@codesynthesis.com>
463
464         * Make-lang.in (c.install-plugin): Install backend import library.
465
466 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
467
468         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
469         pragma_stmt context.
470
471 2017-11-23  Mike Stump  <mikestump@comcast.net>
472             Eric Botcazou  <ebotcazou@adacore.com>
473
474         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
475         ANNOTATE_EXPR.
476         (c_parser_do_statement): Likewise.
477         (c_parser_for_statement): Likewise.
478
479 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
480
481         PR c++/62170
482         * c-objc-common.c (c_tree_printer): Convert penultimate param from
483         bool to bool *.  Within '%T' handling, if showing an "aka", use
484         "quoted" param to add appropriate quoting.
485
486 2017-11-22  Marek Polacek  <polacek@redhat.com>
487
488         PR c++/60336
489         PR middle-end/67239
490         PR target/68355
491         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
492
493 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
494
495         PR c/83056
496         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
497         earlier failed lookups.
498
499 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
500
501         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
502         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
503
504 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
505
506         PR c/81404
507         * c-decl.c: Include "c-family/known-headers.h".
508         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
509         to known-headers.cc.
510         (class suggest_missing_header): Move to known-header.h.
511         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
512         than get_c_name_hint.
513
514 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
515
516         * c-decl.c (get_c_name_hint): New function.
517         (class suggest_missing_header): New class.
518         (lookup_name_fuzzy): Call get_c_name_hint and use it to
519         suggest missing headers to the user.
520
521 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
522
523         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
524         Include "c-family/name-hint.h"
525         (implicit_decl_warning): Convert "hint" from
526         const char * to name_hint.  Pass location to
527         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
528         warning was not printed.
529         (undeclared_variable): Likewise for "guessed_id".
530         (lookup_name_fuzzy): Convert return type from const char *
531         to name_hint.  Add location_t param.
532         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
533         Include "c-family/name-hint.h"
534         (c_parser_declaration_or_fndef): Convert "hint" from
535         const char * to name_hint.  Pass location to lookup_name_fuzzy.
536         (c_parser_parameter_declaration): Likewise.
537
538 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
539
540         PR c/66618
541         PR c/69960
542         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
543         where needed.
544         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
545         handle_omp_array_sections): Likewise.
546         (digest_init): Don't call decl_constant_value_for_optimization.
547         * c-tree.h (decl_constant_value_for_optimization): Removed.
548         * c-fold.c (c_fold_array_ref): New function.
549         (c_fully_fold_internal): Add LVAL argument, propagate it through
550         recursive calls.  For VAR_P call decl_constant_value and
551         unshare if not LVAL and either optimizing or IN_INIT.  Remove
552         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
553         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
554         (c_fully_fold): Add LVAL argument, pass it through to
555         c_fully_fold_internal.
556         (decl_constant_value_for_optimization): Removed.
557
558 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
559
560         PR c/81156
561         * c-parser.c (check_tgmath_function): New function.
562         (enum tgmath_parm_kind): New enum.
563         (c_parser_postfix_expression): Handle __builtin_tgmath.
564
565 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
566
567         * c-decl.c (implicit_decl_warning): Update for renaming of
568         pedwarn_at_rich_loc and warning_at_rich_loc.
569         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
570         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
571         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
572         (c_parser_struct_or_union_specifier): Likewise for renaming of
573         pedwarn_at_rich_loc.
574         (c_parser_parameter_declaration): Likewise for renaming of
575         error_at_rich_loc.
576         * c-typeck.c (build_component_ref): Likewise.
577         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
578         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
579         (set_init_label): Likewise for renaming of error_at_rich_loc.
580
581 2017-10-30  Richard Biener  <rguenther@suse.de>
582
583         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
584         stmts.
585
586 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
587
588         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
589         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
590
591 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
592
593         PR c/7356
594         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
595         semicolons.
596
597 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
598
599         PR libstdc++/81706
600         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
601         newdecl to corresponding __builtin_ if any.
602
603 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
604
605         PR c++/82466
606         * c-decl.c (diagnose_mismatched_decls): Use
607         OPT_Wbuiltin_declaration_mismatch.
608
609 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
610
611         * c-parser.c (c_parser_require): Add "type_is_unique" param and
612         use it to guard calls to maybe_suggest_missing_token_insertion.
613         (c_parser_parms_list_declarator): Override default value of new
614         "type_is_unique" param to c_parser_require.
615         (c_parser_asm_statement): Likewise.
616         * c-parser.h (c_parser_require): Add "type_is_unique" param,
617         defaulting to true.
618
619 2017-10-11  Nathan Sidwell  <nathan@acm.org>
620
621         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
622
623 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
624
625         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
626         operating on trees as wide_ints.
627         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
628         (c_tree_equal): Likewise.
629
630 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
631
632         * c-decl.c (push_parm_decl): Store c_parm's location into the
633         PARAM_DECL.
634         (build_c_parm): Add "loc" param and store it within the c_parm.
635         * c-parser.c (struct c_parser): Add "last_token_location" field.
636         (c_parser_consume_token): Store location of the token into the
637         new field.
638         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
639         when handling a FUNCTION_DECL, if it doesn't already have them.
640         (c_parser_parameter_declaration): Generate a location for the
641         parameter, and pass it to the call to build_c_parm.
642         * c-tree.h (struct c_parm): Add field "loc".
643         (build_c_parm): Add location_t param.
644         * c-typeck.c (get_fndecl_argument_location): New function.
645         (inform_for_arg): New function.
646         (convert_for_assignment): Use inform_for_arg when dealing with
647         ic_argpass.
648
649 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
650
651         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
652         width is non-NULL.
653         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
654         don't SET_DECL_C_BIT_FIELD here.
655
656         PR c/82340
657         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
658         instead of trying to set just TREE_READONLY manually.
659
660 2017-09-16  Tom de Vries  <tom@codesourcery.com>
661
662         PR c/81875
663         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
664         cond itself.
665
666 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
667
668         PR c/82071
669         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
670         for C11.
671         (build_conditional_expr): For C11, generate result with excess
672         precision when one argument is an integer and the other is of a
673         type using excess precision.
674
675 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
676
677         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
678
679 2017-09-13  Marek Polacek  <polacek@redhat.com>
680
681         PR c/82167
682         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
683         than expr.original_type.
684
685 2017-09-12  Nathan Sidwell  <nathan@acm.org>
686
687         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
688         resort_sorted_fields): Moved from c-family/c-common.c.
689         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
690
691 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
692
693         PR c/82071
694         * c-typeck.c (build_atomic_assign): Handle argument with excess
695         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
696         argument passed to build_binary_op and convert_for_assignment but
697         not for call to c_fully_fold.
698         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
699         Ensure build_binary_op is called with argument with original
700         semantic type.  Avoid calling c_fully_fold with an
701         EXCESS_PRECISION_EXPR from build_binary_op.
702
703 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
704
705         PR c/81887
706         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
707
708 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
709             Alan Hayward  <alan.hayward@arm.com>
710             David Sherwood  <david.sherwood@arm.com>
711
712         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
713         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
714         m1 and m2 to the signed equivalent of a fixed-point
715         SCALAR_TYPE_MODE.
716
717 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
718
719         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
720         than CAN_HAVE_LOCATION_P when determining whether to use the
721         location_t value within "value".
722
723 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
724
725         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
726         rather than peeking the location of the first token.
727         * c-tree.h (c_expr::get_location): New method.
728
729 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
730
731         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
732         to check_function_arguments.
733
734 2017-08-18  Marek Polacek  <polacek@redhat.com>
735
736         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
737         commentary.
738
739 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
740
741         PR c/53037
742         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
743         (check_bitfield_type_and_width): Don't allow bit-field with
744         warn_if_not_aligned type.
745
746 2017-08-14  Martin Sebor  <msebor@redhat.com>
747
748         PR c/81117
749         * c-objc-common.c (c_objc_common_init): Handle 'G'.
750
751 2017-08-11  Marek Polacek  <polacek@redhat.com>
752
753         PR c/81795
754         * c-decl.c (pushtag): Only print inform if the warning was printed.
755         (grokdeclarator): Likewise.
756
757 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
758
759         * c-parser.c (c_parser_error): Rename to...
760         (c_parser_error_richloc): ...this, making static, and adding
761         "richloc" parameter, passing it to the c_parse_error call,
762         rather than calling c_parser_set_source_position_from_token.
763         (c_parser_error): Reintroduce, reimplementing in terms of the
764         above, converting return type from void to bool.
765         (class token_pair): New class.
766         (struct matching_paren_traits): New struct.
767         (matching_parens): New typedef.
768         (struct matching_brace_traits): New struct.
769         (matching_braces): New typedef.
770         (get_matching_symbol): New function.
771         (c_parser_require): Add param MATCHING_LOCATION, using it to
772         highlight matching "opening" tokens for missing "closing" tokens.
773         (c_parser_skip_until_found): Likewise.
774         (c_parser_static_assert_declaration_no_semi): Convert explicit
775         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
776         class matching_parens, so that the pertinent open parenthesis is
777         highlighted when there are problems locating the close
778         parenthesis.
779         (c_parser_struct_or_union_specifier): Likewise.
780         (c_parser_typeof_specifier): Likewise.
781         (c_parser_alignas_specifier): Likewise.
782         (c_parser_simple_asm_expr): Likewise.
783         (c_parser_braced_init): Likewise, for matching_braces.
784         (c_parser_paren_condition): Likewise, for matching_parens.
785         (c_parser_switch_statement): Likewise.
786         (c_parser_for_statement): Likewise.
787         (c_parser_asm_statement): Likewise.
788         (c_parser_asm_operands): Likewise.
789         (c_parser_cast_expression): Likewise.
790         (c_parser_sizeof_expression): Likewise.
791         (c_parser_alignof_expression): Likewise.
792         (c_parser_generic_selection): Likewise.
793         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
794         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
795         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
796         In case CPP_OPEN_PAREN, pass loc_open_paren to the
797         c_parser_skip_until_found call.
798         (c_parser_objc_class_definition): Use class matching_parens as
799         above.
800         (c_parser_objc_method_decl): Likewise.
801         (c_parser_objc_try_catch_finally_statement): Likewise.
802         (c_parser_objc_synchronized_statement): Likewise.
803         (c_parser_objc_at_property_declaration): Likewise.
804         (c_parser_oacc_wait_list): Likewise.
805         (c_parser_omp_var_list_parens): Likewise.
806         (c_parser_omp_clause_collapse): Likewise.
807         (c_parser_omp_clause_default): Likewise.
808         (c_parser_omp_clause_if): Likewise.
809         (c_parser_omp_clause_num_threads): Likewise.
810         (c_parser_omp_clause_num_tasks): Likewise.
811         (c_parser_omp_clause_grainsize): Likewise.
812         (c_parser_omp_clause_priority): Likewise.
813         (c_parser_omp_clause_hint): Likewise.
814         (c_parser_omp_clause_defaultmap): Likewise.
815         (c_parser_oacc_single_int_clause): Likewise.
816         (c_parser_omp_clause_ordered): Likewise.
817         (c_parser_omp_clause_reduction): Likewise.
818         (c_parser_omp_clause_schedule): Likewise.
819         (c_parser_omp_clause_num_teams): Likewise.
820         (c_parser_omp_clause_thread_limit): Likewise.
821         (c_parser_omp_clause_aligned): Likewise.
822         (c_parser_omp_clause_linear): Likewise.
823         (c_parser_omp_clause_safelen): Likewise.
824         (c_parser_omp_clause_simdlen): Likewise.
825         (c_parser_omp_clause_depend): Likewise.
826         (c_parser_omp_clause_map): Likewise.
827         (c_parser_omp_clause_device): Likewise.
828         (c_parser_omp_clause_dist_schedule): Likewise.
829         (c_parser_omp_clause_proc_bind): Likewise.
830         (c_parser_omp_clause_uniform): Likewise.
831         (c_parser_omp_for_loop): Likewise.
832         (c_parser_cilk_clause_vectorlength): Likewise.
833         (c_parser_cilk_clause_linear): Likewise.
834         (c_parser_transaction_expression): Likewise.
835         * c-parser.h (c_parser_require): Add param matching_location with
836         default UNKNOWN_LOCATION.
837         (c_parser_error): Convert return type from void to bool.
838         (c_parser_skip_until_found): Add param matching_location with
839         default UNKNOWN_LOCATION.
840
841 2017-08-09  Marek Polacek  <polacek@redhat.com>
842
843         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
844         * c-tree.h (build_external_ref): Update declaration.
845         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
846         (build_external_ref): Change the type of a parameter to bool.
847         (parser_build_binary_op): Use true/false instead of 1/0.
848         (pointer_diff): Likewise.
849         (build_modify_expr): Likewise.
850         (set_designator): Change the type of a parameter to bool.
851         (set_init_index): Use true/false instead of 1/0.
852         (set_init_label): Likewise.
853         (output_init_element): Change the type of a parameter to bool.
854         (output_pending_init_elements): Use true/false instead of 1/0.
855         (process_init_element): Likewise.
856         (build_binary_op): Change the type of a parameter to bool.
857
858 2017-08-09  Marek Polacek  <polacek@redhat.com>
859
860         PR c/81233
861         * c-typeck.c (pedwarn_init): Make the function take a variable list.
862         Call emit_diagnostic_valist instead of pedwarn.
863         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
864         Print the relevant types in diagnostics.
865
866 2017-08-09  Marek Polacek  <polacek@redhat.com>
867
868         PR c/81417
869         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
870         build_conditional_expr. 
871         * c-parser.c (c_parser_conditional_expression): Create locations for
872         EXP1 and EXP2 from their source ranges.  Pass the locations down to
873         build_conditional_expr.
874         * c-tree.h (build_conditional_expr): Update declaration.
875         * c-typeck.c (build_conditional_expr): Add location_t parameters.
876         For -Wsign-compare, also print the types.
877
878 2017-08-08  Martin Liska  <mliska@suse.cz>
879
880         * c-convert.c: Include header files.
881         * c-typeck.c: Likewise.
882
883 2017-08-07  Martin Liska  <mliska@suse.cz>
884
885         * c-parser.c (c_parser_attributes): Canonicalize name of an
886         attribute.
887
888 2017-08-02  Marek Polacek  <polacek@redhat.com>
889
890         PR c/81289
891         * c-parser.c (c_parser_unary_expression): Use set_error.
892
893         PR c/81448
894         PR c/81306
895         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
896         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
897
898 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
899             Martin Liska  <mliska@suse.cz>
900
901         * c-typeck.c (c_finish_goto_label): Build gimple predict
902         statement.
903
904 2017-07-31  Martin Liska  <mliska@suse.cz>
905
906         PR sanitize/81530
907         * c-convert.c (convert): Guard condition with flag_sanitize_p
908         also with current_function_decl non-null equality.
909         * c-decl.c (grokdeclarator): Likewise.
910         * c-typeck.c (build_binary_op): Likewise.
911
912 2017-07-25  Marek Polacek  <polacek@redhat.com>
913
914         * c-decl.c (grokfield): Remove local variable.
915
916 2017-07-25  Marek Polacek  <polacek@redhat.com>
917
918         PR c/81364
919         * c-parser.c (c_parser_else_body): Don't warn about multistatement
920         macro expansion if the body is in { }.
921         (c_parser_while_statement): Likewise.
922         (c_parser_for_statement): Likewise.
923
924 2017-07-18  Nathan Sidwell  <nathan@acm.org>
925
926         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
927
928 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
929
930         * c-decl.c (implicitly_declare): When suggesting a missing
931         #include, provide a fix-it hint.
932
933 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
934
935         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
936         and call that instead.
937         * c-tree.h (selftest::run_c_tests): New decl.
938
939 2017-06-26  Marek Polacek  <polacek@redhat.com>
940
941         PR c/80116
942         * c-parser.c (c_parser_if_body): Set the location of the
943         body of the conditional after parsing all the labels.  Call
944         warn_for_multistatement_macros.
945         (c_parser_else_body): Likewise.
946         (c_parser_switch_statement): Likewise.
947         (c_parser_while_statement): Likewise.
948         (c_parser_for_statement): Likewise.
949         (c_parser_statement): Add a default argument.  Save the location
950         after labels have been parsed.
951         (c_parser_c99_block_statement): Likewise.
952
953 2017-06-19  Richard Biener  <rguenther@suse.de>
954
955         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
956         negated _Literals to parse _Literal (int) -1.
957
958 2017-06-13  Martin Liska  <mliska@suse.cz>
959
960         PR sanitize/78204
961         * c-convert.c (convert): Use sanitize_flags_p.
962         * c-decl.c (grokdeclarator): Likewise.
963         * c-typeck.c (convert_for_assignment): Likewise.
964         (c_finish_return): Likewise.
965         (build_binary_op): Likewise.
966
967 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
968
969         PR c/81006
970         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
971         to sizetype before size_binop.
972
973 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
974
975         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
976         of TDI_generic.
977
978 2017-06-06  Marek Polacek  <polacek@redhat.com>
979
980         PR c/79983
981         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
982         ref.
983         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
984
985 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
986
987         * c-parser.c (c_parser_binary_expression): Implement the
988         -Wsizeof_pointer_div warning.
989         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
990         from a parenthesized expression.
991         (c_parser_expr_list): Use c_last_sizeof_loc.
992         * c-tree.h (c_last_sizeof_loc): New external.
993         * c-typeck.c (c_last_sizeof_loc): New variable.
994         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
995
996 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
997
998         PR testsuite/80580
999         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1000
1001 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
1002
1003         * c-objc-common.c (c_tree_printer): Gain bool and const char **
1004         parameters.
1005
1006 2017-05-24  Martin Sebor  <msebor@redhat.com>
1007
1008         PR c/80731
1009         * c-fold.c (c_fully_fold_internal): Adjust.
1010         * c-typeck.c (parser_build_unary_op): Adjust.
1011
1012 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1013
1014         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1015         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1016         "VECTOR_LENGTH".
1017
1018 2017-05-23  Marek Polacek  <polacek@redhat.com>
1019
1020         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1021         quotes.
1022
1023 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
1024
1025         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1026         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1027         it returned invariant.  Call tree_invariant_p unconditionally
1028         afterwards to decide whether to return expr or op0.
1029
1030 2017-05-22  Nathan Sidwell  <nathan@acm.org>
1031
1032         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1033
1034 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
1035
1036         * c-parser.c (c_parser_omp_clause_default): Handle
1037         "OMP_CLAUSE_DEFAULT_PRESENT".
1038
1039 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1040
1041         * config-lang.in (gtfiles): Add c-family/c-format.c.
1042
1043 2017-05-18  Nathan Sidwell  <nathan@acm.org>
1044
1045         * c-decl.c (pushdecl_top_level): Delete unused function.
1046
1047 2017-05-18  Marek Polacek  <polacek@redhat.com>
1048
1049         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1050         (check_earlier_gotos): Likewise.
1051         (define_label): Likewise.
1052         (pending_xref_error): Likewise.
1053         (smallest_type_quals_location): Likewise.
1054         (grokdeclarator): Likewise.
1055         (grokparms): Likewise.
1056         (identifier_global_value): Likewise.
1057         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1058         (find_init_member): Likewise.
1059
1060 2017-05-18  Marek Polacek  <polacek@redhat.com>
1061
1062         * c-decl.c (start_decl): Use false/true instead of 0/1.
1063         (grokdeclarator): Likewise.
1064         (finish_struct): Likewise.
1065         (start_function): Change the return type to bool.  Use false/true
1066         instead of 0/1.
1067         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1068         * c-tree.h (start_function): Update.
1069         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1070         (set_designator): Change the return type to bool.  Use false/true
1071         instead of 0/1.
1072
1073 2017-05-17  Marek Polacek  <polacek@redhat.com>
1074
1075         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1076         * c-typeck.c: Likewise.
1077
1078 2017-05-17  Marek Polacek  <polacek@redhat.com>
1079
1080         PR sanitizer/80659
1081         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1082         DECL_IGNORED_P even for non-static compound literals.
1083
1084 2017-05-17  Martin Liska  <mliska@suse.cz>
1085
1086         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1087         use it instead of int type.
1088
1089 2017-05-17  Marek Polacek  <polacek@redhat.com>
1090
1091         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
1092         call c_fully_fold.
1093         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1094         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 
1095         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1096         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1097         save_expr.
1098         (c_parser_conditional_expression): Likewise.
1099         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1100         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1101         (process_init_element): Likewise.
1102         (build_binary_op): Likewise.
1103         (handle_omp_array_sections_1): Likewise.
1104
1105 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
1106
1107         * c-parser.c (c_parser_omp_clause_num_gangs)
1108         (c_parser_omp_clause_num_workers)
1109         (c_parser_omp_clause_vector_length): Merge functions into...
1110         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
1111         all users.
1112
1113 2017-05-11  Nathan Sidwell  <nathan@acm.org>
1114
1115         * gimple-parser.c: Don't #include tree-dump.h.
1116
1117 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1118
1119         PR testsuite/80580
1120         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1121
1122 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1123
1124         PR testsuite/80580
1125         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1126         incorrect __MEM syntax.
1127
1128 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1129
1130         PR testsuite/80580
1131         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1132         type of unary '*'.
1133
1134 2017-05-09  Nathan Sidwell  <nathan@acm.org>
1135
1136         * c-tree.h (pushdecl): Declare.
1137
1138 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
1139
1140         * c-decl.c (warn_defaults_to): Replace report_diagnostic
1141         with diagnostic_report_diagnostic.
1142         * c-errors.c (pedwarn_c99): Likewise.
1143         (pedwarn_c90): Likewise.
1144
1145 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
1146
1147         PR c++/80038
1148         * c-gimplify.c (c_gimplify_expr): Remove calls to
1149         cilk_gimplifY_call_params_in_spawned_fn.
1150
1151 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
1152
1153         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1154         hint for removing extra semicolon.
1155
1156 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
1157
1158         PR c/80468
1159         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1160         enabled, set specs->type to integer_type_node.
1161
1162 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
1163
1164         * c-array-notation.c: Fix typo in comment.
1165
1166 2017-03-29  Marek Polacek  <polacek@redhat.com>
1167
1168         PR c/79730
1169         * c-decl.c (finish_decl): Check VAR_P.
1170
1171 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
1172
1173         PR middle-end/80162
1174         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1175         * c-typeck.c (c_mark_addressable): Likewise.  Look through
1176         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1177         to ARRAY_TYPE.
1178         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1179
1180 2017-03-23  Marek Polacek  <polacek@redhat.com>
1181
1182         * c-tree.h: Remove a C_RID_YYCODE reference.
1183
1184 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
1185
1186         PR c/80097
1187         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1188         optional COMPOUND_EXPR with ubsan instrumentation.
1189
1190 2017-03-17  Marek Polacek  <polacek@redhat.com>
1191
1192         * c-parser.c: Add C11 references.
1193
1194 2017-03-15  Marek Polacek  <polacek@redhat.com>
1195
1196         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1197
1198 2017-03-11  Marek Polacek  <polacek@redhat.com>
1199
1200         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
1201
1202 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
1203
1204         PR translation/79848
1205         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1206         "%qs".
1207         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1208
1209 2017-03-09  Marek Polacek  <polacek@redhat.com>
1210
1211         PR sanitizer/79757
1212         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1213         parameter declarations with initializers.
1214
1215 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
1216
1217         PR c/79969
1218         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1219         TYPE_STUB_DECL.
1220
1221 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
1222
1223         PR c/79834
1224         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1225         for "may only be used in compound statements" diagnostics, change it
1226         such that the same translatable string is used for all pragmas.  For
1227         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1228         diagnostics.
1229         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1230         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1231         "may only be used in compound statements" diagnostics, such that the
1232         same translatable string is used for all pragmas.
1233
1234 2017-03-04  Marek Polacek  <polacek@redhat.com>
1235
1236         PR c/79847
1237         * c-decl.c (implicit_decl_warning): Add missing space.
1238
1239 2017-03-03  Marek Polacek  <polacek@redhat.com>
1240
1241         PR c/79758
1242         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1243         current_function_prototype_arg_types is error_mark_node.  Fix
1244         formatting.  Use TREE_VALUE instead of TREE_TYPE.
1245
1246 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
1247
1248         PR c/79837
1249         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1250         %<min%> or %<max%> in the diagnostics, instead mention identifier.
1251         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1252         diagnostics.
1253
1254         PR c/79836
1255         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1256         instead of %<_Generic>.
1257         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1258         (c_parser_omp_target_exit_data): Use %<release%> instead of
1259         %<release>.
1260
1261 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
1262
1263         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1264         instead of just cond ? "..." : "...".
1265         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1266         for "enter"/"exit" keyword.
1267         (c_finish_oacc_routine): Don't use %s to supply portions of the
1268         message.
1269
1270 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
1271
1272         PR c++/79588
1273         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1274         handle -Wrestrict here.
1275         * c-typeck.c (build_function_call_vec): Adjust
1276         check_function_arguments caller.
1277
1278 2017-02-23  Richard Biener  <rguenther@suse.de>
1279
1280         PR c/79684
1281         * gimple-parser.c (c_parser_gimple_statement): Use set_error
1282         to initialize c_exprs to return.
1283         (c_parser_gimple_binary_expression): Likewise.
1284         (c_parser_gimple_unary_expression): Likewise.
1285         (c_parser_gimple_postfix_expression): Likewise.
1286
1287 2017-02-22  Marek Polacek  <polacek@redhat.com>
1288
1289         PR c/79662
1290         * c-typeck.c (convert_arguments): Handle error_mark_node.
1291
1292 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1293
1294         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1295         value of c_parser_parse_ssa_name against error_mark_node and emit
1296         error if ssa name is anonymous and written as default definition.
1297
1298 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1299
1300         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1301         FMA_EXPR.
1302
1303 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
1304
1305         PR c++/79512
1306         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1307         ignore #pragma omp target even when not followed by identifier.
1308
1309 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1310
1311         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1312         (c_parser_gimple_unary_expression): Likewise.
1313
1314 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
1315
1316         * c-parser.c (c_parser_oacc_declare): Add missing space in
1317         diagnostics.
1318
1319 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1320
1321         PR c/79478
1322         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1323         set_c_expr_source_range when parsing ssa-name.
1324
1325 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
1326         Richard Biener  <rguenther@suse.de>
1327
1328         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1329         building IL when arguments are error_mark_node.
1330         (c_parser_gimple_unary_expression): Likewise.
1331         (c_parser_gimple_if_stmt): Likewise.
1332         (c_parser_gimple_switch_stmt): Likewise.
1333         (c_parser_gimple_return_stmt): Likewise.
1334         (c_parser_parse_ssa_name): When name lookup fails do not build
1335         an SSA name.  Use undeclared rather than not declared in error
1336         reporting.
1337
1338 2017-02-09  Marek Polacek  <polacek@redhat.com>
1339
1340         PR c/79428
1341         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1342         instead of c_parser_skip_until_found.
1343
1344 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
1345
1346         PR c/79431
1347         * c-parser.c (c_parser_omp_declare_target): Don't invoke
1348         symtab_node::get on automatic variables.
1349
1350 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
1351             Chung-Lin Tang  <cltang@codesourcery.com>
1352
1353         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1354         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1355         semantic checking.
1356         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1357
1358 2017-02-07  Richard Biener  <rguenther@suse.de>
1359
1360         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1361         (c_parser_gimple_postfix_expression_after_primary):
1362         Do not use c_build_function_call_vec to avoid folding and promotion.
1363         Simplify.
1364
1365 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
1366
1367         PR lto/79061
1368         * c-decl.c (pop_scope): Pass main_input_filename to
1369         build_translation_unit_decl.
1370
1371 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
1372
1373         * c-parser.c: Include "read-rtl-function.h" and
1374         "run-rtl-passes.h".
1375         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1376         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
1377         production.  Update for renaming of field "gimple_pass" to
1378         "gimple_or_rtl_pass".  If __RTL was seen, call
1379         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
1380         to an auto_timevar, to cope with early exit.
1381         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1382         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1383         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1384         Handle RID_RTL.
1385         (c_parser_parse_rtl_body): New function.
1386         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1387         (struct c_declspecs): Rename field "gimple_pass" to
1388         "gimple_or_rtl_pass".  Add field "rtl_p".
1389         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1390         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1391         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1392         (c_parser_gimple_or_rtl_pass_list): ...this.
1393
1394 2017-01-20  Marek Polacek  <polacek@redhat.com>
1395
1396         PR c/64279
1397         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1398
1399 2017-01-13  Richard Biener  <rguenther@suse.de>
1400
1401         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1402         nops.
1403
1404 2017-01-13  Richard Biener  <rguenther@suse.de>
1405
1406         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1407         _Literal ( type-name ) number.
1408
1409 2017-01-12  Richard Biener  <rguenther@suse.de>
1410
1411         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1412         __MEM.
1413
1414 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
1415
1416         PR c++/72813
1417         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1418         PCH file.
1419
1420 2017-01-11  Richard Biener  <rguenther@suse.de>
1421
1422         PR bootstrap/79052
1423         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1424         returns on parse errors.
1425
1426 2017-01-04  Marek Polacek  <polacek@redhat.com>
1427
1428         PR c++/64767
1429         * c-parser.c (c_parser_postfix_expression): Mark zero character
1430         constants by setting original_type in c_expr.
1431         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1432         with a zero character constant.
1433         (char_type_p): New function.
1434
1435 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
1436
1437         * c-parser.c (c_parser_declaration_or_fndef): Create a
1438         rich_location at init_loc and parse it to start_init.
1439         (last_init_list_comma): New global.
1440         (c_parser_braced_init): Update last_init_list_comma when parsing
1441         commas.  Pass it to pop_init_level.  Pass location of closing
1442         brace to pop_init_level.
1443         (c_parser_postfix_expression_after_paren_type): Create a
1444         rich_location at type_loc and parse it to start_init.
1445         (c_parser_omp_declare_reduction): Likewise for loc.
1446         * c-tree.h (start_init): Add rich_location * param.
1447         (pop_init_level): Add location_t param.
1448         * c-typeck.c (struct initializer_stack): Add field
1449         "missing_brace_richloc".
1450         (start_init): Add richloc param, use it to initialize
1451         the stack node's missing_brace_richloc.
1452         (last_init_list_comma): New decl.
1453         (finish_implicit_inits): Pass last_init_list_comma to
1454         pop_init_level.
1455         (push_init_level): When finding missing open braces, add fix-it
1456         hints to the richloc.
1457         (pop_init_level): Add "insert_before" param and pass it
1458         when calling pop_init_level.  Add fixits about missing
1459         close braces to any richloc.  Use the richloc for the
1460         -Wmissing-braces warning.
1461         (set_designator): Pass last_init_list_comma to pop_init_level.
1462         (process_init_element): Likewise.
1463
1464 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1465
1466         Update copyright years.
1467
1468 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
1469
1470         PR bootstrap/78817
1471         * c-typeck.c (build_function_call_vec): If check_function_arguments
1472         returns true, set TREE_NO_WARNING on CALL_EXPR.
1473
1474         PR c/77767
1475         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1476         to *expr instead of overwriting it.
1477
1478 2016-12-20  Richard Biener  <rguenther@suse.de>
1479
1480         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1481         error recovery.
1482         (c_parser_gimple_statement): Only build assigns for non-error
1483         stmts.
1484         (c_parser_gimple_postfix_expression_after): Improve error recovery.
1485
1486 2016-12-14  Martin Jambor  <mjambor@suse.cz>
1487
1488         * c-parser.c: Include omp-general.h and omp-offload.h instead of
1489         omp-low.h.
1490         (c_finish_oacc_routine): Adjusted call to
1491         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1492         to use their new names.
1493         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1494         use its new name.
1495         (c_parser_oacc_update): Likewise.
1496         (c_parser_omp_simd): Likewise.
1497         (c_parser_omp_target_update): Likewise.
1498         * c-typeck.c: Include omp-general.h instead of omp-low.h.
1499         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1500         name.
1501         (c_finish_omp_cancellation_point): Likewise.
1502         * gimple-parser.c: Do not include omp-low.h
1503
1504 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
1505             James Norris  <jnorris@codesourcery.com>
1506
1507         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1508         EXIT_DATA,WAIT} are not used in compound statements.
1509         (c_parser_oacc_enter_exit_data): Update diagnostics.
1510
1511 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1512
1513         PR c++/71973
1514         * c-decl.c (diagnose_mismatched_decls): Use
1515         OPT_Wbuiltin_declaration_mismatch here too.
1516
1517 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
1518             Alan Hayward  <alan.hayward@arm.com>
1519             David Sherwood  <david.sherwood@arm.com>
1520
1521         * c-decl.c (merge_decls): Use SET_DECL_MODE.
1522         (make_label, finish_struct): Likewise.
1523
1524 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
1525             Richard Biener  <rguenther@suse.de>
1526
1527         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1528         * config-lang.in (gtfiles): Add c/c-parser.h.
1529         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1530         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1531         * c-parser.c (enum c_id_kind, struct c_token,
1532         c_parser_next_token_is, c_parser_next_token_is_not,
1533         c_parser_next_token_is_keyword,
1534         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1535         Split out to ...
1536         * c-parser.h: ... new header.
1537         * c-parser.c: Include c-parser.h and gimple-parser.h.
1538         (c_parser_peek_token, c_parser_peek_2nd_token,
1539         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1540         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1541         c_parser_error, c_parser_require, c_parser_skip_until_found,
1542         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1543         c_parser_type_name): Export.
1544         (c_parser_tokens_buf): New function.
1545         (c_parser_error): Likewise.
1546         (c_parser_set_error): Likewise.
1547         (c_parser_declspecs): Handle RID_GIMPLE.
1548         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1549         via c_parser_parse_gimple_body.
1550         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1551         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1552         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1553         c_parser_error, c_parser_require, c_parser_skip_until_found,
1554         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1555         c_parser_type_name): Declare.
1556         (struct c_parser): Declare forward.
1557         (c_parser_tokens_buf): Declare.
1558         (c_parser_error): Likewise.
1559         (c_parser_set_error): Likewise.
1560         * gimple-parser.c: New file.
1561         * gimple-parser.h: Likewise.
1562
1563 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1564
1565         PR c/35503
1566         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1567         warn_for_restrict.
1568
1569 2016-09-11  Le-Chun Wu  <lcwu@google.com>
1570             Mark Wielaard  <mjw@redhat.com>
1571
1572         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1573         to the given -Wshadow= variant.
1574
1575 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1576
1577         * c-typeck.c: Include memmodel.h.
1578
1579 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
1580
1581         PR target/77957
1582         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1583         instead of lhd_return_null_tree_v.
1584
1585 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
1586
1587         PR c++/69733
1588         * c-decl.c (smallest_type_quals_location): New static function.
1589         (grokdeclarator): Try to find the correct location for an ignored
1590         qualifier.
1591
1592 2016-09-26  Marek Polacek  <polacek@redhat.com>
1593
1594         PR c/7652
1595         * c-decl.c (pop_scope): Add gcc_fallthrough.
1596
1597 2016-09-26  Marek Polacek  <polacek@redhat.com>
1598
1599         PR c/7652
1600         * c-parser.c (struct c_token): Add flags field.
1601         (c_lex_one_token): Pass it to c_lex_with_flags.
1602         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1603         into IFN_FALLTHROUGH.
1604         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
1605         attribute fallthrough after a case label or default label.
1606         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1607
1608 2016-09-24  Marek Polacek  <polacek@redhat.com>
1609
1610         PR c/77490
1611         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1612         have boolean value.  Warn about ++/-- on booleans.
1613
1614 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
1615
1616         * c-parser.c (incomplete_record_decls): Remove unnecessary
1617         = vNULL initialization of file scope vec.
1618
1619 2016-09-16  Marek Polacek  <polacek@redhat.com>
1620
1621         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1622
1623 2016-09-14  Marek Polacek  <polacek@redhat.com>
1624
1625         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1626         (fix_array_notation_expr): Likewise.
1627         * c-decl.c (finish_decl): Likewise.
1628         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1629         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1630         (function_to_pointer_conversion): Use false instead of 0.
1631         (convert_lvalue_to_rvalue): Likewise.
1632         (parser_build_unary_op): Likewise.
1633         (build_atomic_assign): Likewise.
1634         (build_unary_op): Change nonconvert parameter type to bool, use
1635         true/false instead of 1/0.
1636         (build_binary_op): Use true instead of 1.
1637
1638 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
1639
1640         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1641         of add_fixit_insert to add_fixit_insert_before.
1642
1643 2016-09-13  Marek Polacek  <polacek@redhat.com>
1644
1645         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
1646         it.
1647
1648 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1649
1650         PR c++/77496
1651         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1652         COMPOUND_EXPR to warn_for_omitted_condop.
1653
1654 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
1655
1656         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1657         c_get_substring_location for this new langhook.
1658
1659 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
1660
1661         PR c/65467
1662         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1663         flag_openmp.
1664         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1665         instead of mark_exp_read on low_bound/length expression.
1666         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1667         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1668         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1669         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1670         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1671         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1672         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1673         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1674         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1675         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1676         instead of mark_expr_read.
1677         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1678         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1679         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1680         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1681         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1682         array section bases outside of depend clause, for depend clause
1683         use convert_lvalue_to_rvalue on the base.
1684         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1685         linear, aligned, map, to and from clauses.
1686         (c_omp_clause_copy_ctor): New function.
1687
1688 2016-09-01  Marek Polacek  <polacek@redhat.com>
1689
1690         PR c/7652
1691         * c-typeck.c (composite_type): Add FALLTHRU comment.
1692
1693 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
1694
1695         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1696         to the insertion fixits for "struct", "union", and "enum".
1697
1698 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
1699
1700         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1701         rather than add_fixit_misspelled_id.
1702         (undeclared_variable): Likewise.
1703         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
1704         now-redundant "here" params from add_fixit_insert method calls.
1705         (c_parser_parameter_declaration): Likewise.
1706         * c-typeck.c (build_component_ref): Remove now-redundant range
1707         param from add_fixit_replace method calls.
1708
1709 2016-08-25  Marek Polacek  <polacek@redhat.com>
1710
1711         * c-typeck.c (parser_build_binary_op): Pass LHS to
1712         warn_logical_not_parentheses.
1713
1714 2016-08-25  Marek Polacek  <polacek@redhat.com>
1715
1716         PR c/77323
1717         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1718         or _FloatN or _FloatNx is not supported.
1719         (finish_declspecs): Set type to integer_type_node when _FloatN or
1720         _FloatNx is not supported.
1721
1722 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
1723
1724         PR c/32187
1725         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1726         (struct c_declspecs): Add field floatn_nx_idx.
1727         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1728         and _FloatNx type specifiers.
1729         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1730         (c_parser_declspecs, c_parser_attribute_any_word)
1731         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1732         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1733         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1734         narrower than double.
1735
1736 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
1737             Martin Liska  <mliska@suse.cz>
1738
1739         PR c/67410
1740         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1741         % to determine val element to change.  Assert that
1742         wchar_bytes * charwidth fits into val array.
1743
1744 2016-08-12  Marek Polacek  <polacek@redhat.com>
1745
1746         PR c/7652
1747         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1748         (c_parser_postfix_expression): Likewise.
1749         * c-typeck.c (build_unary_op): Adjust fall through comment.
1750         (c_mark_addressable): Likewise.
1751
1752 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
1753
1754         PR c/72816
1755         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1756         array member through typedef, for orig_qual_indirect == 0 clear
1757         orig_qual_type.
1758
1759 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
1760
1761         PR c/64955
1762         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1763         this up to selftest::run_c_tests.
1764         (selftest::run_c_tests): New function.
1765
1766 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
1767
1768         * c-parser.c (struct oacc_routine_data): Add error_seen and
1769         fndecl_seen members.
1770         (c_finish_oacc_routine): Use these.
1771         (c_parser_declaration_or_fndef): Adjust.
1772         (c_parser_oacc_routine): Likewise.  Support more C language
1773         constructs, and improve diagnostics.  Move pragma context
1774         checking...
1775         (c_parser_pragma): ... here.
1776
1777         * c-parser.c (struct oacc_routine_data): New.
1778         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1779         Simplify code.
1780         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
1781         declare target" attribute.
1782
1783 2016-08-01  Jan Beulich  <jbeulich@suse.com>
1784
1785         * c-fold.c (c_fully_fold_internal): Also emit shift count
1786         warnings for vector types.
1787         * c-typeck.c (build_binary_op): Likewise.
1788
1789 2016-07-29  Marek Polacek  <polacek@redhat.com>
1790
1791         PR c/71742
1792         * c-decl.c (finish_struct): Rephrase an error message.
1793
1794         PR c/71853
1795         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1796         to error node for invalid code.
1797
1798         PR c/71573
1799         * c-decl.c (implicitly_declare): Return decl early not only for
1800         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1801
1802 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
1803
1804         PR c/71969
1805         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1806         on GNU extern inline functions.
1807
1808 2016-07-29  Marek Polacek  <polacek@redhat.com>
1809
1810         PR c/71583
1811         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1812         check expr.value.
1813
1814 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
1815
1816         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1817
1818 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1819
1820         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1821         spellcheck-tree.h
1822         (best_macro_match): Likewise, converting from a typedef to a
1823         subclass.
1824         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1825         (lookup_name_fuzzy): Update for change of best_macro_match to a
1826         subclass with a ctor that calls cpp_forall_identifiers.
1827
1828 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1829
1830         * c-decl.c (implicit_decl_warning): Update for conversion of
1831         return type of lookup_name_fuzzy to const char *.
1832         (undeclared_variable): Likewise.
1833         (lookup_name_fuzzy): Convert return type from tree to
1834         const char *.
1835         * c-parser.c (c_parser_declaration_or_fndef): Update for
1836         conversion of return type of lookup_name_fuzzy to const char *.
1837         (c_parser_parameter_declaration): Likewise.
1838
1839 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
1840
1841         * c-parser.c (c_parser_oacc_declare): Don't scan for
1842         GOMP_MAP_POINTER.
1843         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1844         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1845         zero-length subarrays.
1846
1847 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
1848
1849         PR c/71858
1850         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1851         instead of FUZZY_LOOKUP_NAME.
1852         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1853         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1854
1855 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
1856
1857         PR c/71858
1858         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1859
1860 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1861
1862         * c-parser.c (c_parser_generic_selection): Make type of variable
1863         auto_vec.
1864         (c_parser_omp_declare_simd): Likewise.
1865
1866 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1867
1868         * c-decl.c (struct c_struct_parse_info): Change member types
1869         from vec to auto_vec.
1870         (start_struct): Adjust.
1871         (finish_struct): Likewise.
1872
1873 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
1874
1875         PR c/71719
1876         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1877
1878 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
1879
1880         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1881         Move pragma context checking into...
1882         (c_parser_omp_cancellation_point): ... here, and improve
1883         diagnostic messages.
1884         * c-typeck.c (c_finish_omp_cancel)
1885         (c_finish_omp_cancellation_point): Improve diagnostic messages.
1886
1887 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
1888
1889         PR c/71685
1890         * c-typeck.c (c_build_qualified_type): Don't clear
1891         C_TYPE_INCOMPLETE_VARS for the main variant.
1892
1893 2016-06-28  Martin Sebor  <msebor@redhat.com>
1894
1895         PR c/71552
1896         * c-typeck.c (output_init_element): Diagnose incompatible types
1897         before non-constant initializers.
1898
1899 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
1900
1901         * Make-lang.in: Don't cat ../stage_current if it does not exist.
1902
1903 2016-06-23  Andi Kleen  <ak@linux.intel.com>
1904
1905         * Make-lang.in: Add support for autofdo.
1906
1907 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
1908
1909         PR c/70339
1910         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1911         (implicit_decl_warning): When issuing warnings for implicit
1912         declarations, attempt to provide a suggestion via
1913         lookup_name_fuzzy.
1914         (undeclared_variable): Likewise when issuing errors.
1915         (lookup_name_in_scope): Likewise.
1916         (struct edit_distance_traits<cpp_hashnode *>): New struct.
1917         (best_macro_match): New typedef.
1918         (find_closest_macro_cpp_cb): New function.
1919         (lookup_name_fuzzy): New function.
1920         * c-parser.c: Include gcc-rich-location.h.
1921         (c_token_starts_typename): Split out case CPP_KEYWORD into...
1922         (c_keyword_starts_typename): ...this new function.
1923         (c_parser_declaration_or_fndef): When issuing errors about
1924         missing "struct" etc, add a fixit.  For other kinds of errors,
1925         attempt to provide a suggestion via lookup_name_fuzzy.
1926         (c_parser_parms_declarator): When looking ahead to detect typos in
1927         type names, also reject CPP_KEYWORD.
1928         (c_parser_parameter_declaration): When issuing errors about
1929         unknown type names, attempt to provide a suggestion via
1930         lookup_name_fuzzy.
1931         * c-tree.h (c_keyword_starts_typename): New prototype.
1932
1933 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
1934
1935         PR c/71601
1936         * c-typeck.c (build_conditional_expr): Return error_mark_node if
1937         c_common_type returns error_mark_node.
1938
1939 2016-06-19  Martin Sebor  <msebor@redhat.com>
1940
1941         PR c/69507
1942         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1943         __alignof__ (expression).
1944
1945 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1946
1947         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1948
1949 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1950
1951         * c-typeck.c (build_component_ref): Simplify fixit code by
1952         using gcc_rich_location::add_fixit_misspelled_id.
1953         (set_init_label): Likewise.
1954
1955 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
1956
1957         * c-parser.c (c_parser_initelt): Provide location of name for new
1958         location_t param of set_init_label.
1959         * c-tree.h (set_init_label): Add location_t param.
1960         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1961         param and use it when issuing error messages about unrecognized
1962         field names.  Attempt to provide a fixit hint if appropriate,
1963         otherwise update the error message to provide the type name.
1964
1965 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
1966
1967         PR c/71381
1968         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1969         Loosen checking.
1970
1971 2016-06-08  Martin Sebor  <msebor@redhat.com>
1972             Jakub Jelinek  <jakub@redhat.com>
1973
1974         PR c++/70507
1975         PR c/68120
1976         * c-typeck.c (convert_arguments): Don't promote last argument
1977         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1978
1979 2016-06-08  Marek Polacek  <polacek@redhat.com>
1980
1981         PR c/71418
1982         * c-decl.c (grokdeclarator): Check TYPE_P.
1983
1984         PR c/71426
1985         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1986         code.
1987
1988 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
1989
1990         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1991         and structure element reference, capture the location of the
1992         element name token and pass it to build_component_ref.
1993         (c_parser_postfix_expression_after_primary): Likewise for
1994         structure element dereference.
1995         (c_parser_omp_variable_list): Likewise for
1996         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1997         * c-tree.h (build_component_ref): Add location_t param.
1998         * c-typeck.c (build_component_ref): Add location_t param
1999         COMPONENT_LOC.  Use it, if available, when issuing hints about
2000         mispelled member names to provide a fixit replacement hint.
2001
2002 2016-06-06  Marek Polacek  <polacek@redhat.com>
2003
2004         PR c/71362
2005         * c-parser.c (c_parser_direct_declarator): Set location.
2006
2007 2016-06-06  Marek Polacek  <polacek@redhat.com>
2008
2009         * c-typeck.c (comptypes_internal): Handle comparisons of
2010         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
2011         TYPE_REF_CAN_ALIAS_ALL.
2012
2013 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
2014
2015         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2016         arguments as addressable when async clause exists.
2017
2018 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
2019
2020         PR c++/71349
2021         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2022         when combined with target construct.
2023
2024 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
2025
2026         * c-parser.c (c_parser_omp_clause_schedule): Warn if
2027         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2028
2029 2016-05-25  Marek Polacek  <polacek@redhat.com>
2030
2031         PR c/71265
2032         * c-decl.c (c_make_fname_decl): Don't check seen_error.
2033
2034         PR c/71266
2035         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2036
2037 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
2038
2039         * c-parser.c (c_parser_oacc_declare): Add support for
2040         GOMP_MAP_FIRSTPRIVATE_POINTER.
2041         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2042         argument with enum c_omp_region_type ort.
2043         (handle_omp_array_sections): Likewise.  Update call to
2044         handle_omp_array_sections_1.
2045         (c_finish_omp_clauses): Add specific errors and warning messages for
2046         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
2047         call to handle_omp_array_sections.
2048
2049 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
2050
2051         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2052
2053 2016-05-24  Richard Biener  <rguenther@suse.de>
2054
2055         PR middle-end/70434
2056         PR c/69504
2057         * c-typeck.c (build_array_ref): Do not complain about indexing
2058         non-lvalue vectors.  Adjust for function name change.
2059
2060 2016-05-20  Martin Sebor  <msebor@redhat.com>
2061
2062         PR c/71115
2063         * c-typeck.c (error_init): Use
2064         expansion_point_location_if_in_system_header.
2065         (warning_init): Same.
2066
2067 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
2068
2069         PR c/71171
2070         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2071         in error-handling.
2072         (c_parser_postfix_expression): Likewise.
2073         * c-tree.h (c_expr::set_error): New method.
2074         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2075         that result's range is initialized.
2076
2077 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
2078
2079         * c-typeck.c (parser_build_unary_op): Fix formatting.
2080
2081 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
2082
2083         * c-decl.c (grokdeclarator): Remove errmsg and use of
2084         targetm.invalid_return_type.
2085         (grokparms): Remove errmsg and use of
2086         targetm.invalid_parameter_type.
2087
2088 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
2089
2090         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2091         function return type.
2092
2093 2016-05-12  Marek Polacek  <polacek@redhat.com>
2094
2095         PR c/70756
2096         * c-decl.c (build_compound_literal): Pass LOC down to
2097         c_incomplete_type_error.
2098         * c-tree.h (require_complete_type): Adjust declaration.
2099         (c_incomplete_type_error): Likewise.
2100         * c-typeck.c (require_complete_type): Add location parameter, pass it
2101         down to c_incomplete_type_error.
2102         (c_incomplete_type_error): Add location parameter, pass it down to
2103         error_at.
2104         (build_component_ref): Pass location down to c_incomplete_type_error.
2105         (default_conversion): Pass location down to require_complete_type.
2106         (build_array_ref): Likewise.
2107         (build_function_call_vec): Likewise.
2108         (convert_arguments): Likewise.
2109         (build_unary_op): Likewise.
2110         (build_c_cast): Likewise.
2111         (build_modify_expr): Likewise.
2112         (convert_for_assignment): Likewise.
2113         (c_finish_omp_clauses): Likewise.
2114
2115 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
2116
2117         PR c/43651
2118         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2119         is enabled.
2120         * c-errors.c (pedwarn_c90): Return true if warned.
2121         * c-tree.h (pedwarn_c90): Change return type to bool.
2122         (enum c_declspec_word): Add new enumerator cdw_atomic.
2123
2124 2016-05-11  Marek Polacek  <polacek@redhat.com>
2125
2126         PR c++/71024
2127         * c-decl.c (diagnose_mismatched_decls): Factor out code to
2128         diagnose_mismatched_attributes and call it.
2129
2130 2016-05-10  Marek Polacek  <polacek@redhat.com>
2131
2132         PR c/70255
2133         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2134         on a declaration following the definition.
2135
2136 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
2137
2138         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2139         parse it through to c_parser_c99_block_statement.
2140         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2141         caller.
2142
2143 2016-05-04  Marek Polacek  <polacek@redhat.com>
2144
2145         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2146         OPT_Wdangling_else.
2147
2148 2016-05-04  Marek Polacek  <polacek@redhat.com>
2149
2150         PR c/48778
2151         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2152         for macro expansions.
2153
2154 2016-05-03  Marek Polacek  <polacek@redhat.com>
2155
2156         PR c/70859
2157         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2158         check_builtin_function_arguments.
2159
2160 2016-05-03  Richard Biener  <rguenther@suse.de>
2161
2162         * Make-lang.in (cc1-checksum.c): For stage-final re-use
2163         the checksum from the previous stage.
2164
2165 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
2166
2167         * c-parser.c (c_parser_oacc_all_clauses): Update call to
2168         c_finish_omp_clauses.
2169         (c_parser_omp_all_clauses): Likewise.
2170         (c_parser_oacc_cache): Likewise.
2171         (c_parser_oacc_loop): Likewise.
2172         (omp_split_clauses): Likewise.
2173         (c_parser_omp_declare_target): Likewise.
2174         (c_parser_cilk_all_clauses): Likewise.
2175         (c_parser_cilk_for): Likewise.
2176         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2177         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2178
2179 2016-05-02  Marek Polacek  <polacek@redhat.com>
2180
2181         PR c/70851
2182         * c-decl.c (grokdeclarator): Diagnose when array's size has an
2183         incomplete type.
2184
2185 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
2186
2187         PR middle-end/70626
2188         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2189         OACC_LOOP_CLAUSE_MASK.
2190         (c_parser_oacc_kernels_parallel): Update call to
2191         c_oacc_split_loop_clauses.
2192
2193 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
2194
2195         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2196         argument to build_modify_expr in two cases.
2197
2198 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
2199
2200         * c-parser.c (c_parser_postfix_expression_after_primary): Call
2201         warn_for_memset instead of warning directly here.
2202
2203 2016-04-26  Marek Polacek  <polacek@redhat.com>
2204
2205         PR c/67784
2206         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2207         out of ...
2208         (c_parser_for_statement): ... here.
2209         (c_parser_if_statement): Use it.
2210         (c_parser_switch_statement): Use it.
2211         (c_parser_while_statement): Use it.
2212
2213         PR c/70791
2214         * c-decl.c (pushdecl): Pass LOCUS down to warning.
2215
2216 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2217
2218         PR c++/69363
2219         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2220         instead of c_finish_cilk_clauses.
2221         * c-tree.h (c_finish_omp_clauses): Add new default argument.
2222         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
2223         floating-point variables in the linear clause for Cilk Plus.
2224
2225 2016-04-18  Michael Matz  <matz@suse.de>
2226
2227         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2228         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2229
2230 2016-04-15  Marek Polacek  <polacek@redhat.com>
2231
2232         PR c/70671
2233         * c-typeck.c (build_unary_op): Pass location down to error and
2234         warning call.
2235
2236 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
2237
2238         PR c/70436
2239         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2240         where needed.
2241         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2242         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2243         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2244         Adjust c_parser_pragma callers.
2245         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
2246         caller.
2247         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2248         c_parser_statement.
2249         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2250         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2251         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2252         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2253         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2254         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2255         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2256         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2257         down where needed.
2258         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
2259         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2260         calls.
2261
2262 2016-04-13  Marek Polacek  <polacek@redhat.com>
2263
2264         PR c/70436
2265         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2266         adjust callers.
2267         (c_parser_statement): Likewise.
2268         (c_parser_c99_block_statement): Likewise.
2269         (c_parser_while_statement): Likewise.
2270         (c_parser_for_statement): Likewise.
2271         (c_parser_if_body): Don't set IF_P here.
2272         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
2273         about dangling else here.
2274         * c-tree.h (c_finish_if_stmt): Adjust declaration.
2275         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
2276         warn about dangling else here.
2277
2278 2016-04-04  Marek Polacek  <polacek@redhat.com>
2279
2280         PR c/70307
2281         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2282
2283 2016-03-31  Marek Polacek  <polacek@redhat.com>
2284
2285         PR c/70297
2286         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2287
2288 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
2289
2290         PR c/70281
2291         * c-parser.c (c_parser_postfix_expression): Set the source range
2292         for uses of "__builtin_types_compatible_p".
2293
2294 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
2295
2296         PR c/70280
2297         * c-typeck.c (composite_type): Don't count void_list_node
2298         into len, if the list is terminated by void_list_node, start
2299         with void_list_node instead of NULL for newargs.  Stop
2300         at void_list_node.
2301
2302 2016-03-16  Marek Polacek  <polacek@redhat.com>
2303
2304         PR c/70093
2305         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2306         nested functions returning VM types.
2307
2308 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
2309
2310         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2311         when calling c_finish_omp_clauses.
2312
2313 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
2314
2315         PR c/69824
2316         * c-decl.c (get_parm_info): Don't queue implicit function declarations
2317         for later.
2318
2319 2016-03-04  Marek Polacek  <polacek@redhat.com>
2320
2321         PR c/69798
2322         * c-parser.c (c_parser_postfix_expression): Call
2323         c_parser_cast_expression rather than c_parser_postfix_expression.
2324
2325 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
2326
2327         PR c/69796
2328         PR c/69974
2329         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2330         of incomplete decls to error_mark_node.
2331
2332 2016-02-24  Marek Polacek  <polacek@redhat.com>
2333
2334         PR c/69819
2335         * c-decl.c (finish_decl): Don't update the copy of the type of a
2336         different decl type.
2337
2338 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
2339
2340         PR objc/69844
2341         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2342         in id_kind reclassification.
2343
2344 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
2345
2346         PR c/69835
2347         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2348
2349 2016-02-16  James Norris  <jnorris@codesourcery.com>
2350
2351         PR c/64748
2352         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2353
2354 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
2355
2356         * c-decl.c (build_null_declspecs): Zero the entire struct.
2357
2358         PR c/69522
2359         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
2360         callers changed.  If nested_p is true, use it to call
2361         finish_implicit_inits.
2362         * c-tree.h (finish_implicit_inits): Declare.
2363         * c-typeck.c (finish_implicit_inits): New function.  Move code
2364         from ...
2365         (push_init_level): ... here.
2366         (set_designator, process_init_element): Call finish_implicit_inits.
2367
2368 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
2369
2370         PR c/69768
2371         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2372         arguments for -Waddress warning.
2373
2374 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
2375
2376         PR c/69669
2377         * c-decl.c (finish_enum): When honoring mode attribute,
2378         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2379
2380 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
2381
2382         PR debug/69518
2383         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2384         all type variants, not just TYPE_MAIN_VARIANT.
2385
2386 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
2387
2388         PR debug/66869
2389         * c-decl.c (c_write_global_declarations_1): Warn with
2390         warn_unused_function if static prototype without definition
2391         is not C_DECL_USED.
2392
2393 2016-01-27  Marek Polacek  <polacek@redhat.com>
2394
2395         PR c/68062
2396         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2397         to unsigned, if needed.  Add -Wsign-compare warning.
2398
2399 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
2400
2401         PR tree-optimization/69483
2402         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2403
2404 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2405
2406         PR c/24293
2407         * c-tree.h (incomplete_record_decls): Declare.
2408         * c-parser.c (incomplete_record_decls): Define.
2409         (c_parser_translation_unit): Iterate through incomplete_record_decls and
2410         report error if any decl has zero size.
2411         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2412         or enum type to incomplete_record_decls.
2413
2414 2016-01-14  Tom de Vries  <tom@codesourcery.com>
2415
2416         PR tree-optimization/68773
2417         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2418         set force_output.
2419
2420 2016-01-14  Marek Polacek  <polacek@redhat.com>
2421
2422         PR c/69262
2423         * c-decl.c (grokdeclarator): Provide more information for invalid
2424         array declarations.
2425
2426 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
2427
2428         * c-parser.c (c_parser_unary_expression): For dereferences, build
2429         a combined location before calling build_indirect_ref, so that
2430         error reports cover the full range, manually updating the c_expr
2431         src_range.
2432
2433 2016-01-06  Marek Polacek  <polacek@redhat.com>
2434
2435         PR sanitizer/69099
2436         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
2437         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
2438         NULL.
2439
2440 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
2441
2442         Update copyright years.
2443
2444 2016-01-04  Marek Polacek  <polacek@redhat.com>
2445
2446         PR c/68908
2447         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
2448         optimization to use __atomic_fetch_* built-in if possible.
2449
2450 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
2451
2452         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2453         into...
2454         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
2455         all users.
2456
2457 2015-12-22  Marek Polacek  <polacek@redhat.com>
2458
2459         PR c/69002
2460         * c-typeck.c (build_component_ref): Warn when acessing elements of
2461         atomic structures or unions.
2462
2463 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
2464
2465         * c-typeck.c: Include "gcc-rich-location.h".
2466         (build_binary_op): In the two places that call binary_op_error,
2467         create a gcc_rich_location and populate it with the location of
2468         the binary op and its two operands.
2469
2470 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2471
2472         * c-parser.c (c_parser_statement_after_labels): When calling
2473         c_finish_return, Use the return expression's location if it has
2474         one, falling back to the location of the first token within it.
2475         * c-typeck.c (c_finish_return): When issuing warnings about
2476         the incorrect presence/absence of a return value, issue a note
2477         showing the declaration of the function.
2478
2479 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2480
2481         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2482         to 4.
2483         (c_parser_peek_nth_token): New function.
2484         (c_parser_peek_conflict_marker): New function.
2485         (c_parser_error): Detect conflict markers and report them as such.
2486
2487 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2488
2489         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2490         to preserve range information for the primary expression
2491         in the call to c_parser_postfix_expression_after_primary.
2492
2493 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2494
2495         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2496         expression location, falling back on the first token location,
2497         rather than always using the latter.
2498
2499 2015-12-16  Marek Polacek  <polacek@redhat.com>
2500
2501         PR c/64637
2502         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2503         available.
2504
2505 2015-12-15  Marek Polacek  <polacek@redhat.com>
2506
2507         PR c/68907
2508         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2509         artificial decl.
2510
2511 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2512
2513         * c-parser.c (c_parser_alignof_expression): Capture location of
2514         closing parenthesis (if any), or of end of unary expression, and
2515         use it to build a src_range for the expression.
2516
2517 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2518
2519         PR c/68757
2520         * c-parser.c (c_parser_get_builtin_args): Add
2521         "out_close_paren_loc" param, and write back to it.
2522         (c_parser_postfix_expression): Capture the closing
2523         parenthesis location for RID_CHOOSE_EXPR,
2524         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2525         RID_BUILTIN_SHUFFLE and use it to set the source range
2526         for such expressions; within RID_BUILTIN_COMPLEX set
2527         the underlying location.
2528
2529 2015-12-07  Marek Polacek  <polacek@redhat.com>
2530
2531         PR c/68668
2532         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2533         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2534
2535 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
2536
2537         * c-tree.h (c_build_va_arg): Adjust prototype.
2538         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2539         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2540         parameter, adjust throughout and issue an error if EXPR is a component
2541         with reverse storage order.
2542
2543 2015-12-02  Jason Merrill  <jason@redhat.com>
2544
2545         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2546         (c_fully_fold_internal, decl_constant_value_for_optimization):
2547         Move from c-common.c.
2548         * c-tree.h: Declare decl_constant_value_for_optimization.
2549         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2550
2551 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
2552
2553         PR c/68162
2554         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2555         following link from declarator to next declarator.  Track original
2556         qualified type and pass it to c_build_qualified_type.
2557         * c-typeck.c (c_build_qualified_type): Add arguments
2558         orig_qual_type and orig_qual_indirect.
2559
2560 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
2561
2562         * c-parser.c (c_parser_omp_clause_name)
2563         (c_parser_oacc_all_clauses): Alphabetical sorting.
2564
2565 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
2566
2567         PR c/68533
2568         * c-decl.c (get_parm_info): Use b->locus instead of input_location
2569         for diagnostics.
2570
2571 2015-12-01  Julian Brown  <julian@codesourcery.com>
2572             Cesar Philippidis  <cesar@codesourcery.com>
2573             James Norris  <James_Norris@mentor.com>
2574
2575         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2576         (c_parser_oacc_clause_use_device): New function.
2577         (c_parser_oacc_all_clauses): Add use_device support.
2578         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2579         (c_parser_oacc_host_data): New function.
2580         (c_parser_omp_construct): Add host_data support.
2581         * c-tree.h (c_finish_oacc_host_data): Add prototype.
2582         * c-typeck.c (c_finish_oacc_host_data): New function.
2583         (c_finish_omp_clauses): Add use_device support.
2584
2585 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
2586
2587         PR c/67106
2588         * c-decl.c: Set TYPE_PACKED in variants.
2589
2590 2015-11-27  Martin Liska  <mliska@suse.cz>
2591
2592         PR c++/68312
2593         * c-array-notation.c (fix_builtin_array_notation_fn):
2594         Use release_vec_vec instead of vec::release.
2595         (build_array_notation_expr): Likewise.
2596         (fix_conditional_array_notations_1): Likewise.
2597         (fix_array_notation_expr): Likewise.
2598         (fix_array_notation_call_expr): Likewise.
2599
2600 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
2601
2602         PR c/63326
2603         * c-parser.c (c_parser_compound_statement_nostart): If
2604         last_label is true, use pragma_stmt instead of pragma_compound
2605         as second c_parser_pragma argument.
2606         (c_parser_omp_ordered, c_parser_omp_target_update,
2607         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2608         false as second argument to c_parser_skip_to_pragma_eol after
2609         diagnosing standalone directives used in pragma_stmt context.
2610
2611 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
2612
2613         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2614         with "if (ENABLE_OFFLOADING)".
2615
2616 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
2617
2618         PR objc/68438
2619         * c-parser.c (c_parser_postfix_expression): Set up source ranges
2620         for various Objective-C constructs: Class.name syntax,
2621         @selector(), @protocol(), @encode(), and [] message syntax.
2622
2623 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
2624
2625         PR 62314
2626         * c-typeck.c (should_suggest_deref_p): New function.
2627         (build_component_ref): Special-case POINTER_TYPE when
2628         generating a "not a structure of union"  error message, and
2629         suggest a "->" rather than a ".", providing a fix-it hint.
2630
2631 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
2632
2633         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2634         candidate into a new function, find_closest_identifier.
2635
2636 2015-11-19  Marek Polacek  <polacek@redhat.com>
2637
2638         PR c/68412
2639         * c-typeck.c (parser_build_binary_op): Properly handle
2640         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2641
2642 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
2643
2644         * c-parser.c (set_c_expr_source_range): Bulletproof both
2645         overloaded implementations against NULL expr->value.
2646         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2647         values.
2648         (c_parser_unary_expression): Likewise when handling addresses of
2649         labels.
2650         (c_parser_postfix_expression): Likewise for statement expressions,
2651         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2652         __builtin_va_arg, and for __builtin_offset_of.
2653         (c_parser_postfix_expression_after_paren_type): Initialize expr's
2654         src_range using the range of the braced initializer.
2655         (c_parser_transaction_expression): Set src_range for "ret" to a
2656         sane pair of values.
2657
2658 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
2659
2660         * c-parser.c (c_finish_omp_declare_simd): Look for
2661         "simd" attribute as well. Update error message.
2662
2663 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
2664
2665         * c-parser.c (c_parser_omp_declare_target): Adjust.
2666
2667 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
2668
2669         * c-typeck.c (c_finish_omp_clauses): Don't mark
2670         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2671
2672 2015-11-14  Marek Polacek  <polacek@redhat.com>
2673
2674         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2675         * c-typeck.c: Likewise.
2676
2677 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2678
2679         * c-decl.c (warn_defaults_to): Pass line_table to
2680         rich_location ctor.
2681         * c-errors.c (pedwarn_c99): Likewise.
2682         (pedwarn_c90): Likewise.
2683         * c-parser.c (set_c_expr_source_range): New functions.
2684         (c_token::get_range): New method.
2685         (c_token::get_finish): New method.
2686         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2687         based on the range from the start of the LHS to the end of the
2688         RHS.
2689         (c_parser_conditional_expression): Likewise, based on the range
2690         from the start of the cond.value to the end of exp2.value.
2691         (c_parser_binary_expression): Call set_c_expr_source_range on
2692         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2693         (c_parser_cast_expression): Call set_c_expr_source_range on ret
2694         based on the cast_loc through to the end of the expr.
2695         (c_parser_unary_expression): Likewise, based on the
2696         op_loc through to the end of op.
2697         (c_parser_sizeof_expression) Likewise, based on the start of the
2698         sizeof token through to either the closing paren or the end of
2699         expr.
2700         (c_parser_postfix_expression): Likewise, using the token range,
2701         or from the open paren through to the close paren for
2702         parenthesized expressions.
2703         (c_parser_postfix_expression_after_primary): Likewise, for
2704         various kinds of expression.
2705         * c-tree.h (struct c_expr): Add field "src_range".
2706         (c_expr::get_start): New method.
2707         (c_expr::get_finish): New method.
2708         (set_c_expr_source_range): New decls.
2709         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2710         on ret for prefix unary ops.
2711         (parser_build_binary_op): Likewise, running from the start of
2712         arg1.value through to the end of arg2.value.
2713
2714 2015-11-13  Marek Polacek  <polacek@redhat.com>
2715
2716         PR c/68320
2717         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2718
2719 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2720
2721         * c-typeck.c: Include spellcheck.h.
2722         (lookup_field_fuzzy_find_candidates): New function.
2723         (lookup_field_fuzzy): New function.
2724         (build_component_ref): If the field was not found, try using
2725         lookup_field_fuzzy and potentially offer a suggestion.
2726
2727 2015-11-12  James Norris  <jnorris@codesourcery.com>
2728             Joseph Myers  <joseph@codesourcery.com>
2729
2730         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2731         (c_parser_omp_clause_name): Handle 'device_resident' clause.
2732         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2733         and PRAGMA_OMP_CLAUSE_LINK.
2734         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2735         and PRAGMA_OACC_CLAUSE_LINK.
2736         (OACC_DECLARE_CLAUSE_MASK): New definition.
2737         (c_parser_oacc_declare): New function.
2738
2739 2015-11-12  Marek Polacek  <polacek@redhat.com>
2740
2741         PR c/67784
2742         * c-parser.c (c_parser_for_statement): Reclassify the token in
2743         a correct scope.
2744
2745 2015-11-11  Marek Polacek  <polacek@redhat.com>
2746
2747         PR c/68107
2748         PR c++/68266
2749         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
2750         checking the size of an array.
2751
2752 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
2753
2754         * c-array-notation.c: Remove unused header files.
2755         * c-aux-info.c: Likewise.
2756         * c-convert.c: Likewise.
2757         * c-decl.c: Likewise.
2758         * c-errors.c: Likewise.
2759         * c-lang.c: Likewise.
2760         * c-objc-common.c: Likewise.
2761         * c-parser.c: Likewise.
2762         * c-typeck.c: Likewise.
2763         * gccspec.c: Likewise.
2764
2765 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
2766             Cesar Philippidis  <cesar@codesourcery.com>
2767             James Norris  <jnorris@codesourcery.com>
2768             Julian Brown  <julian@codesourcery.com>
2769             Nathan Sidwell  <nathan@codesourcery.com>
2770
2771         c/
2772         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2773         routine arg.
2774         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2775         (c_parser_pragma): Parse 'acc routine'.
2776         (OACC_ROUTINE_CLAUSE_MARK): Define.
2777         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2778
2779 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2780
2781         PR debug/67192
2782         * c-typeck.c (c_finish_loop): For unconditional loops, set the
2783         location of the backward-goto to the start of the loop body.
2784
2785 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2786
2787         PR debug/67192
2788         * c-parser.c (c_parser_while_statement): Finish the loop before
2789         parsing ahead for misleading indentation.
2790         (c_parser_for_statement): Likewise.
2791
2792 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
2793
2794         * c-decl.c (finish_struct): If the structure has reverse storage
2795         order, rewrite the type of array fields with scalar component.  Call
2796         maybe_apply_pragma_scalar_storage_order on entry.
2797         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
2798         errors on bit-fields and reverse SSO here and not...
2799         (c_mark_addressable): ...here.
2800         (output_init_element): Adjust call to initializer_constant_valid_p.
2801         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2802
2803 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
2804
2805         * c-decl.c (warn_defaults_to): Update for change in signature
2806         of diagnostic_set_info.
2807         * c-errors.c (pedwarn_c99): Likewise.
2808         (pedwarn_c90): Likewise.
2809         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2810         for textinfo::set_location.
2811
2812 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
2813             Thomas Schwinge  <thomas@codesourcery.com>
2814             James Norris  <jnorris@codesourcery.com>
2815
2816         * c-parser.c (c_parser_omp_clause_name): Add support for
2817         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2818         (c_parser_omp_clause_default): Add is_oacc argument. Handle
2819         default(none) in OpenACC.
2820         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2821         arguments.
2822         (c_parser_oacc_clause_tile): New function.
2823         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2824         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2825         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2826         TILE}.
2827         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2828         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2829         FIRSTPRIVATE}.
2830         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2831         (c_parser_oacc_update): Update the error message for missing clauses.
2832         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2833         and OMP_CLAUSE_INDEPENDENT.
2834
2835 2015-11-05  Marek Polacek  <polacek@redhat.com>
2836
2837         PR c/68090
2838         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2839         deal with pre-evaluation on invalid types.
2840
2841 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
2842             Ilya Verbin  <ilya.verbin@intel.com>
2843
2844         * c-parser.c: Include context.h and gimple-expr.h.
2845         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2846         monotonic together with nonmonotonic.
2847         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
2848         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2849         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2850         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2851         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
2852         expressions on combined target teams before the target.
2853         (c_parser_omp_declare_target): If decl has "omp declare target" or
2854         "omp declare target link" attribute, and cgraph or varpool node already
2855         exists, then set corresponding flags.  Call c_finish_omp_clauses
2856         in the parenthesized extended-list syntax case.
2857         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2858         declare target.
2859         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2860         on OMP_CLAUSE_REDUCTION array sections.
2861         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2862         into the constant offset, or for variable low-bound using
2863         POINTER_PLUS_EXPR.  For structure element based array sections use
2864         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2865         (c_finish_omp_clauses): Drop generic_field_head, structure
2866         elements are now always mapped even as array section bases,
2867         diagnose same var in data sharing and mapping clauses.  Diagnose if
2868         linear step on declare simd is neither a constant nor a uniform
2869         parameter.  Look through POINTER_PLUS_EXPR for array section
2870         reductions.  Diagnose the same var or function appearing multiple
2871         times on the same directive.  Fix up wording for the to clause if t
2872         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
2873         modifier on kinds other than dynamic or guided or nonmonotonic
2874         modifier together with ordered clause.
2875
2876 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
2877             Chung-Lin Tang  <cltang@codesourcery.com>
2878
2879         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2880
2881 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
2882
2883         * c-array-notation.c: Reorder #include's and remove duplicates.
2884         * c-aux-info.c: Likewise.
2885         * c-convert.c: Likewise.
2886         * c-decl.c: Likewise.
2887         * c-errors.c: Likewise.
2888         * c-lang.c: Likewise.
2889         * c-objc-common.c: Likewise.
2890         * c-parser.c: Likewise.
2891         * c-typeck.c: Likewise.
2892
2893 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
2894
2895         PR debug/66068
2896         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2897         after calling build_qualified_type.
2898
2899 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
2900             Thomas Schwinge  <thomas@codesourcery.com>
2901             James Norris  <jnorris@codesourcery.com>
2902             Joseph Myers  <joseph@codesourcery.com>
2903             Julian Brown  <julian@codesourcery.com>
2904             Bernd Schmidt  <bschmidt@redhat.com>
2905
2906         * c-parser.c (c_parser_oacc_shape_clause): New.
2907         (c_parser_oacc_simple_clause): New.
2908         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2909         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2910
2911 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
2912             James Norris  <jnorris@codesourcery.com>
2913             Cesar Philippidis  <cesar@codesourcery.com>
2914
2915         PR c/64765
2916         PR c/64880
2917         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2918         parameters, and handle these.  Adjust all users.
2919         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2920         into...
2921         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
2922         all users.
2923         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2924         declare functions.
2925         (c_finish_omp_construct): Declare function.
2926         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2927         Merge functions into...
2928         (c_finish_omp_construct): ... this new function.
2929
2930 2015-10-22  Richard Biener  <rguenther@suse.de>
2931
2932         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2933         before folding a MINUS_EXPR.
2934
2935 2015-10-21  Marek Polacek  <polacek@redhat.com>
2936
2937         PR c/68024
2938         * c-decl.c (start_function): Warn about vararg functions without
2939         a prototype.
2940
2941 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
2942
2943         * c-typeck.c (build_conditional_expr): Use boolean vector
2944         type for vector comparison.
2945         (build_vec_cmp): New.
2946         (build_binary_op): Use build_vec_cmp for comparison.
2947
2948 2015-10-20  Marek Polacek  <polacek@redhat.com>
2949
2950         * c-parser.c (is_cilkplus_vector_p): Don't define here.
2951
2952 2015-10-20  Marek Polacek  <polacek@redhat.com>
2953
2954         PR c/67964
2955         * c-parser.c (c_parser_attributes): Break out of the loop if the
2956         token after an attribute isn't a comma.
2957
2958 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
2959             Aldy Hernandez  <aldyh@redhat.com>
2960
2961         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2962         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2963         (c_parser_omp_variable_list): Handle structure elements for
2964         map, to and from clauses.  Handle array sections in reduction
2965         clause.  Formatting fixes.
2966         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2967         if clause modifiers.
2968         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2969         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2970         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2971         c_parser_omp_clause_is_device_ptr): New functions.
2972         (c_parser_omp_clause_ordered): Parse optional parameter.
2973         (c_parser_omp_clause_reduction): Handle array reductions.
2974         (c_parser_omp_clause_schedule): Parse optional simd modifier.
2975         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2976         functions.
2977         (c_parser_omp_clause_linear): Parse linear clause modifiers.
2978         (c_parser_omp_clause_depend_sink): New function.
2979         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2980         (c_parser_omp_clause_map): Parse release/delete map kinds and
2981         optional always modifier.
2982         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2983         and c_finish_omp_clauses callers.
2984         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
2985         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2986         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2987         (OMP_CRITICAL_CLAUSE_MASK): Define.
2988         (c_parser_omp_critical): Parse critical clauses.
2989         (c_parser_omp_for_loop): Handle doacross loops, adjust
2990         c_finish_omp_for and c_finish_omp_clauses callers.
2991         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2992         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2993         (OMP_FOR_CLAUSE_MASK): Add linear clause.
2994         (c_parser_omp_for): Disallow ordered clause when combined with
2995         distribute.  Disallow linear clause when combined with distribute
2996         and not combined with simd.
2997         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2998         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2999         parse clauses and if depend clause is found, don't parse a body.
3000         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3001         Allow target parallel without for after it.
3002         (OMP_TASK_CLAUSE_MASK): Add priority clause.
3003         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3004         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3005         invalid kinds.
3006         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3007         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3008         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3009         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3010         functions.
3011         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3012         defaultmap and is_device_ptr clauses.
3013         (c_parser_omp_target): Parse target parallel and target simd.  Set
3014         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
3015         and target exit data.  Diagnose invalid map kinds.
3016         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3017         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3018         construct.
3019         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3020         &omp_priv.
3021         (OMP_TASKLOOP_CLAUSE_MASK): Define.
3022         (c_parser_omp_taskloop): New function.
3023         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3024         handle PRAGMA_OMP_TASKLOOP.
3025         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3026         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3027         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3028         Add IS_OMP argument, handle structure element bases, diagnose
3029         bitfields, pass IS_OMP recursively, diagnose known zero length
3030         array sections in depend clauses, handle array sections in reduction
3031         clause, diagnose negative length even for pointers.
3032         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3033         types, pass IS_OMP down to handle_omp_array_sections_1, handle
3034         array sections in reduction clause, set
3035         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3036         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3037         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3038         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3039
3040 2015-10-06  Marek Polacek  <polacek@redhat.com>
3041
3042         * c-parser.c (c_parser_statement_after_labels): Use
3043         protected_set_expr_location.
3044         (c_parser_omp_clause_num_gangs): Likewise.
3045         (c_parser_omp_clause_num_threads): Likewise.
3046         (c_parser_omp_clause_num_workers): Likewise.
3047         (c_parser_omp_clause_vector_length): Likewise.
3048         (c_parser_omp_clause_num_teams): Likewise.
3049         (c_parser_omp_clause_thread_limit): Likewise.
3050         * c-typeck.c (build_c_cast): Likewise.
3051         (c_cast_expr): Likewise.
3052
3053 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
3054
3055         * c-typeck.c (c_tree_equal): Use real_equal instead of
3056         REAL_VALUES_EQUAL.
3057
3058 2015-10-04  Jason Merrill  <jason@redhat.com>
3059
3060         * c-parser.c (c_lex_one_token): Handle @synchronized.
3061         * c-decl.c (match_builtin_function_types): A declaration of a built-in
3062         can change whether the function is transaction_safe.
3063
3064 2015-10-02  Marek Polacek  <polacek@redhat.com>
3065
3066         PR c/67730
3067         * c-typeck.c (convert_for_assignment): Use the expansion point
3068         location throughout.
3069
3070 2015-10-02  Marek Polacek  <polacek@redhat.com>
3071
3072         PR c/64249
3073         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3074         and pass it down to c_parser_if_statement.
3075         (c_parser_else_body): Add CHAIN parameter and pass it down to
3076         c_parser_statement_after_labels.
3077         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
3078         duplicated if-else-if conditions.
3079
3080 2015-10-01  Marek Polacek  <polacek@redhat.com>
3081
3082         * c-typeck.c (convert_for_assignment): Improve commentary.
3083
3084 2015-09-30  Marek Polacek  <polacek@redhat.com>
3085
3086         PR c/67730
3087         * c-typeck.c (c_finish_return): Use the expansion point location for
3088         certain "return with value" warnings.
3089
3090 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3091
3092         * c-parser.c (pragma_lex): Add loc argument.
3093
3094 2015-09-15  Marek Polacek  <polacek@redhat.com>
3095
3096         PR c/67580
3097         * c-decl.c (tag_exists_p): New function.
3098         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3099         struct/union/enum keywords are missing.
3100         * c-tree.h (tag_exists_p): Declare.
3101
3102 2015-09-15  Marek Polacek  <polacek@redhat.com>
3103
3104         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3105         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3106         Return NULL_TREE instead of 0.
3107         (lookup_name): Return NULL_TREE instead of 0.
3108         (lookup_name_in_scope): Likewise.
3109         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3110         (parser_xref_tag): Use false instead of 0.
3111         (start_struct): Use true instead of 1.
3112         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3113
3114 2015-09-14  Marek Polacek  <polacek@redhat.com>
3115
3116         * c-typeck.c (set_nonincremental_init_from_string): Use
3117         HOST_WIDE_INT_M1U when shifting a negative value.
3118
3119 2015-09-09  Mark Wielaard  <mjw@redhat.com>
3120
3121         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3122         parm against NULL.
3123
3124 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
3125
3126         PR c/67502
3127         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3128         into OMP_FOR_PRE_BODY rather than before the loop.
3129
3130 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
3131
3132         PR c/67501
3133         * c-parser.c (c_parser_oacc_all_clauses,
3134         c_parser_omp_all_clauses): Remove invalid clause from
3135         list of clauses even if parser->error is set.
3136
3137         PR c/67500
3138         * c-parser.c (c_parser_omp_clause_aligned,
3139         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3140         test for errors.
3141         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3142         error_mark_node.
3143
3144         PR c/67495
3145         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3146         instead of c_parser_unary_expression.  If the result is !lvalue_p,
3147         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3148
3149 2015-09-04  Marek Polacek  <polacek@redhat.com>
3150
3151         PR sanitizer/67279
3152         * c-typeck.c (build_binary_op): Don't instrument static initializers.
3153
3154 2015-09-03  Martin Sebor  <msebor@redhat.com>
3155
3156         PR c/66516
3157         * c-typeck.c (convert_arguments, parser_build_unary_op,
3158         build_conditional_expr, c_cast_expr, convert_for_assignment,
3159         build_binary_op, _objc_common_truthvalue_conversion): Call
3160         reject_gcc_builtin.
3161         (c_decl_implicit): Define.
3162
3163 2015-09-02  Marek Polacek  <polacek@redhat.com>
3164
3165         PR c/67432
3166         * c-parser.c (c_parser_enum_specifier): Give a better error for
3167         an empty enum.
3168
3169 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
3170
3171         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3172
3173 2015-08-12  Marek Polacek  <polacek@redhat.com>
3174
3175         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3176         LOC to it.
3177
3178 2015-08-03  Marek Polacek  <polacek@redhat.com>
3179
3180         PR c/67088
3181         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3182         Use it.
3183         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3184
3185 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
3186
3187         * c-parser.c (c_parser_if_body): Take token_indent_info
3188         argument. Call warn_for_misleading_indentation even when the
3189         body is a semicolon.  Extract token_indent_infos corresponding
3190         to the guard, body and next tokens.  Adjust call to
3191         warn_for_misleading_indentation accordingly.
3192         (c_parser_else_body): Likewise.
3193         (c_parser_if_statement): Likewise.
3194         (c_parser_while_statement): Likewise.
3195         (c_parser_for_statement): Likewise.
3196
3197 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
3198             Manuel López-Ibáñez  <manu@gcc.gnu.org>
3199
3200         * c-decl.c (get_parm_info): Remove static var. Update warning
3201         message.
3202
3203 2015-07-27  Marek Polacek  <polacek@redhat.com>
3204
3205         PR c++/66555
3206         PR c/54979
3207         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3208
3209 2015-07-20  Marek Polacek  <polacek@redhat.com>
3210
3211         PR c++/55095
3212         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3213         (build_binary_op): Warn about left shift overflows.
3214
3215 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
3216
3217         * c-array-notation.c: Adjust includes for flags.h changes.
3218         * c-objc-common.c: Likewise.
3219
3220 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
3221
3222         * c-array-notation.c: Adjust includes.
3223         * c-aux-info.c: Likewise.
3224         * c-convert.c: Likewise.
3225         * c-decl.c: Likewise.
3226         * c-errors.c: Likewise.
3227         * c-lang.c: Likewise.
3228         * c-objc-common.c: Likewise.
3229         * c-parser.c: Likewise.
3230         * c-typeck.c: Likewise.
3231
3232 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3233
3234         PR fortran/66605
3235         * c-decl.c (finish_function): Call do_warn_unused_parameter.
3236
3237 2015-06-29  Marek Polacek  <polacek@redhat.com>
3238
3239         PR c/66322
3240         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3241         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
3242         about -Wswitch-bool here.
3243         (do_case): Update c_add_case_label call.
3244         (c_finish_case): Update c_do_switch_warnings call.
3245
3246 2015-06-27  Marek Polacek  <polacek@redhat.com>
3247
3248         * c-typeck.c: Use VECTOR_TYPE_P throughout.
3249
3250 2015-06-26  Marek Polacek  <polacek@redhat.com>
3251
3252         * c-array-notation.c (fix_builtin_array_notation_fn): Use
3253         INDIRECT_REF_P.
3254         * c-typeck.c (array_to_pointer_conversion): Likewise.
3255         (build_unary_op): Likewise.
3256         (c_finish_return): Likewise.
3257
3258 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
3259
3260         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3261         * c-parser.c: Likewise.
3262
3263 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
3264
3265         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3266         instead of pointer_hash.
3267         (detect_field_duplicates): Likewise.
3268
3269 2015-06-25  Marek Polacek  <polacek@redhat.com>
3270
3271         * c-array-notation.c: Use VAR_P throughout.
3272         * c-decl.c: Likewise.
3273         * c-objc-common.c: Likewise.
3274         * c-parser.c: Likewise.
3275         * c-typeck.c: Likewise.
3276
3277 2015-06-25  Marek Polacek  <polacek@redhat.com>
3278
3279         * c-decl.c: Use is_global_var throughout.
3280         * c-parser.c: Likewise.
3281         * c-typeck.c: Likewise.
3282
3283 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
3284
3285         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3286         * c-aux-info.c: Likewise.
3287         * c-convert.c: Likewise.
3288         * c-decl.c: Likewise.
3289         * c-errors.c: Likewise.
3290         * c-lang.c: Likewise.
3291         * c-objc-common.c: Likewise.
3292         * c-parser.c: Likewise.
3293         * c-typeck.c: Likewise.
3294
3295 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
3296
3297         PR middle-end/66325
3298         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3299         variants.
3300
3301 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
3302
3303         * c-decl.c (pop_scope): Register the main translation unit
3304         through the new debug hook.
3305
3306 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
3307
3308         * c-array-notation.c : Adjust include files.
3309         * c-aux-info.c : Likewise.
3310         * c-convert.c : Likewise.
3311         * c-decl.c : Likewise.
3312         * c-errors.c : Likewise.
3313         * c-lang.c : Likewise.
3314         * c-lang.h : Likewise.
3315         * c-objc-common.c : Likewise.
3316         * c-parser.c : Likewise.
3317         * c-typeck.c : Likewise.
3318
3319 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
3320
3321         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3322         immediately clobber it.
3323         (c_write_global_declarations_1): Remove call to
3324         check_global_declaration_1.
3325         (c_write_global_declarations_2): Remove.
3326         (c_write_final_cleanups): Rename from c_write_global_declarations.
3327         Remove call to finalize_compilation_unit.
3328         Remove calls to debugging hooks.
3329         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3330         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3331         * c-tree.h: Remove c_write_global_declarations.
3332
3333 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
3334
3335         * c-array-notation.c: Adjust includes for restructured coretypes.h.
3336         * c-aux-info.c: Likewise.
3337         * c-convert.c: Likewise.
3338         * c-decl.c: Likewise.
3339         * c-errors.c: Likewise.
3340         * c-lang.c: Likewise.
3341         * c-objc-common.c: Likewise.
3342         * c-parser.c: Likewise.
3343         * c-typeck.c: Likewise.
3344
3345 2015-06-04  Marek Polacek  <polacek@redhat.com>
3346
3347         PR c/66341
3348         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3349         it is a lvalue.
3350
3351 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3352
3353         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3354         Warn for empty struct.
3355         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3356
3357 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
3358
3359         * c-decl.c (start_function): Call plugin before parsing.
3360         (finish_function): Call plugin after parsing.
3361
3362 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3363
3364         PR c/49551
3365         * c-decl.c (merge_decls): Merge DECL_COMMON.
3366
3367 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
3368
3369         * Make-lang.in (check_gcc_pallelize): Define.
3370
3371 2015-05-22  Marek Polacek  <polacek@redhat.com>
3372
3373         PR c/47043
3374         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3375         attributes.
3376
3377 2015-05-21  Marek Polacek  <polacek@redhat.com>
3378
3379         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3380         DECL_BUILT_IN.
3381
3382 2015-05-20  Marek Polacek  <polacek@redhat.com>
3383
3384         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3385         * c-typeck.c: Likewise.
3386
3387 2015-05-19  Marek Polacek  <polacek@redhat.com>
3388
3389         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3390
3391 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
3392
3393         PR middle-end/66199
3394         * c-parser.c (c_parser_omp_for_loop): Don't add
3395         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3396         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3397         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3398         constructs.
3399
3400 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
3401
3402         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3403         swaps.
3404
3405 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3406
3407         PR fortran/44054
3408         * c-objc-common.c (c_tree_printer): Replace locus pointer with
3409         accessor function.
3410
3411 2015-05-14  Marek Polacek  <polacek@redhat.com>
3412
3413         PR c/66066
3414         PR c/66127
3415         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3416         rather than with 0.
3417
3418 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
3419
3420         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3421         to add a call to warn_for_misleading_indentation.
3422         (c_parser_else_body): Likewise, adding param "else_loc".
3423         (c_parser_if_statement): Check for misleading indentation.
3424         (c_parser_while_statement): Likewise.
3425         (c_parser_for_statement): Likewise.
3426
3427 2015-05-08  Marek Polacek  <polacek@redhat.com>
3428
3429         PR c/64918
3430         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3431         (output_init_element): Likewise.
3432
3433 2015-05-07  Marek Polacek  <polacek@redhat.com>
3434
3435         PR c/65179
3436         * c-typeck.c (build_binary_op): Warn when left shifting a negative
3437         value.
3438
3439 2015-04-30  Marek Polacek  <polacek@redhat.com>
3440
3441         * c-typeck.c (set_init_label): Call error_at instead of error and
3442         pass LOC to it.
3443
3444         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
3445         the type of a decl.
3446
3447         * c-typeck.c (c_build_va_arg): Clarify the error message.
3448
3449 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
3450
3451         * c-parser.c (c_parser_oacc_enter_exit_data): Use
3452         OMP_STANDALONE_CLAUSES.
3453
3454 2015-04-28  Marek Polacek  <polacek@redhat.com>
3455
3456         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3457
3458 2015-04-28  Marek Polacek  <polacek@redhat.com>
3459
3460         PR c/65901
3461         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3462
3463 2015-04-25  Marek Polacek  <polacek@redhat.com>
3464
3465         PR c/52085
3466         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
3467         attribute.
3468
3469 2015-04-23  Marek Polacek  <polacek@redhat.com>
3470
3471         PR c/65345
3472         * c-decl.c (set_labels_context_r): New function.
3473         (store_parm_decls): Call it via walk_tree_without_duplicates.
3474         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3475         instead of create_tmp_var.  Build TARGET_EXPR instead of
3476         COMPOUND_EXPR.
3477         (build_atomic_assign): Use create_tmp_var_raw instead of
3478         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
3479
3480 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
3481
3482         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3483         (c_parser_omp_target_update): Add missed %> to error_at ().
3484
3485 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
3486
3487         PR target/55143
3488         * c-decl.c (c_default_pointer_mode): Remove definition.
3489         * c-tree.h (c_default_pointer_mode): Remove declaration.
3490
3491 2015-03-27  Tobias Burnus  <burnus@net-b.de>
3492
3493         PR c/65586
3494         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3495         error out.
3496         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3497         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3498         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3499
3500 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
3501
3502         * c-decl.c (c_decl_attributes): Also add "omp declare target"
3503         attribute for DECL_EXTERNAL VAR_DECLs.
3504
3505 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
3506
3507         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3508         argument.
3509
3510 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
3511
3512         PR c/65120
3513         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3514         before preparing arguments to warn_logical_not_parentheses.
3515
3516 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
3517
3518         PR c/65120
3519         * c-typeck.c (parser_build_binary_op): Don't warn for
3520         !!x == y or !b == y where b is _Bool.
3521
3522 2015-03-09  Marek Polacek  <polacek@redhat.com>
3523
3524         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3525         * c-decl.c (grokdeclarator): Likewise.
3526         * c-typeck.c (build_binary_op): Likewise.
3527
3528 2015-02-27  Marek Polacek  <polacek@redhat.com>
3529
3530         PR c/65228
3531         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3532
3533 2015-02-14  Marek Polacek  <polacek@redhat.com>
3534
3535         PR c/64768
3536         * c-decl.c (grokdeclarator): Set the range of a flexible array member
3537         declared through a typedef name.
3538
3539 2015-02-13  Marek Polacek  <polacek@redhat.com>
3540
3541         PR c/65050
3542         * c-decl.c (grokdeclarator): Print also the type when giving
3543         the error message about array's incomplete element type.
3544
3545 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
3546
3547         PR c/64824
3548         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3549         check in the POP macro.
3550
3551 2015-02-09  Marek Polacek  <polacek@redhat.com>
3552
3553         PR c/64856
3554         * c-typeck.c (process_init_element): Don't always wrap
3555         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3556         initializing a range of elements.
3557
3558 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
3559
3560         PR c/64824
3561         PR c/64868
3562         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3563
3564 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
3565
3566         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3567         processing enum declaration.
3568
3569 2015-01-29  Marek Polacek  <polacek@redhat.com>
3570
3571         PR c/64709
3572         * c-typeck.c (pop_init_level): If constructor_elements has
3573         exactly one element with integer_zerop value, set constructor_zeroinit
3574         to 1.  Remove braces around warning_init call.
3575
3576 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
3577
3578         PR c/64766
3579         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3580         of FUNCTION_DECLs with error_mark_node.
3581
3582 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
3583
3584         PR c/64778
3585         * c-typeck.c (convert_arguments): Return -1 if there are
3586         error_args, even if we've diagnosed too many arguments.
3587
3588 2015-01-21  Richard Biener  <rguenther@suse.de>
3589
3590         PR middle-end/64313
3591         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3592         for builtins the user declared correctly.
3593
3594 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
3595             Bernd Schmidt  <bernds@codesourcery.com>
3596             Cesar Philippidis  <cesar@codesourcery.com>
3597             James Norris  <jnorris@codesourcery.com>
3598             Jakub Jelinek  <jakub@redhat.com>
3599             Ilmir Usmanov  <i.usmanov@samsung.com>
3600
3601         * c-parser.c: Include "gomp-constants.h".
3602         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3603         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3604         Use OMP_CLAUSE_SET_MAP_KIND.
3605         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3606         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3607         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3608         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3609         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3610         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3611         "copyout", "create", "delete", "deviceptr", "gang", "host",
3612         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3613         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3614         "present_or_create", "pcreate", "seq", "self", "vector",
3615         "vector_length", "wait", "worker".
3616         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3617         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3618         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3619         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3620         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3621         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3622         (c_parser_oacc_data_clause_deviceptr)
3623         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3624         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3625         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3626         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3627         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3628         (c_parser_oacc_parallel, c_parser_oacc_update)
3629         (c_parser_oacc_wait): New functions.
3630         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3631         (c_finish_oacc_data): New prototypes.
3632         * c-typeck.c: Include "gomp-constants.h".
3633         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
3634         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
3635         OMP_CLAUSE_SET_MAP_KIND.
3636         (c_finish_oacc_parallel, c_finish_oacc_kernels)
3637         (c_finish_oacc_data): New functions.
3638         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3639         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3640         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3641         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3642         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3643         GOMP_MAP_FORCE_DEVICEPTR.
3644
3645 2015-01-09  Michael Collison  <michael.collison@linaro.org>
3646
3647         * c-array-notation.c: Include hash-set.h, machmode.h,
3648         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3649         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3650         * c-aux-info.c: Ditto.
3651         * c-convert.c: Ditto.
3652         * c-decl.c: Ditto.
3653         * c-errors.c: Ditto.
3654         * c-lang.c: Dittoxs.
3655         * c-objc-common.c: Ditto.
3656         * c-parser.c: Ditto.
3657         * c-typeck.c: Include hash-set.h, machmode.h,
3658         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3659         fold-const.h, wide-int.h, inchash.h, real.h and
3660         fixed-value.h due to flattening of tree.h.
3661
3662 2015-01-07  Marek Polacek  <polacek@redhat.com>
3663
3664         PR c/64417
3665         * c-typeck.c (process_init_element): Disallow initialization of
3666         a flexible array member with a string constant if the structure
3667         is in an array.
3668
3669 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3670
3671         PR sanitizer/64344
3672         * c-typeck.c (convert_for_assignment, c_finish_return): For
3673         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3674         types also set in_late_binary_op around convert call.
3675         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3676         to integral type casts, if not in_late_binary_op, pass c_fully_fold
3677         result on expr as last argument to ubsan_instrument_float_cast,
3678         if in_late_binary_op, don't use c_save_expr but save_expr.
3679
3680         Update copyright years.
3681
3682 2015-01-05  Marek Polacek  <polacek@redhat.com>
3683
3684         PR c/64423
3685         * c-typeck.c (build_array_ref): Pass loc down to
3686         warn_array_subscript_with_type_char.
3687
3688 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
3689
3690         * c-typeck.c: New behavious for pointers to arrays with qualifiers
3691         (common-pointer-type): For pointers to arrays take qualifiers from
3692         element type.
3693         (build_conditional_expr): Add warnings for lost qualifiers.
3694         (comp-target-types): Allow pointers to arrays with different qualifiers.
3695         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3696         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3697         to PEDWARN_FOR_QUALIFIERS.
3698
3699 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
3700
3701         PR sanitizer/64289
3702         * c-convert.c: Include ubsan.h.
3703         (convert): For real -> integral casts and
3704         -fsanitize=float-cast-overflow don't call convert_to_integer, but
3705         instead instrument the float cast directly.
3706
3707 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
3708
3709         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3710         c_finish_stmt_expr): Remove NULL last argument from
3711         create_tmp_var_raw and create_tmp_var calls.
3712         * c-array-notation.c (fix_builtin_array_notation_fn,
3713         build_array_notation_expr, fix_conditional_array_notations_1,
3714         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3715
3716 2014-11-28  Marek Polacek  <polacek@redhat.com>
3717
3718         PR c/63862
3719         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3720         convert the right operand to integer type.
3721
3722 2014-11-25  Marek Polacek  <polacek@redhat.com>
3723
3724         PR c/63877
3725         * c-decl.c (start_function): Disable -Wmissing-declarations warning
3726         for inline functions.
3727
3728 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
3729
3730         PR target/63764
3731         * c-typeck.c (build_array_ref): Adjust
3732         convert_vector_to_pointer_for_subscript caller.  If it returns true,
3733         call non_lvalue_loc on the result.
3734
3735 2014-11-11  Richard Biener  <rguenther@suse.de>
3736
3737         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3738         to true.
3739
3740 2014-11-10  Andi Kleen  <ak@linux.intel.com>
3741
3742         PR c/60804
3743         * c-parser.c (c_parser_statement_after_labels): Call
3744         check_no_cilk.
3745         (c_parser_if_statement): Dito.
3746         (c_parser_switch_statement): Dito.
3747         (c_parser_while_statement): Dito.
3748         (c_parser_do_statement): Dito.
3749         (c_parser_for_statement): Dito.
3750         * c-typeck.c (c_finish_loop): Dito.
3751
3752 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
3753
3754         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3755         OPT_Wshift_count_overflow in the warnings.
3756
3757 2014-10-30  Marek Polacek  <polacek@redhat.com>
3758
3759         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3760         print the stripped version as well, if they're not the same.
3761
3762 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3763
3764         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3765         machine_mode.
3766
3767 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
3768
3769         * c-decl.c: Adjust include files.
3770         * c-parser.c: Ditto.
3771
3772 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
3773             Tom Tromey  <tromey@redhat.com>
3774
3775         * c-tree.h (enum c_oracle_request): New.
3776         (c_binding_oracle_function): New typedef.
3777         (c_binding_oracle, c_pushtag, c_bind): Declare.
3778         * c-decl.c (c_binding_oracle): New global.
3779         (I_SYMBOL_CHECKED): New macro.
3780         (i_symbol_binding): New function.
3781         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3782         (I_TAG_CHECKED): New macro.
3783         (i_tag_binding): New function.
3784         (I_TAG_BINDING, I_TAG_DECL): Redefine.
3785         (I_LABEL_CHECKED): New macro.
3786         (i_label_binding): New function.
3787         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3788         (c_print_identifier): Save and restore c_binding_oracle.
3789         (c_pushtag, c_bind): New functions.
3790
3791 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
3792
3793         * c-typeck.c: Adjust include files.
3794
3795 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3796
3797         PR c++/53061
3798         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3799         initialization here...
3800         (c_initialize_diagnostics): ... but here. Set defaults after
3801         building pretty-printer.
3802
3803 2014-10-23  Marek Polacek  <polacek@redhat.com>
3804
3805         PR c/63626
3806         * c-decl.c (pop_scope): Don't print warning in external_scope.
3807
3808 2014-10-19  Marek Polacek  <polacek@redhat.com>
3809
3810         PR c/63567
3811         * c-typeck.c (output_init_element): Allow initializing objects with
3812         static storage duration with compound literals even in C99 and add
3813         pedwarn for it.
3814
3815 2014-10-17  Marek Polacek  <polacek@redhat.com>
3816
3817         PR c/63567
3818         * c-typeck.c (digest_init): Allow initializing objects with static
3819         storage duration with compound literals even in C99 and add pedwarn
3820         for it.
3821
3822 2014-10-17  Marek Polacek  <polacek@redhat.com>
3823
3824         PR c/63543
3825         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3826         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3827         error multiple times.  Print the type.
3828
3829 2014-10-17  Marek Polacek  <polacek@redhat.com>
3830
3831         PR c/63549
3832         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3833         type.
3834
3835 2014-10-17  Marek Polacek  <polacek@redhat.com>
3836
3837         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3838         (start_function): Use OPT_Wimplicit_int instead of 0.
3839         (store_parm_decls_oldstyle): Likewise.
3840
3841 2014-10-17  Alan Modra  <amodra@gmail.com>
3842
3843         PR middle-end/61848
3844         * c-decl.c (merge_decls): Don't merge section name or tls model
3845         to newdecl symtab node, instead merge to olddecl.  Override
3846         existing olddecl section name.  Set tls_model for all thread-local
3847         vars, not just OMP thread-private ones.  Remove incorrect comment.
3848
3849 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
3850
3851         * c-decl.c: Adjust include files.
3852
3853 2014-10-14  DJ Delorie  <dj@redhat.com>
3854
3855         * c-parser.c (c_parse_init): Add RID entries for each __intN.
3856         (c_token_starts_typename): Check all __intN, not just __int128.
3857         (c_token_starts_declspecs): Likewise.
3858         (c_parser_declspecs): Likewise.
3859         (c_parser_attribute_any_word): Likewise.
3860         (c_parser_objc_selector): Likewise.
3861         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3862         (struct c_declspecs): Add int_n_idx field to record *which* __intN
3863         is specified.
3864         * c-decl.c (declspecs_add_type): Check for all __intN, not just
3865         __int128.
3866         (finish_declspecs): Likewise.
3867
3868 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
3869
3870         * c-parser.c (c_parser_all_labels): New function to replace
3871         the duplicate code.
3872         (c_parser_statement): Call the new function.
3873
3874 2014-10-09  Marek Polacek  <polacek@redhat.com>
3875
3876         PR c/63480
3877         * c-typeck.c (pop_init_level): Don't warn about initializing
3878         with { }.
3879
3880 2014-10-07  Marek Polacek  <polacek@redhat.com>
3881
3882         PR c/59717
3883         * c-decl.c (header_for_builtin_fn): New function.
3884         (implicitly_declare): Suggest which header to include.
3885
3886 2014-10-07  Marek Polacek  <polacek@redhat.com>
3887
3888         * c-convert.c (convert): Use error_operand_p.
3889         * c-typeck.c (require_complete_type): Likewise.
3890         (really_atomic_lvalue): Likewise.
3891         (digest_init): Likewise.
3892         (handle_omp_array_sections_1): Likewise.
3893
3894 2014-10-03  Marek Polacek  <polacek@redhat.com>
3895
3896         PR c/63453
3897         * c-decl.c (pop_scope): Don't warn about "inline function declared
3898         but never defined" for functions marked with gnu_inline attribute.
3899
3900 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
3901
3902         PR c++/63249
3903         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3904         on low_bound and length.
3905
3906 2014-09-24  Marek Polacek  <polacek@redhat.com>
3907
3908         PR c/61405
3909         PR c/53874
3910         * c-parser.c: Don't define CPP_KEYWORD.
3911         (c_parser_switch_statement): Pass original type to c_finish_case.
3912         * c-tree.h (c_finish_case): Update declaration.
3913         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
3914         conditionally to c_do_switch_warnings.
3915
3916 2014-09-03  Marek Polacek  <polacek@redhat.com>
3917
3918         PR c/62024
3919         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3920         conversions.
3921
3922 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
3923             Balaji V. Iyer  <balaji.v.iyer@intel.com>
3924             Igor Zamyatin  <igor.zamyatin@intel.com>
3925
3926         * c-parser.c (c_parser_cilk_for): New function.
3927         (c_parser_cilk_grainsize): Likewise.
3928         (c_get_temp_regvar): Likewise.
3929         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3930         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3931         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3932         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3933         case.
3934
3935 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
3936
3937         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3938         with using HOST_WIDE_INT without truncation to 'int'
3939
3940 2014-08-22  Marek Polacek  <polacek@redhat.com>
3941
3942         PR c++/62199
3943         * c-typeck.c (parser_build_binary_op): Adjust call to
3944         warn_logical_not_parentheses.
3945
3946 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
3947
3948         PR other/62008
3949         * c-parser.c (c_parser_array_notation): Check for correct
3950         type of an array added.
3951
3952 2014-08-19  Marek Polacek  <polacek@redhat.com>
3953
3954         PR c++/62153
3955         * c-typeck.c (build_binary_op): If either operand of a comparison
3956         is a boolean expression, call maybe_warn_bool_compare.
3957
3958 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
3959
3960         PR c/45584
3961         * c-typeck.c (build_c_cast): Do a conversion even when the
3962         TYPE_MAIN_VARIANTs are the same.
3963
3964 2014-08-19  Marek Polacek  <polacek@redhat.com>
3965
3966         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3967         pedwarn_c99 instead of pedwarn.
3968         (grokfield): Likewise.
3969         (warn_defaults_to): New function.
3970         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3971         Unconditionally call pedwarn_c99 instead of pedwarn.
3972         (start_function): Call warn_defaults_to instead of pedwarn_c99.
3973         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3974         check flag_isoc11 before.
3975         * c-errors.c (pedwarn_c99): Change the return type to bool.
3976         Handle -Wc99-c11-compat.
3977         * c-parser.c (disable_extension_diagnostics): Handle
3978         warn_c99_c11_compat.
3979         (restore_extension_diagnostics): Likewise.
3980         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3981         instead of pedwarn, don't check flag_isoc11 before.
3982         (c_parser_declspecs): Likewise.
3983         (c_parser_alignas_specifier): Likewise.
3984         (c_parser_alignof_expression): Likewise.
3985         (c_parser_generic_selection): Likewise.
3986         * c-tree.h (pedwarn_c99): Update declaration.
3987         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3988         of pedwarn_c99.
3989
3990 2014-08-19  Marek Polacek  <polacek@redhat.com>
3991
3992         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3993         to pedwarn_c90.
3994         * c-errors.c: Include "opts.h".
3995         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3996         * c-parser.c (disable_extension_diagnostics): Handle negative value
3997         of warn_c90_c99_compat, too.
3998         (restore_extension_diagnostics): Likewise.
3999         (c_parser_compound_statement_nostart): Pass
4000         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4001
4002 2014-08-12  Marek Polacek  <polacek@redhat.com>
4003
4004         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4005         Add pedwarn.
4006         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4007         Likewise.
4008         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4009
4010 2014-08-10  Marek Polacek  <polacek@redhat.com>
4011
4012         PR c/51849
4013         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4014         Call pedwarn_c90 instead of pedwarn.
4015         (check_bitfield_type_and_width): Likewise.
4016         (declspecs_add_qual): Likewise.
4017         (declspecs_add_type): Likewise.
4018         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4019         Adjust to only call pedwarn_c90.
4020         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
4021         pedwarn_c90 instead of pedwarn.
4022         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4023         * c-parser.c (disable_extension_diagnostics): Handle
4024         warn_c90_c99_compat.
4025         (restore_extension_diagnostics): Likewise.
4026         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
4027         pedwarn_c90 instead of pedwarn.
4028         (c_parser_initelt): Likewise.
4029         (c_parser_postfix_expression): Likewise.
4030         (c_parser_postfix_expression_after_paren_type): Likewise.
4031         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4032         * c-tree.h: Fix formatting.
4033         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
4034         pedwarn_c90 instead of pedwarn.
4035
4036 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
4037
4038         * c-typeck.c: Remove include of pointer-set.h.
4039
4040 2014-08-07  Marek Polacek  <polacek@redhat.com>
4041
4042         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4043
4044 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
4045
4046         * c-typeck.c: Use hash_map instead of pointer_map.
4047
4048 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
4049
4050         * c-decl.c: Use hash_set instead of pointer_set.
4051
4052 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
4053
4054         PR middle-end/61455
4055         * c-array-notation.c (expand_array_notations): Handling
4056         of DECL_EXPR added.
4057
4058 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
4059
4060         PR c++/60517
4061         * c-typeck.c (c_finish_return): Return 0 instead of the address of
4062         a local variable.
4063
4064 2014-07-30  Tom Tromey  <tromey@redhat.com>
4065
4066         * c-typeck.c (struct constructor_stack) <designator_depth>: New
4067         field.
4068         (really_start_incremental_init, push_init_level): Initialize
4069         designator_depth.
4070         (pop_init_level): Set global designator_depth.
4071         (process_init_element): Check for designated_init attribute.
4072
4073 2014-07-20  Marek Polacek  <polacek@redhat.com>
4074
4075         PR c/61852
4076         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
4077         (implicitly_declare): Pass location to implicit_decl_warning.
4078
4079 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
4080
4081         PR middle-end/61294
4082         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4083         If non-NULL, call c_parser_check_literal_zero.
4084         (c_parser_check_literal_zero): New function.
4085         (c_parser_postfix_expression_after_primary): Adjust
4086         c_parser_expr_list caller, handle -Wmemset-transposed-args.
4087
4088 2014-07-06  Marek Polacek  <polacek@redhat.com>
4089
4090         PR c/6940
4091         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4092         * c-tree.h (C_ARRAY_PARAMETER): Define.
4093         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4094         function parameter.
4095
4096 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
4097             Chen Gang  <gang.chen.5i5j@gmail.com>
4098
4099         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4100         releasing symbol.
4101
4102 2014-07-01  Marek Polacek  <polacek@redhat.com>
4103
4104         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4105         instead of 0 to WARN_FOR_ASSIGNMENT.
4106
4107 2014-07-01  Marek Polacek  <polacek@redhat.com>
4108
4109         PR c/58286
4110         * c-typeck.c (convert_for_assignment): Pass
4111         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4112
4113 2014-06-30  Marek Polacek  <polacek@redhat.com>
4114
4115         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4116         has no_sanitize_undefined attribute.
4117
4118 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
4119
4120         PR middle-end/57541
4121         * c-array-notation.c (fix_builtin_array_notation_fn):
4122         Check for 0 arguments in builtin call. Check that bultin argument is
4123         correct.
4124         * c-parser.c (c_parser_array_notation): Check for incorrect initial
4125         index.
4126
4127 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4128
4129         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4130         qualifiers in __auto_type for atomic types.
4131         (c_parser_typeof_specifier): Discard all type qualifiers in
4132         __typeof__ for atomic types.
4133
4134 2014-06-25  Marek Polacek  <polacek@redhat.com>
4135
4136         PR c/61162
4137         * c-parser.c (c_parser_statement_after_labels): Pass the location of
4138         the return expression to c_finish_return.
4139
4140 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
4141
4142         * c-typeck.c (c_finish_omp_clauses): Make sure
4143         OMP_CLAUSE_LINEAR_STEP has correct type.
4144
4145 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
4146
4147         * c-decl.c: Adjust.
4148
4149 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
4150
4151         * c-parser.c (c_parser_omp_for_loop): For
4152         #pragma omp parallel for simd move lastprivate clause from parallel
4153         to for rather than simd.
4154
4155 2014-06-23  Marek Polacek  <polacek@redhat.com>
4156
4157         * c-typeck.c (parser_build_binary_op): Don't call
4158         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4159
4160 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
4161
4162         * c-parser.c (c_parser_omp_threadprivate): Likewise.
4163         * c-decl.c (merge_decls): Likewise.
4164
4165 2014-06-09  Marek Polacek  <polacek@redhat.com>
4166
4167         PR c/36446
4168         * c-typeck.c (error_init): Call inform instead of error_at.
4169         (pedwarn_init): Call inform instead of pedwarn.
4170         (warning_init): Call inform instead of warning_at.
4171
4172 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
4173
4174         * c-decl.c (merge_decls): Use set_decl_section_name.
4175         (duplicate_decls): Remove node if it exists.
4176
4177 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
4178
4179         PR c/53119
4180         * c-typeck.c (push_init_level, process_init_element,
4181         pop_init_level): Correct check for zero initialization, move
4182         missing brace warning to respect zero initialization.
4183
4184 2014-06-05  Marek Polacek  <polacek@redhat.com>
4185
4186         PR c/56724
4187         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4188
4189 2014-06-05  Marek Polacek  <polacek@redhat.com>
4190
4191         PR c/49706
4192         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4193         on the left hand side operand of a comparison. 
4194
4195 2014-06-05  Marek Polacek  <polacek@redhat.com>
4196
4197         PR c/48062
4198         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4199         Print note only if the warning was printed.
4200
4201 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
4202
4203         PR c/58942
4204         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4205         with a pointer.
4206
4207 2014-06-03  Marek Polacek  <polacek@redhat.com>
4208
4209         PR c/60439
4210         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4211         c_start_case.
4212         * c-tree.h (c_start_case): Update.
4213         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
4214         switch condition has boolean value.
4215
4216 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
4217
4218         * c-decl.c: Include builtins.h.
4219         * c-parser.c: Likewise.
4220
4221 2014-05-27  Marek Polacek  <polacek@redhat.com>
4222
4223         PR c/56724
4224         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
4225         error and warning calls to error_at and warning_at.  Pass location of
4226         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
4227         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4228         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
4229
4230 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
4231
4232         PR c/61191
4233         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4234         function parameters.
4235
4236 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
4237
4238         * c-decl.c (merge_decls): Preserve symtab node pointers.
4239         (duplicate_decls): Free new decl.
4240
4241 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
4242
4243         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4244         initialization.
4245
4246         * c-parser.c (c_parser_omp_target): Return bool values.
4247
4248 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
4249
4250         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4251         num_teams_loc variable to num_thread_limit_loc.
4252
4253 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
4254
4255         * c-array-notation.c (expand_array_notations): Use void_node
4256         instead of void_zero_node.
4257
4258 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
4259
4260         * c-decl.c (finish_struct): Adjust.
4261         (finish_enum): Likewise.
4262         (bind): Adjust.
4263         (record_inline_static): Likewise.
4264         (push_scope): Likewise.
4265         (make_label): Likewise.
4266         (lookup_label_for_goto): Likewise.
4267         (finish_struct): Likewise.
4268         (finish_enum): Likewise.
4269         (store_parm_decls): Likewise.
4270         (c_push_function_context): Likewise.
4271         * c-lang.h: Remove usage of variable_size gty attribute.
4272         * c-parser.c (c_parse_init): Adjust.
4273         (c_parse_file): Likewise.
4274
4275 2014-05-13  Marek Polacek  <polacek@redhat.com>
4276
4277         PR c/61162
4278         * c-typeck.c (convert_for_assignment): Pass location to
4279         WARN_FOR_ASSIGNMENT instead of input_location.
4280
4281 2014-05-10  Marek Polacek  <polacek@redhat.com>
4282
4283         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4284         maybe_warn_string_init.
4285         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4286         maybe_warn_string_init.
4287         * c-tree.h (maybe_warn_string_init): Update declaration.
4288         * c-typeck.c (maybe_warn_string_init): Add location parameter.
4289         Call pedwarn_init with loc instead of with input_location.
4290         (digest_init): Pass init_loc to maybe_warn_string_init.
4291         (pop_init_level): Call pedwarn_init with loc instead of with
4292         input_location.
4293         (set_init_index): Likewise.
4294         (process_init_element): Likewise.
4295
4296 2014-05-09  Marek Polacek  <polacek@redhat.com>
4297
4298         PR c/61096
4299         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4300         (c_parser_initelt): Pass location to set_init_label.  Pass array index
4301         location to set_init_index.
4302         * c-tree.h (push_init_level): Update declaration.
4303         (pop_init_level): Likewise.
4304         (set_init_index): Likewise.
4305         (set_init_label): Likewise.
4306         * c-typeck.c (error_init): Add location parameter.  Call error_at
4307         instead of error.
4308         (digest_init): Pass init_loc to error_init.
4309         (really_start_incremental_init):
4310         (push_init_level): Add location parameter.  Pass loc to pop_init_level
4311         and error_init.
4312         (pop_init_level): Likewise.
4313         (set_designator): Add location parameter.  Pass loc to pop_init_level,
4314         push_init_level, and error_init.
4315         (set_init_index): Add location parameter.  Pass loc to error_init and
4316         set_designator.
4317         (set_init_label): Likewise.
4318         (output_init_element): Pass loc to error_init.
4319         (process_init_element): Pass loc to error_init, pop_init_level,
4320         pedwarn_init, and push_init_level.
4321
4322 2014-05-09  Marek Polacek  <polacek@redhat.com>
4323
4324         PR c/50459
4325         * c-parser.c (c_parser_attributes): Parse the arguments as an
4326         expression-list if the attribute takes identifier.
4327
4328 2014-05-08  Marek Polacek  <polacek@redhat.com>
4329
4330         PR c/61053
4331         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4332         TYPE_ALIGN_UNIT.
4333
4334 2014-05-08  Marek Polacek  <polacek@redhat.com>
4335
4336         PR c/61077
4337         * c-decl.c (start_function): Warn for _Atomic-qualified return type
4338         of main.
4339
4340 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
4341             Mike Stump  <mikestump@comcast.net>
4342             Richard Sandiford  <rdsandiford@googlemail.com>
4343
4344         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4345         (finish_enum): Use wide-int interfaces.
4346         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4347         * c-typeck.c (build_c_cast): Likewise.
4348         (set_nonincremental_init_from_string): Likewise.
4349         (c_tree_equal): Likewise.
4350
4351 2014-05-02  Marek Polacek  <polacek@redhat.com>
4352
4353         PR c/25801
4354         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
4355         Return size_one_node when the type is not complete.
4356         (pointer_diff): Remove comment.
4357         (build_unary_op): Improve error messages.
4358
4359 2014-05-02  Marek Polacek  <polacek@redhat.com>
4360
4361         * c-typeck.c (c_finish_return): Separate warning_at calls.
4362
4363 2014-05-02  Marek Polacek  <polacek@redhat.com>
4364
4365         * c-tree.h (error_init): Remove declaration.
4366         (pedwarn_init): Likewise.
4367         * c-typeck.c (error_init): Make static and move above.
4368         (pedwarn_init): Likewise.
4369         (warning_init): Move above.
4370         (maybe_warn_string_init): Likewise.
4371
4372 2014-05-01  Jeff Law  <law@redhat.com>
4373
4374         Revert:
4375
4376         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4377         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4378         avoid goto.
4379
4380 2014-05-02  Marek Polacek  <polacek@redhat.com>
4381
4382         PR c/60784
4383         * c-typeck.c (push_init_level): Set constructor_designated to
4384         p->designated for structures.
4385
4386 2014-05-01  Marek Polacek  <polacek@redhat.com>
4387
4388         PR c/60915
4389         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4390         function-definition has an attribute after the declarator.
4391
4392 2014-05-01  Marek Polacek  <polacek@redhat.com>
4393
4394         PR c/60257
4395         * c-typeck.c (warning_init): Add location_t parameter.  Call
4396         warning_at instead of warning.
4397         (push_init_level): Pass input_location to warning_init.
4398         (add_pending_init): Add location_t parameter.  Pass loc to
4399         warning_init.
4400         (set_nonincremental_init): Pass input_location to add_pending_init.
4401         (set_nonincremental_init_from_string): Likewise.
4402         (output_init_element): Pass loc to warning_init and to
4403         add_pending_init.
4404
4405 2014-05-01  Marek Polacek  <polacek@redhat.com>
4406
4407         PR c/43395
4408         * c-typeck.c (c_finish_return): Distinguish between label and variable
4409         when warning about returning local address.
4410
4411 2014-05-01  Marek Polacek  <polacek@redhat.com>
4412
4413         PR c/29467
4414         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4415         in C89 mode.
4416
4417 2014-05-01  Marek Polacek  <polacek@redhat.com>
4418
4419         PR c/43245
4420         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4421         instead of 0 to WARN_FOR_QUALIFIERS.
4422
4423 2014-05-01  Marek Polacek  <polacek@redhat.com>
4424
4425         PR c/56989
4426         * c-typeck.c (default_conversion): Use better location for
4427         error call.
4428
4429 2014-04-30  Marek Polacek  <polacek@redhat.com>
4430
4431         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4432         also when SANITIZE_FLOAT_DIVIDE is on.
4433
4434 2014-04-30  Marek Polacek  <polacek@redhat.com>
4435
4436         PR c/60139
4437         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4438         and pedwarn_init.  Use loc insted of input_location.
4439
4440 2014-04-30  Marek Polacek  <polacek@redhat.com>
4441
4442         PR c/60351
4443         * c-typeck.c (build_binary_op): Use location when warning about
4444         shift count.
4445
4446 2014-04-25  Marek Polacek  <polacek@redhat.com>
4447
4448         PR c/18079
4449         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4450         always_inline/noinline and hot/cold attributes.
4451
4452 2014-04-25  Marek Polacek  <polacek@redhat.com>
4453
4454         PR c/60114
4455         * c-parser.c (c_parser_initelt): Pass input_location to
4456         process_init_element.
4457         (c_parser_initval): Pass loc to process_init_element.
4458         * c-tree.h (process_init_element): Adjust declaration.
4459         * c-typeck.c (push_init_level): Pass input_location to
4460         process_init_element.
4461         (pop_init_level): Likewise.
4462         (set_designator): Likewise.
4463         (output_init_element): Add location_t parameter.  Pass loc to
4464         digest_init.
4465         (output_pending_init_elements): Pass input_location to
4466         output_init_element.
4467         (process_init_element): Add location_t parameter.  Pass loc to
4468         output_init_element.
4469
4470 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
4471
4472         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4473         atomic-clause, allow comma in between atomic-clause and
4474         seq_cst.
4475
4476 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
4477
4478         PR c/59073
4479         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4480         fails, don't set OM_PARALLEL_COMBINED and return NULL.
4481
4482 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
4483
4484         PR middle-end/60469
4485         * c-array-notation.c (fix_builtin_array_notation_fn): Use
4486         create_tmp_var instead build_decl for creating temps.
4487         (build_array_notation_expr): Likewise.
4488         (fix_conditional_array_notations_1): Likewise.
4489         (fix_array_notation_expr): Likewise.
4490         (fix_array_notation_call_expr): Likewise.
4491
4492 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
4493
4494         PR c++/60689
4495         * c-tree.h (c_build_function_call_vec): New prototype.
4496         * c-typeck.c (build_function_call_vec): Don't call
4497         resolve_overloaded_builtin here.
4498         (c_build_function_call_vec): New wrapper function around
4499         build_function_call_vec.  Call resolve_overloaded_builtin here.
4500         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4501         Call c_build_function_call_vec instead of build_function_call_vec.
4502         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4503         * c-decl.c (finish_decl): Likewise.
4504
4505 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4506
4507         PR c/55383
4508         * c-typeck.c: Use correct format string in cast-qual warning
4509
4510 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
4511
4512         * c-decl.c (c_decl_attributes): Use
4513         lang_hooks.types.omp_mappable_type.
4514         * c-typeck.c (c_finish_omp_clauses): Likewise.
4515
4516 2014-03-06  Marek Polacek  <polacek@redhat.com>
4517
4518         PR c/60197
4519         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4520         of checking tree code.
4521
4522 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4523
4524         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4525         (c_parser_parameter_declaration): Likewise.
4526
4527 2014-02-19  Marek Polacek  <polacek@redhat.com>
4528
4529         PR c/60195
4530         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4531         Call mark_exp_read on exp.value.
4532         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
4533         TREE_ADDRESSABLE on old instead of val.
4534         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4535
4536 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4537
4538         * c-parser.c (c_parser_get_builtin_args): Replace calls to
4539         C_EXPR_APPEND by vec_safe_push.
4540         * c-tree.h (C_EXPR_APPEND): Remove.
4541
4542 2014-01-31  Marek Polacek  <polacek@redhat.com>
4543
4544         PR c/59963
4545         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4546         build_function_call_vec.
4547         (build_function_call): Likewise.
4548         (build_atomic_assign): Likewise.
4549         (build_function_call_vec): Add arg_loc parameter.  Use it.
4550         (convert_arguments): Likewise.
4551         (convert_for_assignment): Rename rhs_loc to expr_loc.
4552         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4553         (c_parser_objc_keywordexpr): Likewise.
4554         (c_parser_postfix_expression_after_primary): Call
4555         build_function_call_vec with expr_loc rather than op_loc.
4556         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
4557         build_function_call_vec.
4558         (c_parser_expr_list): Add locations parameter.  Fill it with locations
4559         of function arguments.
4560         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4561
4562 2014-01-30  Marek Polacek  <polacek@redhat.com>
4563
4564         PR c/59940
4565         * c-typeck.c (build_function_call_vec): Use loc parameter.
4566         (convert_arguments): Add location parameter.  Use it.
4567         (ep_convert_and_check): Likewise.
4568         (build_atomic_assign): Adjust convert_for_assignment call.
4569         (build_modify_expr): Likewise.
4570         (digest_init): Likewise.
4571         (c_finish_return): Likewise.
4572         (build_conditional_expr): Adjust ep_convert_and_check calls.
4573         (convert_for_assignment): Add rhs_loc parameter.  Use it.
4574         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4575         calls.
4576
4577 2014-01-30  Richard Biener  <rguenther@suse.de>
4578
4579         PR c/59905
4580         * c-typeck.c (build_function_call_vec): Do not replace calls
4581         to a function via an incompatible type with a runtime abort.
4582
4583 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4584
4585         * c-parser.c (c_parser_declaration_or_fndef): Replaced
4586         flag_enable_cilkplus with flag_cilkplus.
4587         (c_parser_direct_declarator_inner): Likewise.
4588         (c_parser_attribute_any_word): Likewise.
4589         (c_parser_attributes): Likewise.
4590         (c_parser_compound_statement): Likewise.
4591         (c_parser_statement_after_labels): Likewise.
4592         (c_parser_if_statement): Likewise.
4593         (c_parser_switch_statement): Likewise.
4594         (c_parser_do_statement): Likewise.
4595         (c_parser_for_statement): Likewise.
4596         (c_parser_unary_expression): Likewise.
4597         (c_parser_postfix_expression): Likewise.
4598         (c_parser_postfix_expression_after_primary): Likewise.
4599         (c_parser_postfix_expression_after_primary): Likewise.
4600         (c_parser_omp_clause_name): Likewise.
4601         (c_finish_omp_declare_simd): Likewise.
4602         (c_parser_cilk_verify_simd): Likewise.
4603         * c-typeck.c (build_array_ref): Likewise.
4604         (build_function_call_vec): Likewise.
4605         (convert_arguments): Likewise.
4606         (build_compound_expr): Likewise.
4607         (c_finish_return): Likewise.
4608         (c_finish_if_stmt): Likewise.
4609         (c_finish_loop): Likewise.
4610         (build_binary_op): Likewise.
4611
4612 2014-01-23  Marek Polacek  <polacek@redhat.com>
4613
4614         PR c/59846
4615         * c-typeck.c (parser_build_binary_op): Use location instead of
4616         input_location.
4617         (build_binary_op): Pass location to shorten_compare.
4618
4619 2014-01-23  Marek Polacek  <polacek@redhat.com>
4620
4621         PR c/58346
4622         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4623         an empty aggregate.
4624
4625 2014-01-23  Marek Polacek  <polacek@redhat.com>
4626
4627         PR c/59871
4628         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4629         of a comma expression.
4630         (emit_side_effect_warnings): Likewise.
4631
4632 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4633
4634         PR c/59825
4635         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4636         function to use walk_tree and moved a lot of its functionality to
4637         expand_array_notations.
4638         (expand_array_notations): New function.
4639
4640 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4641
4642         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4643         attribute an attribute without value.
4644
4645 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
4646
4647         PR middle-end/58809
4648         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4649         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4650
4651 2014-01-22  Marek Polacek  <polacek@redhat.com>
4652
4653         PR c/59891
4654         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4655         of remove_c_maybe_const_expr on op1 and op2.
4656
4657 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
4658
4659         PR c/58943
4660         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4661         effects, preevaluate rhs using SAVE_EXPR first.
4662
4663 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4664
4665         PR c++/59631
4666         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4667         statements with if-elseif statements.
4668
4669 2014-01-06  Marek Polacek  <polacek@redhat.com>
4670
4671         PR c/57773
4672         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4673         defined bit-field types only in ISO C.
4674
4675 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4676
4677         Update copyright years
4678
4679 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4680
4681         * c-array-notation.c: Use the standard form for the copyright notice.
4682
4683 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4684
4685         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4686         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4687         field in parser is not empty.  If not-empty, call the function
4688         c_parser_finish_omp_declare_simd.
4689         (c_parser_cilk_clause_vectorlength): Modified function to be shared
4690         between SIMD-enabled functions and #pragma simd.  Added new parameter.
4691         (c_parser_cilk_all_clauses): Modified the usage of the function
4692         c_parser_cilk_clause_vectorlength as mentioned above.
4693         (c_parser_cilk_simd_fn_vector_attrs): New function.
4694         (c_finish_cilk_simd_fn_tokens): Likewise.
4695         (is_cilkplus_vector_p): Likewise.
4696         (c_parser_omp_clause_name): Added checking for "vectorlength,"
4697         "nomask," and "mask" strings in clause name.
4698         (c_parser_omp_all_clauses): Added 3 new case statements:
4699         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4700         PRAGMA_CILK_CLAUSE_NOMASK.
4701         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
4702         check for vector attribute and if so call the function
4703         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
4704         called the function c_finish_cilk_simd_fn_tokens.
4705         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4706         parser field is non-empty.  If so, parse them as you would parse
4707         the omp declare simd pragma.
4708         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4709         Added a check when step is a parameter and flag it as error.
4710         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4711         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4712         pragma_omp_clause.
4713
4714 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
4715
4716         * c-parser.c (c_parser_omp_parallel): Fix description.
4717
4718 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4719
4720         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4721         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4722         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4723         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4724
4725 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
4726
4727         PR c/52023
4728         * c-parser.c (c_parser_alignas_specifier): Use
4729         c_sizeof_or_alignof_type instead of c_alignof.
4730         (c_parser_alignof_expression): Likewise, with min_alignof
4731         parameter depending on alignof spelling used.
4732
4733 2013-12-04  Marek Polacek  <polacek@redhat.com>
4734
4735         PR c/54113
4736         * c-decl.c (start_function): Don't warn for missing prototype for
4737         inline functions.
4738
4739 2013-12-03  Marek Polacek  <polacek@redhat.com>
4740
4741         PR c/59351
4742         * c-decl.c (build_compound_literal): Allow compound literals with
4743         empty initial value.
4744
4745 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
4746
4747         PR c/58235
4748         * c-typeck.c (build_modify_expr): Diagnose assignment to
4749         expression with array type.
4750
4751 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4752
4753         PR c/42262
4754         * c-typeck.c (process_init_element): Do not treat a string as
4755         initializing a whole array when used with a designator for an
4756         individual element.
4757
4758 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4759
4760         PR c/57574
4761         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4762         an inline function following a static declaration.
4763
4764 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
4765
4766         PR c/59310
4767         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4768         to p_name before calling c_parser_omp_teams instead of after.
4769         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4770         argument.  Remove unused p_name variable.
4771
4772 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
4773             Jakub Jelinek  <jakub@redhat.com>
4774
4775         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4776         external_scope is NULL.
4777
4778 2013-11-27  Tom de Vries  <tom@codesourcery.com>
4779             Marc Glisse  <marc.glisse@inria.fr>
4780
4781         PR c++/59032
4782         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4783
4784 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
4785
4786         * c-typeck.c: Add required include files from gimple.h.
4787
4788 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
4789
4790         * c-decl.c (define_label, shadow_tag_warned)
4791         (check_bitfield_type_and_width, grokdeclarator, grokparms,
4792         store_parm_decls_newstyle, store_parm_decls_oldstyle)
4793         (declspecs_add_type): Remove use of in_system_header macro.
4794         * c-parser.c (c_parser_unary_expression): Likewise.
4795         * c-typeck.c (store_init_value, process_init_element)
4796         (c_start_case): Likewise.
4797
4798         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4799         macro.
4800
4801         * c-parser.c (c_parser_set_source_position_from_token): Remove
4802         reference to in_system_header from comment.
4803
4804 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4805
4806         * c-decl.c (grokdeclarator): Update comment to refer to
4807         tree_to_[su]hwi rather than tree_low_cst.
4808
4809 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4810
4811         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4812         tree_to_uhwi throughout.
4813
4814 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4815
4816         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4817         throughout.
4818
4819 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4820
4821         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4822         throughout.
4823
4824 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
4825
4826         * c-parser.c (c_parser_cilk_simd): New.
4827         (c_parser_cilk_verify_simd): New.
4828         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4829         (c_parser_omp_for_loop): Add case for NE_EXPR.
4830         Set c_break_label for CILK_SIMD.
4831         (c_parser_cilk_clause_vectorlength): New.
4832         (c_parser_cilk_clause_linear): New.
4833         (c_parser_cilk_clause_name): New.
4834         (c_parser_cilk_all_clauses): New.
4835         * c-typeck.c (build_unary_op): Pass location argument to
4836         readonly_error.
4837         (build_modify_expr): Same.
4838         (build_asm_expr): Same.
4839         (c_finish_bc_stmt): Error on break/continue in loops.
4840
4841 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
4842
4843         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4844
4845 2013-11-14  Diego Novillo  <dnovillo@google.com>
4846
4847         * c-decl.c: Include print-tree.h.
4848         Include stor-layout.h.
4849         Include varasm.h.
4850         Include attribs.h.
4851         Include stringpool.h.
4852         * c-lang.c: Include fold-const.h.
4853         * c-parser.c: Include stringpool.h.
4854         Include attribs.h.
4855         Include stor-layout.h.
4856         Include varasm.h.
4857         Include trans-mem.h.
4858         * c-typeck.c: Include stor-layout.h.
4859         Include trans-mem.h.
4860         Include varasm.h.
4861         Include stmt.h.
4862
4863 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
4864
4865         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4866         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4867         __auto_type.
4868         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4869         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4870         RID_AUTO_TYPE.
4871         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4872         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4873         (c_parser_declarator, c_parser_direct_declarator_inner)
4874         (c_parser_parameter_declaration, c_parser_type_name): All callers
4875         changed.
4876         (c_parser_declaration_or_fndef): Handle declarations with type
4877         determined from the initializer.
4878
4879 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
4880
4881         * c-typeck.c: Include gimplify.h.
4882
4883 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
4884
4885         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4886         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4887         comment.
4888         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4889         or _Thread_local as appropriate in diagnostics.
4890         (build_null_declspecs): Initialize ret->thread_gnu_p.
4891         (declspecs_add_scspec): Handle either __thread or _Thread_local
4892         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
4893         pedantic.  Do not disallow _Thread_local extern and _Thread_local
4894         static.
4895
4896 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
4897             Andrew MacLeod  <amacleod@redhat.com>
4898
4899         * c-aux-info.c (gen_type): Handle atomic qualifier.
4900         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4901         qualifiers when compating types.
4902         (shadow_tag_warned): Handle atomic_p in declspecs.
4903         (quals_from_declspecs): Likewise.
4904         (start_decl): Use c_type_promotes_to when promoting argument
4905         types.
4906         (grokdeclarator): Handle _Atomic.
4907         (get_parm_info): Diagnose any qualifier on "void" as only
4908         parameter.
4909         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4910         comparing types.  Use c_type_promotes_to when promoting argument
4911         types.
4912         (finish_function): Use c_type_promotes_to when promoting argument
4913         types.
4914         (build_null_declspecs): Handle atomic_p in declspecs.
4915         (declspecs_add_qual): Handle RID_ATOMIC.
4916         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4917         (c_token_starts_declspecs): Handle RID_ATOMIC.
4918         (c_parser_declspecs): Handle atomic type specifiers and
4919         qualifiers.
4920         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4921         from types of expressions with atomic type.
4922         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4923         (c_parser_attribute_any_word): Handle RID_ATOMIC.
4924         (c_parser_initializer, c_parser_initelt, c_parser_initval)
4925         (c_parser_statement_after_labels, c_parser_switch_statement)
4926         (c_parser_for_statement, c_parser_expr_no_commas)
4927         (c_parser_conditional_expression, c_parser_binary_expression)
4928         (c_parser_cast_expression, c_parser_unary_expression)
4929         (c_parser_postfix_expression)
4930         (c_parser_postfix_expression_after_primary, c_parser_expression):
4931         Use convert_lvalue_to_rvalue.
4932         (c_parser_expression_conv, c_parser_expr_list): Document
4933         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
4934         (c_parser_objc_synchronized_statement): Use
4935         convert_lvalue_to_rvalue.
4936         (c_parser_objc_selector): Handle RID_ATOMIC.
4937         (c_parser_objc_receiver, c_parser_array_notation): Use
4938         convert_lvalue_to_rvalue.
4939         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4940         _Atomic (type-name).
4941         (struct c_declspecs): Add atomic_p field.
4942         (convert_lvalue_to_rvalue): Declare.
4943         * c-typeck.c (c_type_promotes_to): Promote atomic types to
4944         corresponding atomic types.
4945         (qualify_type): Don't add _Atomic qualifiers from second argument.
4946         (comp_target_types): Do not allow _Atomic mismatches.
4947         (type_lists_compatible_p): Do not remove atomic qualifiers when
4948         comparing types.
4949         (really_atomic_lvalue, convert_lvalue_to_rvalue)
4950         (build_atomic_assign): New functions.
4951         (build_unary_op): Use build_atomic_assign for atomic increment and
4952         decrement.
4953         (build_conditional_expr): Do not treat _Atomic void as a qualified
4954         version of void.
4955         (build_modify_expr): Use build_atomic_assign for atomic LHS.
4956         (find_anonymous_field_with_type, convert_to_anonymous_field)
4957         (convert_for_assignment): Do not remove atomic qualifiers when
4958         comparing types.
4959         (digest_init): Do not accept initialization of arrays of atomic
4960         elements by string constants.
4961         (build_asm_expr): Use convert_lvalue_to_rvalue.
4962         (build_binary_op): Do not treat _Atomic void as a qualified
4963         version of void.
4964
4965 2013-11-06  DJ Delorie  <dj@redhat.com>
4966
4967         * c-decl.c (locate_old_decl): If a previous conflicting decl is
4968         both explicit and builtin, print the location of the explicit one.
4969
4970 2013-11-05  Tobias Burnus  <burnus@net-b.de>
4971
4972         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4973         c_parser_omp_distribute, c_parser_omp_teams,
4974         c_parser_omp_target, c_parser_omp_declare): Handle
4975         -fopenmp-simd.
4976
4977 2013-11-03  Marek Polacek  <polacek@redhat.com>
4978
4979         * c-decl.c (grokdeclarator): Add VLA instrumentation.
4980
4981 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
4982
4983         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4984         check_dup_generic at the end, unless remove is true.
4985         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4986         remove = true;.
4987         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4988
4989 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
4990
4991         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4992         with decl that is not pointer nor array.
4993
4994 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4995
4996         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4997         a spawning function is found.
4998         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4999         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5000         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5001         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5002         case.
5003         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5004         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5005         expr.
5006         (c_finish_return): Added a check to reject _Cilk_spawn in return
5007         expression.
5008         (build_cilk_spawn): New function.
5009         (build_cilk_sync): Likewise.
5010         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5011         
5012 2013-10-27  Tobias Burnus  <burnus@net-b.de>
5013
5014         PR other/33426
5015         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5016         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5017         (c_parser_statement_after_labels): Update calls.
5018
5019 2013-10-24  Tobias Burnus  <burnus@net-b.de>
5020
5021         PR other/33426
5022         * c-parser.c (c_parser_pragma, c_parser_for_statement):
5023         Handle PRAGMA_IVDEP.
5024         (c_parser_statement_after_labels): Update call.
5025
5026 2013-10-24  Marek Polacek  <polacek@redhat.com>
5027
5028         * c-parser.c (c_parser_struct_declaration): Add a comment.
5029         (c_parser_declarator): Don't allow _Alignas here.
5030
5031 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
5032
5033         * c-parser.c: Include omp-low.h.
5034         * c-typeck.c: Likewise.
5035
5036 2013-10-17  Marek Polacek  <polacek@redhat.com>
5037
5038         PR c/58267
5039         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5040         Document syntax of the array-declarator.
5041         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5042         are not permitted.
5043         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5044         (c_parser_struct_declaration): Likewise.
5045         (c_parser_declarator): Likewise.
5046         (c_parser_direct_declarator_inner): Likewise.
5047         (c_parser_parameter_declaration): Likewise.
5048         (c_parser_type_name): Likewise.
5049
5050 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
5051
5052         * c-lang.h (current_omp_declare_target_attribute): New extern
5053         decl.
5054         * c-parser.c: Include c-lang.h.
5055         (struct c_parser): Change tokens to c_token *.
5056         Add tokens_buf field.  Change tokens_avail type to unsigned int.
5057         (c_parser_consume_token): If parser->tokens isn't
5058         &parser->tokens_buf[0], increment parser->tokens.
5059         (c_parser_consume_pragma): Likewise.
5060         (enum pragma_context): Add pragma_struct and pragma_param.
5061         (c_parser_external_declaration): Adjust
5062         c_parser_declaration_or_fndef caller.
5063         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5064         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5065         Adjust recursive call.
5066         (c_parser_struct_or_union_specifier): Use pragma_struct instead
5067         of pragma_external.
5068         (c_parser_parameter_declaration): Use pragma_param instead of
5069         pragma_external.
5070         (c_parser_compound_statement_nostart, c_parser_label,
5071         c_parser_for_statement): Adjust
5072         c_parser_declaration_or_fndef callers.
5073         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5074         it through to c_parser_conditional_expression.
5075         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5076         pass it through to c_parser_binary_expression.  Adjust recursive
5077         call.
5078         (c_parser_binary_expression): Remove prec argument, add
5079         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
5080         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5081         binop matches it, use build2 instead of parser_build_binary_op.
5082         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5083         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5084         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5085         Handle pragma_struct and pragma_param the same as pragma_external.
5086         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5087         (c_parser_omp_variable_list): Parse array sections for
5088         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5089         (c_parser_omp_clause_collapse): Fully fold collapse expression.
5090         (c_parser_omp_clause_reduction): Handle user defined reductions.
5091         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5092         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5093         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5094         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5095         c_parser_omp_clause_depend, c_parser_omp_clause_map,
5096         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5097         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5098         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5099         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
5100         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
5101         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5102         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
5103         (c_parser_omp_for_loop): Add CODE argument, pass it through
5104         to c_finish_omp_for.  Change last argument to cclauses,
5105         and adjust uses to grab parallel clauses from the array of all
5106         the split clauses.  Adjust c_parser_binary_expression,
5107         c_parser_declaration_or_fndef and c_finish_omp_for callers.
5108         (omp_split_clauses): New function.
5109         (c_parser_omp_simd): New function.
5110         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5111         Allow the function to be called also when parsing combined constructs,
5112         and call c_parser_omp_simd when parsing for simd.
5113         (c_parser_omp_sections_scope): If section-sequence doesn't start with
5114         #pragma omp section, require exactly one structured-block instead of
5115         sequence of statements.
5116         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5117         Allow the function to be called also when parsing combined constructs.
5118         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5119         Allow the function to be called also when parsing combined
5120         constructs.
5121         (c_parser_omp_taskgroup, c_parser_omp_cancel,
5122         c_parser_omp_cancellation_point, c_parser_omp_distribute,
5123         c_parser_omp_teams, c_parser_omp_target_data,
5124         c_parser_omp_target_update, c_parser_omp_target,
5125         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5126         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5127         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5128         (c_parser_omp_construct): Add p_name and mask vars.  Handle
5129         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5130         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
5131         and c_parser_omp_sections callers.
5132         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5133         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5134         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5135         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
5136         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
5137         OMP_CLAUSE_DEPEND.
5138         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5139         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5140         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5141         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5142         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5143         * c-typeck.c: Include tree-inline.h.
5144         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5145         handle_omp_array_sections_1, handle_omp_array_sections,
5146         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5147         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5148         user defined reductions.
5149         (c_tree_equal): New function.
5150         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5151         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5152         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5153         c_check_omp_declare_reduction_r): New prototypes.
5154         * c-decl.c (current_omp_declare_target_attribute): New variable.
5155         (c_decl_attributes): New function.
5156         (start_decl, start_function): Use it instead of decl_attributes.
5157         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5158         c_omp_reduction_decl, c_omp_reduction_lookup,
5159         c_check_omp_declare_reduction_r): New functions.
5160
5161 2013-09-25  Tom Tromey  <tromey@redhat.com>
5162
5163         * Make-lang.in (c/gccspec.o): Remove.
5164         (CFLAGS-c/gccspec.o): New variable.
5165         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5166         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5167         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5168
5169 2013-09-25  Tom Tromey  <tromey@redhat.com>
5170
5171         * Make-lang.in (c/gccspec.o): Don't use subshell.
5172
5173 2013-09-18  Marek Polacek  <polacek@redhat.com>
5174
5175         PR sanitize/58443
5176         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5177         Remove unnecessary check.
5178
5179 2013-09-18  Marek Polacek  <polacek@redhat.com>
5180
5181         PR sanitizer/58411
5182         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5183         no_sanitize_undefined attribute.
5184
5185 2013-09-13  Kai Tietz  <ktietz@redhat.com>
5186
5187         PR target/57848
5188         * c-decl.c (c_builtin_function_ext_scope): Remove
5189         wrong assumption that it is never called on prexisting
5190         symbol.
5191
5192 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
5193
5194         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5195
5196 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5197
5198         * c-objc-common.c (c_tree_printer): Tidy.
5199
5200 2013-08-30  Marek Polacek  <polacek@redhat.com>
5201
5202         * c-typeck.c (build_binary_op): Add division by zero and shift
5203         instrumentation.
5204
5205 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
5206             Joseph Myers  <joseph@codesourcery.com>
5207
5208         PR c/35649
5209         * c-typeck.c (c_common_type): Prefer double_type_node over
5210         other REAL_TYPE types with the same precision.
5211         (convert_arguments): Likewise.
5212
5213 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5214
5215         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5216         (c_initialize_diagnostics): Call a destructor for the early printer.
5217
5218 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5219
5220         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5221         printer initialization.
5222
5223 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5224
5225         PR c/57490
5226         * c-array-notation.c (fix_conditional_array_notations_1): Added a
5227         check for truth values.
5228         (expand_array_notation_exprs): Added truth values case.  Removed an
5229         unwanted else.  Added for-loop to walk through subtrees in default
5230         case.
5231
5232 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5233
5234         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5235
5236 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
5237
5238         * c-parser.c (struct c_generic_association): Fix typo.
5239
5240 2013-07-23  Tom Tromey  <tromey@redhat.com>
5241             Joseph Myers  <joseph@codesourcery.com>
5242
5243         * c-parser.c (struct c_generic_association): New.
5244         (c_generic_association_d): New typedef.
5245         (c_parser_generic_selection): New function.
5246         (c_parser_postfix_expression): Handle RID_GENERIC.
5247
5248 2013-07-13  Jason Merrill  <jason@redhat.com>
5249
5250         PR c++/57793
5251         * c-decl.c (finish_struct): Check for too-large class.
5252
5253 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
5254
5255         PR c/57821
5256         * c-typeck.c (set_init_index): When folding, check for index overflow.
5257
5258 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5259
5260         * c-parser.c (c_parser_array_notation): Removed rejection of array
5261         notations in an array of function pointers.
5262
5263 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5264
5265         * c-array-notation.c (make_triplet_val_inv): New function.
5266         (create_cmp_incr): Likewise.
5267         (create_array_refs): Likewise.
5268         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5269         Also modularized common parts between functions and called the function.
5270         (build_array_notation_expr): Likewise.
5271         (fix_conditional_array_notations_1): Likewise.
5272         (fix_array_notation_expr): Likewise.
5273         (fix_array_notation_call_expr): Likewise.
5274
5275 2013-06-18  Marek Polacek  <polacek@redhat.com>
5276
5277         PR c/57630
5278         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5279
5280 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5281
5282         * c-array-notation.c (build_array_notation_expr): Reject array notation
5283         mismatch between LHS and RHS even inside a call_expr.  Also, removed
5284         a couple while statements that were dead code.
5285
5286 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5287
5288         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5289         excessive precision expressions in function parameters.  Also removed
5290         couple unwanted while statements.
5291
5292 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5293
5294         * c-array-notation.c (expand_array_notation_exprs): Added
5295         ARRAY_NOTATION_REF case.
5296         
5297 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5298
5299         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5300         function to c-family/array-notation-common.c.
5301         (is_cilkplus_reduce_builtin): Likewise.
5302         (find_rank): Likewise.
5303         (extract_array_notation_exprs): Likewise.
5304         (replace_array_notations): Likewise.
5305         (find_inv_trees): Likewise.
5306         (replace_inv_trees): Likewise.
5307         (contains_array_notation_expr): Likewise.
5308         (find_correct_array_notation_type): Likewise.
5309         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5310         (struct inv_list): Moved this to c-family/array-notation-common.c.
5311         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5312         
5313 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5314
5315         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5316         reduction functions outside the for-loop.  Added a check if the fundecl
5317         is non-NULL.  Finally, removed an unwanted if-statement, and made the
5318         body unconditional.
5319
5320 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5321
5322         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5323         condition of the if-statement matches the rank of else-block and then-
5324         block when array notations are used.
5325         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5326         expression after the entire function body is parsed.
5327         (c_parser_expr_no_commas): Delayed creating array notation expressions
5328         to the end of function parsing.
5329         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5330         whole if-statement instead of just the condition.
5331         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
5332
5333 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5334
5335         PR c/57474
5336         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5337         array to NULL_TREE if they are unused.  Also added a check for the
5338         field to be NULL before its fields are used in future.
5339         
5340 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5341
5342         PR bootstrap/57450
5343         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5344         (build_array_notation_expr): Likewise.
5345
5346 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5347
5348         * c-typeck.c (build_array_ref): Added a check to see if array's
5349         index is greater than one.  If true, then emit an error.
5350         (build_function_call_vec): Exclude error reporting and checking
5351         for builtin array-notation functions.
5352         (convert_arguments): Likewise.
5353         (c_finish_return): Added a check for array notations as a return
5354         expression.  If true, then emit an error.
5355         (c_finish_loop): Added a check for array notations in a loop
5356         condition.  If true then emit an error.
5357         (lvalue_p): Added a ARRAY_NOTATION_REF case.
5358         (build_binary_op): Added a check for array notation expr inside
5359         op1 and op0.  If present, we call another function to find correct
5360         type.
5361         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5362         * c-parser.c (c_parser_compound_statement): Check if array
5363         notation code is used in tree, if so, then transform them into
5364         appropriate C code.
5365         (c_parser_expr_no_commas): Check if array notation is used in LHS
5366         or RHS, if so, then build array notation expression instead of
5367         regular modify.
5368         (c_parser_postfix_expression_after_primary): Added a check for
5369         colon(s) after square braces, if so then handle it like an array
5370         notation.  Also, break up array notations in unary op if found.
5371         (c_parser_direct_declarator_inner): Added a check for array
5372         notation.
5373         (c_parser_compound_statement): Added a check for array notation in
5374         a stmt.  If one is present, then expand array notation expr.
5375         (c_parser_if_statement): Likewise.
5376         (c_parser_switch_statement): Added a check for array notations in
5377         a switch statement's condition.  If true, then output an error.
5378         (c_parser_while_statement): Similarly, but for a while.
5379         (c_parser_do_statement): Similarly, but for a do-while.
5380         (c_parser_for_statement): Similarly, but for a for-loop.
5381         (c_parser_unary_expression): Check if array notation is used in a
5382         pre-increment or pre-decrement expression.  If true, then expand
5383         them.
5384         (c_parser_array_notation): New function.
5385         * c-array-notation.c: New file.
5386         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5387         
5388 2013-05-23  Mike Stump  <mikestump@comcast.net>
5389
5390         * c-typeck.c (convert_for_assignment): Handle references to memory
5391         spaces better.
5392
5393 2013-05-16  Jason Merrill  <jason@redhat.com>
5394
5395         * Make-lang.in (cc1$(exeext)): Use link mutex.
5396
5397 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
5398
5399         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5400         to simply use OPT_Wpointer_arith.
5401         (build_unary_op): Likewise.
5402
5403 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
5404
5405         PR c/19449
5406         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5407         argument.  If set, or it temporarily for parsing of the first
5408         argument into force_folding_builtin_constant_p.
5409         (c_parser_postfix_expression): Adjust callers.
5410
5411 2013-03-21  Richard Biener  <rguenther@suse.de>
5412
5413         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5414         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
5415
5416 2013-02-12  Marek Polacek  <polacek@redhat.com>
5417
5418         PR c/44938
5419         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5420         origtypes to NULL.
5421
5422 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
5423
5424         PR c/56078
5425         * c-typeck.c (set_nonincremental_init_from_string): If
5426         constructor_max_index is NULL, treat it as if tree_int_cst_lt
5427         returned false.
5428         (process_init_element): Likewise.
5429
5430 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
5431
5432         PR c++/55619
5433         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5434         argument, don't call default_function_array_conversion
5435         nor c_fully_fold here.
5436         (c_parser_asm_statement): Adjust callers.
5437         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5438         and outputs here, and call default_function_array_conversion
5439         on inputs that don't need to be addressable.
5440
5441 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
5442
5443         PR c/39464
5444         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5445         warning require that both c_common_unsigned_type as well as
5446         c_common_signed_type is the same for both mvl and mvr types.
5447
5448 2012-11-16  Diego Novillo  <dnovillo@google.com>
5449
5450         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5451
5452         * c-common.c: Use new vec API in vec.h.
5453         * c-common.h: Likewise.
5454         * c-gimplify.c: Likewise.
5455         * c-pragma.c: Likewise.
5456         * c-pretty-print.c: Likewise.
5457         * c-pretty-print.h: Likewise.
5458         * c-semantics.c: Likewise.
5459         * c-decl.c: Likewise.
5460         * c-parser.c: Likewise.
5461         * c-tree.h: Likewise.
5462         * c-typeck.c: Likewise.
5463
5464 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
5465
5466         PR c++/54930
5467         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5468
5469 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5470
5471         PR c/53066
5472         * c-decl.c (warn_if_shadowing): Do not warn if a variable
5473         shadows a function, unless the variable is a function or a
5474         pointer-to-function.
5475
5476 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
5477
5478         PR c/54381
5479         * c-parser.c (struct c_tree_loc_pair): Removed.
5480         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5481         add location_t * and tree * arguments, fill in array of 3
5482         sizeof_arg trees and corresponding locs.
5483         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5484         c_parser_expr_list callers.
5485         (c_parser_postfix_expression_after_primary): Likewise.  Pass
5486         array of 3 sizeof_arg trees and locs (corresponding to first
5487         3 arguments) to sizeof_pointer_memaccess_warning.
5488
5489 2012-10-09  Lawrence Crowl  <crowl@google.com>
5490
5491         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5492         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5493         hash table.
5494
5495 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
5496
5497         PR c++/54194
5498         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5499         call.
5500
5501 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
5502
5503         PR c++/54427
5504         * c-typeck.c: Include c-common.h.
5505         (enum stv_conv): Moved to c-common.h.
5506         (scalar_to_vector): Moved to c-common.c.
5507         (build_binary_op): Adapt to scalar_to_vector's new prototype.
5508         * Make-lang.in: c-typeck.c depends on c-common.h.
5509
5510 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
5511
5512         * c-decl.c (c_write_global_declarations): Fix handling of
5513         -fdump-ada-spec*.
5514
5515 2012-09-30  Sharad Singhai  <singhai@google.com>
5516
5517         * c-decl.c (c_write_global_declarations): Use a different method
5518         to determine if the dump has ben initialized.
5519
5520 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5521
5522         PR c/54552
5523         * c-typeck.c (c_cast_expr): When casting to a type requiring
5524         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5525         c_fully_fold first.
5526
5527 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5528
5529         PR c/54103
5530         * c-typeck.c (build_unary_op): Pass original argument of
5531         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5532         any C_MAYBE_CONST_EXPR, if it has integer operands.
5533         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5534         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5535         to c_objc_common_truthvalue_conversion, then remove any
5536         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
5537         c_objc_common_truthvalue_conversion not
5538         c_common_truthvalue_conversion.
5539         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5540         call note_integer_operands for arguments with integer operands
5541         that are not integer constants.
5542
5543 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
5544
5545         PR c/54559
5546         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5547         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5548
5549 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
5550
5551         PR c/54428
5552         * c-convert.c (convert): Don't call fold_convert_loc if
5553         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5554         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
5555         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5556
5557 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
5558
5559         PR c/54355
5560         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5561         for nested and empty_ok arguments in the call to
5562         c_parser_declaration_or_fndef.
5563
5564 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
5565
5566         * c-tree.h (c_last_sizeof_arg): Declare.
5567         * c-parser.c (struct c_tree_loc_pair): New type.
5568         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
5569         non-NULL.
5570         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5571         (c_parser_postfix_expression_after_primary): Likewise.  Call
5572         sizeof_pointer_memaccess_warning if needed.
5573         (sizeof_ptr_memacc_comptypes): New function.
5574         * c-typeck.c (c_last_sizeof_arg): New global variable.
5575         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5576
5577 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
5578
5579         * c-lang.h (lang_decl): Add variable_size GTY option.
5580
5581 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
5582
5583         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5584         * Make-lang.in: Fix dependencies.
5585
5586 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
5587
5588         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5589         and add language Makefile hooks.
5590         * config-lang.in: New file.
5591         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5592         add the required "normal" config-lang.in rules.
5593         * c-lang.h: Moved from gcc/ to here.
5594         * c-tree.h: Likewise.
5595         * c-objc-common.c: Likewise.
5596         * c-objc-common.h: Likewise.
5597         * c-typeck.c: Likewise.
5598         * c-convert.c: Likewise.
5599         * c-lang.c: Likewise.
5600         * c-aux-info.c: Likewise.
5601         * c-errors.c: Likewise.
5602         * gccspec.c: Likewise.
5603         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
5604         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
5605 \f
5606 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5607
5608 Copying and distribution of this file, with or without modification,
5609 are permitted in any medium without royalty provided the copyright
5610 notice and this notice are preserved.