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