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