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