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