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