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