7efb6bfc5444555950756bbf6ced03f98d4cf524
[platform/upstream/gcc.git] / gcc / c / ChangeLog
1 2020-05-28  Nicolas Bértolo  <nicolasbertolo@gmail.com>
2
3         * Make-lang.in: Remove extra slash.
4
5 2020-05-19  Martin Liska  <mliska@suse.cz>
6
7         * c-parser.c: Fix typo.
8
9 2020-05-14  Jakub Jelinek  <jakub@redhat.com>
10
11         * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
12
13 2020-05-07  Richard Biener  <rguenther@suse.de>
14
15         PR middle-end/94703
16         * gimple-parser.c (c_parser_parse_ssa_name): Do not set
17         DECL_GIMPLE_REG_P.
18
19 2020-04-30  Jakub Jelinek  <jakub@redhat.com>
20
21         PR c/94842
22         * c-decl.c (set_labels_context_r): In addition to context-less
23         LABEL_DECLs adjust also LABEL_DECLs with context equal to
24         parent function if any.
25         (store_parm_decls): Adjust comment.
26
27 2020-04-19  Jakub Jelinek  <jakub@redhat.com>
28
29         PR objc/94637
30         * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
31         two CPP_COLON tokens.
32
33 2020-04-17  Jakub Jelinek  <jakub@redhat.com>
34
35         PR other/94629
36         * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
37         to data.clauses.
38
39 2020-04-15  Jakub Jelinek  <jakub@redhat.com>
40
41         PR c/94593
42         * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
43         requires directive when not at file scope.
44
45 2020-04-08  Tobias Burnus  <tobias@codesourcery.com>
46
47         PR middle-end/94120
48         * c-decl.c (c_check_in_current_scope): New function.
49         * c-tree.h (c_check_in_current_scope): Declare it.
50         * c-parser.c (c_parser_oacc_declare): Add check that variables
51         are declared in the same scope as the directive. Fix handling
52         of namespace vars.
53
54 2020-04-07  Jakub Jelinek  <jakub@redhat.com>
55
56         PR c++/94512
57         * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
58         if c_parser_omp_master succeeded.
59
60 2020-03-23  Jakub Jelinek  <jakub@redhat.com>
61
62         PR gcov-profile/94029
63         PR c/94239
64         * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
65         the function_start_locus location.  Don't do that afterwards for the
66         __GIMPLE body parsing.
67
68 2020-03-19  Jakub Jelinek  <jakub@redhat.com>
69
70         PR gcov-profile/94029
71         * c-tree.h (finish_function): Add location_t argument defaulted to
72         input_location.
73         * c-parser.c (c_parser_compound_statement): Add endlocp argument and
74         set it to the locus of closing } if non-NULL.
75         (c_parser_compound_statement_nostart): Return locus of closing }.
76         (c_parser_parse_rtl_body): Likewise.
77         (c_parser_declaration_or_fndef): Propagate locus of closing } to
78         finish_function.
79         * c-decl.c (finish_function): Add end_loc argument, use it instead of
80         input_location to set function_end_locus.
81
82 2020-03-17  Jakub Jelinek  <jakub@redhat.com>
83
84         PR c/94172
85         * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
86         instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
87         (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
88         * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
89         ENUMERAL_TYPEs.
90         (finish_incomplete_vars): New function, moved from finish_struct.  Use
91         relayout_decl instead of layout_decl.
92         (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
93         being TYPE_VFIELD.  Use finish_incomplete_vars.
94         (finish_enum): Clear C_TYPE_INCOMPLETE_VARS.  Call
95         finish_incomplete_vars.
96         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
97         also on ENUMERAL_TYPEs.
98
99 2020-03-16  Jakub Jelinek  <jakub@redhat.com>
100
101         PR c/94179
102         * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
103
104 2020-03-13  Martin Sebor  <msebor@redhat.com>
105
106         PR c/94040
107         * c-decl.c (builtin_structptr_type_count): New constant.
108         (match_builtin_function_types): Reject decls that are incompatible
109         in types pointed to by pointers.
110         (diagnose_mismatched_decls): Adjust comments.
111
112 2020-03-05  Joseph Myers  <joseph@codesourcery.com>
113
114         PR c/93577
115         * c-typeck.c (pop_init_level): Do not diagnose initializers as
116         empty when initialized type is error_mark_node.
117         (set_designator, process_init_element): Ignore initializers for
118         elements of a variable-size type or of error_mark_node.
119
120 2020-03-01  Martin Sebor  <msebor@redhat.com>
121
122         PR middle-end/93926
123         * c-decl.c (types_close_enough_to_match): New function.
124         (match_builtin_function_types):
125         (diagnose_mismatched_decls): Add missing inform call to a warning.
126
127 2020-03-01  Martin Sebor  <msebor@redhat.com>
128
129         PR c/93812
130         * c-typeck.c (build_functype_attribute_variant): New function.
131         (composite_type): Call it.
132
133 2020-02-25  Jakub Jelinek  <jakub@redhat.com>
134
135         PR other/93912
136         * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
137         Rename last argument from probablity to probability.
138
139 2020-02-13  Jakub Jelinek  <jakub@redhat.com>
140
141         PR c/93576
142         * c-decl.c (grokdeclarator): If this_size_varies, only push size into
143         *expr if it has side effects.
144
145 2020-01-30  Jeff Law  <law@redhat.com>
146
147         PR c/88660
148         * c-parser.c (c_parser_switch_statement): Make sure to request
149         marking the switch expr as used.
150
151 2020-01-22  Joseph Myers  <joseph@codesourcery.com>
152
153         PR c/93348
154         * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
155         argument with integer operands.
156
157 2020-01-16  Kerem Kat  <keremkat@gmail.com>
158
159         PR c/92833
160         * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
161         to support 4 available tokens.
162
163 2020-01-15  Joseph Myers  <joseph@codesourcery.com>
164
165         PR c/93072
166         * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
167         determine whether to set DECL_CONTEXT.
168
169 2020-01-13  Joseph Myers  <joseph@codesourcery.com>
170
171         PR c/93241
172         * c-typeck.c (build_c_cast): Check for expressions with integer
173         operands that can occur in an unevaluated part of an integer
174         constant expression and call note_integer_operands as needed.
175
176 2019-01-08  Richard Biener  <rguenther@suse.de>
177
178         PR middle-end/93199
179         * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
180         permanently.
181
182 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
183
184         Update copyright years.
185
186 2019-12-20  Eric Botcazou  <ebotcazou@adacore.com>
187
188         * c-decl.c (collect_source_ref_cb): Delete.
189         (for_each_global_decl): Rename into...
190         (collect_source_refs): ...this.  Call collect_source_ref directly.
191         (c_parse_final_cleanups): Always call collect_source_ref on the main
192         input filename.
193
194 2019-12-19  Julian Brown  <julian@codesourcery.com>
195             Cesar Philippidis  <cesar@codesourcery.com>
196
197         * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
198         detach clauses.
199         (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
200         Allow deref (->) in variable lists if true.
201         (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
202         Pass to c_parser_omp_variable_list.
203         (c_parser_oacc_data_clause): Support attach and detach clauses.  Update
204         call to c_parser_omp_variable_list.
205         (c_parser_oacc_all_clauses): Support attach and detach clauses.
206         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
207         OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
208         OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
209         (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
210         * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
211         and detach.  Support deref.
212         (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
213         GOMP_MAP_ALWAYS_POINTER for OpenACC.
214         (c_oacc_check_attachments): New function.
215         (c_finish_omp_clauses): Check attach/detach arguments for being
216         pointers using above.  Support deref.
217
218 2019-12-19  Julian Brown  <julian@codesourcery.com>
219             Maciej W. Rozycki  <macro@codesourcery.com>
220             Tobias Burnus  <tobias@codesourcery.com>
221             Thomas Schwinge  <thomas@codesourcery.com>
222
223         * c-parser.c (c_parser_omp_clause_name): Support no_create.
224         (c_parser_oacc_data_clause): Likewise.
225         (c_parser_oacc_all_clauses): Likewise.
226         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
227         (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
228         PRAGMA_OACC_CLAUSE_NO_CREATE.
229         * c-typeck.c (handle_omp_array_sections): Support
230         GOMP_MAP_NO_ALLOC.
231
232 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
233
234         * c-objc-common.c (range_label_for_type_mismatch::get_text):
235         Replace label_text ctor calls.
236
237 2019-12-04  Joseph Myers  <joseph@codesourcery.com>
238
239         PR c/36941
240         PR c/88827
241         * c-typeck.c (convert_lvalue_to_rvalue): Call
242         require_complete_type for arguments not of void types.
243         (build_indirect_ref): Do not diagnose dereferencing pointers to
244         incomplete types.
245         * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
246
247 2019-12-03  Joseph Myers  <joseph@codesourcery.com>
248
249         PR c/88704
250         * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
251         old-style parameter definitions.
252
253 2019-12-01  Sandra Loosemore  <sandra@codesourcery.com>
254
255         PR target/92499
256
257         * c-decl.c (flexible_array_type_p): Move to common code.
258
259 2019-11-30  Richard Sandiford  <richard.sandiford@arm.com>
260
261         * c-decl.c (start_decl): Allow initialization of variables whose
262         size is a POLY_INT_CST.
263         (finish_decl): Use verify_type_context to check whether the target
264         allows variables with a particular type to have static or thread-local
265         storage duration.  Don't raise a second error if such variables do
266         not have a constant size.
267         (grokdeclarator): Use verify_type_context to check whether the
268         target allows fields or array elements to have a particular type.
269         * c-typeck.c (pointer_diff): Use verify_type_context to test whether
270         the target allows pointer difference for the types involved.
271         (build_unary_op): Likewise for pointer increment and decrement.
272
273 2019-11-29  Joseph Myers  <joseph@codesourcery.com>
274
275         * c-parser.c (struct c_parser): Add members raw_tokens and
276         raw_tokens_used.
277         (c_lex_one_token): Add argument raw.  Handle lexing raw tokens and
278         using previously-lexed raw tokens.
279         (c_parser_peek_nth_token_raw)
280         (c_parser_check_balanced_raw_token_sequence): New functions.
281         (c_parser_nth_token_starts_std_attributes): Use
282         c_parser_check_balanced_raw_token_sequence for Objective-C.
283
284 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
285
286         PR c/91985
287         * c-decl.c (finish_declspecs): Use int instead of decimal
288         floating-point types if decimal floating-point not supported.
289
290 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
291
292         * c-tree.h (struct c_declarator): Use a structure for id member.
293         * c-decl.c (grokdeclarator): Extract attributes from cdk_id
294         declarators at the start, not when handling individual declarators
295         later.  Use u.id.id instead of u.id.
296         (grokfield): Use u.id.id instead of u.id.
297         (build_id_declarator): Set u.id.id and u.id.attrs.
298         (finish_declspecs): Handle postfix attributes in case of typedef
299         name or typeof used.
300         * c-parser.c (c_parser_direct_declarator)
301         (c_parser_direct_declarator_inner): Place declarator for
302         attributes inside that for function or array, not outside.  Set
303         u.id.attrs for identifiers.
304         (c_parser_parameter_declaration): Use u.id.id instead of u.id.
305         * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
306         instead of u.id.
307
308 2019-11-22  Jakub Jelinek  <jakub@redhat.com>
309
310         PR c/90677
311         * c-decl.c (identifier_global_tag): Define.
312
313 2019-11-20  Richard Biener  <rguenther@suse.de>
314
315         PR c/92088
316         * c-decl.c (grokdeclarator): Prevent inlining of nested
317         function with VLA arguments.
318
319 2019-11-20  Joseph Myers  <joseph@codesourcery.com>
320
321         * c-decl.c (c_warn_type_attributes): New function.
322         (groktypename, grokdeclarator, finish_declspecs): Call
323         c_warn_type_attributes before applying attributes to types.
324         * c-tree.h (c_warn_type_attributes): Declare.
325
326 2019-11-19  Joseph Myers  <joseph@codesourcery.com>
327
328         * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
329         standard attributes.
330         * c-parser.c (c_parser_std_attribute): Take argument for_tm.  Use
331         pedwarn for unknown standard attributes and return error_mark_node
332         for them.
333
334 2019-11-18  Matthew Malcomson  <matthew.malcomson@arm.com>
335
336         * c-parser.c (c_parser_parse_rtl_body): Always call
337         run_rtl_passes, even if startwith pass is not provided.
338
339 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
340
341         * c-parser.c (c_parser_std_attribute_specifier): Diagnose
342         duplicate standard attributes.
343
344 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
345
346         * c-decl.c (std_attribute_table): Add maybe_unused.
347
348 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
349
350         * c-decl.c (std_attribute_table): Add fallthrough.
351         * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
352         attribute at top level.
353
354 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
355
356         * c-decl.c (std_attribute_table): New.
357         (c_init_decl_processing): Register attributes from
358         std_attribute_table.
359         * c-parser.c (c_parser_attribute_arguments): Add arguments
360         require_string and allow_empty_args.  All callers changed.
361         (c_parser_std_attribute): Set require_string argument for
362         "deprecated" attribute.
363
364 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
365
366         * c-parser.c (c_parser_postfix_expression)
367         (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
368         * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
369
370 2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>
371
372         * c-typeck.c (build_conditional_expr): Use truth_type_for instead
373         of build_same_sized_truth_vector_type.
374         (build_vec_cmp): Likewise.
375
376 2019-11-14  Jakub Jelinek  <jakub@redhat.com>
377
378         * c-parser.c (c_parser_omp_context_selector): Don't require score
379         argument to fit into shwi, just to be INTEGER_CST.  Diagnose
380         negative score.
381
382         * c-parser.c (c_parser_omp_context_selector): Rename
383         CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
384         Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
385         identifier in that.  For CTX_PROPERTY_NAME_LIST, allow identifiers
386         and string literals.
387
388 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
389
390         * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
391         ctsk_tagfirstref_attrs.
392         (struct c_declspecs): Update description of attrs.  Add
393         postfix_attrs and non_std_attrs_seen_p.  Increase size of
394         typespec_kind bit-field.
395         (c_warn_unused_attributes): New declaration.
396         (parser_xref_tag): Update prototype.
397         * c-decl.c (c_warn_unused_attributes): New function.
398         (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
399         ctsk_tagref_attrs.  Handle attribute declarations.
400         (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
401         (grokdeclarator): Handle standard attributes.
402         (parser_xref_tag): Add arguments have_std_attrs and attrs.  Apply
403         attributes to incomplete type reference.
404         (xref_tag): Update call to parser_xref_tag.
405         (declspecs_add_addrspace, declspecs_add_type)
406         (declspecs_add_scspec, declspecs_add_attrs): Set
407         non_std_attrs_seen_p.
408         (finish_declspecs): Apply postfix standard attributes to type.
409         * c-parser.c (c_token_starts_declspecs)
410         (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
411         (c_parser_next_tokens_start_declaration): Update comments.
412         (c_parser_consume_token, c_parser_consume_pragma): Handle moving
413         parser->tokens[2] to parser->tokens[1].
414         (c_parser_nth_token_starts_std_attributes)
415         (c_parser_std_attribute_specifier_sequence): New functions.
416         (c_parser_declaration_or_fndef): Add arguments have_attrs and
417         attrs.  All callers changed.  Handle standard attributes.
418         (c_parser_parms_declarator, c_parser_parms_list_declarator)
419         (c_parser_parameter_declaration): Add argument have_gnu_attrs.
420         All callers changed.
421         (c_parser_declspecs): Add arguments start_std_attr_ok and
422         end_std_attr_ok.  All callers changed.  Handle standard
423         attributes.
424         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
425         (c_parser_direct_declarator, c_parser_direct_declarator_inner)
426         (c_parser_compound_statement_nostart, c_parser_all_labels)
427         (c_parser_label, c_parser_statement, c_parser_for_statement):
428         Handle standard attributes.
429         * c-parser.h (c_parser_declspecs): Update prototype.
430         * gimple-parser.c (c_parser_gimple_declaration): Update call to
431         c_parser_declspecs.
432
433 2019-11-12  Martin Liska  <mliska@suse.cz>
434
435         * gimple-parser.c: Do not include params.h.
436
437 2019-11-12  Martin Liska  <mliska@suse.cz>
438
439         * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
440         with the new one, include opts.h if needed.  Use SET_OPTION_IF_UNSET
441         macro.
442
443 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
444             Frederik Harwath  <frederik@codesourcery.com>
445
446         gcc/c/
447         * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
448         (c_parser_oacc_kernels_parallel): Rename function to...
449         (c_parser_oacc_compute): ... this.  Handle PRAGMA_OACC_SERIAL.
450         (c_parser_omp_construct): Update accordingly.
451
452
453 2019-11-11  Jakub Jelinek  <jakub@redhat.com>
454
455         * c-parser.c (c_parser_translation_unit): Diagnose declare target
456         without corresponding end declare target.
457
458 2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
459
460         * c-convert.c (convert): Only handle vector conversions if one of
461         the types satisfies gnu_vector_type_p or if -flax-vector-conversions
462         allows it.
463         * c-typeck.c (build_array_ref): Only allow vector indexing if the
464         vectors satisfy gnu_vector_type_p.
465         (build_unary_op): Only allow unary operators to be applied to
466         vectors if they satisfy gnu_vector_type_p.
467         (digest_init): Only allow by-element initialization of vectors
468         if they satisfy gnu_vector_type_p.
469         (really_start_incremental_init): Likewise.
470         (push_init_level): Likewise.
471         (pop_init_level): Likewise.
472         (process_init_element): Likewise.
473         (build_binary_op): Only allow binary operators to be applied to
474         vectors if they satisfy gnu_vector_type_p.
475
476 2019-11-08  Joseph Myers  <joseph@codesourcery.com>
477
478         * c-decl.c (grokparms): Convert () in a function definition to
479         (void) for C2x.
480         (store_parm_decls_oldstyle): Pedwarn for C2x.
481         (store_parm_decls): Update comment about () not generating a
482         prototype.
483
484 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
485
486         * c-parser.c (c_parser_attribute_arguments): New function.
487         Factored out of c_parser_gnu_attribute.
488         (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
489         (c_parser_balanced_token_sequence, c_parser_std_attribute)
490         (c_parser_std_attribute_specifier): New functions.
491         (c_parser_transaction_attributes): Use
492         c_parser_std_attribute_specifier.
493
494 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
495
496         * c-parser.c (c_parser): Remove lex_untranslated_string.  Add
497         lex_joined_string and translate_strings_p.
498         (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
499         c_lex_with_flags.
500         (c_parser_string_literal): New function.
501         (c_parser_static_assert_declaration_no_semi): Use
502         c_parser_string_literal.  Do not set lex_untranslated_string.
503         (c_parser_asm_string_literal): Use c_parser_string_literal.
504         (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
505         (c_parser_gnu_attributes): Set and restore translate_strings_p
506         instead of lex_untranslated_string.
507         (c_parser_asm_statement): Do not set lex_untranslated_string.
508         (c_parser_asm_operands): Likewise.
509         (c_parser_has_attribute_expression): Set and restore
510         translate_strings_p instead of lex_untranslated_string.
511         (c_parser_postfix_expression): Use c_parser_string_literal.
512         (pragma_lex): Likewise.
513         (c_parser_pragma_pch_preprocess): Set lex_joined_string.
514         (c_parse_file): Set translate_strings_p.
515         * gimple-parser.c (c_parser_gimple_postfix_expression)
516         (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
517         * c-parser.c (c_parser_string_literal): Declare function.
518
519 2019-11-02  Jakub Jelinek  <jakub@redhat.com>
520
521         * c-parser.c (c_finish_omp_declare_variant): Use
522         omp_get_context_selector instead of c_omp_get_context_selector.
523
524 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
525
526         * c-tree.h (c_simulate_enum_decl): Declare.
527         * c-decl.c (c_simulate_enum_decl): New function.
528         * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
529
530 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
531
532         * c-tree.h (c_simulate_builtin_function_decl): Declare.
533         * c-decl.c (c_simulate_builtin_function_decl): New function.
534         * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
535         to the above.
536
537 2019-10-28  Martin Sebor  <msebor@redhat.com>
538
539         PR c/66970
540         * c-decl.c (names_builtin_p): Define a new function.
541
542 2019-10-28  Richard Biener  <rguenther@suse.de>
543
544         PR c/92249
545         * gimple-parser.c (c_parser_parse_gimple_body): Make
546         current_bb the entry block initially to easier recover
547         from errors.
548         (c_parser_gimple_compound_statement): Adjust.
549
550 2019-10-24  Jakub Jelinek  <jakub@redhat.com>
551
552         * c-parser.c (c_finish_omp_declare_variant): Use
553         omp_context_selector_matches instead of
554         c_omp_context_selector_matches.
555         * c-decl.c (c_decl_attributes): Add "omp declare target block"
556         attribute in between declare target and end declare target
557         pragmas.
558
559 2019-10-15  Joseph Myers  <joseph@codesourcery.com>
560
561         * c-parser.c (c_parser_attribute_any_word): Rename to
562         c_parser_gnu_attribute_any_word.  All callers changed.
563         (c_parser_attribute): Rename to c_parser_gnu_attribute.  All
564         callers changed.
565         (c_parser_attributes): Rename to c_parser_gnu_attributes.  All
566         callers changed.
567         (c_parser_declaration_or_fndef, c_parser_declspecs)
568         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
569         (c_parser_struct_declaration, c_parser_declarator)
570         (c_parser_gnu_attribute, c_parser_compound_statement)
571         (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
572         (c_parser_transaction_attributes): Add "gnu-" prefix to names of
573         attribute-related syntax productions.
574
575 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
576
577         * c-objc-common.c (useful_aka_type_p): Replace with...
578         (get_aka_type): ...this new function.  Given the original type,
579         decide which aka type to print (if any).  Only look through typedefs
580         if user_facing_original_type_p.
581         (print_type): Update accordingly.
582
583 2019-10-14  Jakub Jelinek  <jakub@redhat.com>
584
585         * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
586         into int NESTED, if it is 2, diagnose missing commas in between
587         clauses.
588         (c_parser_omp_context_selector): Pass 2 as last argument to
589         c_parser_omp_all_clauses.
590
591 2019-10-12  Jakub Jelinek  <jakub@redhat.com>
592
593         * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
594         For simd properties, put them directly into TREE_VALUE.
595         (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
596         If c_omp_context_selector_matches is 0, don't add attribute, otherwise
597         add "omp declare variant base" attribute rather than
598         "omp declare variant".
599
600 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
601
602         * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
603
604 2019-10-10  Jakub Jelinek  <jakub@redhat.com>
605
606         * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
607         true, terminate processing on closing paren and don't skip to end of
608         pragma line.
609         (c_parser_omp_declare_simd): Handle also declare variant.
610         (omp_construct_selectors, omp_device_selectors,
611         omp_implementation_selectors, omp_user_selectors): New variables.
612         (c_parser_omp_context_selector,
613         c_parser_omp_context_selector_specification,
614         c_finish_omp_declare_variant): New functions.
615         (c_finish_omp_declare_simd): Handle both declare simd and
616         declare variant.
617         (c_parser_omp_declare): Handle declare variant.
618
619 2019-10-02  Joseph Myers  <joseph@codesourcery.com>
620
621         * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
622         CPP_COLON tokens.
623
624 2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
625
626         * c-objc-common.c (useful_aka_type_p): New function.
627         (print_type): Use it to decide whether an aka type is worth printing.
628
629 2019-09-27  Jakub Jelinek  <jakub@redhat.com>
630
631         PR c++/88203
632         * c-parser.c (c_parser_predefined_identifier): New function.
633         (c_parser_postfix_expression): Use it.
634         (c_parser_omp_variable_list): Parse predefined identifiers.
635         * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
636         in shared and firstprivate clauses, even when they are predetermined
637         shared.
638
639 2019-09-27  Richard Sandiford  <richard.sandiford@arm.com>
640
641         * c-typeck.c (build_function_call_vec): Take the original function
642         decl as an optional final parameter.  Pass all built-in calls to
643         check_builtin_function_arguments.
644
645 2019-09-20  Eric Botcazou  <ebotcazou@adacore.com>
646
647         PR c/91815
648         * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
649         of identifiers in the external scope only for variables and functions.
650
651 2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
652
653         PR c/78736
654         * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
655
656 2019-08-23  Iain Sandoe  <iain@sandoe.co.uk>
657
658         PR pch/61250
659         * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
660         after determining that the first token is not
661         PRAGMA_GCC_PCH_PREPROCESS.
662
663 2019-08-22  Eric Botcazou  <ebotcazou@adacore.com>
664
665         * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
666         FUNCTION_DECL to the right value in the presence of nested declarators.
667
668 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
669
670         PR middle-end/91421
671         * c-decl.c (merge_decls): Use copy_decl_built_in_function.
672
673 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
674
675         PR middle-end/91421
676         * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
677         of a built_in_function.
678         (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
679
680 2019-08-10  Jakub Jelinek  <jakub@redhat.com>
681
682         * c-parser.c (c_parser_omp_clause_name): Parse device_type.
683         (c_parser_omp_clause_device_type): New function.
684         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
685         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
686         (c_parser_omp_declare_target): Handle device_type clauses.  Remove
687         diagnostics for declare target with clauses nested in clause-less
688         declare target declaration-definition-seq.
689         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
690
691 2019-08-09  Jakub Jelinek  <jakub@redhat.com>
692
693         * c-parser.c (check_no_duplicate_clause): Simplify using
694         omp_find_clause.
695         (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
696         directive name modifiers.
697         (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
698
699         PR c/91401
700         * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
701         check_no_duplicate_clause call.  Comment it out, instead emit a
702         warning for duplicate dist_schedule clauses.
703
704 2019-08-08  Richard Sandiford  <richard.sandiford@arm.com>
705
706         * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
707
708 2019-08-08  Jakub Jelinek  <jakub@redhat.com>
709
710         * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
711         OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
712         instead of generic_head to track duplicates.
713
714 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
715
716         * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
717         (c_parser_omp_clause_use_device_addr): New function.
718         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
719         (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
720         (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
721         like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
722         map or use_device_* clauses.
723         * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
724         in OpenMP, require pointer type rather than pointer or array type.
725         Handle OMP_CLAUSE_USE_DEVICE_ADDR.
726
727 2019-07-31  Jakub Jelinek  <jakub@redhat.com>
728
729         PR c/91192
730         * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
731         even if finish is UNKNOWN_LOCATION, just use start as finish in that
732         case.
733
734 2019-07-25  Martin Liska  <mliska@suse.cz>
735             Dominik Infuhr  <dominik.infuehr@theobroma-systems.com>
736
737         PR c++/23383
738         * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
739
740 2019-07-25  Martin Liska  <mliska@suse.cz>
741
742         * c-decl.c (merge_decls): Use new macros
743         (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
744
745 2019-07-23  Richard Biener  <rguenther@suse.de>
746
747         PR tree-optimization/83518
748         * gimple-parser.c (c_parser_parse_gimple_body): When we have
749         a CFG also rebuild cgraph edges.
750
751 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
752
753         * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
754         (c_parser_omp_clause_bind): New function.
755         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
756         (OMP_LOOP_CLAUSE_MASK): Define.
757         (c_parser_omp_loop): New function.
758         (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
759         loop combined with parallel or teams.
760         (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
761         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
762
763 2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
764
765         PR c/53633
766         * c-decl.c (finish_function): Check targetm.warn_func_return
767         before issuing a -Wreturn-type warning.
768
769 2019-07-12  Alexandre Oliva  <oliva@adacore.com>
770
771         * gimple-parser.c (c_parser_gimple_try_stmt): New.
772         (c_parser_compound_statement): Call it.
773
774 2019-07-12  Jakub Jelinek  <jakub@redhat.com>
775
776         * c-parser.c (c_parser_omp_clause_name): Handle order clause.
777         (c_parser_omp_clause_order): New function.
778         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
779         (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
780         PRAGMA_OMP_CLAUSE_ORDER.
781         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
782
783 2019-07-10  Richard Biener  <rguenther@suse.de>
784
785         * gimple-parser.c (c_parser_gimple_postfix_expression): Support
786         _Literal (int *) &x for address literals.
787
788 2019-07-09  Martin Sebor  <msebor@redhat.com>
789
790         PR c++/61339
791         * c-decl.c (xref_tag): Change class-key of PODs to struct and others
792         to class.
793         (field_decl_cmp): Same.
794         * c-parser.c (c_parser_struct_or_union_specifier): Same.
795         * c-tree.h: Same.
796         * gimple-parser.c (c_parser_gimple_compound_statement): Same.
797
798 2019-07-09  Martin Sebor  <msebor@redhat.com>
799
800         PR c++/61339
801         * c-decl.c: Change class-key from class to struct and vice versa
802         to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
803         * gimple-parser.c: Same.
804
805 2019-07-01  Richard Biener  <rguenther@suse.de>
806
807         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
808         _Literal (char *) &"foo" for address literals pointing to
809         STRING_CSTs.
810
811 2019-06-25  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
812
813         * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
814         * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
815         C incompatibility if alternate "__intN__" form is used.
816
817 2019-06-24  Martin Sebor  <msebor@redhat.com>
818
819         * c-typeck.c (build_binary_op): Hyphenate floating-point.
820
821 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
822
823         * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
824         (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
825         (c_parser_omp_scan_loop_body): New function.
826         (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
827         inscan reduction clauses.
828         * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
829         non-inscan reductions on the same construct, or inscan reductions with
830         ordered or schedule clauses, or inscan array reductions.
831
832 2019-06-05  Martin Sebor  <msebor@redhat.com>
833
834         PR c/90737
835         * c-typeck.c (c_finish_return): Only consider functions returning
836         pointers as candidates for -Wreturn-local-addr.
837
838 2019-06-05  Martin Sebor  <msebor@redhat.com>
839
840         * c-decl.c (start_decl): Adjust quoting and hyphenation
841         in diagnostics.
842         (finish_decl): Same.
843         (finish_enum): Same.
844         (start_function): Same.
845         (declspecs_add_type): Same.
846         * c-parser.c (warn_for_abs): Same.
847         * c-typeck.c (build_binary_op): Same.
848
849 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
850
851         PR c/89433
852         * c-parser.c (c_finish_oacc_routine): Rework checking if already
853         marked with an OpenACC 'routine' directive.
854
855         PR c/89433
856         * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
857         (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
858
859         PR c/89433
860         * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
861         clauses from "omp declare target" attribute.
862
863 2019-05-16  Martin Sebor  <msebor@redhat.com>
864
865         * c-decl.c (start_decl): Quote keywords, operators, and
866         types in diagnostics.
867         (finish_decl): Same.
868         * c-parser.c (c_parser_asm_statement): Same.
869         (c_parser_conditional_expression): Same.
870         (c_parser_transaction_cancel): Same.
871         * c-typeck.c (c_common_type): Same.
872         (build_conditional_expr): Same.
873         (digest_init): Same.
874         (process_init_element): Same.
875         (build_binary_op): Same.
876
877 2019-05-17  Richard Biener  <rguenther@suse.de>
878
879         * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
880         (c_parser_gimple_unary_expression): Likewise.
881         (c_parser_gimple_parentized_ternary_expression): New function.
882
883 2019-05-16  Richard Biener  <rguenther@suse.de>
884
885         * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
886         (c_parser_gimple_unary_expression): Likewise.
887
888 2019-05-15  Richard Biener  <rguenther@suse.de>
889
890         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
891         __BIT_FIELD_REF.
892
893 2019-05-14  Richard Biener  <rguenther@suse.de>
894
895         * gimple-parser.c (c_parser_gimple_statement): Remove
896         questionable auto-promotion to VIEW_CONVERT_EXPR.
897         (c_parser_gimple_typespec): Split out from __MEM parsing.
898         (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
899         * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
900         as __VIEW_CONVERT with -gimple.
901
902 2019-05-09  Martin Liska  <mliska@suse.cz>
903
904         * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
905         __MAX.
906         (c_parser_gimple_unary_expression): Parse also binary expression
907         __MIN and __MAX.
908         (c_parser_gimple_parentized_binary_expression): New function.
909
910 2019-05-09  Martin Liska  <mliska@suse.cz>
911
912         * gimple-parser.c (struct gimple_parser): Add probability.
913         for gimple_parser_edge.
914         (gimple_parser::push_edge): Add new argument probability.
915         (c_parser_gimple_parse_bb_spec): Parse also probability
916         if present.
917         (c_parser_parse_gimple_body): Set edge probability.
918         (c_parser_gimple_compound_statement): Consume token
919         before calling c_parser_gimple_goto_stmt.
920         Parse BB counts.
921         (c_parser_gimple_statement): Pass new argument.
922         (c_parser_gimple_goto_stmt): Likewise.
923         (c_parser_gimple_if_stmt): Likewise.
924         (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
925         * c-parser.c (c_parser_declaration_or_fndef): Pass
926         hot_bb_threshold argument.
927         * c-tree.h (struct c_declspecs): Add hot_bb_threshold
928         field.
929         (c_parser_gimple_parse_bb_spec_edge_probability): New.
930
931 2019-04-26  Jakub Jelinek  <jakub@redhat.com>
932
933         PR debug/90197
934         * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
935         * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
936         (c_parser_do_statement): Likewise.
937         (c_parser_for_statement): Likewise.  Formatting fixes.
938         * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
939         emit DEBUG_BEGIN_STMTs if needed.
940
941 2019-04-19  Jakub Jelinek  <jakub@redhat.com>
942
943         PR c/89888
944         * c-typeck.c (struct c_switch): Remove outside_range_p member.
945         (c_start_case): Don't clear it.
946         (do_case): Adjust c_add_case_label caller.
947         (c_finish_case): Adjust c_do_switch_warnings caller.
948
949         PR c++/90108
950         * c-decl.c (merge_decls): If remove is main variant and
951         DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
952         variant that has newdecl as TYPE_NAME if any.
953
954 2019-04-12  Jakub Jelinek  <jakub@redhat.com>
955
956         PR c/89933
957         * c-decl.c (merge_decls): When newdecl's type is its main variant,
958         don't try to remove it from the variant list, but instead assert
959         it has no variants.
960
961 2019-04-01  Richard Biener  <rguenther@suse.de>
962
963         PR c/71598
964         * c-tree.h (c_get_alias_set): Declare.
965         * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
966         * c-objc-common.c (c_get_alias_set): Treat enumeral types
967         as the underlying integer type.
968
969 2019-03-19  Martin Sebor  <msebor@redhat.com>
970
971         PR tree-optimization/89688
972         * c-decl.c (finish_decl): Call braced_lists_to_string for more
973         kinds of initializers.
974
975 2019-03-19  Jakub Jelinek  <jakub@redhat.com>
976
977         PR c/89734
978         * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
979         return type even if quals_used is 0.  Formatting fixes.
980
981 2019-03-14  Richard Biener  <rguenther@suse.de>
982
983         * c-tree.h (enum c_declspec_il): New.
984         (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
985         enum bitfield.
986         * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
987         Pass start pass and declspec_il to c_parser_parse_gimple_body.
988         (c_parser_declspecs): Adjust.
989         * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
990         gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
991         and bitmap.h.
992         (struct gimple_parser): New.
993         (gimple_parser::push_edge): New method.
994         (c_parser_gimple_parse_bb_spec): New helper.
995         (c_parser_parse_gimple_body): Get start pass and IL specification.
996         Initialize SSA and CFG.
997         (c_parser_gimple_compound_statement): Handle CFG and SSA build.
998         Build a gimple_parser parsing state and pass it along.
999         (c_parser_gimple_statement): Change intermittend __PHI internal
1000         function argument for the edge.
1001         (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1002         (c_parser_gimple_goto_stmt): Record edges to build.
1003         (c_parser_gimple_if_stmt): Likewise.
1004         * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1005         (c_parser_gimple_or_rtl_pass_list): Likewise.
1006
1007 2019-03-11  Martin Liska  <mliska@suse.cz>
1008
1009         * c-decl.c (check_for_loop_decls): Wrap an option name
1010         in a string format message and fix GNU coding style.
1011         * c-parser.c (c_parser_declspecs): Likewise.
1012
1013 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
1014
1015         PR tree-optimization/89550
1016         * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1017         returned true.
1018         (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1019         or warning returned true.
1020
1021 2019-02-28  Jakub Jelinek  <jakub@redhat.com>
1022
1023         PR c/89525
1024         * c-typeck.c (convert_arguments): Call inform_declaration only if
1025         the previous warning_at call returned true.
1026
1027 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
1028
1029         * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1030         parameter.  Adjust all users.
1031         (c_parser_oacc_simple_clause): Replace parser with loc formal
1032         parameter.  Adjust all users.
1033
1034 2019-02-19  Chung-Lin Tang  <cltang@codesourcery.com>
1035
1036         PR c/87924
1037         * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1038         clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1039
1040 2019-02-15  Jakub Jelinek  <jakub@redhat.com>
1041
1042         PR c/89340
1043         * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1044         before c_decl_attributes rather than after it.
1045
1046 2019-02-06  Jakub Jelinek  <jakub@redhat.com>
1047
1048         PR c/89211
1049         * c-parser.c (c_parser_declaration_or_fndef): Don't update
1050         DECL_ARGUMENTS of d if it has been defined already.  Use a single if
1051         instead of 3 nested ifs.
1052
1053 2019-02-06  Joseph Myers  <joseph@codesourcery.com>
1054
1055         PR c/88584
1056         * c-decl.c (finish_decl): Do not complete array types for arrays
1057         with external linkage not at file scope.
1058
1059 2019-02-05  Richard Biener  <rguenther@suse.de>
1060
1061         PR c/88606
1062         * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1063         all type variants when not supported.
1064
1065 2019-01-30  Jakub Jelinek  <jakub@redhat.com>
1066
1067         PR c/89061
1068         * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1069         * c-decl.c (decl_jump_unsafe): Return false for
1070         C_DECL_COMPOUND_LITERAL_P decls.
1071         (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1072
1073 2019-01-29  Jakub Jelinek  <jakub@redhat.com>
1074
1075         PR c/89045
1076         * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1077         scope.
1078
1079         PR c/86125
1080         * c-decl.c (last_fileptr_type): Remove.
1081         (last_structptr_types): New variable.
1082         (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1083         {old,new}rettype instead of the types themselves.  Assert
1084         last_structptr_types array has the same number of elements
1085         as builtin_structptr_types array.  Use TYPE_MAIN_VARIANT for
1086         argument oldtype and newtype.  Instead of handling
1087         just fileptr_type_node specially, handle all builtin_structptr_types
1088         pointer nodes.  Formatting fix.
1089
1090 2019-01-24  Martin Sebor  <msebor@redhat.com>
1091
1092         PR c/86125
1093         PR c/88886
1094         PR middle-end/86308
1095         * c-decl.c (match_builtin_function_types): Add arguments.
1096         (diagnose_mismatched_decls): Diagnose mismatched declarations
1097         of built-ins more strictly.
1098
1099 2019-01-24  Jakub Jelinek  <jakub@redhat.com>
1100
1101         PR c++/88976
1102         * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1103         on #pragma omp cancel with different modifiers.
1104
1105 2019-01-18  H.J. Lu  <hongjiu.lu@intel.com>
1106
1107         PR c/51628
1108         PR c/88664
1109         * c-typeck.c (convert_for_assignment): Upate the
1110         warn_for_address_or_pointer_of_packed_member call.
1111
1112 2019-01-16  Tom Honermann  <tom@honermann.net>
1113             Jason Merrill  <jason@redhat.com>
1114
1115         * c-typeck.c (digest_init): Revised the error message produced for
1116         ill-formed cases of array initialization with a string literal.
1117         (error_init): Make variadic.
1118
1119 2019-01-12  Jakub Jelinek  <jakub@redhat.com>
1120
1121         * c-typeck.c (convert_for_assignment): Fix a comment typo.
1122
1123 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
1124
1125         PR c/88701
1126         * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1127         if current_function_decl is non-NULL.
1128
1129 2019-01-07  Joseph Myers  <joseph@codesourcery.com>
1130
1131         PR c/88720
1132         PR c/88726
1133         * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1134         whether a function is nested, not DECL_EXTERNAL.  Diagnose inline
1135         functions declared but never defined only for external scope, not
1136         for other scopes.
1137
1138 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
1139
1140         PR c++/85052
1141         * c-parser.c (c_parser_postfix_expression): Parse
1142         __builtin_convertvector.
1143
1144 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
1145
1146         Update copyright years.
1147
1148 2018-12-20  H.J. Lu  <hongjiu.lu@intel.com>
1149
1150         PR c/51628
1151         * c-typeck.c (convert_for_assignment): Call
1152         warn_for_address_or_pointer_of_packed_member.
1153
1154 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
1155
1156         * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1157         a more specific error message (instead of just falling through).
1158
1159 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
1160
1161         * c-parser.c (c_parser_asm_statement): Keep track of the location each
1162         asm qualifier is first seen; use that to give nicer "duplicate asm
1163         qualifier" messages.  Delete 'quals" variable, instead pass the
1164         "is_volatile_ flag to build_asm_stmt directly.
1165         * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1166         * c-typeck.c (build_asm_stmt): Ditto; adjust.
1167
1168 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
1169
1170         * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1171         "done" boolean variable.
1172
1173 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
1174
1175         PR c++/87504
1176         * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1177         Move from here to gcc-rich-location.h and gcc-rich-location.c.
1178         (build_binary_op): Use struct op_location_t and
1179         class binary_op_rich_location.
1180
1181 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
1182
1183         PR sanitizer/88426
1184         * c-convert.c (convert): Call c_fully_fold before calling
1185         ubsan_instrument_float_cast.
1186
1187 2018-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
1188
1189         * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1190         setting "quals".
1191
1192 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
1193
1194         * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1195         after asm.  Pass a flag for it to build_asm_expr.
1196         * c-tree.h (build_asm_expr): Update declaration.
1197         * c-typeck.c (build_asm_stmt): Add is_inline parameter.  Use it to
1198         set ASM_INLINE_P.
1199
1200 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
1201
1202         PR inline-asm/55681
1203         * c-parser.c (c_parser_asm_statement): Update grammar.  Allow any
1204         combination of volatile and goto, in any order, without repetitions.
1205
1206 2018-12-04  James Norris  <jnorris@codesourcery.com>
1207             Cesar Philippidis  <cesar@codesourcery.com>
1208             Julian Brown  <julian@codesourcery.com>
1209
1210         * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1211         code.
1212
1213 2018-11-30  Richard Biener  <rguenther@suse.de>
1214
1215         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1216         _Literal (type) { ... } as empty aggregate or vector constructor.
1217
1218 2018-11-29  Martin Sebor  <msebor@redhat.com>
1219
1220         PR c/88091
1221         * c-typeck.c (convert_argument): Add a parameter.  Adjust indentation.
1222         (convert_arguments): Add comments.  Pass additional argument to
1223         the function above.
1224
1225 2018-11-29  Martin Sebor  <msebor@redhat.com>
1226
1227         PR c/88172
1228         PR testsuite/88208
1229         * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1230
1231 2018-11-23  Martin Sebor  <msebor@redhat.com>
1232
1233         PR testsuite/88098
1234         * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1235         (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1236
1237 2018-11-20  Martin Sebor  <msebor@redhat.com>
1238
1239         * c-parser.c (c_parser_has_attribute_expression): New function.
1240         (c_parser_attribute): New function.
1241         (c_parser_attributes): Move code into c_parser_attribute.
1242         (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1243
1244 2018-11-15  Martin Sebor  <msebor@redhat.com>
1245
1246         PR c/83656
1247         * c-decl.c (header_for_builtin_fn): Declare.
1248         (diagnose_mismatched_decls): Diagnose declarations of built-in
1249         functions without a prototype.
1250         * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1251         (convert_argument): Same.
1252         (convert_arguments): Factor code out into convert_argument.
1253         Detect mismatches between built-in formal arguments in calls
1254         to built-in without prototype.
1255         (build_conditional_expr): Same.
1256         (type_or_builtin_type): New function.
1257         (convert_for_assignment): Add argument.  Conditionally issue
1258         warnings instead of errors for mismatches.
1259
1260 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
1261
1262         * c-decl.c: Replace "source_location" with "location_t".
1263         * c-tree.h: Likewise.
1264         * c-typeck.c: Likewise.
1265         * gimple-parser.c: Likewise.
1266
1267 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
1268
1269         * c-parser.c (c_parser_omp_clause_final): Use
1270         c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1271         c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1272         parsing instead of c_parser_paren_condition.
1273         (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1274         convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1275         c_fully_fold instead of c_parser_condition.
1276         (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1277         c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1278         c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1279         c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1280         c_parser_expr_no_commas instead of c_parser_expression.
1281
1282         * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1283         reduction clause with inscan modifier.
1284
1285         * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1286         clauses other than atomic_default_mem_order.
1287
1288 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
1289
1290         * c-parser.c: Include memmode.h.
1291         (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1292         (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1293         (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1294         task_reduction clauses.
1295         (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1296         For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1297         section, or lvalue assignment expression.
1298         (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1299         (c_parser_omp_clause_lastprivate): Parse optional
1300         conditional: modifier.
1301         (c_parser_omp_clause_hint): Require constant integer expression rather
1302         than just integer expression.
1303         (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1304         clause.
1305         (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1306         Parse reduction modifiers.  Pass KIND to c_parser_omp_variable_list.
1307         (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1308         functions.
1309         (c_parser_omp_clause_depend): Parse iterator modifier and handle
1310         iterators.  Parse mutexinoutset and depobj kinds.
1311         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1312         callers.
1313         (c_parser_omp_all_clauses): Likewise.  Handle
1314         PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1315         PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1316         (c_parser_omp_atomic): Parse hint and memory order clauses.  Handle
1317         default memory order from requires directive if any.  Adjust
1318         c_finish_omp_atomic caller.
1319         (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1320         (c_parser_omp_flush): Parse flush with memory-order-clause.
1321         (c_parser_omp_for_loop): Allow NE_EXPR even in
1322         OpenMP loops, adjust c_finish_omp_for caller.
1323         (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1324         (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1325         Allow to be called while parsing combined parallel master.
1326         Parse combined master taskloop{, simd}.
1327         (c_parser_omp_parallel): Parse combined
1328         parallel master{, taskloop{, simd}} constructs.
1329         (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1330         (OMP_TASKGROUP_CLAUSE_MASK): Define.
1331         (c_parser_omp_taskgroup): Add LOC argument.  Parse taskgroup clauses.
1332         (OMP_TASKWAIT_CLAUSE_MASK): Define.
1333         (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1334         (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1335         around teams body.  Use SET_EXPR_LOCATION.
1336         (c_parser_omp_target_data): Allow target data
1337         with only use_device_ptr clauses.
1338         (c_parser_omp_target): Use SET_EXPR_LOCATION.  Set
1339         OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1340         (c_parser_omp_requires): New function.
1341         (c_finish_taskloop_clauses): New function.
1342         (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1343         (c_parser_omp_taskloop): Use c_finish_taskloop_clauses.  Add forward
1344         declaration.  Disallow in_reduction clause when combined with parallel
1345         master.
1346         (c_parser_omp_construct): Adjust c_parser_omp_master and
1347         c_parser_omp_taskgroup callers.
1348         * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1349         other than cancel.
1350         (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1351         like OMP_CLAUSE_REDUCTION.
1352         (handle_omp_array_sections): Likewise.  Call save_expr on array
1353         reductions before calling build_index_type.  Handle depend clauses
1354         with iterators.
1355         (struct c_find_omp_var_s): New type.
1356         (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1357         (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1358         with static, runtime or auto schedule kinds.  Call save_expr for whole
1359         array reduction sizes.  Diagnose reductions with zero sized elements
1360         or variable length structures.  Diagnose nogroup clause used with
1361         reduction clause(s).  Handle depend clause with
1362         OMP_CLAUSE_DEPEND_DEPOBJ.  Diagnose bit-fields.  Require
1363         omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1364         some different type for other kinds.  Use build_unary_op with
1365         ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1366         Handle depend clauses with iterators.  Remove no longer needed special
1367         case that predetermined const qualified vars may be specified in
1368         firstprivate clause.  Complain if const qualified vars are mentioned
1369         in data-sharing clauses other than firstprivate or shared.  Use
1370         error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1371         error.  Formatting fix.  Handle OMP_CLAUSE_NONTEMPORAL and
1372         OMP_CLAUSE_{IN,TASK}_REDUCTION.  Allow any lvalue as
1373         OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1374
1375 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
1376
1377         * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1378         logic for change to name_hint::operator bool.
1379         (undeclared_variable): Likewise.
1380         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1381         (c_parser_parameter_declaration): Likewise.
1382
1383 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1384
1385         * c-errors.c (pedwarn_c11): New function.
1386         * c-parser.c (disable_extension_diagnostics): Save
1387         warn_c11_c2x_compat and set it to 0.
1388         (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1389         (c_parser_static_assert_declaration_no_semi): Handle
1390         _Static_assert without string constant.
1391         * c-tree.h (pedwarn_c11): New prototype.
1392
1393 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
1394
1395         * Make-lang.in (selftest-c): New.
1396         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1397         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1398         from gcc/Makefile.in.
1399
1400 2018-10-02  Richard Biener  <rguenther@suse.de>
1401
1402         * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1403
1404 2018-09-26  Joseph Myers  <joseph@codesourcery.com>
1405
1406         PR c/87390
1407         * c-typeck.c (build_binary_op): Use excess precision for
1408         comparisons of integers and floating-point for C11 and later.
1409
1410 2018-09-26  Martin Jambor  <mjambor@suse.cz>
1411
1412         PR c/87347
1413         * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL.  Fix
1414         comment.
1415
1416 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
1417
1418         * c-objc-common.c (range_label_for_type_mismatch::get_text):
1419         Update for new param.
1420         * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1421         Likewise.
1422
1423 2018-09-17  Martin Jambor  <mjambor@suse.cz>
1424
1425         PR c/63886
1426         * c-parser.c: (warn_for_abs): New function.
1427         (c_parser_postfix_expression_after_primary): Call it.
1428
1429 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1430
1431         * c-typeck.c (digest_init): Shorten overlength strings.
1432
1433 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1434
1435         * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1436
1437 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1438
1439         * c-decl.c (finish_decl): Call braced_list_to_string here ...
1440         * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1441
1442 2018-08-30  Alexander Monakov  <amonakov@ispras.ru>
1443
1444         * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1445         "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1446
1447 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1448
1449         PR 87091
1450         * c-decl.c (implicitly_declare): Update call to
1451         maybe_add_include_fixit to suggest overriding the location, as it
1452         is for a note.
1453         * c-objc-common.c (c_tree_printer): Update for conversion of
1454         show_caret_p to a tri-state.
1455
1456 2018-08-27  Martin Liska  <mliska@suse.cz>
1457
1458         * c-decl.c (locate_old_decl): Use new function
1459         fndecl_built_in_p and remove check for FUNCTION_DECL if
1460         possible.
1461         (diagnose_mismatched_decls): Likewise.
1462         (merge_decls): Likewise.
1463         (warn_if_shadowing): Likewise.
1464         (pushdecl): Likewise.
1465         (implicitly_declare): Likewise.
1466         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1467         * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1468         * c-typeck.c (build_function_call_vec): Likewise.
1469         (convert_arguments): Likewise.
1470
1471 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
1472
1473         PR other/84889
1474         * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1475         (diagnose_mismatched_decls): Likewise, in various places.
1476         (warn_if_shadowing): Likewise.
1477         (implicit_decl_warning): Likewise.
1478         (implicitly_declare): Likewise.
1479         (undeclared_variable): Likewise.
1480         (declare_label): Likewise.
1481         (grokdeclarator): Likewise.
1482         (start_function): Likewise.
1483         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1484         (c_parser_parameter_declaration): Likewise.
1485         (c_parser_binary_expression): Likewise.
1486         * c-typeck.c (c_expr_sizeof_expr): Likewise.
1487         (parser_build_binary_op): Likewise.
1488         (build_unary_op): Likewise.
1489         (error_init): Likewise.
1490         (pedwarn_init): Likewise.
1491         (warning_init): Likewise.
1492         (convert_for_assignment): Likewise.
1493
1494 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
1495
1496         * c-objc-common.c: Include "gcc-rich-location.h".
1497         (c_tree_printer): Move implemenation of '%T' to...
1498         (print_type): ...this new function.
1499         (range_label_for_type_mismatch::get_text): New function.
1500         * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1501         range for the various ic_argpass cases.
1502         (class maybe_range_label_for_tree_type_mismatch): New class.
1503         (build_binary_op): Use it when calling binary_op_error.
1504
1505 2018-08-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1506
1507         * c-decl.c (start_decl): Do not warn if variables is named as main
1508         and is a local variable.
1509
1510 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1511
1512         PR c/19315
1513         * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1514         objects of unknown size.
1515
1516 2018-08-13  Martin Sebor  <msebor@redhat.com>
1517
1518         PR tree-optimization/71625
1519         * c-parser.c (c_parser_declaration_or_fndef): Call
1520         braced_list_to_string.
1521
1522 2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
1523
1524         PR c/86690
1525         * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1526         errors.
1527
1528 2018-08-01  Martin Sebor  <msebor@redhat.com>
1529
1530         PR tree-optimization/86650
1531         * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1532         and TREE_BLOCK (t) from within percent_K_format to this callsite.
1533
1534 2018-08-01  Jakub Jelinek  <jakub@redhat.com>
1535
1536         PR c/85704
1537         * c-typeck.c (init_field_decl_cmp): New function.
1538         (output_pending_init_elements): Use it for field comparisons
1539         instead of pure bit_position comparisons.
1540
1541 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
1542
1543         * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1544         type here, instead add "omp declare target implicit" attribute.
1545         (finish_decl): Diagnose vars without mappable type here.
1546
1547 2018-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
1548             Thomas Schwinge  <thomas@codesourcery.com>
1549             Cesar Philippidis  <cesar@codesourcery.com>
1550
1551         * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1552         and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1553         to their non-present_or_* counterparts. Make 'self' an alias to
1554         PRAGMA_OACC_CLAUSE_HOST.
1555         (c_parser_oacc_data_clause): Update GOMP mappings for
1556         PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1557         PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1558         (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1559         Remove support for present_or_* clauses.
1560         (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1561         (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1562         (OACC_DECLARE_CLAUSE_MASK): Likewise.
1563         (OACC_DATA_CLAUSE_MASK): Likewise.
1564         (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1565         (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1566         (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1567         (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1568         * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1569
1570 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1571
1572         * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1573         * gimple-parser.c (c_parser_gimple_statement): Likewise.
1574         (c_parser_gimple_unary_expression): Likewise.
1575
1576 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
1577
1578         PR c/86093
1579         * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1580         before doing POINTER_DIFF_EXPR.
1581
1582 2018-06-07  Marek Polacek  <polacek@redhat.com>
1583
1584         PR c/85318
1585         * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1586         for loop initial declarations.
1587
1588 2018-05-30  David Pagan  <dave.pagan@oracle.com>
1589
1590         PR c/55976
1591         * c-decl.c (grokdeclarator): Update check for return type warnings.
1592         (start_function): Likewise.
1593         (finish_function): Likewise.
1594         * c-typeck.c (c_finish_return): Update check for return type warnings.
1595         Pass OPT_Wreturn_type to pedwarn when appropriate.
1596
1597 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1598
1599         * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1600         __FMA_EXPR handlng.
1601
1602 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1603
1604         * gimple-parser.c: Include internal-fn.h.
1605         (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1606         (c_parser_gimple_call_internal): New function.
1607         (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1608         Fix typos in comment.
1609
1610 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
1611
1612         PR c++/85662
1613         * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1614         fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1615         fold_convert_loc.
1616         * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1617         fold_offsetof_1, pass argtype as TYPE to it and drop the
1618         fold_convert_loc.
1619
1620 2018-05-02  David Pagan  <dave.pagan@oracle.com>
1621
1622         PR c/30552
1623         * c-decl.c (old_style_parameter_scope): New function.
1624         * c-parser.c (c_parser_postfix_expression): Check for statement
1625         expressions in old-style function parameter list declarations.
1626         * c-parser.h (old_style_parameter_scope): New extern declaration.
1627
1628 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
1629
1630         PR sanitizer/84307
1631         * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1632         it is not TREE_STATIC.
1633         * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1634         not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1635         its COMPOUND_LITERAL_EXPR_DECL.
1636
1637 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
1638
1639         * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1640         where all functions return the same _FloatN or _FloatNx type,
1641         treat integer types as _Float64 instead of double.
1642
1643 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
1644
1645         PR c/84999
1646         * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1647         building vector comparison, diagnose it and return error_mark_node.
1648
1649 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
1650
1651         PR c/84853
1652         * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1653         If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1654         INTEGER_TYPE element type.
1655
1656 2018-03-13  David Pagan  <dave.pagan@oracle.com>
1657
1658         PR c/46921
1659         * c-typeck.c (output_init_element): Ensure field initializer
1660         expression is always evaluated if there are side effects.
1661
1662 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
1663
1664         PR c/84721
1665         * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1666         !building_stmt_list_p ().
1667
1668 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
1669
1670         PR c/84305
1671         * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1672         in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1673         and include the BIND_EXPR in the list of things that need to be
1674         pre-evaluated.
1675
1676 2018-02-09  Nathan Sidwell  <nathan@acm.org>
1677
1678         PR c/84293
1679         * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1680         to strict_aliasing_warning.
1681
1682 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
1683
1684         * c-typeck.c (really_start_incremental_init, push_init_level,
1685         set_nonincremental_init, output_init_element, process_init_element):
1686         Use DECL_UNNAMED_BIT_FIELD.
1687
1688 2018-01-31  Marek Polacek  <polacek@redhat.com>
1689
1690         PR c/81779
1691         * c-parser.c (c_parser_compound_statement_nostart): Call
1692         expansion_point_location_if_in_system_header.
1693
1694 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
1695
1696         PR c++/83814
1697         * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1698         the C part.
1699
1700 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
1701
1702         PR c/83801
1703         * c-tree.h (decl_constant_value_1): Add a bool argument.
1704         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1705         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
1706         (decl_constant_value): Adjust caller.
1707         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1708         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
1709         decl_constant_value returns initializer that has BLKmode or
1710         array type.
1711         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1712
1713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1714             Alan Hayward  <alan.hayward@arm.com>
1715             David Sherwood  <david.sherwood@arm.com>
1716
1717         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1718         TYPE_VECTOR_SUBPARTS.
1719
1720 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
1721
1722         Update copyright years.
1723
1724 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
1725
1726         PR c/83595
1727         * c-parser.c (c_parser_braced_init, c_parser_initelt,
1728         c_parser_conditional_expression, c_parser_cast_expression,
1729         c_parser_sizeof_expression, c_parser_alignof_expression,
1730         c_parser_postfix_expression, c_parser_omp_declare_reduction,
1731         c_parser_transaction_expression): Use set_error () method instead
1732         of setting value member to error_mark_node.
1733
1734 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
1735
1736         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1737         and _Float<N>X built-in functions.
1738
1739 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
1740
1741         PR debug/83550
1742         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1743         TYPE_STUB_DECL and call rest_of_type_compilation before processing
1744         incomplete vars rather than after it.
1745
1746         PR debug/83547
1747         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1748         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1749         and consider empty ones if there are no other stmts.  For
1750         -Wunused-value walk all statements before the one only followed by
1751         DEBUG_BEGIN_STMTs.
1752
1753 2017-12-22  Mike Stump  <mikestump@comcast.net>
1754             Eric Botcazou  <ebotcazou@adacore.com>
1755
1756         * c-parser.c (c_parser_while_statement): Add unroll parameter and
1757         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
1758         (c_parser_do_statement): Likewise.
1759         (c_parser_for_statement): Likewise.
1760         (c_parser_statement_after_labels): Adjust calls to above.
1761         (c_parse_pragma_ivdep): New static function.
1762         (c_parser_pragma_unroll): Likewise.
1763         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1764         <PRAGMA_UNROLL>: New case.
1765
1766 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
1767
1768         * c-typeck.c (comptypes_internal, function_types_compatible_p,
1769         perform_integral_promotions, digest_init): Replace Yoda conditions
1770         with typical order conditions.
1771         * c-decl.c (check_bitfield_type_and_width): Likewise.
1772
1773 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1774
1775         * c-typeck.c (c_safe_arg_type_equiv_p,
1776         c_safe_function_type_cast_p): New function.
1777         (build_c_cast): Implement -Wcast-function-type.
1778
1779 2017-12-14  Richard Biener  <rguenther@suse.de>
1780
1781         PR c/83415
1782         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1783         like REALPART_EXPR for the behavior of whether its operand
1784         is an lvalue.
1785
1786 2017-12-12  Marek Polacek  <polacek@redhat.com>
1787
1788         PR c/82679
1789         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1790
1791 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
1792
1793         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1794         * c-parser.c (add_debug_begin_stmt): New.
1795         (c_parser_declaration_or_fndef): Call it.
1796         (c_parser_compound_statement_nostart): Likewise.
1797         (c_parser_statement_after_labels): Likewise.
1798         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1799
1800 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
1801
1802         * c-decl.c (build_compound_literal): Add parameter alignas_align
1803         and set alignment of decl if nonzero.
1804         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1805         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1806         qualifier.
1807         (c_parser_struct_declaration): Update syntax comment.
1808         (c_parser_type_name): Add alignas_ok argument and pass it to
1809         c_parser_declspecs.
1810         (c_parser_cast_expression): Pass true to c_parser_type_name and
1811         give error if a cast used an _Alignas specifier.
1812         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1813         give error if sizeof (type-name) used an _Alignas specifier.
1814         (c_parser_alignof_expression): Pass true to c_parser_type_name and
1815         give error if _Alignof (type-name) used an _Alignas specifier.
1816         (c_parser_postfix_expression_after_paren_type): Check specified
1817         alignment for a compound literal and pass it to
1818         build_compound_literal.
1819         * c-parser.h (c_parser_type_name): Update prototype.
1820         * c-tree.h (build_compound_literal): Update prototype.
1821
1822 2017-12-07  Martin Sebor  <msebor@redhat.com>
1823
1824         PR c/81544
1825         * c-decl.c (c_decl_attributes): Look up existing declaration and
1826         pass it to decl_attributes.
1827
1828 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
1829
1830         PR c/83236
1831         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1832         reserved for use by the implementation.
1833
1834 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
1835
1836         * c-decl.c: Include "c-family/c-spellcheck.h".
1837
1838 2017-12-05  Martin Liska  <mliska@suse.cz>
1839             Jakub Jelinek  <jakub@redhat.com>
1840
1841         * c-typeck.c (pointer_diff): Add new argument and instrument
1842         pointer subtraction.
1843         (build_binary_op): Similar for pointer comparison.
1844
1845 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
1846
1847         PR c/79153
1848         * c-parser.c: Include tree-iterator.h.
1849         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1850         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1851         on it.
1852
1853         PR c/83222
1854         * c-tree.h (decl_constant_value_1): Declare.
1855         * c-typeck.c (decl_constant_value_1): New function.
1856         (decl_constant_value): Use it.
1857         * c-fold.c (c_fully_fold_internal): If in_init, use
1858         decl_constant_value_1 instead of decl_constant_value.
1859
1860 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
1861
1862         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1863
1864 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
1865
1866         PR sanitizer/81275
1867         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1868         c_switch_covers_all_cases_p returns true.
1869
1870 2017-11-28  Julia Koval  <julia.koval@intel.com>
1871             Sebastian Peryt  <sebastian.peryt@intel.com>
1872
1873         * Make-lang.in (c/c-array-notation.o): Remove.
1874         * c-array-notation.c: Delete.
1875         * c-decl.c: Remove cilkplus condition.
1876         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1877         c_parser_cilk_verify_simd, c_parser_array_notation,
1878         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1879         c_parser_cilk_simd_fn_vector_attrs,
1880         c_finish_cilk_simd_fn_tokens): Delete.
1881         (c_parser_declaration_or_fndef): Remove cilkplus condition.
1882         (c_parser_direct_declarator_inner): Ditto.
1883         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1884         (c_parser_attributes, c_parser_compound_statement,
1885         c_parser_statement_after_labels, c_parser_if_statement,
1886         c_parser_switch_statement, c_parser_while_statement,
1887         c_parser_do_statement, c_parser_for_statement,
1888         c_parser_unary_expression, c_parser_postfix_expression,
1889         c_parser_postfix_expression_after_primary,
1890         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1891         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1892         support.
1893         * c-typeck.c (build_array_ref, build_function_call_vec,
1894         convert_arguments,
1895         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1896         c_finish_loop, build_binary_op): Remove cilkplus support.
1897
1898 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
1899
1900         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1901         of build3.
1902
1903 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
1904
1905         * Make-lang.in (c.install-plugin): Install backend import library.
1906
1907 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
1908
1909         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1910         pragma_stmt context.
1911
1912 2017-11-23  Mike Stump  <mikestump@comcast.net>
1913             Eric Botcazou  <ebotcazou@adacore.com>
1914
1915         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1916         ANNOTATE_EXPR.
1917         (c_parser_do_statement): Likewise.
1918         (c_parser_for_statement): Likewise.
1919
1920 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
1921
1922         PR c++/62170
1923         * c-objc-common.c (c_tree_printer): Convert penultimate param from
1924         bool to bool *.  Within '%T' handling, if showing an "aka", use
1925         "quoted" param to add appropriate quoting.
1926
1927 2017-11-22  Marek Polacek  <polacek@redhat.com>
1928
1929         PR c++/60336
1930         PR middle-end/67239
1931         PR target/68355
1932         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1933
1934 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
1935
1936         PR c/83056
1937         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1938         earlier failed lookups.
1939
1940 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
1941
1942         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1943         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1944
1945 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
1946
1947         PR c/81404
1948         * c-decl.c: Include "c-family/known-headers.h".
1949         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1950         to known-headers.cc.
1951         (class suggest_missing_header): Move to known-header.h.
1952         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1953         than get_c_name_hint.
1954
1955 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
1956
1957         * c-decl.c (get_c_name_hint): New function.
1958         (class suggest_missing_header): New class.
1959         (lookup_name_fuzzy): Call get_c_name_hint and use it to
1960         suggest missing headers to the user.
1961
1962 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
1963
1964         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1965         Include "c-family/name-hint.h"
1966         (implicit_decl_warning): Convert "hint" from
1967         const char * to name_hint.  Pass location to
1968         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
1969         warning was not printed.
1970         (undeclared_variable): Likewise for "guessed_id".
1971         (lookup_name_fuzzy): Convert return type from const char *
1972         to name_hint.  Add location_t param.
1973         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1974         Include "c-family/name-hint.h"
1975         (c_parser_declaration_or_fndef): Convert "hint" from
1976         const char * to name_hint.  Pass location to lookup_name_fuzzy.
1977         (c_parser_parameter_declaration): Likewise.
1978
1979 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
1980
1981         PR c/66618
1982         PR c/69960
1983         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1984         where needed.
1985         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1986         handle_omp_array_sections): Likewise.
1987         (digest_init): Don't call decl_constant_value_for_optimization.
1988         * c-tree.h (decl_constant_value_for_optimization): Removed.
1989         * c-fold.c (c_fold_array_ref): New function.
1990         (c_fully_fold_internal): Add LVAL argument, propagate it through
1991         recursive calls.  For VAR_P call decl_constant_value and
1992         unshare if not LVAL and either optimizing or IN_INIT.  Remove
1993         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
1994         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1995         (c_fully_fold): Add LVAL argument, pass it through to
1996         c_fully_fold_internal.
1997         (decl_constant_value_for_optimization): Removed.
1998
1999 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
2000
2001         PR c/81156
2002         * c-parser.c (check_tgmath_function): New function.
2003         (enum tgmath_parm_kind): New enum.
2004         (c_parser_postfix_expression): Handle __builtin_tgmath.
2005
2006 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
2007
2008         * c-decl.c (implicit_decl_warning): Update for renaming of
2009         pedwarn_at_rich_loc and warning_at_rich_loc.
2010         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2011         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2012         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2013         (c_parser_struct_or_union_specifier): Likewise for renaming of
2014         pedwarn_at_rich_loc.
2015         (c_parser_parameter_declaration): Likewise for renaming of
2016         error_at_rich_loc.
2017         * c-typeck.c (build_component_ref): Likewise.
2018         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2019         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2020         (set_init_label): Likewise for renaming of error_at_rich_loc.
2021
2022 2017-10-30  Richard Biener  <rguenther@suse.de>
2023
2024         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2025         stmts.
2026
2027 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
2028
2029         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2030         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2031
2032 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
2033
2034         PR c/7356
2035         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2036         semicolons.
2037
2038 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
2039
2040         PR libstdc++/81706
2041         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2042         newdecl to corresponding __builtin_ if any.
2043
2044 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
2045
2046         PR c++/82466
2047         * c-decl.c (diagnose_mismatched_decls): Use
2048         OPT_Wbuiltin_declaration_mismatch.
2049
2050 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
2051
2052         * c-parser.c (c_parser_require): Add "type_is_unique" param and
2053         use it to guard calls to maybe_suggest_missing_token_insertion.
2054         (c_parser_parms_list_declarator): Override default value of new
2055         "type_is_unique" param to c_parser_require.
2056         (c_parser_asm_statement): Likewise.
2057         * c-parser.h (c_parser_require): Add "type_is_unique" param,
2058         defaulting to true.
2059
2060 2017-10-11  Nathan Sidwell  <nathan@acm.org>
2061
2062         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2063
2064 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
2065
2066         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2067         operating on trees as wide_ints.
2068         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2069         (c_tree_equal): Likewise.
2070
2071 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
2072
2073         * c-decl.c (push_parm_decl): Store c_parm's location into the
2074         PARAM_DECL.
2075         (build_c_parm): Add "loc" param and store it within the c_parm.
2076         * c-parser.c (struct c_parser): Add "last_token_location" field.
2077         (c_parser_consume_token): Store location of the token into the
2078         new field.
2079         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2080         when handling a FUNCTION_DECL, if it doesn't already have them.
2081         (c_parser_parameter_declaration): Generate a location for the
2082         parameter, and pass it to the call to build_c_parm.
2083         * c-tree.h (struct c_parm): Add field "loc".
2084         (build_c_parm): Add location_t param.
2085         * c-typeck.c (get_fndecl_argument_location): New function.
2086         (inform_for_arg): New function.
2087         (convert_for_assignment): Use inform_for_arg when dealing with
2088         ic_argpass.
2089
2090 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
2091
2092         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2093         width is non-NULL.
2094         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2095         don't SET_DECL_C_BIT_FIELD here.
2096
2097         PR c/82340
2098         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2099         instead of trying to set just TREE_READONLY manually.
2100
2101 2017-09-16  Tom de Vries  <tom@codesourcery.com>
2102
2103         PR c/81875
2104         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2105         cond itself.
2106
2107 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
2108
2109         PR c/82071
2110         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2111         for C11.
2112         (build_conditional_expr): For C11, generate result with excess
2113         precision when one argument is an integer and the other is of a
2114         type using excess precision.
2115
2116 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2117
2118         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2119
2120 2017-09-13  Marek Polacek  <polacek@redhat.com>
2121
2122         PR c/82167
2123         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2124         than expr.original_type.
2125
2126 2017-09-12  Nathan Sidwell  <nathan@acm.org>
2127
2128         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2129         resort_sorted_fields): Moved from c-family/c-common.c.
2130         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2131
2132 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
2133
2134         PR c/82071
2135         * c-typeck.c (build_atomic_assign): Handle argument with excess
2136         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
2137         argument passed to build_binary_op and convert_for_assignment but
2138         not for call to c_fully_fold.
2139         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2140         Ensure build_binary_op is called with argument with original
2141         semantic type.  Avoid calling c_fully_fold with an
2142         EXCESS_PRECISION_EXPR from build_binary_op.
2143
2144 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
2145
2146         PR c/81887
2147         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2148
2149 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2150             Alan Hayward  <alan.hayward@arm.com>
2151             David Sherwood  <david.sherwood@arm.com>
2152
2153         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2154         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
2155         m1 and m2 to the signed equivalent of a fixed-point
2156         SCALAR_TYPE_MODE.
2157
2158 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
2159
2160         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2161         than CAN_HAVE_LOCATION_P when determining whether to use the
2162         location_t value within "value".
2163
2164 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
2165
2166         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2167         rather than peeking the location of the first token.
2168         * c-tree.h (c_expr::get_location): New method.
2169
2170 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
2171
2172         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2173         to check_function_arguments.
2174
2175 2017-08-18  Marek Polacek  <polacek@redhat.com>
2176
2177         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
2178         commentary.
2179
2180 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
2181
2182         PR c/53037
2183         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2184         (check_bitfield_type_and_width): Don't allow bit-field with
2185         warn_if_not_aligned type.
2186
2187 2017-08-14  Martin Sebor  <msebor@redhat.com>
2188
2189         PR c/81117
2190         * c-objc-common.c (c_objc_common_init): Handle 'G'.
2191
2192 2017-08-11  Marek Polacek  <polacek@redhat.com>
2193
2194         PR c/81795
2195         * c-decl.c (pushtag): Only print inform if the warning was printed.
2196         (grokdeclarator): Likewise.
2197
2198 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
2199
2200         * c-parser.c (c_parser_error): Rename to...
2201         (c_parser_error_richloc): ...this, making static, and adding
2202         "richloc" parameter, passing it to the c_parse_error call,
2203         rather than calling c_parser_set_source_position_from_token.
2204         (c_parser_error): Reintroduce, reimplementing in terms of the
2205         above, converting return type from void to bool.
2206         (class token_pair): New class.
2207         (struct matching_paren_traits): New struct.
2208         (matching_parens): New typedef.
2209         (struct matching_brace_traits): New struct.
2210         (matching_braces): New typedef.
2211         (get_matching_symbol): New function.
2212         (c_parser_require): Add param MATCHING_LOCATION, using it to
2213         highlight matching "opening" tokens for missing "closing" tokens.
2214         (c_parser_skip_until_found): Likewise.
2215         (c_parser_static_assert_declaration_no_semi): Convert explicit
2216         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2217         class matching_parens, so that the pertinent open parenthesis is
2218         highlighted when there are problems locating the close
2219         parenthesis.
2220         (c_parser_struct_or_union_specifier): Likewise.
2221         (c_parser_typeof_specifier): Likewise.
2222         (c_parser_alignas_specifier): Likewise.
2223         (c_parser_simple_asm_expr): Likewise.
2224         (c_parser_braced_init): Likewise, for matching_braces.
2225         (c_parser_paren_condition): Likewise, for matching_parens.
2226         (c_parser_switch_statement): Likewise.
2227         (c_parser_for_statement): Likewise.
2228         (c_parser_asm_statement): Likewise.
2229         (c_parser_asm_operands): Likewise.
2230         (c_parser_cast_expression): Likewise.
2231         (c_parser_sizeof_expression): Likewise.
2232         (c_parser_alignof_expression): Likewise.
2233         (c_parser_generic_selection): Likewise.
2234         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2235         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2236         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2237         In case CPP_OPEN_PAREN, pass loc_open_paren to the
2238         c_parser_skip_until_found call.
2239         (c_parser_objc_class_definition): Use class matching_parens as
2240         above.
2241         (c_parser_objc_method_decl): Likewise.
2242         (c_parser_objc_try_catch_finally_statement): Likewise.
2243         (c_parser_objc_synchronized_statement): Likewise.
2244         (c_parser_objc_at_property_declaration): Likewise.
2245         (c_parser_oacc_wait_list): Likewise.
2246         (c_parser_omp_var_list_parens): Likewise.
2247         (c_parser_omp_clause_collapse): Likewise.
2248         (c_parser_omp_clause_default): Likewise.
2249         (c_parser_omp_clause_if): Likewise.
2250         (c_parser_omp_clause_num_threads): Likewise.
2251         (c_parser_omp_clause_num_tasks): Likewise.
2252         (c_parser_omp_clause_grainsize): Likewise.
2253         (c_parser_omp_clause_priority): Likewise.
2254         (c_parser_omp_clause_hint): Likewise.
2255         (c_parser_omp_clause_defaultmap): Likewise.
2256         (c_parser_oacc_single_int_clause): Likewise.
2257         (c_parser_omp_clause_ordered): Likewise.
2258         (c_parser_omp_clause_reduction): Likewise.
2259         (c_parser_omp_clause_schedule): Likewise.
2260         (c_parser_omp_clause_num_teams): Likewise.
2261         (c_parser_omp_clause_thread_limit): Likewise.
2262         (c_parser_omp_clause_aligned): Likewise.
2263         (c_parser_omp_clause_linear): Likewise.
2264         (c_parser_omp_clause_safelen): Likewise.
2265         (c_parser_omp_clause_simdlen): Likewise.
2266         (c_parser_omp_clause_depend): Likewise.
2267         (c_parser_omp_clause_map): Likewise.
2268         (c_parser_omp_clause_device): Likewise.
2269         (c_parser_omp_clause_dist_schedule): Likewise.
2270         (c_parser_omp_clause_proc_bind): Likewise.
2271         (c_parser_omp_clause_uniform): Likewise.
2272         (c_parser_omp_for_loop): Likewise.
2273         (c_parser_cilk_clause_vectorlength): Likewise.
2274         (c_parser_cilk_clause_linear): Likewise.
2275         (c_parser_transaction_expression): Likewise.
2276         * c-parser.h (c_parser_require): Add param matching_location with
2277         default UNKNOWN_LOCATION.
2278         (c_parser_error): Convert return type from void to bool.
2279         (c_parser_skip_until_found): Add param matching_location with
2280         default UNKNOWN_LOCATION.
2281
2282 2017-08-09  Marek Polacek  <polacek@redhat.com>
2283
2284         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2285         * c-tree.h (build_external_ref): Update declaration.
2286         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2287         (build_external_ref): Change the type of a parameter to bool.
2288         (parser_build_binary_op): Use true/false instead of 1/0.
2289         (pointer_diff): Likewise.
2290         (build_modify_expr): Likewise.
2291         (set_designator): Change the type of a parameter to bool.
2292         (set_init_index): Use true/false instead of 1/0.
2293         (set_init_label): Likewise.
2294         (output_init_element): Change the type of a parameter to bool.
2295         (output_pending_init_elements): Use true/false instead of 1/0.
2296         (process_init_element): Likewise.
2297         (build_binary_op): Change the type of a parameter to bool.
2298
2299 2017-08-09  Marek Polacek  <polacek@redhat.com>
2300
2301         PR c/81233
2302         * c-typeck.c (pedwarn_init): Make the function take a variable list.
2303         Call emit_diagnostic_valist instead of pedwarn.
2304         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2305         Print the relevant types in diagnostics.
2306
2307 2017-08-09  Marek Polacek  <polacek@redhat.com>
2308
2309         PR c/81417
2310         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2311         build_conditional_expr.
2312         * c-parser.c (c_parser_conditional_expression): Create locations for
2313         EXP1 and EXP2 from their source ranges.  Pass the locations down to
2314         build_conditional_expr.
2315         * c-tree.h (build_conditional_expr): Update declaration.
2316         * c-typeck.c (build_conditional_expr): Add location_t parameters.
2317         For -Wsign-compare, also print the types.
2318
2319 2017-08-08  Martin Liska  <mliska@suse.cz>
2320
2321         * c-convert.c: Include header files.
2322         * c-typeck.c: Likewise.
2323
2324 2017-08-07  Martin Liska  <mliska@suse.cz>
2325
2326         * c-parser.c (c_parser_attributes): Canonicalize name of an
2327         attribute.
2328
2329 2017-08-02  Marek Polacek  <polacek@redhat.com>
2330
2331         PR c/81289
2332         * c-parser.c (c_parser_unary_expression): Use set_error.
2333
2334         PR c/81448
2335         PR c/81306
2336         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2337         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
2338
2339 2017-07-31  Jan Hubicka  <hubicka@ucw.cz>
2340             Martin Liska  <mliska@suse.cz>
2341
2342         * c-typeck.c (c_finish_goto_label): Build gimple predict
2343         statement.
2344
2345 2017-07-31  Martin Liska  <mliska@suse.cz>
2346
2347         PR sanitize/81530
2348         * c-convert.c (convert): Guard condition with flag_sanitize_p
2349         also with current_function_decl non-null equality.
2350         * c-decl.c (grokdeclarator): Likewise.
2351         * c-typeck.c (build_binary_op): Likewise.
2352
2353 2017-07-25  Marek Polacek  <polacek@redhat.com>
2354
2355         * c-decl.c (grokfield): Remove local variable.
2356
2357 2017-07-25  Marek Polacek  <polacek@redhat.com>
2358
2359         PR c/81364
2360         * c-parser.c (c_parser_else_body): Don't warn about multistatement
2361         macro expansion if the body is in { }.
2362         (c_parser_while_statement): Likewise.
2363         (c_parser_for_statement): Likewise.
2364
2365 2017-07-18  Nathan Sidwell  <nathan@acm.org>
2366
2367         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2368
2369 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
2370
2371         * c-decl.c (implicitly_declare): When suggesting a missing
2372         #include, provide a fix-it hint.
2373
2374 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
2375
2376         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2377         and call that instead.
2378         * c-tree.h (selftest::run_c_tests): New decl.
2379
2380 2017-06-26  Marek Polacek  <polacek@redhat.com>
2381
2382         PR c/80116
2383         * c-parser.c (c_parser_if_body): Set the location of the
2384         body of the conditional after parsing all the labels.  Call
2385         warn_for_multistatement_macros.
2386         (c_parser_else_body): Likewise.
2387         (c_parser_switch_statement): Likewise.
2388         (c_parser_while_statement): Likewise.
2389         (c_parser_for_statement): Likewise.
2390         (c_parser_statement): Add a default argument.  Save the location
2391         after labels have been parsed.
2392         (c_parser_c99_block_statement): Likewise.
2393
2394 2017-06-19  Richard Biener  <rguenther@suse.de>
2395
2396         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2397         negated _Literals to parse _Literal (int) -1.
2398
2399 2017-06-13  Martin Liska  <mliska@suse.cz>
2400
2401         PR sanitize/78204
2402         * c-convert.c (convert): Use sanitize_flags_p.
2403         * c-decl.c (grokdeclarator): Likewise.
2404         * c-typeck.c (convert_for_assignment): Likewise.
2405         (c_finish_return): Likewise.
2406         (build_binary_op): Likewise.
2407
2408 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
2409
2410         PR c/81006
2411         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2412         to sizetype before size_binop.
2413
2414 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
2415
2416         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2417         of TDI_generic.
2418
2419 2017-06-06  Marek Polacek  <polacek@redhat.com>
2420
2421         PR c/79983
2422         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2423         ref.
2424         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2425
2426 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2427
2428         * c-parser.c (c_parser_binary_expression): Implement the
2429         -Wsizeof_pointer_div warning.
2430         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2431         from a parenthesized expression.
2432         (c_parser_expr_list): Use c_last_sizeof_loc.
2433         * c-tree.h (c_last_sizeof_loc): New external.
2434         * c-typeck.c (c_last_sizeof_loc): New variable.
2435         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2436
2437 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
2438
2439         PR testsuite/80580
2440         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2441
2442 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
2443
2444         * c-objc-common.c (c_tree_printer): Gain bool and const char **
2445         parameters.
2446
2447 2017-05-24  Martin Sebor  <msebor@redhat.com>
2448
2449         PR c/80731
2450         * c-fold.c (c_fully_fold_internal): Adjust.
2451         * c-typeck.c (parser_build_unary_op): Adjust.
2452
2453 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
2454
2455         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2456         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2457         "VECTOR_LENGTH".
2458
2459 2017-05-23  Marek Polacek  <polacek@redhat.com>
2460
2461         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2462         quotes.
2463
2464 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
2465
2466         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2467         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2468         it returned invariant.  Call tree_invariant_p unconditionally
2469         afterwards to decide whether to return expr or op0.
2470
2471 2017-05-22  Nathan Sidwell  <nathan@acm.org>
2472
2473         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2474
2475 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
2476
2477         * c-parser.c (c_parser_omp_clause_default): Handle
2478         "OMP_CLAUSE_DEFAULT_PRESENT".
2479
2480 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2481
2482         * config-lang.in (gtfiles): Add c-family/c-format.c.
2483
2484 2017-05-18  Nathan Sidwell  <nathan@acm.org>
2485
2486         * c-decl.c (pushdecl_top_level): Delete unused function.
2487
2488 2017-05-18  Marek Polacek  <polacek@redhat.com>
2489
2490         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2491         (check_earlier_gotos): Likewise.
2492         (define_label): Likewise.
2493         (pending_xref_error): Likewise.
2494         (smallest_type_quals_location): Likewise.
2495         (grokdeclarator): Likewise.
2496         (grokparms): Likewise.
2497         (identifier_global_value): Likewise.
2498         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2499         (find_init_member): Likewise.
2500
2501 2017-05-18  Marek Polacek  <polacek@redhat.com>
2502
2503         * c-decl.c (start_decl): Use false/true instead of 0/1.
2504         (grokdeclarator): Likewise.
2505         (finish_struct): Likewise.
2506         (start_function): Change the return type to bool.  Use false/true
2507         instead of 0/1.
2508         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2509         * c-tree.h (start_function): Update.
2510         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2511         (set_designator): Change the return type to bool.  Use false/true
2512         instead of 0/1.
2513
2514 2017-05-17  Marek Polacek  <polacek@redhat.com>
2515
2516         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2517         * c-typeck.c: Likewise.
2518
2519 2017-05-17  Marek Polacek  <polacek@redhat.com>
2520
2521         PR sanitizer/80659
2522         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2523         DECL_IGNORED_P even for non-static compound literals.
2524
2525 2017-05-17  Martin Liska  <mliska@suse.cz>
2526
2527         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2528         use it instead of int type.
2529
2530 2017-05-17  Marek Polacek  <polacek@redhat.com>
2531
2532         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
2533         call c_fully_fold.
2534         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2535         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2536         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2537         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2538         save_expr.
2539         (c_parser_conditional_expression): Likewise.
2540         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2541         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2542         (process_init_element): Likewise.
2543         (build_binary_op): Likewise.
2544         (handle_omp_array_sections_1): Likewise.
2545
2546 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
2547
2548         * c-parser.c (c_parser_omp_clause_num_gangs)
2549         (c_parser_omp_clause_num_workers)
2550         (c_parser_omp_clause_vector_length): Merge functions into...
2551         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
2552         all users.
2553
2554 2017-05-11  Nathan Sidwell  <nathan@acm.org>
2555
2556         * gimple-parser.c: Don't #include tree-dump.h.
2557
2558 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
2559
2560         PR testsuite/80580
2561         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2562
2563 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
2564
2565         PR testsuite/80580
2566         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2567         incorrect __MEM syntax.
2568
2569 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
2570
2571         PR testsuite/80580
2572         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2573         type of unary '*'.
2574
2575 2017-05-09  Nathan Sidwell  <nathan@acm.org>
2576
2577         * c-tree.h (pushdecl): Declare.
2578
2579 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
2580
2581         * c-decl.c (warn_defaults_to): Replace report_diagnostic
2582         with diagnostic_report_diagnostic.
2583         * c-errors.c (pedwarn_c99): Likewise.
2584         (pedwarn_c90): Likewise.
2585
2586 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
2587
2588         PR c++/80038
2589         * c-gimplify.c (c_gimplify_expr): Remove calls to
2590         cilk_gimplifY_call_params_in_spawned_fn.
2591
2592 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
2593
2594         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2595         hint for removing extra semicolon.
2596
2597 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
2598
2599         PR c/80468
2600         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2601         enabled, set specs->type to integer_type_node.
2602
2603 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
2604
2605         * c-array-notation.c: Fix typo in comment.
2606
2607 2017-03-29  Marek Polacek  <polacek@redhat.com>
2608
2609         PR c/79730
2610         * c-decl.c (finish_decl): Check VAR_P.
2611
2612 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
2613
2614         PR middle-end/80162
2615         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2616         * c-typeck.c (c_mark_addressable): Likewise.  Look through
2617         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2618         to ARRAY_TYPE.
2619         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2620
2621 2017-03-23  Marek Polacek  <polacek@redhat.com>
2622
2623         * c-tree.h: Remove a C_RID_YYCODE reference.
2624
2625 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
2626
2627         PR c/80097
2628         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2629         optional COMPOUND_EXPR with ubsan instrumentation.
2630
2631 2017-03-17  Marek Polacek  <polacek@redhat.com>
2632
2633         * c-parser.c: Add C11 references.
2634
2635 2017-03-15  Marek Polacek  <polacek@redhat.com>
2636
2637         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2638
2639 2017-03-11  Marek Polacek  <polacek@redhat.com>
2640
2641         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
2642
2643 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
2644
2645         PR translation/79848
2646         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2647         "%qs".
2648         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2649
2650 2017-03-09  Marek Polacek  <polacek@redhat.com>
2651
2652         PR sanitizer/79757
2653         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2654         parameter declarations with initializers.
2655
2656 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
2657
2658         PR c/79969
2659         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2660         TYPE_STUB_DECL.
2661
2662 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
2663
2664         PR c/79834
2665         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2666         for "may only be used in compound statements" diagnostics, change it
2667         such that the same translatable string is used for all pragmas.  For
2668         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2669         diagnostics.
2670         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2671         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2672         "may only be used in compound statements" diagnostics, such that the
2673         same translatable string is used for all pragmas.
2674
2675 2017-03-04  Marek Polacek  <polacek@redhat.com>
2676
2677         PR c/79847
2678         * c-decl.c (implicit_decl_warning): Add missing space.
2679
2680 2017-03-03  Marek Polacek  <polacek@redhat.com>
2681
2682         PR c/79758
2683         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2684         current_function_prototype_arg_types is error_mark_node.  Fix
2685         formatting.  Use TREE_VALUE instead of TREE_TYPE.
2686
2687 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
2688
2689         PR c/79837
2690         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2691         %<min%> or %<max%> in the diagnostics, instead mention identifier.
2692         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2693         diagnostics.
2694
2695         PR c/79836
2696         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2697         instead of %<_Generic>.
2698         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2699         (c_parser_omp_target_exit_data): Use %<release%> instead of
2700         %<release>.
2701
2702 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
2703
2704         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2705         instead of just cond ? "..." : "...".
2706         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2707         for "enter"/"exit" keyword.
2708         (c_finish_oacc_routine): Don't use %s to supply portions of the
2709         message.
2710
2711 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
2712
2713         PR c++/79588
2714         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2715         handle -Wrestrict here.
2716         * c-typeck.c (build_function_call_vec): Adjust
2717         check_function_arguments caller.
2718
2719 2017-02-23  Richard Biener  <rguenther@suse.de>
2720
2721         PR c/79684
2722         * gimple-parser.c (c_parser_gimple_statement): Use set_error
2723         to initialize c_exprs to return.
2724         (c_parser_gimple_binary_expression): Likewise.
2725         (c_parser_gimple_unary_expression): Likewise.
2726         (c_parser_gimple_postfix_expression): Likewise.
2727
2728 2017-02-22  Marek Polacek  <polacek@redhat.com>
2729
2730         PR c/79662
2731         * c-typeck.c (convert_arguments): Handle error_mark_node.
2732
2733 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2734
2735         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2736         value of c_parser_parse_ssa_name against error_mark_node and emit
2737         error if ssa name is anonymous and written as default definition.
2738
2739 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2740
2741         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2742         FMA_EXPR.
2743
2744 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
2745
2746         PR c++/79512
2747         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2748         ignore #pragma omp target even when not followed by identifier.
2749
2750 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2751
2752         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2753         (c_parser_gimple_unary_expression): Likewise.
2754
2755 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
2756
2757         * c-parser.c (c_parser_oacc_declare): Add missing space in
2758         diagnostics.
2759
2760 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2761
2762         PR c/79478
2763         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2764         set_c_expr_source_range when parsing ssa-name.
2765
2766 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
2767             Richard Biener  <rguenther@suse.de>
2768
2769         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2770         building IL when arguments are error_mark_node.
2771         (c_parser_gimple_unary_expression): Likewise.
2772         (c_parser_gimple_if_stmt): Likewise.
2773         (c_parser_gimple_switch_stmt): Likewise.
2774         (c_parser_gimple_return_stmt): Likewise.
2775         (c_parser_parse_ssa_name): When name lookup fails do not build
2776         an SSA name.  Use undeclared rather than not declared in error
2777         reporting.
2778
2779 2017-02-09  Marek Polacek  <polacek@redhat.com>
2780
2781         PR c/79428
2782         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2783         instead of c_parser_skip_until_found.
2784
2785 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
2786
2787         PR c/79431
2788         * c-parser.c (c_parser_omp_declare_target): Don't invoke
2789         symtab_node::get on automatic variables.
2790
2791 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
2792             Chung-Lin Tang  <cltang@codesourcery.com>
2793
2794         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2795         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2796         semantic checking.
2797         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2798
2799 2017-02-07  Richard Biener  <rguenther@suse.de>
2800
2801         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2802         (c_parser_gimple_postfix_expression_after_primary):
2803         Do not use c_build_function_call_vec to avoid folding and promotion.
2804         Simplify.
2805
2806 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
2807
2808         PR lto/79061
2809         * c-decl.c (pop_scope): Pass main_input_filename to
2810         build_translation_unit_decl.
2811
2812 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
2813
2814         * c-parser.c: Include "read-rtl-function.h" and
2815         "run-rtl-passes.h".
2816         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2817         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
2818         production.  Update for renaming of field "gimple_pass" to
2819         "gimple_or_rtl_pass".  If __RTL was seen, call
2820         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
2821         to an auto_timevar, to cope with early exit.
2822         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2823         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2824         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2825         Handle RID_RTL.
2826         (c_parser_parse_rtl_body): New function.
2827         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2828         (struct c_declspecs): Rename field "gimple_pass" to
2829         "gimple_or_rtl_pass".  Add field "rtl_p".
2830         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2831         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2832         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2833         (c_parser_gimple_or_rtl_pass_list): ...this.
2834
2835 2017-01-20  Marek Polacek  <polacek@redhat.com>
2836
2837         PR c/64279
2838         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2839
2840 2017-01-13  Richard Biener  <rguenther@suse.de>
2841
2842         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2843         nops.
2844
2845 2017-01-13  Richard Biener  <rguenther@suse.de>
2846
2847         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2848         _Literal ( type-name ) number.
2849
2850 2017-01-12  Richard Biener  <rguenther@suse.de>
2851
2852         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2853         __MEM.
2854
2855 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
2856
2857         PR c++/72813
2858         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2859         PCH file.
2860
2861 2017-01-11  Richard Biener  <rguenther@suse.de>
2862
2863         PR bootstrap/79052
2864         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2865         returns on parse errors.
2866
2867 2017-01-04  Marek Polacek  <polacek@redhat.com>
2868
2869         PR c++/64767
2870         * c-parser.c (c_parser_postfix_expression): Mark zero character
2871         constants by setting original_type in c_expr.
2872         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2873         with a zero character constant.
2874         (char_type_p): New function.
2875
2876 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
2877
2878         * c-parser.c (c_parser_declaration_or_fndef): Create a
2879         rich_location at init_loc and parse it to start_init.
2880         (last_init_list_comma): New global.
2881         (c_parser_braced_init): Update last_init_list_comma when parsing
2882         commas.  Pass it to pop_init_level.  Pass location of closing
2883         brace to pop_init_level.
2884         (c_parser_postfix_expression_after_paren_type): Create a
2885         rich_location at type_loc and parse it to start_init.
2886         (c_parser_omp_declare_reduction): Likewise for loc.
2887         * c-tree.h (start_init): Add rich_location * param.
2888         (pop_init_level): Add location_t param.
2889         * c-typeck.c (struct initializer_stack): Add field
2890         "missing_brace_richloc".
2891         (start_init): Add richloc param, use it to initialize
2892         the stack node's missing_brace_richloc.
2893         (last_init_list_comma): New decl.
2894         (finish_implicit_inits): Pass last_init_list_comma to
2895         pop_init_level.
2896         (push_init_level): When finding missing open braces, add fix-it
2897         hints to the richloc.
2898         (pop_init_level): Add "insert_before" param and pass it
2899         when calling pop_init_level.  Add fixits about missing
2900         close braces to any richloc.  Use the richloc for the
2901         -Wmissing-braces warning.
2902         (set_designator): Pass last_init_list_comma to pop_init_level.
2903         (process_init_element): Likewise.
2904
2905 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
2906
2907         Update copyright years.
2908
2909 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
2910
2911         PR bootstrap/78817
2912         * c-typeck.c (build_function_call_vec): If check_function_arguments
2913         returns true, set TREE_NO_WARNING on CALL_EXPR.
2914
2915         PR c/77767
2916         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2917         to *expr instead of overwriting it.
2918
2919 2016-12-20  Richard Biener  <rguenther@suse.de>
2920
2921         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2922         error recovery.
2923         (c_parser_gimple_statement): Only build assigns for non-error
2924         stmts.
2925         (c_parser_gimple_postfix_expression_after): Improve error recovery.
2926
2927 2016-12-14  Martin Jambor  <mjambor@suse.cz>
2928
2929         * c-parser.c: Include omp-general.h and omp-offload.h instead of
2930         omp-low.h.
2931         (c_finish_oacc_routine): Adjusted call to
2932         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2933         to use their new names.
2934         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2935         use its new name.
2936         (c_parser_oacc_update): Likewise.
2937         (c_parser_omp_simd): Likewise.
2938         (c_parser_omp_target_update): Likewise.
2939         * c-typeck.c: Include omp-general.h instead of omp-low.h.
2940         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2941         name.
2942         (c_finish_omp_cancellation_point): Likewise.
2943         * gimple-parser.c: Do not include omp-low.h
2944
2945 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
2946             James Norris  <jnorris@codesourcery.com>
2947
2948         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2949         EXIT_DATA,WAIT} are not used in compound statements.
2950         (c_parser_oacc_enter_exit_data): Update diagnostics.
2951
2952 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2953
2954         PR c++/71973
2955         * c-decl.c (diagnose_mismatched_decls): Use
2956         OPT_Wbuiltin_declaration_mismatch here too.
2957
2958 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
2959             Alan Hayward  <alan.hayward@arm.com>
2960             David Sherwood  <david.sherwood@arm.com>
2961
2962         * c-decl.c (merge_decls): Use SET_DECL_MODE.
2963         (make_label, finish_struct): Likewise.
2964
2965 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
2966             Richard Biener  <rguenther@suse.de>
2967
2968         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2969         * config-lang.in (gtfiles): Add c/c-parser.h.
2970         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2971         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2972         * c-parser.c (enum c_id_kind, struct c_token,
2973         c_parser_next_token_is, c_parser_next_token_is_not,
2974         c_parser_next_token_is_keyword,
2975         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2976         Split out to ...
2977         * c-parser.h: ... new header.
2978         * c-parser.c: Include c-parser.h and gimple-parser.h.
2979         (c_parser_peek_token, c_parser_peek_2nd_token,
2980         c_token_starts_typename, c_parser_next_token_starts_declspecs,
2981         c_parser_next_tokens_start_declaration, c_parser_consume_token,
2982         c_parser_error, c_parser_require, c_parser_skip_until_found,
2983         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2984         c_parser_type_name): Export.
2985         (c_parser_tokens_buf): New function.
2986         (c_parser_error): Likewise.
2987         (c_parser_set_error): Likewise.
2988         (c_parser_declspecs): Handle RID_GIMPLE.
2989         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2990         via c_parser_parse_gimple_body.
2991         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2992         c_token_starts_typename, c_parser_next_token_starts_declspecs,
2993         c_parser_next_tokens_start_declaration, c_parser_consume_token,
2994         c_parser_error, c_parser_require, c_parser_skip_until_found,
2995         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2996         c_parser_type_name): Declare.
2997         (struct c_parser): Declare forward.
2998         (c_parser_tokens_buf): Declare.
2999         (c_parser_error): Likewise.
3000         (c_parser_set_error): Likewise.
3001         * gimple-parser.c: New file.
3002         * gimple-parser.h: Likewise.
3003
3004 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3005
3006         PR c/35503
3007         * c-parser.c (c_parser_postfix_expression_after_primary): Call
3008         warn_for_restrict.
3009
3010 2016-09-11  Le-Chun Wu  <lcwu@google.com>
3011             Mark Wielaard  <mjw@redhat.com>
3012
3013         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3014         to the given -Wshadow= variant.
3015
3016 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3017
3018         * c-typeck.c: Include memmodel.h.
3019
3020 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
3021
3022         PR target/77957
3023         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3024         instead of lhd_return_null_tree_v.
3025
3026 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
3027
3028         PR c++/69733
3029         * c-decl.c (smallest_type_quals_location): New static function.
3030         (grokdeclarator): Try to find the correct location for an ignored
3031         qualifier.
3032
3033 2016-09-26  Marek Polacek  <polacek@redhat.com>
3034
3035         PR c/7652
3036         * c-decl.c (pop_scope): Add gcc_fallthrough.
3037
3038 2016-09-26  Marek Polacek  <polacek@redhat.com>
3039
3040         PR c/7652
3041         * c-parser.c (struct c_token): Add flags field.
3042         (c_lex_one_token): Pass it to c_lex_with_flags.
3043         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3044         into IFN_FALLTHROUGH.
3045         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
3046         attribute fallthrough after a case label or default label.
3047         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3048
3049 2016-09-24  Marek Polacek  <polacek@redhat.com>
3050
3051         PR c/77490
3052         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3053         have boolean value.  Warn about ++/-- on booleans.
3054
3055 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
3056
3057         * c-parser.c (incomplete_record_decls): Remove unnecessary
3058         = vNULL initialization of file scope vec.
3059
3060 2016-09-16  Marek Polacek  <polacek@redhat.com>
3061
3062         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3063
3064 2016-09-14  Marek Polacek  <polacek@redhat.com>
3065
3066         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3067         (fix_array_notation_expr): Likewise.
3068         * c-decl.c (finish_decl): Likewise.
3069         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3070         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3071         (function_to_pointer_conversion): Use false instead of 0.
3072         (convert_lvalue_to_rvalue): Likewise.
3073         (parser_build_unary_op): Likewise.
3074         (build_atomic_assign): Likewise.
3075         (build_unary_op): Change nonconvert parameter type to bool, use
3076         true/false instead of 1/0.
3077         (build_binary_op): Use true instead of 1.
3078
3079 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
3080
3081         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3082         of add_fixit_insert to add_fixit_insert_before.
3083
3084 2016-09-13  Marek Polacek  <polacek@redhat.com>
3085
3086         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
3087         it.
3088
3089 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3090
3091         PR c++/77496
3092         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3093         COMPOUND_EXPR to warn_for_omitted_condop.
3094
3095 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
3096
3097         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3098         c_get_substring_location for this new langhook.
3099
3100 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
3101
3102         PR c/65467
3103         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3104         flag_openmp.
3105         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3106         instead of mark_exp_read on low_bound/length expression.
3107         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3108         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3109         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3110         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3111         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3112         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3113         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3114         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3115         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3116         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3117         instead of mark_expr_read.
3118         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3119         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3120         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3121         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3122         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3123         array section bases outside of depend clause, for depend clause
3124         use convert_lvalue_to_rvalue on the base.
3125         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3126         linear, aligned, map, to and from clauses.
3127         (c_omp_clause_copy_ctor): New function.
3128
3129 2016-09-01  Marek Polacek  <polacek@redhat.com>
3130
3131         PR c/7652
3132         * c-typeck.c (composite_type): Add FALLTHRU comment.
3133
3134 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
3135
3136         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3137         to the insertion fixits for "struct", "union", and "enum".
3138
3139 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
3140
3141         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3142         rather than add_fixit_misspelled_id.
3143         (undeclared_variable): Likewise.
3144         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
3145         now-redundant "here" params from add_fixit_insert method calls.
3146         (c_parser_parameter_declaration): Likewise.
3147         * c-typeck.c (build_component_ref): Remove now-redundant range
3148         param from add_fixit_replace method calls.
3149
3150 2016-08-25  Marek Polacek  <polacek@redhat.com>
3151
3152         * c-typeck.c (parser_build_binary_op): Pass LHS to
3153         warn_logical_not_parentheses.
3154
3155 2016-08-25  Marek Polacek  <polacek@redhat.com>
3156
3157         PR c/77323
3158         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3159         or _FloatN or _FloatNx is not supported.
3160         (finish_declspecs): Set type to integer_type_node when _FloatN or
3161         _FloatNx is not supported.
3162
3163 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
3164
3165         PR c/32187
3166         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3167         (struct c_declspecs): Add field floatn_nx_idx.
3168         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3169         and _FloatNx type specifiers.
3170         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3171         (c_parser_declspecs, c_parser_attribute_any_word)
3172         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3173         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3174         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3175         narrower than double.
3176
3177 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
3178             Martin Liska  <mliska@suse.cz>
3179
3180         PR c/67410
3181         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3182         % to determine val element to change.  Assert that
3183         wchar_bytes * charwidth fits into val array.
3184
3185 2016-08-12  Marek Polacek  <polacek@redhat.com>
3186
3187         PR c/7652
3188         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3189         (c_parser_postfix_expression): Likewise.
3190         * c-typeck.c (build_unary_op): Adjust fall through comment.
3191         (c_mark_addressable): Likewise.
3192
3193 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
3194
3195         PR c/72816
3196         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3197         array member through typedef, for orig_qual_indirect == 0 clear
3198         orig_qual_type.
3199
3200 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
3201
3202         PR c/64955
3203         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3204         this up to selftest::run_c_tests.
3205         (selftest::run_c_tests): New function.
3206
3207 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
3208
3209         * c-parser.c (struct oacc_routine_data): Add error_seen and
3210         fndecl_seen members.
3211         (c_finish_oacc_routine): Use these.
3212         (c_parser_declaration_or_fndef): Adjust.
3213         (c_parser_oacc_routine): Likewise.  Support more C language
3214         constructs, and improve diagnostics.  Move pragma context
3215         checking...
3216         (c_parser_pragma): ... here.
3217
3218         * c-parser.c (struct oacc_routine_data): New.
3219         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3220         Simplify code.
3221         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
3222         declare target" attribute.
3223
3224 2016-08-01  Jan Beulich  <jbeulich@suse.com>
3225
3226         * c-fold.c (c_fully_fold_internal): Also emit shift count
3227         warnings for vector types.
3228         * c-typeck.c (build_binary_op): Likewise.
3229
3230 2016-07-29  Marek Polacek  <polacek@redhat.com>
3231
3232         PR c/71742
3233         * c-decl.c (finish_struct): Rephrase an error message.
3234
3235         PR c/71853
3236         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3237         to error node for invalid code.
3238
3239         PR c/71573
3240         * c-decl.c (implicitly_declare): Return decl early not only for
3241         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3242
3243 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
3244
3245         PR c/71969
3246         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3247         on GNU extern inline functions.
3248
3249 2016-07-29  Marek Polacek  <polacek@redhat.com>
3250
3251         PR c/71583
3252         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3253         check expr.value.
3254
3255 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
3256
3257         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3258
3259 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
3260
3261         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3262         spellcheck-tree.h
3263         (best_macro_match): Likewise, converting from a typedef to a
3264         subclass.
3265         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3266         (lookup_name_fuzzy): Update for change of best_macro_match to a
3267         subclass with a ctor that calls cpp_forall_identifiers.
3268
3269 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
3270
3271         * c-decl.c (implicit_decl_warning): Update for conversion of
3272         return type of lookup_name_fuzzy to const char *.
3273         (undeclared_variable): Likewise.
3274         (lookup_name_fuzzy): Convert return type from tree to
3275         const char *.
3276         * c-parser.c (c_parser_declaration_or_fndef): Update for
3277         conversion of return type of lookup_name_fuzzy to const char *.
3278         (c_parser_parameter_declaration): Likewise.
3279
3280 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
3281
3282         * c-parser.c (c_parser_oacc_declare): Don't scan for
3283         GOMP_MAP_POINTER.
3284         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3285         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3286         zero-length subarrays.
3287
3288 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
3289
3290         PR c/71858
3291         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3292         instead of FUZZY_LOOKUP_NAME.
3293         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3294         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3295
3296 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
3297
3298         PR c/71858
3299         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3300
3301 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
3302
3303         * c-parser.c (c_parser_generic_selection): Make type of variable
3304         auto_vec.
3305         (c_parser_omp_declare_simd): Likewise.
3306
3307 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
3308
3309         * c-decl.c (struct c_struct_parse_info): Change member types
3310         from vec to auto_vec.
3311         (start_struct): Adjust.
3312         (finish_struct): Likewise.
3313
3314 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
3315
3316         PR c/71719
3317         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3318
3319 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
3320
3321         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3322         Move pragma context checking into...
3323         (c_parser_omp_cancellation_point): ... here, and improve
3324         diagnostic messages.
3325         * c-typeck.c (c_finish_omp_cancel)
3326         (c_finish_omp_cancellation_point): Improve diagnostic messages.
3327
3328 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
3329
3330         PR c/71685
3331         * c-typeck.c (c_build_qualified_type): Don't clear
3332         C_TYPE_INCOMPLETE_VARS for the main variant.
3333
3334 2016-06-28  Martin Sebor  <msebor@redhat.com>
3335
3336         PR c/71552
3337         * c-typeck.c (output_init_element): Diagnose incompatible types
3338         before non-constant initializers.
3339
3340 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
3341
3342         * Make-lang.in: Don't cat ../stage_current if it does not exist.
3343
3344 2016-06-23  Andi Kleen  <ak@linux.intel.com>
3345
3346         * Make-lang.in: Add support for autofdo.
3347
3348 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
3349
3350         PR c/70339
3351         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3352         (implicit_decl_warning): When issuing warnings for implicit
3353         declarations, attempt to provide a suggestion via
3354         lookup_name_fuzzy.
3355         (undeclared_variable): Likewise when issuing errors.
3356         (lookup_name_in_scope): Likewise.
3357         (struct edit_distance_traits<cpp_hashnode *>): New struct.
3358         (best_macro_match): New typedef.
3359         (find_closest_macro_cpp_cb): New function.
3360         (lookup_name_fuzzy): New function.
3361         * c-parser.c: Include gcc-rich-location.h.
3362         (c_token_starts_typename): Split out case CPP_KEYWORD into...
3363         (c_keyword_starts_typename): ...this new function.
3364         (c_parser_declaration_or_fndef): When issuing errors about
3365         missing "struct" etc, add a fixit.  For other kinds of errors,
3366         attempt to provide a suggestion via lookup_name_fuzzy.
3367         (c_parser_parms_declarator): When looking ahead to detect typos in
3368         type names, also reject CPP_KEYWORD.
3369         (c_parser_parameter_declaration): When issuing errors about
3370         unknown type names, attempt to provide a suggestion via
3371         lookup_name_fuzzy.
3372         * c-tree.h (c_keyword_starts_typename): New prototype.
3373
3374 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
3375
3376         PR c/71601
3377         * c-typeck.c (build_conditional_expr): Return error_mark_node if
3378         c_common_type returns error_mark_node.
3379
3380 2016-06-19  Martin Sebor  <msebor@redhat.com>
3381
3382         PR c/69507
3383         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3384         __alignof__ (expression).
3385
3386 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
3387
3388         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3389
3390 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
3391
3392         * c-typeck.c (build_component_ref): Simplify fixit code by
3393         using gcc_rich_location::add_fixit_misspelled_id.
3394         (set_init_label): Likewise.
3395
3396 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
3397
3398         * c-parser.c (c_parser_initelt): Provide location of name for new
3399         location_t param of set_init_label.
3400         * c-tree.h (set_init_label): Add location_t param.
3401         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3402         param and use it when issuing error messages about unrecognized
3403         field names.  Attempt to provide a fixit hint if appropriate,
3404         otherwise update the error message to provide the type name.
3405
3406 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
3407
3408         PR c/71381
3409         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3410         Loosen checking.
3411
3412 2016-06-08  Martin Sebor  <msebor@redhat.com>
3413             Jakub Jelinek  <jakub@redhat.com>
3414
3415         PR c++/70507
3416         PR c/68120
3417         * c-typeck.c (convert_arguments): Don't promote last argument
3418         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3419
3420 2016-06-08  Marek Polacek  <polacek@redhat.com>
3421
3422         PR c/71418
3423         * c-decl.c (grokdeclarator): Check TYPE_P.
3424
3425         PR c/71426
3426         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3427         code.
3428
3429 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
3430
3431         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3432         and structure element reference, capture the location of the
3433         element name token and pass it to build_component_ref.
3434         (c_parser_postfix_expression_after_primary): Likewise for
3435         structure element dereference.
3436         (c_parser_omp_variable_list): Likewise for
3437         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3438         * c-tree.h (build_component_ref): Add location_t param.
3439         * c-typeck.c (build_component_ref): Add location_t param
3440         COMPONENT_LOC.  Use it, if available, when issuing hints about
3441         mispelled member names to provide a fixit replacement hint.
3442
3443 2016-06-06  Marek Polacek  <polacek@redhat.com>
3444
3445         PR c/71362
3446         * c-parser.c (c_parser_direct_declarator): Set location.
3447
3448 2016-06-06  Marek Polacek  <polacek@redhat.com>
3449
3450         * c-typeck.c (comptypes_internal): Handle comparisons of
3451         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
3452         TYPE_REF_CAN_ALIAS_ALL.
3453
3454 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
3455
3456         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3457         arguments as addressable when async clause exists.
3458
3459 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
3460
3461         PR c++/71349
3462         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3463         when combined with target construct.
3464
3465 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
3466
3467         * c-parser.c (c_parser_omp_clause_schedule): Warn if
3468         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3469
3470 2016-05-25  Marek Polacek  <polacek@redhat.com>
3471
3472         PR c/71265
3473         * c-decl.c (c_make_fname_decl): Don't check seen_error.
3474
3475         PR c/71266
3476         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3477
3478 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
3479
3480         * c-parser.c (c_parser_oacc_declare): Add support for
3481         GOMP_MAP_FIRSTPRIVATE_POINTER.
3482         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3483         argument with enum c_omp_region_type ort.
3484         (handle_omp_array_sections): Likewise.  Update call to
3485         handle_omp_array_sections_1.
3486         (c_finish_omp_clauses): Add specific errors and warning messages for
3487         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
3488         call to handle_omp_array_sections.
3489
3490 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
3491
3492         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3493
3494 2016-05-24  Richard Biener  <rguenther@suse.de>
3495
3496         PR middle-end/70434
3497         PR c/69504
3498         * c-typeck.c (build_array_ref): Do not complain about indexing
3499         non-lvalue vectors.  Adjust for function name change.
3500
3501 2016-05-20  Martin Sebor  <msebor@redhat.com>
3502
3503         PR c/71115
3504         * c-typeck.c (error_init): Use
3505         expansion_point_location_if_in_system_header.
3506         (warning_init): Same.
3507
3508 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
3509
3510         PR c/71171
3511         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3512         in error-handling.
3513         (c_parser_postfix_expression): Likewise.
3514         * c-tree.h (c_expr::set_error): New method.
3515         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3516         that result's range is initialized.
3517
3518 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
3519
3520         * c-typeck.c (parser_build_unary_op): Fix formatting.
3521
3522 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
3523
3524         * c-decl.c (grokdeclarator): Remove errmsg and use of
3525         targetm.invalid_return_type.
3526         (grokparms): Remove errmsg and use of
3527         targetm.invalid_parameter_type.
3528
3529 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
3530
3531         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3532         function return type.
3533
3534 2016-05-12  Marek Polacek  <polacek@redhat.com>
3535
3536         PR c/70756
3537         * c-decl.c (build_compound_literal): Pass LOC down to
3538         c_incomplete_type_error.
3539         * c-tree.h (require_complete_type): Adjust declaration.
3540         (c_incomplete_type_error): Likewise.
3541         * c-typeck.c (require_complete_type): Add location parameter, pass it
3542         down to c_incomplete_type_error.
3543         (c_incomplete_type_error): Add location parameter, pass it down to
3544         error_at.
3545         (build_component_ref): Pass location down to c_incomplete_type_error.
3546         (default_conversion): Pass location down to require_complete_type.
3547         (build_array_ref): Likewise.
3548         (build_function_call_vec): Likewise.
3549         (convert_arguments): Likewise.
3550         (build_unary_op): Likewise.
3551         (build_c_cast): Likewise.
3552         (build_modify_expr): Likewise.
3553         (convert_for_assignment): Likewise.
3554         (c_finish_omp_clauses): Likewise.
3555
3556 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
3557
3558         PR c/43651
3559         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3560         is enabled.
3561         * c-errors.c (pedwarn_c90): Return true if warned.
3562         * c-tree.h (pedwarn_c90): Change return type to bool.
3563         (enum c_declspec_word): Add new enumerator cdw_atomic.
3564
3565 2016-05-11  Marek Polacek  <polacek@redhat.com>
3566
3567         PR c++/71024
3568         * c-decl.c (diagnose_mismatched_decls): Factor out code to
3569         diagnose_mismatched_attributes and call it.
3570
3571 2016-05-10  Marek Polacek  <polacek@redhat.com>
3572
3573         PR c/70255
3574         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3575         on a declaration following the definition.
3576
3577 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
3578
3579         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3580         parse it through to c_parser_c99_block_statement.
3581         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3582         caller.
3583
3584 2016-05-04  Marek Polacek  <polacek@redhat.com>
3585
3586         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3587         OPT_Wdangling_else.
3588
3589 2016-05-04  Marek Polacek  <polacek@redhat.com>
3590
3591         PR c/48778
3592         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3593         for macro expansions.
3594
3595 2016-05-03  Marek Polacek  <polacek@redhat.com>
3596
3597         PR c/70859
3598         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3599         check_builtin_function_arguments.
3600
3601 2016-05-03  Richard Biener  <rguenther@suse.de>
3602
3603         * Make-lang.in (cc1-checksum.c): For stage-final re-use
3604         the checksum from the previous stage.
3605
3606 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
3607
3608         * c-parser.c (c_parser_oacc_all_clauses): Update call to
3609         c_finish_omp_clauses.
3610         (c_parser_omp_all_clauses): Likewise.
3611         (c_parser_oacc_cache): Likewise.
3612         (c_parser_oacc_loop): Likewise.
3613         (omp_split_clauses): Likewise.
3614         (c_parser_omp_declare_target): Likewise.
3615         (c_parser_cilk_all_clauses): Likewise.
3616         (c_parser_cilk_for): Likewise.
3617         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3618         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3619
3620 2016-05-02  Marek Polacek  <polacek@redhat.com>
3621
3622         PR c/70851
3623         * c-decl.c (grokdeclarator): Diagnose when array's size has an
3624         incomplete type.
3625
3626 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
3627
3628         PR middle-end/70626
3629         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3630         OACC_LOOP_CLAUSE_MASK.
3631         (c_parser_oacc_kernels_parallel): Update call to
3632         c_oacc_split_loop_clauses.
3633
3634 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
3635
3636         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3637         argument to build_modify_expr in two cases.
3638
3639 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
3640
3641         * c-parser.c (c_parser_postfix_expression_after_primary): Call
3642         warn_for_memset instead of warning directly here.
3643
3644 2016-04-26  Marek Polacek  <polacek@redhat.com>
3645
3646         PR c/67784
3647         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3648         out of ...
3649         (c_parser_for_statement): ... here.
3650         (c_parser_if_statement): Use it.
3651         (c_parser_switch_statement): Use it.
3652         (c_parser_while_statement): Use it.
3653
3654         PR c/70791
3655         * c-decl.c (pushdecl): Pass LOCUS down to warning.
3656
3657 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
3658
3659         PR c++/69363
3660         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3661         instead of c_finish_cilk_clauses.
3662         * c-tree.h (c_finish_omp_clauses): Add new default argument.
3663         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
3664         floating-point variables in the linear clause for Cilk Plus.
3665
3666 2016-04-18  Michael Matz  <matz@suse.de>
3667
3668         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3669         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3670
3671 2016-04-15  Marek Polacek  <polacek@redhat.com>
3672
3673         PR c/70671
3674         * c-typeck.c (build_unary_op): Pass location down to error and
3675         warning call.
3676
3677 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
3678
3679         PR c/70436
3680         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3681         where needed.
3682         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3683         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3684         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3685         Adjust c_parser_pragma callers.
3686         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
3687         caller.
3688         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3689         c_parser_statement.
3690         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3691         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3692         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3693         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3694         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3695         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3696         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3697         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3698         down where needed.
3699         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
3700         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3701         calls.
3702
3703 2016-04-13  Marek Polacek  <polacek@redhat.com>
3704
3705         PR c/70436
3706         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3707         adjust callers.
3708         (c_parser_statement): Likewise.
3709         (c_parser_c99_block_statement): Likewise.
3710         (c_parser_while_statement): Likewise.
3711         (c_parser_for_statement): Likewise.
3712         (c_parser_if_body): Don't set IF_P here.
3713         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
3714         about dangling else here.
3715         * c-tree.h (c_finish_if_stmt): Adjust declaration.
3716         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
3717         warn about dangling else here.
3718
3719 2016-04-04  Marek Polacek  <polacek@redhat.com>
3720
3721         PR c/70307
3722         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3723
3724 2016-03-31  Marek Polacek  <polacek@redhat.com>
3725
3726         PR c/70297
3727         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3728
3729 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
3730
3731         PR c/70281
3732         * c-parser.c (c_parser_postfix_expression): Set the source range
3733         for uses of "__builtin_types_compatible_p".
3734
3735 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
3736
3737         PR c/70280
3738         * c-typeck.c (composite_type): Don't count void_list_node
3739         into len, if the list is terminated by void_list_node, start
3740         with void_list_node instead of NULL for newargs.  Stop
3741         at void_list_node.
3742
3743 2016-03-16  Marek Polacek  <polacek@redhat.com>
3744
3745         PR c/70093
3746         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3747         nested functions returning VM types.
3748
3749 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
3750
3751         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3752         when calling c_finish_omp_clauses.
3753
3754 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
3755
3756         PR c/69824
3757         * c-decl.c (get_parm_info): Don't queue implicit function declarations
3758         for later.
3759
3760 2016-03-04  Marek Polacek  <polacek@redhat.com>
3761
3762         PR c/69798
3763         * c-parser.c (c_parser_postfix_expression): Call
3764         c_parser_cast_expression rather than c_parser_postfix_expression.
3765
3766 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
3767
3768         PR c/69796
3769         PR c/69974
3770         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3771         of incomplete decls to error_mark_node.
3772
3773 2016-02-24  Marek Polacek  <polacek@redhat.com>
3774
3775         PR c/69819
3776         * c-decl.c (finish_decl): Don't update the copy of the type of a
3777         different decl type.
3778
3779 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
3780
3781         PR objc/69844
3782         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3783         in id_kind reclassification.
3784
3785 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
3786
3787         PR c/69835
3788         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3789
3790 2016-02-16  James Norris  <jnorris@codesourcery.com>
3791
3792         PR c/64748
3793         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3794
3795 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
3796
3797         * c-decl.c (build_null_declspecs): Zero the entire struct.
3798
3799         PR c/69522
3800         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
3801         callers changed.  If nested_p is true, use it to call
3802         finish_implicit_inits.
3803         * c-tree.h (finish_implicit_inits): Declare.
3804         * c-typeck.c (finish_implicit_inits): New function.  Move code
3805         from ...
3806         (push_init_level): ... here.
3807         (set_designator, process_init_element): Call finish_implicit_inits.
3808
3809 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
3810
3811         PR c/69768
3812         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3813         arguments for -Waddress warning.
3814
3815 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
3816
3817         PR c/69669
3818         * c-decl.c (finish_enum): When honoring mode attribute,
3819         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3820
3821 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
3822
3823         PR debug/69518
3824         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3825         all type variants, not just TYPE_MAIN_VARIANT.
3826
3827 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
3828
3829         PR debug/66869
3830         * c-decl.c (c_write_global_declarations_1): Warn with
3831         warn_unused_function if static prototype without definition
3832         is not C_DECL_USED.
3833
3834 2016-01-27  Marek Polacek  <polacek@redhat.com>
3835
3836         PR c/68062
3837         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3838         to unsigned, if needed.  Add -Wsign-compare warning.
3839
3840 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
3841
3842         PR tree-optimization/69483
3843         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3844
3845 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3846
3847         PR c/24293
3848         * c-tree.h (incomplete_record_decls): Declare.
3849         * c-parser.c (incomplete_record_decls): Define.
3850         (c_parser_translation_unit): Iterate through incomplete_record_decls and
3851         report error if any decl has zero size.
3852         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3853         or enum type to incomplete_record_decls.
3854
3855 2016-01-14  Tom de Vries  <tom@codesourcery.com>
3856
3857         PR tree-optimization/68773
3858         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3859         set force_output.
3860
3861 2016-01-14  Marek Polacek  <polacek@redhat.com>
3862
3863         PR c/69262
3864         * c-decl.c (grokdeclarator): Provide more information for invalid
3865         array declarations.
3866
3867 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
3868
3869         * c-parser.c (c_parser_unary_expression): For dereferences, build
3870         a combined location before calling build_indirect_ref, so that
3871         error reports cover the full range, manually updating the c_expr
3872         src_range.
3873
3874 2016-01-06  Marek Polacek  <polacek@redhat.com>
3875
3876         PR sanitizer/69099
3877         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
3878         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
3879         NULL.
3880
3881 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
3882
3883         Update copyright years.
3884
3885 2016-01-04  Marek Polacek  <polacek@redhat.com>
3886
3887         PR c/68908
3888         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
3889         optimization to use __atomic_fetch_* built-in if possible.
3890
3891 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
3892
3893         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3894         into...
3895         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
3896         all users.
3897
3898 2015-12-22  Marek Polacek  <polacek@redhat.com>
3899
3900         PR c/69002
3901         * c-typeck.c (build_component_ref): Warn when acessing elements of
3902         atomic structures or unions.
3903
3904 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
3905
3906         * c-typeck.c: Include "gcc-rich-location.h".
3907         (build_binary_op): In the two places that call binary_op_error,
3908         create a gcc_rich_location and populate it with the location of
3909         the binary op and its two operands.
3910
3911 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
3912
3913         * c-parser.c (c_parser_statement_after_labels): When calling
3914         c_finish_return, Use the return expression's location if it has
3915         one, falling back to the location of the first token within it.
3916         * c-typeck.c (c_finish_return): When issuing warnings about
3917         the incorrect presence/absence of a return value, issue a note
3918         showing the declaration of the function.
3919
3920 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
3921
3922         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3923         to 4.
3924         (c_parser_peek_nth_token): New function.
3925         (c_parser_peek_conflict_marker): New function.
3926         (c_parser_error): Detect conflict markers and report them as such.
3927
3928 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
3929
3930         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3931         to preserve range information for the primary expression
3932         in the call to c_parser_postfix_expression_after_primary.
3933
3934 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
3935
3936         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3937         expression location, falling back on the first token location,
3938         rather than always using the latter.
3939
3940 2015-12-16  Marek Polacek  <polacek@redhat.com>
3941
3942         PR c/64637
3943         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3944         available.
3945
3946 2015-12-15  Marek Polacek  <polacek@redhat.com>
3947
3948         PR c/68907
3949         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3950         artificial decl.
3951
3952 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
3953
3954         * c-parser.c (c_parser_alignof_expression): Capture location of
3955         closing parenthesis (if any), or of end of unary expression, and
3956         use it to build a src_range for the expression.
3957
3958 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
3959
3960         PR c/68757
3961         * c-parser.c (c_parser_get_builtin_args): Add
3962         "out_close_paren_loc" param, and write back to it.
3963         (c_parser_postfix_expression): Capture the closing
3964         parenthesis location for RID_CHOOSE_EXPR,
3965         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3966         RID_BUILTIN_SHUFFLE and use it to set the source range
3967         for such expressions; within RID_BUILTIN_COMPLEX set
3968         the underlying location.
3969
3970 2015-12-07  Marek Polacek  <polacek@redhat.com>
3971
3972         PR c/68668
3973         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3974         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3975
3976 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
3977
3978         * c-tree.h (c_build_va_arg): Adjust prototype.
3979         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3980         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3981         parameter, adjust throughout and issue an error if EXPR is a component
3982         with reverse storage order.
3983
3984 2015-12-02  Jason Merrill  <jason@redhat.com>
3985
3986         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3987         (c_fully_fold_internal, decl_constant_value_for_optimization):
3988         Move from c-common.c.
3989         * c-tree.h: Declare decl_constant_value_for_optimization.
3990         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3991
3992 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
3993
3994         PR c/68162
3995         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3996         following link from declarator to next declarator.  Track original
3997         qualified type and pass it to c_build_qualified_type.
3998         * c-typeck.c (c_build_qualified_type): Add arguments
3999         orig_qual_type and orig_qual_indirect.
4000
4001 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
4002
4003         * c-parser.c (c_parser_omp_clause_name)
4004         (c_parser_oacc_all_clauses): Alphabetical sorting.
4005
4006 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
4007
4008         PR c/68533
4009         * c-decl.c (get_parm_info): Use b->locus instead of input_location
4010         for diagnostics.
4011
4012 2015-12-01  Julian Brown  <julian@codesourcery.com>
4013             Cesar Philippidis  <cesar@codesourcery.com>
4014             James Norris  <James_Norris@mentor.com>
4015
4016         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4017         (c_parser_oacc_clause_use_device): New function.
4018         (c_parser_oacc_all_clauses): Add use_device support.
4019         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4020         (c_parser_oacc_host_data): New function.
4021         (c_parser_omp_construct): Add host_data support.
4022         * c-tree.h (c_finish_oacc_host_data): Add prototype.
4023         * c-typeck.c (c_finish_oacc_host_data): New function.
4024         (c_finish_omp_clauses): Add use_device support.
4025
4026 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
4027
4028         PR c/67106
4029         * c-decl.c: Set TYPE_PACKED in variants.
4030
4031 2015-11-27  Martin Liska  <mliska@suse.cz>
4032
4033         PR c++/68312
4034         * c-array-notation.c (fix_builtin_array_notation_fn):
4035         Use release_vec_vec instead of vec::release.
4036         (build_array_notation_expr): Likewise.
4037         (fix_conditional_array_notations_1): Likewise.
4038         (fix_array_notation_expr): Likewise.
4039         (fix_array_notation_call_expr): Likewise.
4040
4041 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
4042
4043         PR c/63326
4044         * c-parser.c (c_parser_compound_statement_nostart): If
4045         last_label is true, use pragma_stmt instead of pragma_compound
4046         as second c_parser_pragma argument.
4047         (c_parser_omp_ordered, c_parser_omp_target_update,
4048         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4049         false as second argument to c_parser_skip_to_pragma_eol after
4050         diagnosing standalone directives used in pragma_stmt context.
4051
4052 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
4053
4054         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4055         with "if (ENABLE_OFFLOADING)".
4056
4057 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
4058
4059         PR objc/68438
4060         * c-parser.c (c_parser_postfix_expression): Set up source ranges
4061         for various Objective-C constructs: Class.name syntax,
4062         @selector(), @protocol(), @encode(), and [] message syntax.
4063
4064 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
4065
4066         PR 62314
4067         * c-typeck.c (should_suggest_deref_p): New function.
4068         (build_component_ref): Special-case POINTER_TYPE when
4069         generating a "not a structure of union"  error message, and
4070         suggest a "->" rather than a ".", providing a fix-it hint.
4071
4072 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
4073
4074         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4075         candidate into a new function, find_closest_identifier.
4076
4077 2015-11-19  Marek Polacek  <polacek@redhat.com>
4078
4079         PR c/68412
4080         * c-typeck.c (parser_build_binary_op): Properly handle
4081         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4082
4083 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
4084
4085         * c-parser.c (set_c_expr_source_range): Bulletproof both
4086         overloaded implementations against NULL expr->value.
4087         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4088         values.
4089         (c_parser_unary_expression): Likewise when handling addresses of
4090         labels.
4091         (c_parser_postfix_expression): Likewise for statement expressions,
4092         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4093         __builtin_va_arg, and for __builtin_offset_of.
4094         (c_parser_postfix_expression_after_paren_type): Initialize expr's
4095         src_range using the range of the braced initializer.
4096         (c_parser_transaction_expression): Set src_range for "ret" to a
4097         sane pair of values.
4098
4099 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
4100
4101         * c-parser.c (c_finish_omp_declare_simd): Look for
4102         "simd" attribute as well. Update error message.
4103
4104 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
4105
4106         * c-parser.c (c_parser_omp_declare_target): Adjust.
4107
4108 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
4109
4110         * c-typeck.c (c_finish_omp_clauses): Don't mark
4111         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4112
4113 2015-11-14  Marek Polacek  <polacek@redhat.com>
4114
4115         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4116         * c-typeck.c: Likewise.
4117
4118 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
4119
4120         * c-decl.c (warn_defaults_to): Pass line_table to
4121         rich_location ctor.
4122         * c-errors.c (pedwarn_c99): Likewise.
4123         (pedwarn_c90): Likewise.
4124         * c-parser.c (set_c_expr_source_range): New functions.
4125         (c_token::get_range): New method.
4126         (c_token::get_finish): New method.
4127         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4128         based on the range from the start of the LHS to the end of the
4129         RHS.
4130         (c_parser_conditional_expression): Likewise, based on the range
4131         from the start of the cond.value to the end of exp2.value.
4132         (c_parser_binary_expression): Call set_c_expr_source_range on
4133         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4134         (c_parser_cast_expression): Call set_c_expr_source_range on ret
4135         based on the cast_loc through to the end of the expr.
4136         (c_parser_unary_expression): Likewise, based on the
4137         op_loc through to the end of op.
4138         (c_parser_sizeof_expression) Likewise, based on the start of the
4139         sizeof token through to either the closing paren or the end of
4140         expr.
4141         (c_parser_postfix_expression): Likewise, using the token range,
4142         or from the open paren through to the close paren for
4143         parenthesized expressions.
4144         (c_parser_postfix_expression_after_primary): Likewise, for
4145         various kinds of expression.
4146         * c-tree.h (struct c_expr): Add field "src_range".
4147         (c_expr::get_start): New method.
4148         (c_expr::get_finish): New method.
4149         (set_c_expr_source_range): New decls.
4150         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4151         on ret for prefix unary ops.
4152         (parser_build_binary_op): Likewise, running from the start of
4153         arg1.value through to the end of arg2.value.
4154
4155 2015-11-13  Marek Polacek  <polacek@redhat.com>
4156
4157         PR c/68320
4158         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4159
4160 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
4161
4162         * c-typeck.c: Include spellcheck.h.
4163         (lookup_field_fuzzy_find_candidates): New function.
4164         (lookup_field_fuzzy): New function.
4165         (build_component_ref): If the field was not found, try using
4166         lookup_field_fuzzy and potentially offer a suggestion.
4167
4168 2015-11-12  James Norris  <jnorris@codesourcery.com>
4169             Joseph Myers  <joseph@codesourcery.com>
4170
4171         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4172         (c_parser_omp_clause_name): Handle 'device_resident' clause.
4173         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4174         and PRAGMA_OMP_CLAUSE_LINK.
4175         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4176         and PRAGMA_OACC_CLAUSE_LINK.
4177         (OACC_DECLARE_CLAUSE_MASK): New definition.
4178         (c_parser_oacc_declare): New function.
4179
4180 2015-11-12  Marek Polacek  <polacek@redhat.com>
4181
4182         PR c/67784
4183         * c-parser.c (c_parser_for_statement): Reclassify the token in
4184         a correct scope.
4185
4186 2015-11-11  Marek Polacek  <polacek@redhat.com>
4187
4188         PR c/68107
4189         PR c++/68266
4190         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
4191         checking the size of an array.
4192
4193 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
4194
4195         * c-array-notation.c: Remove unused header files.
4196         * c-aux-info.c: Likewise.
4197         * c-convert.c: Likewise.
4198         * c-decl.c: Likewise.
4199         * c-errors.c: Likewise.
4200         * c-lang.c: Likewise.
4201         * c-objc-common.c: Likewise.
4202         * c-parser.c: Likewise.
4203         * c-typeck.c: Likewise.
4204         * gccspec.c: Likewise.
4205
4206 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
4207             Cesar Philippidis  <cesar@codesourcery.com>
4208             James Norris  <jnorris@codesourcery.com>
4209             Julian Brown  <julian@codesourcery.com>
4210             Nathan Sidwell  <nathan@codesourcery.com>
4211
4212         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4213         routine arg.
4214         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4215         (c_parser_pragma): Parse 'acc routine'.
4216         (OACC_ROUTINE_CLAUSE_MARK): Define.
4217         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4218
4219 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4220
4221         PR debug/67192
4222         * c-typeck.c (c_finish_loop): For unconditional loops, set the
4223         location of the backward-goto to the start of the loop body.
4224
4225 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4226
4227         PR debug/67192
4228         * c-parser.c (c_parser_while_statement): Finish the loop before
4229         parsing ahead for misleading indentation.
4230         (c_parser_for_statement): Likewise.
4231
4232 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
4233
4234         * c-decl.c (finish_struct): If the structure has reverse storage
4235         order, rewrite the type of array fields with scalar component.  Call
4236         maybe_apply_pragma_scalar_storage_order on entry.
4237         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
4238         errors on bit-fields and reverse SSO here and not...
4239         (c_mark_addressable): ...here.
4240         (output_init_element): Adjust call to initializer_constant_valid_p.
4241         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4242
4243 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
4244
4245         * c-decl.c (warn_defaults_to): Update for change in signature
4246         of diagnostic_set_info.
4247         * c-errors.c (pedwarn_c99): Likewise.
4248         (pedwarn_c90): Likewise.
4249         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4250         for textinfo::set_location.
4251
4252 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
4253             Thomas Schwinge  <thomas@codesourcery.com>
4254             James Norris  <jnorris@codesourcery.com>
4255
4256         * c-parser.c (c_parser_omp_clause_name): Add support for
4257         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4258         (c_parser_omp_clause_default): Add is_oacc argument. Handle
4259         default(none) in OpenACC.
4260         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4261         arguments.
4262         (c_parser_oacc_clause_tile): New function.
4263         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4264         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4265         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4266         TILE}.
4267         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4268         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4269         FIRSTPRIVATE}.
4270         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4271         (c_parser_oacc_update): Update the error message for missing clauses.
4272         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4273         and OMP_CLAUSE_INDEPENDENT.
4274
4275 2015-11-05  Marek Polacek  <polacek@redhat.com>
4276
4277         PR c/68090
4278         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4279         deal with pre-evaluation on invalid types.
4280
4281 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
4282             Ilya Verbin  <ilya.verbin@intel.com>
4283
4284         * c-parser.c: Include context.h and gimple-expr.h.
4285         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4286         monotonic together with nonmonotonic.
4287         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
4288         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4289         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4290         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4291         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
4292         expressions on combined target teams before the target.
4293         (c_parser_omp_declare_target): If decl has "omp declare target" or
4294         "omp declare target link" attribute, and cgraph or varpool node already
4295         exists, then set corresponding flags.  Call c_finish_omp_clauses
4296         in the parenthesized extended-list syntax case.
4297         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4298         declare target.
4299         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4300         on OMP_CLAUSE_REDUCTION array sections.
4301         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4302         into the constant offset, or for variable low-bound using
4303         POINTER_PLUS_EXPR.  For structure element based array sections use
4304         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4305         (c_finish_omp_clauses): Drop generic_field_head, structure
4306         elements are now always mapped even as array section bases,
4307         diagnose same var in data sharing and mapping clauses.  Diagnose if
4308         linear step on declare simd is neither a constant nor a uniform
4309         parameter.  Look through POINTER_PLUS_EXPR for array section
4310         reductions.  Diagnose the same var or function appearing multiple
4311         times on the same directive.  Fix up wording for the to clause if t
4312         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
4313         modifier on kinds other than dynamic or guided or nonmonotonic
4314         modifier together with ordered clause.
4315
4316 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
4317             Chung-Lin Tang  <cltang@codesourcery.com>
4318
4319         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4320
4321 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
4322
4323         * c-array-notation.c: Reorder #include's and remove duplicates.
4324         * c-aux-info.c: Likewise.
4325         * c-convert.c: Likewise.
4326         * c-decl.c: Likewise.
4327         * c-errors.c: Likewise.
4328         * c-lang.c: Likewise.
4329         * c-objc-common.c: Likewise.
4330         * c-parser.c: Likewise.
4331         * c-typeck.c: Likewise.
4332
4333 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
4334
4335         PR debug/66068
4336         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4337         after calling build_qualified_type.
4338
4339 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
4340             Thomas Schwinge  <thomas@codesourcery.com>
4341             James Norris  <jnorris@codesourcery.com>
4342             Joseph Myers  <joseph@codesourcery.com>
4343             Julian Brown  <julian@codesourcery.com>
4344             Bernd Schmidt  <bschmidt@redhat.com>
4345
4346         * c-parser.c (c_parser_oacc_shape_clause): New.
4347         (c_parser_oacc_simple_clause): New.
4348         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4349         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4350
4351 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
4352             James Norris  <jnorris@codesourcery.com>
4353             Cesar Philippidis  <cesar@codesourcery.com>
4354
4355         PR c/64765
4356         PR c/64880
4357         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4358         parameters, and handle these.  Adjust all users.
4359         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4360         into...
4361         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
4362         all users.
4363         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4364         declare functions.
4365         (c_finish_omp_construct): Declare function.
4366         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4367         Merge functions into...
4368         (c_finish_omp_construct): ... this new function.
4369
4370 2015-10-22  Richard Biener  <rguenther@suse.de>
4371
4372         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4373         before folding a MINUS_EXPR.
4374
4375 2015-10-21  Marek Polacek  <polacek@redhat.com>
4376
4377         PR c/68024
4378         * c-decl.c (start_function): Warn about vararg functions without
4379         a prototype.
4380
4381 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
4382
4383         * c-typeck.c (build_conditional_expr): Use boolean vector
4384         type for vector comparison.
4385         (build_vec_cmp): New.
4386         (build_binary_op): Use build_vec_cmp for comparison.
4387
4388 2015-10-20  Marek Polacek  <polacek@redhat.com>
4389
4390         * c-parser.c (is_cilkplus_vector_p): Don't define here.
4391
4392 2015-10-20  Marek Polacek  <polacek@redhat.com>
4393
4394         PR c/67964
4395         * c-parser.c (c_parser_attributes): Break out of the loop if the
4396         token after an attribute isn't a comma.
4397
4398 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
4399             Aldy Hernandez  <aldyh@redhat.com>
4400
4401         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4402         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4403         (c_parser_omp_variable_list): Handle structure elements for
4404         map, to and from clauses.  Handle array sections in reduction
4405         clause.  Formatting fixes.
4406         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4407         if clause modifiers.
4408         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4409         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4410         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4411         c_parser_omp_clause_is_device_ptr): New functions.
4412         (c_parser_omp_clause_ordered): Parse optional parameter.
4413         (c_parser_omp_clause_reduction): Handle array reductions.
4414         (c_parser_omp_clause_schedule): Parse optional simd modifier.
4415         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4416         functions.
4417         (c_parser_omp_clause_linear): Parse linear clause modifiers.
4418         (c_parser_omp_clause_depend_sink): New function.
4419         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4420         (c_parser_omp_clause_map): Parse release/delete map kinds and
4421         optional always modifier.
4422         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4423         and c_finish_omp_clauses callers.
4424         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
4425         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4426         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4427         (OMP_CRITICAL_CLAUSE_MASK): Define.
4428         (c_parser_omp_critical): Parse critical clauses.
4429         (c_parser_omp_for_loop): Handle doacross loops, adjust
4430         c_finish_omp_for and c_finish_omp_clauses callers.
4431         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4432         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4433         (OMP_FOR_CLAUSE_MASK): Add linear clause.
4434         (c_parser_omp_for): Disallow ordered clause when combined with
4435         distribute.  Disallow linear clause when combined with distribute
4436         and not combined with simd.
4437         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4438         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4439         parse clauses and if depend clause is found, don't parse a body.
4440         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4441         Allow target parallel without for after it.
4442         (OMP_TASK_CLAUSE_MASK): Add priority clause.
4443         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4444         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4445         invalid kinds.
4446         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4447         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4448         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4449         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4450         functions.
4451         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4452         defaultmap and is_device_ptr clauses.
4453         (c_parser_omp_target): Parse target parallel and target simd.  Set
4454         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
4455         and target exit data.  Diagnose invalid map kinds.
4456         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4457         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4458         construct.
4459         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4460         &omp_priv.
4461         (OMP_TASKLOOP_CLAUSE_MASK): Define.
4462         (c_parser_omp_taskloop): New function.
4463         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4464         handle PRAGMA_OMP_TASKLOOP.
4465         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4466         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4467         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4468         Add IS_OMP argument, handle structure element bases, diagnose
4469         bitfields, pass IS_OMP recursively, diagnose known zero length
4470         array sections in depend clauses, handle array sections in reduction
4471         clause, diagnose negative length even for pointers.
4472         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4473         types, pass IS_OMP down to handle_omp_array_sections_1, handle
4474         array sections in reduction clause, set
4475         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4476         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4477         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4478         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4479
4480 2015-10-06  Marek Polacek  <polacek@redhat.com>
4481
4482         * c-parser.c (c_parser_statement_after_labels): Use
4483         protected_set_expr_location.
4484         (c_parser_omp_clause_num_gangs): Likewise.
4485         (c_parser_omp_clause_num_threads): Likewise.
4486         (c_parser_omp_clause_num_workers): Likewise.
4487         (c_parser_omp_clause_vector_length): Likewise.
4488         (c_parser_omp_clause_num_teams): Likewise.
4489         (c_parser_omp_clause_thread_limit): Likewise.
4490         * c-typeck.c (build_c_cast): Likewise.
4491         (c_cast_expr): Likewise.
4492
4493 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
4494
4495         * c-typeck.c (c_tree_equal): Use real_equal instead of
4496         REAL_VALUES_EQUAL.
4497
4498 2015-10-04  Jason Merrill  <jason@redhat.com>
4499
4500         * c-parser.c (c_lex_one_token): Handle @synchronized.
4501         * c-decl.c (match_builtin_function_types): A declaration of a built-in
4502         can change whether the function is transaction_safe.
4503
4504 2015-10-02  Marek Polacek  <polacek@redhat.com>
4505
4506         PR c/67730
4507         * c-typeck.c (convert_for_assignment): Use the expansion point
4508         location throughout.
4509
4510 2015-10-02  Marek Polacek  <polacek@redhat.com>
4511
4512         PR c/64249
4513         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4514         and pass it down to c_parser_if_statement.
4515         (c_parser_else_body): Add CHAIN parameter and pass it down to
4516         c_parser_statement_after_labels.
4517         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
4518         duplicated if-else-if conditions.
4519
4520 2015-10-01  Marek Polacek  <polacek@redhat.com>
4521
4522         * c-typeck.c (convert_for_assignment): Improve commentary.
4523
4524 2015-09-30  Marek Polacek  <polacek@redhat.com>
4525
4526         PR c/67730
4527         * c-typeck.c (c_finish_return): Use the expansion point location for
4528         certain "return with value" warnings.
4529
4530 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4531
4532         * c-parser.c (pragma_lex): Add loc argument.
4533
4534 2015-09-15  Marek Polacek  <polacek@redhat.com>
4535
4536         PR c/67580
4537         * c-decl.c (tag_exists_p): New function.
4538         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4539         struct/union/enum keywords are missing.
4540         * c-tree.h (tag_exists_p): Declare.
4541
4542 2015-09-15  Marek Polacek  <polacek@redhat.com>
4543
4544         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4545         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4546         Return NULL_TREE instead of 0.
4547         (lookup_name): Return NULL_TREE instead of 0.
4548         (lookup_name_in_scope): Likewise.
4549         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4550         (parser_xref_tag): Use false instead of 0.
4551         (start_struct): Use true instead of 1.
4552         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4553
4554 2015-09-14  Marek Polacek  <polacek@redhat.com>
4555
4556         * c-typeck.c (set_nonincremental_init_from_string): Use
4557         HOST_WIDE_INT_M1U when shifting a negative value.
4558
4559 2015-09-09  Mark Wielaard  <mjw@redhat.com>
4560
4561         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4562         parm against NULL.
4563
4564 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
4565
4566         PR c/67502
4567         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4568         into OMP_FOR_PRE_BODY rather than before the loop.
4569
4570 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
4571
4572         PR c/67501
4573         * c-parser.c (c_parser_oacc_all_clauses,
4574         c_parser_omp_all_clauses): Remove invalid clause from
4575         list of clauses even if parser->error is set.
4576
4577         PR c/67500
4578         * c-parser.c (c_parser_omp_clause_aligned,
4579         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4580         test for errors.
4581         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4582         error_mark_node.
4583
4584         PR c/67495
4585         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4586         instead of c_parser_unary_expression.  If the result is !lvalue_p,
4587         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4588
4589 2015-09-04  Marek Polacek  <polacek@redhat.com>
4590
4591         PR sanitizer/67279
4592         * c-typeck.c (build_binary_op): Don't instrument static initializers.
4593
4594 2015-09-03  Martin Sebor  <msebor@redhat.com>
4595
4596         PR c/66516
4597         * c-typeck.c (convert_arguments, parser_build_unary_op,
4598         build_conditional_expr, c_cast_expr, convert_for_assignment,
4599         build_binary_op, _objc_common_truthvalue_conversion): Call
4600         reject_gcc_builtin.
4601         (c_decl_implicit): Define.
4602
4603 2015-09-02  Marek Polacek  <polacek@redhat.com>
4604
4605         PR c/67432
4606         * c-parser.c (c_parser_enum_specifier): Give a better error for
4607         an empty enum.
4608
4609 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
4610
4611         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4612
4613 2015-08-12  Marek Polacek  <polacek@redhat.com>
4614
4615         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4616         LOC to it.
4617
4618 2015-08-03  Marek Polacek  <polacek@redhat.com>
4619
4620         PR c/67088
4621         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4622         Use it.
4623         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4624
4625 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
4626
4627         * c-parser.c (c_parser_if_body): Take token_indent_info
4628         argument. Call warn_for_misleading_indentation even when the
4629         body is a semicolon.  Extract token_indent_infos corresponding
4630         to the guard, body and next tokens.  Adjust call to
4631         warn_for_misleading_indentation accordingly.
4632         (c_parser_else_body): Likewise.
4633         (c_parser_if_statement): Likewise.
4634         (c_parser_while_statement): Likewise.
4635         (c_parser_for_statement): Likewise.
4636
4637 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
4638             Manuel López-Ibáñez  <manu@gcc.gnu.org>
4639
4640         * c-decl.c (get_parm_info): Remove static var. Update warning
4641         message.
4642
4643 2015-07-27  Marek Polacek  <polacek@redhat.com>
4644
4645         PR c++/66555
4646         PR c/54979
4647         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4648
4649 2015-07-20  Marek Polacek  <polacek@redhat.com>
4650
4651         PR c++/55095
4652         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4653         (build_binary_op): Warn about left shift overflows.
4654
4655 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
4656
4657         * c-array-notation.c: Adjust includes for flags.h changes.
4658         * c-objc-common.c: Likewise.
4659
4660 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
4661
4662         * c-array-notation.c: Adjust includes.
4663         * c-aux-info.c: Likewise.
4664         * c-convert.c: Likewise.
4665         * c-decl.c: Likewise.
4666         * c-errors.c: Likewise.
4667         * c-lang.c: Likewise.
4668         * c-objc-common.c: Likewise.
4669         * c-parser.c: Likewise.
4670         * c-typeck.c: Likewise.
4671
4672 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4673
4674         PR fortran/66605
4675         * c-decl.c (finish_function): Call do_warn_unused_parameter.
4676
4677 2015-06-29  Marek Polacek  <polacek@redhat.com>
4678
4679         PR c/66322
4680         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4681         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
4682         about -Wswitch-bool here.
4683         (do_case): Update c_add_case_label call.
4684         (c_finish_case): Update c_do_switch_warnings call.
4685
4686 2015-06-27  Marek Polacek  <polacek@redhat.com>
4687
4688         * c-typeck.c: Use VECTOR_TYPE_P throughout.
4689
4690 2015-06-26  Marek Polacek  <polacek@redhat.com>
4691
4692         * c-array-notation.c (fix_builtin_array_notation_fn): Use
4693         INDIRECT_REF_P.
4694         * c-typeck.c (array_to_pointer_conversion): Likewise.
4695         (build_unary_op): Likewise.
4696         (c_finish_return): Likewise.
4697
4698 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
4699
4700         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4701         * c-parser.c: Likewise.
4702
4703 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
4704
4705         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4706         instead of pointer_hash.
4707         (detect_field_duplicates): Likewise.
4708
4709 2015-06-25  Marek Polacek  <polacek@redhat.com>
4710
4711         * c-array-notation.c: Use VAR_P throughout.
4712         * c-decl.c: Likewise.
4713         * c-objc-common.c: Likewise.
4714         * c-parser.c: Likewise.
4715         * c-typeck.c: Likewise.
4716
4717 2015-06-25  Marek Polacek  <polacek@redhat.com>
4718
4719         * c-decl.c: Use is_global_var throughout.
4720         * c-parser.c: Likewise.
4721         * c-typeck.c: Likewise.
4722
4723 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
4724
4725         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4726         * c-aux-info.c: Likewise.
4727         * c-convert.c: Likewise.
4728         * c-decl.c: Likewise.
4729         * c-errors.c: Likewise.
4730         * c-lang.c: Likewise.
4731         * c-objc-common.c: Likewise.
4732         * c-parser.c: Likewise.
4733         * c-typeck.c: Likewise.
4734
4735 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
4736
4737         PR middle-end/66325
4738         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4739         variants.
4740
4741 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
4742
4743         * c-decl.c (pop_scope): Register the main translation unit
4744         through the new debug hook.
4745
4746 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
4747
4748         * c-array-notation.c : Adjust include files.
4749         * c-aux-info.c : Likewise.
4750         * c-convert.c : Likewise.
4751         * c-decl.c : Likewise.
4752         * c-errors.c : Likewise.
4753         * c-lang.c : Likewise.
4754         * c-lang.h : Likewise.
4755         * c-objc-common.c : Likewise.
4756         * c-parser.c : Likewise.
4757         * c-typeck.c : Likewise.
4758
4759 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
4760
4761         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4762         immediately clobber it.
4763         (c_write_global_declarations_1): Remove call to
4764         check_global_declaration_1.
4765         (c_write_global_declarations_2): Remove.
4766         (c_write_final_cleanups): Rename from c_write_global_declarations.
4767         Remove call to finalize_compilation_unit.
4768         Remove calls to debugging hooks.
4769         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4770         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4771         * c-tree.h: Remove c_write_global_declarations.
4772
4773 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
4774
4775         * c-array-notation.c: Adjust includes for restructured coretypes.h.
4776         * c-aux-info.c: Likewise.
4777         * c-convert.c: Likewise.
4778         * c-decl.c: Likewise.
4779         * c-errors.c: Likewise.
4780         * c-lang.c: Likewise.
4781         * c-objc-common.c: Likewise.
4782         * c-parser.c: Likewise.
4783         * c-typeck.c: Likewise.
4784
4785 2015-06-04  Marek Polacek  <polacek@redhat.com>
4786
4787         PR c/66341
4788         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4789         it is a lvalue.
4790
4791 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4792
4793         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4794         Warn for empty struct.
4795         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4796
4797 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
4798
4799         * c-decl.c (start_function): Call plugin before parsing.
4800         (finish_function): Call plugin after parsing.
4801
4802 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4803
4804         PR c/49551
4805         * c-decl.c (merge_decls): Merge DECL_COMMON.
4806
4807 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
4808
4809         * Make-lang.in (check_gcc_pallelize): Define.
4810
4811 2015-05-22  Marek Polacek  <polacek@redhat.com>
4812
4813         PR c/47043
4814         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4815         attributes.
4816
4817 2015-05-21  Marek Polacek  <polacek@redhat.com>
4818
4819         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4820         DECL_BUILT_IN.
4821
4822 2015-05-20  Marek Polacek  <polacek@redhat.com>
4823
4824         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4825         * c-typeck.c: Likewise.
4826
4827 2015-05-19  Marek Polacek  <polacek@redhat.com>
4828
4829         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4830
4831 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
4832
4833         PR middle-end/66199
4834         * c-parser.c (c_parser_omp_for_loop): Don't add
4835         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4836         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4837         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4838         constructs.
4839
4840 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
4841
4842         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4843         swaps.
4844
4845 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4846
4847         PR fortran/44054
4848         * c-objc-common.c (c_tree_printer): Replace locus pointer with
4849         accessor function.
4850
4851 2015-05-14  Marek Polacek  <polacek@redhat.com>
4852
4853         PR c/66066
4854         PR c/66127
4855         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4856         rather than with 0.
4857
4858 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
4859
4860         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4861         to add a call to warn_for_misleading_indentation.
4862         (c_parser_else_body): Likewise, adding param "else_loc".
4863         (c_parser_if_statement): Check for misleading indentation.
4864         (c_parser_while_statement): Likewise.
4865         (c_parser_for_statement): Likewise.
4866
4867 2015-05-08  Marek Polacek  <polacek@redhat.com>
4868
4869         PR c/64918
4870         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4871         (output_init_element): Likewise.
4872
4873 2015-05-07  Marek Polacek  <polacek@redhat.com>
4874
4875         PR c/65179
4876         * c-typeck.c (build_binary_op): Warn when left shifting a negative
4877         value.
4878
4879 2015-04-30  Marek Polacek  <polacek@redhat.com>
4880
4881         * c-typeck.c (set_init_label): Call error_at instead of error and
4882         pass LOC to it.
4883
4884         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
4885         the type of a decl.
4886
4887         * c-typeck.c (c_build_va_arg): Clarify the error message.
4888
4889 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
4890
4891         * c-parser.c (c_parser_oacc_enter_exit_data): Use
4892         OMP_STANDALONE_CLAUSES.
4893
4894 2015-04-28  Marek Polacek  <polacek@redhat.com>
4895
4896         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4897
4898 2015-04-28  Marek Polacek  <polacek@redhat.com>
4899
4900         PR c/65901
4901         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4902
4903 2015-04-25  Marek Polacek  <polacek@redhat.com>
4904
4905         PR c/52085
4906         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
4907         attribute.
4908
4909 2015-04-23  Marek Polacek  <polacek@redhat.com>
4910
4911         PR c/65345
4912         * c-decl.c (set_labels_context_r): New function.
4913         (store_parm_decls): Call it via walk_tree_without_duplicates.
4914         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4915         instead of create_tmp_var.  Build TARGET_EXPR instead of
4916         COMPOUND_EXPR.
4917         (build_atomic_assign): Use create_tmp_var_raw instead of
4918         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
4919
4920 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
4921
4922         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4923         (c_parser_omp_target_update): Add missed %> to error_at ().
4924
4925 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
4926
4927         PR target/55143
4928         * c-decl.c (c_default_pointer_mode): Remove definition.
4929         * c-tree.h (c_default_pointer_mode): Remove declaration.
4930
4931 2015-03-27  Tobias Burnus  <burnus@net-b.de>
4932
4933         PR c/65586
4934         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4935         error out.
4936         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4937         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4938         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4939
4940 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
4941
4942         * c-decl.c (c_decl_attributes): Also add "omp declare target"
4943         attribute for DECL_EXTERNAL VAR_DECLs.
4944
4945 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
4946
4947         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4948         argument.
4949
4950 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
4951
4952         PR c/65120
4953         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4954         before preparing arguments to warn_logical_not_parentheses.
4955
4956 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
4957
4958         PR c/65120
4959         * c-typeck.c (parser_build_binary_op): Don't warn for
4960         !!x == y or !b == y where b is _Bool.
4961
4962 2015-03-09  Marek Polacek  <polacek@redhat.com>
4963
4964         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4965         * c-decl.c (grokdeclarator): Likewise.
4966         * c-typeck.c (build_binary_op): Likewise.
4967
4968 2015-02-27  Marek Polacek  <polacek@redhat.com>
4969
4970         PR c/65228
4971         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4972
4973 2015-02-14  Marek Polacek  <polacek@redhat.com>
4974
4975         PR c/64768
4976         * c-decl.c (grokdeclarator): Set the range of a flexible array member
4977         declared through a typedef name.
4978
4979 2015-02-13  Marek Polacek  <polacek@redhat.com>
4980
4981         PR c/65050
4982         * c-decl.c (grokdeclarator): Print also the type when giving
4983         the error message about array's incomplete element type.
4984
4985 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
4986
4987         PR c/64824
4988         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4989         check in the POP macro.
4990
4991 2015-02-09  Marek Polacek  <polacek@redhat.com>
4992
4993         PR c/64856
4994         * c-typeck.c (process_init_element): Don't always wrap
4995         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4996         initializing a range of elements.
4997
4998 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
4999
5000         PR c/64824
5001         PR c/64868
5002         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5003
5004 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
5005
5006         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5007         processing enum declaration.
5008
5009 2015-01-29  Marek Polacek  <polacek@redhat.com>
5010
5011         PR c/64709
5012         * c-typeck.c (pop_init_level): If constructor_elements has
5013         exactly one element with integer_zerop value, set constructor_zeroinit
5014         to 1.  Remove braces around warning_init call.
5015
5016 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
5017
5018         PR c/64766
5019         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5020         of FUNCTION_DECLs with error_mark_node.
5021
5022 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
5023
5024         PR c/64778
5025         * c-typeck.c (convert_arguments): Return -1 if there are
5026         error_args, even if we've diagnosed too many arguments.
5027
5028 2015-01-21  Richard Biener  <rguenther@suse.de>
5029
5030         PR middle-end/64313
5031         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5032         for builtins the user declared correctly.
5033
5034 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
5035             Bernd Schmidt  <bernds@codesourcery.com>
5036             Cesar Philippidis  <cesar@codesourcery.com>
5037             James Norris  <jnorris@codesourcery.com>
5038             Jakub Jelinek  <jakub@redhat.com>
5039             Ilmir Usmanov  <i.usmanov@samsung.com>
5040
5041         * c-parser.c: Include "gomp-constants.h".
5042         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5043         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5044         Use OMP_CLAUSE_SET_MAP_KIND.
5045         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5046         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5047         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5048         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5049         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5050         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5051         "copyout", "create", "delete", "deviceptr", "gang", "host",
5052         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5053         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5054         "present_or_create", "pcreate", "seq", "self", "vector",
5055         "vector_length", "wait", "worker".
5056         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5057         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5058         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5059         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5060         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5061         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5062         (c_parser_oacc_data_clause_deviceptr)
5063         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5064         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5065         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5066         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5067         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5068         (c_parser_oacc_parallel, c_parser_oacc_update)
5069         (c_parser_oacc_wait): New functions.
5070         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5071         (c_finish_oacc_data): New prototypes.
5072         * c-typeck.c: Include "gomp-constants.h".
5073         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
5074         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
5075         OMP_CLAUSE_SET_MAP_KIND.
5076         (c_finish_oacc_parallel, c_finish_oacc_kernels)
5077         (c_finish_oacc_data): New functions.
5078         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5079         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5080         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5081         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5082         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5083         GOMP_MAP_FORCE_DEVICEPTR.
5084
5085 2015-01-09  Michael Collison  <michael.collison@linaro.org>
5086
5087         * c-array-notation.c: Include hash-set.h, machmode.h,
5088         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5089         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5090         * c-aux-info.c: Ditto.
5091         * c-convert.c: Ditto.
5092         * c-decl.c: Ditto.
5093         * c-errors.c: Ditto.
5094         * c-lang.c: Dittoxs.
5095         * c-objc-common.c: Ditto.
5096         * c-parser.c: Ditto.
5097         * c-typeck.c: Include hash-set.h, machmode.h,
5098         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5099         fold-const.h, wide-int.h, inchash.h, real.h and
5100         fixed-value.h due to flattening of tree.h.
5101
5102 2015-01-07  Marek Polacek  <polacek@redhat.com>
5103
5104         PR c/64417
5105         * c-typeck.c (process_init_element): Disallow initialization of
5106         a flexible array member with a string constant if the structure
5107         is in an array.
5108
5109 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
5110
5111         PR sanitizer/64344
5112         * c-typeck.c (convert_for_assignment, c_finish_return): For
5113         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5114         types also set in_late_binary_op around convert call.
5115         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5116         to integral type casts, if not in_late_binary_op, pass c_fully_fold
5117         result on expr as last argument to ubsan_instrument_float_cast,
5118         if in_late_binary_op, don't use c_save_expr but save_expr.
5119
5120         Update copyright years.
5121
5122 2015-01-05  Marek Polacek  <polacek@redhat.com>
5123
5124         PR c/64423
5125         * c-typeck.c (build_array_ref): Pass loc down to
5126         warn_array_subscript_with_type_char.
5127
5128 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
5129
5130         * c-typeck.c: New behavious for pointers to arrays with qualifiers
5131         (common-pointer-type): For pointers to arrays take qualifiers from
5132         element type.
5133         (build_conditional_expr): Add warnings for lost qualifiers.
5134         (comp-target-types): Allow pointers to arrays with different qualifiers.
5135         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5136         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5137         to PEDWARN_FOR_QUALIFIERS.
5138
5139 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
5140
5141         PR sanitizer/64289
5142         * c-convert.c: Include ubsan.h.
5143         (convert): For real -> integral casts and
5144         -fsanitize=float-cast-overflow don't call convert_to_integer, but
5145         instead instrument the float cast directly.
5146
5147 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
5148
5149         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5150         c_finish_stmt_expr): Remove NULL last argument from
5151         create_tmp_var_raw and create_tmp_var calls.
5152         * c-array-notation.c (fix_builtin_array_notation_fn,
5153         build_array_notation_expr, fix_conditional_array_notations_1,
5154         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5155
5156 2014-11-28  Marek Polacek  <polacek@redhat.com>
5157
5158         PR c/63862
5159         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5160         convert the right operand to integer type.
5161
5162 2014-11-25  Marek Polacek  <polacek@redhat.com>
5163
5164         PR c/63877
5165         * c-decl.c (start_function): Disable -Wmissing-declarations warning
5166         for inline functions.
5167
5168 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
5169
5170         PR target/63764
5171         * c-typeck.c (build_array_ref): Adjust
5172         convert_vector_to_pointer_for_subscript caller.  If it returns true,
5173         call non_lvalue_loc on the result.
5174
5175 2014-11-11  Richard Biener  <rguenther@suse.de>
5176
5177         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5178         to true.
5179
5180 2014-11-10  Andi Kleen  <ak@linux.intel.com>
5181
5182         PR c/60804
5183         * c-parser.c (c_parser_statement_after_labels): Call
5184         check_no_cilk.
5185         (c_parser_if_statement): Dito.
5186         (c_parser_switch_statement): Dito.
5187         (c_parser_while_statement): Dito.
5188         (c_parser_do_statement): Dito.
5189         (c_parser_for_statement): Dito.
5190         * c-typeck.c (c_finish_loop): Dito.
5191
5192 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
5193
5194         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5195         OPT_Wshift_count_overflow in the warnings.
5196
5197 2014-10-30  Marek Polacek  <polacek@redhat.com>
5198
5199         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5200         print the stripped version as well, if they're not the same.
5201
5202 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
5203
5204         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5205         machine_mode.
5206
5207 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
5208
5209         * c-decl.c: Adjust include files.
5210         * c-parser.c: Ditto.
5211
5212 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
5213             Tom Tromey  <tromey@redhat.com>
5214
5215         * c-tree.h (enum c_oracle_request): New.
5216         (c_binding_oracle_function): New typedef.
5217         (c_binding_oracle, c_pushtag, c_bind): Declare.
5218         * c-decl.c (c_binding_oracle): New global.
5219         (I_SYMBOL_CHECKED): New macro.
5220         (i_symbol_binding): New function.
5221         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5222         (I_TAG_CHECKED): New macro.
5223         (i_tag_binding): New function.
5224         (I_TAG_BINDING, I_TAG_DECL): Redefine.
5225         (I_LABEL_CHECKED): New macro.
5226         (i_label_binding): New function.
5227         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5228         (c_print_identifier): Save and restore c_binding_oracle.
5229         (c_pushtag, c_bind): New functions.
5230
5231 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
5232
5233         * c-typeck.c: Adjust include files.
5234
5235 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5236
5237         PR c++/53061
5238         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5239         initialization here...
5240         (c_initialize_diagnostics): ... but here. Set defaults after
5241         building pretty-printer.
5242
5243 2014-10-23  Marek Polacek  <polacek@redhat.com>
5244
5245         PR c/63626
5246         * c-decl.c (pop_scope): Don't print warning in external_scope.
5247
5248 2014-10-19  Marek Polacek  <polacek@redhat.com>
5249
5250         PR c/63567
5251         * c-typeck.c (output_init_element): Allow initializing objects with
5252         static storage duration with compound literals even in C99 and add
5253         pedwarn for it.
5254
5255 2014-10-17  Marek Polacek  <polacek@redhat.com>
5256
5257         PR c/63567
5258         * c-typeck.c (digest_init): Allow initializing objects with static
5259         storage duration with compound literals even in C99 and add pedwarn
5260         for it.
5261
5262 2014-10-17  Marek Polacek  <polacek@redhat.com>
5263
5264         PR c/63543
5265         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5266         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5267         error multiple times.  Print the type.
5268
5269 2014-10-17  Marek Polacek  <polacek@redhat.com>
5270
5271         PR c/63549
5272         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5273         type.
5274
5275 2014-10-17  Marek Polacek  <polacek@redhat.com>
5276
5277         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5278         (start_function): Use OPT_Wimplicit_int instead of 0.
5279         (store_parm_decls_oldstyle): Likewise.
5280
5281 2014-10-17  Alan Modra  <amodra@gmail.com>
5282
5283         PR middle-end/61848
5284         * c-decl.c (merge_decls): Don't merge section name or tls model
5285         to newdecl symtab node, instead merge to olddecl.  Override
5286         existing olddecl section name.  Set tls_model for all thread-local
5287         vars, not just OMP thread-private ones.  Remove incorrect comment.
5288
5289 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
5290
5291         * c-decl.c: Adjust include files.
5292
5293 2014-10-14  DJ Delorie  <dj@redhat.com>
5294
5295         * c-parser.c (c_parse_init): Add RID entries for each __intN.
5296         (c_token_starts_typename): Check all __intN, not just __int128.
5297         (c_token_starts_declspecs): Likewise.
5298         (c_parser_declspecs): Likewise.
5299         (c_parser_attribute_any_word): Likewise.
5300         (c_parser_objc_selector): Likewise.
5301         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5302         (struct c_declspecs): Add int_n_idx field to record *which* __intN
5303         is specified.
5304         * c-decl.c (declspecs_add_type): Check for all __intN, not just
5305         __int128.
5306         (finish_declspecs): Likewise.
5307
5308 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
5309
5310         * c-parser.c (c_parser_all_labels): New function to replace
5311         the duplicate code.
5312         (c_parser_statement): Call the new function.
5313
5314 2014-10-09  Marek Polacek  <polacek@redhat.com>
5315
5316         PR c/63480
5317         * c-typeck.c (pop_init_level): Don't warn about initializing
5318         with { }.
5319
5320 2014-10-07  Marek Polacek  <polacek@redhat.com>
5321
5322         PR c/59717
5323         * c-decl.c (header_for_builtin_fn): New function.
5324         (implicitly_declare): Suggest which header to include.
5325
5326 2014-10-07  Marek Polacek  <polacek@redhat.com>
5327
5328         * c-convert.c (convert): Use error_operand_p.
5329         * c-typeck.c (require_complete_type): Likewise.
5330         (really_atomic_lvalue): Likewise.
5331         (digest_init): Likewise.
5332         (handle_omp_array_sections_1): Likewise.
5333
5334 2014-10-03  Marek Polacek  <polacek@redhat.com>
5335
5336         PR c/63453
5337         * c-decl.c (pop_scope): Don't warn about "inline function declared
5338         but never defined" for functions marked with gnu_inline attribute.
5339
5340 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
5341
5342         PR c++/63249
5343         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5344         on low_bound and length.
5345
5346 2014-09-24  Marek Polacek  <polacek@redhat.com>
5347
5348         PR c/61405
5349         PR c/53874
5350         * c-parser.c: Don't define CPP_KEYWORD.
5351         (c_parser_switch_statement): Pass original type to c_finish_case.
5352         * c-tree.h (c_finish_case): Update declaration.
5353         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
5354         conditionally to c_do_switch_warnings.
5355
5356 2014-09-03  Marek Polacek  <polacek@redhat.com>
5357
5358         PR c/62024
5359         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5360         conversions.
5361
5362 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
5363             Balaji V. Iyer  <balaji.v.iyer@intel.com>
5364             Igor Zamyatin  <igor.zamyatin@intel.com>
5365
5366         * c-parser.c (c_parser_cilk_for): New function.
5367         (c_parser_cilk_grainsize): Likewise.
5368         (c_get_temp_regvar): Likewise.
5369         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5370         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5371         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5372         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5373         case.
5374
5375 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
5376
5377         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5378         with using HOST_WIDE_INT without truncation to 'int'
5379
5380 2014-08-22  Marek Polacek  <polacek@redhat.com>
5381
5382         PR c++/62199
5383         * c-typeck.c (parser_build_binary_op): Adjust call to
5384         warn_logical_not_parentheses.
5385
5386 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
5387
5388         PR other/62008
5389         * c-parser.c (c_parser_array_notation): Check for correct
5390         type of an array added.
5391
5392 2014-08-19  Marek Polacek  <polacek@redhat.com>
5393
5394         PR c++/62153
5395         * c-typeck.c (build_binary_op): If either operand of a comparison
5396         is a boolean expression, call maybe_warn_bool_compare.
5397
5398 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
5399
5400         PR c/45584
5401         * c-typeck.c (build_c_cast): Do a conversion even when the
5402         TYPE_MAIN_VARIANTs are the same.
5403
5404 2014-08-19  Marek Polacek  <polacek@redhat.com>
5405
5406         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5407         pedwarn_c99 instead of pedwarn.
5408         (grokfield): Likewise.
5409         (warn_defaults_to): New function.
5410         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5411         Unconditionally call pedwarn_c99 instead of pedwarn.
5412         (start_function): Call warn_defaults_to instead of pedwarn_c99.
5413         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5414         check flag_isoc11 before.
5415         * c-errors.c (pedwarn_c99): Change the return type to bool.
5416         Handle -Wc99-c11-compat.
5417         * c-parser.c (disable_extension_diagnostics): Handle
5418         warn_c99_c11_compat.
5419         (restore_extension_diagnostics): Likewise.
5420         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5421         instead of pedwarn, don't check flag_isoc11 before.
5422         (c_parser_declspecs): Likewise.
5423         (c_parser_alignas_specifier): Likewise.
5424         (c_parser_alignof_expression): Likewise.
5425         (c_parser_generic_selection): Likewise.
5426         * c-tree.h (pedwarn_c99): Update declaration.
5427         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5428         of pedwarn_c99.
5429
5430 2014-08-19  Marek Polacek  <polacek@redhat.com>
5431
5432         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5433         to pedwarn_c90.
5434         * c-errors.c: Include "opts.h".
5435         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5436         * c-parser.c (disable_extension_diagnostics): Handle negative value
5437         of warn_c90_c99_compat, too.
5438         (restore_extension_diagnostics): Likewise.
5439         (c_parser_compound_statement_nostart): Pass
5440         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5441
5442 2014-08-12  Marek Polacek  <polacek@redhat.com>
5443
5444         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5445         Add pedwarn.
5446         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5447         Likewise.
5448         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5449
5450 2014-08-10  Marek Polacek  <polacek@redhat.com>
5451
5452         PR c/51849
5453         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5454         Call pedwarn_c90 instead of pedwarn.
5455         (check_bitfield_type_and_width): Likewise.
5456         (declspecs_add_qual): Likewise.
5457         (declspecs_add_type): Likewise.
5458         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5459         Adjust to only call pedwarn_c90.
5460         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
5461         pedwarn_c90 instead of pedwarn.
5462         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5463         * c-parser.c (disable_extension_diagnostics): Handle
5464         warn_c90_c99_compat.
5465         (restore_extension_diagnostics): Likewise.
5466         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
5467         pedwarn_c90 instead of pedwarn.
5468         (c_parser_initelt): Likewise.
5469         (c_parser_postfix_expression): Likewise.
5470         (c_parser_postfix_expression_after_paren_type): Likewise.
5471         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5472         * c-tree.h: Fix formatting.
5473         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
5474         pedwarn_c90 instead of pedwarn.
5475
5476 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
5477
5478         * c-typeck.c: Remove include of pointer-set.h.
5479
5480 2014-08-07  Marek Polacek  <polacek@redhat.com>
5481
5482         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5483
5484 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
5485
5486         * c-typeck.c: Use hash_map instead of pointer_map.
5487
5488 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
5489
5490         * c-decl.c: Use hash_set instead of pointer_set.
5491
5492 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
5493
5494         PR middle-end/61455
5495         * c-array-notation.c (expand_array_notations): Handling
5496         of DECL_EXPR added.
5497
5498 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
5499
5500         PR c++/60517
5501         * c-typeck.c (c_finish_return): Return 0 instead of the address of
5502         a local variable.
5503
5504 2014-07-30  Tom Tromey  <tromey@redhat.com>
5505
5506         * c-typeck.c (struct constructor_stack) <designator_depth>: New
5507         field.
5508         (really_start_incremental_init, push_init_level): Initialize
5509         designator_depth.
5510         (pop_init_level): Set global designator_depth.
5511         (process_init_element): Check for designated_init attribute.
5512
5513 2014-07-20  Marek Polacek  <polacek@redhat.com>
5514
5515         PR c/61852
5516         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
5517         (implicitly_declare): Pass location to implicit_decl_warning.
5518
5519 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
5520
5521         PR middle-end/61294
5522         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5523         If non-NULL, call c_parser_check_literal_zero.
5524         (c_parser_check_literal_zero): New function.
5525         (c_parser_postfix_expression_after_primary): Adjust
5526         c_parser_expr_list caller, handle -Wmemset-transposed-args.
5527
5528 2014-07-06  Marek Polacek  <polacek@redhat.com>
5529
5530         PR c/6940
5531         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5532         * c-tree.h (C_ARRAY_PARAMETER): Define.
5533         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5534         function parameter.
5535
5536 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
5537             Chen Gang  <gang.chen.5i5j@gmail.com>
5538
5539         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5540         releasing symbol.
5541
5542 2014-07-01  Marek Polacek  <polacek@redhat.com>
5543
5544         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5545         instead of 0 to WARN_FOR_ASSIGNMENT.
5546
5547 2014-07-01  Marek Polacek  <polacek@redhat.com>
5548
5549         PR c/58286
5550         * c-typeck.c (convert_for_assignment): Pass
5551         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5552
5553 2014-06-30  Marek Polacek  <polacek@redhat.com>
5554
5555         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5556         has no_sanitize_undefined attribute.
5557
5558 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
5559
5560         PR middle-end/57541
5561         * c-array-notation.c (fix_builtin_array_notation_fn):
5562         Check for 0 arguments in builtin call. Check that bultin argument is
5563         correct.
5564         * c-parser.c (c_parser_array_notation): Check for incorrect initial
5565         index.
5566
5567 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5568
5569         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5570         qualifiers in __auto_type for atomic types.
5571         (c_parser_typeof_specifier): Discard all type qualifiers in
5572         __typeof__ for atomic types.
5573
5574 2014-06-25  Marek Polacek  <polacek@redhat.com>
5575
5576         PR c/61162
5577         * c-parser.c (c_parser_statement_after_labels): Pass the location of
5578         the return expression to c_finish_return.
5579
5580 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
5581
5582         * c-typeck.c (c_finish_omp_clauses): Make sure
5583         OMP_CLAUSE_LINEAR_STEP has correct type.
5584
5585 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
5586
5587         * c-decl.c: Adjust.
5588
5589 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
5590
5591         * c-parser.c (c_parser_omp_for_loop): For
5592         #pragma omp parallel for simd move lastprivate clause from parallel
5593         to for rather than simd.
5594
5595 2014-06-23  Marek Polacek  <polacek@redhat.com>
5596
5597         * c-typeck.c (parser_build_binary_op): Don't call
5598         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5599
5600 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
5601
5602         * c-parser.c (c_parser_omp_threadprivate): Likewise.
5603         * c-decl.c (merge_decls): Likewise.
5604
5605 2014-06-09  Marek Polacek  <polacek@redhat.com>
5606
5607         PR c/36446
5608         * c-typeck.c (error_init): Call inform instead of error_at.
5609         (pedwarn_init): Call inform instead of pedwarn.
5610         (warning_init): Call inform instead of warning_at.
5611
5612 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
5613
5614         * c-decl.c (merge_decls): Use set_decl_section_name.
5615         (duplicate_decls): Remove node if it exists.
5616
5617 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
5618
5619         PR c/53119
5620         * c-typeck.c (push_init_level, process_init_element,
5621         pop_init_level): Correct check for zero initialization, move
5622         missing brace warning to respect zero initialization.
5623
5624 2014-06-05  Marek Polacek  <polacek@redhat.com>
5625
5626         PR c/56724
5627         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5628
5629 2014-06-05  Marek Polacek  <polacek@redhat.com>
5630
5631         PR c/49706
5632         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5633         on the left hand side operand of a comparison.
5634
5635 2014-06-05  Marek Polacek  <polacek@redhat.com>
5636
5637         PR c/48062
5638         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5639         Print note only if the warning was printed.
5640
5641 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
5642
5643         PR c/58942
5644         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5645         with a pointer.
5646
5647 2014-06-03  Marek Polacek  <polacek@redhat.com>
5648
5649         PR c/60439
5650         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5651         c_start_case.
5652         * c-tree.h (c_start_case): Update.
5653         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
5654         switch condition has boolean value.
5655
5656 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
5657
5658         * c-decl.c: Include builtins.h.
5659         * c-parser.c: Likewise.
5660
5661 2014-05-27  Marek Polacek  <polacek@redhat.com>
5662
5663         PR c/56724
5664         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
5665         error and warning calls to error_at and warning_at.  Pass location of
5666         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
5667         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5668         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
5669
5670 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
5671
5672         PR c/61191
5673         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5674         function parameters.
5675
5676 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
5677
5678         * c-decl.c (merge_decls): Preserve symtab node pointers.
5679         (duplicate_decls): Free new decl.
5680
5681 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
5682
5683         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5684         initialization.
5685
5686         * c-parser.c (c_parser_omp_target): Return bool values.
5687
5688 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
5689
5690         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5691         num_teams_loc variable to num_thread_limit_loc.
5692
5693 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
5694
5695         * c-array-notation.c (expand_array_notations): Use void_node
5696         instead of void_zero_node.
5697
5698 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
5699
5700         * c-decl.c (finish_struct): Adjust.
5701         (finish_enum): Likewise.
5702         (bind): Adjust.
5703         (record_inline_static): Likewise.
5704         (push_scope): Likewise.
5705         (make_label): Likewise.
5706         (lookup_label_for_goto): Likewise.
5707         (finish_struct): Likewise.
5708         (finish_enum): Likewise.
5709         (store_parm_decls): Likewise.
5710         (c_push_function_context): Likewise.
5711         * c-lang.h: Remove usage of variable_size gty attribute.
5712         * c-parser.c (c_parse_init): Adjust.
5713         (c_parse_file): Likewise.
5714
5715 2014-05-13  Marek Polacek  <polacek@redhat.com>
5716
5717         PR c/61162
5718         * c-typeck.c (convert_for_assignment): Pass location to
5719         WARN_FOR_ASSIGNMENT instead of input_location.
5720
5721 2014-05-10  Marek Polacek  <polacek@redhat.com>
5722
5723         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5724         maybe_warn_string_init.
5725         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5726         maybe_warn_string_init.
5727         * c-tree.h (maybe_warn_string_init): Update declaration.
5728         * c-typeck.c (maybe_warn_string_init): Add location parameter.
5729         Call pedwarn_init with loc instead of with input_location.
5730         (digest_init): Pass init_loc to maybe_warn_string_init.
5731         (pop_init_level): Call pedwarn_init with loc instead of with
5732         input_location.
5733         (set_init_index): Likewise.
5734         (process_init_element): Likewise.
5735
5736 2014-05-09  Marek Polacek  <polacek@redhat.com>
5737
5738         PR c/61096
5739         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5740         (c_parser_initelt): Pass location to set_init_label.  Pass array index
5741         location to set_init_index.
5742         * c-tree.h (push_init_level): Update declaration.
5743         (pop_init_level): Likewise.
5744         (set_init_index): Likewise.
5745         (set_init_label): Likewise.
5746         * c-typeck.c (error_init): Add location parameter.  Call error_at
5747         instead of error.
5748         (digest_init): Pass init_loc to error_init.
5749         (really_start_incremental_init):
5750         (push_init_level): Add location parameter.  Pass loc to pop_init_level
5751         and error_init.
5752         (pop_init_level): Likewise.
5753         (set_designator): Add location parameter.  Pass loc to pop_init_level,
5754         push_init_level, and error_init.
5755         (set_init_index): Add location parameter.  Pass loc to error_init and
5756         set_designator.
5757         (set_init_label): Likewise.
5758         (output_init_element): Pass loc to error_init.
5759         (process_init_element): Pass loc to error_init, pop_init_level,
5760         pedwarn_init, and push_init_level.
5761
5762 2014-05-09  Marek Polacek  <polacek@redhat.com>
5763
5764         PR c/50459
5765         * c-parser.c (c_parser_attributes): Parse the arguments as an
5766         expression-list if the attribute takes identifier.
5767
5768 2014-05-08  Marek Polacek  <polacek@redhat.com>
5769
5770         PR c/61053
5771         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5772         TYPE_ALIGN_UNIT.
5773
5774 2014-05-08  Marek Polacek  <polacek@redhat.com>
5775
5776         PR c/61077
5777         * c-decl.c (start_function): Warn for _Atomic-qualified return type
5778         of main.
5779
5780 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
5781             Mike Stump  <mikestump@comcast.net>
5782             Richard Sandiford  <rdsandiford@googlemail.com>
5783
5784         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5785         (finish_enum): Use wide-int interfaces.
5786         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5787         * c-typeck.c (build_c_cast): Likewise.
5788         (set_nonincremental_init_from_string): Likewise.
5789         (c_tree_equal): Likewise.
5790
5791 2014-05-02  Marek Polacek  <polacek@redhat.com>
5792
5793         PR c/25801
5794         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
5795         Return size_one_node when the type is not complete.
5796         (pointer_diff): Remove comment.
5797         (build_unary_op): Improve error messages.
5798
5799 2014-05-02  Marek Polacek  <polacek@redhat.com>
5800
5801         * c-typeck.c (c_finish_return): Separate warning_at calls.
5802
5803 2014-05-02  Marek Polacek  <polacek@redhat.com>
5804
5805         * c-tree.h (error_init): Remove declaration.
5806         (pedwarn_init): Likewise.
5807         * c-typeck.c (error_init): Make static and move above.
5808         (pedwarn_init): Likewise.
5809         (warning_init): Move above.
5810         (maybe_warn_string_init): Likewise.
5811
5812 2014-05-01  Jeff Law  <law@redhat.com>
5813
5814         Revert:
5815
5816         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
5817         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5818         avoid goto.
5819
5820 2014-05-02  Marek Polacek  <polacek@redhat.com>
5821
5822         PR c/60784
5823         * c-typeck.c (push_init_level): Set constructor_designated to
5824         p->designated for structures.
5825
5826 2014-05-01  Marek Polacek  <polacek@redhat.com>
5827
5828         PR c/60915
5829         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5830         function-definition has an attribute after the declarator.
5831
5832 2014-05-01  Marek Polacek  <polacek@redhat.com>
5833
5834         PR c/60257
5835         * c-typeck.c (warning_init): Add location_t parameter.  Call
5836         warning_at instead of warning.
5837         (push_init_level): Pass input_location to warning_init.
5838         (add_pending_init): Add location_t parameter.  Pass loc to
5839         warning_init.
5840         (set_nonincremental_init): Pass input_location to add_pending_init.
5841         (set_nonincremental_init_from_string): Likewise.
5842         (output_init_element): Pass loc to warning_init and to
5843         add_pending_init.
5844
5845 2014-05-01  Marek Polacek  <polacek@redhat.com>
5846
5847         PR c/43395
5848         * c-typeck.c (c_finish_return): Distinguish between label and variable
5849         when warning about returning local address.
5850
5851 2014-05-01  Marek Polacek  <polacek@redhat.com>
5852
5853         PR c/29467
5854         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5855         in C89 mode.
5856
5857 2014-05-01  Marek Polacek  <polacek@redhat.com>
5858
5859         PR c/43245
5860         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5861         instead of 0 to WARN_FOR_QUALIFIERS.
5862
5863 2014-05-01  Marek Polacek  <polacek@redhat.com>
5864
5865         PR c/56989
5866         * c-typeck.c (default_conversion): Use better location for
5867         error call.
5868
5869 2014-04-30  Marek Polacek  <polacek@redhat.com>
5870
5871         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5872         also when SANITIZE_FLOAT_DIVIDE is on.
5873
5874 2014-04-30  Marek Polacek  <polacek@redhat.com>
5875
5876         PR c/60139
5877         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5878         and pedwarn_init.  Use loc insted of input_location.
5879
5880 2014-04-30  Marek Polacek  <polacek@redhat.com>
5881
5882         PR c/60351
5883         * c-typeck.c (build_binary_op): Use location when warning about
5884         shift count.
5885
5886 2014-04-25  Marek Polacek  <polacek@redhat.com>
5887
5888         PR c/18079
5889         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5890         always_inline/noinline and hot/cold attributes.
5891
5892 2014-04-25  Marek Polacek  <polacek@redhat.com>
5893
5894         PR c/60114
5895         * c-parser.c (c_parser_initelt): Pass input_location to
5896         process_init_element.
5897         (c_parser_initval): Pass loc to process_init_element.
5898         * c-tree.h (process_init_element): Adjust declaration.
5899         * c-typeck.c (push_init_level): Pass input_location to
5900         process_init_element.
5901         (pop_init_level): Likewise.
5902         (set_designator): Likewise.
5903         (output_init_element): Add location_t parameter.  Pass loc to
5904         digest_init.
5905         (output_pending_init_elements): Pass input_location to
5906         output_init_element.
5907         (process_init_element): Add location_t parameter.  Pass loc to
5908         output_init_element.
5909
5910 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
5911
5912         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5913         atomic-clause, allow comma in between atomic-clause and
5914         seq_cst.
5915
5916 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
5917
5918         PR c/59073
5919         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5920         fails, don't set OM_PARALLEL_COMBINED and return NULL.
5921
5922 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
5923
5924         PR middle-end/60469
5925         * c-array-notation.c (fix_builtin_array_notation_fn): Use
5926         create_tmp_var instead build_decl for creating temps.
5927         (build_array_notation_expr): Likewise.
5928         (fix_conditional_array_notations_1): Likewise.
5929         (fix_array_notation_expr): Likewise.
5930         (fix_array_notation_call_expr): Likewise.
5931
5932 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
5933
5934         PR c++/60689
5935         * c-tree.h (c_build_function_call_vec): New prototype.
5936         * c-typeck.c (build_function_call_vec): Don't call
5937         resolve_overloaded_builtin here.
5938         (c_build_function_call_vec): New wrapper function around
5939         build_function_call_vec.  Call resolve_overloaded_builtin here.
5940         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5941         Call c_build_function_call_vec instead of build_function_call_vec.
5942         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5943         * c-decl.c (finish_decl): Likewise.
5944
5945 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5946
5947         PR c/55383
5948         * c-typeck.c: Use correct format string in cast-qual warning
5949
5950 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
5951
5952         * c-decl.c (c_decl_attributes): Use
5953         lang_hooks.types.omp_mappable_type.
5954         * c-typeck.c (c_finish_omp_clauses): Likewise.
5955
5956 2014-03-06  Marek Polacek  <polacek@redhat.com>
5957
5958         PR c/60197
5959         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5960         of checking tree code.
5961
5962 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
5963
5964         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5965         (c_parser_parameter_declaration): Likewise.
5966
5967 2014-02-19  Marek Polacek  <polacek@redhat.com>
5968
5969         PR c/60195
5970         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5971         Call mark_exp_read on exp.value.
5972         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
5973         TREE_ADDRESSABLE on old instead of val.
5974         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5975
5976 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
5977
5978         * c-parser.c (c_parser_get_builtin_args): Replace calls to
5979         C_EXPR_APPEND by vec_safe_push.
5980         * c-tree.h (C_EXPR_APPEND): Remove.
5981
5982 2014-01-31  Marek Polacek  <polacek@redhat.com>
5983
5984         PR c/59963
5985         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5986         build_function_call_vec.
5987         (build_function_call): Likewise.
5988         (build_atomic_assign): Likewise.
5989         (build_function_call_vec): Add arg_loc parameter.  Use it.
5990         (convert_arguments): Likewise.
5991         (convert_for_assignment): Rename rhs_loc to expr_loc.
5992         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5993         (c_parser_objc_keywordexpr): Likewise.
5994         (c_parser_postfix_expression_after_primary): Call
5995         build_function_call_vec with expr_loc rather than op_loc.
5996         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
5997         build_function_call_vec.
5998         (c_parser_expr_list): Add locations parameter.  Fill it with locations
5999         of function arguments.
6000         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6001
6002 2014-01-30  Marek Polacek  <polacek@redhat.com>
6003
6004         PR c/59940
6005         * c-typeck.c (build_function_call_vec): Use loc parameter.
6006         (convert_arguments): Add location parameter.  Use it.
6007         (ep_convert_and_check): Likewise.
6008         (build_atomic_assign): Adjust convert_for_assignment call.
6009         (build_modify_expr): Likewise.
6010         (digest_init): Likewise.
6011         (c_finish_return): Likewise.
6012         (build_conditional_expr): Adjust ep_convert_and_check calls.
6013         (convert_for_assignment): Add rhs_loc parameter.  Use it.
6014         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6015         calls.
6016
6017 2014-01-30  Richard Biener  <rguenther@suse.de>
6018
6019         PR c/59905
6020         * c-typeck.c (build_function_call_vec): Do not replace calls
6021         to a function via an incompatible type with a runtime abort.
6022
6023 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6024
6025         * c-parser.c (c_parser_declaration_or_fndef): Replaced
6026         flag_enable_cilkplus with flag_cilkplus.
6027         (c_parser_direct_declarator_inner): Likewise.
6028         (c_parser_attribute_any_word): Likewise.
6029         (c_parser_attributes): Likewise.
6030         (c_parser_compound_statement): Likewise.
6031         (c_parser_statement_after_labels): Likewise.
6032         (c_parser_if_statement): Likewise.
6033         (c_parser_switch_statement): Likewise.
6034         (c_parser_do_statement): Likewise.
6035         (c_parser_for_statement): Likewise.
6036         (c_parser_unary_expression): Likewise.
6037         (c_parser_postfix_expression): Likewise.
6038         (c_parser_postfix_expression_after_primary): Likewise.
6039         (c_parser_postfix_expression_after_primary): Likewise.
6040         (c_parser_omp_clause_name): Likewise.
6041         (c_finish_omp_declare_simd): Likewise.
6042         (c_parser_cilk_verify_simd): Likewise.
6043         * c-typeck.c (build_array_ref): Likewise.
6044         (build_function_call_vec): Likewise.
6045         (convert_arguments): Likewise.
6046         (build_compound_expr): Likewise.
6047         (c_finish_return): Likewise.
6048         (c_finish_if_stmt): Likewise.
6049         (c_finish_loop): Likewise.
6050         (build_binary_op): Likewise.
6051
6052 2014-01-23  Marek Polacek  <polacek@redhat.com>
6053
6054         PR c/59846
6055         * c-typeck.c (parser_build_binary_op): Use location instead of
6056         input_location.
6057         (build_binary_op): Pass location to shorten_compare.
6058
6059 2014-01-23  Marek Polacek  <polacek@redhat.com>
6060
6061         PR c/58346
6062         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6063         an empty aggregate.
6064
6065 2014-01-23  Marek Polacek  <polacek@redhat.com>
6066
6067         PR c/59871
6068         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6069         of a comma expression.
6070         (emit_side_effect_warnings): Likewise.
6071
6072 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6073
6074         PR c/59825
6075         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6076         function to use walk_tree and moved a lot of its functionality to
6077         expand_array_notations.
6078         (expand_array_notations): New function.
6079
6080 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6081
6082         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6083         attribute an attribute without value.
6084
6085 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
6086
6087         PR middle-end/58809
6088         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6089         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6090
6091 2014-01-22  Marek Polacek  <polacek@redhat.com>
6092
6093         PR c/59891
6094         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6095         of remove_c_maybe_const_expr on op1 and op2.
6096
6097 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
6098
6099         PR c/58943
6100         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6101         effects, preevaluate rhs using SAVE_EXPR first.
6102
6103 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6104
6105         PR c++/59631
6106         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6107         statements with if-elseif statements.
6108
6109 2014-01-06  Marek Polacek  <polacek@redhat.com>
6110
6111         PR c/57773
6112         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6113         defined bit-field types only in ISO C.
6114
6115 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
6116
6117         Update copyright years
6118
6119 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
6120
6121         * c-array-notation.c: Use the standard form for the copyright notice.
6122
6123 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6124
6125         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6126         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6127         field in parser is not empty.  If not-empty, call the function
6128         c_parser_finish_omp_declare_simd.
6129         (c_parser_cilk_clause_vectorlength): Modified function to be shared
6130         between SIMD-enabled functions and #pragma simd.  Added new parameter.
6131         (c_parser_cilk_all_clauses): Modified the usage of the function
6132         c_parser_cilk_clause_vectorlength as mentioned above.
6133         (c_parser_cilk_simd_fn_vector_attrs): New function.
6134         (c_finish_cilk_simd_fn_tokens): Likewise.
6135         (is_cilkplus_vector_p): Likewise.
6136         (c_parser_omp_clause_name): Added checking for "vectorlength,"
6137         "nomask," and "mask" strings in clause name.
6138         (c_parser_omp_all_clauses): Added 3 new case statements:
6139         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6140         PRAGMA_CILK_CLAUSE_NOMASK.
6141         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
6142         check for vector attribute and if so call the function
6143         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
6144         called the function c_finish_cilk_simd_fn_tokens.
6145         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6146         parser field is non-empty.  If so, parse them as you would parse
6147         the omp declare simd pragma.
6148         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6149         Added a check when step is a parameter and flag it as error.
6150         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6151         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6152         pragma_omp_clause.
6153
6154 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
6155
6156         * c-parser.c (c_parser_omp_parallel): Fix description.
6157
6158 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6159
6160         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6161         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6162         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6163         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6164
6165 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
6166
6167         PR c/52023
6168         * c-parser.c (c_parser_alignas_specifier): Use
6169         c_sizeof_or_alignof_type instead of c_alignof.
6170         (c_parser_alignof_expression): Likewise, with min_alignof
6171         parameter depending on alignof spelling used.
6172
6173 2013-12-04  Marek Polacek  <polacek@redhat.com>
6174
6175         PR c/54113
6176         * c-decl.c (start_function): Don't warn for missing prototype for
6177         inline functions.
6178
6179 2013-12-03  Marek Polacek  <polacek@redhat.com>
6180
6181         PR c/59351
6182         * c-decl.c (build_compound_literal): Allow compound literals with
6183         empty initial value.
6184
6185 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
6186
6187         PR c/58235
6188         * c-typeck.c (build_modify_expr): Diagnose assignment to
6189         expression with array type.
6190
6191 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
6192
6193         PR c/42262
6194         * c-typeck.c (process_init_element): Do not treat a string as
6195         initializing a whole array when used with a designator for an
6196         individual element.
6197
6198 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
6199
6200         PR c/57574
6201         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6202         an inline function following a static declaration.
6203
6204 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
6205
6206         PR c/59310
6207         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6208         to p_name before calling c_parser_omp_teams instead of after.
6209         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6210         argument.  Remove unused p_name variable.
6211
6212 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
6213             Jakub Jelinek  <jakub@redhat.com>
6214
6215         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6216         external_scope is NULL.
6217
6218 2013-11-27  Tom de Vries  <tom@codesourcery.com>
6219             Marc Glisse  <marc.glisse@inria.fr>
6220
6221         PR c++/59032
6222         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6223
6224 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
6225
6226         * c-typeck.c: Add required include files from gimple.h.
6227
6228 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
6229
6230         * c-decl.c (define_label, shadow_tag_warned)
6231         (check_bitfield_type_and_width, grokdeclarator, grokparms,
6232         store_parm_decls_newstyle, store_parm_decls_oldstyle)
6233         (declspecs_add_type): Remove use of in_system_header macro.
6234         * c-parser.c (c_parser_unary_expression): Likewise.
6235         * c-typeck.c (store_init_value, process_init_element)
6236         (c_start_case): Likewise.
6237
6238         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6239         macro.
6240
6241         * c-parser.c (c_parser_set_source_position_from_token): Remove
6242         reference to in_system_header from comment.
6243
6244 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
6245
6246         * c-decl.c (grokdeclarator): Update comment to refer to
6247         tree_to_[su]hwi rather than tree_low_cst.
6248
6249 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
6250
6251         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6252         tree_to_uhwi throughout.
6253
6254 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
6255
6256         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6257         throughout.
6258
6259 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
6260
6261         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6262         throughout.
6263
6264 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
6265
6266         * c-parser.c (c_parser_cilk_simd): New.
6267         (c_parser_cilk_verify_simd): New.
6268         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6269         (c_parser_omp_for_loop): Add case for NE_EXPR.
6270         Set c_break_label for CILK_SIMD.
6271         (c_parser_cilk_clause_vectorlength): New.
6272         (c_parser_cilk_clause_linear): New.
6273         (c_parser_cilk_clause_name): New.
6274         (c_parser_cilk_all_clauses): New.
6275         * c-typeck.c (build_unary_op): Pass location argument to
6276         readonly_error.
6277         (build_modify_expr): Same.
6278         (build_asm_expr): Same.
6279         (c_finish_bc_stmt): Error on break/continue in loops.
6280
6281 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
6282
6283         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6284
6285 2013-11-14  Diego Novillo  <dnovillo@google.com>
6286
6287         * c-decl.c: Include print-tree.h.
6288         Include stor-layout.h.
6289         Include varasm.h.
6290         Include attribs.h.
6291         Include stringpool.h.
6292         * c-lang.c: Include fold-const.h.
6293         * c-parser.c: Include stringpool.h.
6294         Include attribs.h.
6295         Include stor-layout.h.
6296         Include varasm.h.
6297         Include trans-mem.h.
6298         * c-typeck.c: Include stor-layout.h.
6299         Include trans-mem.h.
6300         Include varasm.h.
6301         Include stmt.h.
6302
6303 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
6304
6305         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6306         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6307         __auto_type.
6308         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6309         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6310         RID_AUTO_TYPE.
6311         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6312         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6313         (c_parser_declarator, c_parser_direct_declarator_inner)
6314         (c_parser_parameter_declaration, c_parser_type_name): All callers
6315         changed.
6316         (c_parser_declaration_or_fndef): Handle declarations with type
6317         determined from the initializer.
6318
6319 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
6320
6321         * c-typeck.c: Include gimplify.h.
6322
6323 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
6324
6325         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6326         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6327         comment.
6328         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6329         or _Thread_local as appropriate in diagnostics.
6330         (build_null_declspecs): Initialize ret->thread_gnu_p.
6331         (declspecs_add_scspec): Handle either __thread or _Thread_local
6332         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
6333         pedantic.  Do not disallow _Thread_local extern and _Thread_local
6334         static.
6335
6336 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
6337             Andrew MacLeod  <amacleod@redhat.com>
6338
6339         * c-aux-info.c (gen_type): Handle atomic qualifier.
6340         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6341         qualifiers when compating types.
6342         (shadow_tag_warned): Handle atomic_p in declspecs.
6343         (quals_from_declspecs): Likewise.
6344         (start_decl): Use c_type_promotes_to when promoting argument
6345         types.
6346         (grokdeclarator): Handle _Atomic.
6347         (get_parm_info): Diagnose any qualifier on "void" as only
6348         parameter.
6349         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6350         comparing types.  Use c_type_promotes_to when promoting argument
6351         types.
6352         (finish_function): Use c_type_promotes_to when promoting argument
6353         types.
6354         (build_null_declspecs): Handle atomic_p in declspecs.
6355         (declspecs_add_qual): Handle RID_ATOMIC.
6356         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6357         (c_token_starts_declspecs): Handle RID_ATOMIC.
6358         (c_parser_declspecs): Handle atomic type specifiers and
6359         qualifiers.
6360         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6361         from types of expressions with atomic type.
6362         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6363         (c_parser_attribute_any_word): Handle RID_ATOMIC.
6364         (c_parser_initializer, c_parser_initelt, c_parser_initval)
6365         (c_parser_statement_after_labels, c_parser_switch_statement)
6366         (c_parser_for_statement, c_parser_expr_no_commas)
6367         (c_parser_conditional_expression, c_parser_binary_expression)
6368         (c_parser_cast_expression, c_parser_unary_expression)
6369         (c_parser_postfix_expression)
6370         (c_parser_postfix_expression_after_primary, c_parser_expression):
6371         Use convert_lvalue_to_rvalue.
6372         (c_parser_expression_conv, c_parser_expr_list): Document
6373         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
6374         (c_parser_objc_synchronized_statement): Use
6375         convert_lvalue_to_rvalue.
6376         (c_parser_objc_selector): Handle RID_ATOMIC.
6377         (c_parser_objc_receiver, c_parser_array_notation): Use
6378         convert_lvalue_to_rvalue.
6379         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6380         _Atomic (type-name).
6381         (struct c_declspecs): Add atomic_p field.
6382         (convert_lvalue_to_rvalue): Declare.
6383         * c-typeck.c (c_type_promotes_to): Promote atomic types to
6384         corresponding atomic types.
6385         (qualify_type): Don't add _Atomic qualifiers from second argument.
6386         (comp_target_types): Do not allow _Atomic mismatches.
6387         (type_lists_compatible_p): Do not remove atomic qualifiers when
6388         comparing types.
6389         (really_atomic_lvalue, convert_lvalue_to_rvalue)
6390         (build_atomic_assign): New functions.
6391         (build_unary_op): Use build_atomic_assign for atomic increment and
6392         decrement.
6393         (build_conditional_expr): Do not treat _Atomic void as a qualified
6394         version of void.
6395         (build_modify_expr): Use build_atomic_assign for atomic LHS.
6396         (find_anonymous_field_with_type, convert_to_anonymous_field)
6397         (convert_for_assignment): Do not remove atomic qualifiers when
6398         comparing types.
6399         (digest_init): Do not accept initialization of arrays of atomic
6400         elements by string constants.
6401         (build_asm_expr): Use convert_lvalue_to_rvalue.
6402         (build_binary_op): Do not treat _Atomic void as a qualified
6403         version of void.
6404
6405 2013-11-06  DJ Delorie  <dj@redhat.com>
6406
6407         * c-decl.c (locate_old_decl): If a previous conflicting decl is
6408         both explicit and builtin, print the location of the explicit one.
6409
6410 2013-11-05  Tobias Burnus  <burnus@net-b.de>
6411
6412         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6413         c_parser_omp_distribute, c_parser_omp_teams,
6414         c_parser_omp_target, c_parser_omp_declare): Handle
6415         -fopenmp-simd.
6416
6417 2013-11-03  Marek Polacek  <polacek@redhat.com>
6418
6419         * c-decl.c (grokdeclarator): Add VLA instrumentation.
6420
6421 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
6422
6423         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6424         check_dup_generic at the end, unless remove is true.
6425         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6426         remove = true;.
6427         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6428
6429 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
6430
6431         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6432         with decl that is not pointer nor array.
6433
6434 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6435
6436         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6437         a spawning function is found.
6438         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6439         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6440         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6441         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6442         case.
6443         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6444         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6445         expr.
6446         (c_finish_return): Added a check to reject _Cilk_spawn in return
6447         expression.
6448         (build_cilk_spawn): New function.
6449         (build_cilk_sync): Likewise.
6450         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6451
6452 2013-10-27  Tobias Burnus  <burnus@net-b.de>
6453
6454         PR other/33426
6455         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6456         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6457         (c_parser_statement_after_labels): Update calls.
6458
6459 2013-10-24  Tobias Burnus  <burnus@net-b.de>
6460
6461         PR other/33426
6462         * c-parser.c (c_parser_pragma, c_parser_for_statement):
6463         Handle PRAGMA_IVDEP.
6464         (c_parser_statement_after_labels): Update call.
6465
6466 2013-10-24  Marek Polacek  <polacek@redhat.com>
6467
6468         * c-parser.c (c_parser_struct_declaration): Add a comment.
6469         (c_parser_declarator): Don't allow _Alignas here.
6470
6471 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
6472
6473         * c-parser.c: Include omp-low.h.
6474         * c-typeck.c: Likewise.
6475
6476 2013-10-17  Marek Polacek  <polacek@redhat.com>
6477
6478         PR c/58267
6479         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6480         Document syntax of the array-declarator.
6481         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6482         are not permitted.
6483         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6484         (c_parser_struct_declaration): Likewise.
6485         (c_parser_declarator): Likewise.
6486         (c_parser_direct_declarator_inner): Likewise.
6487         (c_parser_parameter_declaration): Likewise.
6488         (c_parser_type_name): Likewise.
6489
6490 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
6491
6492         * c-lang.h (current_omp_declare_target_attribute): New extern
6493         decl.
6494         * c-parser.c: Include c-lang.h.
6495         (struct c_parser): Change tokens to c_token *.
6496         Add tokens_buf field.  Change tokens_avail type to unsigned int.
6497         (c_parser_consume_token): If parser->tokens isn't
6498         &parser->tokens_buf[0], increment parser->tokens.
6499         (c_parser_consume_pragma): Likewise.
6500         (enum pragma_context): Add pragma_struct and pragma_param.
6501         (c_parser_external_declaration): Adjust
6502         c_parser_declaration_or_fndef caller.
6503         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6504         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6505         Adjust recursive call.
6506         (c_parser_struct_or_union_specifier): Use pragma_struct instead
6507         of pragma_external.
6508         (c_parser_parameter_declaration): Use pragma_param instead of
6509         pragma_external.
6510         (c_parser_compound_statement_nostart, c_parser_label,
6511         c_parser_for_statement): Adjust
6512         c_parser_declaration_or_fndef callers.
6513         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6514         it through to c_parser_conditional_expression.
6515         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6516         pass it through to c_parser_binary_expression.  Adjust recursive
6517         call.
6518         (c_parser_binary_expression): Remove prec argument, add
6519         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
6520         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6521         binop matches it, use build2 instead of parser_build_binary_op.
6522         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6523         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6524         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6525         Handle pragma_struct and pragma_param the same as pragma_external.
6526         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6527         (c_parser_omp_variable_list): Parse array sections for
6528         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6529         (c_parser_omp_clause_collapse): Fully fold collapse expression.
6530         (c_parser_omp_clause_reduction): Handle user defined reductions.
6531         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6532         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6533         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6534         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6535         c_parser_omp_clause_depend, c_parser_omp_clause_map,
6536         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6537         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6538         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6539         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
6540         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
6541         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6542         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
6543         (c_parser_omp_for_loop): Add CODE argument, pass it through
6544         to c_finish_omp_for.  Change last argument to cclauses,
6545         and adjust uses to grab parallel clauses from the array of all
6546         the split clauses.  Adjust c_parser_binary_expression,
6547         c_parser_declaration_or_fndef and c_finish_omp_for callers.
6548         (omp_split_clauses): New function.
6549         (c_parser_omp_simd): New function.
6550         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6551         Allow the function to be called also when parsing combined constructs,
6552         and call c_parser_omp_simd when parsing for simd.
6553         (c_parser_omp_sections_scope): If section-sequence doesn't start with
6554         #pragma omp section, require exactly one structured-block instead of
6555         sequence of statements.
6556         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6557         Allow the function to be called also when parsing combined constructs.
6558         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6559         Allow the function to be called also when parsing combined
6560         constructs.
6561         (c_parser_omp_taskgroup, c_parser_omp_cancel,
6562         c_parser_omp_cancellation_point, c_parser_omp_distribute,
6563         c_parser_omp_teams, c_parser_omp_target_data,
6564         c_parser_omp_target_update, c_parser_omp_target,
6565         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6566         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6567         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6568         (c_parser_omp_construct): Add p_name and mask vars.  Handle
6569         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6570         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
6571         and c_parser_omp_sections callers.
6572         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6573         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6574         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6575         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
6576         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
6577         OMP_CLAUSE_DEPEND.
6578         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6579         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6580         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6581         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6582         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6583         * c-typeck.c: Include tree-inline.h.
6584         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6585         handle_omp_array_sections_1, handle_omp_array_sections,
6586         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6587         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6588         user defined reductions.
6589         (c_tree_equal): New function.
6590         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6591         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6592         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6593         c_check_omp_declare_reduction_r): New prototypes.
6594         * c-decl.c (current_omp_declare_target_attribute): New variable.
6595         (c_decl_attributes): New function.
6596         (start_decl, start_function): Use it instead of decl_attributes.
6597         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6598         c_omp_reduction_decl, c_omp_reduction_lookup,
6599         c_check_omp_declare_reduction_r): New functions.
6600
6601 2013-09-25  Tom Tromey  <tromey@redhat.com>
6602
6603         * Make-lang.in (c/gccspec.o): Remove.
6604         (CFLAGS-c/gccspec.o): New variable.
6605         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6606         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6607         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6608
6609 2013-09-25  Tom Tromey  <tromey@redhat.com>
6610
6611         * Make-lang.in (c/gccspec.o): Don't use subshell.
6612
6613 2013-09-18  Marek Polacek  <polacek@redhat.com>
6614
6615         PR sanitize/58443
6616         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6617         Remove unnecessary check.
6618
6619 2013-09-18  Marek Polacek  <polacek@redhat.com>
6620
6621         PR sanitizer/58411
6622         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6623         no_sanitize_undefined attribute.
6624
6625 2013-09-13  Kai Tietz  <ktietz@redhat.com>
6626
6627         PR target/57848
6628         * c-decl.c (c_builtin_function_ext_scope): Remove
6629         wrong assumption that it is never called on prexisting
6630         symbol.
6631
6632 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
6633
6634         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6635
6636 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6637
6638         * c-objc-common.c (c_tree_printer): Tidy.
6639
6640 2013-08-30  Marek Polacek  <polacek@redhat.com>
6641
6642         * c-typeck.c (build_binary_op): Add division by zero and shift
6643         instrumentation.
6644
6645 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
6646             Joseph Myers  <joseph@codesourcery.com>
6647
6648         PR c/35649
6649         * c-typeck.c (c_common_type): Prefer double_type_node over
6650         other REAL_TYPE types with the same precision.
6651         (convert_arguments): Likewise.
6652
6653 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6654
6655         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6656         (c_initialize_diagnostics): Call a destructor for the early printer.
6657
6658 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6659
6660         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6661         printer initialization.
6662
6663 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6664
6665         PR c/57490
6666         * c-array-notation.c (fix_conditional_array_notations_1): Added a
6667         check for truth values.
6668         (expand_array_notation_exprs): Added truth values case.  Removed an
6669         unwanted else.  Added for-loop to walk through subtrees in default
6670         case.
6671
6672 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6673
6674         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6675
6676 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
6677
6678         * c-parser.c (struct c_generic_association): Fix typo.
6679
6680 2013-07-23  Tom Tromey  <tromey@redhat.com>
6681             Joseph Myers  <joseph@codesourcery.com>
6682
6683         * c-parser.c (struct c_generic_association): New.
6684         (c_generic_association_d): New typedef.
6685         (c_parser_generic_selection): New function.
6686         (c_parser_postfix_expression): Handle RID_GENERIC.
6687
6688 2013-07-13  Jason Merrill  <jason@redhat.com>
6689
6690         PR c++/57793
6691         * c-decl.c (finish_struct): Check for too-large class.
6692
6693 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
6694
6695         PR c/57821
6696         * c-typeck.c (set_init_index): When folding, check for index overflow.
6697
6698 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6699
6700         * c-parser.c (c_parser_array_notation): Removed rejection of array
6701         notations in an array of function pointers.
6702
6703 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6704
6705         * c-array-notation.c (make_triplet_val_inv): New function.
6706         (create_cmp_incr): Likewise.
6707         (create_array_refs): Likewise.
6708         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6709         Also modularized common parts between functions and called the function.
6710         (build_array_notation_expr): Likewise.
6711         (fix_conditional_array_notations_1): Likewise.
6712         (fix_array_notation_expr): Likewise.
6713         (fix_array_notation_call_expr): Likewise.
6714
6715 2013-06-18  Marek Polacek  <polacek@redhat.com>
6716
6717         PR c/57630
6718         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6719
6720 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6721
6722         * c-array-notation.c (build_array_notation_expr): Reject array notation
6723         mismatch between LHS and RHS even inside a call_expr.  Also, removed
6724         a couple while statements that were dead code.
6725
6726 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6727
6728         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6729         excessive precision expressions in function parameters.  Also removed
6730         couple unwanted while statements.
6731
6732 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6733
6734         * c-array-notation.c (expand_array_notation_exprs): Added
6735         ARRAY_NOTATION_REF case.
6736
6737 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6738
6739         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6740         function to c-family/array-notation-common.c.
6741         (is_cilkplus_reduce_builtin): Likewise.
6742         (find_rank): Likewise.
6743         (extract_array_notation_exprs): Likewise.
6744         (replace_array_notations): Likewise.
6745         (find_inv_trees): Likewise.
6746         (replace_inv_trees): Likewise.
6747         (contains_array_notation_expr): Likewise.
6748         (find_correct_array_notation_type): Likewise.
6749         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6750         (struct inv_list): Moved this to c-family/array-notation-common.c.
6751         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6752
6753 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6754
6755         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6756         reduction functions outside the for-loop.  Added a check if the fundecl
6757         is non-NULL.  Finally, removed an unwanted if-statement, and made the
6758         body unconditional.
6759
6760 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6761
6762         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6763         condition of the if-statement matches the rank of else-block and then-
6764         block when array notations are used.
6765         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6766         expression after the entire function body is parsed.
6767         (c_parser_expr_no_commas): Delayed creating array notation expressions
6768         to the end of function parsing.
6769         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6770         whole if-statement instead of just the condition.
6771         (expand_array_notation_exprs): Added MODIFY_EXPR case.
6772
6773 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6774
6775         PR c/57474
6776         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6777         array to NULL_TREE if they are unused.  Also added a check for the
6778         field to be NULL before its fields are used in future.
6779
6780 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6781
6782         PR bootstrap/57450
6783         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6784         (build_array_notation_expr): Likewise.
6785
6786 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6787
6788         * c-typeck.c (build_array_ref): Added a check to see if array's
6789         index is greater than one.  If true, then emit an error.
6790         (build_function_call_vec): Exclude error reporting and checking
6791         for builtin array-notation functions.
6792         (convert_arguments): Likewise.
6793         (c_finish_return): Added a check for array notations as a return
6794         expression.  If true, then emit an error.
6795         (c_finish_loop): Added a check for array notations in a loop
6796         condition.  If true then emit an error.
6797         (lvalue_p): Added a ARRAY_NOTATION_REF case.
6798         (build_binary_op): Added a check for array notation expr inside
6799         op1 and op0.  If present, we call another function to find correct
6800         type.
6801         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6802         * c-parser.c (c_parser_compound_statement): Check if array
6803         notation code is used in tree, if so, then transform them into
6804         appropriate C code.
6805         (c_parser_expr_no_commas): Check if array notation is used in LHS
6806         or RHS, if so, then build array notation expression instead of
6807         regular modify.
6808         (c_parser_postfix_expression_after_primary): Added a check for
6809         colon(s) after square braces, if so then handle it like an array
6810         notation.  Also, break up array notations in unary op if found.
6811         (c_parser_direct_declarator_inner): Added a check for array
6812         notation.
6813         (c_parser_compound_statement): Added a check for array notation in
6814         a stmt.  If one is present, then expand array notation expr.
6815         (c_parser_if_statement): Likewise.
6816         (c_parser_switch_statement): Added a check for array notations in
6817         a switch statement's condition.  If true, then output an error.
6818         (c_parser_while_statement): Similarly, but for a while.
6819         (c_parser_do_statement): Similarly, but for a do-while.
6820         (c_parser_for_statement): Similarly, but for a for-loop.
6821         (c_parser_unary_expression): Check if array notation is used in a
6822         pre-increment or pre-decrement expression.  If true, then expand
6823         them.
6824         (c_parser_array_notation): New function.
6825         * c-array-notation.c: New file.
6826         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6827
6828 2013-05-23  Mike Stump  <mikestump@comcast.net>
6829
6830         * c-typeck.c (convert_for_assignment): Handle references to memory
6831         spaces better.
6832
6833 2013-05-16  Jason Merrill  <jason@redhat.com>
6834
6835         * Make-lang.in (cc1$(exeext)): Use link mutex.
6836
6837 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
6838
6839         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6840         to simply use OPT_Wpointer_arith.
6841         (build_unary_op): Likewise.
6842
6843 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
6844
6845         PR c/19449
6846         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6847         argument.  If set, or it temporarily for parsing of the first
6848         argument into force_folding_builtin_constant_p.
6849         (c_parser_postfix_expression): Adjust callers.
6850
6851 2013-03-21  Richard Biener  <rguenther@suse.de>
6852
6853         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6854         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
6855
6856 2013-02-12  Marek Polacek  <polacek@redhat.com>
6857
6858         PR c/44938
6859         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6860         origtypes to NULL.
6861
6862 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
6863
6864         PR c/56078
6865         * c-typeck.c (set_nonincremental_init_from_string): If
6866         constructor_max_index is NULL, treat it as if tree_int_cst_lt
6867         returned false.
6868         (process_init_element): Likewise.
6869
6870 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
6871
6872         PR c++/55619
6873         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6874         argument, don't call default_function_array_conversion
6875         nor c_fully_fold here.
6876         (c_parser_asm_statement): Adjust callers.
6877         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6878         and outputs here, and call default_function_array_conversion
6879         on inputs that don't need to be addressable.
6880
6881 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
6882
6883         PR c/39464
6884         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6885         warning require that both c_common_unsigned_type as well as
6886         c_common_signed_type is the same for both mvl and mvr types.
6887
6888 2012-11-16  Diego Novillo  <dnovillo@google.com>
6889
6890         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6891
6892         * c-common.c: Use new vec API in vec.h.
6893         * c-common.h: Likewise.
6894         * c-gimplify.c: Likewise.
6895         * c-pragma.c: Likewise.
6896         * c-pretty-print.c: Likewise.
6897         * c-pretty-print.h: Likewise.
6898         * c-semantics.c: Likewise.
6899         * c-decl.c: Likewise.
6900         * c-parser.c: Likewise.
6901         * c-tree.h: Likewise.
6902         * c-typeck.c: Likewise.
6903
6904 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
6905
6906         PR c++/54930
6907         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6908
6909 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6910
6911         PR c/53066
6912         * c-decl.c (warn_if_shadowing): Do not warn if a variable
6913         shadows a function, unless the variable is a function or a
6914         pointer-to-function.
6915
6916 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
6917
6918         PR c/54381
6919         * c-parser.c (struct c_tree_loc_pair): Removed.
6920         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6921         add location_t * and tree * arguments, fill in array of 3
6922         sizeof_arg trees and corresponding locs.
6923         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6924         c_parser_expr_list callers.
6925         (c_parser_postfix_expression_after_primary): Likewise.  Pass
6926         array of 3 sizeof_arg trees and locs (corresponding to first
6927         3 arguments) to sizeof_pointer_memaccess_warning.
6928
6929 2012-10-09  Lawrence Crowl  <crowl@google.com>
6930
6931         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6932         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6933         hash table.
6934
6935 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
6936
6937         PR c++/54194
6938         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6939         call.
6940
6941 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
6942
6943         PR c++/54427
6944         * c-typeck.c: Include c-common.h.
6945         (enum stv_conv): Moved to c-common.h.
6946         (scalar_to_vector): Moved to c-common.c.
6947         (build_binary_op): Adapt to scalar_to_vector's new prototype.
6948         * Make-lang.in: c-typeck.c depends on c-common.h.
6949
6950 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
6951
6952         * c-decl.c (c_write_global_declarations): Fix handling of
6953         -fdump-ada-spec*.
6954
6955 2012-09-30  Sharad Singhai  <singhai@google.com>
6956
6957         * c-decl.c (c_write_global_declarations): Use a different method
6958         to determine if the dump has ben initialized.
6959
6960 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
6961
6962         PR c/54552
6963         * c-typeck.c (c_cast_expr): When casting to a type requiring
6964         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6965         c_fully_fold first.
6966
6967 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
6968
6969         PR c/54103
6970         * c-typeck.c (build_unary_op): Pass original argument of
6971         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6972         any C_MAYBE_CONST_EXPR, if it has integer operands.
6973         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6974         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6975         to c_objc_common_truthvalue_conversion, then remove any
6976         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
6977         c_objc_common_truthvalue_conversion not
6978         c_common_truthvalue_conversion.
6979         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6980         call note_integer_operands for arguments with integer operands
6981         that are not integer constants.
6982
6983 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
6984
6985         PR c/54559
6986         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6987         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6988
6989 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
6990
6991         PR c/54428
6992         * c-convert.c (convert): Don't call fold_convert_loc if
6993         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6994         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
6995         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6996
6997 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
6998
6999         PR c/54355
7000         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7001         for nested and empty_ok arguments in the call to
7002         c_parser_declaration_or_fndef.
7003
7004 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
7005
7006         * c-tree.h (c_last_sizeof_arg): Declare.
7007         * c-parser.c (struct c_tree_loc_pair): New type.
7008         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
7009         non-NULL.
7010         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7011         (c_parser_postfix_expression_after_primary): Likewise.  Call
7012         sizeof_pointer_memaccess_warning if needed.
7013         (sizeof_ptr_memacc_comptypes): New function.
7014         * c-typeck.c (c_last_sizeof_arg): New global variable.
7015         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7016
7017 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
7018
7019         * c-lang.h (lang_decl): Add variable_size GTY option.
7020
7021 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
7022
7023         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7024         * Make-lang.in: Fix dependencies.
7025
7026 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
7027
7028         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7029         and add language Makefile hooks.
7030         * config-lang.in: New file.
7031         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7032         add the required "normal" config-lang.in rules.
7033         * c-lang.h: Moved from gcc/ to here.
7034         * c-tree.h: Likewise.
7035         * c-objc-common.c: Likewise.
7036         * c-objc-common.h: Likewise.
7037         * c-typeck.c: Likewise.
7038         * c-convert.c: Likewise.
7039         * c-lang.c: Likewise.
7040         * c-aux-info.c: Likewise.
7041         * c-errors.c: Likewise.
7042         * gccspec.c: Likewise.
7043         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
7044         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
7045 \f
7046 Copyright (C) 2012-2020 Free Software Foundation, Inc.
7047
7048 Copying and distribution of this file, with or without modification,
7049 are permitted in any medium without royalty provided the copyright
7050 notice and this notice are preserved.