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