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