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