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