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