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