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